Compare commits

..

485 Commits

Author SHA1 Message Date
martinl%netscape.com
075d0ab2f2 Bugzilla 151594
Search ".so" and ".sl" file names for plugin libraries.
NETSCAPE_6_2_2_BRANCH checkin only.  Original bug fix 106806 is in 1.0 and trunk.
r: jdunn


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@125095 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 18:23:49 +00:00
jdunn%netscape.com
5b44c9999f merging in the 6.2.3 changes into our 622 tree for IPF
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@122069 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 11:12:25 +00:00
jdunn%netscape.com
d8fe11b5a4 updates for IPF.
-only export certain symbols from Components
-use local CopyLowBits routine and not nspr function
# 136163


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@118629 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 17:30:13 +00:00
jdunn%netscape.com
c013520119 adding security coreconf file for ipf (hpux 11.20)
# 136163


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@118501 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-09 00:24:00 +00:00
jdunn%netscape.com
2bcc79014c checking nspr files to support ipf on hpux 11.20 for mozilla 622.
These change are already checked into the trunk nspr, I am just
matching the branch with the trunk (note: one diff to add +Olit=all)
# 136163
r=martinl@netscape.com


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@118493 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-08 23:45:32 +00:00
jdunn%netscape.com
d2fecb7ea9 remove erroneous printfs that I accidentally checked in
# 136163


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@118491 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-08 23:39:17 +00:00
jdunn%netscape.com
08b9ea85cf Checking in changes to get 622 working on IPF
# 136163
r=martinl@netscape.com
a=jdunn@netscape.com


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@118474 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-08 15:42:13 +00:00
jdunn%netscape.com
e1d2c460d6 Adding ipf xptcall code for HP-UX 11.20 to the 622 Branch
# 126293
a=jdunn\@netscape.com
r=martinl\@netscape.com


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@118472 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-08 14:13:48 +00:00
mscott%netscape.com
0475a79ff6 Bug #12571 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116584 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-14 22:39:47 +00:00
mscott%netscape.com
d6242bd141 Landing Bug #126898 onto the branch
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116349 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-11 22:59:45 +00:00
mscott%netscape.com
56fd366948 Landing Seibel bug #108041 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116223 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 23:26:13 +00:00
mscott%netscape.com
bfe0b8dfe1 Landing Seibel Bug #108041 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116222 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 23:25:40 +00:00
mscott%netscape.com
d942a5fca1 Landing Seibel Bug #105292 onto the branch for darin.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116220 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 23:01:37 +00:00
jj%netscape.com
3b2582feb8 bugscape 12385: update mozilla part of the user agent to 0.9.4.1 (NS622 branch)
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116219 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 22:55:05 +00:00
mscott%netscape.com
e756b83c4d Landing Bug #99174 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116210 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 22:37:51 +00:00
mscott%netscape.com
c636a1d999 Landing Bug #125620 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116190 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 21:48:05 +00:00
mscott%netscape.com
15f05a9fbf Landing 125720 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116182 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 21:21:57 +00:00
mscott%netscape.com
3723b1d616 landing bug #97674 onto the branch
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116122 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 02:00:30 +00:00
mscott%netscape.com
b9e630cd09 Landing bug #115228 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116120 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 01:48:17 +00:00
leaf%mozilla.org
069c34903e update the .rsrc file versions
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116108 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 00:02:55 +00:00
mscott%netscape.com
a2bdcdd2c7 Landing Bug #111305 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116100 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-07 23:09:07 +00:00
mscott%netscape.com
f8954afd62 Landing part of Bug #111305 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116098 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-07 22:53:25 +00:00
mscott%netscape.com
415e4b72d3 Landing bugscape bug #11922 onto the branch.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116090 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-07 21:44:09 +00:00
cltbld%netscape.com
1a52900772 updating to use tag NETSCAPE_6_2_2_BRANCH, kysmith checking in as cltbld
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@116002 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-06 23:47:55 +00:00
(no author)
5b52392817 This commit was manufactured by cvs2svn to create branch
'NETSCAPE_6_2_2_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_2_BRANCH@114929 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-19 12:28:22 +00:00
syd%netscape.com
0581a1f59d Checkin fix for 89436 on NETSCAPE_6_2_1_BRANCH for a respin. a=adt
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@112425 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-18 09:11:46 +00:00
alecf%netscape.com
fefa0b8482 final part of fix for bug 102043 sr=blake
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108918 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-26 21:42:59 +00:00
alecf%netscape.com
d865783e96 other part of bug 102043 r=radha sr=rpotts
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108632 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 22:30:53 +00:00
alecf%netscape.com
5a8e870248 check in bug 102043 to the 6.2.1 branch
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108631 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 22:28:23 +00:00
naving%netscape.com
0dd07fcb44 110067 r=naving sr=mscott. patch by bienvenu to fix corruption of mail attachments when configured
for offline use.


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108623 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 20:57:31 +00:00
mstoltz%netscape.com
a5d0cd6701 Bug 109113 - remove __call__ property of function objects, and add
same-origin check on the caller property. r=jst, sr=brendan, a=jaime


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108614 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 20:01:12 +00:00
joki%netscape.com
16aed83af0 Fix for 108104, prevent key/mouse events from untrusted scripts to spoof UI into thinking it got real native events. r:saari,sr:jst
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108572 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 10:08:09 +00:00
jst%netscape.com
1299c286cc Fixing bug 110242. Fix crash in text.substringData() when a count large enough to make count+start not fit in 32 bits is passed in. r=rayw@netscape.com, sr=vidur@netscape.com, a=jaimejr@netscape.com
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108553 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 04:28:16 +00:00
darin%netscape.com
a7ffb58fe2 fixes bug 97958 "[CRASH] on :jar protocol - M094 [@ ntdll.dll - nsInputStreamTee::TeeSegment]"
r=dbaron, sr=dougt, a=PDT


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108540 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 02:44:47 +00:00
darin%netscape.com
d8f4c33192 fixes bug 110418; r=morse, sr=alecf, a=pdt
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108532 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 02:23:18 +00:00
dougt%netscape.com
7ead48dbe8 fixes 108573. AutoRegisterComponent crashes when registered component loaders are not already created. r=dp, sr=rpotts, a=pdt
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108501 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-19 22:24:13 +00:00
leaf%mozilla.org
f1860fbadc Bumped up vers 2 to 6.2.1
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108200 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 23:04:25 +00:00
cltbld%netscape.com
818270ff9e updating to use NETSCAPE_6_2_1_BRANCH
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@108191 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 21:52:36 +00:00
(no author)
ee71b5ceac This commit was manufactured by cvs2svn to create branch
'NETSCAPE_6_2_1_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/NETSCAPE_6_2_1_BRANCH@106175 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-24 17:20:10 +00:00
jj%netscape.com
4ba6ac6172 bugscape 10608: added oji.shlb to MacOS 9 installer & MacOS X package. r=granrose, sr=leaf+sfraser
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105992 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-22 23:57:08 +00:00
jj%netscape.com
de8322aab8 bugscape 10609: updated 'vers' 2 for 6.2
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105990 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-22 23:53:39 +00:00
mstoltz%netscape.com
43b4280a30 Bug 105705, temporary fix - remove security check optimization
(needsSecurityCheck) on global property access, since it misses an
important case. r=harishd, jband, sr=jst, a=jaimejr


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105986 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-22 23:26:22 +00:00
mscott%netscape.com
785f70d84d Bug 97497 --> fix a crash when expuning messages from the imap server by backing out part of an earlier
change from bienvenu
r=naving
sr=sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105786 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-19 19:59:02 +00:00
racham%netscape.com
220bdb30be 105162 r=racham sr=mscott. Fix pop3 message size download limit pref. remove unused code.
This is naving


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105646 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-17 22:59:49 +00:00
racham%netscape.com
4bf6af20b9 105162 r=racham sr=mscott Remove unused prefs. This is naving
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105645 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-17 22:59:43 +00:00
rpotts%netscape.com
632cfc715e bug #104769 (r=pavlov@netscape.com, sr=jst@netscape.com, a=pdt). Opening new windows sometimes stalls...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105604 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-17 05:50:22 +00:00
sdagley%netscape.com
ddc6be30ee Fix Bugscape #7630 - checking in for bnesse, r/sr=darin
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105596 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-17 04:34:12 +00:00
ssu%netscape.com
d0b0caddc4 fixing bug 103232 - Simple MAPI: Uninstaller needs to restore previous mapi32.dll if replaced. r=srilatha, sr=dveditz, sr=mscott
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105563 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 23:52:34 +00:00
law%netscape.com
e6ca9fead3 Branch fix for bug 104910; changes default for Don't ask me again checkbox on Quick Launch dialog; r=pchen, sr=blake, a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105562 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 23:50:15 +00:00
srilatha%netscape.com
0760514fb0 Fix for bug 104943. Added SendMessage in Set and Unset default mailClient to
broadcast the message once the registry is updated.
r=ssu, sr=dveditz, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105549 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 23:20:54 +00:00
srilatha%netscape.com
2b0f8da028 Fix for bug # 104938. Changed the return value for all the APIs that are not
implemented to MAPI_E_FAILURE.
Checking in for kkhandrika@netscape.com
r=rdayal, sr=mscott, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105548 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 23:07:45 +00:00
sfraser%netscape.com
5d2c1e284e Landing the fix for bug 42817 (Page setup UI on Mac) on the 0.9.4 branch. a=pdt2
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105482 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 07:00:52 +00:00
sfraser%netscape.com
ef568e7a83 Landing changes for bug 36796 (implement Page Setup on Mac) on the 0.9.4 branch. a=pdt2
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105481 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 06:48:18 +00:00
ssu%netscape.com
ef74dae0e8 fixing bug 10471 - The Netscape 6 item under WinXPs Start menu needs to be Netscape 6.2. sr=mscott r=syd
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105466 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 05:10:48 +00:00
mscott%netscape.com
b81b213d04 Checking in 98797 for bill law. Don't disable the keep me open checkbox when the download is complete.
sr=blake/mscott


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105463 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 04:34:33 +00:00
srilatha%netscape.com
1ccf8da466 Fix for Front Page crash and WordPad message after MAPI send.
Bug # 102645, r=ducarroz, sr=mscott.
Checking in for rdayal@netscape.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105454 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 02:08:17 +00:00
jelwell%netscape.com
2bb5dd3a5d Fix for Bugzilla bug 104953, r=jj, sr=sfraser PDT+
This ensures that the skin select statement is always last, which is necessary when generating the user-chrome.rdf file.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105449 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 00:59:13 +00:00
darin%netscape.com
eef1953101 fixes bug 103979 "Crash if autoconfig proxies prefs enabled by the default"
r=gagan,dougt sr=rpotts a=PDT


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105439 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-15 23:01:37 +00:00
ben%netscape.com
ba2c55238e bug 87864 - bookmarks file grows huge (due to duplicate bookmarks?)
- patch prevents the creation of duplicate bookmarks during edit operations.
r=jag, sr=waterson, a=pdt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105406 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-15 08:35:10 +00:00
blakeross%telocity.com
1d1da6ebd3 Err, fix merge conflicts from tree switch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105401 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-15 05:26:36 +00:00
blakeross%telocity.com
994df90bb5 View source for pages with post data needs to be disable (91341). Same patch from 092 branch. r=hixie sr=ben PDT+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105400 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-15 05:13:16 +00:00
ssu%netscape.com
f6942a3d2a fixing bug 104275 - Cannot send message from Excel/PPoint97 using SimpleMAPI. r=curt, sr=dveditz. not part of tinderbox builds. affects windows platforms only
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105347 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-13 01:45:08 +00:00
darin%netscape.com
5425558f28 fixes bug 104181 "SH should not store layout state if server sends Cache-control: no-cache"
r=radha, sr=rpotts, a=jaimejr


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105332 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-13 01:03:02 +00:00
(no author)
7002800e9b This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105308 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-12 23:48:35 +00:00
beard%netscape.com
30e74cffda Fix for bug #103431, r=peterl, sr=sfraser, a=pdt.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105299 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-12 22:00:28 +00:00
curt%scruznet.com
6a51761487 Only set MAPI and MAPIX in win.ini.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105271 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-12 19:50:36 +00:00
mscott%netscape.com
1c761ae69d Bug #7630 --> Landing this patch for bnesse onto the branch. Prevent a crash on urls that end with a CR
r=peterl
sr=darin,dougt
a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105268 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-12 18:07:30 +00:00
eddyk%netscape.com
612ff0c74e bug 104253: fields are editable when they shouldn't be, in AccountManager
r=mscott, sr=sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105219 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-11 23:05:55 +00:00
joe.chou%eng.sun.com
13cf71081e Replacing a C++ comment in a C file (../include/npapi.h) with a C comment, so that Unix (Solaris, OS2, HP, etc.) will compile.
r=peterl, sr=attinasi, blizzard.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105201 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-11 21:10:41 +00:00
srilatha%netscape.com
d12292d5ea Fix for bug# 103908. Checking the mapidll, changed to getSytemDirectory
and also fixed getShowDialog()
r=ssu, sr=dveditz, a=pdt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105152 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-11 10:43:32 +00:00
srilatha%netscape.com
f01eff3605 Fix for bug # 103897. Fixed the js error in onOK and also added code to ensure the
pref holds value when switched between panes
r=bhuvan, sr=sspitzer, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105149 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-11 06:40:25 +00:00
srilatha%netscape.com
2293f7a84d Fix for bug # 103313, r=ducarroz, nhotta and sr=mscott.
Fix of problem for sending files with nonAscii filename and nonAscii subject
checking in for rdayal@netscape.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105148 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-11 06:10:03 +00:00
jj%netscape.com
42bd8c4dd3 bug 101608: keeping traceback option on for Carbon build. r=sdagley, sr=sfraser
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105147 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-11 06:02:07 +00:00
mscott%netscape.com
c2a53f73fa Backing out Bug #96748 which ended up making things worse for new account set up.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105139 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-11 04:28:23 +00:00
srilatha%netscape.com
806a8b39c2 Fix for Bug #102392. Refined COM code to detect whether mozilla is running
or not.  This is required to support multiple sends from the Application.
r=dougt, sr=mscott a=PDT


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105102 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 21:49:43 +00:00
darin%netscape.com
f6fd3e8875 fixes bug 52510 "HTTP handler should register as a listener for user agent
prefs changes." r=bnesse, sr=rpotts, a=PDT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105063 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 20:21:20 +00:00
pinkerton%netscape.com
d875eec3a4 unregister event handler when menu goes away. that way, if the menu is still in a visible menubar, we don't crash trying to build content off a dead listener. r=sdagley/sr=sfraser/a=jaime. bug#103935
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105033 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 14:20:18 +00:00
loadrunner%betak.net
3e416c0513 bug 88155, Trunk & M094 crash [@ MSVCRT.DLL - ns4xPluginStreamListener::OnDataAvailable, nsPluginStreamListenerPeer::OnDataAvailable] - seg faults loading http://www.planetjulie.com/, r=av,peterl, sr=waterson, removing unused nsHTMLUtils.* files resulting from repository copy, pdt+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105024 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 07:20:23 +00:00
srilatha%netscape.com
12e9b7a298 Fix for bug # 95724. Added the registry keys for defailtIcon and shell\open\command.
Also changed the display name in the xp start menu
r=ssu, sr=dveditz, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105015 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 05:42:50 +00:00
srilatha%netscape.com
005aa45847 Fix for bug # 103232. Changed the name for getting the version info for the mapi dll.
Also deleting the Mapi_backup_dll registry key instead of setting it to ""
r=ssu, sr=dveditz, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105014 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 05:29:58 +00:00
loadrunner%betak.net
4eb1dbd5a7 bug 88155, Trunk & M094 crash [@ MSVCRT.DLL - ns4xPluginStreamListener::OnDataAvailable, nsPluginStreamListenerPeer::OnDataAvailable] - seg faults loading http://www.planetjulie.com/, r=av,peterl, sr=waterson, a=brendan, pdt+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@105001 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 04:01:09 +00:00
sdagley%netscape.com
3cf0e74740 Fix #103612 - work around bug in Mac OS X 10.1 Internet prefs panel when setting DL folder. Merging fix from trunk. r=pinkerton,sr-sfraser,a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104998 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 03:18:20 +00:00
mscott%netscape.com
4c3f215e2b Bug #102821 --> back out part of my fix from yesterday which attempted to keep mozilla.exe running
until the last mapi session had logged off. We found some holes were the mozilla process wasn't getting
terminated. Now we'll start up and terminate mozilla for each mapi transaction (unless it's already running
of course).

no r or sr since this is just a back out of part of yesterday's checkin.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104980 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 00:51:19 +00:00
loadrunner%betak.net
e9ef0ffacc bug 88155, Trunk & M094 crash [@ MSVCRT.DLL - ns4xPluginStreamListener::OnDataAvailable, nsPluginStreamListenerPeer::OnDataAvailable] - seg faults loading http://www.planetjulie.com/, r=av, peterl, sr=waterson, a=brendan, pdt+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104979 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 00:51:00 +00:00
ssu%netscape.com
beed77f1c0 fixing bug 103232 - Changes the function pointer reference name (that the installer looks for in Mapi32.dll) from MAPIGetVersion() to GetMapiDllVersion(); also fixes mail.xpi to update mapi32.dll when appropriate. r=curt, sr=dveditz. affects windows platforms only
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104977 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 00:47:40 +00:00
mscott%netscape.com
174c0b1558 Bug #96784 --> avoid infinite recursion in the bin hex decoder when the data fork gives us back
macbinhex content as the content type.
sr=darin/sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104976 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 00:37:29 +00:00
jaggernaut%netscape.com
a071e8dc70 Bug 103853: back out bogus sizeToContent in commonDialog.js, r=alecf, sr=hyatt, a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104974 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 00:25:37 +00:00
ssu%netscape.com
4882e081f0 fixing bug 103939 - add new key, [JRE LIB PATH], to native win32 installer. r=curt, sr=dveditz. affects windows platforms only.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104973 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 00:24:20 +00:00
loadrunner%betak.net
81e2538482 bug 88155, Trunk & M094 crash [@ MSVCRT.DLL - ns4xPluginStreamListener::OnDataAvailable, nsPluginStreamListenerPeer::OnDataAvailable] - seg faults loading http://www.planetjulie.com/, r=av, peterl, sr=waterson, a=brendan, pdt+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104971 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 00:12:41 +00:00
nhotta%netscape.com
efe018a9e6 Remove nsHTMLUtils.cpp from the project, bug 88155. r=av, peterl, sr=waterson, a=brendan, pdt+.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104970 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 00:11:45 +00:00
nhotta%netscape.com
34083e6795 Add nsHTMLUtils.cpp to the project, bug 88155. r=av, peterl, sr=waterson, a=brendan, pdt+.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104969 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 00:11:25 +00:00
rods%netscape.com
a031df1fb7 Remove borders/padding when getting the size of the dropdown after it has already been reflowed
Bug 101936 r=kmcclusk sr=attinasi a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104959 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 23:25:28 +00:00
heikki%netscape.com
3b6c8aa9e5 Bug 103250, attempting to fix topcrasher with a null check. Crash happens when you select text while page loading. r=harishd, sr=vidur.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104941 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 21:04:16 +00:00
mscott%netscape.com
f1bf83ec8f Forget this as part of Bug #102215 --> message display messed up by xul syntax changes
r=sspitzer
sr=hewitt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104938 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 21:01:34 +00:00
sspitzer%netscape.com
57de60b35e fix for #102918. don't show the "make Mozilla / Netscape your default
mail application" dialog until after the mailnews window shows up,
or for new profiles, until after the account wizard dismisses.
also, make the dialog modal to the mailnews window.
r=srilatha, sr=bienvenu, a=PDT


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104931 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 20:10:57 +00:00
pinkerton%netscape.com
bc1f68f1e9 respect the look&feel pref about showing comboboxes outside the client area. r=rods/sr=sfraser/a=asa. bug# 102834.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104912 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 14:17:38 +00:00
pinkerton%netscape.com
99194edfe0 prevent windows from extending behind dock when maximizing. r=danm/sr=sfraser/a=jaime. bug# 79974.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104911 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 14:15:33 +00:00
pinkerton%netscape.com
efa8d7d7c8 make long menu items crop. r=sdagley/sr=sfraser/a=jaime. bug# 98455
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104910 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 14:13:04 +00:00
rods%netscape.com
2a4287eccf Don't do BeginDocument when printing to file for regression tests
BUg 99633 r=karnaze a=attinasi a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104908 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 12:30:07 +00:00
sfraser%netscape.com
467a13f630 Fix bug 103031 -- don't put the top-left of the structure region into event.where before passing it off to raptor, because this might actually be outside of that window (like on X when windows have rounded corners). Instead, offset event.where by the amount that the window was moved. r=sdagley, sr=hyatt.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104902 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 06:02:08 +00:00
mscott%netscape.com
2c2aa68e1d Bug #102821 --> MAPI HACK FOR THE BRANCH only. This change is not intended for the trunk.
when processing -MAPIStartup, turn the show ui flag off to put us in a semi server mode. then in the mapi
code we'll manually make sure the app doesn't exit after the last window goes away until
all the mapi sessions have logged off.

r=bienvenu
sr=sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104896 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 03:30:29 +00:00
mscott%netscape.com
f43cb3161d Landing Bug #103172 onto the branch for Rajiv. This patch removes the simple mapi auth dialog so we no longer
bring it up. You can choose your user identity from the subsequent compose window that comes up.
r=sspitzer
sr=mscott


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104891 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 02:55:53 +00:00
peterlubczynski%netscape.com
d1c54329ca Fix for bug 86591
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104890 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 02:55:45 +00:00
sfraser%netscape.com
9693956170 Fix for 100353 -- handle polling for read and write on different threads, and properly deal with sending to a socket that has flow control restrictions. Fixes a problem saving to IMAP server sent messages with attachments. r=gordon, wtc.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104889 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 02:16:47 +00:00
loadrunner%betak.net
2bc62b1415 bug 88155 - backing out premature checkin
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104888 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 01:59:55 +00:00
curt%scruznet.com
317249c56a Simple MAPI settings in win.ini.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104886 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 01:14:06 +00:00
pchen%netscape.com
4326de52b8 bugscape 9942, r=jag, sr=sfraser, include navExtraOverlay.xul in
hiddenWindow.xul to turn off qa and debug menus


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104879 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 00:33:01 +00:00
eddyk%netscape.com
4910524cab bug 103181: Disable code in AccountManager regression
r=bhuvan, sr=sspitzer, PDT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104877 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 00:24:02 +00:00
attinasi%netscape.com
f5420bca31 Support for invert color for outlines: improved handling of solid outlines, and made dotted and dashed outlines work. b=73884 r=kmcclusk sr=kin a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104876 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 00:18:01 +00:00
attinasi%netscape.com
b69cd49c6b active links are not given outline color 'invert' b=73884 r=kmcclusk sr=kin a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104874 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 00:16:43 +00:00
loadrunner%betak.net
40ae15b240 bug 88155, Trunk & M094 crash [@ MSVCRT.DLL - ns4xPluginStreamListener::OnDataAvailable, nsPluginStreamListenerPeer::OnDataAvailable] - seg faults loading http://www.planetjulie.com/, r=av, peterl, sr=waterson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104866 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-08 23:42:40 +00:00
srilatha%netscape.com
d1a33f3259 Fix for bug #103260. RegisteringOkCallbackFunc in Startup()
sr=sspitzer, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104863 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-08 23:20:56 +00:00
leif%netscape.com
b8b04b2777 Bug 102227: LDAP Autocomplete crash, r=dmose,sr=bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104861 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-08 23:08:00 +00:00
srilatha%netscape.com
ac03659bd8 Fix for bug # 102798. Displays security warning during blind send.
Checking in for dougt, r=sspitzer, sr=mscott, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104817 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-08 20:13:23 +00:00
kin%netscape.com
a0cc6531cb Make original patch for bug 99920 (hitting enter in any text field submits form without submit button passed as param)
work in OPT builds, by moving QI() call out of NS_ASSERTION macro.

r=rods@netscape.com  sr=waterson@netscape.com  a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104794 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-08 14:07:07 +00:00
dmose%netscape.com
60e2321259 Fix LDAP autocomplete regression on CJK strings by adding separate cjkMinStringLength that is defaulted differently from minStringLength (bug 101086). r=shanjian@netscape.com, sr=blizzard@mozilla.org, a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104754 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-07 02:19:56 +00:00
(no author)
0b83c005e9 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104723 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-06 05:08:43 +00:00
ssu%netscape.com
34349da08b fixing bug 103232 - Simple MAPI: Uninstaller needs to restore previous mapi32.dll if replaced. r=curt, sr=dveditz. not part of tinderbox builds. affects only windows.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104698 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-06 00:11:45 +00:00
ssu%netscape.com
598eacc4f9 fixing bug 103242 - component-specific timing dependency sections don't get run. r=curt, sr=dveditz. affects windows platforms only
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104696 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-06 00:02:53 +00:00
karnaze%netscape.com
0128156574 new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104694 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 23:21:45 +00:00
(no author)
a713920b70 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104691 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 23:16:07 +00:00
kmcclusk%netscape.com
0cdc966245 Added passing of error when allocating offscreen fails on GTK. bug 70424 r=pavlov sr=attinasi a=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104671 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 19:20:47 +00:00
pinkerton%netscape.com
d326bffa32 r=sdagley, sr=sfraser, a=asa bug#102204
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104662 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 14:23:43 +00:00
jaggernaut%netscape.com
b6ed21bc4a Bug 92635: password dialog for mailnews doesn't always come up at the correct size and is then also missing the label on the checkbox. Checking in a work-around for 0.9.4. r=sspitzer, sr=mscott, a=PDT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104655 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 12:05:52 +00:00
srilatha%netscape.com
19039d5a68 Fix for bugs 95117, 95113, 95116, 95122, 102308 and 102798, 102570.
r,sr = bienvenu, ducarroz, rdayal, sspitzer, mscott, dveditz, ssu, dougt.
This is the implemetatin of Simple MAPI


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104645 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 05:32:50 +00:00
rpotts%netscape.com
d0901fa2c8 bug #102450. (r=pavlov@netscape.com, sr=vidur@netscape.com, a=pdt). Some pages never stop loading because an OnStopRequest is being dropped by the imgRequest...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104644 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 05:29:41 +00:00
attinasi%netscape.com
4e07680f92 Sanity checking params to avoid topcrash. b=100298 sr=kin r=kmcclusk a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104643 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 05:28:29 +00:00
srilatha%netscape.com
bca8035316 Fix for bugs 95117, 95113, 95116, 95122, 102308 and 102798, 102570.
r,sr = bienvenu, ducarroz, rdayal, sspitzer, mscott, dveditz, ssu, dougt.
This is the implemetatin of Simple MAPI.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104642 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 05:27:04 +00:00
ssu%netscape.com
89847524eb part of a fix for bug 95122 - Preference for Simple MAPI. r=curt, sr=dveditz. not part of tinderbox builds. affects windows only
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104641 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 05:24:51 +00:00
rpotts%netscape.com
ff21072f1f bug #102774 (r=jst@netscape.com, sr=vidur@netscape.com, a=pdt). from js location.reload(aBypassCache) ignores the bypass cache argument...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104640 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 05:09:33 +00:00
peterlubczynski%netscape.com
6057fc9598 Fix for topcrash on UNIX where the ProxyJNI is broken with the JRE after a plugins.refresh(). bug 86591 r=av sr=blizard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104639 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 04:56:24 +00:00
sspitzer%netscape.com
0b0cebe215 fix for #96314. get save as template and save as file to work
for imap messages, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104632 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 02:38:35 +00:00
shanjian%netscape.com
b6658b6338 #8864 Debug messages in terminal window on Linux Japanese build.
r=bstell sr=waterson a=Jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104617 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 01:06:56 +00:00
waterson%netscape.com
2dbe8975f0 Bug 96748. Be sure to check for |open| on new rows. r=varga@utcru.sk, sr=hyatt, a=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104612 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 00:52:59 +00:00
ssu%netscape.com
293f9035f1 fixing bug 9943 - 2 icons showing up on desktop after installing 6.2 - r=dveditz, sr=syd
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104598 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 21:49:02 +00:00
syd%netscape.com
910ceb167b Checkin for 78442. Fix from jband, sr=dveditz, r=syd, a=PDT This is a
quick and dirty fix which has nsXPITriggerInfo holding a reference to
the object referenced by nsXPITriggerInfo::mGlobalWrapper and to also
hold a JS root on XPITriggerEvent::cbval. The "right" way to fix this
is outlined in the bug.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104583 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 12:00:49 +00:00
mstoltz%netscape.com
1df70339e2 Bug 18553 (regression) clear all event handlers before loading a document,
except when called from document.open. r=heikki, sr=jst, a=clayton, jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104576 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 05:37:16 +00:00
racham%netscape.com
c625f052ea Fixing bug 97650 on branch. This Fix facilitates the display of unread mail count of default mail account(s) on Windows XP welcome screen. r=mscott, sr=sspitzer, a=pdt. All checkins related to fix for bug 97650 are approved by pdt. I forgot to mention a= part in the last check in update.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104575 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 04:58:35 +00:00
racham%netscape.com
eef63da323 Fixing bug 97650. Checking in the IDL mcp file to build OS integration idl file. r=mscott, sr=sspitzer, a=pdt.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104574 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 04:56:43 +00:00
racham%netscape.com
3dfa1a19b0 Fixing bug 97650 on branch. This Fix facilitates the display of unread mail count of default mail account(s) on Windows XP welcome screen. r=mscott, sr=sspitzer
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104573 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 04:55:23 +00:00
suresh%netscape.com
ff9b7031d6 102545 r/sr=sspitzer. Set enabled to true only for new filters.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104572 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 02:39:02 +00:00
mscott%netscape.com
1c612c7742 Landing Bug # 101828 on the branch. Sending more than one piece of unsent mail fails when posting to the sent folder.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104567 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 01:25:34 +00:00
mscott%netscape.com
2d7c433ea6 Landing 101128 onto the branch (ftp sending spurious on stop requests before on start
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104566 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 01:18:57 +00:00
bienvenu%netscape.com
48a0d56aa9 fix paint leak of 1 byte per mime2 string from trunk 102466
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104564 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 01:07:26 +00:00
rods%netscape.com
91f350925b Check for failure after printing the next page. If it fails then pass back PR_TRUE
to indicate we are done printing this document.
Bug 101597 r=kmcclusk sr=attinasi a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104560 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 23:53:52 +00:00
sgehani%netscape.com
ac703f65e5 Remove debug prefs panel (on mozilla0.9.4 netscape-owned branch only).
b = 9968
r = pchen
sr = dveditz


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104559 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 23:52:37 +00:00
sspitzer%netscape.com
eee6d39a84 hack fixes for #100952 and #98418. don't show multiple inboxes in the folder pane
after imap migration and don't show accounts multiple times under "Get Msg" button.

these hacks aren't going in on the trunk.

r/sr=mscott,waterson,a=PDT.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104556 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 22:56:24 +00:00
peterv%netscape.com
b4a101d672 Fix for bug 97687 ([serializer]cs/gecko: copying using keyboard shortcuts>paste>source pasted {Country=US}). r=heikki, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104534 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 13:38:17 +00:00
heikki%netscape.com
7e84c99e83 Bugscape bug 9924, fix perceived hang by improving comment parsing performance in strict mode. Patch from harishd, r=heikki, sr=vidur.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104531 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 07:13:14 +00:00
mscott%netscape.com
97be76f8b4 Landing 97497 on the branch (add bullet proofing)
r=naving
sr=bienvenu


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104497 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 00:52:14 +00:00
curt%scruznet.com
1776a171d4 Removing obsolete files. Fixes bug #94108
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104457 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 23:04:05 +00:00
yokoyama%netscape.com
81093cb228 Bug 88425:
Force end IME Composition upon receiving OnChar
/r=yokoyama;/sr=shaver,/pdt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104450 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 22:23:35 +00:00
varada%netscape.com
6e19a74a09 fix for bug#9440;show smtp server for new isp accounts;r=racham;sr=mscott
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104435 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 21:52:48 +00:00
hewitt%netscape.com
a60d8b4824 98415 - color picker crashes on mac, r=hewitt, sr=mscott, patch by btiffany@usermail.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104395 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 03:17:55 +00:00
sdagley%netscape.com
4ed58c0051 Finish fix of bug 97676 - Also use LaunchServices APIs to map creator code to app under OS X. Fixes automatic launch of helper app and restores ability to override helper app from download dialog. sr=sfraser,a=PDT (inferred a= since the bug has PDT+ and the previous checkin wasn't a complete fix)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104386 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 01:49:46 +00:00
bryner%netscape.com
ab5c9047fc Bug 59211 (topembed) - mouse wheel does nothing when cursor over plugin. Patch from markh@activestate.com, r=bryner, sr=hyatt.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104343 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 20:43:38 +00:00
waterson%netscape.com
f52bdbc3be Bug 96228. Make nsContainerFrame::PositionFrameView position _only_ the frame's view (don't recur). Explicitly call nsContainerFrame::PositionChildViews as appropriate when moving a frame post-Reflow. Consolidate view positioning logic duplicated between PositionFrameView and SyncFrameViewAfterReflow, which now correctly computes offset for anonymous view in nsScrollFrame and accounts for scrolled views. r=kmcclusk,karnaze sr=attinasi a=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104340 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 20:27:06 +00:00
yokoyama%netscape.com
23d14cad16 Bug 97404
To prevent freezing from copying URL.  Temporary fix until
we find actual cause of invalid string offset
/r=ftang, /sr=mscott, /PDT=jpm


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104339 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 20:24:31 +00:00
yokoyama%netscape.com
37c190c22e Bug 102041
Don't use the return error code from mAlias->Equals()
/r=ftang/harishd; /sr=shaver; /ptd=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104338 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 20:19:13 +00:00
darin%netscape.com
55f314e175 fixes bug 87817 "violation of HTTP 1.* standard when sending POST requests"
r=bbaetz, sr=mscott, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104331 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 19:12:28 +00:00
rods%netscape.com
77e79f5968 Backing out fix for Bugs 85286 & 72906
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104323 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 18:25:48 +00:00
rods%netscape.com
1b7215b193 additional fix for Bug 99920
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104321 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 18:11:24 +00:00
karnaze%netscape.com
6db623ad82 new regression tests not affecting the build.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104318 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 16:22:48 +00:00
sdagley%netscape.com
745e0f8a58 Bug 97676 - Use LaunchServices APIs under OS X for helper app launching and fix Reveal to work with OS X Finder. r=ccarlen,sr=sfraser,a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104308 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 07:40:16 +00:00
sdagley%netscape.com
310f048191 New project for OS X specific interfaces. Part of fix for 97676. r=ccarlen,sr=sfraser,a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104307 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 07:01:42 +00:00
(no author)
61fcda7fc3 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104305 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 06:31:38 +00:00
jaggernaut%netscape.com
7aa36a6aca Bug 96843: 'Find in this page' textfield doesn't get focus by default. Patch by James Kelley <oneiros@darkspire.net>, r=kin, sr=alecf, a=PDT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104277 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 01:17:59 +00:00
mscott%netscape.com
712dd7ecfc Landing Bug #101498 on the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104270 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-30 21:39:23 +00:00
bryner%netscape.com
aaedc05e69 bug 97970 - nsExternalHelperAppService::AddMimeInfoToCache passing null to nsCStringKey ctor. patch from bzbarsky@mit.edu, r=timeless, sr=mscott. (PDT+)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104235 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 23:39:43 +00:00
ccarlen%netscape.com
0cbafcd8b0 Bug 92750 - Quitting Fizzilla with Cmd-Q doesn't ask to save changes. r=pink,brade/sr=sfraser
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104194 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 04:20:04 +00:00
ccarlen%netscape.com
d221f9042c Adding new files for bug 92750 - Quitting Fizzilla with Cmd-Q doesn't ask to save changes. r=pink,brade/sr=sfraser
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104193 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 04:07:56 +00:00
mscott%netscape.com
d3f2cfed94 Landing 102215 on the branch.
r=sspitzer
sr=hewitt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104192 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 03:56:24 +00:00
vidur%netscape.com
a4edbcb828 Fixes for printing bugs 84017 and 89151. The fix for bug 84017 removes the need for a resize reflow to get form frame values to print. The restoration of these values into the new frame model is done as part of the initial reflow. The fix for bug 89151 gets rid of the extra frame model built and forces printed images to come out of the decoded image cache. r=darinf, heikki, sr=rpotts
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104189 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 03:07:45 +00:00
karnaze%netscape.com
faee19ca68 bug 94341 - keep a separate pseudo frame list for a new pseudo block or inline frame. sr=attinasi, r=alexsavulov
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104187 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 02:25:18 +00:00
ssu%netscape.com
2964c08516 fixing bug 97650 - these patches updates the uninstaller to deal with undoing whatever mail integration we do to a WinXP system. r=curt, sr=dveditz. affects only windows platforms.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104185 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 02:17:38 +00:00
mscott%netscape.com
0088fee340 Bug #100669 --> landing some compose changes required by simple mapi for the simple mapi team.Bettter errror handling when cleaning
up the temp file.
r=ducarroz
sr=mscott

a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104183 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 02:05:22 +00:00
ssu%netscape.com
b76d92a07f fixing bugscape 9841 - Back button broken in eclient tool setup program. r=curt, sr=dveditz. affects only windows platforms
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104178 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 00:33:07 +00:00
waterson%netscape.com
1e590dafd5 Bug 97859. Always synchronize parent row, regardless of whether folder is opened or closed. r=varga%utcru.sk, sr=hyatt, a=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104174 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 00:15:07 +00:00
yokoyama%netscape.com
73005c9879 bug 88425:
Force to end IMEComposition when user switches keyboard layout.
/r=ftang; /sr=shaver; PDT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104168 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 00:05:38 +00:00
sgehani%netscape.com
edcfb9968f Make opening search sidebar tab on by default again.
r = pchen
sr = dveditz
b = 9643 (bugscape)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104164 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 23:56:24 +00:00
serge%netscape.com
348410001b fix for 97362; Plugins error "invalid ELF header"; r=av, sr=waterson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104146 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 22:42:09 +00:00
alexsavulov%netscape.com
16245543f1 fix for bug 99948 - added rounding to pixel in CalculateSizeStandard
sr= attinasi r= kmcclusk, [PDT+] available


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104134 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 21:45:36 +00:00
attinasi%netscape.com
8fd5d9b8d9 Fix for image wrapping in table cell problems. b=101674 sr=hyatt r=waterson a=Jaime/pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104132 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 21:37:45 +00:00
mscott%netscape.com
d07cea90df Landing 99391 on the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104130 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 21:36:26 +00:00
peterlubczynski%netscape.com
f2d19fd047 Ignore leading and trailing whitespace for src and data attributes bug 96362 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104125 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 20:15:27 +00:00
law%netscape.com
05c0c931e3 Bug 57443; Use PL_strncpyz to avoid buffer overrun when default file name is really long; r=sgehani, sr=mscott, a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104116 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 18:54:06 +00:00
sicking%bigfoot.com
60177508d7 Fix crasher and leak in parameters code
b=101946 r=peterv sr=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104101 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 09:08:29 +00:00
curt%scruznet.com
8f05990056 Adding ren8dot3.exe back into the installation for the time being.
Fixes bug #48306


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104088 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 05:44:58 +00:00
rpotts%netscape.com
7106093ea1 bug #102070 (r=valeski@netscape.com, sr=vidur@netscape.com, a=pdt). The LOAD_FLAGS_BYPASS_CACHE | LOAD_FLAGS_BYPASS_HISTORY combination is not handled correctly by the docshell...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104085 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 04:23:21 +00:00
peterlubczynski%netscape.com
673ac81689 Fix for crash when object frame goes away but stream is still going bug 99569 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104082 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 04:13:09 +00:00
serge%netscape.com
fb04fb600a fix bug 85701; problems using plugins [@ gtk_xtbin_init] topcrash; r=pavlov;sr=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104063 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 01:51:06 +00:00
syd%netscape.com
dddc8c8df5 Fix for 97249. Crash was being caused (regardless of what stack is
showing) by not carefully iterating the component list and
processing CRCs only on those XPI files that were downloaded.
r=jag, sr=dveditz.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104051 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 01:13:45 +00:00
rods%netscape.com
071dcfab31 Make so hitting return in text field submits form when there is a single text field and no submit
or there is a submit and the submit btn is to be included in the post data
Bug 99920 r=attinasi sr=kin a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104035 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 00:39:44 +00:00
rods%netscape.com
fd55366c47 Use the nsIWebProgressListener to make sure two submits do not happen
the listener is used to know when the submit got thru so it can unreg itself
Bug 85286 r=rpotts sr=kin a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104033 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 00:33:23 +00:00
mitesh%netscape.com
c23f0ea75f Fix for Bug 95524 - LDAP DLLs must be packaged with browser.xpi instead mail.xpi - as a result of the fix to bug 75955 r=smfr and sr=waterson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104032 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 00:31:06 +00:00
kmcclusk%netscape.com
291eda8da0 Force the backbuffer to be reallocated when the display depth is changed. bug 6061 r=karnaze sr=attinasi a=jaimejr@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104030 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 00:23:03 +00:00
oeschger%netscape.com
f60a4a1891 updating some of the images in the help content per minor UI changes, author=jatin, r=oeschger, b=85925, content only
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104029 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 00:19:46 +00:00
pchen%netscape.com
222ef59af5 bugscape 8771, r=samir, sr=hyatt, use insertafter="editorTask" instead
of position for address book tasks menu item, also use insertafter instead
of position for address book icon in component bar


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104026 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 00:15:35 +00:00
pchen%netscape.com
3793dbba82 bugscape 8771, r=samir, sr=hyatt, set id for editor tasks menu item
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104025 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 00:13:48 +00:00
joki%netscape.com
8d3f011b8d Fix for 71705, disabling right and middle 'click' events to web content for better compatibility with old-style 'onclick' handlers. r:saari,sr:hyatt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104024 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 00:12:02 +00:00
kmcclusk%netscape.com
945d2797fa check null pointer scrolledView before accessing it. bug 98270 patch from duraid@fl.net.au. r=karnaze sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104022 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 23:57:30 +00:00
robinf%netscape.com
4122965e21 updates to existing images per bug8771; r=oeschger, a=adot, PDT+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104019 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 23:44:27 +00:00
kin%netscape.com
7ddce62bb2 Fix for bug 89236: printing is producing crash
Modified nsBlockFrame::DrainOverflowLines() so that it
reparents any floater out-of-flow frames and their
views.

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


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104013 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 23:16:32 +00:00
sfraser%netscape.com
5b8e1decdd Fix for 89734 -- fix window drawing/update problems on Mac OS X. Convert the saved update region to local coords. r=pink, sr=scc, a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104012 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 23:16:24 +00:00
sfraser%netscape.com
398e15602b Fix for bug 86694 -- optimize image tiling on the Mac. r=pavlov, sr=scc, a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104011 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 23:12:03 +00:00
sfraser%netscape.com
5a7f9ef37a Fix for 100700 and 58104-- some windows come up blank on carbon, and ATM causes blank windows. Properly save and restore GDevices. r=pierre, sr=scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104010 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 23:08:06 +00:00
ccarlen%netscape.com
48c8e05cbb Bug 101364 - Disable profile switching in turbo. r=dp/sr=alecf/PDT+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104009 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 22:57:40 +00:00
beard%netscape.com
83bb6eb88a Fix for bug #92322, changes for Carbon/Mac OS X, r=peterl, sr=sfraser, a=jaimejr.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104008 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 22:56:00 +00:00
sfraser%netscape.com
84017680e7 Fixes for 71718 and 97866. Make Mac NSPR work on dual CPU Mac OS X machines, and fix the async IO code for Mac OS X. See bugs for reviewers. a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104007 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 22:50:40 +00:00
saari%netscape.com
307d8d5398 fix for bug 78857, an assertion that was caused by the event pool code. r=heikki, sr=jst
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@104005 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 22:43:53 +00:00
pinkerton%netscape.com
f654b64e8f correctly remove toplevel menus when hidden/collapsed attribute set. also fix assertions so they don't always show and add assertion when trying to show/hide a menu that is already in that state. r=sdagley/sr=sfraser. bug# 101795
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103994 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 21:49:14 +00:00
hyatt%netscape.com
1db35f9de8 Fix for 101510. r/sr=dbaron,waterson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103985 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 21:37:44 +00:00
ssu%netscape.com
a2e139c514 fixing bug 97813 - Need to Properly integrate Navigator in the Windows XP Start Menu. These patches affect the installation part of the bug. r=law sr=dveditz. not part of tinderbox builds. affects only windows platforms
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103984 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 21:36:27 +00:00
darin%netscape.com
02b9280cdc fixes bug 101832 "back/forward buttons should use LOAD_NORMAL + VALIDATE_NEVER"
r=gagan, sr=rpotts, a=PDT


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103977 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 21:28:34 +00:00
waterson%netscape.com
66a8942ed5 Bug 73235. Don't add scrollbar's width to MES. r=attinasi, sr=hyatt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103973 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 20:53:21 +00:00
law%netscape.com
785351ad99 Fix for bug 97813; adds support for hooking into WindowsXP Start Menu as
the default internet application; includes a couple of minor tweaks to existing
code to support special handling of those registry keys; the change to
nsWindowsHooks.cpp is to suppress the "default browser" dialog when the user
doesn't have sufficient registry access to change the default browser.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103972 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 20:38:11 +00:00
rods%netscape.com
ada1e758a7 Part of previous checkin for Bug 99415, forgot to set this back to &PT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103971 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 20:36:44 +00:00
karnaze%netscape.com
0bb1da4514 new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103952 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 16:30:53 +00:00
(no author)
746c14890a This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103951 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 16:22:07 +00:00
jfrancis%netscape.com
5f0044d4b4 Fix for 100753: can't outdent empty list item. r=rade; sr=kin; pdt+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103937 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 12:10:24 +00:00
syd%netscape.com
87d1ee2413 Checking in fix for 84896. PDT+, has reviews.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103931 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 08:11:11 +00:00
hewitt%netscape.com
eff3b014c2 91173 - page info window does not wrap, r=blake, sr=hewitt, patch by jrgm
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103914 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 02:20:20 +00:00
darin%netscape.com
0ea88c1ad9 fixes bug 99233 "FTP site doesn't load: ftp.asus.com" patch=bbaetz, r=dougt,
sr=darin, a=PDT


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103912 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 01:48:06 +00:00
serge%netscape.com
e2f208e326 fix bug 74938; acrobat fails on plugin registration on Linux; r=av; sr=waterson;a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103910 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 01:34:04 +00:00
ftang%netscape.com
dd1aa5f0ea fix bug 101434. ignore "UTF-16"xx and "UTF-32"xx in mime while it is impossible to get that value
while it is really UTF-16 and UTF-32.
r=bienvenu@netscape.com
sr=mscott


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103881 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 23:31:11 +00:00
pchen%netscape.com
13636923cd bugscape 9783 (again), r=ssu, sr=hyatt, need to increase height of top text pane in quick launch installer panel to accomodate longer text string
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103879 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 23:27:18 +00:00
darin%netscape.com
b92cb4590b fixes bug 98262 "avoid sending blank Accept-Charset header" a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103878 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 23:26:47 +00:00
eddyk%netscape.com
2695b5b3be bug 96153: disable locked prefs for addressing panel in AccountManager
r=srilatha, sr=alecf,blake


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103875 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 23:03:10 +00:00
eddyk%netscape.com
ef87a82842 bug 96152: disable locked prefs for drafts and templates in AccountManager
r=bhuvan, sr=alecf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103874 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 23:01:45 +00:00
pinkerton%netscape.com
821cd9a7fc don't associate .jar and .dat files with mozilla. r=sdagley/sr=sfraser. bug# 100065
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103870 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 21:54:50 +00:00
sspitzer%netscape.com
53b8205819 fix for bugscape bug #9178, a=PDT
Migration+Activation causes bad SMTP setup and failure to Send and a crash editing SMTP servers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103869 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 21:48:54 +00:00
sspitzer%netscape.com
04445057b5 fix for #94180, a=PDT
Grippy appears to the left instead of center in addressbook and vertical 3 pane.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103868 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 21:37:14 +00:00
mitesh%netscape.com
debd6bd65f Additional check is as part of fix to bug 82412. OnLDAPInit should return a default value. Windows compiler complains about it.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103850 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 19:40:51 +00:00
sfraser%netscape.com
eb1bfcfde3 Fix for bug 67409 -- don't try counting connections to try to figure out if the browser is busy or not. Just look for pending PLEvents, which seems to give a good enough answer. r=saari, sr=kin, approved.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103849 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 19:37:29 +00:00
sfraser%netscape.com
ff11e9c7ae Fix for bug 99497. Re-order processing of jar.mn files so that we register en-mac locales after those for other platforms, so that non-installed builds (like the Mac OS X build) get Mac overlays. r=tao, sr=alecf.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103843 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 19:24:52 +00:00
mitesh%netscape.com
452517be8d Fix for bug 99515 - AutoConfig event loop was hanging on Linux. r=danm, sr=alecf and a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103842 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 17:19:53 +00:00
karnaze%netscape.com
3a37dfe39b Fix bug "IFrames repositioned by whitespace in HTML" (no number yet) - give cols with no conent 0 width unless they have style width, sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103836 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 13:47:03 +00:00
rods%netscape.com
ce68108260 Enables the configuration of headers and footers, via 6 string in the nsIPrintOptions
3 for the header and 3 for the footer.
The new codes are &T,&U,&D,&P,&PT (see bug for explanation)
Bug 99415 r=kmcclusk, sr=attinasi a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103835 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 13:45:51 +00:00
peterv%netscape.com
403167314c Fix for bug 100732 (content_xsl.xpt missing in packaged bits). r=heikki, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103834 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 12:44:58 +00:00
dmose%netscape.com
e7269ea088 Packager changes to register LDAP XPCOM SDK chrome (bug 79935). r=ssu@netscape.com, sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103828 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 07:20:19 +00:00
dmose%netscape.com
a7ca00446a Take advantage of ::failureItems functionality in teh autocomplete widget to pop up windows with an error message when LDAP autocomplete searches fail (bug 79935). r=ducarroz@netscape.com, sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103827 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 07:18:57 +00:00
dmose%netscape.com
31572ca31b Add ::failureItems result type to autocomplete interface and widget to allow for an error to return an item that can be displayed in the dropdown and fire an event if selected (eg pop up a dialog box); also changes LDAP autocomplete session interfaces and code to take advantage of this (bug 79935) r=hewitt@netscape.com, sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103826 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 07:18:27 +00:00
dmose%netscape.com
6984a86ab3 Update Mac buildsystem to include LDAP XPCOM SDK chrome when "ldap" option is used (bug 79935). r=pavlov@netscape.com, sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103825 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 07:08:52 +00:00
dmose%netscape.com
4b017c8f51 Addition of infrastructure to the LDAP XPCOM SDK to support better error reporting, error messages (bug 79935). r=jaggernaut@netscape.com,leif@netscape.com; sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103824 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 07:05:48 +00:00
dmose%netscape.com
10f2a7b17a Theme changes for LDAP autocomplete error messages in dropdowns (bug 79935). r=jaggernaut@netscape.com, sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103823 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 07:02:45 +00:00
leif%netscape.com
f1e8d63d77 Bug 91248: LDAP referrals hangs browswer. r=dmose, sr=bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103822 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 06:20:53 +00:00
leif%netscape.com
c1de59c520 Bug 82412: Change LDAP XPCOM to use async DNS. r=dmose,mitesh sr=bienvenu,hewitt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103821 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 06:14:09 +00:00
pchen%netscape.com
e8915585fc bugscape 9783, r=ssu, sr=sfraser, add '(Designed for single-profile users)'
to quick launch checkbox text


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103812 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 05:11:06 +00:00
pchen%netscape.com
3cffe12af9 bugzilla 63870, r=danm, sr=ben, remove initialPromptText and simply
promptText


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103811 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 05:04:39 +00:00
pchen%netscape.com
d863f44f5c bugzilla 63870, r=danm, sr=ben, only check for http, https, and .html file
registry settings, load brandShortName and use it in new default browser
dialog string


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103810 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 05:03:17 +00:00
dbaron%fas.harvard.edu
086c238bc1 Allow declarations in style attribute to be surrounded by braces in quirks mode. Rename ParseDeclarations to ParseStyleAttribute since that's what it does. b=99554 r=hixie,glazman sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103809 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 04:47:22 +00:00
peterlubczynski%netscape.com
d909c4e60d Bad signed conversion in plugin streaming code bug 100888 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103805 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 04:02:48 +00:00
peterlubczynski%netscape.com
01e55af3d4 Incorrect GetAttributes/GetParameters for embed/object tag types patch by philanderton@yahoo.com bug 99063 r=peterl sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103804 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 04:00:30 +00:00
peterlubczynski%netscape.com
cfd9316e7c Fix for doing GET rather than POST when NPN_PostURL is called bug 77603 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103803 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 03:59:02 +00:00
peterlubczynski%netscape.com
f54c131e6d Clean up code in part for fix for doing GET rather than POST when NPN_PostURL is called bug 77603 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103802 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 03:58:50 +00:00
attinasi%netscape.com
9d18923188 Fixed problem with images not wrapping in percentage width cells, in Quirks mode. sr=waterson r=kmcclusk a=chofmann b=100568
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103800 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 03:32:36 +00:00
hewitt%netscape.com
0b5a1e5389 90284 - Remove installer checkbox for 'Use this theme' to prevent dynamic skin switch, r=syd, sr=mscott
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103799 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 03:16:50 +00:00
naving%netscape.com
570251f1ed 52460 r=bienvenu sr=mscott. Allow subfolders creation for pop3 inbox folder.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103789 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 01:39:33 +00:00
naving%netscape.com
3caf2a49a4 97530 r=cavin sr=bienvenu.Save filter changes after renaming/deleting folder. Remove code
that save filter changes on shutdown.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103788 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 01:34:24 +00:00
ddrinan%netscape.com
d5a6b35429 Bug 95585 - Upated CA root certs
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103769 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 00:15:16 +00:00
heikki%netscape.com
ad97f177b4 Bug 95489, attempting to fix this topcrash with a null-check. r=harishd, sr=vidur.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103768 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 00:12:37 +00:00
andreww%netscape.com
e6cdf92b6d bugzilla 94794 sr=hewitt, r=hwaara - fixing sidebar grippy alignment in mac classic skin.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103724 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 20:44:08 +00:00
jband%netscape.com
5433034371 fix bug 100222. same fix as from the trunk. Avoid crash by only releasing from wrappedJS dtor if xpconnect has not shutdown. r=dbradley sr=jst a=chofmann.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103722 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 17:53:04 +00:00
rods%netscape.com
5aca2825f0 Removed setting page height to 5 pages when printing a document "AsIs"
Also, added special case code for sizing of "AsIs" documents when they
are positioned 0,0
Bug 100797 r=kmcclusk sr=attinasi


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103714 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 13:58:02 +00:00
srilatha%netscape.com
2ed16b645e Fix fro bug 98566. Adding support fro simple MAPI
r=law, sr=alecf, a=pdt. Checking in fro kkhandrika@netscape.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103691 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 03:28:07 +00:00
srilatha%netscape.com
08b216d231 Fix for bug# 97502. Setting gUpdate to false in onCancel()
r=mitesh, sr=spitzer a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103687 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 02:20:41 +00:00
cmanske%netscape.com
62d970524d Make URLs selected from Image, Link, and Page Colors and Properties dialogs relative to the source page, b=72583, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103685 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 02:08:01 +00:00
bienvenu%netscape.com
586535752b fix 91936 from trunk
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103670 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 00:43:55 +00:00
cmanske%netscape.com
1d3f10ba78 Remove 'Debug' menu from Composer for final release, b=9442, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103664 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 00:18:28 +00:00
naving%netscape.com
336d211083 100978 r=sspitzer sr=bienvenu. fix a filter editor bug that turns AND condition to OR.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103663 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 00:16:28 +00:00
pinkerton%netscape.com
6a8fcb18e0 fix apple menu from submenu fix. r=saari/sr=sfraser/a=chofmann.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103645 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 22:42:23 +00:00
pinkerton%netscape.com
e796f4ea2b use OS routine to sub out the menubar and dock on OSX/Carbon. r=sdagley/sr=sfraser/a=chofmann. bug# 83570.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103636 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 22:14:55 +00:00
bryner%netscape.com
9aaf9609bb Bug 42313 (PDT+) - unable to scroll with mousewheel over objects contained in IFRAMEs. r=saari, sr=hyatt.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103635 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 22:00:14 +00:00
blizzard%redhat.com
7d4e7bc7d8 Merge X remote fixes from the trunk back to the branch. Fixes lots of various bugs. a=chofmann
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103634 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 21:40:26 +00:00
mstoltz%netscape.com
11dda9e7e2 Bug 99020 - When changing the type of a text input element to "file,"
clear its value. sr=jst, r=heikki, a=PDT.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103633 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 20:56:38 +00:00
yokoyama%netscape.com
e4cc0bbde5 ftang using yokoyama's account
fix bug 94319 on m94 branch.
move the fix from m92 (3.111.10.2) branch to m94 branch
see the 3.111.10.2 check in log for r=/sr= and a= details.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103632 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 20:44:07 +00:00
shannond%netscape.com
f73176d18d Fixing HP-UX bustage by adding a newline.
Bug 101355, r=jdunn,bbaetz a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103631 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 20:06:53 +00:00
ddrinan%netscape.com
e9b07bdb22 Bug 100213 - Crash in GetOCSPResponders. r=rangansen,sr=kin
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103627 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 17:37:11 +00:00
gerv%gerv.net
4c4fc299f7 Backing out changes checked in for Mozilla's 0.9.4 release as part of bug 99441. This backout requested by syd and jband in that bug.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103625 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 17:09:16 +00:00
karnaze%netscape.com
2b8c082913 bug 82401 - remove cell from correct parent when cell spans into split row; work around bug 101264 by doing initial reflow with unconstrained height. sr=kin, r=attinasi.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103623 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 14:53:06 +00:00
jaggernaut%netscape.com
1018334fd6 Bug 73064: If your navigation bar is in a collapsed state when you closed your browser, its "collapsed" grippy wouldn't show up upon the next browser startup. Work-around which happens to work, only to be checked in on the branch, we'll figure out something better for the trunk. r=hixie, sr=ben, a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103617 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 12:38:07 +00:00
jaggernaut%netscape.com
2e6f663a94 Bug 79889: Download progress dialog not wide enough. r=hewitt, sr=hyatt, a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103616 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 12:25:40 +00:00
peterlubczynski%netscape.com
9813c2d012 Fix for plugin printing bug 53349 and bug 27478 r=beard,av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103606 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 04:24:13 +00:00
sdagley%netscape.com
afbaedd313 For #97211 - Use OS mem allocators on Carbon builds. Only on branch for now. suggestedby=sfraser,sr=dbaron,a=PDT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103603 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 03:22:38 +00:00
darin%netscape.com
852e7f39be fixes bug 92582 "Some MS ftp servers (ftp.microsoft.com) never display
lists - PASV invalid after error response" patch=dougt, r=gagan, sr=darin, a=PDT


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103546 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 08:27:23 +00:00
hyatt%netscape.com
8e503e987b Completely back out nsMenuPopupFrame changes.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103541 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 04:24:40 +00:00
hyatt%netscape.com
60055373bc Fix bustage.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103538 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 03:10:58 +00:00
hewitt%netscape.com
de2bdaeb68 93857 - Both 'To:' and 'Bcc:' options simultaneously checked in composition window, r=varada, sr=mscott
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103526 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 01:15:23 +00:00
hyatt%netscape.com
b4c3ba3158 Fix for 96291, leaky popups.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103522 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 00:41:37 +00:00
hyatt%netscape.com
afe70cb20e Fix for 94180.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103517 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 00:29:02 +00:00
darin%netscape.com
0130c09fdb fixes build bustage
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103515 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 00:27:57 +00:00
mstoltz%netscape.com
236c9c1438 Bug 101021, omitted assignment of return value from security check function
in nsWindowSH::GetProperty. r=harishd, sr=vidur, a(PDT)=nisheeth


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103513 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 00:26:42 +00:00
naving%netscape.com
5b724bb62c 98180 r/sr=sspitzer. Do not preflight the date picker w/ today's date if the argument has a date.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103512 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 00:25:31 +00:00
sspitzer%netscape.com
b963f74ca9 fix for #96979. hide folderpane columns for existing profiles. a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103501 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 00:18:27 +00:00
sfraser%netscape.com
b2e55c3c08 Fix for bugscape bug 8740 -- fix notification sounds to work again by making sure we call EnterMovies() for Carbon. r=pink, beard. sr=jst, a=jaime
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103495 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 23:41:46 +00:00
darin%netscape.com
81e4a81df8 fixes bug 89500 for the mozilla 0.9.4 branch [a=PDT]
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103494 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 23:06:53 +00:00
gordon%netscape.com
7c3a29ea6a Fix bug 92348. Browser would fail to create windows if the capacity of the
disk or memory cache was set to 0. Fixed this by changing nsCacheService::
ActivateEntry() to fail if neither device is enabled or if the cache entry
is not stream-based and the memory cache is disabled.  No point handing out
a cache descriptor if we can't store any data. r=gagan, sr=dougt, darin.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103490 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:49:56 +00:00
naving%netscape.com
e2e79f0a98 70252 r=bienvenu sr=sspitzer Make filters having non-ascii name and conditions migrate from 4.xto 6.x
62437 r=bienvenu sr=sspitzer Make filter non-ascii folder names migrate from 4x. to 6.x


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103489 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:48:45 +00:00
darin%netscape.com
2447f93166 mac project changes for bug 89500 [a=PDT]
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103487 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:22:19 +00:00
bnesse%netscape.com
5e0bcc50ce Removed prefldap.h from manifest (file has been removed from cvs) to fix mac build.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103486 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:20:21 +00:00
darin%netscape.com
03517e0557 adding files for bug 89500 [a=PDT]
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103485 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:19:10 +00:00
darin%netscape.com
e016528374 fixes bug 97997 "easyweb.tdcanadatrust.com does not display" a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103484 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:15:07 +00:00
tao%netscape.com
1ccc21361c 97606: Default character coding setting is blank in pref.
(r=dveditz,sr=alecf). add navigator.proeprties to en-{win,mac}.jar.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103483 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:13:52 +00:00
sdagley%netscape.com
60315dab09 Fix #99556 - landing trunk fix into 094 branch. Account for change in Mac epoch time as of MSL 6. r=wtc/sfraser
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103482 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:04:50 +00:00
sspitzer%netscape.com
d4ed5de1d5 fix for #98037. newsgroups requiring auth sometimes come up as all read. a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103481 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:00:04 +00:00
heikki%netscape.com
d81ee0e696 Fixing build bustage, forgot to add a file.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103480 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 21:47:12 +00:00
naving%netscape.com
0d53807e8c 100326 r=bienvenu sr=sspitzer Abort compact if writing to folder fails.
90702 r=bienvenu sr=sspitzer Update the expunged bytes for offline stores after compacting.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103479 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 21:45:24 +00:00
bnesse%netscape.com
7efa0103e2 Fixing soon to be red mac tree by adding type cast for js call.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103478 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 21:06:34 +00:00
mitesh%netscape.com
7f7ef61de5 Removing prefldap.h - It's no longer needed as a part of bug 75955 fix
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103477 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 21:03:53 +00:00
mitesh%netscape.com
abeddd00b4 Checked in a wrong version of nsAutoConfig.cpp earlier with fixes for bug 75955. Updating it to a newer version
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103476 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 20:54:31 +00:00
beard%netscape.com
c8d8f9fc24 fix for bug #98290, keep stack aligned to 16 byte boundaries, r=beard, sr=sfraser, a=grega
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103475 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 20:50:57 +00:00
mscott%netscape.com
4fb3a770bf Landing Bug #100608 on the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103474 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 20:48:49 +00:00
bnesse%netscape.com
fa4e9d0dd8 Fix for bug 75955 add getldapattributes. r=bnesse, dmose. sr=alecf,sfraser. Checking in mac files for mitesh.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103473 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 20:45:04 +00:00
ducarroz%netscape.com
343edffb97 Fix for bug 57902. As write to file is done using a buffer, we need to check the return code of the flush to be sure we phisically wrote the data to disk. Also check the file size when we are done writing to avoid sending empty mail (this include the fix for the regression introduced with the first fix). R=varada, SR=bienvenu
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103472 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 20:41:44 +00:00
mitesh%netscape.com
394693b9b6 Fix for bug 75955 - Adding getLDAPAttributes() functionality in AutoConfig
This a branch only check in - hasn't been checked into the trunk
r=bnesse,dmose, sr=shaver,alecf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103471 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 20:40:08 +00:00
peterlubczynski%netscape.com
e0419770f6 Fix for OS X crash with bundle type plugins bug 98729 r=beard sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103469 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 20:08:11 +00:00
shanjian%netscape.com
2e35258022 #99666 page is displayed as blank in certain situation
r=harishd, sr=rpotts, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103466 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 19:43:43 +00:00
rogerl%netscape.com
9cde6c816e r=jst, sr=brendan, a=pdt. Fixes crash when parsing /[/.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103464 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 19:20:22 +00:00
loadrunner%betak.net
d647581a41 bug 99108, Bidi (Hebrew and Arabic) Encoding can not be set as the default encoding for composing mail, patch from simon@softel.co.il, r=jbetak, sr=kin, PDT+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103461 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 18:39:10 +00:00
heikki%netscape.com
b2d293d7c0 Bug 78622, DOMParser and XMLHttpRequest failures with xml-stylesheet PIs etc. r=harishd, sr=vidur.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103460 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 18:30:09 +00:00
pinkerton%netscape.com
2c917ae462 make the system unit of mousewhell scrolling 3 lines on osx. r=sdagley/sr=sfraser/a=chofmann. bug# 100799
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103459 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 18:27:41 +00:00
pinkerton%netscape.com
5a9683a4ab implements code for responding to hidden/collapsed attributes on top-level menus. bug 100122. r=saari/sr=sfraser/a=chofmann.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103458 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 18:24:14 +00:00
rods%netscape.com
7b58da0cad Should set PrintObject to print "AsIs" if it doesn't have children
Bug 83683 r=kmcclusk r=attinasi


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103440 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 12:52:06 +00:00
ssu%netscape.com
ce6add0fed fixing bug 99526 - update uninstaller to be able to undo the new MAPI settings set by mail. r=dveditz, sr=mscott. affects windows platforms only.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103435 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 06:33:46 +00:00
ssu%netscape.com
b7a27c33db fixing bug 9614 - Default the Turbo checkbox to be unselected in installer. r=curt, sr=dveditz.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103433 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 06:22:28 +00:00
naving%netscape.com
078783926a 95584 r=bienvenu sr=mscott. Made it so that downloading messages and compacting folder do not
write each others data.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103432 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 05:50:17 +00:00
mscott%netscape.com
dcc28801e7 Landing 89950 on the branch for varada.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103431 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 05:32:24 +00:00
mscott%netscape.com
3f5a2e8a5c Landing 99234 on the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103430 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 05:29:02 +00:00
rangansen%netscape.com
0c3eee476f r=rangansen sr=kin@netscape.com
PDT + = Jaime Rodriguez, Jr.
bug# 100193 - updating PSM version


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103424 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 04:35:55 +00:00
ducarroz%netscape.com
858763d06d Fix for bug 88079. In the case we fetch a local file, verify that the file path is a valid file and not a directory. R=varada, SR=bienvenu
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103417 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 03:53:53 +00:00
sspitzer%netscape.com
ede0c5ab73 fix for #59449 for branch. prevent case where we show the news message source (instead of the message)
because we're using a bad nsNNTPProtocol from the connection cache. a=PDT


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103416 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 03:44:13 +00:00
srilatha%netscape.com
9c28bc6229 Fix for bug # 100645. NextToken returns UTF8 instead UCS2
r=dmose, sr=alecf, a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103415 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 03:43:38 +00:00
dbaron%fas.harvard.edu
f6eb933aec Fix topcrash bug 99057 (crash @ GetExtensionsAndDescriptionFromMimetypesFile). Patch from bzbarsky@mit.edu. r=me sr=scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103411 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 03:17:12 +00:00
bnesse%netscape.com
0a6a9fd629 Fix for bug 80789. Change rot value from 7 to 13 for config file obfuscation. r=bnesse, sr=alefc. Checking in for chipc.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103409 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 03:08:50 +00:00
sfraser%netscape.com
627a2fa5d3 Fix for bug 96160, checking in for ftang. r=yokoyama, sr=sfraser, a=asa, sa=ptd2. Don't crash if we fail to get an i18n system resource.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103394 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 01:19:00 +00:00
(no author)
8bad31c580 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103393 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 01:17:00 +00:00
brendan%mozilla.org
973a138490 Join fixes for 81847 to the branch, with pdt approval.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103384 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 00:14:10 +00:00
srilatha%netscape.com
766d65fa78 Fix for smoketest blocker bugscape bug 9703.
r=dmose, sr=sspitzer a=granrose.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103379 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 23:34:31 +00:00
karnaze%netscape.com
2bed6f7a2b bug 68998 - added additional param to Paint, PaintChildren, PaintChild used by tables in standard mode. sr=waterson, r=alexsavulov.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103316 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 13:56:45 +00:00
rods%netscape.com
1db6f7b7c8 Make the default "submit"
Bug 59035 r=kmcclusk sr=attinasi


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103298 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 10:46:40 +00:00
srilatha%netscape.com
3ee4597b02 Fix for bug 95122 / 100668. part of the simple mapi UI checkin
sr=sspitzer. Fixing the js error and removing extra content from contents.rdf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103278 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 05:15:19 +00:00
loadrunner%betak.net
a4a473d518 bug 97541, Enable multiple spellcheckers in mail/composer, r=cmanske, sr=kin, PDT+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103274 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 04:40:24 +00:00
loadrunner%betak.net
6a6ab4e28f bug 97541, Enable multiple spellcheckers in mail/composer, r=cmanske, sr=kin, PDT+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103272 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 04:31:53 +00:00
blakeross%telocity.com
a3e9b17f10 Turbo turns off if you go to the advanced panel and press ok without making any changes (99677). r=hewitt sr=ben everything+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103269 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 04:01:01 +00:00
naving%netscape.com
253a49cd77 98391 r=bienvenu sr=sspitzer a=pdt. Made it so that the filtering still works to a local folder if
parent is renamed. The fix also includes the fix for 98470 because it is in the same code.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103267 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 03:53:07 +00:00
ccarlen%netscape.com
cd21c03664 Bug 99117 - account creation problems when using turbo mode. UnloadAccounts() resets some vars which needed to be reset and weren't. r=bhuvan,dp/sr=mscott/a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103260 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 02:20:08 +00:00
cltbld%netscape.com
cf126e08a2 #91990: changing default skin from 'classic/1.0' to 'modern/1.0' on MOZILLA_0_9_4_BRANCH (now owned by Netscape) r=jelwell, sr=sdagley.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103246 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 00:47:09 +00:00
ftang%netscape.com
d5205a0cbe move fix of 94319 from m92 branch to m94 branch per marek in pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103240 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 00:15:02 +00:00
kin%netscape.com
44f8952c2b Fix for bug #92215: [Table Printing] Mozilla crashes when printing the front page of slashdot
Modified nsBlockFrame::ReflowDirtyLines() so that it
removes any floaters on it's continuing frames list,
if they are on lines that are being pulled up.

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


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103235 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 23:10:21 +00:00
ducarroz%netscape.com
b4356e037d Fix for bug 96386. When a generic or unknown error occures while posting a message, we should report a post error instead of a send error. Also, the send unsent message listener should not display errors. Finally, the Display Send Report function should avoid displaying twice the same string. R=varada, sr=mscott
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103234 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 23:06:59 +00:00
gordon%netscape.com
dc98e60ad1 FIX bug 100216, crash in nsCacheService on shutdown. Added null pointer
check in nsCacheEntryDescriptor::RequestDataSizeChange(). r=gagan, sr=darin.

Also renamed cache directory preference per discussion in bug 78480. r=gagan
sr=darin.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103224 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 21:25:47 +00:00
jfrancis%netscape.com
12b282edd2 fixes 97797: empty solo list item won't indent. Changes to nsHTMLEditRules::WillMakeList() to not outsmart itself so badly. r=fm;sr=kin
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103223 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 20:57:12 +00:00
bnesse%netscape.com
9dc2508915 Landing fix for bug 92447 on branch. Internalize .cfg reading into prefs library. This also re-enables reading of the .cfg file which was broken by a checkin for bug 88844. r=miteh, sr=sfraser, a=PDT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103209 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 18:47:32 +00:00
rpotts%netscape.com
913974ff70 bug #88229. moving patch from the 0.9.2 branch onto 0.9.4.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103186 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 06:58:34 +00:00
jst%netscape.com
a611c3fa27 Fixing bug 95840. Speeding up global property access in JS. r=mstoltz@netscape.com, sr=vidur@netscape.com, a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103185 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 06:53:42 +00:00
mitesh%netscape.com
e2f91e0eef Fix for bug 99515 - AutoConfig event loop hangs during pref migration
r=danm and sr=alecf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103182 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 05:08:18 +00:00
mitesh%netscape.com
e9812af9dd Fix for bug 97228 - Multiple appends of email addresses to the autoconfig URL
r=bnesse and sr=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103181 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 04:55:13 +00:00
kmcclusk%netscape.com
9391a7135e Protect against null view in nsViewManager::ProcessPendingUpdates. sr=mscott@netscape.com r=peterl@netscape.com a=jaimejr@netsca
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103166 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 01:33:20 +00:00
rangansen%netscape.com
ed6ff1f297 r=ddrinan sr=sr=kin@netscape.com PDT+=Jaime Rodriguez, Jr.
bug# 97719 - fixing broken crl expired warning dialog


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103165 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 00:56:23 +00:00
pinkerton%netscape.com
c8b90827ed work around bugs in CarbonLib's ::MenuSelect() with submenus. r=saari/sr=sfraser. bug#83639
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103163 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 00:42:07 +00:00
mscott%netscape.com
32e5e46df0 Landing 99491 onto the branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103152 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 00:09:14 +00:00
harishd%netscape.com
8f3d1f533b 98187 - Make sure that the end tag, inline element, does not close tags in the root tag list. r=heikki,sr-vidur,a=PDT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103148 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 00:03:11 +00:00
mscott%netscape.com
68683e8186 Landing 91751 on the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103144 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:59:30 +00:00
bienvenu%netscape.com
5226e443c4 fix regression in downloading messages for offline use and disabling commands when local message is loaded while offline r=naving, sr=sspitzer 99696 100124
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103143 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:49:51 +00:00
dp%netscape.com
1ffe13a4bb removing ^M at the end of line
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103141 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:47:34 +00:00
pchen%netscape.com
3aa4e8ee82 bugscape 8850, r=jag, sr=alecf, new mainWindow.dtd file that holds mainWindow* entities
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103140 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:44:24 +00:00
pchen%netscape.com
95fdb80ac3 bugscape 8850, r=jag, sr=alecf, bump minimum macos version to 8.6
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103139 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:39 +00:00
pchen%netscape.com
592d631348 buscape 8850, r=jag, sr=alecf, include mainWindow.dtd to get mainWindow entities
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103138 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:36 +00:00
pchen%netscape.com
5ad63473b5 buscape 8850, r=jag, sr=alecf, remove mainwindow entities from navigator.dtd (they're going into mainWindow.dtd)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103137 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:33 +00:00
pchen%netscape.com
ca2930fef6 bugscape 8850, r=jag, sr=alecf, add mainWindow.dtd to jar file
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103136 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:29 +00:00
pchen%netscape.com
e042778097 bugscsape 8850, r=jag, sr=alecf, include mainwindow.dtd
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103135 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:26 +00:00
heikki%netscape.com
48e8dc3afe Bug 100106, XMLHttpRequest.responseText is empty if XML parser error. r=harishd, sr=vidur.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103134 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:08 +00:00
dp%netscape.com
ee5b88f504 bug 88844 preventing xpcom from double init on launch after turbo mode is enabled. Getting turbo mode initialized properly. r=law, sr=alec,seth
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103133 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:41:21 +00:00
heikki%netscape.com
da4c1220ad Bug 98597, second part, bogus events with XMLHttpRequest. Patch from vidur. r=heikki, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103132 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:37:22 +00:00
harishd%netscape.com
5d20e95a61 98645 - Added SELECT to the set of tags that cannot be crossed over when an end tag ( block-level ) tries to close it's matching open tag on the stack. r=heikki, sr=vidur,a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103129 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:30:53 +00:00
harishd%netscape.com
1518265a7a 91744 - Avoid stack overflow by replacing recursion with a simple do-while. Removed unwanted assertions. r=heikki,sr=vidur,a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103127 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:25:32 +00:00
yokoyama%netscape.com
8c85e4fcf1 bug 97224:Update UTF-8 for Unicode 3.01 conformance
maintaining a byte count.
/r=yokoyama, /sr=waterson


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103097 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 17:35:58 +00:00
bienvenu%netscape.com
e53aec46d1 checking in fix for 99510 from trunk
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103095 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 13:59:07 +00:00
(no author)
6887bc1966 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103094 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 13:41:48 +00:00
peterv%netscape.com
9b5877a83a Fix for bug 99044 (Big memory leak in DOMHelper.cpp). r=Pike, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103085 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 10:12:28 +00:00
peterv%netscape.com
ba09c542b2 Fix for bug 85708 (Should support "text/xml" MIME media type). r=Pike, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103084 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 10:10:41 +00:00
srilatha%netscape.com
a66b153c53 Fix for bug # 95122. UI implementation for Simple MAPI.
r=rdayal, sr=sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103081 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 05:48:42 +00:00
bienvenu%netscape.com
e65919336e checking in fix for 79245 from the trunk
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103077 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 04:52:24 +00:00
rpotts%netscape.com
e2f1a9bc9b bug #98844. Moving this patch over to 0.9.4 from 0.9.2...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103076 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 04:33:15 +00:00
rpotts%netscape.com
c9465eb348 bug #98469 (r=pavlov@netscape.com, sr=jst@netscape.com, a=pdt). The _content window target does not always exist...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103075 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 04:29:40 +00:00
jst%netscape.com
e45ffff2a7 Landing the fix for bug 98292 on the branch, implement image.x and .y. r=jrgm@netscape.com, sr=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103073 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 03:51:47 +00:00
bienvenu%netscape.com
c9bf14bd6f more landing of 81690 onto the branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103071 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 03:27:53 +00:00
waterson%netscape.com
2c7c8fa4ac Bug 97383. Include the float's max-element-width in computation of the line's max-element-width so that we're guaranteed to place content next to a left floater. Revert some of the NOWRAP changes that should no longer be necessary. r=dbaron, sr=attinasi, a=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103070 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 03:26:26 +00:00
mscott%netscape.com
7910b2e903 Landing XBL brutal sharing on the branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103066 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 02:30:04 +00:00
mscott%netscape.com
bda5786937 Landing XBL brutal sharing on the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103065 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 02:29:29 +00:00
srilatha%netscape.com
bd8d4b80bc removing these old unused files
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103063 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 02:21:17 +00:00
oeschger%netscape.com
a9f8eb5255 updating some screenshots in the help content, bug=85925, pdt-stamped, author=jatin, r=oeschger
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103061 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 02:14:53 +00:00
heikki%netscape.com
a19dc671ba Bug 98597, bogus event with XMLHttpRequest, including crasher fix. Patch from vidur. r=heikki, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103053 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 01:00:22 +00:00
heikki%netscape.com
214d0bb707 Bug 78021, Copy Link Address broken for image maps (<area> elements), <link> elements and simple XLinks. r=harishd, sr=vidur.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103051 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:48:06 +00:00
attinasi%netscape.com
da71dddcd1 Fix for percentage-height images in shrink-wrapping containers. b=85016 r=karnaze sr=waterson a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103050 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:38:15 +00:00
ducarroz%netscape.com
c01dd3e2f6 Fix for bug 97256. Don't be case sensitive when checking for a RFC822 header!
Patch provided by Denis Antrushin <adu@sparc.spb.su>. R=ducarroz, SR=sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103049 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:29:46 +00:00
kin%netscape.com
a1945a4b37 Fix for bug 98018: Impossible to delete text in textbox
nsEditor::CreateTxnForDeleteInsertionPoint() shouldn't
use count-1 when calculating isLast, in the non-text case.

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


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103047 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:18:34 +00:00
harishd%netscape.com
d6c7837d7e 98261 - Instead of throwing away the current tag close it's parent such that the stack level does not go beyond the reflow depth limit. This would allow leaf tags, that follow the current tag, to find the correct node. r=heikki, sr=attinasi.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103046 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:11:27 +00:00
harishd%netscape.com
7ab11a2910 98261 - reconcile the difference between the ContentSink's notion of depth and Layout's notion of depth. r=heikki, sr=attinasi.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103045 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:11:16 +00:00
sspitzer%netscape.com
918aedd742 fix for #98793. hack to pre-cache the unread / read / flagged / unflagged icons to work around a problem
between outliner and imagelib.  a=PDT/


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103037 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:41:16 +00:00
hewitt%netscape.com
3a6dcacb77 99102 - update skin versions in all contents.rdf, r=hyatt, sr=blake
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103036 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:40:50 +00:00
mscott%netscape.com
5d4c9c03c9 Landing 81690 on the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103033 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:23:07 +00:00
mscott%netscape.com
1665532f16 Landing 84260 and 91352 onto the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103031 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:20:33 +00:00
mscott%netscape.com
11f1c99c39 Landing Bug #96335 on the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103030 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:17:34 +00:00
mscott%netscape.com
afd88479d3 Landing Bug #96631 on the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103029 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:15:46 +00:00
attinasi%netscape.com
7168d1a8c3 Fixing erroneous addition to previously reviewed and approved patch: b=97619 r=bernd sr=waterson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103028 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:14:43 +00:00
mscott%netscape.com
964dde1cad Landing Bug #99228 on the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103027 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:13:44 +00:00
av%netscape.com
90e92c729e Fixing bug 98285 -- adding access to the service manager from plugins, r=beard, sr=vidur
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103024 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:02:32 +00:00
sspitzer%netscape.com
9c8e527cba fix for #98381. "Server:" -> "Account:" in subscribe UI. a=PDT,mcarlson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103022 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 22:41:16 +00:00
tao%netscape.com
ccb1e2fd37 71517: Dynamically select platform jar in langxxxx.xpi. (r=jbetak,sr=mscott)
package en-{unix,win}.jar on mac, too.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103021 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 22:40:46 +00:00
gordon%netscape.com
d326ebbdba Fix bug 88768, [a=nisheeth], fixing unary operator usage.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103016 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:49:42 +00:00
mscott%netscape.com
5662ee8b97 Bug #99222 --> for compose auto complete, don't show the popup if we have an exact
match.
r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103013 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:36:29 +00:00
mscott%netscape.com
34fd65e72e Bug #99222 --> make the widget flexible enough to only show the popup if
there are  a certain # of results present in the list.
r=sspitzer
sr=hewitt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103012 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:35:02 +00:00
mscott%netscape.com
1619de5a13 Bug #88315 --> select the first partial match when presented with multiple matches
r=ducarroz, sspitzer
sr=hewitt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103009 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:32:31 +00:00
hyatt%netscape.com
cef8df4890 Fix for 96899, unable to see addresswes when scrolling up in mailcompose. r=mscott, sr=brendan
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103007 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:24:30 +00:00
sspitzer%netscape.com
c5d40fbb22 fix for #97585. if signature file pref points to a directory, don't hang
on msg compose. a=PDT


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103005 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 19:39:18 +00:00
sspitzer%netscape.com
c6e4cd4a0c fix for #98453. use "Mail & Newsgroups" consistently in the UI.
a=PDT,mcarlson


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103002 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 19:25:33 +00:00
kaie%netscape.com
a0da673610 b=97614
Merging changes from NSS_CLIENT_TAG into MOZILLA_0_9_4_BRANCH for directory mozilla/security/nss.
a=pdt is covered by bug 96018


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102966 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-15 01:18:52 +00:00
cavin%netscape.com
6915c9b64f Bug #98294: In DiscoverChildren(), make sure we have a consistent server hierarchy delimiter. r=sspitzer, sr=mscott.
Bug #98433: In GetListOfFoldersWithPath(), if the folder path contains 'INBOX' of any forms, we need to convert it to uppercase before finding it under the root folder. r=naving, sr=mscott.
Bug #99101: In RenameLeaf(), unescape the folder name before searching for hierarchy delimiter (to figure out parent pathname). r=naving, sr=bienvenu.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102961 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-15 00:31:07 +00:00
pierre%netscape.com
d4ddf5b901 Bug 93371 "Treat classes case insensitively in quirks mode". Back out ianh's patch in nsCSSParser and nsHTMLAttributes. Implements case-insensitiveness in nsCSSStyleSheet as described in bug 35522. r=glazman (+dbaron/jst), sr=hyatt, a=grega for PDT/asa for drivers
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102959 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 23:52:15 +00:00
ssu%netscape.com
bec02d74b7 fixing bug 99340's part regarding turbo settings in installer not retained when running installer in silent/auto modes. r=dveditz,syd sr=mscott, a=pdt+ affects windows platforms only.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102938 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 20:54:54 +00:00
kaie%netscape.com
fbf8f97a35 b=96018 r=ddrinan sr=blake a=pdt
New "Reset Master Password" functionality, for users who have forgotten their password.

b=99525 r=ddrinan/morse/relyea sr=blizzard a=pdt
Completing feature added with bug 96018.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102931 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 20:36:20 +00:00
cotter%netscape.com
9f0ad3c850 privacy & security help updates per b=85925 (a=asa, r=oeschger) and b=96018 (PDT+)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102930 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 20:34:02 +00:00
(no author)
7cb1660860 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102925 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 20:19:30 +00:00
gerv%gerv.net
cb6a00d0dd Prevent problems with NS initial start page appearing, by renaming pref. Bug 99441. r=syd, gerv, sr=jband, a=asa. This will be backed out immediately after 0.9.4 ships.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102880 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-13 17:53:45 +00:00
gerv%gerv.net
19a5fead7d Prevent problems with NS initial start page appearing, by renaming pref. Bug 99441. r=syd, gerv, sr=jband. This will be backed out immediately after 0.9.4 ships.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102878 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-13 16:57:41 +00:00
law%netscape.com
62f334a0a2 Applying fixes for bug 88844 and bug 89532 to the mozilla0.9.4 branch.
These changes also fix some other minor turbo-mode bugs.
These changes have all been reviewed and super-reviewed prior to being
checked in on the trunk; see the bugs for details.

a=asa for applying the fix to the branch.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102867 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-13 12:01:25 +00:00
ssu%netscape.com
102a2724fa fixing bug 99340 - Installer dies with error 2 under Win9x. r=syd,dveditz sr=mscott a=asa. not part of tinderbox builds. affects windows installers only.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102833 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 20:59:48 +00:00
brendan%mozilla.org
a5cae88f2e Checking in bstell@netscape.com's patch for bug 95906, r=jag, sr=me, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102826 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 20:36:53 +00:00
cmanske%netscape.com
e327210730 Fixing dataloss bug 98768, r=syd, sr=kin, a=roc+moz
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102817 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 19:21:33 +00:00
blizzard%redhat.com
80626e227e Fix bug #97620. Crash unloading -turbo mozilla from tray icon. r/sr=ben,rpotts,brendan,me
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102816 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 19:11:20 +00:00
kaie%netscape.com
adf70abbbb b=99052 r=nelsonb a=asa on irc
Fix crash in NSS during SSL handshake


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102806 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 16:17:01 +00:00
blakeross%telocity.com
498ce0aaf9 Committing a file I forgot yesterday in an r/sr/a'd checkin (caused an xml error when opening the addressbook sidebar panel).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102780 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 01:00:14 +00:00
shanjian%netscape.com
5e0af0ccdd #90581 universal charset detector does not work in mail/news
r=yokoyama, sr=waterson, a=roc+moz


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102779 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 00:37:53 +00:00
waterson%netscape.com
de0910f6ee Bug 72152. Be sure to update the pres context's visible area after doing a resize reflow. r=dbaron, sr=attinasi, a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102765 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 22:24:01 +00:00
timeless%mac.com
b61fa5b60e Bugzilla Bug 85543 Extra blank box to the left of 'Done.' on mac classic skin.
r=ksosez sr=blake a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102753 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 08:52:58 +00:00
jaggernaut%netscape.com
8efa6975cc Bug 91884, 91788 & 91571: reverting code from 91884 and checking in the fix we had in NS 6.1 / 0.9.2.1. r=reverting code, sr=hyatt, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102750 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 07:29:39 +00:00
peterlubczynski%netscape.com
9695eac077 Use memmove instead of strncpy bug 98705 r=av sr=attinasi a=roc+moz
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102735 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 03:28:00 +00:00
cmanske%netscape.com
fbb7e7472a New strings needed in case full fix for bug 72583 is approved, r=brade, sr=kin, a=grega
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102717 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 00:59:05 +00:00
leaf%mozilla.org
32f3806bf0 mac version update and user agent string update, bug 93164, sr=mscott, a,r=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102710 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 00:28:38 +00:00
syd%netscape.com
3fbb2b5028 Fix typo in last checkin, wanted "Quick Launch", not "QuickLaunch"
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102709 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 00:17:32 +00:00
syd%netscape.com
373281325e Commercial addition for bug 97380. Looking at the bug, appropriate reviews and
such have been given for the mozilla version. Also, bug number 98594.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102707 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 00:04:56 +00:00
attinasi%netscape.com
07d3891457 Fix for image wrapping problems in table cells. b=97619 r=bernd sr=waterson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102689 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 22:57:07 +00:00
blakeross%telocity.com
ce34146fa4 App sometimes hangs when scrolling addressbook panel (99121). r=hwaara,varada sr=sspitzer a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102677 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 22:03:47 +00:00
dbaron%fas.harvard.edu
2e1a9bce6d Null checks for topcrash 99056. r=jag sr=waterson a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102673 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 21:45:40 +00:00
dbaron%fas.harvard.edu
e68b30e16e Null check to fix topcrash 97226. r=hixie sr=waterson a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102672 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 21:43:32 +00:00
robinf%netscape.com
f75f2c964a routine help updates per bug 85923; r=oeschger@netscape.com, a=adot@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102660 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 20:29:07 +00:00
oeschger%netscape.com
3cc3b02e9f adding help key for content updates, a=asa, bug=85925, r=cotter
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102625 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 00:55:46 +00:00
cls%seawood.org
43082cc7d3 Replace cat<<EOF with echos to avoid potential security risk with predictable /tmp files.
Thanks to Ashu Kulkarni <ashuk@eng.sun.com> for the patch.
Bug #98723 r=cls a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102593 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-08 19:16:27 +00:00
yokoyama%netscape.com
84ca3e46fc Bug 91193
makefile.win change
renaming from universalautochrdet.dll to universalautochardet.dll
/r=ftang;/sr=waterson;/a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102557 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 23:06:12 +00:00
waterson%netscape.com
b71a0d4153 Bug 55086. Change nsContainerFrame::PositionFrameView() to position child views. Eliminate the |aView| parameter from that method, because the view can be retrieved from the frame and need not be done by the caller. Eliminate the NS_FRAME_NO_MOVE_CHILD_VIEWS flag, which was read-only; i.e., never set by anyone. r=dbaron, sr=attinasi, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102541 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 21:21:25 +00:00
sspitzer%netscape.com
88232d9b3d fix for #98660. don't call PR_GetEnv("PARSE_MODE") a bunch of times if we don't have to.
r=dbaron, sr=sfraser, a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102537 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 20:36:15 +00:00
axel%pike.org
8532c1fd58 bug 94834, --without-png and --without-mng leads to DIRS=' ', r=pavlov, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102523 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 10:16:49 +00:00
attinasi%netscape.com
18603b97ef two approved bugs:
1) prevent list item bullets from resizing in Quirks mode (IE compat). b=97351 r=pierre sr=waterson a=drivers
2) fix collapsing margins of empty elements in BODY and TD in Quirks mode. b=97361 r=pierre sr=hyatt a=drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102513 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 04:10:39 +00:00
bstell%netscape.com
137b5e30b9 bug 97533, patch by dbaron@fas.harvard.edu, r=bstell, sr=blizzard
check return status from getIntPref


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102512 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 04:06:54 +00:00
kaie%netscape.com
574b31e2c7 b=87578 r=ddrinan sr=blizzard a=asa
Enable a user to use (or switch to) an empty security password, i.e. no password at all.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102490 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 00:05:22 +00:00
kaie%netscape.com
e127df6817 b=93103 r=ddrinan/relyea sr=blizzard a=asa
Enable display of complete chains when viewing certificates.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102488 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 23:54:06 +00:00
shanjian%netscape.com
1b9e0a9dbb #97516 crash in nsRenderingContextWin::GetWidth() in certain situation
r=rbs, sr=waterson, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102482 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 23:12:42 +00:00
pinkerton%netscape.com
4c002b41db allow changing of the label of a submenu. r=saari/sr=smfr/a=asa. bug# 97549.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102476 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 22:49:55 +00:00
waterson%netscape.com
1b7655115b Bug 98456. Fix makefile so that meta-modules build. r=dp, sr=cls, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102466 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 21:54:43 +00:00
gerv%gerv.net
3b9e749579 Set start page override and home page to be http://www.mozilla.org/start , a page encouraging people to get involved with Mozilla. r,a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102463 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 21:44:35 +00:00
jj%netscape.com
9ede8deaa5 #4830: turning traceback off in optimized builds on MOZILLA_0_9_4_BRANCH
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102462 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 21:43:19 +00:00
kin%netscape.com
c926a9ad82 Fix for bug #97387: WRMB:iframe with frameborder="no" does not work
Call ParseFrameborderValue() with value returned from InNavQuirksMode(),
instead of hardcoded PR_TRUE.

r=karnaze@netscape.com  sr=attinasi@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102439 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 20:13:46 +00:00
varada%netscape.com
d63d20c4e9 fix for bug#82120;disable editable fields during sending of mail;r=cmanske;sr=sspitzer;a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102432 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 19:22:37 +00:00
cotter%netscape.com
87a35d18c4 privacy & security help content update per b=85925, a=asa, r=oeschger
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102427 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 19:08:50 +00:00
cotter%netscape.com
58bb911f81 privacy & security help content updates per b=85925, a=asa, r=oeschger
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102426 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 19:01:41 +00:00
dbaron%fas.harvard.edu
1fc4f6cf6d Fix topcrash bug 96563 by reading only the number of characters of string that we have, rather than double that number. r=pavlov sr=blizzard a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102411 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 16:16:13 +00:00
karnaze%netscape.com
1322ba0abd bug 95688 - check for null base url, possibly fixing talkback reported errors, sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102408 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 14:13:17 +00:00
blizzard%redhat.com
276b070725 Bug #97851. Fix security permissions on temporary file created when doing file uploads. r=pete, sr=waterson, a=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102389 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 06:09:09 +00:00
jst%netscape.com
d1ebb0777f Fixing bug 62613. Making CSSStyleDeclaration objects appear as arrays in JS. patch by Fabian <hidday@geocities.com>, r=harishd@netscape.com, sr=jst@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102387 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 05:30:42 +00:00
mkaply%us.ibm.com
c5fed3e06b No bug
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - code from javier - more font improvements - better scaling and text zoom for bitmap fonts


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102382 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 03:59:10 +00:00
mkaply%us.ibm.com
19d0f57a0f No bug
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - Got these reversed - on OS/2, NEWFRAME is used at the end of a page, not the beginning


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102381 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 03:58:24 +00:00
jband%netscape.com
93c47a625f fix bug 97444. It is not good to patch a different fun into the frame. Let's safely shunt aside the callee frame instead. This is already on in the trunk. r=rogerl sr=brendan a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102370 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 02:18:43 +00:00
brendan%mozilla.org
4892be5264 Don't cache chrome scripts unless their master document URL is chrome too (we need the prototype cache to root the script objects; 98207, sr=jband&waterson, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102368 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 02:01:40 +00:00
av%netscape.com
703d584111 Fix for bug 86642 -- crash in DOMMimeTypeImpl::DOMMimeTypeImpl() when plugin doesn't set some fields in its version stamp, r=peterl, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102346 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 00:04:31 +00:00
yokoyama%netscape.com
65b6908093 Bug 96318:
Fixing accident removal of nsIFontPackageService
/ftang;/sr=waterson;/a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102345 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 00:01:37 +00:00
peterlubczynski%netscape.com
9e99e7738f Fix for not setting reflow state on object frame in printing case bug 97563 r=av sr=attinasi a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102298 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 14:51:43 +00:00
cls%seawood.org
055359c675 Updating module dependencies caused by checkin for bug 97380
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102290 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 08:41:48 +00:00
cls%seawood.org
7301a8096a Deactivate sidebar panels when the panel is not selected.
Special thanks to matt@netscape.com for providing this patch.
Bug #53239 r=cls sr=ben a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102286 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 07:58:16 +00:00
sspitzer%netscape.com
4c2fcd5edd fix for #88970. new thread pane icons. r,sr=sspitzer,hewitt, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102280 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 07:04:32 +00:00
sspitzer%netscape.com
16f4fe9967 fix for #92429. new alert icons. sr=hewitt, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102279 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 07:03:45 +00:00
edburns%acm.org
fda7a2186a bug=97930
r=peterl
sr=waterson
a=asa


modules/plugin/base/src/nsIPluginInstanceOwner.h
modules/plugin/base/src/nsPluginHostImpl.cpp
modules/plugin/base/src/nsPluginHostImpl.h
modules/plugin/base/src/nsPluginViewer.cpp
modules/oji/src/nsJVMManager.cpp
modules/oji/src/nsJVMManager.h
layout/html/base/src/nsObjectFrame.cpp
xpfe/global/resources/locale/en-US/region.properties


Here's what I did to fix this bug.

I pestered Rick Potts about the problem of
nsIWebBrowserChrome->SetStatus() not being synchronous. He fixed that
under bug 97227.

Taking advantage of Rick's fix to 97227, I modified
nsIPluginInstanceOwner to have new method, ShowStatus(const PRUnichar
*aStatusMsg). This is necessary to allow for localized messages to be
posted from the plugin, such as "Starting plugin for type
application/x-java-vm" or "Beginnen steckbar für Art
application/x-java-vm".

I modified all the implementations of nsIPluginInstanceOwner:

layout/html/base/src/nsObjectFrame.cpp
modules/plugin/base/src/nsPluginViewer.cpp

I inserted a call to nsIPluginInstanceOwner->ShowStatus() at the part
just before the big "whole damn app freezes when starting java" thing
happens.

I also modifed nsJVMManager.cpp ShowJavaConsole() to do the same. These
are the two places I know of now that can start java.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102274 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 06:40:01 +00:00
ftang%netscape.com
90bc0fe117 fix bug 98233. back out change to 56863
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102245 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 01:23:06 +00:00
leaf%mozilla.org
3f49f9c396 pull from the branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102215 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-04 22:58:51 +00:00
(no author)
ab3d5d6cb7 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102203 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-04 05:25:09 +00:00
33645 changed files with 2315267 additions and 3982379 deletions

View File

@@ -1,39 +1,23 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 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/
#
# 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.
# 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.
# 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):
# 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 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 *****
DEPTH = .
topsrcdir = @top_srcdir@
@@ -44,587 +28,160 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/build/unix/modules.mk
ifeq (,$(filter-out all,$(BUILD_MODULES))$(MOZ_XSLT_STANDALONE))
#
# And now for something completely different...
# Divide the default build into tiers.
# Tiers must be defined on module boundaries
#
SUPPRESS_DEFAULT_RULES = 1
ifneq ($(BUILD_MODULES),all)
# Make sure that the existing rulesets work
DIRS = $(BUILD_MODULE_DIRS)
EXPORT_DIRS = $(BUILD_MODULE_DEP_DIRS)
DIRS += $(tier_0_dirs)
else
ifndef LIBXUL_SDK
# only build gecko if --with-libxul-sdk isn't passed
DIRS += \
$(tier_1_dirs) \
$(tier_2_dirs) \
$(tier_9_dirs) \
$(tier_50_dirs) \
$(NULL)
DIRS = config build
endif # LIBXUL_SDK
ifdef MOZ_JAVA_SUPPLEMENT
DIRS += \
java/util \
java/webclient \
$(NULL)
endif
# boehm needs to be built before XPCOM
ifdef GC_LEAK_DETECTOR
DIRS += gc/boehm
endif
DIRS += $(tier_99_dirs)
DIRS += $(NSPRPUB_DIR)
#
# tier 0 - base build config dirs
#
tier_0_dirs = \
config \
build \
$(NULL)
DIRS += dbm modules/libreg js string xpcom js/src/xpconnect
#
# tier 1 - 3rd party individual libraries
#
tier_1_dirs += dbm
ifdef MOZ_OJI
DIRS += js/src/liveconnect
endif
ifndef MOZ_NATIVE_JPEG
tier_1_dirs += jpeg
ifdef MOZ_JSDEBUGGER
DIRS += js/jsd
endif
ifndef MOZ_NATIVE_ZLIB
tier_1_dirs += modules/zlib
DIRS += modules/zlib
endif
# Installer needs standalone libjar, hence standalone zlib
ifdef MOZ_INSTALLER
tier_1_dirs += modules/zlib/standalone
ifndef MOZ_NATIVE_JPEG
DIRS += jpeg
endif
ifdef MOZ_UPDATER
tier_1_dirs += modules/libbz2
tier_1_dirs += modules/libmar
endif
ifdef MOZ_SVG_RENDERER_LIBART
tier_1_dirs += other-licenses/libart_lgpl
endif
#
# tier 2 - base libraries
#
tier_2_dirs = \
js \
xpcom \
$(NULL)
ifndef MOZ_NO_XPCOM_OBSOLETE
tier_2_dirs += modules/libreg xpcom/obsolete
endif
ifdef NS_TRACE_MALLOC
tier_2_dirs += tools/trace-malloc/lib
endif
#
# tier 9 - core components (necko,gecko)
#
tier_9_dirs += \
js/src/xpconnect \
intl \
$(NULL)
ifdef MOZ_ENABLE_XLIB
tier_9_dirs += gfx/src/xlibrgb widget/src/xlibxtbin
DIRS += gfx/src/xlibrgb widget/src/xlibxtbin
endif
ifdef MOZ_ENABLE_GTK
tier_9_dirs += widget/src/gtksuperwin widget/src/gtkxtbin
DIRS += widget/src/gtksuperwin widget/src/gtkxtbin
endif
ifdef MOZ_ENABLE_GTK2
tier_9_dirs += widget/src/gtkxtbin
# Linux and Solaris installer needs standalone libjar, hence standalone zlib
ifneq (,$(filter Linux SunOS,$(OS_ARCH)))
DIRS += modules/zlib/standalone
endif
ifdef MOZ_IPCD
tier_9_dirs += ipc/ipcd
endif
tier_9_dirs += \
DIRS += \
widget/timer \
include \
modules/libutil \
netwerk \
modules/libjar \
$(NULL)
ifdef MOZ_XUL
tier_9_dirs += rdf
endif
tier_9_dirs += \
modules/mpfilelocprovider \
uriloader \
intl \
modules/libpref \
modules/libimg \
modules/oji \
modules/libjar \
caps \
parser/expat \
parser/htmlparser \
rdf \
expat \
htmlparser \
gfx \
gfx2 \
modules/libpr0n \
sun-java \
modules/plugin \
dom \
view \
widget \
content \
layout \
db \
docshell \
webshell \
embedding \
editor \
xpfe/appshell \
sun-java \
profile \
themes \
$(NULL)
ifdef MOZ_AUTH_EXTENSION
tier_9_dirs += extensions/auth
endif
ifdef MOZ_XMLEXTRAS
tier_9_dirs += extensions/xmlextras
endif
ifdef MOZ_WEBSERVICES
tier_9_dirs += extensions/webservices
endif
ifdef MOZ_UNIVERSALCHARDET
tier_9_dirs += extensions/universalchardet
endif
ifdef MOZ_OJI
tier_9_dirs += \
js/src/liveconnect \
modules/oji \
$(NULL)
endif
ifdef ACCESSIBILITY
tier_9_dirs += accessible
DIRS += accessible
endif
#
# tier 50 - xpfe & toolkit
#
ifdef MOZ_XUL_APP
tier_50_dirs += chrome
else
ifdef MOZ_XUL
tier_50_dirs += rdf/chrome
else
tier_50_dirs += embedding/minimo/chromelite
endif
endif
tier_50_dirs += profile
# This must preceed xpfe
ifdef MOZ_JPROF
tier_50_dirs += tools/jprof
DIRS += tools/jprof
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
tier_50_dirs += xpfe/bootstrap/appleevents
endif
DIRS += xpfe
tier_50_dirs += \
db \
xpfe \
toolkit/components \
$(NULL)
ifndef MOZ_XUL_APP
tier_50_dirs += themes
endif
ifdef MOZ_ENABLE_XREMOTE
tier_50_dirs += widget/src/xremoteclient
endif
ifdef MOZ_XUL_APP
tier_50_dirs += toolkit
endif
ifdef MOZ_XPINSTALL
tier_50_dirs += xpinstall
endif
ifdef MOZ_JSDEBUGGER
tier_50_dirs += js/jsd
endif
DIRS += xpinstall
ifdef MOZ_PSM
tier_50_dirs += security/manager
else
tier_50_dirs += security/manager/boot/public security/manager/ssl/public
endif
ifdef MOZ_PREF_EXTENSIONS
tier_50_dirs += extensions/pref
endif
ifdef MOZ_JAVAXPCOM
tier_50_dirs += extensions/java
endif
ifndef BUILD_STATIC_LIBS
ifdef MOZ_XUL_APP
ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2))
tier_50_dirs += embedding/browser/gtk
endif
endif
endif
ifdef MOZ_XUL_APP
ifndef BUILD_STATIC_LIBS
tier_50_dirs += toolkit/library
endif
endif
ifdef MOZ_ENABLE_LIBXUL
tier_50_dirs += xpcom/stub
endif
ifdef NS_TRACE_MALLOC
tier_50_dirs += tools/trace-malloc
endif
ifdef MOZ_STORAGE
tier_50_dirs += storage
DIRS += security/manager
endif
ifdef MOZ_LDAP_XPCOM
tier_50_dirs += directory/xpcom
endif
ifndef MINIMO
ifdef MOZ_XUL_APP
ifdef MOZ_ENABLE_GTK2
tier_50_dirs += toolkit/components/gnome
endif
endif
endif
ifdef MOZ_LEAKY
tier_50_dirs += tools/leaky
endif
ifdef MOZ_MAPINFO
tier_50_dirs += tools/codesighs
endif
#
# tier 99 - application binaries
#
ifdef MOZ_MAIL_NEWS
tier_99_dirs += mailnews
endif
ifdef MOZ_CALENDAR
tier_99_dirs += calendar
DIRS += directory/c-sdk/ldap directory/xpcom
endif
ifdef MOZ_EXTENSIONS
tier_99_dirs += extensions
DIRS += extensions
endif
# axcontrol
ifeq ($(OS_ARCH),WINNT)
ifndef MOZ_NO_ACTIVEX_SUPPORT
tier_99_dirs += \
embedding/browser/activex/src/control \
embedding/browser/activex/src/control_kicker \
$(NULL)
endif
ifdef MOZ_MAIL_NEWS
DIRS += mailnews
endif
# Java Embedding Plugin
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
tier_99_dirs += plugin/oji/JEP
ifdef MOZ_LEAKY
DIRS += tools/leaky
endif
ifneq (,$(filter browser suite,$(MOZ_BUILD_APP)))
tier_99_dirs += xpfe/components/search
endif
ifdef MOZ_BRANDING_DIRECTORY
tier_99_dirs += $(MOZ_BRANDING_DIRECTORY)
endif
ifdef MOZ_PHOENIX
tier_99_dirs += browser xpfe/bootstrap/init.d
endif
ifdef MOZ_XULRUNNER
tier_99_dirs += xulrunner
endif
ifdef MOZ_COMPOSER
tier_99_dirs += editor/ui
endif
ifdef MOZ_THUNDERBIRD
tier_99_dirs += mail xpfe/bootstrap/init.d
endif
ifdef MOZ_STANDALONE_COMPOSER
tier_99_dirs += composer
endif
ifdef MOZ_SUNBIRD
tier_99_dirs += calendar/sunbird
endif
ifdef MOZ_SUITE
tier_99_dirs += suite
endif
ifdef MINIMO
tier_99_dirs += minimo
endif
ifdef MOZ_XUL_APP
ifdef MOZ_INSTALLER
tier_99_dirs += toolkit/mozapps/installer
endif
else
ifneq (,$(MOZ_XPFE_COMPONENTS)$(MOZ_XUL))
ifndef MINIMO
tier_99_dirs += xpfe/bootstrap
endif
endif
endif
# winembed, mfcembed
ifeq ($(OS_ARCH),WINNT)
ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
tier_99_dirs += embedding/tests
endif
endif
# os2embed
ifeq ($(OS_ARCH),OS2)
ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
tier_99_dirs += embedding/tests
endif
endif
ifeq ($(MOZ_BUILD_APP),macbrowser)
tier_99_dirs += \
embedding/config \
camino \
$(NULL)
endif
# test harnesses
ifdef ENABLE_TESTS
tier_99_dirs += tools/test-harness
DIRS += xpcom/tests
endif
default alldep all:: $(SUBMAKEFILES)
$(RM) -rf $(DIST)/sdk
$(RM) -rf $(DIST)/include
$(MAKE) -C config export
ifndef LIBXUL_SDK
$(MAKE) nspr
endif
$(MAKE) ldap
$(MAKE) tier_0
ifndef LIBXUL_SDK
$(MAKE) tier_1
$(MAKE) tier_2
$(MAKE) tier_9
$(MAKE) tier_50
endif
$(MAKE) tier_99
DIRS += l10n
include $(topsrcdir)/config/config.mk
else # BUILD_MODULES
# Standalone build
ifdef MOZ_XSLT_STANDALONE
DIRS = \
xpcom/typelib \
xpcom \
parser/expat \
content/xslt/src \
$(NULL)
SUBMAKEFILES = xpcom/typelib/Makefile
else
DIRS = $(BUILD_MODULE_DIRS)
# Hack to generate xpidl Makefile
ifneq ($(BUILD_MODULES),all)
ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
DIRS := xpcom/typelib $(DIRS)
SUBMAKEFILES := xpcom/typelib/Makefile
endif
endif
ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
DIRS += modules/staticmod
endif
default:: $(SUBMAKEFILES)
$(MAKE) export
$(MAKE) libs
DIRS += xpfe/bootstrap
endif # BUILD_MODULES == all or MOZ_XSLT_STANDALONE
endif # BUILD_MODULES == all
STATIC_MAKEFILES := nsprpub directory/c-sdk security/nss
STATIC_MAKEFILES := $(NSPRPUB_DIR) directory/c-sdk/ldap
ifdef MOZ_PSM
STATIC_MAKEFILES += security/nss
endif
GARBAGE_DIRS += dist
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
unallmakefiles mozilla-config.h \
unallmakefiles \
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
# Build pseudo-external modules first when export is explicitly called
export::
$(RM) -rf $(DIST)/sdk
$(MAKE) -C config export
$(MAKE) nspr
$(MAKE) ldap
ifneq ($(BUILD_MODULES),all)
ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
$(MAKE) -C xpcom/typelib
$(MAKE) export-idl
endif
endif
install::
ifndef MOZ_NATIVE_NSPR
$(MAKE) -C nsprpub install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/nspr
$(RM) -f $(addprefix $(DESTDIR)$(mozappdir)/$(LIB_PREFIX), $(addsuffix .$(LIB_SUFFIX), nspr4 plds4 plc4))
$(RM) -f $(addprefix $(DESTDIR)$(bindir)/,nspr-config compile-et.pl prerr.properties)
endif
ifdef MOZ_LDAP_XPCOM
$(MAKE) -C directory/c-sdk real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/ldap
endif
include $(topsrcdir)/config/rules.mk
# Clean up after pseudo-external modules
clean clobber realclean clobber_all distclean::
ifndef MOZ_NATIVE_NSPR
$(MAKE) -C nsprpub $@
endif
ifdef MOZ_LDAP_XPCOM
$(MAKE) -C directory/c-sdk $@
endif
# Map mozilla targets to standard automake target
export_tier_%:
@echo "$@" $(if $(tier_$*_dirs),,$(error Tier $* not present))
@$(MAKE) $(addsuffix /Makefile,$(filter-out $(STATIC_MAKEFILES),$(tier_$*_dirs)))
@$(EXIT_ON_ERROR) \
for d in $(tier_$*_dirs); do \
$(UPDATE_TITLE) \
$(MAKE) -C $$d export; \
done
libs_tier_%:
@echo "$@" $(if $(tier_$*_dirs),,$(error Tier $* not present))
@$(MAKE) $(addsuffix /Makefile,$(filter-out $(STATIC_MAKEFILES),$(tier_$*_dirs)))
@$(EXIT_ON_ERROR) \
for d in $(tier_$*_dirs); do \
$(UPDATE_TITLE) \
$(MAKE) -C $$d libs; \
done
tools_tier_%:
@echo "$@" $(if $(tier_$*_dirs),,$(error Tier $* not present))
@$(MAKE) $(addsuffix /Makefile,$(filter-out $(STATIC_MAKEFILES),$(tier_$*_dirs)))
@$(EXIT_ON_ERROR) \
for d in $(tier_$*_dirs); do \
$(UPDATE_TITLE) \
$(MAKE) -C $$d tools; \
done
tier_50:
@echo "$@: $($@_dirs)"
$(MAKE) export_tier_50
$(MAKE) libs_tier_50
$(MAKE) tools_tier_2
$(MAKE) tools_tier_9
$(MAKE) tools_tier_50
tier_%:
@echo "$@: $(if $($@_dirs),$($@_dirs),$(error Tier $* not present.))"
$(MAKE) export_$@
$(MAKE) libs_$@
#
# Individual modules
#
boehm:
ifdef GC_LEAK_DETECTOR
$(MAKE) -C gc/boehm
endif
nspr: boehm
ifndef MOZ_NATIVE_NSPR
$(MAKE) -C nsprpub
endif
ldap:
ifdef MOZ_LDAP_XPCOM
$(MAKE) -C directory/c-sdk
endif
export::
+$(LOOP_OVER_EXPORT_DIRS)
distclean::
cat unallmakefiles | $(XARGS) rm -f
rm -f unallmakefiles $(DIST_GARBAGE)
ifeq ($(OS_ARCH),WINNT)
rebase:
ifdef MOZILLA_OFFICIAL
echo rebasing $(DIST)
/bin/find $(DIST) -name "*.dll" > rebase.lst
rebase -b 60000000 -R . -G rebase.lst
rm rebase.lst
endif
splitsymbols:
ifdef MOZILLA_OFFICIAL
ifdef MOZ_DEBUG_SYMBOLS
echo finding pdb files
mkdir -p $(DIST)/$(BUILDID)
-cp `/bin/find . -path "./dist" -prune -o -name "*.dll" | sed "s/\.dll$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
-cp `/bin/find . -path "./dist" -prune -o -name "*.exe" | sed "s/\.exe$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
-cp `/bin/find . -path "./dist" -prune -o -name "*.EXE" | sed "s/\.EXE$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
endif # MOZ_DEBUG_SYMBOLS
ifdef MOZ_PROFILE
echo splitting symbols out of binaries
/bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
/bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
/bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
mkdir -p $(DIST)/$(BUILDID)
/bin/find $(DIST) -name "*.dbg" -exec mv {} $(DIST)/$(BUILDID) \;
endif # MOZ_PROFILE
endif # MOZILLA_OFFICIAL
## XXXvlad -- the test and cp should be removed once bug 249782 is
## completely fixed
signnss:
ifdef MOZILLA_OFFICIAL
echo signing NSS libs
test -f $(DEPTH)/nss/shlibsign.exe.manifest && cp $(DEPTH)/nss/shlibsign.exe.manifest $(DIST)/bin
cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
cd $(DIST)/bin; ./shlibsign.exe -v -i freebl3.dll
endif # MOZILLA_OFFICIAL
BUILDID = $(shell cat $(DEPTH)/config/build_number)
deliver: splitsymbols rebase signnss
endif # WINNT

View File

@@ -1,306 +0,0 @@
==============================================================
= = = = = = = = = = Mozilla Read Me = = = = = = = = = = =
==============================================================
Mozilla is subject to the terms detailed in the license
agreement accompanying it.
This Read Me file contains information about system
requirements and installation instructions for the Windows,
Mac OS, and Linux builds of Mozilla.
For more info on Mozilla, see www.mozilla.org. To submit bugs
or other feedback, see the Navigator QA menu and check out
Bugzilla at http://bugzilla.mozilla.org for links to known
bugs, bug-writing guidelines, and more. You can also get help
with Bugzilla by pointing your IRC client to #mozillazine
at irc.mozilla.org.
==============================================================
Getting Mozilla
==============================================================
You can download nightly builds of Mozilla from the
Mozilla.org FTP site at
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/
For the very latest builds, see
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-trunk
Keep in mind that nightly builds, which are used by
Mozilla.org developers for testing, may be buggy. If you are
looking for a more polished version of Mozilla, Mozilla.org
releases Milestone builds of Mozilla every six weeks or so
that you can download from
http://www.mozilla.org/releases
Be sure to read the Mozilla release notes for information
on known problems and installation issues with Mozilla.
The release notes can be found at the preceding URL along
with the milestone releases themselves.
Note: Please use Talkback builds whenever possible. These
builds allow transmission of crash data back to Mozilla
developers, improved crash analysis, and posting of crash
information to our crash-data newsgroup.
==============================================================
System Requirements
==============================================================
*All Platforms
To view and use the new streamlined "Modern" theme,
your display monitor should be set to display
thousands of colors. For users who cannot set their
displays to use more than 256 colors, Mozilla.org
recommends using the "Classic" theme for Mozilla.
To select the Modern theme after you have installed
Mozilla, from the Navigator browser, open the View
menu, and then open then open the Apply Theme submenu
and choose Modern.
*Mac OS
-Mac OS X or later
-PowerPC processor (266 MHz or faster recommended)
-64 MB RAM
-36 MB of free hard disk space
*Windows
-Windows 95, 98, Me, NT4, 2000 or XP
-Intel Pentium class processor (233 MHz or faster
recommended)
-64 MB RAM
-26 MB free hard disk space
*Linux
-The following library versions (or compatible) are
required: glibc 2.1, XFree86 3.3.x, GTK 1.2.x, Glib
1.2.x, Libstdc++ 2.9.0. Red Hat Linux 6.0,
Debian 2.1, and SuSE 6.2 (or later) installations
should work.
-Red Hat 6.x users who want to install the Mozilla
RPM must have at least version 4.0.2 of rpm
installed.
-Intel Pentium class processor (233 MHz or faster
recommended)
-64MB RAM
-26MB free hard disk space
==============================================================
Installation Instructions
==============================================================
For Mac OS and Windows users, it is strongly recommended that
you exit all programs before running the setup program. Also,
you should temporarily disable virus-detection software.
For Linux users, note that the installation instructions use
the bash shell. If you're not using bash, adjust the commands
accordingly.
For all platforms, install into a clean (new) directory.
Installing on top of previously released builds may cause
problems.
Note: These instructions do not tell you how to build Mozilla.
For info on building the Mozilla source, see
http://www.mozilla.org/source.html
Windows Installation Instructions
---------------------------------
Note: For Windows NT/2000/XP systems, you need Administrator
privileges to install Mozilla. If you see an "Error 5" message
during installation, make sure you're running the installation
with Administrator privileges.
To install Mozilla by downloading the Mozilla installer,
follow these steps:
1. Click the the mozilla-win32-installer.exe link on
the site you're downloading Mozilla from to download
the installer file to your machine.
2. Navigate to where you downloaded the file and
double-click the Mozilla program icon on your machine
to begin the Setup program.
3. Follow the on-screen instructions in the setup
program. The program starts automatically the first
time.
To install Mozilla by downloading the .zip file and
installing manually, follow these steps:
1. Click the mozilla-win32-talkback.zip link or the
mozilla-win32.zip link on the site you're down-
loading Mozilla from to download the .zip file to
your machine.
2. Navigate to where you downloaded the file and
double-click the compressed file.
Note: This step assumes you already have a recent
version of WinZip installed, and that you know how to
use it. If not, you can get WinZip and information
about the program at www.winzip.com.
3. Extract the .zip file to a directory such as
C:\Program Files\mozilla.org\Mozilla.
4. To start Mozilla, navigate to the directory you
extracted Mozilla to and double-click the Mozilla.exe
icon.
Mac OS X Installation Instructions
----------------------------------
To install Mozilla by downloading the Mozilla disk image,
follow these steps:
1. Click the mozilla-mac-MachO.dmg.gz link to download
it to your machine. By default, the download file is
downloaded to your desktop.
2. Once you have downloaded the .dmg.gz file, drag it
onto Stuffit Expander to decompress it. If the disk
image doesn't mount automatically, double-click on the
.dmg file to mount it. If that fails, and the file
does not look like a disk image file, do a "Show Info"
on the file, and, in the "Open with application"
category, choose Disk Copy. In Mac OS 10.2, you can
use "Open with" from the context menu.
3. Once the disk image mounts, open it, and drag the
Mozilla icon onto your hard disk.
4. We recommend that you copy it to the Applications
folder.
5. Now Eject the disk image.
6. If you like, you can drag Mozilla to your dock to
have it easily accessible at all times. You might also
wish to select Mozilla as your default browser in the
Internet system preferences pane (under the Web tab).
Linux Installation Instructions
-------------------------------
Note: If you install in the default directory (which is
usually /usr/local/mozilla), or any other directory where
only the root user normally has write-access, you must
start Mozilla first as root before other users can start
the program. Doing so generates a set of files required
for later use by other users.
To install Mozilla by downloading the Mozilla installer,
follow these steps:
1. Create a directory named mozilla (mkdir mozilla)
and change to that directory (cd mozilla).
2. Click the link on the site you're downloading
Mozilla from to download the installer file
(called mozilla-1686-pc-linux-gnu-installer.tar.gz)
to your machine.
3. Change to the mozilla directory (cd mozilla) and
decompress the archive with the following command:
tar zxvf moz*.tar.gz
The installer is now located in a subdirectory of
Mozilla named mozilla-installer.
4. Change to the mozilla-installer directory
(cd mozilla-installer) and run the installer with the
./mozilla-installer command.
5. Follow the instructions in the install wizard for
installing Mozilla.
Note: If you have a slower machine, be aware that the
installation may take some time. In this case, the
installation progress may appear to hang indefinitely,
even though the installation is still in process.
6. To start Mozilla, change to the directory where you
installed it and run the ./mozilla command.
To install Mozilla by downloading the tar.gz file:
1. Create a directory named "mozilla" (mkdir mozilla)
and change to that directory (cd mozilla).
2. Click the link on the site you're downloading
Mozilla from to download the non-installer
(mozilla*.tar.gz) file into the mozilla directory.
3. Change to the mozilla directory (cd mozilla) and
decompress the file with the following command:
tar zxvf moz*.tar.gz
This creates a "mozilla" directory under your mozilla
directory.
4. Change to the mozilla directory (cd mozilla).
5. Run Mozilla with the following run script:
./mozilla
To hook up Mozilla complete with icon to the GNOME Panel,
follow these steps:
1. Click the GNOME Main Menu button, open the Panel menu,
and then open the Add to Panel submenu and choose Launcher.
2. Right-click the icon for Mozilla on the Panel and
enter the following command:
directory_name./mozilla
where directory_name is the name of the directory
you downloaded mozilla to. For example, the default
directory that Mozilla suggests is /usr/local/mozilla.
3. Type in a name for the icon, and type in a comment
if you wish.
4. Click the icon button and type in the following as
the icon's location:
directory_name/icons/mozicon50.xpm
where directory name is the directory where you
installed Mozilla. For example, the default directory
is /usr/local/mozilla/icons/mozicon50.xpm.

View File

@@ -0,0 +1,2 @@
Pursuant to section 3.3 of the MPL, this file will contain a list of the files
that have been modified by IBM Corporation.

View File

@@ -1,239 +0,0 @@
================================================================================
= = = = = = = = = = = = = = Mozilla Read Me = = = = = = = = = = = = = = = =
================================================================================
Mozilla is subject to the terms detailed in the license agreement accompanying
it.
This Read Me file contains information about system requirements and
installation instructions for the OS/2 build of Mozilla.
For more info on Mozilla, see http://www.mozilla.org. For more info on the OS/2
port see http://www.mozilla.org/ports/os2. To submit bugs or other feedback
check out Bugzilla at https://bugzilla.mozilla.org for links to known bugs,
bug-writing guidelines, and more. You can also get help with Bugzilla by
pointing your IRC client to #mozillazine at irc.mozilla.org, OS/2 specific
problems are discussed in #warpzilla and in the newsgroup
netscape.public.mozilla.os2 on news.mozilla.org and other newsservers.
================================================================================
Getting Mozilla
================================================================================
Official Milestone builds of Mozilla are published on the release page at
http://www.mozilla.org/releases
OS/2 releases are not created by Mozilla.org staff and may appear on the page
http://www.mozilla.org/ports/os2 before the releases page. Be sure to read the
Mozilla release notes linked on the releases page for information on known
problems and installation issues with Mozilla.
================================================================================
System Requirements
================================================================================
*All Platforms
To view and use the "Modern" theme, your display monitor should be set to
display thousands of colors. For users who cannot set their displays to use
more than 256 colors, Mozilla.org recommends using the "Classic" theme for
Mozilla.
To select the Modern theme after you have installed Mozilla, from the
Navigator browser, open the View menu, and then open then open the Apply
Theme submenu and choose Modern.
*OS/2
- This release requires updated C runtime DLLs (libc-0.5.1) from
http://www.innotek.de/products/gccos2/download/gccos2download_e.html
in order to run. By default the installation routine places them in
\OS2\DLL on your bootdrive, but you can put them in the same directory as
Mozilla's executable, or somewhere else in your LIBPATH. The Mozilla
installer will not install the C runtime DLLs for you but requires them to
run.
- Minimum hardware requirements
+ Pentium class processor
+ 64 MiB RAM plus 64 MiB free swap space
+ 35 MiB free harddisk space for installation
plus storage space for disk cache and mail
- Recommended hardware for acceptable performance
+ 500 MHz processor
+ 256 MiB RAM plus 64 MiB free swap space
NOTE: Mozilla's performance and stability increases the more physical RAM
is available. Especially for long browsing and IRC sessions 512 MiB of
memory is recommended.
- Software requirements
+ Installation on a file system supporting long file names
(i.e. HPFS or JFS but not FAT)
+ OS/2 Warp 4 with Fixpack 15 or later
+ MPTS version 5.3
+ TCP/IP version 4.1
+ INETVER: SOCKETS.SYS=5.3007, AFOS2.SYS=5.3001, AFINET.SYS=5.3006
NOTE: Do not attempt to use MPTS & TCP/IP versions below these INETVER
levels. Although Mozilla may seem to start and run normally with older
stacks, some features Mozilla needs are not implemented correctly in
older MPTS versions, which may result in crashes and data loss.
+ Convenience Pack 2 or eComStation 1.0 or later meet these requirements
out of the box.
================================================================================
Installation Instructions
================================================================================
For all platforms, install into a clean (new) directory. Installing on top of
previously released builds may cause problems if a ZIP package is used instead
of an installer EXE.
Note: These instructions do not tell you how to build Mozilla.
For info on building the Mozilla source, see
http://www.mozilla.org/build/
OS/2 Installation Instructions
------------------------------
To install Mozilla by downloading the Mozilla installer, follow these steps:
1. Click the "Installer" link on the site you're downloading Mozilla
from to download the installer file to your machine. This file is typically
called mozilla-os2-*-installer.exe where the "*" is replaced by the Mozilla
version.
2. Navigate to where you downloaded the file, make sure that the C library
DLLs are copied to the same directory or installed in the LIBPATH, and
double-click on the the Mozilla installer object to start the Setup
program.
3. Follow the on-screen instructions in the setup program. The program
automatically ends any running Mozilla sessions and creates a Mozilla
folder on the Desktop. To start Mozilla the first time, again make sure
that the C library DLLs are copied to the installation directory or
installed in the LIBPATH and then double-click the Mozilla program object
inside this folder.
To install Mozilla by downloading the .zip file and installing manually,
follow these steps:
1. Click the "Zip" link on the site you're downloading Mozilla from to
download the ZIP package to your machine. This file is typically called
mozilla-os2-*.zip where the "*" is replaced by the Mozilla version.
2. Navigate to where you downloaded the file and unpack it using your
favorite unzip tool.
3. Keep in mind that the unzip process creates a directory "mozilla" below
the location you point it to, i.e.
unzip mozilla-os2-1.7.5.zip -d c:\mozilla-1.7.5
will unpack Mozilla into c:\mozilla-1.7.5\mozilla.
4. Make sure that you are _not_ unpacking over an old installation. This is
known to cause problems.
5. To start Mozilla, navigate to the directory you extracted Mozilla to,
make sure that the C library DLLs are copied to the installation directory
or installed in the LIBPATH, and then double-click the Mozilla.exe object.
Running multiple versions of Mozilla concurrently
-------------------------------------------------
Because various members of the Mozilla family (i.e. Mozilla, Firefox,
Thunderbird, IBM Web Browser) may use different, incompatible versions of the
same DLL, some extra steps may be required to run them concurrently.
One workaround is the LIBPATHSTRICT variable. To run Mozilla based applications
one can create a CMD script like the following example (where an installation of
Mozilla exists in the directory d:\internet\mozilla is assumed):
set LIBPATHSTRICT=T
rem The next line may be needed when a different Mozilla program is listed in LIBPATH
rem set BEGINLIBPATH=d:\internet\mozilla
rem The next line is only needed to run two versions of the same program
rem set MOZ_NO_REMOTE=1
d:
cd d:\internet\mozilla
mozilla.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
Similarly, one can create a program object to start Mozilla using the following
settings:
Path and file name: *
Parameters: /c set LIBPATHSTRICT=T & .\mozilla.exe "%*"
Working directory: d:\internet\mozilla
(One might need to add MOZ_NO_REMOTE and/or BEGINLIBPATH as in the CMD script
above depending on the system configuration.)
Finally, the simplest method is to use the Run! utility by Rich Walsh that can
be found in the Hobbes Software Archive:
http://hobbes.nmsu.edu/cgi-bin/h-search?key=Run!
Read its documentation for more information.
Separating profiles from installation directory
-----------------------------------------------
To separate the locations of the user profile(s) (containing the bookmarks and
all customizations) from the installation directory to keep your preferences in
the case of an update even when using ZIP packages, set the variable
MOZILLA_HOME to a directory of your choice. You can do this either in
Config.sys or in a script or using a program object as listed above. If you add
set MOZILLA_HOME=f:\Data
the user profile(s) will be created in "f:\Data\Mozilla\Profiles".
Other important environment variables
-------------------------------------
There are a few enviroment variables that can be used to control special
behavior of Mozilla on OS/2:
- set NSPR_OS2_NO_HIRES_TIMER=1
This causes Mozilla not to use OS/2's high resolution timer. Set this if other
applications using the high resolution timer (multimedia apps) act strangely.
- set MOZILLA_USE_EXTENDED_FT2LIB=T
If you have the Innotek Font Engine installed this variable enables special
functions in Mozilla to handle unicode characters.
- set MOZ_NO_REMOTE=1
Use this to run two instances of Mozilla simultaneously (e.g. debug and
optimized version).
Find more information on this topic and other tips on
http://www.os2bbs.com/os2news/Warpzilla.html
Known Problems of the OS/2 version
----------------------------------
Cross-platform problems are usually listed in the release notes of each
milestone release.
- Bug 167884, "100% CPU load when viewing site [tiling transparent PNG]":
https://bugzilla.mozilla.org/show_bug.cgi?id=167884
On OS/2, Mozilla is known to have very slow performance on websites that use
small, repeated images with transparency for their layout.
Other known problems can be found by following the link "Current Open Warpzilla
Bugs" on the OS/2 Mozilla page <http://www.mozilla.org/ports/os2/>.

View File

@@ -1,39 +1,23 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 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/
#
# 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.
# 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.
# 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):
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of 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 *****
DEPTH = ..
topsrcdir = @top_srcdir@
@@ -42,7 +26,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
DIRS = public src build
include $(topsrcdir)/config/rules.mk

File diff suppressed because it is too large Load Diff

View File

@@ -1,44 +1,27 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 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/
#
# 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.
# 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.
# 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):
# John Gaunt (jgaunt@netscape.com)
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of 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 *****
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
@@ -46,47 +29,29 @@ include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
LIBRARY_NAME = accessibility
EXPORT_LIBRARY = 1
ifneq ($(OS_ARCH),WINNT)
SHORT_LIBNAME = access
endif
IS_COMPONENT = 1
MODULE_NAME = nsAccessibilityModule
GRE_MODULE = 1
LIBXUL_LIBRARY = 1
PACKAGE_FILE = accessibility.pkg
REQUIRES = xpcom \
$(NULL)
REQUIRES = xpcom string dom
CPPSRCS = nsAccessibilityFactory.cpp
LOCAL_INCLUDES = -I$(srcdir)/../src
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)accessibility_base_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)accessibility_html_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)accessibility_toolkit_s.$(LIB_SUFFIX) \
$(NULL)
ifdef MOZ_XUL
SHARED_LIBRARY_LIBS += $(DIST)/lib/$(LIB_PREFIX)accessibility_xul_s.$(LIB_SUFFIX)
endif
$(DIST)/lib/libaccessibility_s.$(LIB_SUFFIX) \
$(NULL)
EXTRA_DSO_LIBS = \
gkgfx \
$(NULL)
gkconshared_s \
$(NULL)
EXTRA_DSO_LDOPTS = \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS)
endif
$(MOZ_COMPONENT_LIBS) \
-L$(DIST)/lib \
$(EXTRA_DSO_LIBS) \
-lgkgfx \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -1,18 +0,0 @@
[gecko]
#if SHARED_LIBRARY
dist/bin/components/@SHARED_LIBRARY@
#else
!staticcomp @LIBRARY@ @MODULE_NAME@
#endif
!xpt dist/bin/components/accessibility.xpt
#if MOZ_WIDGET_TOOLKIT==windows
!xpt dist/bin/components/accessibility-msaa.xpt
#elif MOZ_WIDGET_TOOLKIT==gtk2
!xpt dist/bin/components/accessibility-atk.xpt
#endif
# xxxbsmedberg why is this in the browser, but the other stuff in gecko?
[xpfe-browser browser]
#if MOZ_WIDGET_TOOLKIT==windows
dist/bin/AccessibleMarshal.dll
#endif

View File

@@ -0,0 +1,46 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
MODULE=accessibility
LIBRARY_NAME=accessibility
MODULE_NAME=nsAccessibilityModule
CPP_OBJS=\
.\$(OBJDIR)\nsAccessibilityFactory.obj \
$(NULL)
LINCS = $(LINCS) -I..\src # for implementation headers
SUB_LIBRARIES=\
$(DIST)\lib\accessibility_s.lib \
$(NULL)
LLIBS=\
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\timer_s.lib \
$(DIST)\lib\gkgfx.lib \
$(DIST)\lib\contentshared_s.lib \
$(LIBNSPR) \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,39 +1,24 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
/* -*- 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/
* 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.
* 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.
* 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
* either of 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 ***** */
* Contributor(s):
*/
#include "nsCOMPtr.h"
#include "nsIModule.h"
@@ -42,7 +27,6 @@
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"
#include "nsIAccessibilityService.h"
#include "nsIAccessibleRetrieval.h"
#include "nscore.h"
static NS_IMETHODIMP
@@ -51,9 +35,9 @@ NS_ConstructAccessibilityService(nsISupports *aOuter, REFNSIID aIID, void **aRes
nsresult rv;
NS_ASSERTION(aOuter == nsnull, "no aggregation");
nsIAccessibilityService* accessibility;
rv = NS_GetAccessibilityService(&accessibility);
rv = NS_NewAccessibilityService(&accessibility);
if (NS_FAILED(rv)) {
NS_ERROR("Unable to construct accessibility service");
NS_ERROR("Unable to construct chrome registry");
return rv;
}
rv = accessibility->QueryInterface(aIID, aResult);
@@ -63,20 +47,14 @@ NS_ConstructAccessibilityService(nsISupports *aOuter, REFNSIID aIID, void **aRes
}
// The list of components we register
static const nsModuleComponentInfo components[] =
static nsModuleComponentInfo components[] =
{
{ "AccessibilityService",
NS_ACCESSIBILITY_SERVICE_CID,
"@mozilla.org/accessibilityService;1",
NS_ConstructAccessibilityService
},
{ "AccessibleRetrieval",
NS_ACCESSIBLE_RETRIEVAL_CID,
"@mozilla.org/accessibleRetrieval;1",
NS_ConstructAccessibilityService
},
};
NS_IMPL_NSGETMODULE(nsAccessibilityModule, components)
NS_IMPL_NSGETMODULE(nsAccessibilityModule, components);

Binary file not shown.

Binary file not shown.

View File

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

View File

@@ -0,0 +1,2 @@
nsIAccessibilityService.idl
nsIAccessible.idl

View File

@@ -1,39 +1,23 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 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/
#
# 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.
# 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.
# 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):
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of 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 *****
DEPTH = ../..
topsrcdir = @top_srcdir@
@@ -42,33 +26,20 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
DIRS = atk
else
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
DIRS = msaa
endif
endif
MODULE = accessibility
XPIDL_MODULE= accessibility
GRE_MODULE = 1
XPIDLSRCS = \
nsIAccessibilityService.idl \
nsIAccessibleRetrieval.idl \
nsIAccessible.idl \
nsPIAccessible.idl \
nsIAccessibleCaret.idl \
nsIAccessibleDocument.idl \
nsPIAccessibleDocument.idl \
nsIAccessibleProvider.idl \
nsIAccessibleSelectable.idl \
nsIAccessibleTreeCache.idl \
nsIAccessNode.idl \
nsPIAccessNode.idl \
nsIAccessibleEvent.idl \
nsIAccessibleEventReceiver.idl \
nsIAccessibleEventListener.idl \
nsIAccessibleSelectable.idl \
$(NULL)
EXPORTS = \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -1,60 +0,0 @@
#
# ***** 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.org code.
#
# The Initial Developer of the Original Code is
# Sun Microsystems, Inc.
# Portions created by the Initial Developer are Copyright (C) 2003
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of 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 *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
XPIDL_MODULE = accessibility-atk
GRE_MODULE = 1
XPIDLSRCS = \
nsIAccessibleAction.idl \
nsIAccessibleEditableText.idl \
nsIAccessibleHyperLink.idl \
nsIAccessibleHyperText.idl \
nsIAccessibleTable.idl \
nsIAccessibleText.idl \
nsIAccessibleValue.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -1,66 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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):
* Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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"
[scriptable, uuid(829B36D4-125A-4279-ABC4-87D834664F82)]
interface nsIAccessibleAction : nsISupports
{
readonly attribute long actions;
boolean doAction (in long index);
AString getDescription (in long index);
void getDescriptionConst (in long index,
[shared, retval] out string description);
AString getKeyBinding (in long index);
void getKeyBindingConst (in long index,
[shared, retval] out string keyBinding);
};
/*
Assumptions:
string is a UTF-8 or most likely ASCII
encoding.
*/

View File

@@ -1,68 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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):
* Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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"
[scriptable, uuid(91F0A56C-11BE-47C7-8D02-7C15E00C05F5)]
interface nsIAccessibleEditableText : nsISupports
{
/**
* Set font styles, such as italic, bold...
*/
void setAttributes (in long startPos, in long endPos,
in nsISupports attributes);
void setTextContents (in AString text);
void insertText (in AString text, in long position);
void copyText (in long startPos, in long endPos);
void cutText (in long startPos, in long endPos);
void deleteText (in long startPos, in long endPos);
void pasteText (in long position);
};
/*
Assumptions:
selectAttributes method takes an nsISupports parameter.
'set' methods throw exception on failure.
'wstring' inputs are potentially multibyte (UTF-16 for
instance); 'string' and UTF-8 may be a better choice.
*/

View File

@@ -1,76 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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):
* Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 nsIURI;
interface nsIAccessible;
[scriptable, uuid(a492c7d6-1dd1-11b2-9bc0-80614884799a)]
interface nsIAccessibleHyperLink : nsISupports
{
readonly attribute long anchors;
readonly attribute long startIndex;
readonly attribute long endIndex;
nsIURI getURI (in long i);
nsIAccessible getObject (in long i);
boolean isValid ();
boolean isSelected ();
};
/*
Assumptions:
The object associated with object or anchor index
is an nsIAccessible.
A URI can be represented by the nsIURI interface
(or nsIURL interface).
Note that an object which supports nsIAccessibleHyperlink
does *not* generally implement nsIAccessible, unlike the
case of the other nsiAccessible* interfaces in this directory.
Aaron: would the nsISupports return from
getObject be queryable for nsIURI and nsIURL directly?
*/

View File

@@ -1,54 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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):
* Bill Haneman (bill.haneman@sun.com)
* Paul Sandoz (paul.sandoz@sun.com)
* John Gaunt (jgaunt@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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"
#include "nsIAccessibleHyperLink.idl"
[scriptable, uuid(8f18d922-1dd2-11b2-82ea-829b78a44413)]
interface nsIAccessibleHyperText : nsISupports
{
readonly attribute long links;
nsIAccessibleHyperLink getLink (in long index);
long getLinkIndex (in long charIndex);
long getSelectedLinkIndex ();
};

View File

@@ -1,82 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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):
* Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 nsIAccessible;
[scriptable, uuid(0A7E98A9-CA7D-42F0-BFE1-2CFC35256038)]
interface nsIAccessibleTable : nsISupports
{
attribute nsIAccessible caption;
attribute AString summary;
readonly attribute long columns;
readonly attribute nsIAccessibleTable columnHeader;
readonly attribute long rows;
readonly attribute nsIAccessibleTable rowHeader;
void getSelectedColumns (out unsigned long columnsSize,
[retval, array, size_is(columnsSize)] out long columns);
void getSelectedRows (out unsigned long rowsSize,
[retval, array, size_is(rowsSize)] out long rows);
/**
* gets a cell
*/
nsIAccessible cellRefAt (in long row, in long column);
/**
* get an index
*/
long getIndexAt (in long row, in long column);
long getColumnAtIndex (in long index);
long getRowAtIndex (in long index);
long getColumnExtentAt (in long row, in long column);
long getRowExtentAt (in long row, in long column);
AString getColumnDescription (in long column);
AString getRowDescription (in long row);
boolean isColumnSelected (in long column);
boolean isRowSelected (in long row);
boolean isCellSelected (in long row, in long column);
};

View File

@@ -1,144 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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):
* Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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"
typedef long nsAccessibleTextBoundary;
typedef long nsAccessibleCoordType;
[scriptable, uuid(E44D3FA6-9CB2-432A-8BDB-69D72B6ADA00)]
interface nsIAccessibleText : nsISupports
{
const nsAccessibleTextBoundary BOUNDARY_CHAR = 0;
const nsAccessibleTextBoundary BOUNDARY_WORD_START = 1;
const nsAccessibleTextBoundary BOUNDARY_WORD_END = 2;
const nsAccessibleTextBoundary BOUNDARY_SENTENCE_START = 3;
const nsAccessibleTextBoundary BOUNDARY_SENTENCE_END = 4;
const nsAccessibleTextBoundary BOUNDARY_LINE_START = 5;
const nsAccessibleTextBoundary BOUNDARY_LINE_END = 6;
const nsAccessibleTextBoundary BOUNDARY_ATTRIBUTE_RANGE = 7;
const nsAccessibleCoordType COORD_TYPE_SCREEN = 0;
const nsAccessibleCoordType COORD_TYPE_WINDOW = 1;
attribute long caretOffset;
readonly attribute long characterCount;
readonly attribute long selectionCount;
/**
* String methods may need to return multibyte-encoded strings,
* since some locales can't be encoded using 16-bit chars.
* So the methods below might return UTF-16 strings, or they could
* return "string" values which are UTF-8.
*/
AString getText (in long startOffset, in long endOffset);
AString getTextAfterOffset (in long offset,
in nsAccessibleTextBoundary boundaryType,
out long startOffset,
out long endOffset);
AString getTextAtOffset (in long offset,
in nsAccessibleTextBoundary boundaryType,
out long startOffset,
out long endOffset);
AString getTextBeforeOffset (in long offset,
in nsAccessibleTextBoundary boundaryType,
out long startOffset,
out long endOffset);
/**
* It would be better to return an unsigned long here,
* to allow unicode chars > 16 bits
*/
wchar getCharacterAtOffset (in long offset);
nsISupports getAttributeRange (in long offset,
out long rangeStartOffset,
out long rangeEndOffset);
void getCharacterExtents (in long offset,
out long x,
out long y,
out long width,
out long height,
in nsAccessibleCoordType coordType);
long getOffsetAtPoint (in long x, in long y,
in nsAccessibleCoordType coordType);
void getSelectionBounds (in long selectionNum,
out long startOffset,
out long endOffset);
void setSelectionBounds (in long selectionNum,
in long startOffset,
in long endOffset);
void addSelection (in long startOffset, in long endOffset);
void removeSelection (in long selectionNum);
};
/*
Assumptions:
Using wstring (UCS2) instead of string encoded in UTF-8.
Multibyte encodings (or at least potentially multi-byte
encodings) would be preferred for the reasons cited above.
The following methods will throw an exception on failure
(since not every text component will allow every operation):
setSelectionBounds, addSelection, removeSelection, setCaretOffset.
getRangeAttributes defined to return an nsISupports
interface instead of a pango specific data structure.
It may be that some other return type is more appropriate
for mozilla text attributes.
we assume that all text components support the idea of
a caret offset, whether visible or "virtual". If this
isn't the case, caretOffset can be made readonly and
a setCaretOffset method provided which throws an exception
on failure (as with *selection methods above).
*/

View File

@@ -1,74 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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):
* John Gaunt (jgaunt@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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"
[scriptable, uuid(F4ABBC2F-0F28-47DC-A9E9-F7A1719AB2BE)]
interface nsIAccessibleValue : nsISupports
{
readonly attribute double maximumValue;
readonly attribute double minimumValue;
readonly attribute double currentValue;
/**
* We want to be able to return a success condition of the value
* getting set. ie if the value is not within the interval of
* minimumValue-maximumValue
*/
boolean setCurrentValue (in double value);
};
/*
Assumptions:
The attribute currentValue will throw an exception
if it cannot be set i.e. if the value is not a
member of the interval.
This may not be the 'desired' behaviour given gObject
equivalent. Thus it could be changed to be:
readonly attribute double currentValue;
boolean setCurrentValue (double long value);
GValue can represent many basic types.
Since this interface is designed to represent
an interval and a member of double should
cover the cases of char int and float.
*/

View File

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

View File

@@ -1,25 +0,0 @@
#include <rpcproxy.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_PROXY_FILE( ISimpleDOMDocument )
EXTERN_PROXY_FILE( ISimpleDOMNode )
EXTERN_PROXY_FILE( ISimpleDOMText )
PROXYFILE_LIST_START
/* Start of list */
REFERENCE_PROXY_FILE( ISimpleDOMDocument ),
REFERENCE_PROXY_FILE( ISimpleDOMNode ),
REFERENCE_PROXY_FILE( ISimpleDOMText ),
/* End of list */
PROXYFILE_LIST_END
DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
#ifdef __cplusplus
} /*extern "C" */
#endif

View File

@@ -1,7 +0,0 @@
LIBRARY AccessibleMarshal.dll
DESCRIPTION 'ISimpleDOM* proxy/stub DLLs - allows cross-process communication'
EXPORTS DllGetClassObject @1 PRIVATE
DllCanUnloadNow @2 PRIVATE
DllRegisterServer @4 PRIVATE
DllUnregisterServer @5 PRIVATE

View File

@@ -1,126 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.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):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 ***** */
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("//")
cpp_quote("// ISimpleDOMDocument")
cpp_quote("//")
cpp_quote("// @STATUS UNDER_REVIEW")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("//")
cpp_quote("// get_URL(out] BSTR *url)")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get the internet URL associated with this document.")
cpp_quote("//")
cpp_quote("// get_title([out BSTR *title")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get the document's title from the <TITLE> element")
cpp_quote("//")
cpp_quote("// get_mimeType([out BSTR *mimeType")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get the registered mime type, such as text/html")
cpp_quote("//")
cpp_quote("// get_docType([out] BSTR *docType")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get doctype associated with the <!DOCTYPE ..> element")
cpp_quote("//")
cpp_quote("// get_nameSpaceURIForID([in] short nameSpaceID, [out] BSTR *nameSpaceURI)")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Some of the methods for ISimpleDOMNode return a nameSpaceID (-1,0,1,2,3,....)")
cpp_quote("// This method returns the associated namespace URI for each ID.")
cpp_quote("//")
cpp_quote("// set_alternateViewMediaTypes([in] BSTR *commaSeparatedMediaType)")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// For style property retrieval on nsISimpleDOMNode elements, ")
cpp_quote("// set the additional alternate media types that properties are available for.")
cpp_quote("// [in] BSTR *commaSeparatedMediaTypes is a comma separate list, for example \"aural, braille\".")
cpp_quote("// The alternate media properties are requested with nsISimpleDOMNode::get_computedStyle.")
cpp_quote("// Note: setting this value on a document will increase memory overhead, and may create a small delay.")
cpp_quote("//")
cpp_quote("// W3C media Types:")
cpp_quote("// * all: Suitable for all devices. ")
cpp_quote("// * aural: Intended for speech synthesizers. See the section on aural style sheets for details. ")
cpp_quote("// * braille: Intended for braille tactile feedback devices. ")
cpp_quote("// * embossed: Intended for paged braille printers. ")
cpp_quote("// * handheld: Intended for handheld devices - typically small screen, monochrome, limited bandwidth. ")
cpp_quote("// * print: Intended for paged, opaque material and for documents viewed on screen in print preview mode. Please consult the section on paged media for information about formatting issues that are specific to paged media. ")
cpp_quote("// * projection: Intended for projected presentations, for example projectors or print to transparencies. Please consult the section on paged media for information about formatting issues that are specific to paged media. ")
cpp_quote("// * screen: Intended primarily for color computer screens. ")
cpp_quote("// * tty: intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities. Authors should not use pixel units with the tty media type. ")
cpp_quote("// * tv: Intended for television-type devices - low resolution, color, limited-scrollability screens, sound")
cpp_quote("// * See latest W3C CSS specs for complete list of media types")
cpp_quote("//")
cpp_quote("//")
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("")
cpp_quote("")
import "objidl.idl";
import "oaidl.idl";
const long DISPID_DOC_URL = -5904;
const long DISPID_DOC_TITLE = -5905;
const long DISPID_DOC_MIMETYPE = -5906;
const long DISPID_DOC_DOCTYPE = -5907;
const long DISPID_DOC_NAMESPACE = -5908;
const long DISPID_DOC_MEDIATYPES = -5909;
[object, uuid(0D68D6D0-D93D-4d08-A30D-F00DD1F45B24)]
interface ISimpleDOMDocument : IUnknown
{
[propget, id(DISPID_DOC_URL)] HRESULT URL(
[out, retval] BSTR * url
);
[propget, id(DISPID_DOC_TITLE)] HRESULT title(
[out, retval] BSTR * title
);
[propget, id(DISPID_DOC_MIMETYPE)] HRESULT mimeType(
[out, retval] BSTR * mimeType
);
[propget, id(DISPID_DOC_DOCTYPE)] HRESULT docType(
[out, retval] BSTR * docType
);
[propget, id(DISPID_DOC_NAMESPACE)] HRESULT nameSpaceURIForID(
[in] short nameSpaceID,
[out, retval] BSTR * nameSpaceURI
);
[propput, id(DISPID_DOC_MEDIATYPES)] HRESULT alternateViewMediaTypes(
[in] BSTR * commaSeparatedMediaTypes
);
}

View File

@@ -1,216 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.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):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 ***** */
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("//")
cpp_quote("// ISimpleDOMNode")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// An interface that extends MSAA's IAccessible to provide readonly DOM node information via cross-process COM.")
cpp_quote("//")
cpp_quote("// @STATUS UNDER_REVIEW")
cpp_quote("//")
cpp_quote("// get_nodeInfo(")
cpp_quote("// /* [out] */ BSTR *nodeName, // For elements, this is the tag name")
cpp_quote("// /* [out] */ short *nameSpaceID,")
cpp_quote("// /* [out] */ BSTR *nodeValue, ")
cpp_quote("// /* [out] */ unsigned int *numChildren); ")
cpp_quote("// /* [out] */ unsigned int *uniqueID; // In Win32 accessible events we generate, the target's childID matches to this")
cpp_quote("// /* [out] */ unsigned short *nodeType,")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get the basic information about a node.")
cpp_quote("// The namespace ID can be mapped to an URI using nsISimpleDOMDocument::get_nameSpaceURIForID()")
cpp_quote("//")
cpp_quote("// get_attributes(")
cpp_quote("// /* [in] */ unsigned short maxAttribs,")
cpp_quote("// /* [out] */ unsigned short *numAttribs,")
cpp_quote("// /* [out] */ BSTR *attribNames,")
cpp_quote("// /* [out] */ short *nameSpaceID,")
cpp_quote("// /* [out] */ BSTR *attribValues);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Returns 3 arrays - the attribute names and values, and a namespace ID for each")
cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace")
cpp_quote("//")
cpp_quote("// get_attributesForNames(")
cpp_quote("// /* [in] */ unsigned short numAttribs,")
cpp_quote("// /* [in] */ BSTR *attribNames,")
cpp_quote("// /* [in] */ short *nameSpaceID,")
cpp_quote("// /* [out] */ BSTR *attribValues);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Takes 2 arrays - the attribute names and namespace IDs, and returns an array of corresponding values")
cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace")
cpp_quote("//")
cpp_quote("// computedStyle( ")
cpp_quote("// /* [in] */ unsigned short maxStyleProperties,")
cpp_quote("// /* [out] */ unsigned short *numStyleProperties, ")
cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes")
cpp_quote("// /* [out] */ BSTR *styleProperties, ")
cpp_quote("// /* [out] */ BSTR *styleValues);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Returns 2 arrays -- the style properties and their values")
cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)")
cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()")
cpp_quote("//")
cpp_quote("// computedStyleForProperties( ")
cpp_quote("// /* [in] */ unsigned short numStyleProperties, ")
cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes")
cpp_quote("// /* [in] */ BSTR *styleProperties, ")
cpp_quote("// /* [out] */ BSTR *styleValues);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Scroll the current view so that this dom node is visible.")
cpp_quote("// placeTopLeft=TRUE: scroll until the top left corner of the dom node is at the top left corner of the view.")
cpp_quote("// placeTopLeft=FALSE: scroll minimally to make the dom node visible. Don't scroll at all if already visible.")
cpp_quote("//")
cpp_quote("// scrollTo( ")
cpp_quote("// /* [in] */ boolean placeTopLeft); ")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Returns style property values for those properties in the styleProperties [in] array")
cpp_quote("// Returns 2 arrays -- the style properties and their values")
cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)")
cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()")
cpp_quote("//")
cpp_quote("// get_parentNode (/* [out] */ ISimpleDOMNode **newNodePtr);")
cpp_quote("// get_firstChild (/* [out] */ ISimpleDOMNode **newNodePtr);")
cpp_quote("// get_lastChild (/* [out] */ ISimpleDOMNode **newNodePtr);")
cpp_quote("// get_previousSibling(/* [out] */ ISimpleDOMNode **newNodePtr);")
cpp_quote("// get_nextSibling (/* [out] */ ISimpleDOMNode **newNodePtr);")
cpp_quote("// get_childAt (/* [in] */ unsigned childIndex, /* [out] */ ISimpleDOMNode **newNodePtr);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// DOM navigation - get a different node.")
cpp_quote("//")
cpp_quote("// get_innerHTML(/* [out] */ BSTR *htmlText);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Returns HTML of this DOM node's subtree. Does not include the start and end tag for this node/element.")
cpp_quote("//")
cpp_quote("//")
cpp_quote("// get_localInterface(/* [out] */ void **localInterface);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Only available in Gecko's process - casts to an XPCOM nsIAccessNode interface pointer")
cpp_quote("//")
cpp_quote("//")
cpp_quote("// get_language(/* [out] */ BSTR *htmlText);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Returns the computed language for this node, or empty string if unknown.")
cpp_quote("//")
cpp_quote("//")
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("")
cpp_quote("")
import "objidl.idl";
import "oaidl.idl";
const long DISPID_NODE_NODEINFO = -5900;
const long DISPID_NODE_ATTRIBUTES = -5901;
const long DISPID_NODE_ATTRIBUTESFORNAMES = -5902;
const long DISPID_NODE_COMPSTYLE = -5903;
const long DISPID_NODE_COMPSTYLEFORPROPS = -5904;
const long DISPID_NODE_LANGUAGE = -5905;
[object, uuid(1814ceeb-49e2-407f-af99-fa755a7d2607)]
interface ISimpleDOMNode : IUnknown
{
const unsigned short NODETYPE_ELEMENT = 1;
const unsigned short NODETYPE_ATTRIBUTE = 2;
const unsigned short NODETYPE_TEXT = 3;
const unsigned short NODETYPE_CDATA_SECTION = 4;
const unsigned short NODETYPE_ENTITY_REFERENCE = 5;
const unsigned short NODETYPE_ENTITY = 6;
const unsigned short NODETYPE_PROCESSING_INSTRUCTION = 7;
const unsigned short NODETYPE_COMMENT = 8;
const unsigned short NODETYPE_DOCUMENT = 9;
const unsigned short NODETYPE_DOCUMENT_TYPE = 10;
const unsigned short NODETYPE_DOCUMENT_FRAGMENT = 11;
const unsigned short NODETYPE_NOTATION = 12;
[propget, id(DISPID_NODE_NODEINFO)] HRESULT nodeInfo(
[out] BSTR *nodeName, // for performance returns NULL for text nodes (true nodeName would be "#text")
[out] short *nameSpaceID,
[out] BSTR *nodeValue,
[out] unsigned int *numChildren,
[out] unsigned int *uniqueID, // In Win32 accessible events we generate, the target's childID matches to this
[out, retval] unsigned short *nodeType
);
[propget, id(DISPID_NODE_ATTRIBUTES)] HRESULT attributes(
[in] unsigned short maxAttribs,
[out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribNames,
[out, size_is(maxAttribs), length_is(*numAttribs)] short *nameSpaceID,
[out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribValues,
[out, retval] unsigned short *numAttribs
);
[propget, id(DISPID_NODE_ATTRIBUTESFORNAMES)] HRESULT attributesForNames(
[in] unsigned short numAttribs,
[in, size_is(numAttribs), length_is(numAttribs)] BSTR *attribNames,
[in, size_is(numAttribs), length_is(numAttribs)] short *nameSpaceID,
[out, retval, size_is(numAttribs), length_is(numAttribs)] BSTR *attribValues
);
[propget, id(DISPID_NODE_COMPSTYLE)] HRESULT computedStyle(
[in] unsigned short maxStyleProperties,
[in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
[out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleProperties,
[out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleValues,
[out, retval] unsigned short *numStyleProperties
);
[propget, id(DISPID_NODE_COMPSTYLEFORPROPS)] HRESULT computedStyleForProperties(
[in] unsigned short numStyleProperties,
[in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
[in, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleProperties,
[out, retval, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleValues
);
HRESULT scrollTo([in] boolean placeTopLeft);
[propget] HRESULT parentNode([out, retval] ISimpleDOMNode **node);
[propget] HRESULT firstChild([out, retval] ISimpleDOMNode **node);
[propget] HRESULT lastChild([out, retval] ISimpleDOMNode **node);
[propget] HRESULT previousSibling([out, retval] ISimpleDOMNode **node);
[propget] HRESULT nextSibling([out, retval] ISimpleDOMNode **node);
[propget] HRESULT childAt([in] unsigned childIndex,
[out, retval] ISimpleDOMNode **node);
[propget] HRESULT innerHTML([out, retval] BSTR *innerHTML);
[propget, local] HRESULT localInterface([out][retval] void **localInterface);
[propget, id(DISPID_NODE_LANGUAGE)] HRESULT language([out, retval] BSTR *language);
}

View File

@@ -1,113 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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 of 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 ***** */
import "objidl.idl";
import "oaidl.idl";
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("//")
cpp_quote("// ISimpleDOMText")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// An interface that extends MSAA's IAccessible to provide important additional capabilities on text nodes")
cpp_quote("//")
cpp_quote("// @STATUS UNDER_REVIEW")
cpp_quote("//")
cpp_quote("// [propget] domText(/* out,retval */ BSTR *domText")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Similar to IAccessible::get_accName, but does not strip out whitespace characters.")
cpp_quote("// Important for retrieving the correct start/end substring indices to use with other")
cpp_quote("// methods in ISimpleDOMText.")
cpp_quote("//")
cpp_quote("//")
cpp_quote("// get_[un]clippedSubstringBounds(")
cpp_quote("// /* [in] */ unsigned int startIndex,")
cpp_quote("// /* [in] */ unsigned int endIndex,")
cpp_quote("// /* [out] */ int *x,")
cpp_quote("// /* [out] */ int *y,")
cpp_quote("// /* [out] */ int *width,")
cpp_quote("// /* [out] */ int *height);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Both methods get_clippedSubstringBounds and get_unclippedSubstringBounds return the screen pixel")
cpp_quote("// coordinates of the given text substring. The in parameters for start and end indices refer")
cpp_quote("// to the string returned by ISimpleDOMText::get_domText().")
cpp_quote("//")
cpp_quote("//")
cpp_quote("// scrollToSubstring(")
cpp_quote("// /* [in] */ unsigned int startIndex,")
cpp_quote("// /* [in] */ unsigned int endIndex);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// In scrollable views, scrolls to ensure that the specified substring is visible onscreen.")
cpp_quote("// The in parameters for start and end indices refer to the string returned")
cpp_quote("// by ISimpleDOMText::get_domText().")
cpp_quote("//")
cpp_quote("//")
cpp_quote("// [propget] fontFamily(/* out,retval */ BSTR *fontFamily);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Return a single computed font family name, which is better than the comma delineated list")
cpp_quote("// that is returned by the ISimpleDOMNode computed style methods for font-family.")
cpp_quote("// In other words, return something like 'Arial' instead of 'Arial, Helvetica, Sans-serif'.")
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("")
cpp_quote("")
[object, uuid(4e747be5-2052-4265-8af0-8ecad7aad1c0)]
interface ISimpleDOMText: IUnknown
{
// Includes whitespace in DOM
[propget] HRESULT domText([out, retval] BSTR *domText);
HRESULT get_clippedSubstringBounds([in] unsigned int startIndex,
[in] unsigned int endIndex,
[out] int *x,
[out] int *y,
[out] int *width,
[out] int *height);
HRESULT get_unclippedSubstringBounds([in] unsigned int startIndex,
[in] unsigned int endIndex,
[out] int *x,
[out] int *y,
[out] int *width,
[out] int *height);
HRESULT scrollToSubstring([in] unsigned int startIndex,
[in] unsigned int endIndex);
[propget] HRESULT fontFamily([out, retval] BSTR *fontFamily);
};

View File

@@ -1,119 +0,0 @@
# ***** 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.org code
#
# The Initial Developer of the Original Code is
# Aaron Leventhal
# Portions created by the Initial Developer are Copyright (C) 2003
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Chase Phillips <cmp@mozilla.org>
#
# 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 *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
LIBRARY_NAME = AccessibleMarshal
MODULE = accessibility
XPIDL_MODULE = accessibility-msaa
GRE_MODULE = 1
DEFFILE = $(win_srcdir)/AccessibleMarshal.def
include $(DEPTH)/config/autoconf.mk
XPIDLSRCS = \
nsIAccessibleWin32Object.idl \
$(NULL)
DEFINES += -DREGISTER_PROXY_DLL -D_WIN32_WINNT=0x400
GARBAGE += $(MIDL_GENERATED_FILES) done_gen dlldata.c
FORCE_SHARED_LIB = 1
SRCS_IN_OBJDIR = 1
CSRCS = \
AccessibleMarshal.c \
ISimpleDOMNode_p.c \
ISimpleDOMNode_i.c \
ISimpleDOMDocument_p.c \
ISimpleDOMDocument_i.c \
ISimpleDOMText_p.c \
ISimpleDOMText_i.c \
$(NULL)
MIDL_GENERATED_FILES = \
ISimpleDOMNode.h \
ISimpleDOMNode_p.c \
ISimpleDOMNode_i.c \
ISimpleDOMDocument.h \
ISimpleDOMDocument_p.c \
ISimpleDOMDocument_i.c \
ISimpleDOMText.h \
ISimpleDOMText_p.c \
ISimpleDOMText_i.c \
$(NULL)
SRCDIR_CSRCS = $(addprefix $(srcdir)/,$(CSRCS))
OS_LIBS = \
kernel32.lib \
rpcndr.lib \
rpcns4.lib \
rpcrt4.lib \
oleaut32.lib \
$(NULL)
$(MIDL_GENERATED_FILES): done_gen
done_gen: ISimpleDOMNode.idl ISimpleDOMDocument.idl ISimpleDOMText.idl
$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/ISimpleDOMNode.idl
$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/ISimpleDOMDocument.idl
$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/ISimpleDOMText.idl
touch $@
EXPORTS = \
ISimpleDOMNode.h \
ISimpleDOMNode_i.c \
ISimpleDOMDocument.h \
ISimpleDOMDocument_i.c \
ISimpleDOMText.h \
ISimpleDOMText_i.c \
$(NULL)
export:: done_gen
# This marshall dll is also registered in the installer
register::
regsvr32 -s $(DIST)/bin/$(SHARED_LIBRARY)
include $(topsrcdir)/config/rules.mk

View File

@@ -1,46 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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 of 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"
[scriptable, uuid(ca7a3a93-822f-4cdf-8cb4-c52d16b9afc7)]
interface nsIAccessibleWin32Object : nsISupports
{
/** handle to the external window implementing IAccessible */
[noscript] readonly attribute voidPtr hwnd;
};

View File

@@ -1,141 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Original Author: Aaron Leventhal (aaronl@netscape.com)
* 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 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 nsIDOMNode;
interface nsIAccessibleDocument;
/**
* An interface used by in-process accessibility clients
* to get style, window, markup and other information about
* a DOM node. When accessibility is active in Gecko,
* every DOM node can have one nsIAccessNode for each
* pres shell the DOM node is rendered in.
* The nsIAccessNode implementations are instantiated lazily.
* The nsIAccessNode tree for a given dom window
* has a one to one relationship to the DOM tree.
* If the DOM node for this access node is "accessible",
* then a QueryInterface to nsIAccessible will succeed.
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(46820F9B-3088-4046-AB0F-56FDACDC7A82)]
interface nsIAccessNode : nsISupports
{
/**
* The DOM node this nsIAccessNode is associated with.
*/
readonly attribute nsIDOMNode DOMNode;
/**
* The number of DOM children for the DOM node, which
* matches the number of nsIAccessNode children for this
* nsIAccessNode.
*/
readonly attribute long numChildren;
/**
* Get the nth child of this node
* @param childNum Zero-based child index
* @return The nth nsIAccessNode child
*/
nsIAccessNode getChildNodeAt(in long childNum);
/**
* The parent nsIAccessNode
*/
readonly attribute nsIAccessNode parentNode;
/**
* The first nsIAccessNode child
*/
readonly attribute nsIAccessNode firstChildNode;
/**
* The last nsIAccessNode child
*/
readonly attribute nsIAccessNode lastChildNode;
/**
* The previous nsIAccessNode sibling
*/
readonly attribute nsIAccessNode previousSiblingNode;
/**
* The next nsIAccessNode sibling
*/
readonly attribute nsIAccessNode nextSiblingNode;
/**
* The nsIAccessibleDocument that this nsIAccessNode
* resides in.
*/
readonly attribute nsIAccessibleDocument accessibleDocument;
/**
* The innerHTML for the DOM node
* This is a text string of all the markup inside the DOM
* node, not including the start and end tag for the node.
*/
readonly attribute DOMString innerHTML;
/**
* The OS window handle for the window this node
* is being displayed in.
*/
[noscript] readonly attribute voidPtr ownerWindow;
/**
* A unique ID calculated for this DOM node, for the
* purposes of caching and referencing this object.
*/
[noscript] readonly attribute voidPtr uniqueID;
/**
* Retrieve the computed style value for this DOM node, if it is a DOM element.
* Note: the meanings of width, height and other size measurements depend
* on the version of CSS being used. Therefore, for bounds information,
* it is better to use nsIAccessible::accGetBounds.
* @param pseudoElt The pseudo element to retrieve style for, or NULL
* for general computed style information for this node.
* @param propertyName Retrieve the computed style value for this property name,
* for example "border-bottom".
*/
DOMString getComputedStyleValue(in DOMString pseudoElt, in DOMString propertyName);
};

View File

@@ -1,139 +1,56 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 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 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 of 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 ***** */
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "nsIAccessibleRetrieval.idl"
#include "domstubs.idl"
#include "nsIAtom.idl"
#include "domstubs.idl"
#include "nsIAccessible.idl"
interface nsIAccessibleEventListener;
interface nsIDocument;
interface nsIFrame;
interface nsObjectFrame;
interface nsIContent;
interface nsIWeakReference;
[scriptable, uuid(09a39069-a138-40dd-91dd-79ce45742b52)]
interface nsIAccessibilityService : nsIAccessibleRetrieval
[scriptable, uuid(68D9720A-0984-42b6-A3F5-8237ED925727)]
interface nsIAccessibilityService : nsISupports
{
nsIAccessible createOuterDocAccessible(in nsIDOMNode aNode);
nsIAccessible createRootAccessible(in nsIPresShell aShell, in nsIDocument aDocument);
nsIAccessible createHTML4ButtonAccessible(in nsISupports aFrame);
nsIAccessible createXULAlertAccessible(in nsIDOMNode aNode);
nsIAccessible createHTMLAreaAccessible(in nsIWeakReference aPresShell, in nsIDOMNode aDOMNode, in nsIAccessible aAccParent);
nsIAccessible createHTMLBlockAccessible(in nsISupports aFrame);
nsIAccessible createHTMLButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTMLButtonAccessibleXBL(in nsIDOMNode aNode);
nsIAccessible createHTMLAccessibleByMarkup(in nsISupports aFrame, in nsIWeakReference aWeakShell, in nsIDOMNode aDOMNode, in AString aRole);
nsIAccessible createHTMLLIAccessible(in nsISupports aFrame, in nsISupports aBulletFrame, in AString aBulletText);
nsIAccessible createRootAccessible(in nsISupports aPresContext, in nsISupports aFrame);
nsIAccessible createHTMLComboboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
nsIAccessible createHTMLListboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsISupports aPresShell);
nsIAccessible createHTMLCheckboxAccessible(in nsISupports aFrame);
nsIAccessible createHTMLCheckboxAccessibleXBL(in nsIDOMNode aNode);
nsIAccessible createHTMLComboboxAccessible(in nsIDOMNode aNode, in nsIWeakReference aPresShell);
nsIAccessible createHTMLGenericAccessible(in nsISupports aFrame);
nsIAccessible createHTMLGroupboxAccessible(in nsISupports aFrame);
nsIAccessible createHTMLHRAccessible(in nsISupports aFrame);
nsIAccessible createHTMLImageAccessible(in nsISupports aFrame);
nsIAccessible createHTMLLabelAccessible(in nsISupports aFrame);
nsIAccessible createHTMLListboxAccessible(in nsIDOMNode aNode, in nsIWeakReference aPresShell);
nsIAccessible createHTMLObjectFrameAccessible(in nsObjectFrame aFrame);
nsIAccessible createHTMLRadioButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTMLRadioButtonAccessibleXBL(in nsIDOMNode aNode);
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsIWeakReference aPresShell);
nsIAccessible createHTMLButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTML4ButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTMLTextAccessible(in nsISupports aFrame);
nsIAccessible createHTMLImageAccessible(in nsISupports aFrame);
nsIAccessible createHTMLAreaAccessible(in nsIWeakReference aPresShell, in nsIDOMNode aDOMNode, in nsIAccessible aAccParent);
nsIAccessible createHTMLTableAccessible(in nsISupports aFrame);
nsIAccessible createHTMLTableCellAccessible(in nsISupports aFrame);
nsIAccessible createHTMLTableCaptionAccessible(in nsIDOMNode aDOMNode);
nsIAccessible createHTMLTableHeadAccessible(in nsIDOMNode aDOMNode);
nsIAccessible createHTMLTextAccessible(in nsISupports aFrame);
nsIAccessible createHTMLTextFieldAccessible(in nsISupports aFrame);
nsIAccessible createXULButtonAccessible(in nsIDOMNode aNode);
nsIAccessible createXULCheckboxAccessible(in nsIDOMNode aNode);
nsIAccessible createXULColorPickerAccessible(in nsIDOMNode aNode);
nsIAccessible createXULColorPickerTileAccessible(in nsIDOMNode aNode);
nsIAccessible createXULComboboxAccessible(in nsIDOMNode aNode);
nsIAccessible createXULDropmarkerAccessible(in nsIDOMNode aNode);
nsIAccessible createXULGroupboxAccessible(in nsIDOMNode aNode);
nsIAccessible createXULImageAccessible(in nsIDOMNode aNode);
nsIAccessible createXULLinkAccessible(in nsIDOMNode aNode);
nsIAccessible createXULListboxAccessible(in nsIDOMNode aNode);
nsIAccessible createXULListitemAccessible(in nsIDOMNode aNode);
nsIAccessible createXULMenubarAccessible(in nsIDOMNode aNode);
nsIAccessible createXULMenuitemAccessible(in nsIDOMNode aNode);
nsIAccessible createXULMenupopupAccessible(in nsIDOMNode aNode);
nsIAccessible createXULMenuSeparatorAccessible(in nsIDOMNode aNode);
nsIAccessible createXULProgressMeterAccessible(in nsIDOMNode aNode);
nsIAccessible createXULStatusBarAccessible(in nsIDOMNode aNode);
nsIAccessible createXULRadioButtonAccessible(in nsIDOMNode aNode);
nsIAccessible createXULRadioGroupAccessible(in nsIDOMNode aNode);
nsIAccessible createXULSelectOptionAccessible(in nsIDOMNode aNode);
nsIAccessible createXULSelectListAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTabAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTabBoxAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTabPanelsAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTabsAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTextAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTextBoxAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTreeAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTreeColumnsAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTreeColumnitemAccessible(in nsIDOMNode aNode);
nsIAccessible createXULToolbarAccessible(in nsIDOMNode aNode);
nsIAccessible createXULToolbarSeparatorAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTooltipAccessible(in nsIDOMNode aNode);
[noscript] nsIAccessible getAccessible(in nsIDOMNode aNode, in nsIPresShell aPresShell,
in nsIWeakReference aWeakShell,
inout nsIFrame frameHint, out boolean aIsHidden);
/**
* Invalidate the accessibility cache associated with aPresShell, for accessibles
* that were generated for aContainerContent and it's subtree.
* The container content node for the change is passed in, rather than the
* changed presentation for the content node itself.
* @param aPresShell The presShell where changes occured
* @param aChangeContent The affected DOM content
* @param aEvent The event from nsIAccessibleEvent that
* caused the change:
* Must be one of:
* EVENT_REORDER (change),
* EVENT_SHOW (make visible or create) or
* EVENT_HIDE (destroy or hide)
*/
[noscript] void invalidateSubtreeFor(in nsIPresShell aPresShell,
in nsIContent aChangedContent,
in PRUint32 aEvent);
nsIAccessible createHTMLIFrameAccessible(in nsIDOMNode aNode, in nsISupports aPresContext);
nsIAccessible createHTMLBlockAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
nsIAccessible createAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
nsIAccessible getAccessibleFor(in nsIDOMNode aNode);
};
@@ -145,6 +62,6 @@ interface nsIAccessibilityService : nsIAccessibleRetrieval
{ 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } }
extern nsresult
NS_GetAccessibilityService(nsIAccessibilityService** aResult);
NS_NewAccessibilityService(nsIAccessibilityService** aResult);
%}

View File

@@ -1,259 +1,79 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* 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 Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric D Vaughan (evaughan@netscape.com)
* Contributor(s): Aaron Leventhal (aaronl@netscape.com)
* John Gaunt (jgaunt@netscape.com)
* Kyle Yuan (kyle.yuan@sun.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 ***** */
*
* Contributor(s):
* Aaron Leventhal
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIDOMNode.idl"
#include "domstubs.idl"
/**
* A cross-platform interface that supports platform-specific
* accessibility APIs like MSAA and ATK. Contains the sum of what's needed
* to support IAccessible as well as ATK's generic accessibility objects.
* Can also be used by in-process accessibility clients to get information
* about objects in the accessible tree. The accessible tree is a subset of
* nodes in the DOM tree -- such as documents, focusable elements and text.
* Mozilla creates the implementations of nsIAccessible on demand.
* See http://www.mozilla.org/projects/ui/accessibility for more information.
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(DB717DB4-37E9-42F1-A3B0-2579DD7C3814)]
[scriptable, uuid(B26FBE47-9A5F-42a1-822B-082461AE4D6D)]
interface nsIAccessible : nsISupports
{
/**
* Parent node in accessible tree.
*/
readonly attribute nsIAccessible parent;
readonly attribute nsIAccessible accParent;
readonly attribute nsIAccessible accNextSibling;
readonly attribute nsIAccessible accPreviousSibling;
readonly attribute nsIAccessible accFirstChild;
readonly attribute nsIAccessible accLastChild;
/**
* Next sibling in accessible tree
*/
readonly attribute nsIAccessible nextSibling;
readonly attribute long accChildCount;
attribute DOMString accName;
readonly attribute DOMString accValue;
/**
* Previous sibling in accessible tree
*/
readonly attribute nsIAccessible previousSibling;
readonly attribute DOMString accDescription;
readonly attribute unsigned long accRole;
readonly attribute unsigned long accState;
readonly attribute unsigned long accExtState;
/**
* First child in accessible tree
*/
readonly attribute nsIAccessible firstChild;
readonly attribute DOMString accHelp;
readonly attribute nsIAccessible accFocused;
/**
* Last child in accessible tree
*/
readonly attribute nsIAccessible lastChild;
nsIAccessible accGetAt(in long x, in long y);
/**
* Number of accessible children
*/
readonly attribute long childCount;
nsIAccessible accNavigateRight();
nsIAccessible accNavigateLeft();
nsIAccessible accNavigateUp();
nsIAccessible accNavigateDown();
/**
* The 0-based index of this accessible in its parent's list of children,
* or -1 if this accessible does not have a parent.
*/
readonly attribute long indexInParent;
/**
* Accessible name -- the main text equivalent for this node
*/
attribute AString name;
/**
* Accessible value -- a number or a secondary text equivalent for this node
* Widgets that use xhtml2:role can force a value using the valuenow attribute
*/
readonly attribute AString finalValue;
/**
* Accessible description -- long text associated with this node
*/
readonly attribute AString description;
/**
* Provides localized string of accesskey name, such as Alt+D.
* The modifier may be affected by user and platform preferences.
* Usually alt+letter, or just the letter alone for menu items.
*/
readonly attribute AString keyboardShortcut;
/**
* Provides localized string of global keyboard accelerator, such
* as Ctrl+O for Open file
*/
readonly attribute AString keyBinding;
/**
* Natural enumerated accessible role for the associated element.
* The values depend on platform because of variations.
* See the ROLE_* constants defined later in this file.
* This does not take into account xhtml2:role as the finalRole does.
*/
readonly attribute unsigned long role;
/**
* Enumerated accessible role. The values depend on platform because of variations.
* See the ROLE_* constants defined later in this file.
* Widgets can use xhtml2:role to force the final role
*/
readonly attribute unsigned long finalRole;
/**
* Accessible states -- bit field which describes boolean properties of node.
* See the STATE_* constants defined later in this file.
* Widgets that use xhtml2:role can force the state using the attributes
* disabled, etc.
*/
readonly attribute unsigned long finalState;
/**
* Extended accessible states -- second bit field describing node
*/
readonly attribute unsigned long extState;
/**
* Help text associated with node
*/
readonly attribute AString help;
/**
* Focused accessible child of node
*/
readonly attribute nsIAccessible focusedChild;
/**
* Accessible child which contains the coordinate at x,y
*/
nsIAccessible getChildAtPoint(in long x, in long y);
/**
* Nth accessible child using zero-based index or last child if index less than zero
*/
nsIAccessible getChildAt(in long aChildIndex);
/**
* Accessible node geometrically to the right of this one
*/
nsIAccessible getAccessibleToRight();
/**
* Accessible node geometrically to the left of this one
*/
nsIAccessible getAccessibleToLeft();
/**
* Accessible node geometrically above this one
*/
nsIAccessible getAccessibleAbove();
/**
* Accessible node geometrically below this one
*/
nsIAccessible getAccessibleBelow();
/**
* Accessible node related to this one
*/
nsIAccessible getAccessibleRelated(in unsigned long aRelationType);
void getBounds(out long x,
void accGetBounds(out long x,
out long y,
out long width,
out long height);
/**
* Add this accessible to the current selection
*/
void addSelection();
void accAddSelection();
void accRemoveSelection();
void accExtendSelection();
void accTakeSelection();
void accTakeFocus();
/**
* Remove this accessible from the current selection
*/
void removeSelection();
readonly attribute PRUint8 accNumActions;
DOMString getAccActionName(in PRUint8 index);
void accDoAction(in PRUint8 index); // Action number 0 is the default action
/**
* Extend the current selection from its current accessible anchor node
* to this accessible
*/
void extendSelection();
nsIDOMNode accGetDOMNode();
/**
* Select this accessible node only
*/
void takeSelection();
/**
* Focus this accessible node,
* The state STATE_FOCUSABLE indicates whether this node is normally focusable.
* It is the callers responsibility to determine whether this node is focusable.
* accTakeFocus on a node that is not normally focusable (such as a table),
* will still set focus on that node, although normally that will not be visually
* indicated in most style sheets.
*/
void takeFocus();
/**
* The number of accessible actions associated with this accessible
*/
readonly attribute PRUint8 numActions;
/**
* The name of the accessible action at the given zero-based index
*/
AString getActionName(in PRUint8 index);
/**
* Perform the accessible action at the given zero-based index
* Action number 0 is the default action
*/
void doAction(in PRUint8 index);
/**
* Get a pointer to accessibility interface for this node, which is specific
* to the OS/accessibility toolkit we're running on.
*/
[noscript] void getNativeInterface(out voidPtr aOutAccessible);
/**
* MSAA State flags - used for bitfield. More than 1 allowed.
*/
// MSAA State flags - used for bitfield. More than 1 allowed.
const unsigned long STATE_UNAVAILABLE = 0x00000001; // Disabled, maps to opposite of Java ENABLED, Gnome/ATK SENSITIVE?
const unsigned long STATE_SELECTED = 0x00000002;
const unsigned long STATE_FOCUSED = 0x00000004;
@@ -286,358 +106,84 @@ interface nsIAccessible : nsISupports
const unsigned long STATE_PROTECTED = 0x20000000; // Maps to Gnome's *Role* ATK_ROLE_PASSWD_TEXT, nothing for Java?
const unsigned long STATE_HASPOPUP = 0x40000000; // New in MSAA 2.0
// Mapping important states that we don't have to unused alert states on MSAA
// as per discussions with AT vendors. On ATK there will be legitimate states for
// STATE_REQUIRED AND STATE_INVALID
const unsigned long STATE_REQUIRED = STATE_ALERT_LOW;
const unsigned long STATE_IMPORTANT = STATE_ALERT_MEDIUM;
const unsigned long STATE_INVALID = STATE_ALERT_HIGH;
const unsigned long STATE_CHECKABLE = STATE_MARQUEED;
// Extended state flags (for now non-MSAA, for Java and Gnome/ATK support)
// This is only the states that there isn't already a mapping for in MSAA
// See www.accessmozilla.org/article.php?sid=11 for information on the mappings between accessibility API states
const unsigned long STATE_INVALID = 0x00200000; // No explanation given
const unsigned long STATE_ACTIVE = 0x00400000; // This window is currently the active window
const unsigned long STATE_EXPANDABLE = 0x00800000; // An item that can be expanded, such as a tree item with children
const unsigned long STATE_MODAL = 0x01000000; // Must do something with control before leaving it
const unsigned long STATE_MULTI_LINE = 0x02000000; // Edit control that can take multiple lines
const unsigned long STATE_SENSITIVE = 0x04000000; // No explanation given
const unsigned long STATE_RESIZABLE = 0x08000000; // Object can be resized
const unsigned long STATE_SHOWING = 0x10000000; // This object and all of it's ancestors are visible
const unsigned long STATE_SINGLE_LINE = 0x20000000; // This text object can only contain 1 line of text
const unsigned long STATE_TRANSIENT = 0x40000000; // Tells accessibility aid "Don't add event listener - this object doesn't generate any". For example, could be used with higher level containers.
const unsigned long STATE_VERTICAL = 0x80000000; // Especially used for sliders and scrollbars
/**
* Extended state flags (for now non-MSAA, for Java and Gnome/ATK support)
* "Extended state flags" has seperate value space from "MSAA State flags".
*/
const unsigned long EXT_STATE_EDITABLE = 0x00200000; // Used for XUL/HTML input (type = text,password) element
const unsigned long EXT_STATE_ACTIVE = 0x00400000; // This window is currently the active window
const unsigned long EXT_STATE_EXPANDABLE = 0x00800000; // An item that can be expanded, such as a tree item with children
const unsigned long EXT_STATE_MODAL = 0x01000000; // Must do something with control before leaving it
const unsigned long EXT_STATE_MULTI_LINE = 0x02000000; // Edit control that can take multiple lines
const unsigned long EXT_STATE_SENSITIVE = 0x04000000; // No explanation given
const unsigned long EXT_STATE_SHOWING = 0x10000000; // This object and all of it's ancestors are visible
const unsigned long EXT_STATE_SINGLE_LINE = 0x20000000; // This text object can only contain 1 line of text
const unsigned long EXT_STATE_TRANSIENT = 0x40000000; // Tells accessibility aid "Don't add event listener - this object doesn't generate any". For example, could be used with higher level containers.
const unsigned long EXT_STATE_VERTICAL = 0x80000000; // Especially used for sliders and scrollbars
/**
* Relation Types -- most of these come from ATK's atkrelationtype.h
* RELATION_NULL:
* RELATION_CONTROLLED_BY: Controlled by one or more target objects.
* RELATION_CONTROLLER_FOR: Controller for one or more target objects.
* RELATION_LABEL_FOR: Label for one or more target objects.
* RELATION_LABELLED_BY: Labelled by one or more target objects.
* RELATION_MEMBER_OF: Member of a group of one or more target objects.
* RELATION_NODE_CHILD_OF: Cell in a treetable which is displayed because a
* cell in the same col is expanded & identifies it.
* RELATION_FLOWS_TO: Has content that flows logically to another
* object in a sequential way, e.g. text flow.
* RELATION_FLOWS_FROM: Has content that flows logically from another
* object in a sequential way, e.g. text flow.
* RELATION_SUBWINDOW_OF: Subwindow attached to a component but otherwise
* not connected in the UI hierarchy to that component.
* RELATION_EMBEDS: Visually embeds another object's content, i.e.
* this object's content flows around another's content.
* RELATION_EMBEDDED_BY: Inverse of RELATION_EMBEDS; this object's content
* is visually embedded in another object.
* RELATION_POPUP_FOR: Popup for another object.
* RELATION_PARENT_WINDOW_OF: Parent window of another object.
* RELATION_DEFAULT_BUTTON: Part of a form/dialog with a related default button.
* RELATION_DESCRIBED_BY: Described by one or more target objects.
* RELATION_DESCRIPTION_FOR: Description for one or more target objects.
* RELATION_LAST_DEFINED:
*/
const unsigned long RELATION_NUL = 0x00; // ATK_RELATION_NUL
const unsigned long RELATION_CONTROLLED_BY = 0x01; // ATK_RELATION_CONTROLLED_BY
const unsigned long RELATION_CONTROLLER_FOR = 0x02; // ATK_RELATION_CONTROLLER_FOR
const unsigned long RELATION_LABEL_FOR = 0x03; // ATK_RELATION_LABEL_FOR
const unsigned long RELATION_LABELLED_BY = 0x04; // ATK_RELATION_LABELLED_BY
const unsigned long RELATION_MEMBER_OF = 0x05; // ATK_RELATION_MEMBER_OF
const unsigned long RELATION_NODE_CHILD_OF = 0x06; // ATK_RELATION_NODE_CHILD_OF
const unsigned long RELATION_FLOWS_TO = 0x07; // ATK_RELATION_FLOWS_TO
const unsigned long RELATION_FLOWS_FROM = 0x08; // ATK_RELATION_FLOWS_FROM
const unsigned long RELATION_SUBWINDOW_OF = 0x09; // ATK_RELATION_SUBWINDOW_OF
const unsigned long RELATION_EMBEDS = 0x0a; // ATK_RELATION_EMBEDS
const unsigned long RELATION_EMBEDDED_BY = 0x0b; // ATK_RELATION_EMBEDDED_BY
const unsigned long RELATION_POPUP_FOR = 0x0c; // ATK_RELATION_POPUP_FOR
const unsigned long RELATION_PARENT_WINDOW_OF = 0x0d; // ATK_RELATION_PARENT_WINDOW_OF
const unsigned long RELATION_DEFAULT_BUTTON = 0x4000; // MSAA only, no ATK relation
const unsigned long RELATION_DESCRIBED_BY = 0x4001; // MSAA only, no ATK relation
const unsigned long RELATION_DESCRIPTION_FOR = 0x4002; // MSAA only, no ATK relation
%{C++
#ifdef MOZ_ACCESSIBILITY_ATK
enum { RELATION_LAST_DEFINED = 14U };
/**
* The following nsIAccessible roles are translated to ATK_ROLE_UNKNOWN
*
* ROLE_TITLEBAR, ROLE_SOUND, ROLE_CURSOR, ROLE_CARET, ROLE_BORDER,
* ROLE_GROUPING, ROLE_EQUATION, ROLE_COLUMN, ROLE_ROW, ROLE_LINK,
* ROLE_WHITESPACE, ROLE_CLOCK, ROLE_IPADDRESS, ROLE_NOTHING
*
* ROLE_GRIP
* The object represents a special mouse pointer, which allows a user to
* manipulate user interface elements such as windows.
*
* ROLE_HELPBALLOON
* The object displays a Help topic in the form of a ToolTip or Help balloon.
*
* ROLE_PROPERTYPAGE
* The object represents a property sheet.
*
* ROLE_INDICATOR
* The object represents an indicator, such as a pointer graphic pointing to
* the current item.
*
* ROLE_HOTKEYFIELD
* The object represents a hot-key field that allow the user to enter a
* sequence of keystroke.
*
* The following ATK roles have no corresponding nsIAccessible roles. Perhaps
* there are not these types of widget/control in Mozilla, so don't need these
* ATK roles? Or need add some of them?
*
* ATK_ROLE_ARROW
* An arrow in one of the four cardinal directions.
*
* ATK_ROLE_INTERNAL_FRAME
* A frame-like object that is clipped by a desktop pane.
*
* ATK_ROLE_ACCEL_LABEL, ATK_ROLE_CANVAS, ATK_ROLE_CHECK_MENU_ITEM,
* ATK_ROLE_COLOR_CHOOSER, ATK_ROLE_DATE_EDITOR, ATK_ROLE_DESKTOP_ICON,
* ATK_ROLE_DESKTOP_FRAME, ATK_ROLE_DIRECTORY_PANE, ATK_ROLE_FILE_CHOOSER,
* ATK_ROLE_FILLER, ATK_ROLE_FONT_CHOOSER, ATK_ROLE_GLASS_PANE,
* ATK_ROLE_HTML_CONTAINER, ATK_ROLE_ICON, ATK_ROLE_LAYERED_PANE,
* ATK_ROLE_POPUP_MENU, ATK_ROLE_OPTION_PANE, ATK_ROLE_PASSWORD_TEXT,
* ATK_ROLE_RADIO_MENU_ITEM, ATK_ROLE_ROOT_PANE, ATK_ROLE_SCROLL_PANE,
* ATK_ROLE_SPLIT_PANE, ATK_ROLE_TEAR_OFF_MENU_ITEM, ATK_ROLE_TERMINAL,
* ATK_ROLE_TOGGLE_BUTTON, ATK_ROLE_TREE_TABLE, ATK_ROLE_VIEWPORT, ATK_ROLE_LABEL
*
* Important:
* Following value should keep synchronization with the definitions in atk.h
*/
enum { ROLE_TITLEBAR = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_MENUBAR = 33U }; // ATK_ROLE_MENU_BAR
enum { ROLE_SCROLLBAR = 47U }; // ATK_ROLE_SCROLL_BAR
enum { ROLE_GRIP = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_SOUND = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_CURSOR = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_CARET = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_ALERT = 2U }; // ATK_ROLE_ALERT
enum { ROLE_WINDOW = 68U }; // ATK_ROLE_WINDOW
// An object used for drawing custom user interface elements
enum { ROLE_CLIENT = 18U }; // ATK_ROLE_DRAWING_AREA
enum { ROLE_MENUPOPUP = 32U }; // ATK_ROLE_MENU
enum { ROLE_MENUITEM = 34U }; // ATK_ROLE_MENU_ITEM
enum { ROLE_TOOLTIP = 63U }; // ATK_ROLE_TOOL_TIP
// The object represents a main window for a application
enum { ROLE_APPLICATION = 73U }; // ATK_ROLE_APPLICATION
// The object represents a document window, only for MDI windows
enum { ROLE_DOCUMENT = 80U }; // ATK_ROLE_DOCUMENT_FRAME
enum { ROLE_PANE = 38U }; // ATK_ROLE_PANEL
enum { ROLE_CHART = 78U }; // ATK_ROLE_CHART
enum { ROLE_DIALOG = 16U }; // ATK_ROLE_DIALOG
enum { ROLE_BORDER = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_GROUPING = 38U }; // ATK_ROLE_PANEL
enum { ROLE_SEPARATOR = 49U }; // ATK_ROLE_SEPARATOR
enum { ROLE_TOOLBAR = 62U }; // ATK_ROLE_TOOL_BAR
enum { ROLE_STATUSBAR = 53U }; // ATK_ROLE_STATUSBAR
enum { ROLE_TABLE = 54U }; // ATK_ROLE_TABLE
// Or ATK_ROLE_TABLE_COLUMN_HEADER?
enum { ROLE_COLUMNHEADER = 10U };// ATK_ROLE_COLUMN_HEADER
// Or ATK_ROLE_TABLE_ROW_HEADER ?
enum { ROLE_ROWHEADER = 46U }; // ATK_ROLE_ROW_HEADER
enum { ROLE_COLUMN = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_ROW = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_CELL = 55U }; // ATK_ROLE_TABLE_CELL
enum { ROLE_LINK = 101U }; // ATK doesn't have such role now
enum { ROLE_HELPBALLOON = 66U }; // ATK_ROLE_UNKNOWN
// The object represents a cartoon-like graphic object
enum { ROLE_CHARACTER = 26U }; // ATK_ROLE_IMAGE
enum { ROLE_LIST = 30U }; // ATK_ROLE_LIST
enum { ROLE_LISTITEM = 31U }; // ATK_ROLE_LIST_ITEM
// The object represents an outline or tree structure
enum { ROLE_OUTLINE = 64U }; // ATK_ROLE_TREE
// The object represents an item in an outline or tree structure
enum { ROLE_OUTLINEITEM = 31U }; // ATK_ROLE_LIST_ITEM
enum { ROLE_PAGETAB = 36U }; // ATK_ROLE_PAGE_TAB
enum { ROLE_PROPERTYPAGE = 66U };// ATK_ROLE_UNKNOWN
enum { ROLE_INDICATOR = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_GRAPHIC = 26U }; // ATK_ROLE_IMAGE
// Read-only text, can't be modified or selected
enum { ROLE_STATICTEXT = 60U }; // ATK_ROLE_TEXT
enum { ROLE_TEXT = 60U }; // ATK_ROLE_TEXT
enum { ROLE_PUSHBUTTON = 42U }; // ATK_ROLE_PUSH_BUTTON
enum { ROLE_CHECKBUTTON = 7U }; // ATK_ROLE_CHECK_BOX
enum { ROLE_RADIOBUTTON = 43U }; // ATK_ROLE_RADIO_BUTTON
enum { ROLE_COMBOBOX = 11U }; // ATK_ROLE_COMBO_BOX
// Just represents the calender control
enum { ROLE_DROPLIST = 5U }; // ATK_ROLE_CALENDAR
enum { ROLE_PROGRESSBAR = 41U }; // ATK_ROLE_PROGRESS_BAR
enum { ROLE_DIAL = 15U }; // ATK_ROLE_DIAL
enum { ROLE_HOTKEYFIELD = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_SLIDER = 50U }; // ATK_ROLE_SLIDER
enum { ROLE_SPINBUTTON = 52U }; // ATK_ROLE_SPIN_BUTTON
enum { ROLE_DIAGRAM = 26U }; // ATK_ROLE_IMAGE
enum { ROLE_ANIMATION = 3U }; // ATK_ROLE_ANIMATION
enum { ROLE_EQUATION = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_BUTTONDROPDOWN = 42U }; // ATK_ROLE_PUSH_BUTTON
enum { ROLE_BUTTONMENU = 42U }; // ATK_ROLE_PUSH_BUTTON
// Represents a button that drops down a grid
enum { ROLE_BUTTONDROPDOWNGRID = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_WHITESPACE = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_PAGETABLIST = 37U }; // ATK_ROLE_PAGE_TAB_LIST
enum { ROLE_CLOCK = 66U }; // ATK_ROLE_UNKNOWN
// Represents a button on the toolbar that has a drop-down list icon
// directly adjacent to the button
enum { ROLE_SPLITBUTTON = 42U }; // ATK_ROLE_PUSH_BUTTON
enum { ROLE_IPADDRESS = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_NOTHING = 66U }; // ATK_ROLE_UNKNOWN
// Represent top level window
enum { ROLE_FRAME = 22U }; // ATK_ROLE_FRAME
// Other roles from atk.h
enum { ROLE_ACCEL_LABEL = 1U }; // ATK_ROLE_ACCEL_LABEL
enum { ROLE_ARROW = 4U }; // ATK_ROLE_ARROW
enum { ROLE_CANVAS = 6U }; // ATK_ROLE_CANVAS
enum { ROLE_CHECK_MENU_ITEM = 8U }; // ATK_ROLE_CHECK_MENU_ITEM
enum { ROLE_COLOR_CHOOSER = 9U }; // ATK_ROLE_COLOR_CHOOSER
enum { ROLE_DATE_EDITOR = 12U }; // ATK_ROLE_DATE_EDITOR
enum { ROLE_DESKTOP_ICON = 13U }; // ATK_ROLE_DESKTOP_ICON
enum { ROLE_DESKTOP_FRAME = 14U }; // ATK_ROLE_DESKTOP_FRAME
enum { ROLE_DIRECTORY_PANE = 17U }; // ATK_ROLE_DIRECTORY_PANE
enum { ROLE_FILE_CHOOSER = 19U}; // ATK_ROLE_FILE_CHOOSER
enum { ROLE_FILLER = 20U }; // ATK_ROLE_FILLER
enum { ROLE_FONT_CHOOSER = 21U }; // ATK_ROLE_FONT_CHOOSER
enum { ROLE_GLASS_PANE = 23U }; // ATK_ROLE_GLASS_PANE
enum { ROLE_HTML_CONTAINER = 24U }; // ATK_ROLE_HTML_CONTAINER
enum { ROLE_ICON = 25U }; // ATK_ROLE_ICON
enum { ROLE_INTERNAL_FRAME = 27U }; // ATK_ROLE_INTERNAL_FRAME
enum { ROLE_LABEL = 28U }; // ATK_ROLE_LABEL
enum { ROLE_LAYERED_PANE = 29U }; // ATK_ROLE_LAYERED_PANE
enum { ROLE_OPTION_PANE = 35U }; // ATK_ROLE_OPTION_PANE
enum { ROLE_PASSWORD_TEXT = 39U }; // ATK_ROLE_PASSWORD_TEXT
enum { ROLE_POPUP_MENU = 40U }; // ATK_ROLE_POPUP_MENU
enum { ROLE_RADIO_MENU_ITEM = 44U }; // ATK_ROLE_RADIO_MENU_ITEM
enum { ROLE_ROOT_PANE = 45U }; // ATK_ROLE_ROOT_PANE
enum { ROLE_SCROLL_PANE = 48U }; // ATK_ROLE_SCROLL_PANE
enum { ROLE_SPLIT_PANE = 51U }; // ATK_ROLE_SPLIT_PANE
enum { ROLE_TABLE_COLUMN_HEADER = 56U }; // ATK_ROLE_TABLE_COLUMN_HEADER
enum { ROLE_TABLE_ROW_HEADER = 57U }; // ATK_ROLE_TABLE_ROW_HEADER
enum { ROLE_TEAR_OFF_MENU_ITEM = 58U }; // ATK_ROLE_TEAR_OFF_MENU_ITEM
enum { ROLE_TERMINAL = 59U }; // ATK_ROLE_TERMINAL
enum { ROLE_TOGGLE_BUTTON = 61U }; // ATK_ROLE_TOGGLE_BUTTON
enum { ROLE_TREE_TABLE = 65U }; // ATK_ROLE_TREE_TABLE
enum { ROLE_VIEWPORT = 67U }; // ATK_ROLE_VIEWPORT
enum { ROLE_HEADER = 69U }; // ATK_ROLE_HEADER
enum { ROLE_FOOTER = 70U }; // ATK_ROLE_FOOTER
enum { ROLE_PARAGRAPH = 71U }; // ATK_ROLE_PARAGRAPH
enum { ROLE_RULER = 72U }; // ATK_ROLE_RULER
enum { ROLE_AUTOCOMPLETE = 74U }; // ATK_ROLE_AUTOCOMPLETE
enum { ROLE_EDITBAR = 75U }; // ATK_ROLE_EDITBAR
enum { ROLE_EMBEDDED = 76U }; // ATK_ROLE_EMBEDDED
enum { ROLE_ENTRY = 77U }; // ATK_ROLE_ENTRY
enum { ROLE_CAPTION = 79U }; // ATK_ROLE_CAPTION
enum { ROLE_DOCUMENT_FRAME = 80U }; // ATK_ROLE_DOCUMENT_FRAME
enum { ROLE_HEADING = 81U }; // ATK_ROLE_HEADING
enum { ROLE_PAGE = 82U }; // ATK_ROLE_PAGE
enum { ROLE_SECTION = 83U }; // ATK_ROLE_SECTION
enum { ROLE_REDUNDANT_OBJECT = 84U }; // ATK_ROLE_REDUNDANT_OBJECT
#else
// MSAA Roles - only one per nsIAccessible or IAccessible
enum { ROLE_TITLEBAR = 1U };
enum { ROLE_MENUBAR = 2U };
enum { ROLE_SCROLLBAR = 3U };
enum { ROLE_GRIP = 4U };
enum { ROLE_SOUND = 5U };
enum { ROLE_CURSOR = 6U };
enum { ROLE_CARET = 7U };
enum { ROLE_ALERT = 8U };
enum { ROLE_WINDOW = 9U };
enum { ROLE_CLIENT = 10U };
enum { ROLE_MENUPOPUP = 11U };
enum { ROLE_MENUITEM = 12U };
enum { ROLE_RADIO_MENU_ITEM = 12U }; // Same as ROLE_MENUITEM
enum { ROLE_CHECK_MENU_ITEM = 12U }; // Same as ROLE_MENUITEM
enum { ROLE_TOOLTIP = 13U };
enum { ROLE_APPLICATION = 14U };
enum { ROLE_DOCUMENT = 15U };
enum { ROLE_PANE = 16U };
enum { ROLE_CHART = 17U };
enum { ROLE_DIALOG = 18U };
enum { ROLE_BORDER = 19U };
enum { ROLE_GROUPING = 20U };
enum { ROLE_SEPARATOR = 21U };
enum { ROLE_TOOLBAR = 22U };
enum { ROLE_STATUSBAR = 23U };
enum { ROLE_TABLE = 24U };
enum { ROLE_COLUMNHEADER = 25U };
enum { ROLE_ROWHEADER = 26U };
enum { ROLE_COLUMN = 27U };
enum { ROLE_ROW = 28U };
enum { ROLE_CELL = 29U };
enum { ROLE_LINK = 30U };
enum { ROLE_HELPBALLOON = 31U };
enum { ROLE_CHARACTER = 32U };
enum { ROLE_LIST = 33U };
enum { ROLE_LISTITEM = 34U };
enum { ROLE_OUTLINE = 35U };
enum { ROLE_TREE_TABLE = 35U }; // Same as ROLE_OUTLINE
enum { ROLE_OUTLINEITEM = 36U };
enum { ROLE_PAGETAB = 37U };
enum { ROLE_PROPERTYPAGE = 38U };
enum { ROLE_INDICATOR = 39U };
enum { ROLE_GRAPHIC = 40U };
enum { ROLE_STATICTEXT = 41U };
enum { ROLE_TEXT = 42U };
enum { ROLE_PUSHBUTTON = 43U };
enum { ROLE_CHECKBUTTON = 44U };
enum { ROLE_RADIOBUTTON = 45U };
enum { ROLE_COMBOBOX = 46U };
enum { ROLE_DROPLIST = 47U };
enum { ROLE_PROGRESSBAR = 48U };
enum { ROLE_DIAL = 49U };
enum { ROLE_HOTKEYFIELD = 50U };
enum { ROLE_SLIDER = 51U };
enum { ROLE_SPINBUTTON = 52U };
enum { ROLE_DIAGRAM = 53U };
enum { ROLE_ANIMATION = 54U };
enum { ROLE_EQUATION = 55U };
enum { ROLE_BUTTONDROPDOWN = 56U };
enum { ROLE_BUTTONMENU = 57U };
enum { ROLE_BUTTONDROPDOWNGRID = 58U };
enum { ROLE_WHITESPACE = 59U };
enum { ROLE_PAGETABLIST = 60U };
enum { ROLE_CLOCK = 61U };
enum { ROLE_SPLITBUTTON = 62U };
enum { ROLE_IPADDRESS = 63U };
enum { ROLE_NOTHING = 4294967295U };
// Make up for ATK roles that we don't have in MSAA
// When in doubt map them to ROLE_NOTHING so that the role string is exposed
enum { ROLE_ICON = ROLE_NOTHING };
enum { ROLE_PASSWORD_TEXT = ROLE_TEXT };
enum { ROLE_AUTOCOMPLETE = ROLE_COMBOBOX };
enum { ROLE_EDITBAR = ROLE_NOTHING };
enum { ROLE_EMBEDDED = ROLE_NOTHING };
enum { ROLE_ENTRY = ROLE_NOTHING };
enum { ROLE_CAPTION = ROLE_NOTHING };
enum { ROLE_DOCUMENT_FRAME = ROLE_NOTHING };
enum { ROLE_HEADING = ROLE_NOTHING };
enum { ROLE_PAGE = ROLE_NOTHING };
enum { ROLE_SECTION = ROLE_NOTHING };
enum { ROLE_REDUNDANT_OBJECT = ROLE_NOTHING };
// MSAA relationship extensions to accNavigate
enum { NAVRELATION_CONTROLLED_BY = 0x1000 };
enum { NAVRELATION_CONTROLLER_FOR = 0x1001 };
enum { NAVRELATION_LABEL_FOR = 0x1002 };
enum { NAVRELATION_LABELLED_BY = 0x1003 };
enum { NAVRELATION_MEMBER_OF = 0x1004 };
enum { NAVRELATION_NODE_CHILD_OF = 0x1005 };
enum { NAVRELATION_FLOWS_TO = 0x1006 };
enum { NAVRELATION_FLOWS_FROM = 0x1007 };
enum { NAVRELATION_SUBWINDOW_OF = 0x1008 };
enum { NAVRELATION_EMBEDS = 0x1009 };
enum { NAVRELATION_EMBEDDED_BY = 0x100a };
enum { NAVRELATION_POPUP_FOR = 0x100b };
enum { NAVRELATION_PARENT_WINDOW_OF = 0x100c };
enum { NAVRELATION_DEFAULT_BUTTON = 0x100d };
enum { NAVRELATION_DESCRIBED_BY = 0x100e };
enum { NAVRELATION_DESCRIPTION_FOR = 0x100f };
#endif
%}
const unsigned long ROLE_TITLEBAR = 0x00000001;
const unsigned long ROLE_MENUBAR = 0x00000002;
const unsigned long ROLE_SCROLLBAR = 0x00000003;
const unsigned long ROLE_GRIP = 0x00000004;
const unsigned long ROLE_SOUND = 0x00000005;
const unsigned long ROLE_CURSOR = 0x00000006;
const unsigned long ROLE_CARET = 0x00000007;
const unsigned long ROLE_ALERT = 0x00000008;
const unsigned long ROLE_WINDOW = 0x00000009;
const unsigned long ROLE_CLIENT = 0x0000000A;
const unsigned long ROLE_MENUPOPUP = 0x0000000B;
const unsigned long ROLE_MENUITEM = 0x0000000C;
const unsigned long ROLE_TOOLTIP = 0x0000000D;
const unsigned long ROLE_APPLICATION = 0x0000000E;
const unsigned long ROLE_DOCUMENT = 0x0000000F;
const unsigned long ROLE_PANE = 0x00000010;
const unsigned long ROLE_CHART = 0x00000011;
const unsigned long ROLE_DIALOG = 0x00000012;
const unsigned long ROLE_BORDER = 0x00000013;
const unsigned long ROLE_GROUPING = 0x00000014;
const unsigned long ROLE_SEPARATOR = 0x00000015;
const unsigned long ROLE_TOOLBAR = 0x00000016;
const unsigned long ROLE_STATUSBAR = 0x00000017;
const unsigned long ROLE_TABLE = 0x00000018;
const unsigned long ROLE_COLUMNHEADER = 0x00000019;
const unsigned long ROLE_ROWHEADER = 0x0000001A;
const unsigned long ROLE_COLUMN = 0x0000001B;
const unsigned long ROLE_ROW = 0x0000001C;
const unsigned long ROLE_CELL = 0x0000001D;
const unsigned long ROLE_LINK = 0x0000001E;
const unsigned long ROLE_HELPBALLOON = 0x0000001F;
const unsigned long ROLE_CHARACTER = 0x00000020;
const unsigned long ROLE_LIST = 0x00000021;
const unsigned long ROLE_LISTITEM = 0x00000022;
const unsigned long ROLE_OUTLINE = 0x00000023;
const unsigned long ROLE_OUTLINEITEM = 0x00000024;
const unsigned long ROLE_PAGETAB = 0x00000025;
const unsigned long ROLE_PROPERTYPAGE = 0x00000026;
const unsigned long ROLE_INDICATOR = 0x00000027;
const unsigned long ROLE_GRAPHIC = 0x00000028;
const unsigned long ROLE_STATICTEXT = 0x00000029;
const unsigned long ROLE_TEXT = 0x0000002A; // Editable, selectable, etc.
const unsigned long ROLE_PUSHBUTTON = 0x0000002B;
const unsigned long ROLE_CHECKBUTTON = 0x0000002C;
const unsigned long ROLE_RADIOBUTTON = 0x0000002D;
const unsigned long ROLE_COMBOBOX = 0x0000002E;
const unsigned long ROLE_DROPLIST = 0x0000002F;
const unsigned long ROLE_PROGRESSBAR = 0x00000030;
const unsigned long ROLE_DIAL = 0x00000031;
const unsigned long ROLE_HOTKEYFIELD = 0x00000032;
const unsigned long ROLE_SLIDER = 0x00000033;
const unsigned long ROLE_SPINBUTTON = 0x00000034;
const unsigned long ROLE_DIAGRAM = 0x00000035;
const unsigned long ROLE_ANIMATION = 0x00000036;
const unsigned long ROLE_EQUATION = 0x00000037;
const unsigned long ROLE_BUTTONDROPDOWN = 0x00000038;
const unsigned long ROLE_BUTTONMENU = 0x00000039;
const unsigned long ROLE_BUTTONDROPDOWNGRID = 0x0000003A;
const unsigned long ROLE_WHITESPACE = 0x0000003B;
const unsigned long ROLE_PAGETABLIST = 0x0000003C;
const unsigned long ROLE_CLOCK = 0x0000003D;
const unsigned long ROLE_SPLITBUTTON = 0x0000003E; // New in MSAA 2.0
const unsigned long ROLE_IPADDRESS = 0x0000003F; // New in MSAA 2.0
};

View File

@@ -1,47 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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 of 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"
#include "nsIDOMNode.idl"
[scriptable, uuid(9124c666-6133-4be6-b3ed-dd0ec35f1e64)]
interface nsIAccessibleCaret : nsISupports
{
void attachNewSelectionListener(in nsIDOMNode aFocusedNode);
void removeSelectionListener();
};

View File

@@ -1,135 +1,41 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Original Author: Aaron Leventhal (aaronl@netscape.com)
* Contributor(s): John Gaunt (jgaunt@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 ***** */
* 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 Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Aaron Leventhal
*
* Contributor(s):
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
#include "domstubs.idl"
interface nsIDocument;
interface nsIAccessible;
interface nsIAccessNode;
interface nsIDOMDocument;
interface nsIDOMNode;
interface nsIDOMWindow;
/**
* An interface for in-process accessibility clients
* that wish to retrieve information about a document.
* When accessibility is turned on in Gecko,
* there is an nsIAccessibleDocument for each document
* whether it is XUL, HTML or whatever.
* You can QueryInterface to nsIAccessibleDocument from
* the nsIAccessible or nsIAccessNode for the root node
* of a document. You can also get one from
* nsIAccessNode::GetAccessibleDocument() or
* nsIAccessibleEvent::GetAccessibleDocument()
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(8781FC88-355F-4439-881F-6504A0A1CEB6)]
interface nsIAccessibleDocument : nsISupports
{
/**
* The URL of the document
*/
readonly attribute AString URL;
readonly attribute DOMString URL;
readonly attribute DOMString title;
readonly attribute DOMString mimeType;
readonly attribute DOMString docType;
DOMString getNameSpaceURIForID(in short nameSpaceID);
[noscript] nsIDocument getDocument();
/**
* The title of the document, as specified in the document.
*/
readonly attribute AString title;
/**
* The mime type of the document
*/
readonly attribute AString mimeType;
/**
* The doc type of the document, as specified in the document.
*/
readonly attribute AString docType;
/**
* True if the document is live in an editor.
* False if the document is being displayed but not edited.
* If a <div> is contentEditable, then it has its own document,
* with isEditable == true.
*/
readonly attribute boolean isEditable;
/**
* The nsIDOMDocument interface associated with this document.
*/
readonly attribute nsIDOMDocument document;
/**
* The nsIDOMWindow that the document resides in.
*/
readonly attribute nsIDOMWindow window;
/*
* The accessible for the caret belonging to this window.
*/
readonly attribute nsIAccessible caretAccessible;
/**
* The namespace for each ID that is handed back.
*/
AString getNameSpaceURIForID(in short nameSpaceID);
/**
* The window handle for the OS window the document is being displayed in.
* For example, in Windows you can static cast it to an HWND.
*/
[noscript] readonly attribute voidPtr windowHandle;
/**
* Returns the access node cached by this document
* @param aUniqueID The unique ID used to cache the node.
* This matches up with the uniqueID attribute on
* nsIAccessNode.
* @return The nsIAccessNode cached for this particular unique ID.
*/
[noscript] nsIAccessNode getCachedAccessNode(in voidPtr aUniqueID);
/**
* Returns the first accessible parent of a DOM node.
* Guaranteed not to return nsnull if the DOM node is in a document.
* @param aDOMNode The DOM node we need an accessible for.
* @return An first nsIAccessible found by crawling up the DOM node
* to the document root.
*/
nsIAccessible getAccessibleInParentChain(in nsIDOMNode aDOMNode);
};

View File

@@ -1,154 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Original Author: Aaron Leventhal (aaronl@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 nsIAccessible;
interface nsIAccessibleDocument;
interface nsIDOMNode;
%{C++
#define NS_ACCESSIBLE_EVENT_TOPIC "accessible-event"
%}
/**
* An interface for accessibility events listened to
* by in-process accessibility clients, which can be used
* to find out how to get accessibility and DOM interfaces for
* the event and its target. To listen to in-process accessibility invents,
* make your object an nsIObserver, and listen for accessible-event by
* using code something like this:
* nsCOMPtr<nsIObserverService> observerService =
* do_GetService("@mozilla.org/observer-service;1", &rv);
* if (NS_SUCCEEDED(rv))
* rv = observerService->AddObserver(this, "accessible-event", PR_TRUE);
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(87F29033-C4A6-40a3-AC7A-3BA391F9992D)]
interface nsIAccessibleEvent : nsISupports
{
/**
* The type of event, based on the enumerated event values
* defined in this interface.
*/
readonly attribute unsigned long eventType;
/**
* The nsIAccessible associated with the event.
* May return null if no accessible is available
*/
readonly attribute nsIAccessible accessible;
/**
* The nsIAccessibleDocument that the event target nsIAccessible
* resides in. This can be used to get the DOM window,
* the DOM document and the window handler, among other things.
*/
readonly attribute nsIAccessibleDocument accessibleDocument;
/**
* The nsIDOMNode associated with the event
* May return null if accessible for event has been shut down
*/
readonly attribute nsIDOMNode DOMNode;
// these are set to the values given by MSAA
const unsigned long EVENT_CREATE = 0x8000;
const unsigned long EVENT_DESTROY = 0x8001;
const unsigned long EVENT_SHOW = 0x8002;
const unsigned long EVENT_HIDE = 0x8003;
const unsigned long EVENT_REORDER = 0x8004;
const unsigned long EVENT_FOCUS = 0x8005;
const unsigned long EVENT_STATE_CHANGE = 0x800A;
const unsigned long EVENT_LOCATION_CHANGE = 0x800B;
const unsigned long EVENT_NAME_CHANGE = 0x800C;
const unsigned long EVENT_DESCRIPTIONCHANGE = 0x800D;
const unsigned long EVENT_VALUE_CHANGE = 0x800E;
const unsigned long EVENT_PARENTCHANGE = 0x800F;
const unsigned long EVENT_HELPCHANGE = 0x8010;
const unsigned long EVENT_DEFACTIONCHANGE = 0x8011;
const unsigned long EVENT_ACCELERATORCHANGE = 0x8012;
const unsigned long EVENT_SELECTION = 0x8006;
const unsigned long EVENT_SELECTION_ADD = 0x8007;
const unsigned long EVENT_SELECTION_REMOVE = 0x8008;
const unsigned long EVENT_SELECTION_WITHIN = 0x8009;
const unsigned long EVENT_ALERT = 0x0002;
const unsigned long EVENT_FOREGROUND = 0x0003;
const unsigned long EVENT_MENUSTART = 0x0004;
const unsigned long EVENT_MENUEND = 0x0005;
const unsigned long EVENT_MENUPOPUPSTART = 0x0006;
const unsigned long EVENT_MENUPOPUPEND = 0x0007;
const unsigned long EVENT_CAPTURESTART = 0x0008;
const unsigned long EVENT_CAPTUREEND = 0x0009;
const unsigned long EVENT_MOVESIZESTART = 0x000A;
const unsigned long EVENT_MOVESIZEEND = 0x000B;
const unsigned long EVENT_CONTEXTHELPSTART = 0x000C;
const unsigned long EVENT_CONTEXTHELPEND = 0x000D;
const unsigned long EVENT_DRAGDROPSTART = 0x000E;
const unsigned long EVENT_DRAGDROPEND = 0x000F;
const unsigned long EVENT_DIALOGSTART = 0x0010;
const unsigned long EVENT_DIALOGEND = 0x0011;
const unsigned long EVENT_SCROLLINGSTART = 0x0012;
const unsigned long EVENT_SCROLLINGEND = 0x0013;
const unsigned long EVENT_MINIMIZESTART = 0x0016;
const unsigned long EVENT_MINIMIZEEND = 0x0017;
// the additional events for ATK
const unsigned long EVENT_ATK_PROPERTY_CHANGE = 0x0100;
const unsigned long EVENT_ATK_SELECTION_CHANGE = 0x0101;
const unsigned long EVENT_ATK_TEXT_CHANGE = 0x0102;
const unsigned long EVENT_ATK_TEXT_SELECTION_CHANGE = 0x0103;
const unsigned long EVENT_ATK_TEXT_CARET_MOVE = 0x0104;
const unsigned long EVENT_ATK_VISIBLE_DATA_CHANGE = 0x0105;
const unsigned long EVENT_ATK_TABLE_MODEL_CHANGE = 0x0110;
const unsigned long EVENT_ATK_TABLE_ROW_INSERT = 0x0111;
const unsigned long EVENT_ATK_TABLE_ROW_DELETE = 0x0112;
const unsigned long EVENT_ATK_TABLE_ROW_REORDER = 0x0113;
const unsigned long EVENT_ATK_TABLE_COLUMN_INSERT = 0x0114;
const unsigned long EVENT_ATK_TABLE_COLUMN_DELETE = 0x0115;
const unsigned long EVENT_ATK_TABLE_COLUMN_REORDER = 0x0116;
const unsigned long EVENT_ATK_LINK_SELECTED = 0x0117;
const unsigned long EVENT_ATK_WINDOW_ACTIVATE = 0x0118;
const unsigned long EVENT_ATK_WINDOW_CREATE = 0x0119;
const unsigned long EVENT_ATK_WINDOW_DEACTIVATE = 0x0120;
const unsigned long EVENT_ATK_WINDOW_DESTROY = 0x0121;
const unsigned long EVENT_ATK_WINDOW_MAXIMIZE = 0x0122;
const unsigned long EVENT_ATK_WINDOW_MINIMIZE = 0x0123;
const unsigned long EVENT_ATK_WINDOW_RESIZE = 0x0124;
const unsigned long EVENT_ATK_WINDOW_RESTORE = 0x0125;
};

View File

@@ -0,0 +1,41 @@
/* -*- 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric D Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
[scriptable, uuid(BEE49E7D-9D06-49bf-8984-1694C697D74F)]
interface nsIAccessibleEventListener : nsISupports
{
// these are set to the values given by MSAA
const unsigned long EVENT_FOCUS = 0x8005;
const unsigned long EVENT_STATE_CHANGE = 0x800A;
const unsigned long EVENT_NAME_CHANGE = 0x800C;
const unsigned long EVENT_SELECTION = 0x8006;
const unsigned long EVENT_SELECTION_ADD = 0x8007;
const unsigned long EVENT_SELECTION_REMOVE = 0x8008;
const unsigned long EVENT_SELECTION_WITHIN = 0x8009;
void handleEvent(in unsigned long aEvent, in nsIAccessible aTarget);
};

View File

@@ -0,0 +1,32 @@
/* -*- 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric D Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsIAccessibleEventListener.idl"
[scriptable, uuid(AB331E47-4FAA-4a12-9480-9B480DD78B39)]
interface nsIAccessibleEventReceiver : nsISupports
{
void addAccessibleEventListener(in nsIAccessibleEventListener aListener);
void removeAccessibleEventListener(in nsIAccessibleEventListener aListener);
};

View File

@@ -1,47 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** 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 the Mozilla browser.
*
* 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):
* John Gaunt
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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"
#include "nsIAccessible.idl"
[scriptable, uuid(3f0e3eb0-1dd2-11b2-9605-be5b8e76cf4b)]
interface nsIAccessibleProvider : nsISupports
{
readonly attribute nsIAccessible accessible;
};

View File

@@ -1,128 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Original Author: Aaron Leventhal (aaronl@netscape.com)
* Contributor(s): Kyle Yuan (kyle.yuan@sun.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 nsIDOMNode;
interface nsIAccessible;
interface nsIWeakReference;
interface nsIPresShell;
interface nsIDOMWindow;
interface nsIAccessNode;
/**
* An interface for in-process accessibility clients
* wishing to get an nsIAccessible or nsIAccessNode for
* a given DOM node.
* More documentation at:
* http://www.mozilla.org/projects/ui/accessibility
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(663CA4A8-D219-4000-925D-D8F66406B626)]
interface nsIAccessibleRetrieval : nsISupports
{
/**
* Return an nsIAccessible for a DOM node in pres shell 0.
* Create a new accessible of the appropriate type if necessary,
* or use one from the accessibility cache if it already exists.
* @param aNode The DOM node to get an accessible for.
* @return The nsIAccessible for the given DOM node.
*/
nsIAccessible getAccessibleFor(in nsIDOMNode aNode);
/**
* Return an nsIAccessible for a DOM node in pres shell for this DOM window.
* Create a new accessible of the appropriate type if necessary,
* or use one from the accessibility cache if it already exists.
* @param aNode The DOM node to get an accessible for.
* @param aDOMWin The DOM window containing the node.
* @return The nsIAccessible for the given DOM node.
*/
nsIAccessible getAccessibleInWindow(in nsIDOMNode aNode, in nsIDOMWindow aDOMWin);
/**
* Return an nsIAccessible for a DOM node in the given weak shell.
* Create a new accessible of the appropriate type if necessary,
* or use one from the accessibility cache if it already exists.
* @param aNode The DOM node to get an accessible for.
* @param aPresShell The presentation shell which contains layout info for the DOM node.
* @return The nsIAccessible for the given DOM node.
*/
nsIAccessible getAccessibleInWeakShell(in nsIDOMNode aNode, in nsIWeakReference aPresShell);
/**
* Return an nsIAccessible for a DOM node in the given pres shell.
* Create a new accessible of the appropriate type if necessary,
* or use one from the accessibility cache if it already exists.
* @param aNode The DOM node to get an accessible for.
* @param aPresShell The presentation shell which contains layout info for the DOM node.
* @return The nsIAccessible for the given DOM node.
*/
nsIAccessible getAccessibleInShell(in nsIDOMNode aNode, in nsIPresShell aPresShell);
/**
* Return an nsIAccessNode for an already created DOM node in the given weak shell.
* Does not create a new one -- only returns cached access nodes.
* @param aNode The DOM node to get an access node for.
* @param aPresShell The presentation shell which contains layout info for the DOM node.
* @return The nsIAccessNode for the given DOM node or null if
* an access node does not already exist for this DOM node.
*/
nsIAccessNode getCachedAccessNode(in nsIDOMNode aNode, in nsIWeakReference aShell);
/**
* Return an nsIAccessible for an already created DOM node in the given weak shell.
* Does not create a new one -- only returns cached accessibles.
* @param aNode The DOM node to get an accessible for.
* @param aPresShell The presentation shell which contains layout info for the DOM node.
* @return The nsIAccessible for the given DOM node or null if
* an accessible does not already exist for this DOM node.
*/
nsIAccessible getCachedAccessible(in nsIDOMNode aNode, in nsIWeakReference aShell);
};
%{ C++
// for component registration
// {663CA4A8-D219-4000-925D-D8F66406B626}
#define NS_ACCESSIBLE_RETRIEVAL_CID \
{ 0x663ca4a8, 0xd219, 0x4000, { 0x92, 0x5d, 0xd8, 0xf6, 0x64, 0x6, 0xb6, 0x26 } }
%}

View File

@@ -1,110 +1,34 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Marc Mulcahy (marc.mulcahy@sun.com)
* Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* Kyle Yuan (kyle.yuan@sun.com)
* Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 ***** */
* 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 Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: John Gaunt (jgaunt@netscape.com)
*
* Contributor(s):
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
#include "nsIArray.idl"
#include "nsISupportsArray.idl"
/**
* An interface for the accessibility module and in-process accessibility clients
* for dealing with getting and changing the selection of accessible nodes.
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(34d268d6-1dd2-11b2-9d63-83a5e0ada290)]
interface nsIAccessibleSelectable : nsISupports
{
%{C++
enum { eSelection_Add = 0U, eSelection_Remove = 1U, eSelection_GetState = 2U };
%}
/**
* Return an nsIArray of selected nsIAccessible children
*/
nsIArray GetSelectedChildren();
/**
* Returns the number of accessible children currently selected.
*/
readonly attribute long selectionCount;
/**
* Adds the specified accessible child of the object to the
* object's selection.
* If the specified object is already selected, then it does nothing.
* @throws NS_ERROR_FAILURE if the specified object is not selectable.
*/
void addChildToSelection(in long index);
/**
* Removes the specified child of the object from the object's selection.
* If the specified object was not selected, then it does nothing.
* @throws NS_ERROR_FAILURE if the specified object is not selectable.
*/
void removeChildFromSelection(in long index);
/**
* Clears the selection in the object so that no children in the object
* are selected.
*/
void clearSelection();
/**
* Returns a reference to the accessible object representing the specified
* selected child of the object.
* @param index Zero-based selected accessible child index
* @return The nth selected accessible child
*/
nsIAccessible refSelection(in long index);
/**
* Determines if the current child of this object is selected
* @param The zero-based accessible child index
* @return Returns true if the child is selected, false if not.
*/
boolean isChildSelected(in long index);
/**
* Select all children
* @return If the object does not accept multiple selection, return false.
* Otherwise, returns true.
*/
boolean selectAllSelection();
nsISupportsArray GetSelectedChildren();
};

View File

@@ -1,53 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* 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"
#include "nsITreeColumns.idl"
interface nsIAccessible;
/**
* A cross-platform interface that supports cache for tree item
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(CC742DA2-9C25-4D04-96CD-DA407D676C6D)]
interface nsIAccessibleTreeCache : nsISupports
{
/**
* Get tree item from cache according to row and column, create if doesn't exist in cache
* "aColumn" can be nsnull
*/
[noscript] nsIAccessible getCachedTreeitemAccessible(in PRInt32 aRow, in nsITreeColumn aColumn);
};

View File

@@ -1,49 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 nsIFrame;
[scriptable, uuid(b3507946-4a44-4e40-b66c-f23e320997c5)]
interface nsPIAccessNode : nsISupports
{
[noscript] void init();
[noscript] void shutdown();
[notxpcom] nsIFrame GetFrame();
};

View File

@@ -1,55 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Original Author: Aaron Leventhal (aaronl@netscape.com)
* 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 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 nsIAccessible;
[scriptable, uuid(52F1BE88-84F7-4f7f-B31C-062AFE7DF15D)]
interface nsPIAccessible : nsISupports
{
[noscript] void setParent(in nsIAccessible aAccParent);
[noscript] void setFirstChild(in nsIAccessible aAccFirstChild);
[noscript] void setNextSibling(in nsIAccessible aAccNextSibling);
/**
* Set the child count to -1 (unknown) and null out cached child pointers
*/
[noscript] void invalidateChildren();
[noscript] void fireToolkitEvent(in unsigned long aEvent, in nsIAccessible aTarget, in voidPtr aData);
};

View File

@@ -1,67 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Original Author: Aaron Leventhal (aaronl@netscape.com)
* 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 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 nsIAccessNode;
interface nsIContent;
[uuid(eae56f75-ee68-4120-b113-10f21b75509e)]
interface nsPIAccessibleDocument : nsISupports
{
/**
* Find the accessible object in the accessibility cache that
* corresponds to aStartNode or the first ancestor of aStartNode
* that has an accessible object associated with it.
* Clear that accessible object's parent's cache of accessible children and
* and remove the accessible object and any decendents from the accessible cache.
* New accessible objects will be created and cached again on demand.
* @param aChangeContent The child that is changing
* @param aEvent The event from nsIAccessibleEvent that caused the change:
* Must be one of: EVENT_REORDER (change),
* EVENT_SHOW (make visible or create) or
* EVENT_HIDE (destroy or hide)
*/
void invalidateCacheSubtree(in nsIContent aChangeContent,
in PRUint32 aChangeEvent);
void cacheAccessNode(in voidPtr aUniqueID, in nsIAccessNode aAccessNode);
void destroy();
void flushPendingEvents();
void fireDocLoadingEvent(in boolean isFinished);
void fireAnchorJumpEvent();
};

View File

@@ -0,0 +1 @@
accessible.properties

View File

@@ -1,70 +1,58 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 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/
#
# 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.
# 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.
# 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):
# John Gaunt (jgaunt@netscape.com)
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of 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 *****
DEPTH = ../..
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
DIRS += atk
else
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
DIRS += msaa
else
ifeq ($(MOZ_WIDGET_TOOLKIT),mac)
DIRS += mac
else
DIRS += other
endif
endif
endif
MODULE = accessibility
LIBRARY_NAME = accessibility_s
REQUIRES = xpcom string layout widget dom view locale intl docshell webshell necko htmlparser xuldoc imglib2 gfx2
DIRS += \
base \
html \
$(null)
CPPSRCS = \
nsAccessible.cpp \
nsAccessibilityService.cpp \
nsRootAccessible.cpp \
nsHTMLIFrameRootAccessible.cpp \
nsHTMLFormControlAccessible.cpp \
nsHTMLTextAccessible.cpp \
nsHTMLTableAccessible.cpp \
nsHTMLImageAccessible.cpp \
nsHTMLAreaAccessible.cpp \
nsHTMLLinkAccessible.cpp \
nsHTMLSelectListAccessible.cpp \
nsHTMLComboboxAccessible.cpp \
nsHTMLListboxAccessible.cpp \
nsGenericAccessible.cpp \
$(NULL)
ifdef MOZ_XUL
DIRS += xul
endif
EXPORTS = \
nsRootAccessible.h \
$(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

View File

@@ -0,0 +1,5 @@
jump = Jump
press = Press
check = Check
uncheck = Uncheck
select = Select

View File

@@ -1,122 +0,0 @@
# ***** 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.org code
#
# The Initial Developer of the Original Code is
# Aaron Leventhal
# Portions created by the Initial Developer are Copyright (C) 2003
# 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 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 *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
LIBRARY_NAME = accessibility_toolkit_s
LIBXUL_LIBRARY = 1
REQUIRES = content \
docshell \
dom \
editor \
gfx \
intl \
layout \
locale \
necko \
string \
uriloader \
view \
webshell \
widget \
xpcom \
$(NULL)
CPPSRCS = \
nsAccessNodeWrap.cpp \
nsAccessibleWrap.cpp \
nsDocAccessibleWrap.cpp \
nsRootAccessibleWrap.cpp \
nsAppRootAccessible.cpp \
nsAccessibleText.cpp \
nsAccessibleHyperText.cpp \
nsHTMLFormControlAccessibleWrap.cpp \
nsHTMLLinkAccessibleWrap.cpp \
nsHTMLTableAccessibleWrap.cpp \
nsHTMLBlockAccessible.cpp \
nsMaiInterface.cpp \
nsMaiInterfaceComponent.cpp \
nsMaiInterfaceAction.cpp \
nsMaiInterfaceText.cpp \
nsMaiInterfaceEditableText.cpp \
nsMaiInterfaceSelection.cpp \
nsMaiInterfaceValue.cpp \
nsMaiHyperlink.cpp \
nsMaiInterfaceHypertext.cpp \
nsMaiInterfaceTable.cpp \
$(NULL)
#ifdef MOZ_XUL
CPPSRCS += \
nsXULFormControlAccessibleWrap.cpp \
nsXULTreeAccessibleWrap.cpp \
$(NULL)
#endif
EXPORTS = \
nsAccessNodeWrap.h \
nsAccessibleWrap.h \
nsDocAccessibleWrap.h \
nsRootAccessibleWrap.h \
nsTextAccessibleWrap.h \
nsXULMenuAccessibleWrap.h \
nsXULTreeAccessibleWrap.h \
nsAccessibleText.h \
$(NULL)
# we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS)
include $(topsrcdir)/config/rules.mk
CFLAGS += $(MOZ_GTK2_CFLAGS)
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
LOCAL_INCLUDES += \
-I$(srcdir) \
-I$(srcdir)/../base \
-I$(srcdir)/../html \
-I$(srcdir)/../xul \
$(NULL)

View File

@@ -1,74 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 "nsAccessNodeWrap.h"
/* For documentation of the accessibility architecture,
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
*/
/*
* Class nsAccessNodeWrap
*/
//-----------------------------------------------------
// construction
//-----------------------------------------------------
nsAccessNodeWrap::nsAccessNodeWrap(nsIDOMNode *aNode, nsIWeakReference* aShell):
nsAccessNode(aNode, aShell)
{
}
//-----------------------------------------------------
// destruction
//-----------------------------------------------------
nsAccessNodeWrap::~nsAccessNodeWrap()
{
}
void nsAccessNodeWrap::InitAccessibility()
{
nsAccessNode::InitXPAccessibility();
}
void nsAccessNodeWrap::ShutdownAccessibility()
{
nsAccessNode::ShutdownXPAccessibility();
}

View File

@@ -1,58 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 ***** */
/* For documentation of the accessibility architecture,
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
*/
#ifndef _nsAccessNodeWrap_H_
#define _nsAccessNodeWrap_H_
#include "nsAccessNode.h"
class nsAccessNodeWrap : public nsAccessNode
{
public: // construction, destruction
nsAccessNodeWrap(nsIDOMNode *aNode, nsIWeakReference* aShell);
virtual ~nsAccessNodeWrap();
static void InitAccessibility();
static void ShutdownAccessibility();
};
#endif

View File

@@ -1,541 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kyle Yuan (kyle.yuan@sun.com)
* Ginn Chen (ginn.chen@sun.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 "nsAccessibilityAtoms.h"
#include "nsAccessibilityService.h"
#include "nsAccessibleHyperText.h"
#include "nsHTMLLinkAccessibleWrap.h"
#include "nsHTMLTextAccessible.h"
#include "nsPIAccessNode.h"
#include "nsIFrame.h"
#include "nsILink.h"
#include "nsIServiceManager.h"
/*
* nsAccessibleHyperText supports both nsIAccessibleHyperText and nsIAccessibleText.
* It's mainly aimed at the compound content that consists of many text nodes and links.
* Typically, it's a paragraph of text, a cell of table, etc.
*/
NS_IMPL_ISUPPORTS2(nsAccessibleHyperText, nsIAccessibleHyperText, nsIAccessibleText)
nsAccessibleHyperText::nsAccessibleHyperText(nsIDOMNode* aDomNode, nsIWeakReference* aShell)
{
mIndex = -1;
nsCOMPtr<nsIContent> content(do_QueryInterface(aDomNode));
if (content) {
nsCOMPtr<nsIContent> parentContent = content->GetParent();
if (parentContent)
mIndex = parentContent->IndexOf(content);
}
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(aShell));
if (shell) {
NS_NewArray(getter_AddRefs(mTextChildren));
if (mTextChildren) {
nsCOMPtr<nsIContent> content(do_QueryInterface(aDomNode));
nsIFrame *frame = shell->GetPrimaryFrameFor(content);
nsIFrame *parentFrame = nsAccessible::GetParentBlockFrame(frame);
NS_ASSERTION(parentFrame, "Error: HyperText can't get parent block frame");
if (parentFrame) {
nsIFrame* childFrame = parentFrame->GetFirstChild(nsnull);
PRBool bSave = PR_FALSE;
GetAllTextChildren(shell->GetPresContext(), childFrame,
aDomNode, bSave);
}
}
}
}
void nsAccessibleHyperText::Shutdown()
{
mTextChildren = nsnull;
}
PRBool nsAccessibleHyperText::GetAllTextChildren(nsPresContext *aPresContext, nsIFrame *aCurFrame, nsIDOMNode* aNode, PRBool &bSave)
{
if (! aCurFrame)
return PR_FALSE;
nsIAtom* frameType = aCurFrame->GetType();
if (frameType == nsAccessibilityAtoms::blockFrame) {
if (bSave)
return PR_TRUE;
}
else {
if (frameType == nsAccessibilityAtoms::textFrame) {
// Skip the empty text frames that usually only consist of "\n"
if (! aCurFrame->GetRect().IsEmpty()) {
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(aCurFrame->GetContent()));
if (bSave || node == aNode) {
// some long text node may be divided into several frames,
// so we must check whether this node is already in the array
PRUint32 index;
nsresult rv = mTextChildren->IndexOf(0, node, &index);
if (NS_FAILED(rv)) {
mTextChildren->AppendElement(node, PR_FALSE);
}
bSave = PR_TRUE;
}
}
}
nsIFrame* childFrame = aCurFrame->GetFirstChild(nsnull);
if (GetAllTextChildren(aPresContext, childFrame, aNode, bSave))
return PR_TRUE;
}
nsIFrame* siblingFrame = aCurFrame->GetNextSibling();
return GetAllTextChildren(aPresContext, siblingFrame, aNode, bSave);
}
PRInt32 nsAccessibleHyperText::GetIndex()
// XXX, this index is used for giving a hypertext a meaningful name, such as "Paragraph n",
// but by now, we haven't found a better way to do that, just use the index of our parent's
// children list as the number.
{
return mIndex;
}
nsIDOMNode* nsAccessibleHyperText::FindTextNodeByOffset(PRInt32 aOffset, PRInt32& aBeforeLength)
{
aBeforeLength = 0;
PRUint32 index, count;
mTextChildren->GetLength(&count);
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextChildren, index));
nsAccessibleText accText(domNode);
PRInt32 charCount;
if (NS_SUCCEEDED(accText.GetCharacterCount(&charCount))) {
if (aOffset >= 0 && aOffset <= charCount) {
return domNode;
}
aOffset -= charCount;
aBeforeLength += charCount;
}
}
return nsnull;
}
nsresult nsAccessibleHyperText::GetTextHelper(EGetTextType aType, nsAccessibleTextBoundary aBoundaryType,
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText)
{
PRInt32 beforeLength;
nsIDOMNode* domNode = FindTextNodeByOffset(aOffset, beforeLength);
if (domNode) {
nsAccessibleText accText(domNode);
// call nsAccessibleText::GetTextHelper directly so that it can adjust the aStartOffset/aEndOffset
// according to the mTextChildren
nsresult rv = accText.GetTextHelper(aType, aBoundaryType, aOffset - beforeLength, aStartOffset, aEndOffset, mTextChildren, aText);
return rv;
}
return NS_ERROR_INVALID_ARG;
}
// ------- nsIAccessibleText ---------------
/* attribute long caretOffset; */
NS_IMETHODIMP nsAccessibleHyperText::GetCaretOffset(PRInt32 *aCaretOffset)
{
*aCaretOffset = 0;
PRInt32 charCount, caretOffset;
PRUint32 index, count;
mTextChildren->GetLength(&count);
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextChildren, index));
nsAccessibleText accText(domNode);
if (NS_SUCCEEDED(accText.GetCaretOffset(&caretOffset))) {
*aCaretOffset += caretOffset;
return NS_OK;
}
if (NS_SUCCEEDED(accText.GetCharacterCount(&charCount))) {
*aCaretOffset += charCount;
}
}
// The current focus node is not inside us
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsAccessibleHyperText::SetCaretOffset(PRInt32 aCaretOffset)
{
PRInt32 beforeLength;
nsIDOMNode* domNode = FindTextNodeByOffset(aCaretOffset, beforeLength);
if (domNode) {
nsAccessibleText accText(domNode);
return accText.SetCaretOffset(aCaretOffset - beforeLength);
}
return NS_ERROR_INVALID_ARG;
}
/* readonly attribute long characterCount; */
NS_IMETHODIMP nsAccessibleHyperText::GetCharacterCount(PRInt32 *aCharacterCount)
{
*aCharacterCount = 0;
PRInt32 charCount;
PRUint32 index, count;
mTextChildren->GetLength(&count);
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextChildren, index));
nsAccessibleText accText(domNode);
if (NS_SUCCEEDED(accText.GetCharacterCount(&charCount)))
*aCharacterCount += charCount;
}
return NS_OK;
}
/* readonly attribute long selectionCount; */
NS_IMETHODIMP nsAccessibleHyperText::GetSelectionCount(PRInt32 *aSelectionCount)
{
*aSelectionCount = 0;
PRInt32 selCount;
PRUint32 index, count;
mTextChildren->GetLength(&count);
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextChildren, index));
nsAccessibleText accText(domNode);
if (NS_SUCCEEDED(accText.GetSelectionCount(&selCount)))
*aSelectionCount += selCount;
}
return NS_OK;
}
/* AString getText (in long startOffset, in long endOffset); */
NS_IMETHODIMP nsAccessibleHyperText::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString & aText)
{
if (aEndOffset == -1)
GetCharacterCount(&aEndOffset);
PRInt32 charCount, totalCount = 0, currentStart, currentEnd;
PRUint32 index, count;
nsAutoString text, nodeText;
mTextChildren->GetLength(&count);
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextChildren, index));
nsAccessibleText accText(domNode);
if (NS_SUCCEEDED(accText.GetCharacterCount(&charCount))) {
currentStart = aStartOffset - totalCount;
currentEnd = aEndOffset - totalCount;
if (currentStart >= 0 && currentStart < charCount) {
accText.GetText(currentStart, NS_MIN(charCount, currentEnd), nodeText);
text += nodeText;
aStartOffset += charCount - currentStart;
if (aStartOffset >= aEndOffset)
break;
}
totalCount += charCount;
}
}
// Eliminate the new line character
PRInt32 start = 0, length = text.Length();
PRInt32 offset = text.FindCharInSet("\n\r");
while (offset != kNotFound) {
if (offset > start)
aText += Substring(text, start, offset - start);
start = offset + 1;
offset = text.FindCharInSet("\n\r", start);
}
// Consume the last bit of the string if there's any left
if (start < length) {
if (start)
aText += Substring(text, start, length - start);
else
aText = text;
}
return NS_OK;
}
/* AString getTextBeforeOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); */
NS_IMETHODIMP nsAccessibleHyperText::GetTextBeforeOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText)
{
return GetTextHelper(eGetBefore, aBoundaryType, aOffset, aStartOffset, aEndOffset, aText);
}
/* AString getTextAfterOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); */
NS_IMETHODIMP nsAccessibleHyperText::GetTextAfterOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText)
{
return GetTextHelper(eGetAfter, aBoundaryType, aOffset, aStartOffset, aEndOffset, aText);
}
/* AString getTextAtOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); */
NS_IMETHODIMP nsAccessibleHyperText::GetTextAtOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText)
{
return GetTextHelper(eGetAt, aBoundaryType, aOffset, aStartOffset, aEndOffset, aText);
}
/* wchar getCharacterAtOffset (in long offset); */
NS_IMETHODIMP nsAccessibleHyperText::GetCharacterAtOffset(PRInt32 aOffset, PRUnichar *aCharacter)
{
PRInt32 beforeLength;
nsIDOMNode* domNode = FindTextNodeByOffset(aOffset, beforeLength);
if (domNode) {
nsAccessibleText accText(domNode);
return accText.GetCharacterAtOffset(aOffset - beforeLength, aCharacter);
}
return NS_ERROR_INVALID_ARG;
}
/* nsISupports getAttributeRange (in long offset, out long rangeStartOffset, out long rangeEndOffset); */
NS_IMETHODIMP nsAccessibleHyperText::GetAttributeRange(PRInt32 aOffset, PRInt32 *aRangeStartOffset, PRInt32 *aRangeEndOffset, nsISupports **aAttributes)
{
*aRangeStartOffset = aOffset;
GetCharacterCount(aRangeEndOffset);
*aAttributes = 0;
return NS_OK;
}
/* void getCharacterExtents (in long offset, out long x, out long y, out long width, out long height, in nsAccessibleCoordType coordType); */
NS_IMETHODIMP nsAccessibleHyperText::GetCharacterExtents(PRInt32 aOffset, PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight, nsAccessibleCoordType aCoordType)
{
PRInt32 beforeLength;
nsIDOMNode* domNode = FindTextNodeByOffset(aOffset, beforeLength);
if (domNode) {
nsAccessibleText accText(domNode);
return accText.GetCharacterExtents(aOffset - beforeLength, aX, aY, aWidth, aHeight, aCoordType);
}
return NS_ERROR_INVALID_ARG;
}
/* long getOffsetAtPoint (in long x, in long y, in nsAccessibleCoordType coordType); */
NS_IMETHODIMP nsAccessibleHyperText::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY, nsAccessibleCoordType aCoordType, PRInt32 *aOffset)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getSelectionBounds (in long selectionNum, out long startOffset, out long endOffset); */
NS_IMETHODIMP nsAccessibleHyperText::GetSelectionBounds(PRInt32 aSelectionNum, PRInt32 *aStartOffset, PRInt32 *aEndOffset)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setSelectionBounds (in long selectionNum, in long startOffset, in long endOffset); */
NS_IMETHODIMP nsAccessibleHyperText::SetSelectionBounds(PRInt32 aSelectionNum, PRInt32 aStartOffset, PRInt32 aEndOffset)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void addSelection (in long startOffset, in long endOffset); */
NS_IMETHODIMP nsAccessibleHyperText::AddSelection(PRInt32 aStartOffset, PRInt32 aEndOffset)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void removeSelection (in long selectionNum); */
NS_IMETHODIMP nsAccessibleHyperText::RemoveSelection(PRInt32 aSelectionNum)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
// ------- nsIAccessibleHyperText ---------------
/* readonly attribute long links; */NS_IMETHODIMP nsAccessibleHyperText::GetLinks(PRInt32 *aLinks)
{
*aLinks = 0;
PRUint32 index, count;
PRInt32 caretOffset;
mTextChildren->GetLength(&count);
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextChildren, index));
nsCOMPtr<nsIDOMNode> parentNode;
nsCOMPtr<nsILink> link = nsnull;
domNode->GetParentNode(getter_AddRefs(parentNode));
while (parentNode) {
link = do_QueryInterface(parentNode);
if (link)
break;
nsCOMPtr<nsIDOMNode> temp = parentNode;
temp->GetParentNode(getter_AddRefs(parentNode));
}
if (link)
(*aLinks)++;
else {
nsAccessibleText accText(domNode);
if (NS_SUCCEEDED(accText.GetCaretOffset(&caretOffset))) {
*aLinks = 0;
return NS_OK;
}
}
}
return NS_OK;
}
/* nsIAccessibleHyperLink getLink (in long index); */
NS_IMETHODIMP nsAccessibleHyperText::GetLink(PRInt32 aIndex, nsIAccessibleHyperLink **aLink)
{
PRUint32 index, count, linkCount = 0;
mTextChildren->GetLength(&count);
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextChildren, index));
nsCOMPtr<nsIDOMNode> parentNode;
// text node maybe a child (or grandchild, ...) of a link node
nsCOMPtr<nsILink> link;
domNode->GetParentNode(getter_AddRefs(parentNode));
while (parentNode) {
link = do_QueryInterface(parentNode);
if (link)
break;
nsCOMPtr<nsIDOMNode> temp = parentNode;
temp->GetParentNode(getter_AddRefs(parentNode));
}
if (link) {
if (linkCount++ == NS_STATIC_CAST(PRUint32, aIndex)) {
nsCOMPtr<nsIWeakReference> weakShell;
nsAccessibilityService::GetShellFromNode(parentNode, getter_AddRefs(weakShell));
NS_ENSURE_TRUE(weakShell, NS_ERROR_FAILURE);
// Check to see if we already have it in the cache.
nsCOMPtr<nsIAccessibilityService>
accService(do_GetService("@mozilla.org/accessibilityService;1"));
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
nsCOMPtr<nsIAccessible> cachedAcc;
nsresult rv = accService->GetCachedAccessible(parentNode, weakShell,
getter_AddRefs(cachedAcc));
NS_ENSURE_SUCCESS(rv, rv);
*aLink = nsnull;
if (cachedAcc) {
// Retrieved from cache
nsCOMPtr<nsIAccessibleHyperLink> cachedLink(do_QueryInterface(cachedAcc));
if (cachedLink) {
*aLink = cachedLink;
NS_IF_ADDREF(*aLink);
}
}
if (!(*aLink)) {
*aLink = new nsHTMLLinkAccessibleWrap(parentNode, mTextChildren, weakShell, nsnull);
NS_ENSURE_TRUE(*aLink, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*aLink);
nsCOMPtr<nsPIAccessNode> accessNode(do_QueryInterface(*aLink));
accessNode->Init();
}
break;
}
}
}
return NS_OK;
}
/* long getLinkIndex (in long charIndex); */
NS_IMETHODIMP nsAccessibleHyperText::GetLinkIndex(PRInt32 aCharIndex, PRInt32 *aLinkIndex)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* long getSelectedLinkIndex (); */
NS_IMETHODIMP nsAccessibleHyperText::GetSelectedLinkIndex(PRInt32 *aSelectedLinkIndex)
{
*aSelectedLinkIndex = -1;
PRUint32 count;
mTextChildren->GetLength(&count);
if (count <= 0)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMNode> curNode(do_QueryElementAt(mTextChildren, 0));
PRUint32 index, linkCount = 0;
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextChildren, index));
nsCOMPtr<nsIDOMNode> parentNode;
nsCOMPtr<nsILink> link;
do {
// text node maybe a child of a link node
domNode->GetParentNode(getter_AddRefs(parentNode));
domNode = parentNode;
link = do_QueryInterface(parentNode);
} while (domNode && link == nsnull);
if (link) {
if (parentNode == nsAccessNode::gLastFocusedNode) {
*aSelectedLinkIndex = linkCount;
return NS_OK;
}
linkCount++;
}
}
return NS_ERROR_FAILURE;
}
nsresult nsAccessibleHyperText::GetBounds(nsIWeakReference *aWeakShell, PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
*x = *y = *width = *height = 0;
nsRect unionRectTwips;
PRUint32 index, count;
mTextChildren->GetLength(&count);
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextChildren, index));
nsHTMLTextAccessible *accText = new nsHTMLTextAccessible(domNode, aWeakShell, nsnull);
if (!accText)
return NS_ERROR_OUT_OF_MEMORY;
nsRect frameRect;
accText->GetBounds(&frameRect.x, &frameRect.y, &frameRect.width, &frameRect.height);
unionRectTwips.UnionRect(unionRectTwips, frameRect);
delete accText;
}
*x = unionRectTwips.x;
*y = unionRectTwips.y;
*width = unionRectTwips.width;
*height = unionRectTwips.height;
return NS_OK;
}

View File

@@ -1,73 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kyle Yuan (kyle.yuan@sun.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 _nsAccessibleHyperText_H_
#define _nsAccessibleHyperText_H_
#include "nsAccessibleText.h"
#include "nsIAccessibleHyperText.h"
#include "nsIAccessibleText.h"
#include "nsArray.h"
#include "nsTextAccessible.h"
class nsAccessibleHyperText : public nsIAccessibleHyperText,
public nsIAccessibleText
{
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLEHYPERTEXT
NS_DECL_NSIACCESSIBLETEXT
public:
nsAccessibleHyperText(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
virtual ~nsAccessibleHyperText() {};
nsresult GetBounds(nsIWeakReference *aShell, PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
void Shutdown();
PRInt32 GetIndex();
protected:
nsCOMPtr<nsIMutableArray> mTextChildren;
PRInt32 mIndex;
PRBool GetAllTextChildren(nsPresContext *aPresContext, nsIFrame *aCurFrame, nsIDOMNode* aNode, PRBool &bSave);
nsIDOMNode* FindTextNodeByOffset(PRInt32 aOffset, PRInt32& aBeforeLength);
nsresult GetTextHelper(EGetTextType aType, nsAccessibleTextBoundary aBoundaryType,
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText);
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,136 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kyle Yuan (kyle.yuan@sun.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 _nsAccessibleText_H_
#define _nsAccessibleText_H_
#include "nsAccessibleEventData.h"
#include "nsBaseWidgetAccessible.h"
#include "nsIAccessibleEditableText.h"
#include "nsIAccessibleText.h"
#include "nsIEditActionListener.h"
#include "nsIEditor.h"
#include "nsISelectionController.h"
#include "nsITextControlFrame.h"
#include "nsTextAccessibleWrap.h"
#include "nsTextAccessible.h"
enum EGetTextType { eGetBefore=-1, eGetAt=0, eGetAfter=1 };
class nsAccessibleText : public nsIAccessibleText
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLETEXT
nsAccessibleText(nsIDOMNode *aNode);
virtual ~nsAccessibleText() {};
static PRBool gSuppressedNotifySelectionChanged;
protected:
nsCOMPtr<nsIDOMNode> mTextNode;
virtual nsresult GetSelections(nsISelectionController **aSelCon, nsISelection **aDomSel);
nsresult GetTextHelperCore(EGetTextType aType, nsAccessibleTextBoundary aBoundaryType,
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset,
nsISelectionController *aSelCon, nsISelection *aDomSel,
nsISupports *aClosure, nsAString & aText);
nsresult GetTextHelper(EGetTextType aType, nsAccessibleTextBoundary aBoundaryType,
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset,
nsISupports *aClosure, nsAString & aText);
static nsresult DOMPointToOffset(nsISupports *aClosure, nsIDOMNode* aNode, PRInt32 aNodeOffset, PRInt32 *aResult);
static nsresult OffsetToDOMPoint(nsISupports *aClosure, PRInt32 aOffset, nsIDOMNode** aResult, PRInt32* aPosition);
static nsresult GetCurrectOffset(nsISupports *aClosure, nsISelection *aDomSel, PRInt32 *aOffset);
friend class nsAccessibleHyperText;
};
class nsAccessibleEditableText : public nsAccessibleText,
public nsIAccessibleEditableText,
public nsIEditActionListener
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLEEDITABLETEXT
NS_DECL_NSIEDITACTIONLISTENER
nsAccessibleEditableText(nsIDOMNode *aNode);
virtual ~nsAccessibleEditableText() {};
NS_IMETHOD GetCaretOffset(PRInt32 *aCaretOffset);
NS_IMETHOD SetCaretOffset(PRInt32 aCaretOffset);
NS_IMETHOD GetCharacterCount(PRInt32 *aCharacterCount);
NS_IMETHOD GetText(PRInt32 startOffset, PRInt32 endOffset, nsAString & aText);
NS_IMETHOD GetTextBeforeOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText);
NS_IMETHOD GetTextAtOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText);
NS_IMETHOD GetTextAfterOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText);
void ShutdownEditor();
static PRBool IsSingleLineTextControl(nsIDOMNode *aDomNode);
protected:
virtual nsresult GetSelections(nsISelectionController **aSelCon, nsISelection **aDomSel);
void SetEditor(nsIEditor *aEditor);
nsITextControlFrame* GetTextFrame();
nsresult GetSelectionRange(PRInt32 *aStartPos, PRInt32 *aEndPos);
nsresult SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos);
nsresult FireTextChangeEvent(AtkTextChange *aTextData);
// To solve the naming conflict with nsDocAccessible::mEditor, we have to name it
// "mPlainEditor", though it's not necessary to be a "plaintext" editor.
nsCOMPtr<nsIEditor> mPlainEditor;
};
class nsTextAccessibleWrap : public nsTextAccessible,
public nsAccessibleText
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsTextAccessibleWrap(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
};
#endif

View File

@@ -1,972 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* John Sun (john.sun@sun.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 "nsMai.h"
#include "nsAccessibleWrap.h"
#include "nsAppRootAccessible.h"
#include "nsString.h"
#include "nsMaiInterfaceComponent.h"
#include "nsMaiInterfaceAction.h"
#include "nsMaiInterfaceText.h"
#include "nsMaiInterfaceEditableText.h"
#include "nsMaiInterfaceSelection.h"
#include "nsMaiInterfaceValue.h"
#include "nsMaiInterfaceHypertext.h"
#include "nsMaiInterfaceTable.h"
/* MaiAtkObject */
enum {
ACTIVATE,
CREATE,
DEACTIVATE,
DESTROY,
MAXIMIZE,
MINIMIZE,
RESIZE,
RESTORE,
LAST_SIGNAL
};
/**
* This MaiAtkObject is a thin wrapper, in the MAI namespace, for AtkObject
*/
struct MaiAtkObject
{
AtkObject parent;
/*
* The nsAccessibleWrap whose properties and features are exported
* via this object instance.
*/
nsAccessibleWrap *accWrap;
};
struct MaiAtkObjectClass
{
AtkObjectClass parent_class;
};
static guint mai_atk_object_signals [LAST_SIGNAL] = { 0, };
#ifdef MAI_LOGGING
PRInt32 sMaiAtkObjCreated = 0;
PRInt32 sMaiAtkObjDeleted = 0;
#endif
G_BEGIN_DECLS
/* callbacks for MaiAtkObject */
static void classInitCB(AtkObjectClass *aClass);
static void initializeCB(AtkObject *aAtkObj, gpointer aData);
static void finalizeCB(GObject *aObj);
/* callbacks for AtkObject virtual functions */
static const gchar* getNameCB (AtkObject *aAtkObj);
static const gchar* getDescriptionCB (AtkObject *aAtkObj);
static AtkRole getRoleCB(AtkObject *aAtkObj);
static AtkObject* getParentCB(AtkObject *aAtkObj);
static gint getChildCountCB(AtkObject *aAtkObj);
static AtkObject* refChildCB(AtkObject *aAtkObj, gint aChildIndex);
static gint getIndexInParentCB(AtkObject *aAtkObj);
static AtkStateSet* refStateSetCB(AtkObject *aAtkObj);
static AtkRelationSet* refRelationSetCB(AtkObject *aAtkObj);
/* the missing atkobject virtual functions */
/*
static AtkLayer getLayerCB(AtkObject *aAtkObj);
static gint getMdiZorderCB(AtkObject *aAtkObj);
static void SetNameCB(AtkObject *aAtkObj,
const gchar *name);
static void SetDescriptionCB(AtkObject *aAtkObj,
const gchar *description);
static void SetParentCB(AtkObject *aAtkObj,
AtkObject *parent);
static void SetRoleCB(AtkObject *aAtkObj,
AtkRole role);
static guint ConnectPropertyChangeHandlerCB(
AtkObject *aObj,
AtkPropertyChangeHandler *handler);
static void RemovePropertyChangeHandlerCB(
AtkObject *aAtkObj,
guint handler_id);
static void InitializeCB(AtkObject *aAtkObj,
gpointer data);
static void ChildrenChangedCB(AtkObject *aAtkObj,
guint change_index,
gpointer changed_child);
static void FocusEventCB(AtkObject *aAtkObj,
gboolean focus_in);
static void PropertyChangeCB(AtkObject *aAtkObj,
AtkPropertyValues *values);
static void StateChangeCB(AtkObject *aAtkObj,
const gchar *name,
gboolean state_set);
static void VisibleDataChangedCB(AtkObject *aAtkObj);
*/
G_END_DECLS
static GType GetMaiAtkType(const PRUint32 & interfaceCount,
MaiInterface **interfaces);
static const char * GetUniqueMaiAtkTypeName(void);
static gpointer parent_class = NULL;
GType
mai_atk_object_get_type(void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo tinfo = {
sizeof(MaiAtkObjectClass),
(GBaseInitFunc)NULL,
(GBaseFinalizeFunc)NULL,
(GClassInitFunc)classInitCB,
(GClassFinalizeFunc)NULL,
NULL, /* class data */
sizeof(MaiAtkObject), /* instance size */
0, /* nb preallocs */
(GInstanceInitFunc)NULL,
NULL /* value table */
};
type = g_type_register_static(ATK_TYPE_OBJECT,
"MaiAtkObject", &tinfo, GTypeFlags(0));
}
return type;
}
#ifdef MAI_LOGGING
PRInt32 nsAccessibleWrap::mAccWrapCreated = 0;
PRInt32 nsAccessibleWrap::mAccWrapDeleted = 0;
#endif
nsAccessibleWrap::nsAccessibleWrap(nsIDOMNode* aNode,
nsIWeakReference *aShell)
: nsAccessible(aNode, aShell),
mMaiAtkObject(nsnull),
mInterfaces(nsnull),
mInterfaceCount(0)
{
#ifdef MAI_LOGGING
++mAccWrapCreated;
#endif
MAI_LOG_DEBUG(("==nsAccessibleWrap creating: this=%p,total=%d left=%d\n",
(void*)this, mAccWrapCreated,
(mAccWrapCreated-mAccWrapDeleted)));
}
nsAccessibleWrap::~nsAccessibleWrap()
{
#ifdef MAI_LOGGING
++mAccWrapDeleted;
#endif
MAI_LOG_DEBUG(("==nsAccessibleWrap deleting: this=%p,total=%d left=%d\n",
(void*)this, mAccWrapDeleted,
(mAccWrapCreated-mAccWrapDeleted)));
if (mMaiAtkObject) {
MAI_ATK_OBJECT(mMaiAtkObject)->accWrap = nsnull;
g_object_unref(mMaiAtkObject);
}
if (mInterfaces) {
for (int index = 0; index < MAI_INTERFACE_NUM; ++index)
delete mInterfaces[index];
delete [] mInterfaces;
}
}
NS_IMETHODIMP nsAccessibleWrap::GetExtState(PRUint32 *aState)
{
PRUint32 state;
nsAccessible::GetState(&state);
if (!(state & STATE_INVISIBLE))
*aState |= EXT_STATE_SHOWING;
return NS_OK;
}
NS_IMETHODIMP nsAccessibleWrap::GetNativeInterface(void **aOutAccessible)
{
*aOutAccessible = nsnull;
if (!mMaiAtkObject) {
CreateMaiInterfaces();
mMaiAtkObject =
NS_REINTERPRET_CAST(AtkObject *,
g_object_new(GetMaiAtkType(mInterfaceCount, mInterfaces), NULL));
NS_ENSURE_TRUE(mMaiAtkObject, NS_ERROR_OUT_OF_MEMORY);
atk_object_initialize(mMaiAtkObject, this);
mMaiAtkObject->role = ATK_ROLE_INVALID;
mMaiAtkObject->layer = ATK_LAYER_INVALID;
}
*aOutAccessible = mMaiAtkObject;
return NS_OK;
}
AtkObject *
nsAccessibleWrap::GetAtkObject(void)
{
void *atkObj = nsnull;
GetNativeInterface(&atkObj);
return NS_STATIC_CAST(AtkObject *, atkObj);
}
/* private */
nsresult
nsAccessibleWrap::CreateMaiInterfaces(void)
{
typedef MaiInterface * MaiInterfacePointer;
if (!mInterfaces) {
mInterfaces = new MaiInterfacePointer[MAI_INTERFACE_NUM];
for (PRUint16 index = 0; index < MAI_INTERFACE_NUM; ++index) {
mInterfaces[index] = nsnull;
}
NS_ENSURE_TRUE(mInterfaces, NS_ERROR_OUT_OF_MEMORY);
}
// Add Interfaces for each nsIAccessible.ext interfaces
nsresult rv;
// the Component interface are supported by all nsIAccessible
MaiInterfaceComponent *maiInterfaceComponent =
new MaiInterfaceComponent(this);
NS_ENSURE_TRUE(maiInterfaceComponent, NS_ERROR_OUT_OF_MEMORY);
rv = AddMaiInterface(maiInterfaceComponent);
NS_ENSURE_SUCCESS(rv, rv);
// Add Action interface if the action count is more than zero.
PRUint8 actionCount = 0;
rv = GetNumActions(&actionCount);
if (NS_SUCCEEDED(rv) && actionCount > 0) {
MaiInterfaceAction *maiInterfaceAction = new MaiInterfaceAction(this);
NS_ENSURE_TRUE(maiInterfaceAction, NS_ERROR_OUT_OF_MEMORY);
rv = AddMaiInterface(maiInterfaceAction);
NS_ENSURE_SUCCESS(rv, rv);
}
PRUint32 accRole;
rv = GetRole(&accRole);
if (accRole != nsIAccessible::ROLE_HTML_CONTAINER) {
//nsIAccessibleText
nsCOMPtr<nsIAccessibleText> accessInterfaceText;
QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accessInterfaceText));
if (accessInterfaceText) {
MaiInterfaceText *maiInterfaceText = new MaiInterfaceText(this);
NS_ENSURE_TRUE(maiInterfaceText, NS_ERROR_OUT_OF_MEMORY);
rv = AddMaiInterface(maiInterfaceText);
NS_ENSURE_SUCCESS(rv, rv);
}
//nsIAccessibleEditableText
nsCOMPtr<nsIAccessibleEditableText> accessInterfaceEditableText;
QueryInterface(NS_GET_IID(nsIAccessibleEditableText),
getter_AddRefs(accessInterfaceEditableText));
if (accessInterfaceEditableText) {
MaiInterfaceEditableText *maiInterfaceEditableText =
new MaiInterfaceEditableText(this);
NS_ENSURE_TRUE(maiInterfaceEditableText, NS_ERROR_OUT_OF_MEMORY);
rv = AddMaiInterface(maiInterfaceEditableText);
NS_ENSURE_SUCCESS(rv, rv);
}
}
//nsIAccessibleSelection
nsCOMPtr<nsIAccessibleSelectable> accessInterfaceSelection;
QueryInterface(NS_GET_IID(nsIAccessibleSelectable),
getter_AddRefs(accessInterfaceSelection));
if (accessInterfaceSelection) {
MaiInterfaceSelection *maiInterfaceSelection =
new MaiInterfaceSelection(this);
NS_ENSURE_TRUE(maiInterfaceSelection, NS_ERROR_OUT_OF_MEMORY);
rv = AddMaiInterface(maiInterfaceSelection);
NS_ENSURE_SUCCESS(rv, rv);
}
//nsIAccessibleValue
nsCOMPtr<nsIAccessibleValue> accessInterfaceValue;
QueryInterface(NS_GET_IID(nsIAccessibleValue),
getter_AddRefs(accessInterfaceValue));
if (accessInterfaceValue) {
MaiInterfaceValue *maiInterfaceValue = new MaiInterfaceValue(this);
NS_ENSURE_TRUE(maiInterfaceValue, NS_ERROR_OUT_OF_MEMORY);
rv = AddMaiInterface(maiInterfaceValue);
NS_ENSURE_SUCCESS(rv, rv);
}
//nsIAccessibleHypertext
PRInt32 linkCount = 0;
nsCOMPtr<nsIAccessibleHyperText> accessInterfaceHypertext;
QueryInterface(NS_GET_IID(nsIAccessibleHyperText),
getter_AddRefs(accessInterfaceHypertext));
if (accessInterfaceHypertext) {
rv = accessInterfaceHypertext->GetLinks(&linkCount);
if (NS_SUCCEEDED(rv) && (linkCount > 0)) {
MaiInterfaceHypertext *maiInterfaceHypertext =
new MaiInterfaceHypertext(this, mWeakShell);
NS_ENSURE_TRUE(maiInterfaceHypertext, NS_ERROR_OUT_OF_MEMORY);
rv = AddMaiInterface(maiInterfaceHypertext);
NS_ENSURE_SUCCESS(rv, rv);
}
}
//nsIAccessibleTable
if (accRole == nsIAccessible::ROLE_TREE_TABLE) {
// In most cases, html table is used as container to arrange the webpage,
// not to represent a "real" table with practical colum, colum heaer, row.
// So, only add maiInterfaceTable for XUL table.
nsCOMPtr<nsIAccessibleTable> accessInterfaceTable;
QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accessInterfaceTable));
if (accessInterfaceTable) {
MaiInterfaceTable *maiInterfaceTable = new MaiInterfaceTable(this);
NS_ENSURE_TRUE(maiInterfaceTable, NS_ERROR_OUT_OF_MEMORY);
rv = AddMaiInterface(maiInterfaceTable);
NS_ENSURE_SUCCESS(rv, rv);
}
}
return rv;
}
nsresult
nsAccessibleWrap::AddMaiInterface(MaiInterface *aMaiIface)
{
NS_ENSURE_ARG_POINTER(aMaiIface);
MaiInterfaceType aMaiIfaceType = aMaiIface->GetType();
if ((aMaiIfaceType <= MAI_INTERFACE_INVALID) ||
(aMaiIfaceType >= MAI_INTERFACE_NUM))
return NS_ERROR_FAILURE;
// if same type of If has been added, release previous one
if (mInterfaces[aMaiIfaceType]) {
delete mInterfaces[aMaiIfaceType];
}
mInterfaces[aMaiIfaceType] = aMaiIface;
mInterfaceCount++;
return NS_OK;
}
MaiInterface *
nsAccessibleWrap::GetMaiInterface(PRInt16 aIfaceType)
{
NS_ENSURE_TRUE(aIfaceType > MAI_INTERFACE_INVALID, nsnull);
NS_ENSURE_TRUE(aIfaceType < MAI_INTERFACE_NUM, nsnull);
return mInterfaces[aIfaceType];
}
static GType
GetMaiAtkType(const PRUint32 & interfaceCount, MaiInterface **interfaces)
{
GType type;
static const GTypeInfo tinfo = {
sizeof(MaiAtkObjectClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) NULL,
(GClassFinalizeFunc) NULL,
NULL, /* class data */
sizeof(MaiAtkObject), /* instance size */
0, /* nb preallocs */
(GInstanceInitFunc) NULL,
NULL /* value table */
};
if (interfaceCount == 0)
return MAI_TYPE_ATK_OBJECT;
type = g_type_register_static(MAI_TYPE_ATK_OBJECT,
GetUniqueMaiAtkTypeName(),
&tinfo, GTypeFlags(0));
for (int index = 0; index < MAI_INTERFACE_NUM; index++) {
if (!interfaces[index])
continue;
g_type_add_interface_static(type,
interfaces[index]->GetAtkType(),
interfaces[index]->GetInterfaceInfo());
}
return type;
}
static const char *
GetUniqueMaiAtkTypeName(void)
{
#define MAI_ATK_TYPE_NAME_LEN (30) /* 10+sizeof(gulong)*8/4+1 < 30 */
static PRUint32 atkTypeNameIndex = 0;
static gchar namePrefix[] = "MaiAtkType"; /* size = 10 */
static gchar name[MAI_ATK_TYPE_NAME_LEN + 1];
sprintf(name, "%s%x", namePrefix, atkTypeNameIndex++);
name[MAI_ATK_TYPE_NAME_LEN] = '\0';
MAI_LOG_DEBUG(("MaiWidget::LastedTypeName=%s\n", name));
return name;
}
/******************************************************************************
The following nsIAccessible states aren't translated, just ignored.
STATE_MIXED: For a three-state check box.
STATE_READONLY: The object is designated read-only.
STATE_HOTTRACKED: Means its appearance has changed to indicate mouse
over it.
STATE_FLOATING: Not supported yet.
STATE_MARQUEED: Indicate scrolling or moving text or graphics.
STATE_ANIMATED:
STATE_OFFSCREEN: Has no on-screen representation.
STATE_MOVEABLE:
STATE_SELFVOICING: The object has self-TTS.
STATE_LINKED: The object is formatted as a hyperlink.
STATE_TRAVERSE: The object is a hyperlink that has been visited.
STATE_EXTSELECTABLE: Indicates that an object extends its selectioin.
STATE_ALERT_LOW: Not supported yet.
STATE_ALERT_MEDIUM: Not supported yet.
STATE_ALERT_HIGH: Not supported yet.
STATE_PROTECTED: The object is a password-protected edit control.
STATE_HASPOPUP: Object displays a pop-up menu or window when invoked.
Returned AtkStatusSet never contain the following AtkStates.
ATK_STATE_ARMED: Indicates that the object is armed.
ATK_STATE_DEFUNCT: Indicates the user interface object corresponding to
thus object no longer exists.
ATK_STATE_HORIZONTAL:Indicates the orientation of this object is horizontal.
ATK_STATE_ICONIFIED:
ATK_STATE_OPAQUE: Indicates the object paints every pixel within its
rectangular region
ATK_STATE_STALE: The index associated with this object has changed since
the user accessed the object
******************************************************************************/
void
nsAccessibleWrap::TranslateStates(PRUint32 aState, PRUint32 aExtState, void *aAtkStateSet)
{
if (!aAtkStateSet)
return;
AtkStateSet *state_set = NS_STATIC_CAST(AtkStateSet *, aAtkStateSet);
if (aState & nsIAccessible::STATE_SELECTED)
atk_state_set_add_state (state_set, ATK_STATE_SELECTED);
if (aState & nsIAccessible::STATE_FOCUSED)
atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);
if (aState & nsIAccessible::STATE_PRESSED)
atk_state_set_add_state (state_set, ATK_STATE_PRESSED);
if (aState & nsIAccessible::STATE_CHECKED)
atk_state_set_add_state (state_set, ATK_STATE_CHECKED);
if (aState & nsIAccessible::STATE_EXPANDED)
atk_state_set_add_state (state_set, ATK_STATE_EXPANDED);
if (aState & nsIAccessible::STATE_COLLAPSED)
atk_state_set_add_state (state_set, ATK_STATE_EXPANDABLE);
// The control can't accept input at this time
if (aState & nsIAccessible::STATE_BUSY)
atk_state_set_add_state (state_set, ATK_STATE_BUSY);
if (aState & nsIAccessible::STATE_FOCUSABLE)
atk_state_set_add_state (state_set, ATK_STATE_FOCUSABLE);
if (!(aState & nsIAccessible::STATE_INVISIBLE))
atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);
if (aState & nsIAccessible::STATE_SELECTABLE)
atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
if (aState & nsIAccessible::STATE_SIZEABLE)
atk_state_set_add_state (state_set, ATK_STATE_RESIZABLE);
if (aState & nsIAccessible::STATE_MULTISELECTABLE)
atk_state_set_add_state (state_set, ATK_STATE_MULTISELECTABLE);
if (!(aState & nsIAccessible::STATE_UNAVAILABLE)) {
atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
}
if (aState & nsIAccessible::STATE_INVALID)
atk_state_set_add_state (state_set, ATK_STATE_INVALID);
#ifdef ATK_STATE_DEFAULT
if (aState & nsIAccessible::STATE_DEFAULT)
atk_state_set_add_state (state_set, ATK_STATE_DEFAULT);
#endif
#ifdef ATK_STATE_REQUIRED
if (aState & nsIAccessible::STATE_REQUIRED)
atk_state_set_add_state (state_set, ATK_STATE_REQUIRED);
#endif
// The following state is
// Extended state flags (for now non-MSAA, for Java and Gnome/ATK support)
if (aExtState & nsIAccessible::EXT_STATE_ACTIVE)
atk_state_set_add_state (state_set, ATK_STATE_ACTIVE);
if (aExtState & nsIAccessible::EXT_STATE_EXPANDABLE)
atk_state_set_add_state (state_set, ATK_STATE_EXPANDABLE);
if (aExtState & nsIAccessible::EXT_STATE_MODAL)
atk_state_set_add_state (state_set, ATK_STATE_MODAL);
if (aExtState & nsIAccessible::EXT_STATE_MULTI_LINE)
atk_state_set_add_state (state_set, ATK_STATE_MULTI_LINE);
if (aExtState & nsIAccessible::EXT_STATE_SENSITIVE)
atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
if (aExtState & nsIAccessible::EXT_STATE_SHOWING)
atk_state_set_add_state (state_set, ATK_STATE_SHOWING);
if (aExtState & nsIAccessible::EXT_STATE_SINGLE_LINE)
atk_state_set_add_state (state_set, ATK_STATE_SINGLE_LINE);
if (aExtState & nsIAccessible::EXT_STATE_TRANSIENT)
atk_state_set_add_state (state_set, ATK_STATE_TRANSIENT);
if (aExtState & nsIAccessible::EXT_STATE_VERTICAL)
atk_state_set_add_state (state_set, ATK_STATE_VERTICAL);
if (aState & nsIAccessible::EXT_STATE_EDITABLE)
atk_state_set_add_state (state_set, ATK_STATE_EDITABLE);
}
PRBool nsAccessibleWrap::IsValidObject()
{
// to ensure we are not shut down
return (mDOMNode != nsnull);
}
/* static functions for ATK callbacks */
void
classInitCB(AtkObjectClass *aClass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(aClass);
parent_class = g_type_class_peek_parent(aClass);
aClass->get_name = getNameCB;
aClass->get_description = getDescriptionCB;
aClass->get_parent = getParentCB;
aClass->get_n_children = getChildCountCB;
aClass->ref_child = refChildCB;
aClass->get_index_in_parent = getIndexInParentCB;
aClass->get_role = getRoleCB;
aClass->ref_state_set = refStateSetCB;
aClass->ref_relation_set = refRelationSetCB;
aClass->initialize = initializeCB;
gobject_class->finalize = finalizeCB;
mai_atk_object_signals [ACTIVATE] =
g_signal_new ("activate",
MAI_TYPE_ATK_OBJECT,
G_SIGNAL_RUN_LAST,
0, /* default signal handler */
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
mai_atk_object_signals [CREATE] =
g_signal_new ("create",
MAI_TYPE_ATK_OBJECT,
G_SIGNAL_RUN_LAST,
0, /* default signal handler */
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
mai_atk_object_signals [DEACTIVATE] =
g_signal_new ("deactivate",
MAI_TYPE_ATK_OBJECT,
G_SIGNAL_RUN_LAST,
0, /* default signal handler */
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
mai_atk_object_signals [DESTROY] =
g_signal_new ("destroy",
MAI_TYPE_ATK_OBJECT,
G_SIGNAL_RUN_LAST,
0, /* default signal handler */
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
mai_atk_object_signals [MAXIMIZE] =
g_signal_new ("maximize",
MAI_TYPE_ATK_OBJECT,
G_SIGNAL_RUN_LAST,
0, /* default signal handler */
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
mai_atk_object_signals [MINIMIZE] =
g_signal_new ("minimize",
MAI_TYPE_ATK_OBJECT,
G_SIGNAL_RUN_LAST,
0, /* default signal handler */
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
mai_atk_object_signals [RESIZE] =
g_signal_new ("resize",
MAI_TYPE_ATK_OBJECT,
G_SIGNAL_RUN_LAST,
0, /* default signal handler */
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
mai_atk_object_signals [RESTORE] =
g_signal_new ("restore",
MAI_TYPE_ATK_OBJECT,
G_SIGNAL_RUN_LAST,
0, /* default signal handler */
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
void
initializeCB(AtkObject *aAtkObj, gpointer aData)
{
NS_ASSERTION((MAI_IS_ATK_OBJECT(aAtkObj)), "Invalid AtkObject");
NS_ASSERTION(aData, "Invalid Data to init AtkObject");
if (!aAtkObj || !aData)
return;
/* call parent init function */
/* AtkObjectClass has not a "initialize" function now,
* maybe it has later
*/
if (ATK_OBJECT_CLASS(parent_class)->initialize)
ATK_OBJECT_CLASS(parent_class)->initialize(aAtkObj, aData);
/* initialize object */
MAI_ATK_OBJECT(aAtkObj)->accWrap =
NS_STATIC_CAST(nsAccessibleWrap*, aData);
#ifdef MAI_LOGGING
++sMaiAtkObjCreated;
#endif
MAI_LOG_DEBUG(("MaiAtkObj Create obj=%p for AccWrap=%p, all=%d, left=%d\n",
(void*)aAtkObj, (void*)aData, sMaiAtkObjCreated,
(sMaiAtkObjCreated-sMaiAtkObjDeleted)));
}
void
finalizeCB(GObject *aObj)
{
if (!MAI_IS_ATK_OBJECT(aObj))
return;
NS_ASSERTION(MAI_ATK_OBJECT(aObj)->accWrap == nsnull, "AccWrap NOT null");
#ifdef MAI_LOGGING
++sMaiAtkObjDeleted;
#endif
MAI_LOG_DEBUG(("MaiAtkObj Delete obj=%p, all=%d, left=%d\n",
(void*)aObj, sMaiAtkObjCreated,
(sMaiAtkObjCreated-sMaiAtkObjDeleted)));
// call parent finalize function
// finalize of GObjectClass will unref the accessible parent if has
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize(aObj);
}
const gchar *
getNameCB(AtkObject *aAtkObj)
{
NS_ENSURE_SUCCESS(CheckMaiAtkObject(aAtkObj), nsnull);
nsAutoString uniName;
nsAccessibleWrap *accWrap =
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
/* nsIAccessible is responsible for the non-NULL name */
nsresult rv = accWrap->GetName(uniName);
NS_ENSURE_SUCCESS(rv, nsnull);
if (uniName.Length() > 0) {
NS_ConvertUTF8toUTF16 objName(aAtkObj->name);
if (!uniName.Equals(objName)) {
atk_object_set_name(aAtkObj,
NS_ConvertUTF16toUTF8(uniName).get());
}
}
return aAtkObj->name;
}
const gchar *
getDescriptionCB(AtkObject *aAtkObj)
{
NS_ENSURE_SUCCESS(CheckMaiAtkObject(aAtkObj), nsnull);
if (!aAtkObj->description) {
gint len;
nsAutoString uniDesc;
nsAccessibleWrap *accWrap =
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
/* nsIAccessible is responsible for the non-NULL description */
nsresult rv = accWrap->GetDescription(uniDesc);
NS_ENSURE_SUCCESS(rv, nsnull);
len = uniDesc.Length();
if (len > 0) {
atk_object_set_description(aAtkObj,
NS_ConvertUTF16toUTF8(uniDesc).get());
}
}
return aAtkObj->description;
}
AtkRole
getRoleCB(AtkObject *aAtkObj)
{
NS_ENSURE_SUCCESS(CheckMaiAtkObject(aAtkObj), ATK_ROLE_INVALID);
if (aAtkObj->role == ATK_ROLE_INVALID) {
nsAccessibleWrap *accWrap =
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
PRUint32 accRole;
nsresult rv = accWrap->GetFinalRole(&accRole);
NS_ENSURE_SUCCESS(rv, ATK_ROLE_INVALID);
//the cross-platform Accessible object returns the same value for
//both "ROLE_MENUITEM" and "ROLE_MENUPOPUP"
if (accRole == nsIAccessible::ROLE_MENUITEM) {
PRInt32 childCount = 0;
accWrap->GetChildCount(&childCount);
if (childCount > 0)
accRole = nsIAccessible::ROLE_MENUPOPUP;
}
else if (accRole == nsIAccessible::ROLE_LINK) {
//ATK doesn't have role-link now
//register it on runtime
static AtkRole linkRole = (AtkRole)0;
if (linkRole == 0) {
linkRole = atk_role_register("hyper link");
}
accRole = linkRole;
}
#ifndef ATK_ROLE_AUTOCOMPLETE
else if (accRole == nsIAccessible::ROLE_AUTOCOMPLETE) {
accRole == ATK_ROLE_COMBO_BOX;
}
#endif
#ifndef ATK_ROLE_CAPTION
else if (accRole == nsIAccessible::ROLE_CAPTION) {
accRole == ATK_ROLE_LABEL;
}
#endif
aAtkObj->role = NS_STATIC_CAST(AtkRole, accRole);
}
return aAtkObj->role;
}
AtkObject *
getParentCB(AtkObject *aAtkObj)
{
NS_ENSURE_SUCCESS(CheckMaiAtkObject(aAtkObj), nsnull);
nsAccessibleWrap *accWrap =
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
nsCOMPtr<nsIAccessible> accParent;
nsresult rv = accWrap->GetParent(getter_AddRefs(accParent));
if (NS_FAILED(rv) || !accParent)
return nsnull;
nsIAccessible *tmpParent = accParent;
nsAccessibleWrap *accWrapParent = NS_STATIC_CAST(nsAccessibleWrap *,
tmpParent);
AtkObject *parentAtkObj = accWrapParent->GetAtkObject();
if (parentAtkObj && !aAtkObj->accessible_parent) {
atk_object_set_parent(aAtkObj, parentAtkObj);
}
return parentAtkObj;
}
gint
getChildCountCB(AtkObject *aAtkObj)
{
NS_ENSURE_SUCCESS(CheckMaiAtkObject(aAtkObj), 0);
nsAccessibleWrap *accWrap =
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
PRInt32 count = 0;
accWrap->GetChildCount(&count);
return count;
}
AtkObject *
refChildCB(AtkObject *aAtkObj, gint aChildIndex)
{
NS_ENSURE_SUCCESS(CheckMaiAtkObject(aAtkObj), nsnull);
nsAccessibleWrap *accWrap =
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
nsresult rv;
nsCOMPtr<nsIAccessible> accChild;
rv = accWrap->GetChildAt(aChildIndex, getter_AddRefs(accChild));
if (NS_FAILED(rv) || !accChild)
return nsnull;
nsIAccessible *tmpAccChild = accChild;
nsAccessibleWrap *accWrapChild =
NS_STATIC_CAST(nsAccessibleWrap*, tmpAccChild);
//this will addref parent
AtkObject *childAtkObj = accWrapChild->GetAtkObject();
NS_ASSERTION(childAtkObj, "Fail to get AtkObj");
if (!childAtkObj)
return nsnull;
atk_object_set_parent(childAtkObj,
accWrap->GetAtkObject());
g_object_ref(childAtkObj);
return childAtkObj;
}
gint
getIndexInParentCB(AtkObject *aAtkObj)
{
NS_ENSURE_SUCCESS(CheckMaiAtkObject(aAtkObj), -1);
nsAccessibleWrap *accWrap =
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
PRInt32 currentIndex = -1;
accWrap->GetIndexInParent(&currentIndex);
return currentIndex;
}
AtkStateSet *
refStateSetCB(AtkObject *aAtkObj)
{
AtkStateSet *state_set = nsnull;
state_set = ATK_OBJECT_CLASS(parent_class)->ref_state_set(aAtkObj);
NS_ENSURE_SUCCESS(CheckMaiAtkObject(aAtkObj), state_set);
nsAccessibleWrap *accWrap =
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
PRUint32 accState = 0;
nsresult rv = accWrap->GetFinalState(&accState);
NS_ENSURE_SUCCESS(rv, state_set);
PRUint32 accExtState = 0;
rv = accWrap->GetExtState(&accExtState);
NS_ENSURE_SUCCESS(rv, state_set);
if ((accState == 0) && (accExtState == 0))
return state_set;
nsAccessibleWrap::TranslateStates(accState, accExtState, state_set);
return state_set;
}
AtkRelationSet *
refRelationSetCB(AtkObject *aAtkObj)
{
AtkRelationSet *relation_set = nsnull;
relation_set = ATK_OBJECT_CLASS(parent_class)->ref_relation_set(aAtkObj);
NS_ENSURE_SUCCESS(CheckMaiAtkObject(aAtkObj), relation_set);
nsAccessibleWrap *accWrap =
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
AtkObject *accessible_array[1];
AtkRelation* relation;
PRUint32 relationType[2] = {nsIAccessible::RELATION_LABELLED_BY,
nsIAccessible::RELATION_LABEL_FOR};
for (PRUint32 i = 0; i <= 1; i++) {
if (!atk_relation_set_contains(relation_set, NS_STATIC_CAST(AtkRelationType, relationType[i]))) {
nsIAccessible* accRelated;
nsresult rv = accWrap->GetAccessibleRelated(relationType[i], &accRelated);
if (NS_SUCCEEDED(rv) && accRelated) {
accessible_array[0] = NS_STATIC_CAST(nsAccessibleWrap*, accRelated)->GetAtkObject();
relation = atk_relation_new(accessible_array, 1,
NS_STATIC_CAST(AtkRelationType, relationType[i]));
atk_relation_set_add(relation_set, relation);
}
}
}
return relation_set;
}
// Check if aAtkObj is a valid MaiAtkObject
nsresult
CheckMaiAtkObject(AtkObject *aAtkObj)
{
NS_ENSURE_ARG(MAI_IS_ATK_OBJECT(aAtkObj));
nsAccessibleWrap * tmpAccWrap = MAI_ATK_OBJECT(aAtkObj)->accWrap;
if (tmpAccWrap == nsnull)
return NS_ERROR_INVALID_POINTER;
if (tmpAccWrap != nsAppRootAccessible::Create() && !tmpAccWrap->IsValidObject())
return NS_ERROR_INVALID_POINTER;
if (tmpAccWrap->GetAtkObject() != aAtkObj)
return NS_ERROR_FAILURE;
return NS_OK;
}
// Check if aAtkObj is a valid MaiAtkObject, and return the nsAccessibleWrap
// for it.
nsAccessibleWrap *GetAccessibleWrap(AtkObject *aAtkObj)
{
NS_ENSURE_TRUE(MAI_IS_ATK_OBJECT(aAtkObj), nsnull);
nsAccessibleWrap * tmpAccWrap = MAI_ATK_OBJECT(aAtkObj)->accWrap;
NS_ENSURE_TRUE(tmpAccWrap != nsnull, nsnull);
NS_ENSURE_TRUE(tmpAccWrap->GetAtkObject() == aAtkObj, nsnull);
return tmpAccWrap;
}

View File

@@ -1,100 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* John Sun (john.sun@sun.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 __NS_ACCESSIBLE_WRAP_H__
#define __NS_ACCESSIBLE_WRAP_H__
#include "nsCOMPtr.h"
#include "nsAccessible.h"
#include "prlog.h"
#ifdef PR_LOGGING
#define MAI_LOGGING
#endif /* #ifdef PR_LOGGING */
class nsAccessibleWrap;
class MaiInterface;
struct _AtkObject;
typedef struct _AtkObject AtkObject;
/**
* nsAccessibleWrap, and its descendents in atk directory provide the
* implementation of AtkObject.
*/
class nsAccessibleWrap: public nsAccessible
{
public:
nsAccessibleWrap(nsIDOMNode*, nsIWeakReference *aShell);
virtual ~nsAccessibleWrap();
#ifdef MAI_LOGGING
virtual void DumpnsAccessibleWrapInfo(int aDepth) {}
static PRInt32 mAccWrapCreated;
static PRInt32 mAccWrapDeleted;
#endif
public:
// return the atk object for this nsAccessibleWrap
NS_IMETHOD GetNativeInterface(void **aOutAccessible);
NS_IMETHOD GetExtState(PRUint32 *aState);
AtkObject * GetAtkObject(void);
MaiInterface *GetMaiInterface(PRInt16 aIfaceType);
PRBool IsValidObject();
static void TranslateStates(PRUint32 aState,
PRUint32 aExtState,
void *aAtkStateSet);
protected:
AtkObject *mMaiAtkObject;
private:
nsresult CreateMaiInterfaces(void);
nsresult AddMaiInterface(MaiInterface *aMaiIface);
MaiInterface **mInterfaces;
PRUint32 mInterfaceCount;
};
#endif /* __NS_ACCESSIBLE_WRAP_H__ */

View File

@@ -1,842 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* Ginn Chen (ginn.chen@sun.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 "nsCOMPtr.h"
#include "nsMai.h"
#include "nsAppRootAccessible.h"
#include "prlink.h"
#include "nsIServiceManager.h"
#include <gtk/gtk.h>
#include <atk/atk.h>
/* maiutil */
static guint mai_util_add_global_event_listener(GSignalEmissionHook listener,
const gchar *event_type);
static void mai_util_remove_global_event_listener(guint remove_listener);
static guint mai_util_add_key_event_listener(AtkKeySnoopFunc listener,
gpointer data);
static void mai_util_remove_key_event_listener(guint remove_listener);
static AtkObject *mai_util_get_root(void);
static G_CONST_RETURN gchar *mai_util_get_toolkit_name(void);
static G_CONST_RETURN gchar *mai_util_get_toolkit_version(void);
/* Misc */
static void _listener_info_destroy(gpointer data);
static guint add_listener (GSignalEmissionHook listener,
const gchar *object_type,
const gchar *signal,
const gchar *hook_data);
static AtkKeyEventStruct *atk_key_event_from_gdk_event_key(GdkEventKey *key);
static gboolean notify_hf(gpointer key, gpointer value, gpointer data);
static void insert_hf(gpointer key, gpointer value, gpointer data);
static gboolean remove_hf(gpointer key, gpointer value, gpointer data);
static gint mai_key_snooper(GtkWidget *the_widget, GdkEventKey *event,
gpointer func_data);
static void value_destroy_func(gpointer data);
static GHashTable *listener_list = NULL;
static gint listener_idx = 1;
typedef struct _MaiUtilListenerInfo MaiUtilListenerInfo;
#define MAI_TYPE_UTIL (mai_util_get_type ())
#define MAI_UTIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
MAI_TYPE_UTIL, MaiUtil))
#define MAI_UTIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
MAI_TYPE_UTIL, MaiUtilClass))
#define MAI_IS_UTIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
MAI_TYPE_UTIL))
#define MAI_IS_UTIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
MAI_TYPE_UTIL))
#define MAI_UTIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
MAI_TYPE_UTIL, MaiUtilClass))
typedef struct _MaiUtil MaiUtil;
typedef struct _MaiUtilClass MaiUtilClass;
static GHashTable *key_listener_list = NULL;
static guint key_snooper_id = 0;
G_BEGIN_DECLS
typedef void (*GnomeAccessibilityInit) (void);
typedef void (*GnomeAccessibilityShutdown) (void);
G_END_DECLS
struct _MaiUtil
{
AtkUtil parent;
GList *listener_list;
};
struct MaiKeyListenerInfo
{
AtkKeySnoopFunc listener;
gpointer data;
};
struct GnomeAccessibilityModule
{
const char *libName;
PRLibrary *lib;
const char *initName;
GnomeAccessibilityInit init;
const char *shutdownName;
GnomeAccessibilityShutdown shutdown;
};
GType mai_util_get_type (void);
static void mai_util_class_init(MaiUtilClass *klass);
struct _MaiUtilClass
{
AtkUtilClass parent_class;
};
/* supporting */
PRLogModuleInfo *gMaiLog = NULL;
#define MAI_VERSION "0.0.6"
#define MAI_NAME "mozilla"
struct _MaiUtilListenerInfo
{
gint key;
guint signal_id;
gulong hook_id;
};
static GnomeAccessibilityModule sAtkBridge = {
#ifdef AIX
"libatk-bridge.a(libatk-bridge.so.0)", NULL,
#else
"libatk-bridge.so", NULL,
#endif
"gnome_accessibility_module_init", NULL,
"gnome_accessibility_module_shutdown", NULL,
};
GType
mai_util_get_type(void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo tinfo = {
sizeof(MaiUtilClass),
(GBaseInitFunc) NULL, /* base init */
(GBaseFinalizeFunc) NULL, /* base finalize */
(GClassInitFunc) mai_util_class_init, /* class init */
(GClassFinalizeFunc) NULL, /* class finalize */
NULL, /* class data */
sizeof(MaiUtil), /* instance size */
0, /* nb preallocs */
(GInstanceInitFunc) NULL, /* instance init */
NULL /* value table */
};
type = g_type_register_static(ATK_TYPE_UTIL,
"MaiUtil", &tinfo, GTypeFlags(0));
}
return type;
}
/* intialize the the atk interface (function pointers) with MAI implementation.
* When atk bridge get loaded, these interface can be used.
*/
static void
mai_util_class_init(MaiUtilClass *klass)
{
AtkUtilClass *atk_class;
gpointer data;
data = g_type_class_peek(ATK_TYPE_UTIL);
atk_class = ATK_UTIL_CLASS(data);
atk_class->add_global_event_listener =
mai_util_add_global_event_listener;
atk_class->remove_global_event_listener =
mai_util_remove_global_event_listener;
atk_class->add_key_event_listener = mai_util_add_key_event_listener;
atk_class->remove_key_event_listener = mai_util_remove_key_event_listener;
atk_class->get_root = mai_util_get_root;
atk_class->get_toolkit_name = mai_util_get_toolkit_name;
atk_class->get_toolkit_version = mai_util_get_toolkit_version;
listener_list = g_hash_table_new_full(g_int_hash, g_int_equal, NULL,
_listener_info_destroy);
}
static guint
mai_util_add_global_event_listener(GSignalEmissionHook listener,
const gchar *event_type)
{
guint rc = 0;
gchar **split_string;
split_string = g_strsplit (event_type, ":", 3);
if (split_string) {
if (!strcmp ("window", split_string[0])) {
/* ???
static gboolean initialized = FALSE;
if (!initialized) {
do_window_event_initialization ();
initialized = TRUE;
}
rc = add_listener (listener, "MaiWindow",
split_string[1], event_type);
*/
rc = add_listener (listener, "MaiAtkObject", split_string[1], event_type);
}
else {
rc = add_listener (listener, split_string[1], split_string[2],
event_type);
}
}
return rc;
}
static void
mai_util_remove_global_event_listener(guint remove_listener)
{
if (remove_listener > 0) {
MaiUtilListenerInfo *listener_info;
gint tmp_idx = remove_listener;
listener_info = (MaiUtilListenerInfo *)
g_hash_table_lookup(listener_list, &tmp_idx);
if (listener_info != NULL) {
/* Hook id of 0 and signal id of 0 are invalid */
if (listener_info->hook_id != 0 && listener_info->signal_id != 0) {
/* Remove the emission hook */
g_signal_remove_emission_hook(listener_info->signal_id,
listener_info->hook_id);
/* Remove the element from the hash */
g_hash_table_remove(listener_list, &tmp_idx);
}
else {
/* do not use g_warning with such complex format args, */
/* Forte CC can not preprocess it correctly */
g_log((gchar *)0, G_LOG_LEVEL_WARNING,
"Invalid listener hook_id %ld or signal_id %d\n",
listener_info->hook_id, listener_info->signal_id);
}
}
else {
/* do not use g_warning with such complex format args, */
/* Forte CC can not preprocess it correctly */
g_log((gchar *)0, G_LOG_LEVEL_WARNING,
"No listener with the specified listener id %d",
remove_listener);
}
}
else {
g_warning("Invalid listener_id %d", remove_listener);
}
}
static AtkKeyEventStruct *
atk_key_event_from_gdk_event_key (GdkEventKey *key)
{
AtkKeyEventStruct *event = g_new0(AtkKeyEventStruct, 1);
switch (key->type) {
case GDK_KEY_PRESS:
event->type = ATK_KEY_EVENT_PRESS;
break;
case GDK_KEY_RELEASE:
event->type = ATK_KEY_EVENT_RELEASE;
break;
default:
g_assert_not_reached ();
return NULL;
}
event->state = key->state;
event->keyval = key->keyval;
event->length = key->length;
if (key->string && key->string [0] &&
(key->state & GDK_CONTROL_MASK ||
g_unichar_isgraph (g_utf8_get_char (key->string)))) {
event->string = key->string;
}
else if (key->type == GDK_KEY_PRESS ||
key->type == GDK_KEY_RELEASE) {
event->string = gdk_keyval_name (key->keyval);
}
event->keycode = key->hardware_keycode;
event->timestamp = key->time;
MAI_LOG_DEBUG(("MaiKey:\tsym %u\n\tmods %x\n\tcode %u\n\ttime %lx\n",
(unsigned int) event->keyval,
(unsigned int) event->state,
(unsigned int) event->keycode,
(unsigned long int) event->timestamp));
return event;
}
static gboolean
notify_hf(gpointer key, gpointer value, gpointer data)
{
AtkKeyEventStruct *event = (AtkKeyEventStruct *) data;
MaiKeyListenerInfo *info = (MaiKeyListenerInfo *)value;
return (*(info->listener))(event, info->data) ? TRUE : FALSE;
}
static void
value_destroy_func(gpointer data)
{
g_free(data);
}
static void
insert_hf(gpointer key, gpointer value, gpointer data)
{
GHashTable *new_table = (GHashTable *) data;
g_hash_table_insert (new_table, key, value);
}
static gboolean
remove_hf(gpointer key, gpointer value, gpointer data)
{
AtkKeySnoopFunc listener = (AtkKeySnoopFunc)data;
MaiKeyListenerInfo *info = (MaiKeyListenerInfo *)value;
if (info->listener == listener)
return TRUE;
return FALSE;
}
static gint
mai_key_snooper(GtkWidget *the_widget, GdkEventKey *event, gpointer func_data)
{
/* notify each AtkKeySnoopFunc in turn... */
gint consumed = 0;
if (key_listener_list) {
AtkKeyEventStruct *keyEvent = atk_key_event_from_gdk_event_key(event);
GHashTable *new_hash = g_hash_table_new(NULL, NULL);
g_hash_table_foreach (key_listener_list, insert_hf, new_hash);
consumed = g_hash_table_foreach_steal (new_hash, notify_hf, keyEvent);
g_hash_table_destroy (new_hash);
g_free (keyEvent);
}
return (consumed ? 1 : 0);
}
static guint
mai_util_add_key_event_listener (AtkKeySnoopFunc listener,
gpointer data)
{
NS_ENSURE_TRUE(listener, 0);
static guint key=0;
MaiKeyListenerInfo *info = g_new0(MaiKeyListenerInfo, 1);
NS_ENSURE_TRUE(info, 0);
info->listener = listener;
info->data = data;
if (!key_listener_list) {
key_listener_list = g_hash_table_new_full(NULL, NULL, NULL,
value_destroy_func);
key_snooper_id = gtk_key_snooper_install(mai_key_snooper, NULL);
}
g_hash_table_insert(key_listener_list, GUINT_TO_POINTER (key++),
(gpointer)info);
return key;
}
static void
mai_util_remove_key_event_listener (guint remove_listener)
{
g_hash_table_foreach_remove(key_listener_list, remove_hf,
(gpointer)remove_listener);
if (g_hash_table_size(key_listener_list) == 0) {
gtk_key_snooper_remove(key_snooper_id);
}
}
AtkObject *
mai_util_get_root(void)
{
nsAppRootAccessible *root = nsAppRootAccessible::Create();
if (!root)
return nsnull;
return root->GetAtkObject();
}
G_CONST_RETURN gchar *
mai_util_get_toolkit_name(void)
{
return MAI_NAME;
}
G_CONST_RETURN gchar *
mai_util_get_toolkit_version(void)
{
return MAI_VERSION;
}
void
_listener_info_destroy(gpointer data)
{
g_free(data);
}
guint
add_listener (GSignalEmissionHook listener,
const gchar *object_type,
const gchar *signal,
const gchar *hook_data)
{
GType type;
guint signal_id;
gint rc = 0;
type = g_type_from_name(object_type);
if (type) {
signal_id = g_signal_lookup(signal, type);
if (signal_id > 0) {
MaiUtilListenerInfo *listener_info;
rc = listener_idx;
listener_info = (MaiUtilListenerInfo *)
g_malloc(sizeof(MaiUtilListenerInfo));
listener_info->key = listener_idx;
listener_info->hook_id =
g_signal_add_emission_hook(signal_id, 0, listener,
g_strdup(hook_data),
(GDestroyNotify)g_free);
listener_info->signal_id = signal_id;
g_hash_table_insert(listener_list, &(listener_info->key),
listener_info);
listener_idx++;
}
else {
g_warning("Invalid signal type %s\n", signal);
}
}
else {
g_warning("Invalid object type %s\n", object_type);
}
return rc;
}
// currently support one child
nsRootAccessibleWrap *sOnlyChild = nsnull;
static nsresult LoadGtkModule(GnomeAccessibilityModule& aModule);
nsAppRootAccessible::nsAppRootAccessible():
nsAccessibleWrap(nsnull, nsnull),
mChildren(nsnull),
mInitialized(PR_FALSE)
{
MAI_LOG_DEBUG(("======Create AppRootAcc=%p\n", (void*)this));
}
nsAppRootAccessible::~nsAppRootAccessible()
{
MAI_LOG_DEBUG(("======Destory AppRootAcc=%p\n", (void*)this));
}
/* virtual functions */
#if 0
#ifdef MAI_LOGGING
void
nsAppRootAccessible::DumpMaiObjectInfo(int aDepth)
{
--aDepth;
if (aDepth < 0)
return;
g_print("nsAppRootAccessible: this=0x%x, aDepth=%d, type=%s\n",
(unsigned int)this, aDepth, "nsAppRootAccessible");
gint nChild = GetChildCount();
g_print("#child=%d<br>\n", nChild);
g_print("Iface num: 1=component, 2=action, 3=value, 4=editabletext,"
"5=hyperlink, 6=hypertext, 7=selection, 8=table, 9=text\n");
g_print("<ul>\n");
MaiObject *maiChild;
for (int childIndex = 0; childIndex < nChild; childIndex++) {
maiChild = RefChild(childIndex);
if (maiChild) {
g_print(" <li>");
maiChild->DumpMaiObjectInfo(aDepth);
}
}
g_print("</ul>\n");
g_print("End of nsAppRootAccessible: this=0x%x, type=%s\n<br>",
(unsigned int)this, "nsAppRootAccessible");
}
#endif
#endif
NS_IMETHODIMP nsAppRootAccessible::Init()
{
NS_ASSERTION((mInitialized == FALSE), "Init AppRoot Again!!");
if (mInitialized == PR_TRUE)
return NS_OK;
MAI_LOG_DEBUG(("Mozilla Atk Implementation initializing\n"));
g_type_init();
// Initialize the MAI Utility class
g_type_class_unref(g_type_class_ref(MAI_TYPE_UTIL));
// load and initialize atk-bridge library
nsresult rv = LoadGtkModule(sAtkBridge);
if (NS_SUCCEEDED(rv)) {
// init atk-bridge
(*sAtkBridge.init)();
}
else
MAI_LOG_DEBUG(("Fail to load lib: %s\n", sAtkBridge.libName));
rv = NS_NewArray(getter_AddRefs(mChildren));
return rv;
}
NS_IMETHODIMP nsAppRootAccessible::Shutdown()
{
nsAppRootAccessible *root = nsAppRootAccessible::Create();
if (root)
NS_IF_RELEASE(root);
if (sAtkBridge.lib) {
if (sAtkBridge.shutdown)
(*sAtkBridge.shutdown)();
//Not unload atk-bridge library
//an exit function registered will take care of it
sAtkBridge.lib = NULL;
sAtkBridge.init = NULL;
sAtkBridge.shutdown = NULL;
}
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIStringBundleService> bundleService =
do_GetService(NS_STRINGBUNDLE_CONTRACTID);
NS_ASSERTION(bundleService, "String bundle service must be present!");
nsCOMPtr<nsIStringBundle> bundle;
bundleService->CreateBundle("chrome://branding/locale/brand.properties",
getter_AddRefs(bundle));
nsXPIDLString appName;
if (bundle) {
bundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(appName));
} else {
NS_WARNING("brand.properties not present, using default app name");
appName.AssignLiteral("Mozilla");
}
_retval.Assign(appName);
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetDescription(nsAString& aDescription)
{
GetName(aDescription);
aDescription.AppendLiteral(" Root Accessible");
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_APPLICATION;
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetFinalRole(PRUint32 *aFinalRole)
{
return GetRole(aFinalRole);
}
NS_IMETHODIMP nsAppRootAccessible::GetParent(nsIAccessible ** aParent)
{
*aParent = nsnull;
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetChildAt(PRInt32 aChildNum,
nsIAccessible **aChild)
{
PRUint32 count = 0;
nsresult rv = NS_OK;
*aChild = nsnull;
if (mChildren)
rv = mChildren->GetLength(&count);
NS_ENSURE_SUCCESS(rv, rv);
if (aChildNum >= NS_STATIC_CAST(PRInt32, count))
return NS_ERROR_INVALID_ARG;
nsCOMPtr<nsIWeakReference> childWeakRef;
rv = mChildren->QueryElementAt(aChildNum, NS_GET_IID(nsIWeakReference),
getter_AddRefs(childWeakRef));
if (childWeakRef) {
MAI_LOG_DEBUG(("GetChildAt(%d), has weak ref\n", aChildNum));
nsCOMPtr<nsIAccessible> childAcc = do_QueryReferent(childWeakRef);
if (childAcc) {
MAI_LOG_DEBUG(("GetChildAt(%d), has Acc Child ref\n", aChildNum));
NS_IF_ADDREF(*aChild = childAcc);
}
else
MAI_LOG_DEBUG(("GetChildAt(%d), NOT has Acc Child ref\n",
aChildNum));
}
else
MAI_LOG_DEBUG(("GetChildAt(%d), NOT has weak ref\n", aChildNum));
return rv;
}
NS_IMETHODIMP nsAppRootAccessible::GetChildCount(PRInt32 *aAccChildCount)
{
PRUint32 count = 0;
nsresult rv = NS_OK;
if (mChildren)
rv = mChildren->GetLength(&count);
if (NS_SUCCEEDED(rv)) {
MAI_LOG_DEBUG(("\nGet Acc Child OK, count=%d\n", count));
}
else
MAI_LOG_DEBUG(("\nGet Acc Child Failed, count=%d\n", count));
*aAccChildCount = NS_STATIC_CAST(PRInt32, count);
return rv;
}
NS_IMETHODIMP nsAppRootAccessible::GetFirstChild(nsIAccessible * *aFirstChild)
{
nsCOMPtr<nsIAccessible> firstChild;
*aFirstChild = nsnull;
nsresult rv = NS_OK;
rv = mChildren->QueryElementAt(0, NS_GET_IID(nsIAccessible),
getter_AddRefs(firstChild));
if (firstChild)
NS_IF_ADDREF(*aFirstChild = firstChild);
return rv;
}
NS_IMETHODIMP nsAppRootAccessible::GetNextSibling(nsIAccessible * *aNextSibling)
{
*aNextSibling = nsnull;
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetPreviousSibling(nsIAccessible * *aPreviousSibling)
{
*aPreviousSibling = nsnull;
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetNativeInterface(void **aOutAccessible)
{
*aOutAccessible = nsnull;
if (!mMaiAtkObject) {
mMaiAtkObject =
NS_REINTERPRET_CAST(AtkObject *,
g_object_new(MAI_TYPE_ATK_OBJECT, NULL));
NS_ENSURE_TRUE(mMaiAtkObject, NS_ERROR_OUT_OF_MEMORY);
atk_object_initialize(mMaiAtkObject, this);
mMaiAtkObject->role = ATK_ROLE_INVALID;
mMaiAtkObject->layer = ATK_LAYER_INVALID;
}
*aOutAccessible = mMaiAtkObject;
return NS_OK;
}
nsresult
nsAppRootAccessible::AddRootAccessible(nsRootAccessibleWrap *aRootAccWrap)
{
NS_ENSURE_ARG_POINTER(aRootAccWrap);
nsresult rv = NS_ERROR_FAILURE;
// add by weak reference
rv = mChildren->AppendElement(NS_STATIC_CAST(nsIAccessibleDocument*, aRootAccWrap),
PR_TRUE);
#ifdef MAI_LOGGING
PRUint32 count = 0;
mChildren->GetLength(&count);
if (NS_SUCCEEDED(rv)) {
MAI_LOG_DEBUG(("\nAdd RootAcc=%p OK, count=%d\n",
(void*)aRootAccWrap, count));
}
else
MAI_LOG_DEBUG(("\nAdd RootAcc=%p Failed, count=%d\n",
(void*)aRootAccWrap, count));
#endif
return rv;
}
nsresult
nsAppRootAccessible::RemoveRootAccessible(nsRootAccessibleWrap *aRootAccWrap)
{
NS_ENSURE_ARG_POINTER(aRootAccWrap);
PRUint32 index = 0;
nsresult rv = NS_ERROR_FAILURE;
// we must use weak ref to get the index
nsCOMPtr<nsIWeakReference> weakPtr =
do_GetWeakReference(NS_STATIC_CAST(nsIAccessibleDocument*, aRootAccWrap));
rv = mChildren->IndexOf(0, weakPtr, &index);
#ifdef MAI_LOGGING
PRUint32 count = 0;
mChildren->GetLength(&count);
if (NS_SUCCEEDED(rv)) {
rv = mChildren->RemoveElementAt(index);
MAI_LOG_DEBUG(("\nRemove RootAcc=%p, count=%d\n",
(void*)aRootAccWrap, (count-1)));
}
else
MAI_LOG_DEBUG(("\nFail to Remove RootAcc=%p, count=%d\n",
(void*)aRootAccWrap, count));
#else
NS_ENSURE_SUCCESS(rv, rv);
rv = mChildren->RemoveElementAt(index);
#endif
return rv;
}
nsAppRootAccessible *
nsAppRootAccessible::Create()
{
static nsAppRootAccessible *sAppRoot = nsnull;
if (!sAppRoot) {
sAppRoot = new nsAppRootAccessible();
NS_ASSERTION(sAppRoot, "OUT OF MEMORY");
if (sAppRoot) {
if (NS_FAILED(sAppRoot->Init())) {
delete sAppRoot;
sAppRoot = nsnull;
}
else
NS_IF_ADDREF(sAppRoot);
}
}
return sAppRoot;
}
static nsresult
LoadGtkModule(GnomeAccessibilityModule& aModule)
{
NS_ENSURE_ARG(aModule.libName);
if (!(aModule.lib = PR_LoadLibrary(aModule.libName))) {
MAI_LOG_DEBUG(("Fail to load lib: %s in default path\n", aModule.libName));
//try to load the module with "gtk-2.0/modules" appended
char *curLibPath = PR_GetLibraryPath();
nsCAutoString libPath(curLibPath);
libPath.Append(":/usr/lib");
MAI_LOG_DEBUG(("Current Lib path=%s\n", libPath.get()));
PR_FreeLibraryName(curLibPath);
PRInt16 loc1 = 0, loc2 = 0;
PRInt16 subLen = 0;
while (loc2 >= 0) {
loc2 = libPath.FindChar(':', loc1);
if (loc2 < 0)
subLen = libPath.Length() - loc1;
else
subLen = loc2 - loc1;
nsCAutoString sub(Substring(libPath, loc1, subLen));
sub.Append("/gtk-2.0/modules/");
sub.Append(aModule.libName);
aModule.lib = PR_LoadLibrary(sub.get());
if (aModule.lib) {
MAI_LOG_DEBUG(("Ok, load %s from %s\n", aModule.libName, sub.get()));
break;
}
loc1 = loc2+1;
}
if (!aModule.lib) {
MAI_LOG_DEBUG(("Fail to load %s\n", aModule.libName));
return NS_ERROR_FAILURE;
}
}
//we have loaded the library, try to get the function ptrs
if (!(aModule.init = PR_FindFunctionSymbol(aModule.lib,
aModule.initName)) ||
!(aModule.shutdown = PR_FindFunctionSymbol(aModule.lib,
aModule.shutdownName))) {
//fail, :(
MAI_LOG_DEBUG(("Fail to find symbol %s in %s",
aModule.init ? aModule.shutdownName : aModule.initName,
aModule.libName));
PR_UnloadLibrary(aModule.lib);
aModule.lib = NULL;
return NS_ERROR_FAILURE;
}
return NS_OK;
}

View File

@@ -1,102 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* Ginn Chen (ginn.chen@sun.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 __NS_APP_ROOT_ACCESSIBLE_H__
#define __NS_APP_ROOT_ACCESSIBLE_H__
#include "nsArray.h"
#include "nsIAccessibleDocument.h"
#include "nsAccessibilityService.h"
#include "nsAccessibleWrap.h"
#include "nsRootAccessibleWrap.h"
#define MAI_TYPE_APP_ROOT (MAI_TYPE_ATK_OBJECT)
/* nsAppRootAccessible is for the whole application of Mozilla.
* Only one instance of nsAppRootAccessible exists for one Mozilla instance.
* And this one should be created when Mozilla Startup (if accessibility
* feature has been enabled) and destroyed when Mozilla Shutdown.
*
* All the accessibility objects for toplevel windows are direct children of
* the nsAppRootAccessible instance.
*/
class nsAppRootAccessible;
class nsAppRootAccessible: public nsAccessibleWrap
{
public:
virtual ~nsAppRootAccessible();
#ifdef MAI_LOGGING
// virtual void DumpMaiObjectInfo(int aDepth);
#endif
static nsAppRootAccessible *Create();
public:
nsAppRootAccessible();
/* virtual functions from nsAccessibleNode */
NS_IMETHOD Init();
NS_IMETHOD Shutdown();
/* virtual functions from nsAccessible */
NS_IMETHOD GetName(nsAString & aName);
NS_IMETHOD GetDescription(nsAString & aDescription);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetFinalRole(PRUint32 *aFinalRole);
NS_IMETHOD GetParent(nsIAccessible * *aParent);
NS_IMETHOD GetNextSibling(nsIAccessible * *aNextSibling);
NS_IMETHOD GetPreviousSibling(nsIAccessible **aPreviousSibling);
NS_IMETHOD GetChildAt(PRInt32 aChildNum, nsIAccessible **aChild);
NS_IMETHOD GetFirstChild(nsIAccessible * *aFirstChild);
NS_IMETHOD GetChildCount(PRInt32 *aAccChildCount);
// return the atk object for app root accessible
NS_IMETHOD GetNativeInterface(void **aOutAccessible);
nsresult AddRootAccessible(nsRootAccessibleWrap *aRootAccWrap);
nsresult RemoveRootAccessible(nsRootAccessibleWrap *aRootAccWrap);
private:
nsCOMPtr<nsIMutableArray> mChildren;
PRBool mInitialized;
};
#endif /* __NS_APP_ROOT_ACCESSIBLE_H__ */

View File

@@ -1,552 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* John Sun (john.sun@sun.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 "nsMai.h"
#include "nsDocAccessibleWrap.h"
#include "nsAccessibleEventData.h"
#include <atk/atk.h>
#include <glib.h>
#include <glib-object.h>
//----- nsDocAccessibleWrap -----
/*
* Must keep sychronization with enumerate AtkProperty in
* accessible/src/base/nsAccessibleEventData.h
*/
static char * sAtkPropertyNameArray[PROP_LAST] = {
0,
"accessible_name",
"accessible_description",
"accessible_parent",
"accessible_value",
"accessible_role",
"accessible_layer",
"accessible_mdi_zorder",
"accessible_table_caption",
"accessible_table_column_description",
"accessible_table_column_header",
"accessible_table_row_description",
"accessible_table_row_header",
"accessible_table_summary"
};
static AtkStateType TranslateAState(PRUint32 aState, PRUint32 aExtState);
NS_IMPL_ISUPPORTS_INHERITED2(nsDocAccessibleWrap, nsDocAccessible, nsIAccessibleText, nsIAccessibleEditableText)
nsDocAccessibleWrap::nsDocAccessibleWrap(nsIDOMNode *aDOMNode,
nsIWeakReference *aShell):
nsDocAccessible(aDOMNode, aShell), nsAccessibleEditableText(aDOMNode)
{
}
nsDocAccessibleWrap::~nsDocAccessibleWrap()
{
}
NS_IMETHODIMP nsDocAccessibleWrap::FireToolkitEvent(PRUint32 aEvent,
nsIAccessible* aAccessible,
void* aEventData)
{
NS_ENSURE_ARG_POINTER(aAccessible);
// First fire nsIObserver event for internal xpcom accessibility clients
nsDocAccessible::FireToolkitEvent(aEvent, aAccessible, aEventData);
nsresult rv = NS_ERROR_FAILURE;
nsAccessibleWrap *accWrap =
NS_STATIC_CAST(nsAccessibleWrap *, aAccessible);
MAI_LOG_DEBUG(("\n\nReceived event: aEvent=%u, obj=0x%x, data=0x%x \n",
aEvent, aAccessible, aEventData));
nsAccessibleWrap *oldAccWrap = nsnull, *newAccWrap = nsnull;
AtkTableChange * pAtkTableChange = nsnull;
switch (aEvent) {
case nsIAccessibleEvent::EVENT_FOCUS:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_FOCUS\n"));
atk_focus_tracker_notify(accWrap->GetAtkObject());
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_STATE_CHANGE:
AtkStateChange *pAtkStateChange;
AtkStateType atkState;
MAI_LOG_DEBUG(("\n\nReceived: EVENT_STATE_CHANGE\n"));
if (!aEventData)
break;
pAtkStateChange = NS_REINTERPRET_CAST(AtkStateChange *, aEventData);
switch (pAtkStateChange->state) {
case nsIAccessible::STATE_INVISIBLE:
atkState = ATK_STATE_VISIBLE;
pAtkStateChange->enable = !pAtkStateChange->enable;
break;
case nsIAccessible::STATE_UNAVAILABLE:
atkState = ATK_STATE_ENABLED;
pAtkStateChange->enable = !pAtkStateChange->enable;
break;
case nsIAccessible::STATE_READONLY:
atkState = ATK_STATE_EDITABLE;
pAtkStateChange->enable = !pAtkStateChange->enable;
break;
default:
atkState = TranslateAState(pAtkStateChange->state, pAtkStateChange->extState);
}
atk_object_notify_state_change(accWrap->GetAtkObject(),
atkState, pAtkStateChange->enable);
rv = NS_OK;
break;
/*
* More complex than I ever thought.
* Need handle them separately.
*/
case nsIAccessibleEvent::EVENT_ATK_PROPERTY_CHANGE :
AtkPropertyChange *pAtkPropChange;
AtkPropertyValues values;
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_PROPERTY_CHANGE\n"));
if (!aEventData)
break;
pAtkPropChange = NS_REINTERPRET_CAST(AtkPropertyChange *, aEventData);
values.property_name = sAtkPropertyNameArray[pAtkPropChange->type];
MAI_LOG_DEBUG(("\n\nthe type of EVENT_ATK_PROPERTY_CHANGE: %d\n\n",
pAtkPropChange->type));
switch (pAtkPropChange->type) {
case PROP_TABLE_CAPTION:
case PROP_TABLE_SUMMARY:
if (pAtkPropChange->oldvalue)
oldAccWrap = NS_REINTERPRET_CAST(nsAccessibleWrap *,
pAtkPropChange->oldvalue);
if (pAtkPropChange->newvalue)
newAccWrap = NS_REINTERPRET_CAST(nsAccessibleWrap *,
pAtkPropChange->newvalue);
if (oldAccWrap && newAccWrap) {
g_value_init(&values.old_value, G_TYPE_POINTER);
g_value_set_pointer(&values.old_value,
oldAccWrap->GetAtkObject());
g_value_init(&values.new_value, G_TYPE_POINTER);
g_value_set_pointer(&values.new_value,
newAccWrap->GetAtkObject());
rv = NS_OK;
}
break;
case PROP_TABLE_COLUMN_DESCRIPTION:
case PROP_TABLE_COLUMN_HEADER:
case PROP_TABLE_ROW_HEADER:
case PROP_TABLE_ROW_DESCRIPTION:
g_value_init(&values.new_value, G_TYPE_INT);
g_value_set_int(&values.new_value,
*NS_REINTERPRET_CAST(gint *,
pAtkPropChange->newvalue));
rv = NS_OK;
break;
//Perhaps need more cases in the future
default:
g_value_init (&values.old_value, G_TYPE_POINTER);
g_value_set_pointer (&values.old_value, pAtkPropChange->oldvalue);
g_value_init (&values.new_value, G_TYPE_POINTER);
g_value_set_pointer (&values.new_value, pAtkPropChange->newvalue);
rv = NS_OK;
}
if (NS_SUCCEEDED(rv)) {
char *signal_name = g_strconcat("property_change::",
values.property_name, NULL);
g_signal_emit_by_name(accWrap->GetAtkObject(), signal_name,
&values, NULL);
g_free (signal_name);
}
break;
case nsIAccessibleEvent::EVENT_ATK_SELECTION_CHANGE:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_SELECTION_CHANGE\n"));
g_signal_emit_by_name(accWrap->GetAtkObject(),
"selection_changed");
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TEXT_CHANGE:
AtkTextChange *pAtkTextChange;
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TEXT_CHANGE\n"));
if (!aEventData)
break;
pAtkTextChange = NS_REINTERPRET_CAST(AtkTextChange *, aEventData);
g_signal_emit_by_name (accWrap->GetAtkObject(),
pAtkTextChange->add ? \
"text_changed::insert":"text_changed::delete",
pAtkTextChange->start,
pAtkTextChange->length);
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TEXT_SELECTION_CHANGE:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TEXT_SELECTION_CHANGE\n"));
g_signal_emit_by_name(accWrap->GetAtkObject(),
"text_selection_changed");
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TEXT_CARET_MOVE:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TEXT_CARET_MOVE\n"));
if (!aEventData)
break;
MAI_LOG_DEBUG(("\n\nCaret postion: %d", *(gint *)aEventData ));
g_signal_emit_by_name(accWrap->GetAtkObject(),
"text_caret_moved",
// Curent caret position
*(gint *)aEventData);
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TABLE_MODEL_CHANGE:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_MODEL_CHANGE\n"));
g_signal_emit_by_name(accWrap->GetAtkObject(),
"model_changed");
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TABLE_ROW_INSERT:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_ROW_INSERT\n"));
if (!aEventData)
break;
pAtkTableChange = NS_REINTERPRET_CAST(AtkTableChange *, aEventData);
g_signal_emit_by_name(accWrap->GetAtkObject(),
"row_inserted",
// After which the rows are inserted
pAtkTableChange->index,
// The number of the inserted
pAtkTableChange->count);
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TABLE_ROW_DELETE:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_ROW_DELETE\n"));
if (!aEventData)
break;
pAtkTableChange = NS_REINTERPRET_CAST(AtkTableChange *, aEventData);
g_signal_emit_by_name(accWrap->GetAtkObject(),
"row_deleted",
// After which the rows are deleted
pAtkTableChange->index,
// The number of the deleted
pAtkTableChange->count);
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TABLE_ROW_REORDER:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_ROW_REORDER\n"));
g_signal_emit_by_name(accWrap->GetAtkObject(),
"row_reordered");
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TABLE_COLUMN_INSERT:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_COLUMN_INSERT\n"));
if (!aEventData)
break;
pAtkTableChange = NS_REINTERPRET_CAST(AtkTableChange *, aEventData);
g_signal_emit_by_name(accWrap->GetAtkObject(),
"column_inserted",
// After which the columns are inserted
pAtkTableChange->index,
// The number of the inserted
pAtkTableChange->count);
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TABLE_COLUMN_DELETE:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_COLUMN_DELETE\n"));
if (!aEventData)
break;
pAtkTableChange = NS_REINTERPRET_CAST(AtkTableChange *, aEventData);
g_signal_emit_by_name(accWrap->GetAtkObject(),
"column_deleted",
// After which the columns are deleted
pAtkTableChange->index,
// The number of the deleted
pAtkTableChange->count);
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_TABLE_COLUMN_REORDER:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_COLUMN_REORDER\n"));
g_signal_emit_by_name(accWrap->GetAtkObject(),
"column_reordered");
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_VISIBLE_DATA_CHANGE:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_VISIBLE_DATA_CHANGE\n"));
g_signal_emit_by_name(accWrap->GetAtkObject(),
"visible_data_changed");
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_LINK_SELECTED:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_LINK_SELECTED\n"));
g_signal_emit_by_name(accWrap->GetAtkObject(),
"link_selected",
// Selected link index
*(gint *)aEventData);
rv = NS_OK;
break;
// Is a superclass of ATK event children_changed
case nsIAccessibleEvent::EVENT_REORDER:
AtkChildrenChange *pAtkChildrenChange;
MAI_LOG_DEBUG(("\n\nReceived: EVENT_REORDER(children_change)\n"));
pAtkChildrenChange = NS_REINTERPRET_CAST(AtkChildrenChange *,
aEventData);
nsAccessibleWrap *childAccWrap;
if (pAtkChildrenChange && pAtkChildrenChange->child) {
childAccWrap = NS_STATIC_CAST(nsAccessibleWrap *,
pAtkChildrenChange->child);
g_signal_emit_by_name (accWrap->GetAtkObject(),
pAtkChildrenChange->add ? \
"children_changed::add" : \
"children_changed::remove",
pAtkChildrenChange->index,
childAccWrap->GetAtkObject(),
NULL);
}
else {
//
// EVENT_REORDER is normally fired by "HTML Document".
//
// In GOK, [only] "children_changed::add" can cause foreground
// window accessible to update it children, which will
// refresh "UI-Grab" window.
//
g_signal_emit_by_name (accWrap->GetAtkObject(),
"children_changed::add",
-1, NULL, NULL);
}
rv = NS_OK;
break;
/*
* Because dealing with menu is very different between nsIAccessible
* and ATK, and the menu activity is important, specially transfer the
* following two event.
* Need more verification by AT test.
*/
case nsIAccessibleEvent::EVENT_MENUSTART:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_MENUSTART\n"));
atk_focus_tracker_notify(accWrap->GetAtkObject());
g_signal_emit_by_name(accWrap->GetAtkObject(),
"selection_changed");
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_MENUEND:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_MENUEND\n"));
g_signal_emit_by_name(accWrap->GetAtkObject(),
"selection_changed");
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_WINDOW_ACTIVATE:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_WINDOW_ACTIVATED\n"));
g_signal_emit(accWrap->GetAtkObject(),
g_signal_lookup ("activate", MAI_TYPE_ATK_OBJECT), 0);
rv = NS_OK;
break;
case nsIAccessibleEvent::EVENT_ATK_WINDOW_DEACTIVATE:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_WINDOW_DEACTIVATED\n"));
g_signal_emit(accWrap->GetAtkObject(),
g_signal_lookup ("deactivate", MAI_TYPE_ATK_OBJECT), 0);
rv = NS_OK;
break;
default:
// Don't transfer others
MAI_LOG_DEBUG(("\n\nReceived an unknown event=0x%u\n", aEvent));
break;
}
return rv;
}
/* static */
AtkStateType
TranslateAState(PRUint32 aState, PRUint32 aExtState)
{
switch (aState) {
case nsIAccessible::STATE_SELECTED:
return ATK_STATE_SELECTED;
case nsIAccessible::STATE_FOCUSED:
return ATK_STATE_FOCUSED;
case nsIAccessible::STATE_PRESSED:
return ATK_STATE_PRESSED;
case nsIAccessible::STATE_CHECKED:
return ATK_STATE_CHECKED;
case nsIAccessible::STATE_EXPANDED:
return ATK_STATE_EXPANDED;
case nsIAccessible::STATE_COLLAPSED:
return ATK_STATE_EXPANDABLE;
// The control can't accept input at this time
case nsIAccessible::STATE_BUSY:
return ATK_STATE_BUSY;
case nsIAccessible::STATE_FOCUSABLE:
return ATK_STATE_FOCUSABLE;
case nsIAccessible::STATE_SELECTABLE:
return ATK_STATE_SELECTABLE;
case nsIAccessible::STATE_SIZEABLE:
return ATK_STATE_RESIZABLE;
case nsIAccessible::STATE_MULTISELECTABLE:
return ATK_STATE_MULTISELECTABLE;
#if 0
// The following states are opposite the MSAA states.
// We need to deal with them specially
case nsIAccessible::STATE_INVISIBLE:
return !ATK_STATE_VISIBLE;
case nsIAccessible::STATE_UNAVAILABLE:
return !ATK_STATE_ENABLED;
case nsIAccessible::STATE_READONLY:
return !ATK_STATE_EDITABLE;
#endif
}
// The following state is
// Extended state flags (for non-MSAA, for Java and Gnome/ATK support)
switch (aExtState) {
case nsIAccessible::EXT_STATE_ACTIVE:
return ATK_STATE_ACTIVE;
case nsIAccessible::EXT_STATE_EXPANDABLE:
return ATK_STATE_EXPANDABLE;
#if 0
// Need change definitions in nsIAccessible.idl to avoid
// duplicate value
case nsIAccessible::EXT_STATE_MODAL:
return ATK_STATE_MODAL;
#endif
case nsIAccessible::EXT_STATE_MULTI_LINE:
return ATK_STATE_MULTI_LINE;
case nsIAccessible::EXT_STATE_SENSITIVE:
return ATK_STATE_SENSITIVE;
case nsIAccessible::EXT_STATE_SHOWING:
return ATK_STATE_SHOWING;
case nsIAccessible::EXT_STATE_SINGLE_LINE:
return ATK_STATE_SINGLE_LINE;
case nsIAccessible::EXT_STATE_TRANSIENT:
return ATK_STATE_TRANSIENT;
case nsIAccessible::EXT_STATE_VERTICAL:
return ATK_STATE_VERTICAL;
}
return ATK_STATE_INVALID;
}
NS_IMETHODIMP nsDocAccessibleWrap::Shutdown()
{
nsAccessibleEditableText::ShutdownEditor();
return nsDocAccessible::Shutdown();
}
NS_IMETHODIMP nsDocAccessibleWrap::GetRole(PRUint32 *_retval)
{
PRBool isEditable;
GetIsEditable(&isEditable);
if (isEditable)
*_retval = ROLE_TEXT;
else
*_retval = ROLE_HTML_CONTAINER;
return NS_OK;
}
void nsDocAccessibleWrap::CheckForEditor()
{
nsDocAccessible::CheckForEditor();
if (mEditor)
SetEditor(mEditor); // set editor for nsAccessibleEditableText
}
NS_IMETHODIMP nsDocAccessibleWrap::FireDocLoadingEvent(PRBool aIsFinished)
{
if (!mDocument || !mWeakShell)
return NS_OK; // Document has been shut down
if (!aIsFinished) {
// Load has been verified, it will occur, about to commence
AtkChildrenChange childrenData;
childrenData.index = -1;
childrenData.child = 0;
childrenData.add = PR_FALSE;
FireToolkitEvent(nsIAccessibleEvent::EVENT_REORDER, this, &childrenData);
}
return nsDocAccessible::FireDocLoadingEvent(aIsFinished);
}

View File

@@ -1,70 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* John Sun (john.sun@sun.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 ***** */
/* For documentation of the accessibility architecture,
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
*/
#ifndef _nsDocAccessibleWrap_H_
#define _nsDocAccessibleWrap_H_
#include "nsDocAccessible.h"
#include "nsAccessibleText.h"
class nsDocAccessibleWrap: public nsDocAccessible,
public nsAccessibleEditableText
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsDocAccessibleWrap(nsIDOMNode *aNode, nsIWeakReference *aShell);
virtual ~nsDocAccessibleWrap();
NS_IMETHOD FireToolkitEvent(PRUint32 aEvent, nsIAccessible* aAccessible,
void* aData);
NS_IMETHOD FireDocLoadingEvent(PRBool isFinished);
NS_IMETHOD Shutdown();
NS_IMETHOD GetRole(PRUint32 *aAccRole);
protected:
void CheckForEditor();
};
#endif

View File

@@ -1,76 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kyle Yuan (kyle.yuan@sun.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 "nsHTMLBlockAccessible.h"
NS_IMPL_ISUPPORTS_INHERITED2(nsHTMLBlockAccessible, nsBlockAccessible, nsIAccessibleText, nsIAccessibleHyperText)
nsHTMLBlockAccessible::nsHTMLBlockAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsBlockAccessible(aDomNode, aShell), nsAccessibleHyperText(aDomNode, aShell)
{
}
NS_IMETHODIMP nsHTMLBlockAccessible::GetName(nsAString& aName)
{
return nsBlockAccessible::GetName(aName);
}
NS_IMETHODIMP nsHTMLBlockAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_TEXT;
return NS_OK;
}
NS_IMETHODIMP nsHTMLBlockAccessible::GetState(PRUint32 *aState)
{
nsAccessible::GetState(aState);
*aState &= ~STATE_FOCUSABLE;
*aState |= STATE_UNAVAILABLE;
return NS_OK;
}
NS_IMETHODIMP nsHTMLBlockAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
return nsAccessibleHyperText::GetBounds(mWeakShell, x, y, width, height);
}
NS_IMETHODIMP nsHTMLBlockAccessible::Shutdown()
{
nsAccessibleHyperText::Shutdown();
return nsBlockAccessible::Shutdown();
}

View File

@@ -1,59 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kyle Yuan (kyle.yuan@sun.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 _nsHTMLBlockAccessible_H_
#define _nsHTMLBlockAccessible_H_
#include "nsAccessibleHyperText.h"
class nsHTMLBlockAccessible : public nsBlockAccessible,
public nsAccessibleHyperText
{
NS_DECL_ISUPPORTS_INHERITED
public:
nsHTMLBlockAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetName(nsAString& aName);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetState(PRUint32 *aState);
NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD Shutdown();
};
#endif

View File

@@ -1,98 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kyle Yuan (kyle.yuan@sun.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 "nsHTMLFormControlAccessibleWrap.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIFrame.h"
NS_IMPL_ISUPPORTS_INHERITED2(nsHTMLTextFieldAccessibleWrap, nsHTMLTextFieldAccessible, nsIAccessibleText, nsIAccessibleEditableText)
nsHTMLTextFieldAccessibleWrap::nsHTMLTextFieldAccessibleWrap(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsHTMLTextFieldAccessible(aNode, aShell), nsAccessibleEditableText(aNode)
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
if (shell) {
nsIFrame *frame = GetFrame();
if (frame) {
nsITextControlFrame *textFrame;
frame->QueryInterface(NS_GET_IID(nsITextControlFrame), (void**)&textFrame);
if (textFrame) {
nsCOMPtr<nsIEditor> editor;
textFrame->GetEditor(getter_AddRefs(editor));
SetEditor(editor);
}
}
}
}
NS_IMETHODIMP nsHTMLTextFieldAccessibleWrap::GetRole(PRUint32 *_retval)
{
PRUint32 state = 0;
nsresult rv = GetState(&state);
if (NS_SUCCEEDED(rv) && (state & STATE_PROTECTED))
*_retval = ROLE_PASSWORD_TEXT;
else
*_retval = ROLE_TEXT;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextFieldAccessibleWrap::GetExtState(PRUint32 *aState)
{
nsresult rv;
nsCOMPtr<nsIDOMHTMLInputElement> htmlFormElement(do_QueryInterface(mDOMNode, &rv));
if (NS_SUCCEEDED(rv) && htmlFormElement) {
nsAutoString typeString;
htmlFormElement->GetType(typeString);
if (typeString.LowerCaseEqualsLiteral("text"))
*aState |= EXT_STATE_SINGLE_LINE;
}
PRUint32 state;
nsHTMLTextFieldAccessible::GetState(&state);
if (!(state & STATE_READONLY))
*aState |= EXT_STATE_EDITABLE;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextFieldAccessibleWrap::Shutdown()
{
nsAccessibleEditableText::ShutdownEditor();
return nsHTMLTextFieldAccessible::Shutdown();
}

View File

@@ -1,60 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kyle Yuan (kyle.yuan@sun.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 _nsHTMLFormControlAccessibleWrap_H_
#define _nsHTMLFormControlAccessibleWrap_H_
#include "nsHTMLFormControlAccessible.h"
#include "nsAccessibleText.h"
typedef class nsHTMLRadioButtonAccessible nsHTMLRadioButtonAccessibleWrap;
class nsHTMLTextFieldAccessibleWrap : public nsHTMLTextFieldAccessible,
public nsAccessibleEditableText
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsHTMLTextFieldAccessibleWrap(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetRole(PRUint32* aRole);
NS_IMETHOD GetExtState(PRUint32 *aState);
NS_IMETHOD Shutdown();
};
#endif

View File

@@ -1,253 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Gilbert Fang (gilbert.fang@sun.com)
* Kyle Yuan (kyle.yuan@sun.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 "nsHTMLLinkAccessibleWrap.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDocument.h"
#include "nsILink.h"
#include "nsIDOMText.h"
#include "nsIURI.h"
#include "nsNetUtil.h"
// --------------------------------------------------------
// nsHTMLLinkAccessibleWrap Accessible
// --------------------------------------------------------
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLLinkAccessibleWrap, nsHTMLLinkAccessible, nsIAccessibleHyperLink)
nsHTMLLinkAccessibleWrap::nsHTMLLinkAccessibleWrap(nsIDOMNode* aDomNode, nsIArray* aTextNodes, nsIWeakReference* aShell, nsIFrame *aFrame):
nsHTMLLinkAccessible(aDomNode, aShell, aFrame)
{
mTextNodes = aTextNodes;
}
//-------------------------- nsIAccessibleHyperLink -------------------------
/* readonly attribute long anchors; */
NS_IMETHODIMP nsHTMLLinkAccessibleWrap::GetAnchors(PRInt32 *aAnchors)
{
if (!mIsLink)
return NS_ERROR_FAILURE;
*aAnchors = 1;
return NS_OK;
}
/* readonly attribute long startIndex; */
NS_IMETHODIMP nsHTMLLinkAccessibleWrap::GetStartIndex(PRInt32 *aStartIndex)
{
PRInt32 endIndex;
return GetLinkOffset(aStartIndex, &endIndex);
}
/* readonly attribute long endIndex; */
NS_IMETHODIMP nsHTMLLinkAccessibleWrap::GetEndIndex(PRInt32 *aEndIndex)
{
PRInt32 startIndex;
return GetLinkOffset(&startIndex, aEndIndex);
}
/* nsIURI getURI (in long i); */
NS_IMETHODIMP nsHTMLLinkAccessibleWrap::GetURI(PRInt32 i, nsIURI **aURI)
{
//I do not know why we have to return a nsIURI instead of
//nsILink or just a string of url. Anyway, maybe nsIURI is
//more powerful for the future.
*aURI = nsnull;
if (!mIsLink)
return NS_ERROR_FAILURE;
nsCOMPtr<nsILink> link(do_QueryInterface(mActionContent));
if (link) {
return link->GetHrefURI(aURI);
}
return NS_ERROR_FAILURE;
}
/* nsIAccessible getObject (in long i); */
NS_IMETHODIMP nsHTMLLinkAccessibleWrap::GetObject(PRInt32 aIndex,
nsIAccessible **aAccessible)
{
if (0 != aIndex)
return NS_ERROR_FAILURE;
return QueryInterface(NS_GET_IID(nsIAccessible), (void **)aAccessible);
}
/* boolean isValid (); */
NS_IMETHODIMP nsHTMLLinkAccessibleWrap::IsValid(PRBool *aIsValid)
{
// I have not found the cause which makes this attribute false.
*aIsValid = PR_TRUE;
return NS_OK;
}
/* boolean isSelected (); */
NS_IMETHODIMP nsHTMLLinkAccessibleWrap::IsSelected(PRBool *aIsSelected)
{
*aIsSelected = (gLastFocusedNode == mDOMNode);
return NS_OK;
}
nsresult nsHTMLLinkAccessibleWrap::GetLinkOffset(PRInt32* aStartOffset, PRInt32* aEndOffset)
{
NS_ENSURE_TRUE(mTextNodes, NS_ERROR_FAILURE);
if (!mIsLink)
return NS_ERROR_FAILURE;
nsCOMPtr<nsILink> currentLink(do_QueryInterface(mActionContent));
NS_ENSURE_TRUE(currentLink, NS_ERROR_FAILURE);
PRUint32 index, count = 0;
PRUint32 totalLength = 0, textLength = 0;
mTextNodes->GetLength(&count);
for (index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(mTextNodes, index));
nsCOMPtr<nsIDOMText> domText(do_QueryInterface(domNode));
if (domText) {
domText->GetLength(&textLength);
totalLength += textLength;
}
// text node maybe a child (or grandchild, ...) of a link node
nsCOMPtr<nsIDOMNode> parentNode;
nsCOMPtr<nsILink> link = nsnull;
domNode->GetParentNode(getter_AddRefs(parentNode));
while (parentNode) {
link = do_QueryInterface(parentNode);
if (link)
break;
nsCOMPtr<nsIDOMNode> temp = parentNode;
temp->GetParentNode(getter_AddRefs(parentNode));
}
if (link == currentLink) {
*aEndOffset = totalLength;
*aStartOffset = totalLength - textLength;
return NS_OK;
}
}
return NS_ERROR_FAILURE;
}
// --------------------------------------------------------
// nsHTMLImageMapAccessible Accessible
// --------------------------------------------------------
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLImageMapAccessible, nsHTMLImageAccessible, nsIAccessibleHyperLink)
nsHTMLImageMapAccessible::nsHTMLImageMapAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsHTMLImageAccessible(aDomNode, aShell)
{
}
/* readonly attribute long anchors; */
NS_IMETHODIMP nsHTMLImageMapAccessible::GetAnchors(PRInt32 *aAnchors)
{
return GetChildCount(aAnchors);
}
/* readonly attribute long startIndex; */
NS_IMETHODIMP nsHTMLImageMapAccessible::GetStartIndex(PRInt32 *aStartIndex)
{
//should not be supported in image map hyperlink
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute long endIndex; */
NS_IMETHODIMP nsHTMLImageMapAccessible::GetEndIndex(PRInt32 *aEndIndex)
{
//should not be supported in image map hyperlink
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIURI getURI (in long i); */
NS_IMETHODIMP nsHTMLImageMapAccessible::GetURI(PRInt32 aIndex, nsIURI **aURI)
{
*aURI = nsnull;
nsCOMPtr<nsIDOMHTMLCollection> mapAreas;
mMapElement->GetAreas(getter_AddRefs(mapAreas));
if (!mapAreas)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMNode> domNode;
mapAreas->Item(aIndex,getter_AddRefs(domNode));
if (!domNode)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
if (content) {
nsCOMPtr<nsIURI> baseURI = content->GetBaseURI();
nsCOMPtr<nsIDOMElement> area(do_QueryInterface(domNode));
nsAutoString hrefValue;
if (NS_SUCCEEDED(area->GetAttribute(NS_LITERAL_STRING("href"), hrefValue))) {
return NS_NewURI(aURI, hrefValue, nsnull, baseURI);
}
}
return NS_ERROR_FAILURE;
}
/* nsIAccessible getObject (in long i); */
NS_IMETHODIMP nsHTMLImageMapAccessible::GetObject(PRInt32 aIndex,
nsIAccessible **aAccessible)
{
*aAccessible = nsnull;
nsCOMPtr<nsIAccessible> areaAccessible;
nsresult rv = GetChildAt(aIndex, getter_AddRefs(areaAccessible));
areaAccessible.swap(*aAccessible);
return rv;
}
/* boolean isValid (); */
NS_IMETHODIMP nsHTMLImageMapAccessible::IsValid(PRBool *aIsValid)
{
*aIsValid = PR_TRUE;
return NS_OK;
}
/* boolean isSelected (); */
NS_IMETHODIMP nsHTMLImageMapAccessible::IsSelected(PRBool *aIsSelected)
{
*aIsSelected = PR_FALSE;
return NS_OK;
}

View File

@@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Gilbert Fang (gilbert.fang@sun.com)
* Kyle Yuan (kyle.yuan@sun.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 _nsHTMLLinkAccessibleWrap_H_
#define _nsHTMLLinkAccessibleWrap_H_
#include "nsHTMLImageAccessible.h"
#include "nsHTMLLinkAccessible.h"
#include "nsIAccessibleHyperLink.h"
#include "nsArray.h"
class nsHTMLLinkAccessibleWrap : public nsHTMLLinkAccessible,
public nsIAccessibleHyperLink
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEHYPERLINK
nsHTMLLinkAccessibleWrap(nsIDOMNode* aDomNode, nsIArray* aTextNodes, nsIWeakReference* aShell, nsIFrame *aFrame);
private:
nsresult GetLinkOffset(PRInt32* aStartOffset, PRInt32* aEndOffset);
nsCOMPtr<nsIArray> mTextNodes;
};
class nsHTMLImageMapAccessible : public nsHTMLImageAccessible,
public nsIAccessibleHyperLink
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEHYPERLINK
nsHTMLImageMapAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
};
#endif

View File

@@ -1,604 +0,0 @@
/* -*- 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 Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems, Inc.
* Portions created by Sun Microsystems are Copyright (C) 2002 Sun
* Microsystems, Inc. All Rights Reserved.
*
* Original Author: Pete Zha (pete.zha@sun.com)
*
* Contributor(s):
* Kyle Yuan (kyle.yuan@sun.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 "nsHTMLTableAccessibleWrap.h"
#include "nsIAccessibilityService.h"
#include "nsIDOMElement.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLTableCaptionElem.h"
#include "nsIDOMHTMLTableCellElement.h"
#include "nsIDOMHTMLTableElement.h"
#include "nsIDOMHTMLTableRowElement.h"
#include "nsIDOMHTMLTableSectionElem.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIServiceManager.h"
#include "nsITableLayout.h"
// --------------------------------------------------------
// nsHTMLTableCellAccessibleWrap Accessible
// --------------------------------------------------------
NS_IMPL_ISUPPORTS_INHERITED2(nsHTMLTableCellAccessibleWrap, nsHTMLTableCellAccessible, nsIAccessibleText, nsIAccessibleHyperText)
nsHTMLTableCellAccessibleWrap::nsHTMLTableCellAccessibleWrap(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsHTMLTableCellAccessible(aDomNode, aShell), nsAccessibleHyperText(aDomNode, aShell)
{
}
NS_IMETHODIMP nsHTMLTableCellAccessibleWrap::Shutdown()
{
nsAccessibleHyperText::Shutdown();
return nsHTMLTableCellAccessible::Shutdown();
}
// --------------------------------------------------------
// nsHTMLTableAccessibleWrap Accessible
// --------------------------------------------------------
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLTableAccessibleWrap, nsHTMLTableAccessible, nsIAccessibleTable)
nsHTMLTableAccessibleWrap::nsHTMLTableAccessibleWrap(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsHTMLTableAccessible(aDomNode, aShell)
{
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetCaption(nsIAccessible **aCaption)
{
*aCaption = nsnull;
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMHTMLTableCaptionElement> caption;
rv = table->GetCaption(getter_AddRefs(caption));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMNode> captionNode(do_QueryInterface(caption));
NS_ENSURE_TRUE(captionNode, NS_ERROR_FAILURE);
nsCOMPtr<nsIAccessibilityService>
accService(do_GetService("@mozilla.org/accessibilityService;1"));
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
accService->GetCachedAccessible(captionNode, mWeakShell, aCaption);
if (*aCaption)
return NS_OK;
return accService->CreateHTMLTableCaptionAccessible(captionNode, aCaption);
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::SetCaption(nsIAccessible *aCaption)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
nsCOMPtr<nsIAccessNode> accessNode(do_QueryInterface(aCaption));
NS_ASSERTION(accessNode, "Unable to QI to nsIAccessNode");
nsCOMPtr<nsIDOMNode> domNode;
rv = accessNode->GetDOMNode(getter_AddRefs(domNode));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMNode> newDOMNode;
rv = domNode->CloneNode(PR_TRUE, getter_AddRefs(newDOMNode));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMHTMLTableCaptionElement>
captionElement(do_QueryInterface(newDOMNode));
NS_ENSURE_TRUE(captionElement, NS_ERROR_FAILURE);
return table->SetCaption(captionElement);
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetSummary(nsAString &aSummary)
{
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
return table->GetSummary(aSummary);
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::SetSummary(const nsAString &aSummary)
{
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
return table->SetSummary(aSummary);
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetColumns(PRInt32 *aColumns)
{
nsITableLayout *tableLayout;
nsresult rv = GetTableLayout(&tableLayout);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 rows;
return tableLayout->GetTableSize(rows, *aColumns);
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetColumnHeader(nsIAccessibleTable **aColumnHeader)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMHTMLTableSectionElement> section;
rv = table->GetTHead(getter_AddRefs(section));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAccessibilityService>
accService(do_GetService("@mozilla.org/accessibilityService;1"));
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
nsCOMPtr<nsIAccessible> accHead;
nsCOMPtr<nsIDOMNode> sectionNode(do_QueryInterface(section));
if (sectionNode) {
rv = accService->GetCachedAccessible(sectionNode, mWeakShell,
getter_AddRefs(accHead));
}
if (!accHead) {
rv = accService->CreateHTMLTableHeadAccessible(section,
getter_AddRefs(accHead));
}
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAccessibleTable> accTableHead(do_QueryInterface(accHead));
NS_ENSURE_TRUE(accTableHead, NS_ERROR_FAILURE);
*aColumnHeader = accTableHead;
NS_IF_ADDREF(*aColumnHeader);
return rv;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetRows(PRInt32 *aRows)
{
nsITableLayout *tableLayout;
nsresult rv = GetTableLayout(&tableLayout);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 columns;
return tableLayout->GetTableSize(*aRows, columns);
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetRowHeader(nsIAccessibleTable **aRowHeader)
{
// Can not implement because there is no row header in html table
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetSelectedColumns(PRUint32 *aNumColumns,
PRInt32 **aColumns)
{
nsresult rv = NS_OK;
PRInt32 columnCount;
rv = GetColumns(&columnCount);
NS_ENSURE_SUCCESS(rv, rv);
PRBool *states = new PRBool[columnCount];
NS_ENSURE_TRUE(states, NS_ERROR_OUT_OF_MEMORY);
*aNumColumns = 0;
PRInt32 index;
for (index = 0; index < columnCount; index++) {
rv = IsColumnSelected(index, &states[index]);
NS_ENSURE_SUCCESS(rv, rv);
if (states[index]) {
(*aNumColumns)++;
}
}
PRInt32 *outArray = (PRInt32 *)nsMemory::Alloc((*aNumColumns) * sizeof(PRInt32));
if (!outArray) {
delete []states;
return NS_ERROR_OUT_OF_MEMORY;
}
PRInt32 curr = 0;
for (index = 0; index < columnCount; index++) {
if (states[index]) {
outArray[curr++] = index;
}
}
delete []states;
*aColumns = outArray;
return rv;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetSelectedRows(PRUint32 *aNumRows, PRInt32 **aRows)
{
nsresult rv = NS_OK;
PRInt32 rowCount;
rv = GetRows(&rowCount);
NS_ENSURE_SUCCESS(rv, rv);
PRBool *states = new PRBool[rowCount];
NS_ENSURE_TRUE(states, NS_ERROR_OUT_OF_MEMORY);
*aNumRows = 0;
PRInt32 index;
for (index = 0; index < rowCount; index++) {
rv = IsRowSelected(index, &states[index]);
NS_ENSURE_SUCCESS(rv, rv);
if (states[index]) {
(*aNumRows)++;
}
}
PRInt32 *outArray = (PRInt32 *)nsMemory::Alloc((*aNumRows) * sizeof(PRInt32));
if (!outArray) {
delete []states;
return NS_ERROR_OUT_OF_MEMORY;
}
PRInt32 curr = 0;
for (index = 0; index < rowCount; index++) {
if (states[index]) {
outArray[curr++] = index;
}
}
delete []states;
*aRows = outArray;
return rv;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::CellRefAt(PRInt32 aRow, PRInt32 aColumn,
nsIAccessible **aTableCellAccessible)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMElement> cellElement;
rv = GetCellAt(aRow, aColumn, *getter_AddRefs(cellElement));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAccessibilityService>
accService(do_GetService("@mozilla.org/accessibilityService;1"));
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
return accService->GetAccessibleInWeakShell(cellElement, mWeakShell,
aTableCellAccessible);
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetIndexAt(PRInt32 aRow, PRInt32 aColumn,
PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv = NS_OK;
PRInt32 columns;
rv = GetColumns(&columns);
NS_ENSURE_SUCCESS(rv, rv);
*_retval = aRow * columns + aColumn;
return NS_OK;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetColumnAtIndex(PRInt32 aIndex, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv = NS_OK;
PRInt32 columns;
rv = GetColumns(&columns);
NS_ENSURE_SUCCESS(rv, rv);
*_retval = aIndex % columns;
return NS_OK;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetRowAtIndex(PRInt32 aIndex, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv = NS_OK;
PRInt32 columns;
rv = GetColumns(&columns);
NS_ENSURE_SUCCESS(rv, rv);
*_retval = aIndex / columns;
return NS_OK;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetColumnExtentAt(PRInt32 aRow, PRInt32 aColumn,
PRInt32 *_retval)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMElement> domElement;
rv = GetCellAt(aRow, aColumn, *getter_AddRefs(domElement));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMHTMLTableCellElement> cell(do_QueryInterface(domElement));
NS_ENSURE_TRUE(cell, NS_ERROR_FAILURE);
return cell->GetColSpan(_retval);
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetRowExtentAt(PRInt32 aRow, PRInt32 aColumn,
PRInt32 *_retval)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMElement> domElement;
rv = GetCellAt(aRow, aColumn, *getter_AddRefs(domElement));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMHTMLTableCellElement> cell(do_QueryInterface(domElement));
NS_ENSURE_TRUE(cell, NS_ERROR_FAILURE);
return cell->GetRowSpan(_retval);
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetColumnDescription(PRInt32 aColumn, nsAString &_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::GetRowDescription(PRInt32 aRow, nsAString &_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::IsColumnSelected(PRInt32 aColumn, PRBool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv = NS_OK;
PRInt32 rows;
rv = GetRows(&rows);
NS_ENSURE_SUCCESS(rv, rv);
for (PRInt32 index = 0; index < rows; index++) {
rv = IsCellSelected(index, aColumn, _retval);
NS_ENSURE_SUCCESS(rv, rv);
if (!*_retval) {
break;
}
}
return rv;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::IsRowSelected(PRInt32 aRow, PRBool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv = NS_OK;
PRInt32 columns;
rv = GetColumns(&columns);
NS_ENSURE_SUCCESS(rv, rv);
for (PRInt32 index = 0; index < columns; index++) {
rv = IsCellSelected(aRow, index, _retval);
NS_ENSURE_SUCCESS(rv, rv);
if (!*_retval) {
break;
}
}
return rv;
}
NS_IMETHODIMP
nsHTMLTableAccessibleWrap::IsCellSelected(PRInt32 aRow, PRInt32 aColumn,
PRBool *_retval)
{
nsITableLayout *tableLayout;
nsresult rv = GetTableLayout(&tableLayout);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMElement> domElement;
PRInt32 startRowIndex = 0, startColIndex = 0,
rowSpan, colSpan, actualRowSpan, actualColSpan;
return tableLayout->GetCellDataAt(aRow, aColumn,
*getter_AddRefs(domElement),
startRowIndex, startColIndex, rowSpan,
colSpan, actualRowSpan, actualColSpan,
*_retval);
}
nsresult
nsHTMLTableAccessibleWrap::GetTableNode(nsIDOMNode **_retval)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
if (table) {
*_retval = table;
NS_IF_ADDREF(*_retval);
return rv;
}
nsCOMPtr<nsIDOMHTMLTableSectionElement> section(do_QueryInterface(mDOMNode));
if (section) {
nsCOMPtr<nsIDOMNode> parent;
rv = section->GetParentNode(getter_AddRefs(parent));
NS_ENSURE_SUCCESS(rv, rv);
*_retval = parent;
NS_IF_ADDREF(*_retval);
return rv;
}
return NS_ERROR_FAILURE;
}
nsresult
nsHTMLTableAccessibleWrap::GetTableLayout(nsITableLayout **aLayoutObject)
{
*aLayoutObject = nsnull;
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMNode> tableNode;
rv = GetTableNode(getter_AddRefs(tableNode));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIContent> content(do_QueryInterface(tableNode));
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
nsIPresShell *presShell = content->GetDocument()->GetShellAt(0);
nsCOMPtr<nsISupports> layoutObject;
rv = presShell->GetLayoutObjectFor(content, getter_AddRefs(layoutObject));
NS_ENSURE_SUCCESS(rv, rv);
return CallQueryInterface(layoutObject, aLayoutObject);
}
nsresult
nsHTMLTableAccessibleWrap::GetCellAt(PRInt32 aRowIndex,
PRInt32 aColIndex,
nsIDOMElement* &aCell)
{
PRInt32 startRowIndex = 0, startColIndex = 0,
rowSpan, colSpan, actualRowSpan, actualColSpan;
PRBool isSelected;
nsITableLayout *tableLayout;
nsresult rv = GetTableLayout(&tableLayout);
NS_ENSURE_SUCCESS(rv, rv);
return tableLayout->GetCellDataAt(aRowIndex, aColIndex, aCell,
startRowIndex, startColIndex,
rowSpan, colSpan,
actualRowSpan, actualColSpan,
isSelected);
}
// --------------------------------------------------------
// nsHTMLTableHeadAccessible Accessible
// --------------------------------------------------------
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLTableHeadAccessible, nsHTMLTableAccessibleWrap)
nsHTMLTableHeadAccessible::nsHTMLTableHeadAccessible(nsIDOMNode *aDomNode, nsIWeakReference *aShell):
nsHTMLTableAccessibleWrap(aDomNode, aShell)
{
Init(); // Make sure this generated accessible of the table is cached
}
NS_IMETHODIMP
nsHTMLTableHeadAccessible::GetRole(PRUint32 *aResult)
{
*aResult = ROLE_COLUMNHEADER;
return NS_OK;
}
NS_IMETHODIMP
nsHTMLTableHeadAccessible::GetCaption(nsIAccessible **aCaption)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableHeadAccessible::SetCaption(nsIAccessible *aCaption)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableHeadAccessible::GetSummary(nsAString &aSummary)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableHeadAccessible::SetSummary(const nsAString &aSummary)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableHeadAccessible::GetColumnHeader(nsIAccessibleTable **aColumnHeader)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableHeadAccessible::GetRows(PRInt32 *aRows)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMHTMLTableSectionElement> head(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(head, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMHTMLCollection> rows;
rv = head->GetRows(getter_AddRefs(rows));
NS_ENSURE_SUCCESS(rv, rv);
return rows->GetLength((PRUint32 *)aRows);
}

View File

@@ -1,96 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Pete Zha (pete.zha@sun.com)
* Kyle Yuan (kyle.yuan@sun.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 _nsHTMLTableAccessibleWrap_H_
#define _nsHTMLTableAccessibleWrap_H_
#include "nsAccessibleHyperText.h"
#include "nsHTMLTableAccessible.h"
#include "nsIAccessibleTable.h"
class nsITableLayout;
class nsHTMLTableCellAccessibleWrap : public nsHTMLTableCellAccessible,
public nsAccessibleHyperText
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsHTMLTableCellAccessibleWrap(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD Shutdown();
};
class nsHTMLTableAccessibleWrap : public nsHTMLTableAccessible,
public nsIAccessibleTable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLETABLE
nsHTMLTableAccessibleWrap(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
protected:
nsresult GetTableNode(nsIDOMNode **_retval);
nsresult GetTableLayout(nsITableLayout **aLayoutObject);
nsresult GetCellAt(PRInt32 aRowIndex,
PRInt32 aColIndex,
nsIDOMElement* &aCell);
};
class nsHTMLTableHeadAccessible : public nsHTMLTableAccessibleWrap
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsHTMLTableHeadAccessible(nsIDOMNode *aDomNode, nsIWeakReference *aShell);
/* nsIAccessible */
NS_IMETHOD GetRole(PRUint32 *aResult);
/* nsIAccessibleTable */
NS_IMETHOD GetCaption(nsIAccessible **aCaption);
NS_IMETHOD SetCaption(nsIAccessible *aCaption);
NS_IMETHOD GetSummary(nsAString &aSummary);
NS_IMETHOD SetSummary(const nsAString &aSummary);
NS_IMETHOD GetColumnHeader(nsIAccessibleTable **aColumnHeader);
NS_IMETHOD GetRows(PRInt32 *aRows);
};
#endif

View File

@@ -1,87 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* John Sun (john.sun@sun.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 __NS_MAI_H__
#define __NS_MAI_H__
#include <atk/atk.h>
#include <glib.h>
#include <glib-object.h>
#include "nsAccessibleWrap.h"
extern PRLogModuleInfo *gMaiLog;
#ifdef MAI_LOGGING
#define MAI_LOG(level, args) \
PR_BEGIN_MACRO \
if (!gMaiLog) { \
gMaiLog = PR_NewLogModule("Mai"); \
PR_ASSERT(gMaiLog); \
} \
PR_LOG(gMaiLog, (level), args); \
PR_END_MACRO
#else
#define MAI_LOG(level, args)
#endif
#define MAI_LOG_DEBUG(args) MAI_LOG(PR_LOG_DEBUG, args)
#define MAI_LOG_WARNING(args) MAI_LOG(PR_LOG_WARNING, args)
#define MAI_LOG_ERROR(args) MAI_LOG(PR_LOG_ERROR, args)
#define MAI_TYPE_ATK_OBJECT (mai_atk_object_get_type ())
#define MAI_ATK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
MAI_TYPE_ATK_OBJECT, MaiAtkObject))
#define MAI_ATK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
MAI_TYPE_ATK_OBJECT, \
MaiAtkObjectClass))
#define MAI_IS_ATK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
MAI_TYPE_ATK_OBJECT))
#define MAI_IS_ATK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
MAI_TYPE_ATK_OBJECT))
#define MAI_ATK_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
MAI_TYPE_ATK_OBJECT, \
MaiAtkObjectClass))
GType mai_atk_object_get_type(void);
nsresult CheckMaiAtkObject(AtkObject *aAtkObj);
nsAccessibleWrap *GetAccessibleWrap(AtkObject *aAtkObj);
#endif /* __NS_MAI_H__ */

View File

@@ -1,324 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 "nsIURI.h"
#include "nsMaiHyperlink.h"
/* MaiAtkHyperlink */
#define MAI_TYPE_ATK_HYPERLINK (mai_atk_hyperlink_get_type ())
#define MAI_ATK_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
MAI_TYPE_ATK_HYPERLINK, MaiAtkHyperlink))
#define MAI_ATK_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
MAI_TYPE_ATK_HYPERLINK, MaiAtkHyperlinkClass))
#define MAI_IS_ATK_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
MAI_TYPE_ATK_HYPERLINK))
#define MAI_IS_ATK_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\
MAI_TYPE_ATK_HYPERLINK))
#define MAI_ATK_HYPERLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
MAI_TYPE_ATK_HYPERLINK, MaiAtkHyperlinkClass))
/**
* This MaiAtkHyperlink is a thin wrapper, in the MAI namespace,
* for AtkHyperlink
*/
struct MaiAtkHyperlink
{
AtkHyperlink parent;
/*
* The MaiHyperlink whose properties and features are exported via this
* hyperlink instance.
*/
MaiHyperlink *maiHyperlink;
gchar *uri;
};
struct MaiAtkHyperlinkClass
{
AtkHyperlinkClass parent_class;
};
GType mai_atk_hyperlink_get_type(void);
G_BEGIN_DECLS
/* callbacks for AtkHyperlink */
static void classInitCB(AtkHyperlinkClass *aClass);
static void finalizeCB(GObject *aObj);
/* callbacks for AtkHyperlink virtual functions */
static gchar *getUriCB(AtkHyperlink *aLink, gint aLinkIndex);
static AtkObject *getObjectCB(AtkHyperlink *aLink, gint aLinkIndex);
static gint getEndIndexCB(AtkHyperlink *aLink);
static gint getStartIndexCB(AtkHyperlink *aLink);
static gboolean isValidCB(AtkHyperlink *aLink);
static gint getAnchorCountCB(AtkHyperlink *aLink);
G_END_DECLS
static gpointer parent_class = NULL;
static nsIAccessibleHyperLink *
get_accessible_hyperlink(AtkHyperlink *aHyperlink);
GType
mai_atk_hyperlink_get_type(void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo tinfo = {
sizeof(MaiAtkHyperlinkClass),
(GBaseInitFunc)NULL,
(GBaseFinalizeFunc)NULL,
(GClassInitFunc)classInitCB,
(GClassFinalizeFunc)NULL,
NULL, /* class data */
sizeof(MaiAtkHyperlink), /* instance size */
0, /* nb preallocs */
(GInstanceInitFunc)NULL,
NULL /* value table */
};
type = g_type_register_static(ATK_TYPE_HYPERLINK,
"MaiAtkHyperlink",
&tinfo, GTypeFlags(0));
}
return type;
}
MaiHyperlink::MaiHyperlink(nsIAccessibleHyperLink *aAcc,
nsIDOMNode *aNode, nsIWeakReference* aShell):
nsAccessNodeWrap(aNode, aShell),
mHyperlink(aAcc),
mMaiAtkHyperlink(nsnull)
{
}
MaiHyperlink::~MaiHyperlink()
{
if (mMaiAtkHyperlink)
g_object_unref(mMaiAtkHyperlink);
}
// MaiHyperlink use its nsIAccessibleHyperlink raw pointer as ID
NS_IMETHODIMP MaiHyperlink::GetUniqueID(void **aUniqueID)
{
if (!mHyperlink)
return NS_ERROR_FAILURE;
*aUniqueID = NS_STATIC_CAST(void*, mHyperlink.get());
return NS_OK;
}
AtkHyperlink *
MaiHyperlink::GetAtkHyperlink(void)
{
NS_ENSURE_TRUE(mHyperlink, nsnull);
if (mMaiAtkHyperlink)
return mMaiAtkHyperlink;
nsCOMPtr<nsIAccessibleHyperLink> accessIf(do_QueryInterface(mHyperlink));
if (!accessIf)
return nsnull;
mMaiAtkHyperlink =
NS_REINTERPRET_CAST(AtkHyperlink *,
g_object_new(mai_atk_hyperlink_get_type(), NULL));
NS_ASSERTION(mMaiAtkHyperlink, "OUT OF MEMORY");
NS_ENSURE_TRUE(mMaiAtkHyperlink, nsnull);
/* be sure to initialize it with "this" */
MaiHyperlink::Initialize(mMaiAtkHyperlink, this);
return mMaiAtkHyperlink;
}
/* static */
/* remember to call this static function when a MaiAtkHyperlink
* is created
*/
nsresult
MaiHyperlink::Initialize(AtkHyperlink *aObj, MaiHyperlink *aHyperlink)
{
NS_ENSURE_ARG(MAI_IS_ATK_HYPERLINK(aObj));
NS_ENSURE_ARG(aHyperlink);
/* initialize hyperlink */
MAI_ATK_HYPERLINK(aObj)->maiHyperlink = aHyperlink;
MAI_ATK_HYPERLINK(aObj)->uri = nsnull;
return NS_OK;
}
/* static functions for ATK callbacks */
void
classInitCB(AtkHyperlinkClass *aClass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(aClass);
parent_class = g_type_class_peek_parent(aClass);
aClass->get_uri = getUriCB;
aClass->get_object = getObjectCB;
aClass->get_end_index = getEndIndexCB;
aClass->get_start_index = getStartIndexCB;
aClass->is_valid = isValidCB;
aClass->get_n_anchors = getAnchorCountCB;
gobject_class->finalize = finalizeCB;
}
void
finalizeCB(GObject *aObj)
{
NS_ASSERTION(MAI_IS_ATK_HYPERLINK(aObj), "Invalid MaiAtkHyperlink");
if (!MAI_IS_ATK_HYPERLINK(aObj))
return;
MaiAtkHyperlink *maiHyperlink = MAI_ATK_HYPERLINK(aObj);
if (maiHyperlink->uri)
g_free(maiHyperlink->uri);
maiHyperlink->maiHyperlink = nsnull;
/* call parent finalize function */
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize(aObj);
}
gchar *
getUriCB(AtkHyperlink *aLink, gint aLinkIndex)
{
nsIAccessibleHyperLink *accHyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(accHyperlink, nsnull);
MaiAtkHyperlink *maiHyperlink = MAI_ATK_HYPERLINK(accHyperlink);
if (maiHyperlink->uri)
return maiHyperlink->uri;
nsCOMPtr<nsIURI> uri;
nsresult rv = accHyperlink->GetURI(aLinkIndex,getter_AddRefs(uri));
if (NS_FAILED(rv) || !uri)
return nsnull;
nsCAutoString cautoStr;
rv = uri->GetSpec(cautoStr);
maiHyperlink->uri = g_strdup(cautoStr.get());
return maiHyperlink->uri;
}
AtkObject *
getObjectCB(AtkHyperlink *aLink, gint aLinkIndex)
{
nsIAccessibleHyperLink *accHyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(accHyperlink, nsnull);
nsCOMPtr<nsIAccessible> accObj;
nsresult rv = accHyperlink->GetObject(aLinkIndex, getter_AddRefs(accObj));
NS_ENSURE_SUCCESS(rv, nsnull);
AtkObject *atkObj = nsnull;
if (accObj) {
nsIAccessible *tmpObj = accObj;
nsAccessibleWrap *accWrap = NS_STATIC_CAST(nsAccessibleWrap *, tmpObj);
atkObj = accWrap->GetAtkObject();
}
//no need to add ref it, because it is "get" not "ref" ???
return atkObj;
}
gint
getEndIndexCB(AtkHyperlink *aLink)
{
nsIAccessibleHyperLink *accHyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(accHyperlink, -1);
PRInt32 endIndex = -1;
nsresult rv = accHyperlink->GetEndIndex(&endIndex);
return (NS_FAILED(rv)) ? -1 : NS_STATIC_CAST(gint, endIndex);
}
gint
getStartIndexCB(AtkHyperlink *aLink)
{
nsIAccessibleHyperLink *accHyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(accHyperlink, -1);
PRInt32 startIndex = -1;
nsresult rv = accHyperlink->GetStartIndex(&startIndex);
return (NS_FAILED(rv)) ? -1 : NS_STATIC_CAST(gint, startIndex);
}
gboolean
isValidCB(AtkHyperlink *aLink)
{
nsIAccessibleHyperLink *accHyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(accHyperlink, FALSE);
PRBool isValid = PR_FALSE;
nsresult rv = accHyperlink->IsValid(&isValid);
return (NS_FAILED(rv)) ? FALSE : NS_STATIC_CAST(gboolean, isValid);
}
gint
getAnchorCountCB(AtkHyperlink *aLink)
{
nsIAccessibleHyperLink *accHyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(accHyperlink, -1);
PRInt32 count = -1;
nsresult rv = accHyperlink->GetAnchors(&count);
return (NS_FAILED(rv)) ? -1 : NS_STATIC_CAST(gint, count);
}
// Check if aHyperlink is a valid MaiHyperlink, and return the
// nsIAccessibleHyperLink related.
nsIAccessibleHyperLink *
get_accessible_hyperlink(AtkHyperlink *aHyperlink)
{
NS_ENSURE_TRUE(MAI_IS_ATK_HYPERLINK(aHyperlink), nsnull);
MaiHyperlink * maiHyperlink =
MAI_ATK_HYPERLINK(aHyperlink)->maiHyperlink;
NS_ENSURE_TRUE(maiHyperlink != nsnull, nsnull);
NS_ENSURE_TRUE(maiHyperlink->GetAtkHyperlink() == aHyperlink, nsnull);
return maiHyperlink->GetAccHyperlink();
}

View File

@@ -1,76 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 __MAI_HYPERLINK_H__
#define __MAI_HYPERLINK_H__
#include "nsString.h"
#include "nsMai.h"
#include "nsIAccessibleHyperLink.h"
struct _AtkHyperlink;
typedef struct _AtkHyperlink AtkHyperlink;
/*
* MaiHyperlink is a auxiliary class for MaiInterfaceHyperText.
*/
class MaiHyperlink : public nsAccessNodeWrap
{
public:
MaiHyperlink(nsIAccessibleHyperLink *aAcc,
nsIDOMNode *aNode, nsIWeakReference* aShell);
~MaiHyperlink();
NS_IMETHOD GetUniqueID(void **aUniqueID);
public:
AtkHyperlink *GetAtkHyperlink(void);
nsIAccessibleHyperLink *GetAccHyperlink(void) {
return mHyperlink;
}
protected:
nsCOMPtr<nsIAccessibleHyperLink> mHyperlink;
AtkHyperlink *mMaiAtkHyperlink;
public:
static nsresult Initialize(AtkHyperlink *aObj, MaiHyperlink *aClass);
};
#endif /* __MAI_HYPERLINK_H__ */

View File

@@ -1,90 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 <atk/atk.h>
#include "nsMaiInterface.h"
#include "nsAccessibleWrap.h"
MaiInterface::MaiInterface(nsAccessibleWrap *aAccWrap)
{
}
MaiInterface::~MaiInterface()
{
}
GType
MaiInterface::GetAtkType()
{
MaiInterfaceType type = GetType();
GType atkType;
switch (type) {
case MAI_INTERFACE_COMPONENT:
atkType = ATK_TYPE_COMPONENT;
break;
case MAI_INTERFACE_ACTION:
atkType = ATK_TYPE_ACTION;
break;
case MAI_INTERFACE_VALUE:
atkType = ATK_TYPE_VALUE;
break;
case MAI_INTERFACE_EDITABLE_TEXT:
atkType = ATK_TYPE_EDITABLE_TEXT;
break;
case MAI_INTERFACE_HYPERLINK:
atkType = ATK_TYPE_HYPERLINK;
break;
case MAI_INTERFACE_HYPERTEXT:
atkType = ATK_TYPE_HYPERTEXT;
break;
case MAI_INTERFACE_SELECTION:
atkType = ATK_TYPE_SELECTION;
break;
case MAI_INTERFACE_TABLE:
atkType = ATK_TYPE_TABLE;
break;
case MAI_INTERFACE_TEXT:
atkType = ATK_TYPE_TEXT;
break;
default:
atkType = G_TYPE_INVALID;
}
return atkType;
}

View File

@@ -1,79 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 __MAI_INTERFACE_H__
#define __MAI_INTERFACE_H__
#include "nsMai.h"
enum MaiInterfaceType {
MAI_INTERFACE_INVALID, /* 0 */
MAI_INTERFACE_COMPONENT,
MAI_INTERFACE_ACTION,
MAI_INTERFACE_VALUE,
MAI_INTERFACE_EDITABLE_TEXT,
MAI_INTERFACE_HYPERLINK,
MAI_INTERFACE_HYPERTEXT,
MAI_INTERFACE_SELECTION,
MAI_INTERFACE_TABLE,
MAI_INTERFACE_TEXT,
MAI_INTERFACE_NUM /* 10 */
};
class nsAccessibleWrap;
/* MaiInterface is the base class for all the MAI interface class (e.g.
* MaiInterfaceAction, MaiInterfaceComponent, etc).
*
* Descendents of MaiInterface provide all the implementation for corresponding
* interfaces in ATK, and map them onto nsIAccessible interfaces.
*/
class MaiInterface
{
public:
MaiInterface(nsAccessibleWrap *aAccWrap);
virtual ~MaiInterface();
GType GetAtkType();
virtual MaiInterfaceType GetType() = 0;
virtual const GInterfaceInfo *GetInterfaceInfo() = 0;
};
#endif /* __MAI_INTERFACE_H__ */

View File

@@ -1,261 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 "nsMaiInterfaceAction.h"
#include "nsAccessibleWrap.h"
#include "nsString.h"
G_BEGIN_DECLS
static void interfaceInitCB(AtkActionIface *aIface);
/* action interface callbacks */
static gboolean doActionCB(AtkAction *aAction, gint aActionIndex);
static gint getActionCountCB(AtkAction *aAction);
static const gchar *getDescriptionCB(AtkAction *aAction, gint aActionIndex);
static const gchar *getNameCB(AtkAction *aAction, gint aActionIndex);
static const gchar *getKeyBindingCB(AtkAction *aAction, gint aActionIndex);
static gboolean setDescriptionCB(AtkAction *aAction, gint aActionIndex,
const gchar *aDesc);
G_END_DECLS
MaiInterfaceAction::MaiInterfaceAction(nsAccessibleWrap *aAccWrap):
MaiInterface(aAccWrap)
{
}
MaiInterfaceAction::~MaiInterfaceAction()
{
}
MaiInterfaceType
MaiInterfaceAction::GetType()
{
return MAI_INTERFACE_ACTION;
}
const GInterfaceInfo *
MaiInterfaceAction::GetInterfaceInfo()
{
static const GInterfaceInfo atk_if_action_info = {
(GInterfaceInitFunc)interfaceInitCB,
(GInterfaceFinalizeFunc) NULL,
NULL
};
return &atk_if_action_info;
}
/* static functions */
void
interfaceInitCB(AtkActionIface *aIface)
{
NS_ASSERTION(aIface, "Invalid aIface");
if (!aIface)
return;
aIface->do_action = doActionCB;
aIface->get_n_actions = getActionCountCB;
aIface->get_description = getDescriptionCB;
aIface->get_keybinding = getKeyBindingCB;
aIface->get_name = getNameCB;
aIface->set_description = setDescriptionCB;
}
gboolean
doActionCB(AtkAction *aAction, gint aActionIndex)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
NS_ENSURE_TRUE(accWrap, FALSE);
nsresult rv = accWrap->DoAction(aActionIndex);
return (NS_FAILED(rv)) ? FALSE : TRUE;
}
gint
getActionCountCB(AtkAction *aAction)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
NS_ENSURE_TRUE(accWrap, 0);
PRUint8 num = 0;
nsresult rv = accWrap->GetNumActions(&num);
return (NS_FAILED(rv)) ? 0 : NS_STATIC_CAST(gint, num);
}
const gchar *
getDescriptionCB(AtkAction *aAction, gint aActionIndex)
{
// the interface in nsIAccessibleAction is empty
// use getName as default description
return getNameCB(aAction, aActionIndex);
}
const gchar *
getNameCB(AtkAction *aAction, gint aActionIndex)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
NS_ENSURE_TRUE(accWrap, nsnull);
MaiInterfaceAction *action =
NS_STATIC_CAST(MaiInterfaceAction *,
accWrap->GetMaiInterface(MAI_INTERFACE_ACTION));
NS_ENSURE_TRUE(action, nsnull);
nsAutoString autoStr;
nsresult rv = accWrap->GetActionName(aActionIndex, autoStr);
NS_ENSURE_SUCCESS(rv, nsnull);
action->SetName(autoStr);
return action->GetName();
}
const gchar *
getKeyBindingCB(AtkAction *aAction, gint aActionIndex)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
NS_ENSURE_TRUE(accWrap, nsnull);
MaiInterfaceAction *action =
NS_STATIC_CAST(MaiInterfaceAction *,
accWrap->GetMaiInterface(MAI_INTERFACE_ACTION));
NS_ENSURE_TRUE(action, nsnull);
if (*action->GetKeyBinding())
return action->GetKeyBinding();
//return all KeyBindings including accesskey and shortcut
nsAutoString allKeyBinding;
//get accesskey
nsAutoString accessKey;
nsresult rv = accWrap->GetKeyboardShortcut(accessKey);
if (NS_SUCCEEDED(rv) && !accessKey.IsEmpty()) {
nsCOMPtr<nsIAccessible> parentAccessible;
accWrap->GetParent(getter_AddRefs(parentAccessible));
if (parentAccessible) {
PRUint32 role;
parentAccessible->GetRole(&role);
if (role == ATK_ROLE_MENU_BAR) {
//it is topmenu, change from "Alt+f" to "f;<Alt>f"
nsAutoString rightChar;
accessKey.Right(rightChar, 1);
allKeyBinding = rightChar + NS_LITERAL_STRING(";<Alt>") +
rightChar;
}
else if ((role == ATK_ROLE_MENU) || (role == ATK_ROLE_MENU_ITEM)) {
//it is submenu, change from "s" to "s;<Alt>f:s"
nsAutoString allKey = accessKey;
nsCOMPtr<nsIAccessible> grandParentAcc = parentAccessible;
while ((grandParentAcc) && (role != ATK_ROLE_MENU_BAR)) {
nsAutoString grandParentKey;
grandParentAcc->GetKeyboardShortcut(grandParentKey);
if (!grandParentKey.IsEmpty()) {
nsAutoString rightChar;
grandParentKey.Right(rightChar, 1);
allKey = rightChar + NS_LITERAL_STRING(":") + allKey;
}
nsCOMPtr<nsIAccessible> tempAcc = grandParentAcc;
tempAcc->GetParent(getter_AddRefs(grandParentAcc));
if (grandParentAcc)
grandParentAcc->GetRole(&role);
}
allKeyBinding = accessKey + NS_LITERAL_STRING(";<Alt>") +
allKey;
}
}
else {
//default process, rarely happens.
nsAutoString rightChar;
accessKey.Right(rightChar, 1);
allKeyBinding = rightChar + NS_LITERAL_STRING(";<Alt>") + rightChar;
}
}
else //don't have accesskey
allKeyBinding.AssignLiteral(";");
//get shortcut
nsAutoString keyBinding, subShortcut;
rv = accWrap->GetKeyBinding(keyBinding);
if (NS_SUCCEEDED(rv) && !keyBinding.IsEmpty()) {
//change the shortcut from "Ctrl+Shift+L" to "<Control><Shift>L"
PRInt32 oldPos, curPos=0;
while ((curPos != -1) && (curPos < (PRInt32)keyBinding.Length())) {
oldPos = curPos;
nsAutoString subString;
curPos = keyBinding.FindChar('+', oldPos);
if (curPos == -1) {
keyBinding.Mid(subString, oldPos, keyBinding.Length() - oldPos);
subShortcut += subString;
}
else {
keyBinding.Mid(subString, oldPos, curPos - oldPos);
//change "Ctrl" to "Control"
if (subString.LowerCaseEqualsLiteral("ctrl"))
subString.AssignLiteral("Control");
subShortcut += NS_LITERAL_STRING("<") + subString +
NS_LITERAL_STRING(">");
curPos++;
}
}
}
allKeyBinding += NS_LITERAL_STRING(";") + subShortcut;
action->SetKeyBinding(allKeyBinding);
return action->GetKeyBinding();
}
gboolean
setDescriptionCB(AtkAction *aAction, gint aActionIndex,
const gchar *aDesc)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
NS_ENSURE_TRUE(accWrap, nsnull);
/* this is not supported in nsIAccessible yet */
return FALSE;
}

View File

@@ -1,69 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 __MAI_INTERFACE_ACTION_H__
#define __MAI_INTERFACE_ACTION_H__
#include "nsMaiInterface.h"
class MaiInterfaceAction: public MaiInterface
{
public:
MaiInterfaceAction(nsAccessibleWrap*);
virtual ~MaiInterfaceAction();
virtual MaiInterfaceType GetType();
virtual const GInterfaceInfo *GetInterfaceInfo();
const char *GetName() {
return mName.get();
}
void SetName(nsAString &aString) { mName = NS_ConvertUTF16toUTF8(aString); }
const char *GetKeyBinding() {
return mKeyBinding.get();
}
void SetKeyBinding(nsAString &aString) { mKeyBinding = NS_ConvertUTF16toUTF8(aString); }
private:
nsCString mName;
nsCString mKeyBinding;
};
#endif /* __MAI_INTERFACE_ACTION_H__ */

View File

@@ -1,182 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 "nsMaiInterfaceComponent.h"
#include "nsAccessibleWrap.h"
G_BEGIN_DECLS
/* component interface callbacks */
static void interfaceInitCB(AtkComponentIface *aIface);
static AtkObject *refAccessibleAtPointCB(AtkComponent *aComponent,
gint aAccX, gint aAccY,
AtkCoordType aCoordType);
static void getExtentsCB(AtkComponent *aComponent,
gint *aAccX, gint *aAccY,
gint *aAccWidth, gint *aAccHeight,
AtkCoordType aCoordType);
/* the "contains", "get_position", "get_size" can take advantage of
* "get_extents", there is no need to implement them now.
*/
static gboolean grabFocusCB(AtkComponent *aComponent);
/* what are missing now for atk component */
/* ==================================================
* add_focus_handler
* remove_focus_handler
* set_extents
* set_position
* set_size
* get_layer
* get_mdi_zorder
* ==================================================
*/
G_END_DECLS
MaiInterfaceComponent::MaiInterfaceComponent(nsAccessibleWrap *aAccWrap):
MaiInterface(aAccWrap)
{
}
MaiInterfaceComponent::~MaiInterfaceComponent()
{
}
MaiInterfaceType
MaiInterfaceComponent::GetType()
{
return MAI_INTERFACE_COMPONENT;
}
const GInterfaceInfo *
MaiInterfaceComponent::GetInterfaceInfo()
{
static const GInterfaceInfo atk_if_component_info = {
(GInterfaceInitFunc)interfaceInitCB,
(GInterfaceFinalizeFunc) NULL,
NULL
};
return &atk_if_component_info;
}
/* static functions */
void
interfaceInitCB(AtkComponentIface *aIface)
{
NS_ASSERTION(aIface, "Invalid Interface");
if(!aIface)
return;
/*
* Use default implementation in atk for contains, get_position,
* and get_size
*/
aIface->ref_accessible_at_point = refAccessibleAtPointCB;
aIface->get_extents = getExtentsCB;
aIface->grab_focus = grabFocusCB;
}
AtkObject *
refAccessibleAtPointCB(AtkComponent *aComponent,
gint aAccX, gint aAccY,
AtkCoordType aCoordType)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aComponent));
NS_ENSURE_TRUE(accWrap, nsnull);
// or ATK_XY_SCREEN what is definition this in nsIAccessible ???
if (aCoordType == ATK_XY_WINDOW) {
/* deal with the coord type */
}
nsCOMPtr<nsIAccessible> pointAcc;
nsresult rv = accWrap->GetChildAtPoint(aAccX, aAccY, getter_AddRefs(pointAcc));
if (NS_FAILED(rv))
return nsnull;
nsIAccessible *tmpAcc = pointAcc;
nsAccessibleWrap *tmpAccWrap =
NS_STATIC_CAST(nsAccessibleWrap *, tmpAcc);
AtkObject *atkObj = tmpAccWrap->GetAtkObject();
if (!atkObj)
return nsnull;
g_object_ref(atkObj);
return atkObj;
}
void
getExtentsCB(AtkComponent *aComponent,
gint *aAccX,
gint *aAccY,
gint *aAccWidth,
gint *aAccHeight,
AtkCoordType aCoordType)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aComponent));
if (!accWrap)
return;
PRInt32 nsAccX, nsAccY, nsAccWidth, nsAccHeight;
nsresult rv = accWrap->GetBounds(&nsAccX, &nsAccY,
&nsAccWidth, &nsAccHeight);
if (NS_FAILED(rv))
return;
// or ATK_XY_SCREEN what is definition this in nsIAccessible?
if (aCoordType == ATK_XY_WINDOW) {
/* deal with the coord type */
}
*aAccX = nsAccX;
*aAccY = nsAccY;
*aAccWidth = nsAccWidth;
*aAccHeight = nsAccHeight;
}
gboolean
grabFocusCB(AtkComponent *aComponent)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aComponent));
NS_ENSURE_TRUE(accWrap, FALSE);
nsresult rv = accWrap->TakeFocus();
return (NS_FAILED(rv)) ? FALSE : TRUE;
}

View File

@@ -1,55 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 __MAI_INTERFACE_COMPONENT_H__
#define __MAI_INTERFACE_COMPONENT_H__
#include "nsMaiInterface.h"
class MaiInterfaceComponent: public MaiInterface
{
public:
MaiInterfaceComponent(nsAccessibleWrap* aAccWrap);
virtual ~MaiInterfaceComponent();
virtual MaiInterfaceType GetType();
virtual const GInterfaceInfo *GetInterfaceInfo();
};
#endif /* __MAI_INTERFACE_COMPONENT_H__ */

View File

@@ -1,258 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 "nsString.h"
#include "nsMaiInterfaceEditableText.h"
G_BEGIN_DECLS
static void interfaceInitCB(AtkEditableTextIface *aIface);
/* editabletext interface callbacks */
static gboolean setRunAttributesCB(AtkEditableText *aText,
AtkAttributeSet *aAttribSet,
gint aStartOffset,
gint aEndOffset);
static void setTextContentsCB(AtkEditableText *aText, const gchar *aString);
static void insertTextCB(AtkEditableText *aText,
const gchar *aString, gint aLength, gint *aPosition);
static void copyTextCB(AtkEditableText *aText, gint aStartPos, gint aEndPos);
static void cutTextCB(AtkEditableText *aText, gint aStartPos, gint aEndPos);
static void deleteTextCB(AtkEditableText *aText, gint aStartPos, gint aEndPos);
static void pasteTextCB(AtkEditableText *aText, gint aPosition);
G_END_DECLS
MaiInterfaceEditableText::MaiInterfaceEditableText(nsAccessibleWrap *aAccWrap):
MaiInterface(aAccWrap)
{
}
MaiInterfaceEditableText::~MaiInterfaceEditableText()
{
}
MaiInterfaceType
MaiInterfaceEditableText::GetType()
{
return MAI_INTERFACE_EDITABLE_TEXT;
}
const GInterfaceInfo *
MaiInterfaceEditableText::GetInterfaceInfo()
{
static const GInterfaceInfo atk_if_editabletext_info = {
(GInterfaceInitFunc)interfaceInitCB,
(GInterfaceFinalizeFunc) NULL,
NULL
};
return &atk_if_editabletext_info;
}
/* statics */
void
interfaceInitCB(AtkEditableTextIface *aIface)
{
NS_ASSERTION(aIface, "Invalid aIface");
if (!aIface)
return;
aIface->set_run_attributes = setRunAttributesCB;
aIface->set_text_contents = setTextContentsCB;
aIface->insert_text = insertTextCB;
aIface->copy_text = copyTextCB;
aIface->cut_text = cutTextCB;
aIface->delete_text = deleteTextCB;
aIface->paste_text = pasteTextCB;
}
/* static, callbacks for atkeditabletext virutal functions */
gboolean
setRunAttributesCB(AtkEditableText *aText, AtkAttributeSet *aAttribSet,
gint aStartOffset, gint aEndOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleEditableText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleEditableText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, FALSE);
nsCOMPtr<nsISupports> attrSet;
/* how to insert attributes into nsISupports ??? */
nsresult rv = accText->SetAttributes(aStartOffset, aEndOffset,
attrSet);
return NS_FAILED(rv) ? FALSE : TRUE;
}
void
setTextContentsCB(AtkEditableText *aText, const gchar *aString)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return;
nsCOMPtr<nsIAccessibleEditableText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleEditableText),
getter_AddRefs(accText));
if (!accText)
return;
MAI_LOG_DEBUG(("EditableText: setTextContentsCB, aString=%s", aString));
NS_ConvertUTF8toUTF16 strContent(aString);
nsresult rv = accText->SetTextContents(strContent);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"MaiInterfaceEditableText::SetTextContents, failed\n");
}
void
insertTextCB(AtkEditableText *aText,
const gchar *aString, gint aLength, gint *aPosition)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return;
nsCOMPtr<nsIAccessibleEditableText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleEditableText),
getter_AddRefs(accText));
if (!accText)
return;
NS_ConvertUTF8toUTF16 strContent(aString);
// interface changed in nsIAccessibleEditableText.idl ???
//
// PRInt32 pos = *aPosition;
// nsresult rv = accText->InsertText(strContent, aLength, &pos);
// *aPosition = pos;
nsresult rv = accText->InsertText(strContent, *aPosition);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"MaiInterfaceEditableText::InsertText, failed\n");
MAI_LOG_DEBUG(("EditableText: insert aString=%s, aLength=%d, aPosition=%d",
aString, aLength, *aPosition));
}
void
copyTextCB(AtkEditableText *aText, gint aStartPos, gint aEndPos)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return;
nsCOMPtr<nsIAccessibleEditableText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleEditableText),
getter_AddRefs(accText));
if (!accText)
return;
MAI_LOG_DEBUG(("EditableText: copyTextCB, aStartPos=%d, aEndPos=%d",
aStartPos, aEndPos));
nsresult rv = accText->CopyText(aStartPos, aEndPos);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"MaiInterfaceEditableText::CopyText, failed\n");
}
void
cutTextCB(AtkEditableText *aText, gint aStartPos, gint aEndPos)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return;
nsCOMPtr<nsIAccessibleEditableText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleEditableText),
getter_AddRefs(accText));
if (!accText)
return;
MAI_LOG_DEBUG(("EditableText: cutTextCB, aStartPos=%d, aEndPos=%d",
aStartPos, aEndPos));
nsresult rv = accText->CutText(aStartPos, aEndPos);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"MaiInterfaceEditableText::CutText, failed\n");
}
void
deleteTextCB(AtkEditableText *aText, gint aStartPos, gint aEndPos)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return;
nsCOMPtr<nsIAccessibleEditableText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleEditableText),
getter_AddRefs(accText));
if (!accText)
return;
MAI_LOG_DEBUG(("EditableText: deleteTextCB, aStartPos=%d, aEndPos=%d",
aStartPos, aEndPos));
nsresult rv = accText->DeleteText(aStartPos, aEndPos);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"MaiInterfaceEditableText::DeleteText, failed\n");
}
void
pasteTextCB(AtkEditableText *aText, gint aPosition)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return;
nsCOMPtr<nsIAccessibleEditableText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleEditableText),
getter_AddRefs(accText));
if (!accText)
return;
MAI_LOG_DEBUG(("EditableText: pasteTextCB, aPosition=%d", aPosition));
nsresult rv = accText->PasteText(aPosition);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"MaiInterfaceEditableText::PasteText, failed\n");
}

View File

@@ -1,57 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 __MAI_INTERFACE_EDITABLETEXT_H__
#define __MAI_INTERFACE_EDITABLETEXT_H__
#include "nsMaiInterface.h"
#include "nsIAccessibleEditableText.h"
class MaiInterfaceEditableText: public MaiInterface
{
public:
MaiInterfaceEditableText(nsAccessibleWrap*);
virtual ~MaiInterfaceEditableText();
virtual MaiInterfaceType GetType();
virtual const GInterfaceInfo *GetInterfaceInfo();
};
#endif /* __MAI_INTERFACE_EDITABLETEXT_H__ */

View File

@@ -1,203 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 "nsMaiInterfaceHypertext.h"
#include "nsIAccessibleDocument.h"
#include "nsPIAccessNode.h"
G_BEGIN_DECLS
static void interfaceInitCB(AtkHypertextIface *aIface);
/* hypertext interface callbacks */
static AtkHyperlink *getLinkCB(AtkHypertext *aText, gint aLinkIndex);
static gint getLinkCountCB(AtkHypertext *aText);
static gint getLinkIndexCB(AtkHypertext *aText, gint aCharIndex);
G_END_DECLS
MaiInterfaceHypertext::MaiInterfaceHypertext(nsAccessibleWrap *aAccWrap,
nsIWeakReference* aShell):
MaiInterface(aAccWrap),
mWeakShell(aShell)
{
}
MaiInterfaceHypertext::~MaiInterfaceHypertext()
{
mWeakShell = nsnull;
}
MaiInterfaceType
MaiInterfaceHypertext::GetType()
{
return MAI_INTERFACE_HYPERTEXT;
}
nsresult
MaiInterfaceHypertext::GetWeakShell(nsIWeakReference **aWeakShell)
{
nsresult rv = NS_ERROR_FAILURE;
if (mWeakShell) {
*aWeakShell = mWeakShell;
NS_IF_ADDREF(*aWeakShell);
rv = NS_OK;
}
else
*aWeakShell = nsnull;
return rv;
}
const GInterfaceInfo *
MaiInterfaceHypertext::GetInterfaceInfo()
{
static const GInterfaceInfo atk_if_hypertext_info = {
(GInterfaceInitFunc)interfaceInitCB,
(GInterfaceFinalizeFunc) NULL,
NULL
};
return &atk_if_hypertext_info;
}
/* statics */
void
interfaceInitCB(AtkHypertextIface *aIface)
{
g_return_if_fail(aIface != NULL);
aIface->get_link = getLinkCB;
aIface->get_n_links = getLinkCountCB;
aIface->get_link_index = getLinkIndexCB;
}
AtkHyperlink *
getLinkCB(AtkHypertext *aText, gint aLinkIndex)
{
nsresult rv;
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, nsnull);
MaiInterfaceHypertext *maiHypertext =
NS_STATIC_CAST(MaiInterfaceHypertext *,
accWrap->GetMaiInterface(MAI_INTERFACE_HYPERTEXT));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIWeakReference> weakShell;
rv = maiHypertext->GetWeakShell(getter_AddRefs(weakShell));
NS_ENSURE_SUCCESS(rv, nsnull);
nsCOMPtr<nsIAccessibleHyperText> accHyperlink;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleHyperText),
getter_AddRefs(accHyperlink));
NS_ENSURE_TRUE(accHyperlink, nsnull);
nsCOMPtr<nsIAccessibleHyperLink> hyperLink;
rv = accHyperlink->GetLink(aLinkIndex, getter_AddRefs(hyperLink));
if (NS_FAILED(rv) || !hyperLink)
return nsnull;
// The MaiHyperlink and its nsIAccessibleHyperlink are in the same cache.
// we take hyperlink->get() as Id for the MaiHyperlink.
// release our ref to the previous one
nsCOMPtr<nsIAccessibleDocument> accessibleDoc =
nsAccessNode::GetDocAccessibleFor(weakShell);
if (!accessibleDoc) {
NS_WARNING("No accessible document for this presshell");
return nsnull;
}
nsCOMPtr<nsIAccessNode> maiNode;
accessibleDoc->GetCachedAccessNode(NS_STATIC_CAST(void*, hyperLink.get()),
getter_AddRefs(maiNode));
// if the maiHyperlink is not in cache, create it.
if (!maiNode) {
maiNode = new MaiHyperlink(hyperLink, nsnull, weakShell);
if (!maiNode) {
NS_WARNING("OUT OF MEMORY");
return nsnull;
}
nsCOMPtr<nsPIAccessNode> pMaiNode = do_QueryInterface(maiNode);
pMaiNode->Init(); // add to cache.
}
// we can get AtkHyperlink from the MaiHyperlink
nsIAccessNode *tmpNode = maiNode;
MaiHyperlink *maiHyperlink = NS_STATIC_CAST(MaiHyperlink *, tmpNode);
/* we should not addref the atkhyperlink because we are "get" not "ref" */
return maiHyperlink->GetAtkHyperlink();
}
gint
getLinkCountCB(AtkHypertext *aText)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleHyperText> accHyperlink;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleHyperText),
getter_AddRefs(accHyperlink));
NS_ENSURE_TRUE(accHyperlink, -1);
PRInt32 count = -1;
nsresult rv = accHyperlink->GetLinks(&count);
NS_ENSURE_SUCCESS(rv, -1);
return count;
}
gint
getLinkIndexCB(AtkHypertext *aText, gint aCharIndex)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleHyperText> accHyperlink;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleHyperText),
getter_AddRefs(accHyperlink));
NS_ENSURE_TRUE(accHyperlink, -1);
PRInt32 index = -1;
nsresult rv = accHyperlink->GetLinkIndex(aCharIndex, &index);
NS_ENSURE_SUCCESS(rv, -1);
return index;
}

View File

@@ -1,62 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 __MAI_INTERFACE_HYPERTEXT_H__
#define __MAI_INTERFACE_HYPERTEXT_H__
#include "nsMaiInterface.h"
#include "nsMaiHyperlink.h"
#include "nsIAccessibleHyperText.h"
class MaiInterfaceHypertext: public MaiInterface
{
public:
MaiInterfaceHypertext(nsAccessibleWrap *aAccWrap,
nsIWeakReference* aShell);
virtual ~MaiInterfaceHypertext();
virtual MaiInterfaceType GetType();
virtual const GInterfaceInfo *GetInterfaceInfo();
nsresult GetWeakShell(nsIWeakReference **aWeakShell);
private:
nsCOMPtr<nsIWeakReference> mWeakShell;
};
#endif /* __MAI_INTERFACE_HYPERTEXT_H__ */

View File

@@ -1,220 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Silvia Zhao (silvia.zhao@sun.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 "nsMaiInterfaceSelection.h"
G_BEGIN_DECLS
/* selection interface callbacks */
static void interfaceInitCB(AtkSelectionIface *aIface);
static gboolean addSelectionCB(AtkSelection *aSelection,
gint i);
static gboolean clearSelectionCB(AtkSelection *aSelection);
static AtkObject *refSelectionCB(AtkSelection *aSelection,
gint i);
static gint getSelectionCountCB(AtkSelection *aSelection);
static gboolean isChildSelectedCB(AtkSelection *aSelection,
gint i);
static gboolean removeSelectionCB(AtkSelection *aSelection,
gint i);
static gboolean selectAllSelectionCB(AtkSelection *aSelection);
G_END_DECLS
MaiInterfaceSelection::MaiInterfaceSelection(nsAccessibleWrap* aAccWrap):
MaiInterface(aAccWrap)
{
}
MaiInterfaceSelection::~MaiInterfaceSelection()
{
}
MaiInterfaceType
MaiInterfaceSelection::GetType()
{
return MAI_INTERFACE_SELECTION;
}
const GInterfaceInfo *
MaiInterfaceSelection::GetInterfaceInfo()
{
static const GInterfaceInfo atk_if_selection_info = {
(GInterfaceInitFunc) interfaceInitCB,
(GInterfaceFinalizeFunc) NULL,
NULL
};
return &atk_if_selection_info;
}
/* static functions */
void
interfaceInitCB(AtkSelectionIface *aIface)
{
NS_ASSERTION(aIface, "Invalid aIface");
if (!aIface)
return;
aIface->add_selection = addSelectionCB;
aIface->clear_selection = clearSelectionCB;
aIface->ref_selection = refSelectionCB;
aIface->get_selection_count = getSelectionCountCB;
aIface->is_child_selected = isChildSelectedCB;
aIface->remove_selection = removeSelectionCB;
aIface->select_all_selection = selectAllSelectionCB;
}
gboolean
addSelectionCB(AtkSelection *aSelection, gint i)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aSelection));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleSelectable> accSelection;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleSelectable),
getter_AddRefs(accSelection));
NS_ENSURE_TRUE(accSelection, FALSE);
return NS_SUCCEEDED(accSelection->AddChildToSelection(i));
}
gboolean
clearSelectionCB(AtkSelection *aSelection)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aSelection));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleSelectable> accSelection;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleSelectable),
getter_AddRefs(accSelection));
NS_ENSURE_TRUE(accSelection, FALSE);
return NS_SUCCEEDED(accSelection->ClearSelection());
}
AtkObject *
refSelectionCB(AtkSelection *aSelection, gint i)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aSelection));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleSelectable> accSelection;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleSelectable),
getter_AddRefs(accSelection));
NS_ENSURE_TRUE(accSelection, nsnull);
AtkObject *atkObj = nsnull;
nsCOMPtr<nsIAccessible> accSelect;
nsresult rv = accSelection->RefSelection(i, getter_AddRefs(accSelect));
if (NS_SUCCEEDED(rv) && accSelect) {
nsIAccessible *tmpAcc = accSelect;
nsAccessibleWrap *refAccWrap =
NS_STATIC_CAST(nsAccessibleWrap *, tmpAcc);
atkObj = refAccWrap->GetAtkObject();
if (atkObj)
g_object_ref(atkObj);
}
return atkObj;
}
gint
getSelectionCountCB(AtkSelection *aSelection)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aSelection));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleSelectable> accSelection;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleSelectable),
getter_AddRefs(accSelection));
NS_ENSURE_TRUE(accSelection, -1);
PRInt32 num = 0;
nsresult rv = accSelection->GetSelectionCount(&num);
return (NS_FAILED(rv)) ? -1 : num;
}
gboolean
isChildSelectedCB(AtkSelection *aSelection, gint i)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aSelection));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleSelectable> accSelection;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleSelectable),
getter_AddRefs(accSelection));
NS_ENSURE_TRUE(accSelection, FALSE);
PRBool result = FALSE;
nsresult rv = accSelection->IsChildSelected(i, &result);
return (NS_FAILED(rv)) ? FALSE : result;
}
gboolean
removeSelectionCB(AtkSelection *aSelection, gint i)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aSelection));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleSelectable> accSelection;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleSelectable),
getter_AddRefs(accSelection));
NS_ENSURE_TRUE(accSelection, FALSE);
nsresult rv = accSelection->RemoveChildFromSelection(i);
return (NS_FAILED(rv)) ? FALSE : TRUE;
}
gboolean
selectAllSelectionCB(AtkSelection *aSelection)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aSelection));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleSelectable> accSelection;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleSelectable),
getter_AddRefs(accSelection));
NS_ENSURE_TRUE(accSelection, FALSE);
PRBool result = FALSE;
nsresult rv = accSelection->SelectAllSelection(&result);
return (NS_FAILED(rv)) ? FALSE : result;
}

View File

@@ -1,57 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Silvia Zhao (silvia.zhao@sun.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 __MAI_INTERFACE_SELECTION_H__
#define __MAI_INTERFACE_SELECTION_H__
#include "nsMaiInterface.h"
#include "nsIAccessibleSelectable.h"
class MaiInterfaceSelection: public MaiInterface
{
public:
MaiInterfaceSelection(nsAccessibleWrap*);
~MaiInterfaceSelection();
virtual MaiInterfaceType GetType();
virtual const GInterfaceInfo *GetInterfaceInfo();
};
#endif /* __MAI_INTERFACE_SELECTION_H__ */

View File

@@ -1,584 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 "nsMaiInterfaceTable.h"
G_BEGIN_DECLS
/* table interface callbacks */
static void interfaceInitCB(AtkTableIface *aIface);
static AtkObject* refAtCB(AtkTable *aTable, gint aRow, gint aColumn);
static gint getIndexAtCB(AtkTable *aTable, gint aRow, gint aColumn);
static gint getColumnAtIndexCB(AtkTable *aTable, gint aIndex);
static gint getRowAtIndexCB(AtkTable *aTable, gint aIndex);
static gint getColumnCountCB(AtkTable *aTable);
static gint getRowCountCB(AtkTable *aTable);
static gint getColumnExtentAtCB(AtkTable *aTable, gint aRow, gint aColumn);
static gint getRowExtentAtCB(AtkTable *aTable, gint aRow, gint aColumn);
static AtkObject* getCaptionCB(AtkTable *aTable);
static const gchar* getColumnDescriptionCB(AtkTable *aTable, gint aColumn);
static AtkObject* getColumnHeaderCB(AtkTable *aTable, gint aColumn);
static const gchar* getRowDescriptionCB(AtkTable *aTable, gint aRow);
static AtkObject* getRowHeaderCB(AtkTable *aTable, gint aRow);
static AtkObject* getSummaryCB(AtkTable *aTable);
static gint getSelectedColumnsCB(AtkTable *aTable, gint **aSelected);
static gint getSelectedRowsCB(AtkTable *aTable, gint **aSelected);
static gboolean isColumnSelectedCB(AtkTable *aTable, gint aColumn);
static gboolean isRowSelectedCB(AtkTable *aTable, gint aRow);
static gboolean isCellSelectedCB(AtkTable *aTable, gint aRow, gint aColumn);
/* what are missing now for atk table */
/* ==================================================
void (* set_caption) (AtkTable *aTable,
AtkObject *caption);
void (* set_column_description) (AtkTable *aTable,
gint aColumn,
const gchar *description);
void (* set_column_header) (AtkTable *aTable,
gint aColumn,
AtkObject *header);
void (* set_row_description) (AtkTable *aTable,
gint aRow,
const gchar *description);
void (* set_row_header) (AtkTable *aTable,
gint aRow,
AtkObject *header);
void (* set_summary) (AtkTable *aTable,
AtkObject *accessible);
gboolean (* add_row_selection) (AtkTable *aTable,
gint aRow);
gboolean (* remove_row_selection) (AtkTable *aTable,
gint aRow);
gboolean (* add_column_selection) (AtkTable *aTable,
gint aColumn);
gboolean (* remove_column_selection) (AtkTable *aTable,
gint aColumn);
////////////////////////////////////////
// signal handlers
//
void (* row_inserted) (AtkTable *aTable,
gint aRow,
gint num_inserted);
void (* column_inserted) (AtkTable *aTable,
gint aColumn,
gint num_inserted);
void (* row_deleted) (AtkTable *aTable,
gint aRow,
gint num_deleted);
void (* column_deleted) (AtkTable *aTable,
gint aColumn,
gint num_deleted);
void (* row_reordered) (AtkTable *aTable);
void (* column_reordered) (AtkTable *aTable);
void (* model_changed) (AtkTable *aTable);
* ==================================================
*/
G_END_DECLS
MaiInterfaceTable::MaiInterfaceTable(nsAccessibleWrap* aAccWrap):
MaiInterface(aAccWrap)
{
}
MaiInterfaceTable::~MaiInterfaceTable()
{
}
MaiInterfaceType
MaiInterfaceTable::GetType()
{
return MAI_INTERFACE_TABLE;
}
const GInterfaceInfo *
MaiInterfaceTable::GetInterfaceInfo()
{
static const GInterfaceInfo atk_if_table_info = {
(GInterfaceInitFunc)interfaceInitCB,
(GInterfaceFinalizeFunc) NULL,
NULL
};
return &atk_if_table_info;
}
/* static functions */
void
interfaceInitCB(AtkTableIface *aIface)
{
g_return_if_fail(aIface != NULL);
aIface->ref_at = refAtCB;
aIface->get_index_at = getIndexAtCB;
aIface->get_column_at_index = getColumnAtIndexCB;
aIface->get_row_at_index = getRowAtIndexCB;
aIface->get_n_columns = getColumnCountCB;
aIface->get_n_rows = getRowCountCB;
aIface->get_column_extent_at = getColumnExtentAtCB;
aIface->get_row_extent_at = getRowExtentAtCB;
aIface->get_caption = getCaptionCB;
aIface->get_column_description = getColumnDescriptionCB;
aIface->get_column_header = getColumnHeaderCB;
aIface->get_row_description = getRowDescriptionCB;
aIface->get_row_header = getRowHeaderCB;
aIface->get_summary = getSummaryCB;
aIface->get_selected_columns = getSelectedColumnsCB;
aIface->get_selected_rows = getSelectedRowsCB;
aIface->is_column_selected = isColumnSelectedCB;
aIface->is_row_selected = isRowSelectedCB;
aIface->is_selected = isCellSelectedCB;
}
/* static */
AtkObject*
refAtCB(AtkTable *aTable, gint aRow, gint aColumn)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, nsnull);
nsCOMPtr<nsIAccessible> cell;
nsresult rv = accTable->CellRefAt(aRow, aColumn,getter_AddRefs(cell));
if (NS_FAILED(rv) || !cell)
return nsnull;
nsIAccessible *tmpAcc = cell;
nsAccessibleWrap *cellAccWrap = NS_STATIC_CAST(nsAccessibleWrap *, tmpAcc);
AtkObject *atkObj = cellAccWrap->GetAtkObject();
if (atkObj)
g_object_ref(atkObj);
return atkObj;
}
gint
getIndexAtCB(AtkTable *aTable, gint aRow, gint aColumn)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, -1);
PRInt32 index;
nsresult rv = accTable->GetIndexAt(aRow, aColumn, &index);
NS_ENSURE_SUCCESS(rv, -1);
return NS_STATIC_CAST(gint, index);
}
gint
getColumnAtIndexCB(AtkTable *aTable, gint aIndex)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, -1);
PRInt32 col;
nsresult rv = accTable->GetColumnAtIndex(aIndex, &col);
NS_ENSURE_SUCCESS(rv, -1);
return NS_STATIC_CAST(gint, col);
}
gint
getRowAtIndexCB(AtkTable *aTable, gint aIndex)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, -1);
PRInt32 row;
nsresult rv = accTable->GetRowAtIndex(aIndex, &row);
NS_ENSURE_SUCCESS(rv, -1);
return NS_STATIC_CAST(gint, row);
}
gint
getColumnCountCB(AtkTable *aTable)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, -1);
PRInt32 count;
nsresult rv = accTable->GetColumns(&count);
NS_ENSURE_SUCCESS(rv, -1);
return NS_STATIC_CAST(gint, count);
}
gint
getRowCountCB(AtkTable *aTable)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, -1);
PRInt32 count;
nsresult rv = accTable->GetRows(&count);
NS_ENSURE_SUCCESS(rv, -1);
return NS_STATIC_CAST(gint, count);
}
gint
getColumnExtentAtCB(AtkTable *aTable,
gint aRow, gint aColumn)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, -1);
PRInt32 extent;
nsresult rv = accTable->GetColumnExtentAt(aRow, aColumn, &extent);
NS_ENSURE_SUCCESS(rv, -1);
return NS_STATIC_CAST(gint, extent);
}
gint
getRowExtentAtCB(AtkTable *aTable,
gint aRow, gint aColumn)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, -1);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, -1);
PRInt32 extent;
nsresult rv = accTable->GetRowExtentAt(aRow, aColumn, &extent);
NS_ENSURE_SUCCESS(rv, -1);
return NS_STATIC_CAST(gint, extent);
}
AtkObject*
getCaptionCB(AtkTable *aTable)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, nsnull);
nsCOMPtr<nsIAccessible> caption;
nsresult rv = accTable->GetCaption(getter_AddRefs(caption));
if (NS_FAILED(rv) || !caption)
return nsnull;
nsIAccessible *tmpAcc = caption;
nsAccessibleWrap *captionAccWrap =
NS_STATIC_CAST(nsAccessibleWrap *, tmpAcc);
return captionAccWrap->GetAtkObject();
}
const gchar*
getColumnDescriptionCB(AtkTable *aTable, gint aColumn)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, nsnull);
MaiInterfaceTable *maiTable =
NS_STATIC_CAST(MaiInterfaceTable *,
accWrap->GetMaiInterface(MAI_INTERFACE_TABLE));
NS_ENSURE_TRUE(maiTable, nsnull);
const char *description = maiTable->GetColumnDescription();
if (!description) {
nsAutoString autoStr;
nsresult rv = accTable->GetColumnDescription(aColumn, autoStr);
NS_ENSURE_SUCCESS(rv, nsnull);
maiTable->SetColumnDescription(autoStr);
description = maiTable->GetColumnDescription();
}
return description;
}
AtkObject*
getColumnHeaderCB(AtkTable *aTable, gint aColumn)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, nsnull);
nsCOMPtr<nsIAccessibleTable> header;
nsresult rv = accTable->GetColumnHeader(getter_AddRefs(header));
NS_ENSURE_SUCCESS(rv, nsnull);
NS_ENSURE_TRUE(header, nsnull);
// Note: "table column header" has different definition between atk and mai
//
// 1. "getColumnHeaderCB" defined in AtkTableIface should return object
// whose role is "ATK_ROLE_TABLE_COLUMN_HEADER", which is implemented
// by nsXULTreeColumnitemAccessible.
//
// 2. "GetColumnHeader" defined in nsIAccessibleTable returns
// nsXULTreeColumnsAccessibleWrap, which exports nsIAccessibleTable and is
// "ROLE_LIST".
nsCOMPtr<nsIAccessible> accHeader;
header->CellRefAt(0, aColumn, getter_AddRefs(accHeader));
NS_ENSURE_TRUE(accHeader, nsnull);
nsIAccessible *tmpAcc = accHeader;
nsAccessibleWrap *headerAccWrap =
NS_STATIC_CAST(nsAccessibleWrap *, tmpAcc);
return headerAccWrap->GetAtkObject();
}
const gchar*
getRowDescriptionCB(AtkTable *aTable, gint aRow)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, nsnull);
MaiInterfaceTable *maiTable =
NS_STATIC_CAST(MaiInterfaceTable *,
accWrap->GetMaiInterface(MAI_INTERFACE_TABLE));
NS_ENSURE_TRUE(maiTable, nsnull);
nsAutoString autoStr;
nsresult rv = accTable->GetRowDescription(aRow, autoStr);
NS_ENSURE_SUCCESS(rv, nsnull);
maiTable->SetRowDescription(autoStr);
return maiTable->GetRowDescription();
}
AtkObject*
getRowHeaderCB(AtkTable *aTable, gint aRow)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, nsnull);
nsCOMPtr<nsIAccessibleTable> header;
nsresult rv = accTable->GetRowHeader(getter_AddRefs(header));
NS_ENSURE_SUCCESS(rv, nsnull);
nsCOMPtr<nsIAccessible> accHeader(do_QueryInterface(header));
NS_ENSURE_TRUE(accTable, nsnull);
nsIAccessible *tmpAcc = accHeader;
nsAccessibleWrap *headerAccWrap =
NS_STATIC_CAST(nsAccessibleWrap *, tmpAcc);
return headerAccWrap->GetAtkObject();
}
AtkObject*
getSummaryCB(AtkTable *aTable)
{
/* ??? in nsIAccessibleTable, it returns a nsAString */
return nsnull;
}
gint
getSelectedColumnsCB(AtkTable *aTable, gint **aSelected)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, 0);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, 0);
PRUint32 size = 0;
PRInt32 *columns = NULL;
nsresult rv = accTable->GetSelectedColumns(&size, &columns);
if (NS_FAILED(rv) || (size == 0) || !columns) {
*aSelected = nsnull;
return 0;
}
gint *atkColumns = g_new(gint, size);
if (!atkColumns) {
NS_WARNING("OUT OF MEMORY");
return nsnull;
}
//copy
for (PRUint32 index = 0; index < size; ++index)
atkColumns[index] = NS_STATIC_CAST(gint, columns[index]);
nsMemory::Free(columns);
*aSelected = atkColumns;
return size;
}
gint
getSelectedRowsCB(AtkTable *aTable, gint **aSelected)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, 0);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, 0);
PRUint32 size = 0;
PRInt32 *rows = NULL;
nsresult rv = accTable->GetSelectedRows(&size, &rows);
if (NS_FAILED(rv) || (size == 0) || !rows) {
*aSelected = nsnull;
return 0;
}
gint *atkRows = g_new(gint, size);
if (!atkRows) {
NS_WARNING("OUT OF MEMORY");
return nsnull;
}
//copy
for (PRUint32 index = 0; index < size; ++index)
atkRows[index] = NS_STATIC_CAST(gint, rows[index]);
nsMemory::Free(rows);
*aSelected = atkRows;
return size;
}
gboolean
isColumnSelectedCB(AtkTable *aTable, gint aColumn)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, FALSE);
PRBool outValue;
nsresult rv = accTable->IsColumnSelected(aColumn, &outValue);
return NS_FAILED(rv) ? FALSE : NS_STATIC_CAST(gboolean, outValue);
}
gboolean
isRowSelectedCB(AtkTable *aTable, gint aRow)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, FALSE);
PRBool outValue;
nsresult rv = accTable->IsRowSelected(aRow, &outValue);
return NS_FAILED(rv) ? FALSE : NS_STATIC_CAST(gboolean, outValue);
}
gboolean
isCellSelectedCB(AtkTable *aTable, gint aRow, gint aColumn)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleTable> accTable;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleTable),
getter_AddRefs(accTable));
NS_ENSURE_TRUE(accTable, FALSE);
PRBool outValue;
nsresult rv = accTable->IsCellSelected(aRow, aColumn, &outValue);
return NS_FAILED(rv) ? FALSE : NS_STATIC_CAST(gboolean, outValue);
}

View File

@@ -1,75 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 __MAI_INTERFACE_TABLE_H__
#define __MAI_INTERFACE_TABLE_H__
#include "nsMaiInterface.h"
#include "nsIAccessibleTable.h"
class MaiInterfaceTable: public MaiInterface
{
public:
MaiInterfaceTable(nsAccessibleWrap*);
virtual ~MaiInterfaceTable();
virtual MaiInterfaceType GetType();
virtual const GInterfaceInfo *GetInterfaceInfo();
const char *GetColumnDescription() {
return mColumnDescription.get();
}
void SetColumnDescription(nsAString &aString) {
CopyUTF16toUTF8(aString, mColumnDescription);
}
const char *GetRowDescription() {
return mRowDescription.get();
}
void SetRowDescription(nsAString &aString) {
CopyUTF16toUTF8(aString, mRowDescription);
}
private:
nsCString mColumnDescription;
nsCString mRowDescription;
};
#endif /* __MAI_INTERFACE_TABLE_H__ */

View File

@@ -1,512 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* Ginn Chen (ginn.chen@sun.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 "nsMaiInterfaceText.h"
#include "nsString.h"
G_BEGIN_DECLS
static void interfaceInitCB(AtkTextIface *aIface);
/* text interface callbacks */
static gchar *getTextCB(AtkText *aText,
gint aStartOffset, gint aEndOffset);
static gchar *getTextAfterOffsetCB(AtkText *aText, gint aOffset,
AtkTextBoundary aBoundaryType,
gint *aStartOffset, gint *aEndOffset);
static gchar *getTextAtOffsetCB(AtkText *aText, gint aOffset,
AtkTextBoundary aBoundaryType,
gint *aStartOffset, gint *aEndOffset);
static gunichar getCharacterAtOffsetCB(AtkText *aText, gint aOffset);
static gchar *getTextBeforeOffsetCB(AtkText *aText, gint aOffset,
AtkTextBoundary aBoundaryType,
gint *aStartOffset, gint *aEndOffset);
static gint getCaretOffsetCB(AtkText *aText);
static AtkAttributeSet *getRunAttributesCB(AtkText *aText, gint aOffset,
gint *aStartOffset,
gint *aEndOffset);
static AtkAttributeSet* getDefaultAttributesCB(AtkText *aText);
static void getCharacterExtentsCB(AtkText *aText, gint aOffset,
gint *aX, gint *aY,
gint *aWidth, gint *aHeight,
AtkCoordType aCoords);
static gint getCharacterCountCB(AtkText *aText);
static gint getOffsetAtPointCB(AtkText *aText,
gint aX, gint aY,
AtkCoordType aCoords);
static gint getSelectionCountCB(AtkText *aText);
static gchar *getSelectionCB(AtkText *aText, gint aSelectionNum,
gint *aStartOffset, gint *aEndOffset);
// set methods
static gboolean addSelectionCB(AtkText *aText,
gint aStartOffset,
gint aEndOffset);
static gboolean removeSelectionCB(AtkText *aText,
gint aSelectionNum);
static gboolean setSelectionCB(AtkText *aText, gint aSelectionNum,
gint aStartOffset, gint aEndOffset);
static gboolean setCaretOffsetCB(AtkText *aText, gint aOffset);
/*************************************************
// signal handlers
//
static void TextChangedCB(AtkText *aText, gint aPosition, gint aLength);
static void TextCaretMovedCB(AtkText *aText, gint aLocation);
static void TextSelectionChangedCB(AtkText *aText);
*/
G_END_DECLS
MaiInterfaceText::MaiInterfaceText(nsAccessibleWrap *aAccWrap):
MaiInterface(aAccWrap)
{
}
MaiInterfaceText::~MaiInterfaceText()
{
}
MaiInterfaceType
MaiInterfaceText::GetType()
{
return MAI_INTERFACE_TEXT;
}
const GInterfaceInfo *
MaiInterfaceText::GetInterfaceInfo()
{
static const GInterfaceInfo atk_if_text_info = {
(GInterfaceInitFunc)interfaceInitCB,
(GInterfaceFinalizeFunc) NULL,
NULL
};
return &atk_if_text_info;
}
/* statics */
void
interfaceInitCB(AtkTextIface *aIface)
{
NS_ASSERTION(aIface, "Invalid aIface");
if (!aIface)
return;
aIface->get_text = getTextCB;
aIface->get_text_after_offset = getTextAfterOffsetCB;
aIface->get_text_at_offset = getTextAtOffsetCB;
aIface->get_character_at_offset = getCharacterAtOffsetCB;
aIface->get_text_before_offset = getTextBeforeOffsetCB;
aIface->get_caret_offset = getCaretOffsetCB;
aIface->get_run_attributes = getRunAttributesCB;
aIface->get_default_attributes = getDefaultAttributesCB;
aIface->get_character_extents = getCharacterExtentsCB;
aIface->get_character_count = getCharacterCountCB;
aIface->get_offset_at_point = getOffsetAtPointCB;
aIface->get_n_selections = getSelectionCountCB;
aIface->get_selection = getSelectionCB;
// set methods
aIface->add_selection = addSelectionCB;
aIface->remove_selection = removeSelectionCB;
aIface->set_selection = setSelectionCB;
aIface->set_caret_offset = setCaretOffsetCB;
}
void ConvertTexttoAsterisks(nsAccessibleWrap* accWrap, nsAString& aString)
{
// convert each char to "*" when it's "password text"
PRUint32 accRole;
accWrap->GetRole(&accRole);
if (NS_STATIC_CAST(AtkRole, accRole) == ATK_ROLE_PASSWORD_TEXT) {
for (PRUint32 i = 0; i < aString.Length(); i++)
aString.Replace(i, 1, NS_LITERAL_STRING("*"));
}
}
gchar *
getTextCB(AtkText *aText, gint aStartOffset, gint aEndOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, nsnull);
nsAutoString autoStr;
nsresult rv = accText->GetText(aStartOffset, aEndOffset, autoStr);
NS_ENSURE_SUCCESS(rv, nsnull);
ConvertTexttoAsterisks(accWrap, autoStr);
NS_ConvertUTF16toUTF8 cautoStr(autoStr);
//copy and return, libspi will free it.
return (cautoStr.get()) ? g_strdup(cautoStr.get()) : nsnull;
}
gchar *
getTextAfterOffsetCB(AtkText *aText, gint aOffset,
AtkTextBoundary aBoundaryType,
gint *aStartOffset, gint *aEndOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, nsnull);
nsAutoString autoStr;
PRInt32 startOffset = 0, endOffset = 0;
nsresult rv =
accText->GetTextAfterOffset(aOffset, aBoundaryType,
&startOffset, &endOffset, autoStr);
*aStartOffset = startOffset;
*aEndOffset = endOffset;
NS_ENSURE_SUCCESS(rv, nsnull);
ConvertTexttoAsterisks(accWrap, autoStr);
NS_ConvertUTF16toUTF8 cautoStr(autoStr);
return (cautoStr.get()) ? g_strdup(cautoStr.get()) : nsnull;
}
gchar *
getTextAtOffsetCB(AtkText *aText, gint aOffset,
AtkTextBoundary aBoundaryType,
gint *aStartOffset, gint *aEndOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, nsnull);
nsAutoString autoStr;
PRInt32 startOffset = 0, endOffset = 0;
nsresult rv =
accText->GetTextAtOffset(aOffset, aBoundaryType,
&startOffset, &endOffset, autoStr);
*aStartOffset = startOffset;
*aEndOffset = endOffset;
NS_ENSURE_SUCCESS(rv, nsnull);
ConvertTexttoAsterisks(accWrap, autoStr);
NS_ConvertUTF16toUTF8 cautoStr(autoStr);
return (cautoStr.get()) ? g_strdup(cautoStr.get()) : nsnull;
}
gunichar
getCharacterAtOffsetCB(AtkText *aText, gint aOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, 0);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, 0);
/* PRUnichar is unsigned short in Mozilla */
/* gnuichar is guint32 in glib */
PRUnichar uniChar;
nsresult rv =
accText->GetCharacterAtOffset(aOffset, &uniChar);
// convert char to "*" when it's "password text"
PRUint32 accRole;
accWrap->GetRole(&accRole);
if (NS_STATIC_CAST(AtkRole, accRole) == ATK_ROLE_PASSWORD_TEXT) {
uniChar = '*';
}
return (NS_FAILED(rv)) ? 0 : NS_STATIC_CAST(gunichar, uniChar);
}
gchar *
getTextBeforeOffsetCB(AtkText *aText, gint aOffset,
AtkTextBoundary aBoundaryType,
gint *aStartOffset, gint *aEndOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, nsnull);
nsAutoString autoStr;
PRInt32 startOffset = 0, endOffset = 0;
nsresult rv =
accText->GetTextBeforeOffset(aOffset, aBoundaryType,
&startOffset, &endOffset, autoStr);
*aStartOffset = startOffset;
*aEndOffset = endOffset;
NS_ENSURE_SUCCESS(rv, nsnull);
ConvertTexttoAsterisks(accWrap, autoStr);
NS_ConvertUTF16toUTF8 cautoStr(autoStr);
return (cautoStr.get()) ? g_strdup(cautoStr.get()) : nsnull;
}
gint
getCaretOffsetCB(AtkText *aText)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, 0);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, 0);
PRInt32 offset;
nsresult rv = accText->GetCaretOffset(&offset);
return (NS_FAILED(rv)) ? 0 : NS_STATIC_CAST(gint, offset);
}
AtkAttributeSet *
getRunAttributesCB(AtkText *aText, gint aOffset,
gint *aStartOffset,
gint *aEndOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, nsnull);
nsCOMPtr<nsISupports> attrSet;
PRInt32 startOffset = 0, endOffset = 0;
nsresult rv = accText->GetAttributeRange(aOffset,
&startOffset, &endOffset,
getter_AddRefs(attrSet));
*aStartOffset = startOffset;
*aEndOffset = endOffset;
NS_ENSURE_SUCCESS(rv, nsnull);
/* what to do with the nsISupports ? ??? */
return nsnull;
}
AtkAttributeSet *
getDefaultAttributesCB(AtkText *aText)
{
/* not supported ??? */
return nsnull;
}
void
getCharacterExtentsCB(AtkText *aText, gint aOffset,
gint *aX, gint *aY,
gint *aWidth, gint *aHeight,
AtkCoordType aCoords)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if(!accWrap)
return;
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
if (!accText)
return;
PRInt32 extY = 0, extX = 0;
PRInt32 extWidth = 0, extHeight = 0;
nsresult rv = accText->GetCharacterExtents(aOffset, &extX, &extY,
&extWidth, &extHeight,
aCoords);
*aX = extX;
*aY = extY;
*aWidth = extWidth;
*aHeight = extHeight;
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"MaiInterfaceText::GetCharacterExtents, failed\n");
}
gint
getCharacterCountCB(AtkText *aText)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, 0);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, 0);
PRInt32 count = 0;
nsresult rv = accText->GetCharacterCount(&count);
return (NS_FAILED(rv)) ? 0 : NS_STATIC_CAST(gint, count);
}
gint
getOffsetAtPointCB(AtkText *aText,
gint aX, gint aY,
AtkCoordType aCoords)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, 0);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, 0);
PRInt32 offset = 0;
nsresult rv = accText->GetOffsetAtPoint(aX, aY, aCoords, &offset);
return (NS_FAILED(rv)) ? 0 : NS_STATIC_CAST(gint, offset);
}
gint
getSelectionCountCB(AtkText *aText)
{
/* no implemetation in nsIAccessibleText??? */
//new attribuate will be added in nsIAccessibleText.idl
//readonly attribute long selectionCount;
return 0;
}
gchar *
getSelectionCB(AtkText *aText, gint aSelectionNum,
gint *aStartOffset, gint *aEndOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, nsnull);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, nsnull);
PRInt32 startOffset = 0, endOffset = 0;
nsresult rv = accText->GetSelectionBounds(aSelectionNum,
&startOffset, &endOffset);
*aStartOffset = startOffset;
*aEndOffset = endOffset;
NS_ENSURE_SUCCESS(rv, nsnull);
return getTextCB(aText, *aStartOffset, *aEndOffset);
}
// set methods
gboolean
addSelectionCB(AtkText *aText,
gint aStartOffset,
gint aEndOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, FALSE);
nsresult rv = accText->AddSelection(aStartOffset, aEndOffset);
return NS_SUCCEEDED(rv) ? TRUE : FALSE;
}
gboolean
removeSelectionCB(AtkText *aText,
gint aSelectionNum)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, FALSE);
nsresult rv = accText->RemoveSelection(aSelectionNum);
return NS_SUCCEEDED(rv) ? TRUE : FALSE;
}
gboolean
setSelectionCB(AtkText *aText, gint aSelectionNum,
gint aStartOffset, gint aEndOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, FALSE);
nsresult rv = accText->SetSelectionBounds(aSelectionNum,
aStartOffset, aEndOffset);
return NS_SUCCEEDED(rv) ? TRUE : FALSE;
}
gboolean
setCaretOffsetCB(AtkText *aText, gint aOffset)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleText> accText;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
getter_AddRefs(accText));
NS_ENSURE_TRUE(accText, FALSE);
nsresult rv = accText->SetCaretOffset(aOffset);
return NS_SUCCEEDED(rv) ? TRUE : FALSE;
}

View File

@@ -1,57 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.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 __MAI_INTERFACE_TEXT_H__
#define __MAI_INTERFACE_TEXT_H__
#include "nsMaiInterface.h"
#include "nsIAccessibleText.h"
class MaiInterfaceText: public MaiInterface
{
public:
MaiInterfaceText(nsAccessibleWrap*);
virtual ~MaiInterfaceText();
virtual MaiInterfaceType GetType();
virtual const GInterfaceInfo *GetInterfaceInfo();
};
#endif /* __MAI_INTERFACE_TEXT_H__ */

View File

@@ -1,178 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Silvia Zhao (silvia.zhao@sun.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 "nsMaiInterfaceValue.h"
G_BEGIN_DECLS
/*value interface callbacks*/
static void interfaceInitCB(AtkValueIface *aIface);
static void getCurrentValueCB(AtkValue *obj,
GValue *value);
static void getMaximumValueCB(AtkValue *obj,
GValue *value);
static void getMinimumValueCB(AtkValue *obj,
GValue *value);
static gboolean setCurrentValueCB(AtkValue *obj,
const GValue *value);
G_END_DECLS
MaiInterfaceValue::MaiInterfaceValue(nsAccessibleWrap *aAccWrap):
MaiInterface(aAccWrap)
{
}
MaiInterfaceValue::~MaiInterfaceValue()
{
}
MaiInterfaceType
MaiInterfaceValue::GetType()
{
return MAI_INTERFACE_VALUE;
}
const GInterfaceInfo *
MaiInterfaceValue::GetInterfaceInfo()
{
static const GInterfaceInfo atk_if_value_info = {
(GInterfaceInitFunc) interfaceInitCB,
(GInterfaceFinalizeFunc) NULL,
NULL
};
return &atk_if_value_info;
}
/* static functions */
void
interfaceInitCB(AtkValueIface *aIface)
{
NS_ASSERTION(aIface, "Invalid aIface");
if (!aIface)
return;
aIface->get_current_value = getCurrentValueCB;
aIface->get_maximum_value = getMaximumValueCB;
aIface->get_minimum_value = getMinimumValueCB;
aIface->set_current_value = setCurrentValueCB;
}
void
getCurrentValueCB(AtkValue *obj, GValue *value)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(obj));
if (!accWrap)
return;
nsCOMPtr<nsIAccessibleValue> accValue;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleValue),
getter_AddRefs(accValue));
if (!accValue)
return;
memset (value, 0, sizeof (GValue));
double accDouble;
if (NS_FAILED(accValue->GetCurrentValue(&accDouble)))
return;
g_value_init (value, G_TYPE_DOUBLE);
g_value_set_double (value, accDouble);
}
void
getMaximumValueCB(AtkValue *obj, GValue *value)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(obj));
if (!accWrap)
return;
nsCOMPtr<nsIAccessibleValue> accValue;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleValue),
getter_AddRefs(accValue));
if (!accValue)
return;
memset (value, 0, sizeof (GValue));
double accDouble;
if (NS_FAILED(accValue->GetMaximumValue(&accDouble)))
return;
g_value_init (value, G_TYPE_DOUBLE);
g_value_set_double (value, accDouble);
}
void
getMinimumValueCB(AtkValue *obj, GValue *value)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(obj));
if (!accWrap)
return;
nsCOMPtr<nsIAccessibleValue> accValue;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleValue),
getter_AddRefs(accValue));
if (!accValue)
return;
memset (value, 0, sizeof (GValue));
double accDouble;
if (NS_FAILED(accValue->GetMinimumValue(&accDouble)))
return;
g_value_init (value, G_TYPE_DOUBLE);
g_value_set_double (value, accDouble);
}
gboolean
setCurrentValueCB(AtkValue *obj, const GValue *value)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(obj));
NS_ENSURE_TRUE(accWrap, FALSE);
nsCOMPtr<nsIAccessibleValue> accValue;
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleValue),
getter_AddRefs(accValue));
NS_ENSURE_TRUE(accValue, FALSE);
PRBool aBool;
double accDouble;
accDouble = g_value_get_double (value);
accValue->SetCurrentValue(accDouble, &aBool);
return aBool;
}

View File

@@ -1,57 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Silvia Zhao (silvia.zhao@sun.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 __MAI_INTERFACE_VALUE_H__
#define __MAI_INTERFACE_VALUE_H__
#include "nsMaiInterface.h"
#include "nsIAccessibleValue.h"
class MaiInterfaceValue: public MaiInterface
{
public:
MaiInterfaceValue(nsAccessibleWrap*);
~MaiInterfaceValue();
virtual MaiInterfaceType GetType();
virtual const GInterfaceInfo *GetInterfaceInfo();
};
#endif /* __MAI_INTERFACE_VALUE_H__ */

View File

@@ -1,104 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* Ginn Chen (ginn.chen@sun.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 "nsMai.h"
#include "nsRootAccessibleWrap.h"
#include "nsAppRootAccessible.h"
#include "nsIDOMWindow.h"
#include "nsPIDOMWindow.h"
#include "nsIFocusController.h"
nsRootAccessibleWrap::nsRootAccessibleWrap(nsIDOMNode *aDOMNode,
nsIWeakReference* aShell):
nsRootAccessible(aDOMNode, aShell)
{
MAI_LOG_DEBUG(("New Root Acc=%p\n", (void*)this));
nsAppRootAccessible *root = nsAppRootAccessible::Create();
if (root)
root->AddRootAccessible(this);
}
nsRootAccessibleWrap::~nsRootAccessibleWrap()
{
MAI_LOG_DEBUG(("Delete Root Acc=%p\n", (void*)this));
nsAppRootAccessible *root = nsAppRootAccessible::Create();
if (root)
root->RemoveRootAccessible(this);
}
NS_IMETHODIMP nsRootAccessibleWrap::GetParent(nsIAccessible ** aParent)
{
nsAppRootAccessible *root = nsAppRootAccessible::Create();
nsresult rv = NS_OK;
if (root) {
NS_IF_ADDREF(*aParent = root);
}
else {
*aParent = nsnull;
rv = NS_ERROR_FAILURE;
}
return rv;
}
NS_IMETHODIMP nsRootAccessibleWrap::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_FRAME;
return NS_OK;
}
NS_IMETHODIMP nsRootAccessibleWrap::GetExtState(PRUint32 *aState)
{
nsAccessibleWrap::GetExtState(aState);
nsCOMPtr<nsIDOMWindow> domWin;
GetWindow(getter_AddRefs(domWin));
nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(domWin));
if (privateDOMWindow) {
nsIFocusController *focusController =
privateDOMWindow->GetRootFocusController();
PRBool isActive = PR_FALSE;
focusController->GetActive(&isActive);
if (isActive) {
*aState |= EXT_STATE_ACTIVE;
}
}
return NS_OK;
}

View File

@@ -1,64 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bolian Yin (bolian.yin@sun.com)
* Ginn Chen (ginn.chen@sun.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 __NS_ROOT_ACCESSIBLE_WRAP_H__
#define __NS_ROOT_ACCESSIBLE_WRAP_H__
#include "nsRootAccessible.h"
/* nsRootAccessibleWrap is the accessible class for toplevel Window.
* The instance of nsRootAccessibleWrap will be child of MaiAppRoot instance.
* It is added into root when the toplevel window is created, and removed
* from root when the toplevel window is destroyed.
*/
class nsRootAccessibleWrap: public nsRootAccessible
{
public:
nsRootAccessibleWrap(nsIDOMNode *aDOMNode, nsIWeakReference* aShell);
virtual ~nsRootAccessibleWrap();
NS_IMETHOD GetParent(nsIAccessible ** aParent);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetExtState(PRUint32 *aState);
};
#endif /* __NS_ROOT_ACCESSIBLE_WRAP_H__ */

View File

@@ -1,45 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Corp.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Aaron Leventhal
*
* 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 _nsTextAccessibleWrap_H_
#define _nsTextAccessibleWrap_H_
#include "nsTextAccessible.h"
#include "nsAccessibleText.h"
#endif

View File

@@ -1,153 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Gilbert Fang (gilbert.fang@sun.com)
* Kyle Yuan (kyle.yuan@sun.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 "nsIDOMElement.h"
#include "nsXULFormControlAccessibleWrap.h"
#include "nsIFrame.h"
#include "nsIPresShell.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMXULTextboxElement.h"
NS_IMPL_ISUPPORTS_INHERITED1(nsXULProgressMeterAccessibleWrap, nsXULProgressMeterAccessible, nsIAccessibleValue)
nsXULProgressMeterAccessibleWrap::nsXULProgressMeterAccessibleWrap(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsXULProgressMeterAccessible(aNode, aShell)
{
}
/* readonly attribute double maximumValue; */
NS_IMETHODIMP nsXULProgressMeterAccessibleWrap::GetMaximumValue(double *aMaximumValue)
{
*aMaximumValue = 1; // 100% = 1;
return NS_OK;
}
/* readonly attribute double minimumValue; */
NS_IMETHODIMP nsXULProgressMeterAccessibleWrap::GetMinimumValue(double *aMinimumValue)
{
*aMinimumValue = 0;
return NS_OK;
}
/* readonly attribute double currentValue; */
NS_IMETHODIMP nsXULProgressMeterAccessibleWrap::GetCurrentValue(double *aCurrentValue)
{
nsAutoString currentValue;
GetValue(currentValue);
PRInt32 error;
*aCurrentValue = currentValue.ToFloat(&error) / 100;
return NS_OK;
}
/* boolean setCurrentValue (in double value); */
NS_IMETHODIMP nsXULProgressMeterAccessibleWrap::SetCurrentValue(double aValue, PRBool *_retval)
{
//Here I do not suppose the min/max are 0/1.00 because I want
// these part of code to be more extensible.
*_retval = PR_FALSE;
double min, max;
GetMinimumValue(&min);
GetMaximumValue(&max);
if (aValue > max || aValue < min)
return NS_ERROR_INVALID_ARG;
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No element for DOM node!");
PRUint32 value = PRUint32(aValue * 100.0 + 0.5);
nsAutoString valueString;
valueString.AppendInt(value);
valueString.AppendLiteral("%");
if (NS_SUCCEEDED(element->SetAttribute(NS_LITERAL_STRING("value"), valueString))) {
*_retval = PR_TRUE;
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMPL_ISUPPORTS_INHERITED2(nsXULTextFieldAccessibleWrap, nsXULTextFieldAccessible, nsIAccessibleText, nsIAccessibleEditableText)
nsXULTextFieldAccessibleWrap::nsXULTextFieldAccessibleWrap(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsXULTextFieldAccessible(aNode, aShell), nsAccessibleEditableText(aNode)
{
nsCOMPtr<nsIDOMXULTextBoxElement> textBox(do_QueryInterface(aNode));
NS_ASSERTION(textBox, "Not a XUL textbox!");
if (!textBox)
return;
textBox->GetInputField(getter_AddRefs(mTextNode));
if (!mTextNode)
return;
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
if (!shell)
return;
nsCOMPtr<nsIContent> content(do_QueryInterface(mTextNode));
nsIFrame* frame = shell->GetPrimaryFrameFor(content);
if (!frame)
return;
nsITextControlFrame *textFrame;
frame->QueryInterface(NS_GET_IID(nsITextControlFrame), (void**)&textFrame);
if (textFrame) {
nsCOMPtr<nsIEditor> editor;
textFrame->GetEditor(getter_AddRefs(editor));
SetEditor(editor);
}
}
NS_IMETHODIMP nsXULTextFieldAccessibleWrap::GetRole(PRUint32 *aRole)
{
PRUint32 state = 0;
nsresult rv = GetState(&state);
if (NS_SUCCEEDED(rv) && (state & STATE_PROTECTED))
*aRole = ROLE_PASSWORD_TEXT;
else
*aRole = ROLE_TEXT;
return NS_OK;
}
NS_IMETHODIMP nsXULTextFieldAccessibleWrap::Shutdown()
{
nsAccessibleEditableText::ShutdownEditor();
return nsXULTextFieldAccessible::Shutdown();
}

View File

@@ -1,70 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Gilbert Fang (gilbert.fang@sun.com)
* Kyle Yuan (kyle.yuan@sun.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 __nsXULFormControlAccessibleWrap_h__
#define __nsXULFormControlAccessibleWrap_h__
#include "nsIAccessibleValue.h"
#include "nsXULFormControlAccessible.h"
#include "nsAccessibleText.h"
class nsXULProgressMeterAccessibleWrap : public nsXULProgressMeterAccessible,
public nsIAccessibleValue
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEVALUE
nsXULProgressMeterAccessibleWrap(nsIDOMNode* aNode, nsIWeakReference* aShell);
};
class nsXULTextFieldAccessibleWrap : public nsXULTextFieldAccessible,
public nsAccessibleEditableText
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsXULTextFieldAccessibleWrap(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetRole(PRUint32* aRole);
NS_IMETHOD Shutdown();
};
#endif

View File

@@ -1,45 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is IBM Corporation
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aleventh@us.ibm.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 __nsXULMenuAccessibleWrap_h__
#define __nsXULMenuAccessibleWrap_h__
#include "nsXULMenuAccessible.h"
typedef class nsXULMenuitemAccessible nsXULMenuitemAccessibleWrap;
#endif

View File

@@ -1,570 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Pete Zha (pete.zha@sun.com)
* Kyle Yuan (kyle.yuan@sun.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 "nsIDOMElement.h"
#include "nsITreeSelection.h"
#include "nsITreeColumns.h"
#include "nsXULTreeAccessibleWrap.h"
// --------------------------------------------------------
// nsXULTreeAccessibleWrap Accessible
// --------------------------------------------------------
NS_IMPL_ISUPPORTS_INHERITED1(nsXULTreeAccessibleWrap, nsXULTreeAccessible, nsIAccessibleTable)
nsXULTreeAccessibleWrap::nsXULTreeAccessibleWrap(nsIDOMNode *aDOMNode, nsIWeakReference *aShell):
nsXULTreeAccessible(aDOMNode, aShell)
{
mCaption = nsnull;
}
// tree's children count is row count * col count + treecols count
// override "children count = row count + treecols count" defined in
// nsXULTreeAccessible
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetChildCount(PRInt32 *aAccChildCount)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
// get treecols count, which is cached by nsAccessibleTreeWalker
// by going through DOM structure of XUL tree
nsAccessible::GetChildCount(aAccChildCount);
// add the count of table cell (or tree item) accessibles, which are
// created and appended by XUL tree accessible implementation
PRInt32 rowCount, colCount = 1;
mTreeView->GetRowCount(&rowCount);
GetColumnCount(mTree, &colCount);
*aAccChildCount += rowCount * colCount;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetCaption(nsIAccessible **aCaption)
{
*aCaption = mCaption;
NS_IF_ADDREF(*aCaption);
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::SetCaption(nsIAccessible *aCaption)
{
mCaption = aCaption;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetSummary(nsAString &aSummary)
{
aSummary = mSummary;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::SetSummary(const nsAString &aSummary)
{
mSummary = aSummary;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumns(PRInt32 *aColumns)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIAccessible> acc;
rv = nsAccessible::GetFirstChild(getter_AddRefs(acc));
NS_ENSURE_TRUE(acc, NS_ERROR_FAILURE);
return acc->GetChildCount(aColumns);
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnHeader(nsIAccessibleTable **aColumnHeader)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIAccessible> acc;
nsAccessible::GetFirstChild(getter_AddRefs(acc));
NS_ENSURE_TRUE(acc, NS_ERROR_FAILURE);
nsCOMPtr<nsIAccessibleTable> accTable(do_QueryInterface(acc, &rv));
NS_ENSURE_SUCCESS(rv, rv);
*aColumnHeader = accTable;
NS_IF_ADDREF(*aColumnHeader);
return rv;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetRows(PRInt32 *aRows)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
return mTreeView->GetRowCount(aRows);
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetRowHeader(nsIAccessibleTable **aRowHeader)
{
// Row header not supported
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetSelectedColumns(PRUint32 *aNumColumns, PRInt32 **aColumns)
{
// If all the row has been selected, then all the columns are selected.
// Because we can't select a column alone.
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
NS_ENSURE_ARG_POINTER(aNumColumns);
nsresult rv = NS_OK;
PRInt32 rows;
rv = GetRows(&rows);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 selectedRows;
rv = GetSelectionCount(&selectedRows);
NS_ENSURE_SUCCESS(rv, rv);
if (rows == selectedRows) {
PRInt32 columns;
rv = GetColumns(&columns);
NS_ENSURE_SUCCESS(rv, rv);
*aNumColumns = columns;
} else {
*aNumColumns = 0;
return rv;
}
PRInt32 *outArray = (PRInt32 *)nsMemory::Alloc((*aNumColumns) * sizeof(PRInt32));
NS_ENSURE_TRUE(outArray, NS_ERROR_OUT_OF_MEMORY);
for (PRUint32 index = 0; index < *aNumColumns; index++) {
outArray[index] = index;
}
*aColumns = outArray;
return rv;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetSelectedRows(PRUint32 *aNumRows, PRInt32 **aRows)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
NS_ENSURE_ARG_POINTER(aNumRows);
nsresult rv = NS_OK;
rv = GetSelectionCount((PRInt32 *)aNumRows);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 *outArray = (PRInt32 *)nsMemory::Alloc((*aNumRows) * sizeof(PRInt32));
NS_ENSURE_TRUE(outArray, NS_ERROR_OUT_OF_MEMORY);
nsCOMPtr<nsITreeView> view;
rv = mTree->GetView(getter_AddRefs(view));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsITreeSelection> selection;
rv = view->GetSelection(getter_AddRefs(selection));
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 rowCount;
rv = GetRows(&rowCount);
NS_ENSURE_SUCCESS(rv, rv);
PRBool isSelected;
PRInt32 index, curr = 0;
for (index = 0; index < rowCount; index++) {
selection->IsSelected(index, &isSelected);
if (isSelected) {
outArray[curr++] = index;
}
}
*aRows = outArray;
return rv;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::CellRefAt(PRInt32 aRow, PRInt32 aColumn, nsIAccessible **_retval)
{
NS_ENSURE_TRUE(mDOMNode && mTree, NS_ERROR_FAILURE);
nsresult rv = NS_OK;
nsCOMPtr<nsIAccessibleTable> header;
rv = GetColumnHeader(getter_AddRefs(header));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAccessible> column;
rv = header->CellRefAt(0, aColumn, getter_AddRefs(column));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAccessNode> accessNode(do_QueryInterface(column));
NS_ASSERTION(accessNode, "Unable to QI to nsIAccessNode");
nsCOMPtr<nsIDOMNode> columnNode;
rv = accessNode->GetDOMNode(getter_AddRefs(columnNode));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMElement> columnElement(do_QueryInterface(columnNode, &rv));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsITreeColumns> treeColumns;
rv = mTree->GetColumns(getter_AddRefs(treeColumns));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsITreeColumn> treeColumn;
rv = treeColumns->GetColumnFor(columnElement, getter_AddRefs(treeColumn));
NS_ENSURE_SUCCESS(rv, rv);
return GetCachedTreeitemAccessible(aRow, treeColumn, _retval);
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetIndexAt(PRInt32 aRow, PRInt32 aColumn, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv = NS_OK;
PRInt32 columns;
rv = GetColumns(&columns);
NS_ENSURE_SUCCESS(rv, rv);
*_retval = aRow * columns + aColumn;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnAtIndex(PRInt32 aIndex, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv = NS_OK;
PRInt32 columns;
rv = GetColumns(&columns);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 treeCols;
nsAccessible::GetChildCount(&treeCols);
*_retval = (aIndex - treeCols) % columns;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetRowAtIndex(PRInt32 aIndex, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv = NS_OK;
PRInt32 columns;
rv = GetColumns(&columns);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 treeCols;
nsAccessible::GetChildCount(&treeCols);
*_retval = (aIndex - treeCols) / columns;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnExtentAt(PRInt32 aRow, PRInt32 aColumn, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = 1;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetRowExtentAt(PRInt32 aRow, PRInt32 aColumn, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = 1;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnDescription(PRInt32 aColumn, nsAString & _retval)
{
nsCOMPtr<nsIAccessibleTable> columnHeader;
nsresult rv = GetColumnHeader(getter_AddRefs(columnHeader));
if (NS_SUCCEEDED(rv) && columnHeader) {
return columnHeader->GetColumnDescription(aColumn, _retval);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetRowDescription(PRInt32 aRow, nsAString & _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::IsColumnSelected(PRInt32 aColumn, PRBool *_retval)
{
// If all the row has been selected, then all the columns are selected.
// Because we can't select a column alone.
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv = NS_OK;
PRInt32 rows;
rv = GetRows(&rows);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 selectedRows;
rv = GetSelectionCount(&selectedRows);
NS_ENSURE_SUCCESS(rv, rv);
*_retval = rows == selectedRows;
return rv;
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::IsRowSelected(PRInt32 aRow, PRBool *_retval)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
nsresult rv = NS_OK;
nsCOMPtr<nsITreeView> view;
rv = mTree->GetView(getter_AddRefs(view));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsITreeSelection> selection;
rv = view->GetSelection(getter_AddRefs(selection));
NS_ENSURE_SUCCESS(rv, rv);
return selection->IsSelected(aRow, _retval);
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::IsCellSelected(PRInt32 aRow, PRInt32 aColumn, PRBool *_retval)
{
return IsRowSelected(aRow, _retval);
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
PRInt32 rowIndex;
nsresult rv = GetRowAtIndex(aIndex, &rowIndex);
nsCOMPtr<nsITreeSelection> selection;
rv = mTreeView->GetSelection(getter_AddRefs(selection));
NS_ASSERTION(selection, "Can't get selection from mTreeView");
if (selection) {
selection->IsSelected(rowIndex, aSelState);
// XXX: Can move to nsXULTreeAccessible if this can be applied to cross-platform
if ((!(*aSelState) && eSelection_Add == aMethod)) {
nsresult rv = selection->Select(rowIndex);
mTree->EnsureRowIsVisible(aIndex);
return rv;
}
// XXX: Will eSelection_Remove happen for XULTree? Leave the original implementation here
if ((*aSelState) && eSelection_Remove == aMethod) {
return selection->ToggleSelect(rowIndex);
}
}
return NS_OK;
}
// --------------------------------------------------------
// nsXULTreeAccessibleWrap Accessible
// --------------------------------------------------------
NS_IMPL_ISUPPORTS_INHERITED1(nsXULTreeColumnsAccessibleWrap, nsXULTreeColumnsAccessible, nsIAccessibleTable)
nsXULTreeColumnsAccessibleWrap::nsXULTreeColumnsAccessibleWrap(nsIDOMNode *aDOMNode, nsIWeakReference *aShell):
nsXULTreeColumnsAccessible(aDOMNode, aShell)
{
mCaption = nsnull;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetCaption(nsIAccessible **aCaption)
{
*aCaption = mCaption;
NS_IF_ADDREF(*aCaption);
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::SetCaption(nsIAccessible *aCaption)
{
mCaption = aCaption;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetSummary(nsAString &aSummary)
{
aSummary = mSummary;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::SetSummary(const nsAString &aSummary)
{
mSummary = aSummary;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetColumns(PRInt32 *aColumns)
{
return GetChildCount(aColumns);
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetColumnHeader(nsIAccessibleTable * *aColumnHeader)
{
// Column header not supported.
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetRows(PRInt32 *aRows)
{
NS_ENSURE_ARG_POINTER(aRows);
*aRows = 1;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetRowHeader(nsIAccessibleTable * *aRowHeader)
{
// Row header not supported.
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetSelectedColumns(PRUint32 *columnsSize, PRInt32 **columns)
{
// Header can not be selected.
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetSelectedRows(PRUint32 *rowsSize, PRInt32 **rows)
{
// Header can not be selected.
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::CellRefAt(PRInt32 aRow, PRInt32 aColumn, nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> next, temp;
GetFirstChild(getter_AddRefs(next));
NS_ENSURE_TRUE(next, NS_ERROR_FAILURE);
for (PRInt32 col = 0; col < aColumn; col++) {
next->GetNextSibling(getter_AddRefs(temp));
NS_ENSURE_TRUE(temp, NS_ERROR_FAILURE);
next = temp;
}
*_retval = next;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetIndexAt(PRInt32 aRow, PRInt32 aColumn, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = aColumn;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetColumnAtIndex(PRInt32 aIndex, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = aIndex;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetRowAtIndex(PRInt32 aIndex, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = 0;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetColumnExtentAt(PRInt32 aRow, PRInt32 aColumn, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = 1;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetRowExtentAt(PRInt32 aRow, PRInt32 aColumn, PRInt32 *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = 1;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetColumnDescription(PRInt32 aColumn, nsAString & _retval)
{
nsCOMPtr<nsIAccessible> column;
nsresult rv = CellRefAt(0, aColumn, getter_AddRefs(column));
if (NS_SUCCEEDED(rv) && column) {
return column->GetName(_retval);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetRowDescription(PRInt32 aRow, nsAString & _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::IsColumnSelected(PRInt32 aColumn, PRBool *_retval)
{
// Header can not be selected.
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::IsRowSelected(PRInt32 aRow, PRBool *_retval)
{
// Header can not be selected.
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::IsCellSelected(PRInt32 aRow, PRInt32 aColumn, PRBool *_retval)
{
// Header can not be selected.
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -1,81 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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.org code.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Pete Zha (pete.zha@sun.com)
* Kyle Yuan (kyle.yuan@sun.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 __nsXULTreeAccessibleWrap_h__
#define __nsXULTreeAccessibleWrap_h__
#include "nsIAccessibleTable.h"
#include "nsXULTreeAccessible.h"
typedef class nsXULTreeitemAccessible nsXULTreeitemAccessibleWrap;
class nsXULTreeAccessibleWrap : public nsXULTreeAccessible,
public nsIAccessibleTable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLETABLE
nsXULTreeAccessibleWrap(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULTreeAccessibleWrap() {}
NS_IMETHOD GetChildCount(PRInt32 *_retval);
NS_IMETHOD ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState);
private:
nsCOMPtr<nsIAccessible> mCaption;
nsString mSummary;
};
class nsXULTreeColumnsAccessibleWrap : public nsXULTreeColumnsAccessible,
public nsIAccessibleTable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLETABLE
nsXULTreeColumnsAccessibleWrap(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULTreeColumnsAccessibleWrap() {}
private:
nsCOMPtr<nsIAccessible> mCaption;
nsString mSummary;
};
#endif

View File

@@ -0,0 +1 @@
accessible.properties

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