Compare commits

..

565 Commits

Author SHA1 Message Date
suresh%netscape.com
58e4b238e0 test test
git-svn-id: svn://10.0.0.236/branches/MAILIM_BRANCH@126269 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-03 03:21:54 +00:00
suresh%netscape.com
18615b9860 checkin
git-svn-id: svn://10.0.0.236/branches/MAILIM_BRANCH@126147 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-01 01:38:03 +00:00
naving%netscape.com
ef1bc30668 *** empty log message ***
git-svn-id: svn://10.0.0.236/branches/MAILIM_BRANCH@126142 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-01 01:00:44 +00:00
syd%netscape.com
f11be67030 Modified builds scripts so we can pull on this tag
git-svn-id: svn://10.0.0.236/branches/MAILIM_BRANCH@125970 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-28 05:26:45 +00:00
(no author)
7678ad1efa This commit was manufactured by cvs2svn to create branch 'MAILIM_BRANCH'.
git-svn-id: svn://10.0.0.236/branches/MAILIM_BRANCH@125957 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 22:59:45 +00:00
darin%netscape.com
f0cbbd351e fixes bug 94734 - crash on a bugzilla search
patch=ajschult@eos.ncsu.edu r/sr=darin,blizzard a=brendan


git-svn-id: svn://10.0.0.236/trunk@125956 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 22:59:44 +00:00
gerv%gerv.net
d6194bc5c2 Merging from 2.16 branch.
git-svn-id: svn://10.0.0.236/trunk@125949 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 22:03:53 +00:00
gerv%gerv.net
f88c3c8f3a Merging new docs from 2.16 branch.
git-svn-id: svn://10.0.0.236/trunk@125947 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 22:01:14 +00:00
jkeiser%netscape.com
ed6384eef4 Finish checkin of bug 141410 for blake.
git-svn-id: svn://10.0.0.236/trunk@125946 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 20:56:06 +00:00
gerv%gerv.net
04d49975ed Bug 159687 - attachment/*.tmpl should use <label>. Patch by burnus; r=gerv.
git-svn-id: svn://10.0.0.236/trunk@125945 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 19:10:18 +00:00
gerv%gerv.net
b0abe9c44a Bug 159644 - bug/create/create.html.tmpl should use <label>. Patch by burnus; r=gerv.
git-svn-id: svn://10.0.0.236/trunk@125943 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 19:02:23 +00:00
leaf%mozilla.org
4ca776d022 Automated update
git-svn-id: svn://10.0.0.236/trunk@125942 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 14:55:17 +00:00
seawood%netscape.com
2a2435aaa1 Backing out solaris mapfile changes from bug 149152
git-svn-id: svn://10.0.0.236/trunk@125941 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 14:40:23 +00:00
bryner%netscape.com
ca7e352068 correcting comment spelling so mcafee can test tinderbox updating.
git-svn-id: svn://10.0.0.236/trunk@125938 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 07:16:35 +00:00
mcafee%netscape.com
794ecf09ae Adding chimera module so tinderbox can track trunk:mozilla/chimera when it is being mixed with branch:SeaMonkeyAll.
git-svn-id: svn://10.0.0.236/trunk@125937 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 06:34:25 +00:00
leaf%mozilla.org
ec1faf1f0b Automated update
git-svn-id: svn://10.0.0.236/trunk@125936 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 06:10:15 +00:00
seawood%netscape.com
ae92950689 This should have been tested against a gcc build before it went it.
Fixing tinderbox bustage (bug 149152)


git-svn-id: svn://10.0.0.236/trunk@125935 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 06:05:52 +00:00
jkeiser%netscape.com
7fb12b3d6a Add documentation comments (bug 159065), r=sicking, sr=bz/jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125934 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 05:02:38 +00:00
leaf%mozilla.org
27d28eebe6 Automated update
git-svn-id: svn://10.0.0.236/trunk@125932 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:55:14 +00:00
joe.chou%sun.com
c93164dcdb Bug149152-Add mapfile to Solaris to improve browser performance. r=cls@seawood.org, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125930 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:45:51 +00:00
joe.chou%sun.com
3b6726e7b2 Bug 149152 - Add mapfile to solaris to improve browser performance. r=cls@seawood.org, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125929 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:43:27 +00:00
jkeiser%netscape.com
4f471ffd8f Add comments (bug 159065), r=sicking, sr=jst/bz, a=asa
git-svn-id: svn://10.0.0.236/trunk@125928 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:33:47 +00:00
jkeiser%netscape.com
2da66a0941 Comment nsIHTMLContent.h (bug 159605). r=sicking, sr=jst/bz, a=asa
git-svn-id: svn://10.0.0.236/trunk@125927 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 02:00:03 +00:00
blakeross%telocity.com
bd85f7210f Reverting some changes that were for a different bug.
git-svn-id: svn://10.0.0.236/trunk@125926 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:27:02 +00:00
sfraser%netscape.com
e8e1d41771 Fixing bug 156893: strip control characters out of strings which are to become bookmark titles, to avoid saving corrupt XML.
git-svn-id: svn://10.0.0.236/trunk@125925 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:24:42 +00:00
sfraser%netscape.com
23d8247539 Added NSString+Utils.mm/.h
git-svn-id: svn://10.0.0.236/trunk@125924 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:22:32 +00:00
sfraser%netscape.com
188ed0ac25 New files adding a category on NSString with some useful cleanup functions.
git-svn-id: svn://10.0.0.236/trunk@125923 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:21:59 +00:00
darin%netscape.com
32cf5a8655 fixes bug 146884 - Mozilla sometimes consumes 100% CPU when pipelining is enabled...
r=dougt sr=rpotts a=asa


git-svn-id: svn://10.0.0.236/trunk@125922 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:06:05 +00:00
sfraser%netscape.com
473553d46e Fix bug 158927 -- controls not drawing correctly in QuickTime plugin. The problem was that the thread scheduling Timer Task would call WakeUpProcess() every time when we are blocked and not servicing NSPR threads (for example when tracking plugin controls). A side effect of this is to prevent Mac OS X from flushing the window back buffers, hence the drawing issues. Fix is to only call WakeUpProcess() if we've been through the scheduler since the last time. r=sdaglye, wtc. a=asa.
git-svn-id: svn://10.0.0.236/trunk@125921 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 01:01:36 +00:00
blakeross%telocity.com
27d76b37fd 141410 - download manager doesn't highlight the active transfer by default. r=caillon sr=ben a=asa
git-svn-id: svn://10.0.0.236/trunk@125919 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 00:47:18 +00:00
darin%netscape.com
90e6d51bf6 fixes bug 159583 - simple string bundle optimization
r=yokoyama sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125918 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 00:46:21 +00:00
pete.zha%sun.com
9faa82fe3c Migrated UW IMAP UI: New Folder Dialog is not displaying completely for the FIRST time
bug=90734 r=naving sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125917 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-27 00:33:12 +00:00
sfraser%netscape.com
6232c32224 Cleanup some NSLogs and comments from last checkin.
git-svn-id: svn://10.0.0.236/trunk@125913 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:37:11 +00:00
sfraser%netscape.com
28f7c3b49e Fix bug 159461: make the progress window remember its position, and (bug 159460) have it appear in the Windows menu, with a useful name.
git-svn-id: svn://10.0.0.236/trunk@125912 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:37:10 +00:00
serge%netscape.com
16b06ae69f fix 152429, flash in an iframe crashes with Gdk-ERROR **: BadDrawable; r=bzbarsky, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125911 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:30:27 +00:00
sfraser%netscape.com
86c9fa6d83 Fix assumptions all over the code about the main window being a browser window; it can be a progress window, or the About window (and others in future). Ensure that the menu items that are enabled when a non-browser window is frontmost work as expected (e.g. Mange Bookmarks, opening a bookmark).
git-svn-id: svn://10.0.0.236/trunk@125910 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:29:49 +00:00
dprice%netscape.com
ccea66e526 157522 sr=dveditz a=asa
don't delete installed-chome.txt


git-svn-id: svn://10.0.0.236/trunk@125909 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:28:49 +00:00
sfraser%netscape.com
401d1f274c Minor tidyup of saveFrameUsingName/setFrameUsingName.
git-svn-id: svn://10.0.0.236/trunk@125908 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:26:30 +00:00
bzbarsky%mit.edu
28b1505b87 Fix bug 159268 (hiding and reshowing an iframe regression). r=sicking,
sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125907 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:11:19 +00:00
jst%netscape.com
c99a7fc274 Fixing regression bug 159468. Hold a strong reference to the script context in nsCxPusher to make sure it stays alive as long as we need it. r=jkeiser@netscape.com, sr=rpotts@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125906 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:10:36 +00:00
rginda%netscape.com
42f6f7246b bug 155328, r=bz, sr=jst
fix uninitialized return value in nsViewManager::Init


git-svn-id: svn://10.0.0.236/trunk@125905 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:09:06 +00:00
ssu%netscape.com
d29aa08df3 fixing bug 158199 - Mailnews Prefs dialogs are missing mnemonics. r=varada, sr=mscott a=drivers
git-svn-id: svn://10.0.0.236/trunk@125904 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 23:06:32 +00:00
pete.zha%sun.com
bcb3567454 Printing / Page settings reset themselves after print (no landscape printing)
bug=147605 r=petez sr=jst a=asa patch=Roland.Mainz@informatik.med.uni-giessen.de
Thanks Roland for this patch!


git-svn-id: svn://10.0.0.236/trunk@125903 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:58:24 +00:00
jkeiser%netscape.com
1675ed197f Add comments (bug 159065), r=sicking, sr=bz/jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125900 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:33:43 +00:00
gerv%gerv.net
4e1dced5ac Bug 159582 - search/knob.html.tmpl should use <label> for the radiobuttons. Patch by burnus; r=gerv.
git-svn-id: svn://10.0.0.236/trunk@125899 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:29:24 +00:00
gerv%gerv.net
90e7132a5c Bug 159629 - make users login to add quips. Patch by gerv; r=burnus.
git-svn-id: svn://10.0.0.236/trunk@125898 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:21:56 +00:00
yokoyama%netscape.com
cdebcf28d6 Bug 156979
XBL emulation of marquee
update the installed-chrome.txt for embedder
/r=adamlock, chak, /a=asa


git-svn-id: svn://10.0.0.236/trunk@125897 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:20:39 +00:00
cbiesinger%web.de
25cce6f6ab bug 155702 patch by sergei_d@fi.tartu.ee r=arougthopher@lizardland.net a=asa
nsWindowBeOS::QuitRequested always issues CLOSEWONDOW event


git-svn-id: svn://10.0.0.236/trunk@125895 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:09:54 +00:00
cbiesinger%web.de
4f69b52a8e bug 71343 patch by sergei_d@fi.tartu.ee r=arougthopher@lizardland.net a=asa
[BEOS] Windows are not brought to front when requested


git-svn-id: svn://10.0.0.236/trunk@125894 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 22:05:04 +00:00
ashishbhatt%netscape.com
e3b14c3f05 Updated to show profiles dialog at startup
git-svn-id: svn://10.0.0.236/trunk@125893 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 21:34:44 +00:00
jkeiser%netscape.com
325bff7164 Change ns(I)GfxTextControlFrame(2) -> ns(I)TextControlFrame (bug 129909), r=rods
@netscape.com, sr=bzbarsky@mit.edu, a=asa


git-svn-id: svn://10.0.0.236/trunk@125891 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:57:24 +00:00
gerv%gerv.net
f20e59a0fe Bug 158658 - relogin.cgi should use a template. This also adds the ability to localise messages. Patch by gerv; r=burnus.
git-svn-id: svn://10.0.0.236/trunk@125888 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:49:04 +00:00
gerv%gerv.net
11e488111d Bug 150776 - Remembered query options need regrouping. Patch by gerv; r=jouni, burnus.
git-svn-id: svn://10.0.0.236/trunk@125887 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:44:46 +00:00
jkeiser%netscape.com
b23089d0ce Move nsIHTMLContent.h into content/html/content/public (bug 77069), r=heikki, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125886 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:44:02 +00:00
gerv%gerv.net
53af493081 Bug 106640 - allow translation of system messages. Patch by gerv; r=burnus.
git-svn-id: svn://10.0.0.236/trunk@125883 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:39:17 +00:00
gerv%gerv.net
55840407d6 Bug 158497 - Templatise colchange.cgi. Patch by gerv; r=burnus.
git-svn-id: svn://10.0.0.236/trunk@125882 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:37:06 +00:00
pinkerton%netscape.com
88412f5cca Separating the personal toolbar from the sidebar selection. Bookmarks info
controller is now a singleton that lives forever. Personal toolbar context
menus do the right thing. (bug 148932).


git-svn-id: svn://10.0.0.236/trunk@125881 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 20:28:45 +00:00
leaf%mozilla.org
a305d85996 fix for bug 156577, r=chak. simple change to check for directory existence
before mkdir commands.


git-svn-id: svn://10.0.0.236/trunk@125879 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 19:31:06 +00:00
naving%netscape.com
781e9c65e2 42090 most of the work for this patch done by joshua.xia@sun.com r=naving sr=bienvenu a=asa Make cancel in
filterListDialog not remember changes.


git-svn-id: svn://10.0.0.236/trunk@125877 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 19:27:30 +00:00
mcafee%netscape.com
2169fd9093 fixing logic in pageload test for 2nd attempt case.
git-svn-id: svn://10.0.0.236/trunk@125875 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 19:10:58 +00:00
pinkerton%netscape.com
924efd456d Fixes crash when selecting text during URL load, adds undo/redo to url bar,
reduces the number of times we load about:blank to 1 per window, fixes
unicode characters in bookmarks. (bug 149198, 153263, 155710)


git-svn-id: svn://10.0.0.236/trunk@125873 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:50:01 +00:00
gerv%gerv.net
e18ec1cbb7 Bug 159565 - fix hash initialisation error caused by my duff patch for accesskeys. Patch by burnus; 2xr=gerv.
git-svn-id: svn://10.0.0.236/trunk@125870 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:22:18 +00:00
wtc%netscape.com
43d17bd1d6 Fixed the comment. The length of the secret may be larger than 64 bytes.
git-svn-id: svn://10.0.0.236/trunk@125869 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:20:59 +00:00
gerv%gerv.net
c2a07f8ca4 ... and = instead of =>.
git-svn-id: svn://10.0.0.236/trunk@125868 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:20:58 +00:00
gerv%gerv.net
1b57318c55 Fixing bustage caused by ; instead of , in burnus' patch.
git-svn-id: svn://10.0.0.236/trunk@125867 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:20:13 +00:00
gerv%gerv.net
e5f79c89d2 Bug 158651 - currenttime should use time2str. Patch by burnus@gmx.de; 2xr=gerv.
git-svn-id: svn://10.0.0.236/trunk@125865 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:16:39 +00:00
gerv%gerv.net
a8ca30121c Bug 123740 - Add <label> to email prefs. Patch by burnus@gmx.de; 2xr=gerv.
git-svn-id: svn://10.0.0.236/trunk@125864 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 18:11:45 +00:00
yokoyama%netscape.com
ff9f774c5b Bug 156979
XBL emulation of marquee.
/r=nhotta, timeless, /sr=jst, /a=asa


git-svn-id: svn://10.0.0.236/trunk@125863 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 17:47:16 +00:00
leaf%mozilla.org
f068dae85c adding new files from nsGfxTextControlFrame2.*; part of renaming in bug 129909
git-svn-id: svn://10.0.0.236/trunk@125861 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 17:17:00 +00:00
timeless%mac.com
03b6db2975 Bug 158790 - debug has printing prefs in a rendering group
patch by spiffonator@netscape.net r=timeless sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125860 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 16:55:45 +00:00
nhotta%netscape.com
c49fae7638 Adding null check for mDocument before getting a document charset,
bug 159434, r=caillon, sr=jst, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125859 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 16:45:45 +00:00
mikep%oeone.com
1456ece7b6 Fixes from OEoen calendar, removing duplicate and unused css attributes.
git-svn-id: svn://10.0.0.236/trunk@125858 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 15:19:22 +00:00
mikep%oeone.com
2651f6ccd4 Fixing so that outlook can import events mailed to other people.
Bug 159549.


git-svn-id: svn://10.0.0.236/trunk@125857 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 15:15:14 +00:00
ccarlen%netscape.com
a83072dd92 Bug 158126 - PPEmbed does not send activate events to Gecko. r=pink/sr=sfraser/a=asa.
git-svn-id: svn://10.0.0.236/trunk@125856 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 14:36:22 +00:00
mikep%oeone.com
fc977eaceb Fixing bug 159541.
git-svn-id: svn://10.0.0.236/trunk@125855 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 14:01:10 +00:00
mostafah%oeone.com
861d6bb2cb Checked in patch for bug 159458: [RFE] option to not save the Mozilla custom X- properties
git-svn-id: svn://10.0.0.236/trunk@125854 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 13:37:59 +00:00
cbiesinger%web.de
672499b3ae bug 155655 r=timeless sr=blake a=asa
Navigator preferences leave blank space where "make default browser" would be


git-svn-id: svn://10.0.0.236/trunk@125851 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 08:34:53 +00:00
peterlubczynski%netscape.com
725cbaf73e Fixing bug 152927: can't script any plugin in nested EMBED tag inside an OBJECT tag from onLoad handler -- CNET radio does not play with Real because SetSource is called from onLoad r=kmcclusk sr=dveditz a=asa
git-svn-id: svn://10.0.0.236/trunk@125845 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 03:48:24 +00:00
rginda%netscape.com
133a2f6ef8 bug 155328, "nsViewManager and nsPresShell are unaware of stacked event queues"
sr=jst, r=roc+mozilla@cs.cmu.edu, a=asa

make sure we always post new invalidate events to the topmost queue, and don't skip creating new reflow events just because we happen to have one an elder queue.


git-svn-id: svn://10.0.0.236/trunk@125843 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 03:31:56 +00:00
rginda%netscape.com
cd7bad237a bug 155328, "nsViewManager and nsPresShell are unaware of stacked event queues"
sr=rpotts, r=jst, a=asa

make sure we always post new reflow events to the topmost queue, and don't skip creating new reflow events just because we happen to have one an elder queue.


git-svn-id: svn://10.0.0.236/trunk@125842 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 03:29:07 +00:00
bzbarsky%mit.edu
59edb917bd Fix up the build stuff in there too. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@125839 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 01:35:34 +00:00
bzbarsky%mit.edu
39acdb7a27 Updating interfaces to reflect new edition of the spec. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@125838 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 01:30:33 +00:00
timeless%mac.com
518a0fb1b9 bug 157572 by alecf ports (os/2, xlib) bustage
git-svn-id: svn://10.0.0.236/trunk@125836 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 01:01:37 +00:00
bzbarsky%mit.edu
1ed31e83a7 Fix some build warnings. Bug 157378, patch by
Roland.Mainz@informatik.med.uni-giessen.de (Roland Mainz), r=bbaetz,
biesi, sr=bzbarsky, a=asa


git-svn-id: svn://10.0.0.236/trunk@125834 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 00:40:05 +00:00
bzbarsky%mit.edu
56707d69cd Backing out fix for bug 156072 due to regression bug 158792. r=caillon/sr=jst/a=asa
git-svn-id: svn://10.0.0.236/trunk@125833 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 00:35:15 +00:00
timeless%mac.com
cda8c2f36a bug 157572 by alecf busted bezilla
a=#bezilla,leaf for tinderbustage


git-svn-id: svn://10.0.0.236/trunk@125831 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-26 00:14:39 +00:00
cbiesinger%web.de
99426a9b40 bug 158789 patch by spiffonator@netscape.net r=blake sr=alecf a=asa
advanced has incomprehensible pref text


git-svn-id: svn://10.0.0.236/trunk@125822 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 22:03:13 +00:00
pinkerton%netscape.com
2a0f1b0336 Removing file, changed to .mm
git-svn-id: svn://10.0.0.236/trunk@125821 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:58:32 +00:00
pinkerton%netscape.com
910a803cc8 Move the pref controller to be a .mm file
git-svn-id: svn://10.0.0.236/trunk@125820 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:57:53 +00:00
pinkerton%netscape.com
8677e94998 Changing to be a .mm file so we can use c++ for writing out prefs
git-svn-id: svn://10.0.0.236/trunk@125819 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:56:33 +00:00
akkana%netscape.com
6a0a8efa86 142826: move to beginning of found pattern after a reverse find. Fix is from harry.lu@sun.com, r=me, sr=sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@125818 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:49:42 +00:00
shrutiv%netscape.com
a1f6af4667 updating show example images
git-svn-id: svn://10.0.0.236/trunk@125817 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:48:14 +00:00
bryner%netscape.com
0c0cf9ecf3 Fix focus crasher resulting from the window's firstResponder pointing to a deleted NSView. Bug 159291, r/sr=hyatt. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@125815 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:31:51 +00:00
bryner%netscape.com
71e5a0d9ce Factor the nsIPromptService implementation out of CocoaBrowserService, and move it to using a generic factory. Clean up some #includes. Change AppComponents.cpp to a .mm file since it needs to include some cocoa headers. r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@125813 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:28:23 +00:00
shrutiv%netscape.com
56e1a45320 updating show example images
git-svn-id: svn://10.0.0.236/trunk@125811 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:10:39 +00:00
mostafah%oeone.com
b4d992cb02 Fixed bug 158957: DTSTAMP must use UTC time
and a bunch of indenting


git-svn-id: svn://10.0.0.236/trunk@125808 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 21:08:02 +00:00
smontagu%netscape.com
f0c487bee0 Fix crasher bug 158796, r=jkeiser, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125804 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:40:51 +00:00
timeless%mac.com
02bd51dca0 Bug 159070 installer claimed my everything install did not include PSM
r=ssu sr=dveditz a=asa


git-svn-id: svn://10.0.0.236/trunk@125803 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:40:32 +00:00
cbiesinger%web.de
a118c8a10f bug 158922 patch by spiffonator@netscape.net r=biesi sr=alecf a=asa
remove unused strings


git-svn-id: svn://10.0.0.236/trunk@125802 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:36:09 +00:00
timeless%mac.com
eb760368df Bug 158606 crash with -moz-opacity
patch by sergei_d@fi.tartu.ee r=timeless sr=blizzard (ports code) a=asa


git-svn-id: svn://10.0.0.236/trunk@125801 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:26:33 +00:00
dougt%netscape.com
93a121bec1 ProxyObjectCallInfo class is exported by many dso. r=darin, sr=alec, a=asa, b=158932
git-svn-id: svn://10.0.0.236/trunk@125800 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:13:06 +00:00
dougt%netscape.com
7383c167c4 nsICollection's nsQueryElementAt class is exported. r=darin, sr=alec, a=asa, b=158931
git-svn-id: svn://10.0.0.236/trunk@125798 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:12:18 +00:00
alecf%netscape.com
3c86efbaa2 fix for bug 159220 - make nsWindowDataSource be 64-bit friendly so we don't crash on Tru64
r=timeless, sr=brendan, a=asa


git-svn-id: svn://10.0.0.236/trunk@125797 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 20:02:33 +00:00
timeless%mac.com
9ba7855de7 Bug 157348 no AltGr recognised
patch by sergei_d@fi.tartu.ee r=timeless sr=blizzard (ports code) a=asa


git-svn-id: svn://10.0.0.236/trunk@125796 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 19:59:54 +00:00
alecf%netscape.com
6d5d0fa10e fix bustage by #including nsCOMPtr.h
git-svn-id: svn://10.0.0.236/trunk@125795 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 19:44:15 +00:00
bryner%netscape.com
7bc238d7a1 Change ShortVersion to be just the version number, not including the product name.
git-svn-id: svn://10.0.0.236/trunk@125794 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 19:05:56 +00:00
leaf%mozilla.org
94a5d7de0c Automated update
git-svn-id: svn://10.0.0.236/trunk@125793 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 18:40:14 +00:00
margaret.chan%sun.com
8cd5650005 Bug 149151 - Use -lazyload to distribute cost of loading objects throughout their life cycle. This checkin also includes another linker option -zcombreloc which will combine relocatable objects in one section. Both options are added for performance reason, and they are only for Solaris. r=cls, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125792 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 18:37:34 +00:00
alecf%netscape.com
7e8aa74093 fix for bug 157572 - remove nsIAtom references from strings, and thus expicitly #include nsIAtom.h for consumers who are expecting it.
r=dmose, sr=jag, a=asa


git-svn-id: svn://10.0.0.236/trunk@125791 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 18:31:10 +00:00
tao%netscape.com
8f333523c8 Update instructions in README and provide link to a new file,
leve-xlation.html which has more explanation.


git-svn-id: svn://10.0.0.236/trunk@125790 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 17:38:28 +00:00
cmanske%netscape.com
dd2de77d93 Fixed Tab code in Composer dialogs, b=157778, r=neil@parkwaycc.co.uk, sr=alecf, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125789 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 17:32:12 +00:00
mikep%oeone.com
af4bc6cf21 Integrating license changes and other changes from OEone.
git-svn-id: svn://10.0.0.236/trunk@125787 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 17:05:46 +00:00
mikep%oeone.com
a728ae346c Patch 92744 from bug 156687.
git-svn-id: svn://10.0.0.236/trunk@125785 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 16:43:25 +00:00
mikep%oeone.com
369e8229d0 Fixing problem with long titles not wrapping in day view.
git-svn-id: svn://10.0.0.236/trunk@125784 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:28:21 +00:00
mikep%oeone.com
3692434a8e Fix from integrating changes for to items, bug 156687.
git-svn-id: svn://10.0.0.236/trunk@125783 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:26:22 +00:00
jdunn%netscape.com
28c54c8a52 moving extern statement out of function scope to fix bustage
r=dougt@netscape.com
sr=rpotts@netscape.com
a=asa@mozilla.org
# 141359


git-svn-id: svn://10.0.0.236/trunk@125782 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:21:00 +00:00
mikep%oeone.com
5a3999941d Adding in patch from bug 156687 from AJB.
git-svn-id: svn://10.0.0.236/trunk@125781 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:12:52 +00:00
mikep%oeone.com
cf8b475ee8 Adding tasks to button.
git-svn-id: svn://10.0.0.236/trunk@125780 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 14:11:33 +00:00
caillon%returnzero.com
97e3cd10d2 Bug 155752 - Use the XML parser for XHTML about: services
Patch contributed by Alexey Chernyak <alexey@ihug.com.au>
r=timeless, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125778 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 13:36:37 +00:00
caillon%returnzero.com
4767339f6c Bug 155752 - Use the XML parser for XHTML about: services
Patch contributed by Alexey Chernyak <alexey@ihug.com.au>
r=timeless, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125777 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 13:27:16 +00:00
mikep%oeone.com
dd6dc2263c Small fix for cutting events, bug 158604.
git-svn-id: svn://10.0.0.236/trunk@125776 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 12:32:36 +00:00
depstein%netscape.com
0d552e997c changed url
git-svn-id: svn://10.0.0.236/trunk@125775 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 08:19:35 +00:00
bzbarsky%mit.edu
e6f206c6ce Adding idl files needed for DOM3 Load/Save. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@125774 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 06:38:57 +00:00
sfraser%netscape.com
d4abf23b1b Changing the 'Wrap' checkbox keyboard shortcut from Command-W to Command-R, to avoid conflict with Command-W closing the window.
git-svn-id: svn://10.0.0.236/trunk@125773 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 05:59:33 +00:00
sfraser%netscape.com
e5a16281a8 Fix for bug 159296 -- put the build ID in the about window. Also tweaked the scrolling text timer to fire much less fequently (and scroll more each time, but still remain smooth). Added dist/include to the include paths in the project (for nsBuildID.h), and fixed some file access paths to stuff in widget/src/cocoa.
git-svn-id: svn://10.0.0.236/trunk@125771 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 05:47:16 +00:00
pete.zha%sun.com
23127b1a98 Fix the foolish comments in previou check in.
Change "we are them" to "we enable them"
Will not effect the build


git-svn-id: svn://10.0.0.236/trunk@125769 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 05:20:14 +00:00
pete.zha%sun.com
2a3bf650f0 unix: should remove the Reveal Location & Launch File buttons from download progress dialog
bug=90008 r=jkeiser sr=bzbarsky a=asa


git-svn-id: svn://10.0.0.236/trunk@125768 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 05:10:46 +00:00
wtc%netscape.com
22622bc346 Removed unused ASN.1 templates and unnecessary declarations.
Modified Files: lowcert.c pcertt.h


git-svn-id: svn://10.0.0.236/trunk@125767 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 03:59:38 +00:00
henry.jia%sun.com
b3bfda0fb7 Fix for bug 138191
Description: Changing field focus with javascript and backspacing breaks tabbing
patch by Gilbert.Fang@sun.com
r=jkeiser, sr=bryner, a=asa


git-svn-id: svn://10.0.0.236/trunk@125766 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 03:14:29 +00:00
kaie%netscape.com
9132da9e54 b=141268 OCSP error messages should say OCSP, not OSCP (typo)
r=hixie sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125764 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:48:33 +00:00
kaie%netscape.com
a9eeb6b688 b=145698 javascript strict warnings in msgCompSecurityInfo.js
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125763 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:45:51 +00:00
kaie%netscape.com
69975a03b0 b=156748 Incorrect stylesheet rule in message compose S/Mime overlay
r=dbaron sr=mscott a=asa


git-svn-id: svn://10.0.0.236/trunk@125762 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:38:06 +00:00
kaie%netscape.com
3232c2fc50 b=113844 "Load PKCS#11 Device" dialog sized incorrectly
r=kaie/javi  sr=alecf  a=asa


git-svn-id: svn://10.0.0.236/trunk@125761 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:26:52 +00:00
sfraser%netscape.com
c3e845b32f Fix for bug 158378: fix the bookmark info panel to behave correctly, support Undo, and not crash. Patch from David Hass, hacked on by me.
git-svn-id: svn://10.0.0.236/trunk@125760 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 02:07:43 +00:00
rods%netscape.com
717b70cb65 Hide the Page Setup btn on Linux until Bug 119491 is fixed
Bug 158282 r=sgehani sr=bryner a=asa


git-svn-id: svn://10.0.0.236/trunk@125759 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 01:48:42 +00:00
justdave%syndicomm.com
74ea63b790 Fix for bug 154008: some basic (but incomplete) maintenance on bug_email.pl, also fixes a possible security hole with a misuse
of a system() call.
Patches by Erik Anderson <erikba@teamworkgroup.com> and Brad Baetz <bbaetz@student.usyd.edu.au>
r= myk, justdave


git-svn-id: svn://10.0.0.236/trunk@125758 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 01:47:50 +00:00
sfraser%netscape.com
2e65f57aea Fix for bug 154895: fix Next/Previous tab to just cycle round through all tabs if you hit the start or end. That way, they are always enabled (when tabs are visible).
git-svn-id: svn://10.0.0.236/trunk@125756 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 01:16:36 +00:00
bryner%netscape.com
410ad0fd16 Factor out security dialogs from CocoaBrowserService, and provide a mechanism for using generic factories for application-provided XPCOM components (bug 158801). r=pinkerton, sfraser.
git-svn-id: svn://10.0.0.236/trunk@125755 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:57:27 +00:00
sfraser%netscape.com
60422765b0 Fix bug 157950: make sure that Find Again is disabled if there is no search string stored. Also changed the Find dialog behaviour to stay up when you hit Find (as it should, since it's a panel), to default to 'wrap' and 'ignore case' being on, and added key shortcuts for the checkboxes.
git-svn-id: svn://10.0.0.236/trunk@125753 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:42:53 +00:00
jrgm%netscape.com
30e5e68735 bug 158072: 'remove dead function selectLocale from strres.js', r=timeless, sr=jag, a=asa
git-svn-id: svn://10.0.0.236/trunk@125752 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:38:23 +00:00
bryner%netscape.com
2b1e437151 Make MachO mac build use Mac locale code (bug 158266). r=pinkerton, sr=sfraser, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125750 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:28:29 +00:00
bryner%netscape.com
db891f00b1 fixing css syntax error (bug 158981). r=jkeiser, sr=bzbarsky, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125749 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:12:04 +00:00
shrutiv%netscape.com
133bfab0b1 Including banner bmp for bookmarkscreen
git-svn-id: svn://10.0.0.236/trunk@125748 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:11:36 +00:00
sfraser%netscape.com
f83158bd8f Fix for bug 159170; when doing a Save, don't show the 'Leave open' button in the download progress window, and make sure that the window always closes at the end of the saving. r=pinkeron
Also fixed a refounting boo-boo with the downloader factor.


git-svn-id: svn://10.0.0.236/trunk@125747 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-25 00:00:51 +00:00
gerv%gerv.net
b25db35652 Bug 67950c - make quips.cgi compile without warnings, by use vars-ing $userid. Patch by gerv.
git-svn-id: svn://10.0.0.236/trunk@125745 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:38:50 +00:00
gerv%gerv.net
f0187522d7 Bug 67950b - quick fixes. Patch by gerv.
git-svn-id: svn://10.0.0.236/trunk@125744 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:32:41 +00:00
gerv%gerv.net
7998b638b7 Bug 67950 - Move the quip list into the database. Patch by davef@tetsubo.com; r=gerv, preed.
git-svn-id: svn://10.0.0.236/trunk@125742 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:23:00 +00:00
shrutiv%netscape.com
5089477442 Fix for bugscape bug 17314: remove bookmarks and sidebar from "Before
You Begin" (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@125741 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:21:40 +00:00
gerv%gerv.net
4d65990457 Bug 158660 - confirm_login in CGI.pl should use a template for the login dialog. Patch by gerv; 2xr=jouni.
git-svn-id: svn://10.0.0.236/trunk@125740 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 23:13:35 +00:00
pinkerton%netscape.com
fdea88a4db Changed "Save Link As..." in context menus to "Download Link Target..." (bug 159201)
git-svn-id: svn://10.0.0.236/trunk@125737 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 22:00:11 +00:00
pinkerton%netscape.com
6a614634bf localize d/l progress dialog and put strings in localizable.strings (bug 143093)
git-svn-id: svn://10.0.0.236/trunk@125736 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 21:48:08 +00:00
cltbld%netscape.com
1839a35cc1 Switching to pageload_server instead of hard-coded url for pageload test. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125735 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 21:32:49 +00:00
alecf%netscape.com
31d3d623b4 lay some groundwork for bug 158003 - make some static constructors for the base classes that all the encoders/decoders can share
not part of build


git-svn-id: svn://10.0.0.236/trunk@125734 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 21:27:57 +00:00
alecf%netscape.com
ed041269b4 work for bug 158003 and bug 157993 - tweak base support classes with a fake inner interface in debug builds, so we can use QI to determine if the class is based off any of these support classes.
no reviewer, not part of build


git-svn-id: svn://10.0.0.236/trunk@125733 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 21:20:18 +00:00
cbiesinger%web.de
98a1043bbe bug 158937 r=timeless sr=bz a=asa
comment wrong


git-svn-id: svn://10.0.0.236/trunk@125732 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:53:50 +00:00
bzbarsky%mit.edu
4200beed9b Fix silly logic error in lazy lists. Bug 158948, r=jkeiser, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@125731 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:43:48 +00:00
dprice%netscape.com
f25e227f7b 141056 r=hawara sr=dveditz a=asa
add error checking to fix top crasher


git-svn-id: svn://10.0.0.236/trunk@125730 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:42:22 +00:00
pinkerton%netscape.com
cdeb82a090 fix phantom checkbox and password field in prompt dialog (bug 156561)
git-svn-id: svn://10.0.0.236/trunk@125729 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:41:30 +00:00
ssu%netscape.com
a8c53c87f7 checking in patch for neil@parkwaycc.co.uk. fixes bug 158028 - The Mail Start Page does not load. r=ssu sr=sspitzer a=asa
git-svn-id: svn://10.0.0.236/trunk@125728 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:39:00 +00:00
gerv%gerv.net
b858190117 bug 159200 - support accesskey in search page. Patch by gerv; 2xr=timeless.
git-svn-id: svn://10.0.0.236/trunk@125727 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:25:08 +00:00
despotdaemon%netscape.com
c86bb44258 Pseudo-automatic update of changes made by curt@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@125726 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 20:13:49 +00:00
locka%iol.ie
c35ec937f6 Fixup link tags as stylesheets or anchors according to the value in their "rel" attribute. b=148797 r=brade@netscape.com sr=kin@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125725 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 19:59:17 +00:00
gerv%gerv.net
54edcc88f8 Bug 102648 - a little more thought. We are changing Platform to Hardware (see the search page) for usability; if we do that, Product can be P and Hardware can be H. 2xr=timeless.
git-svn-id: svn://10.0.0.236/trunk@125724 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 19:53:00 +00:00
jkeiser%netscape.com
b6ca8fa2ed Add API Documentation comments (bug 159065), r=sicking, sr=jst/bzbarsky, a=asa
git-svn-id: svn://10.0.0.236/trunk@125722 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 19:40:03 +00:00
gerv%gerv.net
4626ac5418 Bug 102648 - Bugzilla should support accesskey. Patch by gerv; 2xr=timeless.
git-svn-id: svn://10.0.0.236/trunk@125721 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 19:14:07 +00:00
shrutiv%netscape.com
f9416d1e3b Fix for bug 158373: [REG] AOD is showing up on the end user's component
list (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@125720 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 18:31:38 +00:00
despotdaemon%netscape.com
a3c7a039f9 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125719 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 18:28:07 +00:00
cltbld%netscape.com
cbac512367 Setting pageload_server to more-appropriate default, spider. External people, please ask mcafee or jrgm for external ip. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125718 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 18:08:15 +00:00
shrutiv%netscape.com
20283028ef Removing fix for bugscape bug 18020
git-svn-id: svn://10.0.0.236/trunk@125716 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 17:59:31 +00:00
pinkerton%netscape.com
5444122c25 Add aqua-like broken image icon
git-svn-id: svn://10.0.0.236/trunk@125715 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 17:48:48 +00:00
pinkerton%netscape.com
369b525690 aqua-looking broken image icon
git-svn-id: svn://10.0.0.236/trunk@125714 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 17:47:34 +00:00
shrutiv%netscape.com
ffb4b008bc Fix for bugscape bug 18020: Remove the CCKDocs folder from the installed
product (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@125713 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 17:41:29 +00:00
mcafee%netscape.com
ef253c4434 fixed slash problem
git-svn-id: svn://10.0.0.236/trunk@125711 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 16:04:03 +00:00
mikep%oeone.com
f44ecc8fb8 Fixing file type error.
git-svn-id: svn://10.0.0.236/trunk@125707 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 14:01:11 +00:00
mikep%oeone.com
c05391a935 Importing changes from OEone calendar, adding in UI for adding contacts to events.
git-svn-id: svn://10.0.0.236/trunk@125705 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 13:19:34 +00:00
mikep%oeone.com
6f5a20fe9d Start of adding in ability to link addresses to events.
git-svn-id: svn://10.0.0.236/trunk@125703 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 13:16:29 +00:00
mikep%oeone.com
e5c4c53135 Patch from ajbu@planet.nl for bug 159029.
git-svn-id: svn://10.0.0.236/trunk@125702 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 13:07:19 +00:00
bryner%netscape.com
9129fe1a67 Fixing static build bustage from sfraser's checkin for bug 145800:
- add all new source files to static build target
 - rename nsDownloader to CHDownloader to avoid symbol name conflicts with necko.


git-svn-id: svn://10.0.0.236/trunk@125690 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 08:23:52 +00:00
ssu%netscape.com
01886d9c66 fixing redness under Win32
git-svn-id: svn://10.0.0.236/trunk@125689 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 08:22:15 +00:00
gerv%gerv.net
2b84451550 bug 158498 - defparams.pl prints an error message in a check function instead of returning it. Patch by gerv; 2xr=zeroj.
git-svn-id: svn://10.0.0.236/trunk@125688 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:56:11 +00:00
ssu%netscape.com
6f65ef4a94 fixing bug 158187 - Support for Windows XP SP1 Integration (TRUNK merge). r=ssu,dprice,curt,law sr=jag,dveditz a=drivers
git-svn-id: svn://10.0.0.236/trunk@125687 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:43:19 +00:00
pete.zha%sun.com
c1bd7ab216 Translate nsIAccessible roles to ATK roles
bug=153816 r=aaronl sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125685 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:33:39 +00:00
jst%netscape.com
37e6116529 Fixing regression caused by bug 156452. Make sure the correct JS context is pushed onto the JS context stack before handling focus and blur code internally. This is needed since lots of focus and blur code rely on DOM range code that now does security checking when called to prevent from unauthorized use of a DOM range object. r=sicking@bigfoot.com, sr=bzbarsky@mit.edu, a=chofmann@netscape.com
git-svn-id: svn://10.0.0.236/trunk@125684 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:13:18 +00:00
jst%netscape.com
7da03ea51c Landing branch fix for bug 90757 on he trunk. There's a better fix for this, but we want to bake this on the trunk for a while before we possibly take this on the branch, once it's baked on the trunk we can land the real fix on the trunk... r=mstoltz@netscape.com, sr=rpotts@netscape.com, a=chofmann@netscape.com
git-svn-id: svn://10.0.0.236/trunk@125683 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 06:02:05 +00:00
leaf%mozilla.org
2f1683a246 Automated update
git-svn-id: svn://10.0.0.236/trunk@125681 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 05:55:40 +00:00
sfraser%netscape.com
0e88d0860a Fix bug 145800 -- implement downlod progress UI in chimera. These changes allow us to reuse the nsDownloadListener and progress dialog for both Saving (with an nsIWebBrowserPersist) and downloading (where necko creates an nsIDownload, which we implement). They are also factored so that other cocoa apps could reuse the downloading backend with their own progress dialog. r=pinkerton/bryner/ccarlen.
git-svn-id: svn://10.0.0.236/trunk@125680 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 05:53:14 +00:00
bryner%netscape.com
ae3ab7d37a Changes to allow Mozilla to build with new gcc3 developer tools on OS X (bug 153525). Patch by dbaron, r=cls, sr=bryner, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125679 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 05:43:53 +00:00
sfraser%netscape.com
a962c21d41 Fixing the MachO (DARWIN) build, which broke when wtc checked in a patch in bug 153525. r=bryner.
git-svn-id: svn://10.0.0.236/trunk@125673 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 04:06:07 +00:00
cmanske%netscape.com
6a52761ff9 Disable 'Creat Link' when context menu launched on existing link, b=99541, r=brade, sr=kin, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125672 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:58:41 +00:00
cmanske%netscape.com
7771c9d127 Superscript and Subscript text styles should be mutually exclusive, b=100825, r=jfrancis, sr=kin, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125671 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:53:14 +00:00
cmanske%netscape.com
b1357f8a31 Part of fix to 'Fix right-click to edit link on an image', b=142042, r=neil@parkwaycc.co.uk, sr=alecf, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125669 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:47:01 +00:00
cmanske%netscape.com
5282cedd05 Reduce memory cost of using HTML Source multiple times by reducing undo buffer usage. b=158860, r=brade, sr=kin, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@125667 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:35:40 +00:00
smeredith%netscape.com
02cadbb205 Fix for 18126 and 16956.
git-svn-id: svn://10.0.0.236/trunk@125666 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 03:04:12 +00:00
loadrunner%betak.net
0cec7b7c5a DNS: lookup regression, r=adamlock, sr=darin, a=asa, local fix for autodial by smeredith@netscape.com all credits to him
git-svn-id: svn://10.0.0.236/trunk@125665 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 02:43:22 +00:00
brendan%mozilla.org
3950b292ff Finally fix 137000, which requires working around an MSVC ISO-C violation ('identical COMDAT folding', 151066, r=brendan/jrgm, sr=bryner/shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@125664 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 01:53:07 +00:00
naving%netscape.com
a8e7151bf4 158776 r=cavin sr=bienvenu a=asa fixing nsCRT::strtok uses in pop3 protocol code.
git-svn-id: svn://10.0.0.236/trunk@125663 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 01:50:57 +00:00
darin%netscape.com
bebde11822 fixes bug 157861 - have to hit Back twice to return to '300: multiple choices'
r=dougt sr=rpotts a=asa


git-svn-id: svn://10.0.0.236/trunk@125662 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 01:32:07 +00:00
bzbarsky%mit.edu
e62936a18e wallpaper for a bit of bug 120327; this should keep us from appending
".exe" all the time to things on Windows.  patch by me and
jruderman@hmc.edu, r=law, sr=jag, a=asa


git-svn-id: svn://10.0.0.236/trunk@125660 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 00:42:12 +00:00
nhotta%netscape.com
d12a957e19 Adding uconv to REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@125659 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 00:34:14 +00:00
timeless%mac.com
2b4bbf7237 Bug 158092 Mozilla for BeOS is unable to show in browser proper international file/folder names.
patch by sergei_d@fi.tartu.ee r=timeless sr=darin a=asa


git-svn-id: svn://10.0.0.236/trunk@125655 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-24 00:01:31 +00:00
wtc%netscape.com
b01502356c Bug 153525: fixed build problems under gcc3 on Mac OS X. r=bryner.
Modified Files: _pth.h darwin.c


git-svn-id: svn://10.0.0.236/trunk@125653 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:54:12 +00:00
alecf%netscape.com
c3866b3a50 fix nhotta's bustage by adding "uconv" to the REQUIRES list
git-svn-id: svn://10.0.0.236/trunk@125652 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:47:30 +00:00
alecf%netscape.com
7ce57677ba more prep for bug 119923 - use chrome registry ContractID rather than CID, so that we can drop in a new embedding-only chrome registry
r=bnesse, sr=dveditz, a=asa


git-svn-id: svn://10.0.0.236/trunk@125651 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:30:04 +00:00
nhotta%netscape.com
7da2a94cbd Change nsJSProtocolHandler to listen to originCharset to apply conversion if necessary,
also changed the callers to set originCharset,
bug 137182, r=caillon, sr=jst, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125650 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:28:28 +00:00
caillon%returnzero.com
eaa75bb394 Bug 104470 - Popup blocking breaks window.open()s which are targetted to frames or existing named windows
r=sicking sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125649 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:22:20 +00:00
bzbarsky%mit.edu
ff3b5f1bd2 Bug 158230. Clear out all the relevant style data when inline style
causes reframes.  r=dbaron, sr=hyatt, a=asa


git-svn-id: svn://10.0.0.236/trunk@125648 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 23:18:26 +00:00
depstein%netscape.com
97bfcc4686 Added web progress notification dialog; and additional flag to url dialog.
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@125646 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:31:23 +00:00
alecf%netscape.com
78fed2e87d add ucvasia module, which is a combination of ucvja, ucvtw, ucvtw2, and ucvko
not part of build, for bug 157993


git-svn-id: svn://10.0.0.236/trunk@125645 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:29:22 +00:00
alecf%netscape.com
9afdcf6fb2 add ucvwestern module, which is a combination of ucvcn, ucvlatin, and ucvibm
not part of build, for bug 157993


git-svn-id: svn://10.0.0.236/trunk@125644 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:28:10 +00:00
alecf%netscape.com
7611651ee7 fix typo for case-sensitive filesystems, not part of build
git-svn-id: svn://10.0.0.236/trunk@125643 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:25:20 +00:00
sicking%bigfoot.com
fdf8ae5b5f Make sure it is possible to get URI of xul elements even if they share nodeinfo with their prototype and are removed from the document tree.
b=156452 r=bz sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125642 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:16:45 +00:00
blakeross%telocity.com
ec222266a8 158419 - help back/fwd buttons broken. r=doron sr=ben a=brendan
git-svn-id: svn://10.0.0.236/trunk@125641 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:16:05 +00:00
alecf%netscape.com
f50250b92a add static utility library for bug 157993 - provides enhanced base classes for table-based converters
not part of build.. landing so I can test on multiple platforms.


git-svn-id: svn://10.0.0.236/trunk@125640 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 22:05:25 +00:00
rogerl%netscape.com
6042d2a155 Changed decimal escape handling to backward compatible rather than ECMA3
conforming. (Bug#158159)


git-svn-id: svn://10.0.0.236/trunk@125639 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 21:38:03 +00:00
shannond%netscape.com
9dc7d79806 Bugscape 17886 - Netscape.com recapture dialog should be unchecked by default
r=shrutiv@netscape.com


git-svn-id: svn://10.0.0.236/trunk@125637 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 20:53:38 +00:00
pinkerton%netscape.com
d21db24616 Change bookmark sidebar panel buttons to be "momentary change" to get
rid of icky border when depressed.


git-svn-id: svn://10.0.0.236/trunk@125636 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 20:42:39 +00:00
cbiesinger%web.de
8f356a3e7c bug 158245 patch by nick@technisys.com.ar r=db48x sr=bz a=scc
Page info should list the alt for images in the media-tab in the tree.


git-svn-id: svn://10.0.0.236/trunk@125635 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 20:40:17 +00:00
ftang%netscape.com
4298cf96c1 fix bug 156943. add cjk lang group check for mUnderlineSize computation
r=rbs sr=jst a=chofmann


git-svn-id: svn://10.0.0.236/trunk@125632 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 20:35:31 +00:00
mikep%oeone.com
ef9c61c74f Fixing bug 158885.
git-svn-id: svn://10.0.0.236/trunk@125629 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 19:23:20 +00:00
mitchf%netscape.com
29fd95aef2 Checking pref tree for remotely administered prefs now, and now auto-check
RemoteAdmin checkbox on following page if any are found.  Fixes bug 13657.


git-svn-id: svn://10.0.0.236/trunk@125628 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 17:26:22 +00:00
cbiesinger%web.de
9b368a5e1d address reviewer comments (whitespace)
git-svn-id: svn://10.0.0.236/trunk@125623 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 13:44:34 +00:00
cbiesinger%web.de
01e2d35c8b bug 145858 patch by sergei_d@fi.tartu.ee r=timeless a=asa
Imported NetPositive Bookmarks are not loaded properly anymore


git-svn-id: svn://10.0.0.236/trunk@125622 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 13:43:23 +00:00
cbiesinger%web.de
2ca860a6d3 fix typo (missing space)
git-svn-id: svn://10.0.0.236/trunk@125621 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 13:28:14 +00:00
cbiesinger%web.de
63f3c4f791 bug 129612 patch by neil@parkwaycc.co.uk r=doron sr=bz a=asa
add enable syntax highlighting checkbox to view source window


git-svn-id: svn://10.0.0.236/trunk@125620 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 13:22:28 +00:00
caillon%returnzero.com
ddfbc0ff4e Bug 152127 - Prevent tabs from getting renamed to "(Untitled)" at seemingly random times.
r=bzbarsky sr=jag a=asa

Also fixes bugs 101827, 101831, 102924, 108189, 108350, 108421, 111118, 124028, 134815, 141839, 144431, 144984, 150669, 158171


git-svn-id: svn://10.0.0.236/trunk@125619 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 10:24:14 +00:00
cltbld%netscape.com
14829a74ad Adding tests to chimera, I slammed this in here for now, need to rework build-seamonkey-utils.pl so tests can be called as functions. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125615 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 07:54:18 +00:00
cltbld%netscape.com
e1af56bf1e Renaming RunTest to RunMozillaTests. Leaving in checks for RunTest for now. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125614 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 07:52:30 +00:00
gerv%gerv.net
2d1c5ec9f0 Bug 96003 - buglist.cgi should not return all bugs if called without any parameters. Patch by gerv; r=myk.
git-svn-id: svn://10.0.0.236/trunk@125613 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 07:16:57 +00:00
kyle.yuan%sun.com
286ec8b7f4 Check in for bolian.yin@sun.com's fix
Bug 81473 The accesskey attribute does not work for the area element
r=dbaron, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125612 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 06:52:32 +00:00
kyle.yuan%sun.com
b5e7185c3c Bug 157183 Even though XUL Element Tree is focusable, Both the inspect tool and API return wrong value
r=jgaunt, sr=jag, a=asa


git-svn-id: svn://10.0.0.236/trunk@125609 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 05:32:39 +00:00
kyle.yuan%sun.com
e1f2c9c169 Bug 157485 Implement nsIAccessibleText for nsHTMLTextFieldAccessible
r=jgaunt, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125608 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 05:32:17 +00:00
kyle.yuan%sun.com
1a05f649c6 Bug 154521 In "Composer", all source I inputed will be removed by switching display mode between "<html>Source" and "Preview";
r=cmanske, sr=sfraser, a=asa
Harry Lu(harry.lu@sun.com)'s fix (part 2)


git-svn-id: svn://10.0.0.236/trunk@125607 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 05:31:42 +00:00
kyle.yuan%sun.com
00cb79e95a Bug 154521 In "Composer", all source I inputed will be removed by switching display mode between "<html>Source" and "Preview";
r=cmanske, sr=sfraser, a=asa
Harry Lu(harry.lu@sun.com)'s fix (part 1)


git-svn-id: svn://10.0.0.236/trunk@125606 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 05:30:16 +00:00
jkeiser%netscape.com
c728d3962c Fix uninitialized variable (bug 14445), r=timeless@mac.com, sr=jst@netscape.com, a=asa
git-svn-id: svn://10.0.0.236/trunk@125603 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 03:58:49 +00:00
bzbarsky%mit.edu
a844108e85 Fix tab switching in embedding apps. Bug 139294,
r=philipl@mail.utexas.edu, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125602 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 03:45:06 +00:00
stephend%netscape.com
a21496a361 Bug 158379. Align 'Filter Name' text with textfield in the Filter Rules dialog. r=naving@netscape.com/walk84@yahoo.com, sr=bryner@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125601 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 03:25:34 +00:00
pavlov%netscape.com
b92f218827 bug 157989. patch from paper@animecity.nu. r=pavlov sr=tor@acm.org a=brendan/chofmann
git-svn-id: svn://10.0.0.236/trunk@125600 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 03:22:27 +00:00
henry.jia%sun.com
a880ad3702 First patch for bug 158080
Description: replace the hardcode of "@mozilla.org/embedcomp/window-watcher;1" with NS_WINDOWWATCHER_CONTRACTID
Patch by Henry.Jia@sun.com
r=blizzard, sr=alecf, a=asa(for trunk)


git-svn-id: svn://10.0.0.236/trunk@125597 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 02:27:19 +00:00
av%netscape.com
c2e34ab5d1 Fixing 157627 -- prevent unnecessary writing plugin info to registry which causes indefinite bloat, r=av, sr=dveditz, a=asa
git-svn-id: svn://10.0.0.236/trunk@125596 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 02:18:44 +00:00
kyle.yuan%sun.com
185d879123 Bug 157865 </HTML> at the beginning of the page followed by <HEAD> or <BODY> causes Mozilla to freeze
r=choess, sr=bzbarsky, a=asa
Check in for Jerry's fix.


git-svn-id: svn://10.0.0.236/trunk@125594 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 02:00:48 +00:00
relyea%netscape.com
5c374eed8b return certs in sorted order.
git-svn-id: svn://10.0.0.236/trunk@125590 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-23 00:34:20 +00:00
gerv%gerv.net
0130c12013 Bug 143650 - general template display system. Patch by gerv; 2xr=jouni.
git-svn-id: svn://10.0.0.236/trunk@125586 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 23:17:48 +00:00
cbiesinger%web.de
d2ccc8cf02 bug 155148 patch by calvin.liu@sun.com r=hwaara sr=bienvenu a=asa
Online/Offline indicator doesn't work in "Advanced Address Book  Search" dialog


git-svn-id: svn://10.0.0.236/trunk@125585 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 22:28:44 +00:00
cltbld%netscape.com
2fd95378c9 Renaming Settings::RunTest to Settings::RunMozillaTests to be more descriptive. Leaving in check for old RunTest variable for now, in case there are some clients relying on that. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125582 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 21:45:52 +00:00
joki%netscape.com
a588052207 Fix for bug 157845: mCurrentTarget pointer should not be set in the ESM without setting the NS_FRAME_EXTERNAL_REFERENCE bit. r:saari, sr:jst, a:chofmann
git-svn-id: svn://10.0.0.236/trunk@125581 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 21:36:36 +00:00
shrutiv%netscape.com
e649540c60 Fix for bugscape bug 17315: Help menu customizations aren't in MacOSX
(r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@125580 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 21:34:32 +00:00
cbiesinger%web.de
eb1ac066c6 last checkin was for nick@technisys.com.ar who created that patch
git-svn-id: svn://10.0.0.236/trunk@125578 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 19:52:04 +00:00
cbiesinger%web.de
4fe07a1562 bug 158435 r=ksosez sr=bz a=jesup
Page Info's label-control association is broken (should be by id).


git-svn-id: svn://10.0.0.236/trunk@125577 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 19:51:16 +00:00
mikep%oeone.com
fbcfda6ec2 Fixing problem with attachments, from OEOne.
git-svn-id: svn://10.0.0.236/trunk@125575 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 18:54:15 +00:00
leaf%mozilla.org
3fa9d44ed2 add taskbar icons for applications, r=kerz,a=asa,b=158684
git-svn-id: svn://10.0.0.236/trunk@125574 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 18:01:41 +00:00
tao%netscape.com
0c28c38cf0 Initial checkin of the suit of scripts and files needed to leverage
translations from localized mozilla/netscape language packs into embed.jar.


git-svn-id: svn://10.0.0.236/trunk@125573 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 17:23:58 +00:00
kairo%kairo.at
cf73a02489 bug 158678 - adding missed help_help.html file, r=oeschger, dispensation of drviers per bug 122806
git-svn-id: svn://10.0.0.236/trunk@125572 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 17:10:21 +00:00
aaronl%netscape.com
11e8f2ad33 Not part of build. Bug 30088. Minor tweaks, getting ready for review
git-svn-id: svn://10.0.0.236/trunk@125571 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 14:55:02 +00:00
aaronl%netscape.com
71a8c22e47 Not part of build. Bug 30088. Minor tweaks, getting ready for review
git-svn-id: svn://10.0.0.236/trunk@125570 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 14:55:01 +00:00
rods%netscape.com
039c30685d fixing up test for more variants
git-svn-id: svn://10.0.0.236/trunk@125569 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 14:43:17 +00:00
rods%netscape.com
c4adb46d80 adding hidden iframe test
git-svn-id: svn://10.0.0.236/trunk@125568 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 14:02:27 +00:00
mikep%oeone.com
f04f61355f Patch from bug 123583.
git-svn-id: svn://10.0.0.236/trunk@125567 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 12:42:34 +00:00
jouni%heikniemi.net
f9bb67be21 Tree bustage fix of bug 157074: a filter had the wrong name in hidden-fields template.
git-svn-id: svn://10.0.0.236/trunk@125566 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 11:09:06 +00:00
rods%netscape.com
798b734575 Added additional tests cases for printing
git-svn-id: svn://10.0.0.236/trunk@125565 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 10:58:21 +00:00
rods%netscape.com
4d051a96ff When a FrameSet Frame's contains a FrameSet the mFrameType for the PrintObject
is always set to an eFrame. Which is fine when printing "AsIs"
but is incorrect when when printing "Each Frame Separately".
When printing "Each Frame Separately" the Frame really acts like a frameset.
So we need to set it to an eFrame
Bug 157918 r=dcone sr=kin a=scc


git-svn-id: svn://10.0.0.236/trunk@125564 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 10:55:07 +00:00
kyle.yuan%sun.com
8a0e6bc6e7 Not part of build.
Bug 157298 make install does not work in mozilla/widget/src/gtk2/mai
r=kyle
Thanks for mpeseng@tin.it's fix


git-svn-id: svn://10.0.0.236/trunk@125563 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 06:58:28 +00:00
kyle.yuan%sun.com
ba262e33d4 Not part of build.
Bug 153298 Translate nsIAccessible events to ATK events
r=kyle
Thanks for John Sun (john.sun@sun.com)'s fix


git-svn-id: svn://10.0.0.236/trunk@125562 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-22 06:57:08 +00:00
kerz%netscape.com
d651ed432f New desktop icons, r=cls, sr=bryner, a=asa, bug 73712
git-svn-id: svn://10.0.0.236/trunk@125558 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 23:15:55 +00:00
kerz%netscape.com
3636c59169 New desktop icons, r=cls, sr=bryner, a=asa
git-svn-id: svn://10.0.0.236/trunk@125557 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 23:04:48 +00:00
aaronl%netscape.com
c6f90015df Not part of build. Bug 30088 - type ahead find. Add support for nsITypeAheadFind.
git-svn-id: svn://10.0.0.236/trunk@125555 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 22:36:51 +00:00
gerv%gerv.net
d81b80bc41 Bug 95426 - remove $onebug cruft. Patch by gerv; 2xr=timeless.
git-svn-id: svn://10.0.0.236/trunk@125554 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 21:47:43 +00:00
hwaara%chello.se
38157b25b7 #125887, fix some cases where whitespace would make window.open() and openDialog() to not work.
r=jkeiser, sr=bzbarsky, a=brendan


git-svn-id: svn://10.0.0.236/trunk@125553 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 18:12:38 +00:00
gerv%gerv.net
f5446f3c7e Fixing trivial but obvious bug where "and QA contact" was not displaying correctly; noticed on b.m.o. No bug number.
git-svn-id: svn://10.0.0.236/trunk@125551 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 14:14:41 +00:00
pete.zha%sun.com
e7e1db9698 Forget one line in previou check in. Just add it now.
Sorry for this!


git-svn-id: svn://10.0.0.236/trunk@125550 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 11:19:39 +00:00
pete.zha%sun.com
5e7b11afb7 Summary: print to file overwrites file without asking
bug=107484 r=rods sr=bzbarsky a=scc


git-svn-id: svn://10.0.0.236/trunk@125549 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 10:59:57 +00:00
caillon%returnzero.com
035dbe91ce Bug 107147. "Using middle button to close a tab also pastes+opens url in another tab".
r=sicking
sr=jag
a=brendan


git-svn-id: svn://10.0.0.236/trunk@125546 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-21 01:48:34 +00:00
jkeiser%netscape.com
5d2a4473b9 Damn, missed this file. Part of bug 14445 update just now.
git-svn-id: svn://10.0.0.236/trunk@125545 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 23:44:21 +00:00
jkeiser%netscape.com
01341d9e3c Make radio buttons work without forms (bug 14445), r=rods@netscape.com, sr=jst@netscape.com, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125544 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 23:09:24 +00:00
morse%netscape.com
255ebc1837 bug 155114, back out all patches for fixing cookie-stealing bug, a=asa
git-svn-id: svn://10.0.0.236/trunk@125535 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 07:38:16 +00:00
cltbld%netscape.com
7bc97b064e fixing reset home dir logic, sorry. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125532 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 06:19:15 +00:00
shanjian%netscape.com
41e6689d50 #156943 CJK text underline is positioned too near the text
raise baseline for CJK language groups.
r=rbs, sr=waterson, a=adt


git-svn-id: svn://10.0.0.236/trunk@125531 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 05:21:25 +00:00
sfraser%netscape.com
5dfe57abb3 Fixing bug 155334 -- zombie progress dialog left after doing a File | Save As in plain text format. We were checking the STATE_IS_NETWORK flag to decide when the download has finished, but this flag is not included for plain text saves (nsWebBrowserPersist doesn't give it to us). So we look at the start flags, and make sure the end flag matches on this bit. Also detabbed the file.
git-svn-id: svn://10.0.0.236/trunk@125530 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 03:22:36 +00:00
sicking%bigfoot.com
96ef7647c7 Allow "chromenodes" to access all domains.
b=158167 r=bzbarsky sr=jst a=asa


git-svn-id: svn://10.0.0.236/trunk@125528 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 01:40:02 +00:00
hwaara%chello.se
79c60ad859 #62157, "Document content is rendered even though version value is not '1.0'." Make us care about what version is specified and bail out on anything but "1.0".
r=bzbarsky, sr=heikki, a=asa


git-svn-id: svn://10.0.0.236/trunk@125527 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 01:18:52 +00:00
shrutiv%netscape.com
8e7d878186 Fix for bugscape bug 16676: Customized Sidebar tab not working on MacOS
(r=shannond)


git-svn-id: svn://10.0.0.236/trunk@125526 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 00:58:58 +00:00
stephend%netscape.com
3b89268071 Bug 158264. Prefix showOpenURLDialog() with http://. r=caillon@netscape.com, sr=hewitt@netscape.com (also Module Owner), a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125525 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-20 00:40:49 +00:00
bzbarsky%mit.edu
544e250544 fix startup assertions, bug 154503, r=sicking, sr=dbaron, a=asa
git-svn-id: svn://10.0.0.236/trunk@125524 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 23:58:10 +00:00
bishakhabanerjee%netscape.com
8b20fbdd82 Setting number of tests to 252 to take out warnings on nightly QA reports -Bug 156959
git-svn-id: svn://10.0.0.236/trunk@125523 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 23:46:10 +00:00
pavlov%netscape.com
1da87a90e5 fixing bug 157202 r=dougt sr=tor@acm.org a=asa
git-svn-id: svn://10.0.0.236/trunk@125521 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 23:21:48 +00:00
leaf%mozilla.org
9f7cf37f8c updating to 1.1b
git-svn-id: svn://10.0.0.236/trunk@125520 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 23:08:41 +00:00
bzbarsky%mit.edu
993a541873 Tabbing to an <area> should scroll to it in addition to focusing it.
Bug 124769, r=sicking, sr=bryner, a=scc


git-svn-id: svn://10.0.0.236/trunk@125518 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 22:36:52 +00:00
varga%netscape.com
01fcfc5ac4 Fix for bug 128809 - Mail layout goes into infinite loop when "view headers all" is activated
r=kin, sr=bryner, a=scc


git-svn-id: svn://10.0.0.236/trunk@125517 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 22:36:46 +00:00
brendan%mozilla.org
615fd435f4 Don't return 1 cast to JSProperty* for a property found in a non-LiveConnect prototype object (155740, r=rogerl, sr=jband, a=chofmann/blizzard/scc).
git-svn-id: svn://10.0.0.236/trunk@125516 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 22:00:03 +00:00
leaf%mozilla.org
d71824c07d backout dataloss-causing fixes for 143862 and 156719, a=asa
git-svn-id: svn://10.0.0.236/trunk@125515 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:58:09 +00:00
shanjian%netscape.com
3816d9f036 #155175 Certain truetype fonts crash mozilla
correct a misuse of parenthesis.
p=Andrew Schultz  , r=bstell, sr=rbs, a=brendan


git-svn-id: svn://10.0.0.236/trunk@125513 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:21:23 +00:00
dougt%netscape.com
3560250015 compreg.tmp is written out on every startup. r=rjc, sr=alec, a=scc
git-svn-id: svn://10.0.0.236/trunk@125512 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:12:04 +00:00
sfraser%netscape.com
8bffb2130f Fix bug 155664 -- make URLs opened from the Services menu in another app behave like those opened via Apple Events etc, obeying the prefs to load in new tabs/windows, possibly in the background.
git-svn-id: svn://10.0.0.236/trunk@125511 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:08:25 +00:00
cltbld%netscape.com
87a19fce64 Adding ResetHomeDirForTests variable, some builds won't want to do this (chimera, etc.)
git-svn-id: svn://10.0.0.236/trunk@125510 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 21:03:01 +00:00
ducarroz%netscape.com
508651d4ca Fix for bug 158334. Fix memory corruption created by using PL_strcat on a buffer not wide enough. R=varada, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@125509 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 20:58:32 +00:00
nhotta%netscape.com
e98305c34a Changed nsPlainTextSerializer to try NCR if CER conversion fails,
bug 40350, r=akkana, sr=kin, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125508 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 20:50:14 +00:00
wtc%netscape.com
632cf0781e Bug 158339: we should not call secmod_freeParams if RNG_RNGInit fails.
git-svn-id: svn://10.0.0.236/trunk@125504 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 18:31:30 +00:00
despotdaemon%netscape.com
0ec1511934 Pseudo-automatic update of changes made by yxia@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@125503 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 18:26:38 +00:00
despotdaemon%netscape.com
d6e2febb61 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125502 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 17:59:28 +00:00
timeless%mac.com
16c47f8a29 Bug 158202 crash opening venkman and closing navigator [@nsXULElement::GetOwnerDocument]
patch by sicking@bigfoot.com r=bz sr=jst a=scc checkin authorized by scc


git-svn-id: svn://10.0.0.236/trunk@125500 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 17:03:03 +00:00
aaronl%netscape.com
8305292a8a Not part of build. Bug 30088: typeaheadfind - make sure we're not enabled in mailnews message pane, because we conflict with shortcuts link n for next unread message
git-svn-id: svn://10.0.0.236/trunk@125499 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 16:07:23 +00:00
mikep%oeone.com
f55f8c3805 Integrating changes from OEone calendar.
git-svn-id: svn://10.0.0.236/trunk@125498 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 15:56:53 +00:00
bbaetz%student.usyd.edu.au
0aee0fe7f3 Bug 157074 - verify-new-product doubles comment linefeeds on Win32
r=myk, jouni


git-svn-id: svn://10.0.0.236/trunk@125497 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 14:04:15 +00:00
timeless%mac.com
295afaadb1 Bug 151770 Can't associate Mozilla with .XBM images
patch by ask@swva.net r=law sr=alecf a=scc


git-svn-id: svn://10.0.0.236/trunk@125496 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 10:12:16 +00:00
samuel%sieb.net
21b6c7ef39 Bug 146509 - allow tab completion to work with non-alphanumeric characters
r=rginda
a=asa


git-svn-id: svn://10.0.0.236/trunk@125495 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 05:56:29 +00:00
samuel%sieb.net
f144c703ef Bug 135937 - clean up connection status (limit decimal points)
r=rginda
a=asa


git-svn-id: svn://10.0.0.236/trunk@125494 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 05:53:27 +00:00
samuel%sieb.net
8600889897 Bug 152182 - allow multiple channels for /join
r=rginda
a=asa


git-svn-id: svn://10.0.0.236/trunk@125493 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 05:51:00 +00:00
pete.zha%sun.com
5f76121e77 [ps] CSS sans-serif prints as serif
bug=148411 r=dcone sr=bzbarsky a=asa
Correct some font name in map


git-svn-id: svn://10.0.0.236/trunk@125490 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 02:41:41 +00:00
sfraser%netscape.com
6e833ccc5b Making the Colors and Links tab the default (bug 158152).
git-svn-id: svn://10.0.0.236/trunk@125489 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 02:26:53 +00:00
sfraser%netscape.com
5df7b90ed4 Fix for bug 155560 -- renaming bookmark does not update menu/toolbar. Also fixes crash when deleting a toolbar bookmark (bug 157229). Patch from David Hass.
git-svn-id: svn://10.0.0.236/trunk@125488 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 02:20:30 +00:00
sfraser%netscape.com
877fb645db Fix bug 154904-- fixing [BookmarkItem url] to return the url instead of the name.
git-svn-id: svn://10.0.0.236/trunk@125486 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 01:47:15 +00:00
jshin%mailaps.org
f7c6fa9d21 Add two new characters(Euro and Registered trade mark sign) to
KS X 1001 based converters (EUC-KR, UHC, JOHAB, ISO-2022-KR):
bug 134749: r=yokoyama, sr=alecf, a=asa


git-svn-id: svn://10.0.0.236/trunk@125485 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 01:42:16 +00:00
bzbarsky%mit.edu
dbb888b255 Fix GetQuotedAttributeValue's parsing. Bug 106163, r=sicking, sr=jag, a=asa
git-svn-id: svn://10.0.0.236/trunk@125483 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 01:14:29 +00:00
jpierre%netscape.com
563706c60a Fix for 158221 - make crlutil save memory by using the new PK11_ImportCRL function with the CRL_DECODE_DONT_COPY_DER option
git-svn-id: svn://10.0.0.236/trunk@125482 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 01:07:27 +00:00
jpierre%netscape.com
a6c742786a 158005 - add new CRL decode and import functions . Benefits are :
- ability to import to any slot
- ability to specify decode options, such as "don't copy DER"
- ability to specify import options, such as "don't do CRL checks"
This patch also maps the existing functions SEC_NewCrl and CERT_ImportCRL
to this new function, eliminating the code duplication that existed


git-svn-id: svn://10.0.0.236/trunk@125481 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 00:59:34 +00:00
bryner%netscape.com
50f9170ec7 Enable full-screen mode for unix. Bug 126685, r=blizzard, sr=sfraser, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125480 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 00:43:00 +00:00
nicolson%netscape.com
3c4986240c Fix 157998: unable to importCertToPerm
git-svn-id: svn://10.0.0.236/trunk@125478 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 00:20:24 +00:00
jpierre%netscape.com
66501867de Fix for 156802 - remove improper check in CRL decoding
git-svn-id: svn://10.0.0.236/trunk@125477 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-19 00:12:13 +00:00
jpierre%netscape.com
7f01d87246 Remove unreferenced variables
git-svn-id: svn://10.0.0.236/trunk@125476 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 23:50:03 +00:00
rginda%netscape.com
19d0492d88 - venkman only -
bug 158181, "this.tabs has no properties error when script is unloaded"
r=caillon, a=asa
null check for content before we actually try to use it (in source2 view)
also fixes spelling error, strict warning, and margin-clicking in the source2 view


git-svn-id: svn://10.0.0.236/trunk@125475 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 23:27:49 +00:00
jpierre%netscape.com
e635a3cd71 Fix for 139292 - NSS_NoDBInit regression
git-svn-id: svn://10.0.0.236/trunk@125474 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 23:08:55 +00:00
pavlov%netscape.com
9d33b5519d fix for bug 157202. r=dougt sr=tor@acm.org a=chofmann
git-svn-id: svn://10.0.0.236/trunk@125472 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 22:18:11 +00:00
shannond%netscape.com
1aac970cf4 Backing out bug 147978 - the copy of an existing config should use its own Workspace
since it causes regression
bug 157807 - Creating a new configuration in CCK duplicates fields ...
approval for backout from ariana and shrutiv


git-svn-id: svn://10.0.0.236/trunk@125469 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 20:15:02 +00:00
shannond%netscape.com
67dde85655 Backing out bug 147978 - The copy of an existing config should use its own Workspace
since it causes regression
bug 157807 - Creating a new configuration in CCK duplicates fields ...
approval for backout from ariana and shrutiv


git-svn-id: svn://10.0.0.236/trunk@125468 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 20:07:28 +00:00
aaronl%netscape.com
14aeefa20e Not part of build. Bug 30088: type ahead find. Support Accel+Shift+G for find previous
git-svn-id: svn://10.0.0.236/trunk@125467 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 19:11:54 +00:00
smeredith%netscape.com
9d364937d7 Disable the homepage buttons if the homepage pref is locked.
git-svn-id: svn://10.0.0.236/trunk@125466 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 18:42:44 +00:00
pschwartau%netscape.com
d61df3aa38 Initial add. Regression test for bug 141078.
git-svn-id: svn://10.0.0.236/trunk@125465 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 18:36:44 +00:00
aaronl%netscape.com
10b640ad3a Not part of build. Bug 30088 - type ahead find. Ctrl+G now respects linksonly setting
git-svn-id: svn://10.0.0.236/trunk@125464 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 18:32:54 +00:00
bienvenu%netscape.com
603ae8ef36 fix undo of delete of top level msg in thread r=cavin, antonio.xu@sun, sr=sspitzer, a=asa 157503
git-svn-id: svn://10.0.0.236/trunk@125463 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 14:48:38 +00:00
bienvenu%netscape.com
c15a216b07 fix crash selecting bogus line in thread pane for imap folder, r=cavin, sr=sspitzer 157503
git-svn-id: svn://10.0.0.236/trunk@125462 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 14:45:08 +00:00
dougt%netscape.com
4cb4da3135 attempting to fix the AIX bustage
git-svn-id: svn://10.0.0.236/trunk@125461 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 14:38:07 +00:00
aaronl%netscape.com
77c6e7b67c Not part of build. Bug 30088 - type ahead find. Fixes problem with type ahead find locking up
git-svn-id: svn://10.0.0.236/trunk@125460 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 14:19:31 +00:00
arougthopher%lizardland.net
1b134606f6 Bug#155404
File names generated in File Save As menu are incorrect in BeOS.

r=arougthopher
a=scc


git-svn-id: svn://10.0.0.236/trunk@125459 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 12:09:09 +00:00
rods%netscape.com
7d81f1b38d need to check BUSY_FLAGS_PAGE_LOADING before printing
Bug 157632 r=dcone sr=jst a=scc


git-svn-id: svn://10.0.0.236/trunk@125458 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 09:09:54 +00:00
jaggernaut%netscape.com
55af1e7936 Bug 107848: Wrong tab is closed when last but one tab is closed. r=caillon, sr=ben, a=asa
git-svn-id: svn://10.0.0.236/trunk@125457 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 07:31:10 +00:00
dougt%netscape.com
f7575b0db1 backout out change
git-svn-id: svn://10.0.0.236/trunk@125456 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 07:19:45 +00:00
dougt%netscape.com
e9d9254cc7 backing out
git-svn-id: svn://10.0.0.236/trunk@125454 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:58:27 +00:00
dougt%netscape.com
78e286b83d Dynamic loading is failing on linux. disabling
git-svn-id: svn://10.0.0.236/trunk@125453 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:49:48 +00:00
dougt%netscape.com
c2c2197ef6 fixing bustage
git-svn-id: svn://10.0.0.236/trunk@125452 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:49:05 +00:00
dougt%netscape.com
9a11c0aedc backing out that last change
git-svn-id: svn://10.0.0.236/trunk@125450 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:34:18 +00:00
dougt%netscape.com
eb41b992e3 best guess at how to fix gtk orangeness
git-svn-id: svn://10.0.0.236/trunk@125449 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 06:29:21 +00:00
sicking%bigfoot.com
c52d22c28d Reenable same-origin checks. Patch by me and jst.
b=156452 r=peterv/sicking/jst sr=bz/jst a=chofmann


git-svn-id: svn://10.0.0.236/trunk@125447 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 05:53:28 +00:00
henry.jia%sun.com
55ec460407 Fix bug 27002:
Cyrus IMAP: Send and Save as Draft/Template problems on Cyrus

Patch description:
Add personal namespace support for specific folders' uri. This patch can also solve the blocker bug 90494 which is related the same problems of Courier IMAP server.

patch by Henry.Jia@sun.com
r=cavin@netscape.com, sr=bienvenu@netscape.com, a=chofmann@netscape.com


git-svn-id: svn://10.0.0.236/trunk@125446 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 05:41:42 +00:00
despotdaemon%netscape.com
697f1a9465 Pseudo-automatic update of changes made by t_mutreja@yahoo.com.
git-svn-id: svn://10.0.0.236/trunk@125445 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 05:23:23 +00:00
dougt%netscape.com
ecdd8ab65f Fixes the following:
154047
This change cleans up the category manager in hopes to freeze it for 1.1 final.  This change removes dead and unsupported methods from the interface as well as removes the C++ code from the interface.  This should land for 1.1b since users of the current category manager will have to update their components.

157597
Make embedding base and examples use XPCOM Glue
This change makes our embedding samples use the XPCOM glue.

157625
nsLocalFile::Remove's file pointer is sometimes null afte...
This fixes a crash when we dereference null.  It is a bandaide fix as the real problems involves retooling the directory enumerator.

157801
This fixes a terrible state which you can get into whereby XPCOM will fail to startup regardless of what you do.  The fix is to cause autoreg to happen if the component registry (compreg.dat) is not found.

r/sr=alecf@netscape.com, rpotts@netscape.com.  a=scc@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@125444 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 05:09:10 +00:00
jaggernaut%netscape.com
dfa9bd5ea2 Bug 140673: Some Arabic/Hebrew bitmap fonts printed way too small with Xprint. Patch by Roland.Mainz@informatik.med.uni-giessen.de, r=smontagu, sr=dveditz, a=scc
git-svn-id: svn://10.0.0.236/trunk@125443 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:26:35 +00:00
leaf%mozilla.org
d34eba106d Automated update
git-svn-id: svn://10.0.0.236/trunk@125442 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:25:47 +00:00
seawood%netscape.com
df86a25798 Remove DARWIN define from osx builds as it cripples the feature set provided by
OSX headers.
Bug #154232 r=wtc sr=scc a=scc


git-svn-id: svn://10.0.0.236/trunk@125441 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:11:48 +00:00
seawood%netscape.com
5a25868f3a Remove DARWIN define from osx builds as it cripples the feature set provided by OSX headers.
Bug #154232 r=wtc sr=scc a=scc


git-svn-id: svn://10.0.0.236/trunk@125440 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:09:30 +00:00
varga%netscape.com
8e87af728a Fix for bug 82840 - need treecolgroups to have fixed="true" be as wide as the column header
and bug 72513 - column header text not shown: Enabled (in fitler dialog) and Subscribed (in subscribe dialog)

r=bienvenu
sr=sspitzer
a=scc


git-svn-id: svn://10.0.0.236/trunk@125439 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:09:11 +00:00
jaggernaut%netscape.com
e7ec69df4b Bug 142623: No reload of Language strings due to XUL FastLoad. Patch by John Morrison <jrgm@netscape.com>, r=ben, sr=brendan, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@125437 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 04:00:31 +00:00
caillon%returnzero.com
208a6f8e3c Checkin for Mike Kowalski <mikejk@ameritech.net>
Bug 126600 - Reword the turbo preference.  r=caillon sr=bryner a=scc


git-svn-id: svn://10.0.0.236/trunk@125435 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 03:22:29 +00:00
pete.zha%sun.com
d2cab5173e Freeing mismatched memory in delete
bug=157184 r=naving sr=bienvenu a=scc patch=antonio.xu@sun.com


git-svn-id: svn://10.0.0.236/trunk@125433 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:48:52 +00:00
jshin%mailaps.org
195409b999 Combining EUC-KR and UHC decoders into one (bug 131388)
r=yokoyama, sr=alecf, a=scc


git-svn-id: svn://10.0.0.236/trunk@125432 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:40:19 +00:00
kyle.yuan%sun.com
73d1262924 Bug 131883 All filenames of attachment disappeared by resizing attachment area;
r=hewitt, sr=scc, a=scc
Force listitem's rect to be recalculated when its parent was going wider.


git-svn-id: svn://10.0.0.236/trunk@125430 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:19:12 +00:00
kyle.yuan%sun.com
1c01d792f8 Bug 134916 left arrow to select parent of currently selected row does not scroll to parent
r=varga, sr=bzbarsky, a=scc
Add ensureRowIsVisible in keypress handler when keycode="left"


git-svn-id: svn://10.0.0.236/trunk@125429 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:16:54 +00:00
kyle.yuan%sun.com
00aca9ccd9 Bug 140227 Strange shift+click and ctrl+click behaviour in single-selection listbox
r=neil@parkwaycc.co.uk, sr=bzbarsky, a=scc
Check "selType" in mouse click handler


git-svn-id: svn://10.0.0.236/trunk@125428 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:16:32 +00:00
hwaara%chello.se
cc965819e8 #156074, processing-instructions should be better denoted.
r=caillon, tim <riceman+bmo@mail.rit.edu>
sr=bzbarsky
a=scc

#156072, DOM inspector omits the #document node, and also doesn't show any sibling nodes to the root element (comments, text nodes, etc.)
r=caillon, tim <riceman+bmo@mail.rit.edu>
sr=bzbarsky
a=scc


git-svn-id: svn://10.0.0.236/trunk@125427 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 02:04:12 +00:00
bzbarsky%mit.edu
1365591a1e Make sure that painting is properly unsuppressed in XML docs. Bugs
156985, 81546, 157487, r=dbaron, sr=rbs, a=scc


git-svn-id: svn://10.0.0.236/trunk@125425 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 01:49:47 +00:00
naving%netscape.com
64e02d9ae6 157809 r=cavin sr=bienvenu a=scc fixing can't delete imap folders when using "mark as deleted" delete model
git-svn-id: svn://10.0.0.236/trunk@125422 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 01:18:14 +00:00
jkeiser%netscape.com
b5ecb6dda7 Make select clear when last option is removed from it (bug 154410), r=bzbarsky@mit.edu, sr=dbaron@fas.harvard.edu, a=asa
git-svn-id: svn://10.0.0.236/trunk@125421 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 00:58:31 +00:00
rginda%netscape.com
a0e80802d0 - venkman only -
bug 157638, "Land VENKMAN_FLOATS_MY_BOAT branch", a=scc
Landing the 3 month old branch, which fixes the following bugs...
121409, 103898, 116102, 116099, 127750, 127099, 121501, 127102, 127737, 127733, 150481, 156776, 156769, 153381, 153066, 152946, 127752, 116286, 143682, 130398, 129692, 156111, 127736, 130050, 139565, 128604, 127751, 127732, 127727, 103425, 85634, 139557, 125394


git-svn-id: svn://10.0.0.236/trunk@125420 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 00:54:32 +00:00
sfraser%netscape.com
0a23433cb9 Adding code to make stdout and stderr unbuffered, depending on the MOZ_UNBUFFERED_STDIO environment variable. This is needed for tests to run correctly.
git-svn-id: svn://10.0.0.236/trunk@125419 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 00:26:49 +00:00
jkeiser%netscape.com
77550ff3b4 Make form submission behave better in low-mem situations (bug 126941), r=sicking@bigfoot.com, sr=bzbarsky@mit.edu, a=asa
git-svn-id: svn://10.0.0.236/trunk@125418 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-18 00:23:09 +00:00
leaf%mozilla.org
080c774ee3 bug 154840, r=cls, sr=brendan, a=jesup update localeVersion strings
git-svn-id: svn://10.0.0.236/trunk@125417 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 23:51:49 +00:00
morse%netscape.com
b97395f839 bug 155114, stealing cookies based on path attribute, r=mstoltz, sr=jag, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@125415 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 23:38:28 +00:00
nhotta%netscape.com
3773761d91 Restore my previous changes with mach-o build fix,
bug 108029, r=pinkerton, sr=sfraser, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125410 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 23:05:30 +00:00
alecf%netscape.com
6a0f892905 remove .cvsignore from this empty directory - not part of the build in any way!
git-svn-id: svn://10.0.0.236/trunk@125408 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 22:56:34 +00:00
jpierre%netscape.com
01d9d47333 Fix usage
git-svn-id: svn://10.0.0.236/trunk@125407 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 22:53:33 +00:00
jpierre%netscape.com
20b1f3fa86 Fix for 157996 - add support for SEC_NewCrl browser emulation mode in crlutil
git-svn-id: svn://10.0.0.236/trunk@125405 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 22:22:26 +00:00
brade%netscape.com
49ccc35a74 bug 157851, 157923, 157811, 157440, and probably some others; cleanup attribute adding for meta tags and fix table api
git-svn-id: svn://10.0.0.236/trunk@125401 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 21:32:20 +00:00
wtc%netscape.com
8fb7a6ccd5 Bug 157946: removed the unused -m option. Added the -v option to Usage().
git-svn-id: svn://10.0.0.236/trunk@125397 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 18:39:02 +00:00
gerv%gerv.net
02ee939574 Bug 151648 - QA Contact stuff displayed even if you aren't using QA Contacts. 2xr=jouni.
git-svn-id: svn://10.0.0.236/trunk@125394 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 18:28:37 +00:00
pschwartau%netscape.com
1c0c54a637 Skip testcase for bug 157652. Will not fix this in Rhino; the OOM error is reasonable.
git-svn-id: svn://10.0.0.236/trunk@125393 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 18:20:58 +00:00
sfraser%netscape.com
b5c586f6ef Adding the Appearance.prefPane to the static target build settings.
git-svn-id: svn://10.0.0.236/trunk@125389 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 17:37:44 +00:00
karnaze%netscape.com
79e5539aec new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@125388 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 16:51:52 +00:00
despotdaemon%netscape.com
a16e42c146 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125387 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 16:42:02 +00:00
rods%netscape.com
1e79bb6ab0 Add additional test to printing test files
git-svn-id: svn://10.0.0.236/trunk@125386 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 13:37:59 +00:00
timeless%mac.com
3f5cca095a Bug 140630 LDAP should be in capital letters
patch by neil@parkwaycc.co.uk r=dmose sr=bienvenu a=asa


git-svn-id: svn://10.0.0.236/trunk@125385 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 13:19:16 +00:00
timeless%mac.com
3e602a9f04 Bug 156368 quicksearch fails if focus was in threadpane before search box
patch by neil@parkwaycc.co.uk r=naving sr=bienvenu a=asa


git-svn-id: svn://10.0.0.236/trunk@125384 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 13:06:09 +00:00
bryner%netscape.com
ba5e37b831 We don't need pippki.xpt either.
git-svn-id: svn://10.0.0.236/trunk@125382 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 08:52:43 +00:00
rbs%maths.uq.edu.au
13627c98ae re-enabling MathML after peterv's fixup
git-svn-id: svn://10.0.0.236/trunk@125381 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 07:23:16 +00:00
peterv%netscape.com
58298ba6cd Fixing MathML packaging bustage on Mac.
git-svn-id: svn://10.0.0.236/trunk@125380 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 07:17:05 +00:00
axel%pike.org
d1e791d134 adding an id to the QA menupopup, so one can overlay that. bug 157382, r=neil@parkwaycc.co.uk, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@125379 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 07:04:30 +00:00
bryner%netscape.com
98bebf9f26 Remove libpippki. This is only needed for the XUL implementation of the security dialogs.
git-svn-id: svn://10.0.0.236/trunk@125378 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 06:22:42 +00:00
wtc%netscape.com
3c02768be9 Bug 141614: restored Matthew Zahorik's net_server nonblocking connect
logic, which accidentally got deleted when the BONE changes were checked
in. This patch was contributed by Arougthopher
<arougthopher@lizardland.net>.
Modified Files: bfile.c bmisc.c bnet.c


git-svn-id: svn://10.0.0.236/trunk@125377 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 06:04:42 +00:00
mkaply%us.ibm.com
d78fa03226 #157770
r=dougt, sr=blizzard, a=asa
OS/2 only - up the numbre of file handles when starting Moz, and handle specific error with DosCopy


git-svn-id: svn://10.0.0.236/trunk@125373 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 05:46:34 +00:00
mkaply%us.ibm.com
beb0c00835 #157758
r=pedemont, sr=blizzard, a=asa
OS/2 only - always use facename rather than familyname for DBCS fonts


git-svn-id: svn://10.0.0.236/trunk@125372 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 05:42:07 +00:00
mkaply%us.ibm.com
281419934a #157383
r=pedemont, sr=blizzard, a=asa
OS/2 only - truncate title bar text to 256 to workaround OS bug


git-svn-id: svn://10.0.0.236/trunk@125370 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 05:36:04 +00:00
despotdaemon%netscape.com
30cf0df97e Pseudo-automatic update of changes made by t_mutreja@yahoo.com.
git-svn-id: svn://10.0.0.236/trunk@125368 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 05:33:09 +00:00
bzbarsky%mit.edu
02fd13d54d Bug 114627 -- ESC should dismiss default plugin dialog. Patch by
Andre  Dahlqvist <anedah-9@student.luth.se>, r=serge, sr=blizzard, a=asa


git-svn-id: svn://10.0.0.236/trunk@125364 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 04:36:13 +00:00
leaf%mozilla.org
2b20d4bbf7 Automated update
git-svn-id: svn://10.0.0.236/trunk@125358 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 02:40:21 +00:00
leaf%mozilla.org
59f26094d7 bug 157558, r=cls. version string updates for upcoming 1.1b
git-svn-id: svn://10.0.0.236/trunk@125357 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 02:39:51 +00:00
pete.zha%sun.com
3d85f30820 Implementation the nsIAccessibleTable for XUL tree table
bug=155866, r=kyle, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@125356 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 02:32:17 +00:00
karnaze%netscape.com
e1b0af4e1d bug 153785 - Added function to undo splitting floaters when the line they are on gets moved to the next page. Cached the break type of the last floater that gets split in the block reflow state so that the frame afterh the floater's continuation can combine that break type with its own. a=asa, sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@125355 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:48:56 +00:00
wtc%netscape.com
8db48c9761 Bug 157347: deleted the code that tried to escape the quotes around
command-line arguments. The patch was contributed by Michael Kaply
<mkaply@us.ibm.com>. r=wtc.


git-svn-id: svn://10.0.0.236/trunk@125353 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:45:57 +00:00
kyle.yuan%sun.com
54b0837973 Bug 154089 "My Sidebar" in Address Book can't show at the first time
r=morse, sr=alecf, a=asa
Thanks for Robin Lu (robin.lu@sun.com)'s fix


git-svn-id: svn://10.0.0.236/trunk@125351 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:36:37 +00:00
glen.beasley%sun.com
7f5a5a618a typecast for AIX build proper way
git-svn-id: svn://10.0.0.236/trunk@125349 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:14:58 +00:00
akkana%netscape.com
03e46541b4 Add a target to make the xpi. Not part of the normal build.
git-svn-id: svn://10.0.0.236/trunk@125348 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 01:04:10 +00:00
nhotta%netscape.com
fb56d1e2c0 Back out my last changes for the mach-o build problem.
git-svn-id: svn://10.0.0.236/trunk@125347 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 00:38:33 +00:00
rbs%maths.uq.edu.au
ea6e894339 Turn off the build of MathML to attempt to fix the bustage
git-svn-id: svn://10.0.0.236/trunk@125346 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 00:31:47 +00:00
jpierre%netscape.com
85c326e9c8 Fix for 153245
git-svn-id: svn://10.0.0.236/trunk@125345 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 00:21:09 +00:00
rbs%maths.uq.edu.au
21c0ccc330 Attempt to fix Mac bustage
git-svn-id: svn://10.0.0.236/trunk@125344 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-17 00:09:59 +00:00
glen.beasley%sun.com
24132ce4c9 typecast for AIX build
git-svn-id: svn://10.0.0.236/trunk@125343 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:52:45 +00:00
rbs%maths.uq.edu.au
b074819e6d Whitespace to add a=drivers, b=155703, r=peterv, sr=sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@125342 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:29:54 +00:00
rbs%maths.uq.edu.au
b0b7a20bdb Turn on MathML in the Mac build, b=155703, r=peterv, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@125340 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:25:55 +00:00
rbs%maths.uq.edu.au
178b6c2d5e Implement GetBoundingMetrics() on the Mac. p=schofield@wolfram.com, r=rbs, sr=sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@125338 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:18:37 +00:00
curt%netscape.com
908b8255d4 Disabled functionality for refreshing icons because it was causing unacceptable
side effects.
  (Bug #154708, r=ssu, sr=dveditz, a=asa)


git-svn-id: svn://10.0.0.236/trunk@125336 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:07:24 +00:00
bryner%netscape.com
cab12511d4 Rework the x86 unix + gcc xptcall implementation to speed it up and allow it to work with gcc 3.1 (bug 140412). Patch by drepper@redhat.com, r=shaver, sr=blizzard.
git-svn-id: svn://10.0.0.236/trunk@125335 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 23:05:11 +00:00
bryner%netscape.com
9a806c60fe Implement activate and deactivate events for chimera (bug 157648). r=sfraser.
git-svn-id: svn://10.0.0.236/trunk@125334 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:55:36 +00:00
bryner%netscape.com
e7c2ffe30a Fix cookie chrome registration for embedding (bug 153581). r=pinkerton, sr=bzbarsky, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125333 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:51:52 +00:00
bryner%netscape.com
6ada3edcd7 Implement nsIWidget::HideWindowChrome() for gtk (bug 157371). r=blizzard, sr=jag, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125332 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:49:33 +00:00
jkeiser%netscape.com
701be434fb Make save/restore work for all forms, not just the first (bug 138892), r=rods@netscape.com, sr=attinasi@netscape.com, a=asa
git-svn-id: svn://10.0.0.236/trunk@125331 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:38:51 +00:00
aaronl%netscape.com
d4699db840 Not part of build. Bug 30088 - type ahead find. Fixes it so that you must type backspace to remove a character from the buffer.
git-svn-id: svn://10.0.0.236/trunk@125330 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:30:10 +00:00
jfrancis%netscape.com
50be087f7b fix for Bug 154932: Mozilla will not start on MacOS 8.6 if filesharing is on. Corrected the construction of an FSSpec in nsDirectoryService.cpp
r=ccarlen
sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@125329 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:17:56 +00:00
aaronl%netscape.com
78ee60a834 Not part of build. Bug 30088 - type ahead find. Fixes it so that feature is not activated in isindex or input type=file. Typing / now indicates text only search, a quote now indicates link search. Fixes repeated character so it only cycles through links if the exact repeated characters cannot be found repeated like that in the text/links
git-svn-id: svn://10.0.0.236/trunk@125326 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 22:08:55 +00:00
pschwartau%netscape.com
bd64afa8ab Changing summary text.
git-svn-id: svn://10.0.0.236/trunk@125324 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:35:30 +00:00
nhotta%netscape.com
0c40fcbd93 For mailto URL, convert spec to UTF-8 (from origin charset) if necessary,
bug 141134, r=ducarroz, sr=bienvenu, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125323 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:34:25 +00:00
pschwartau%netscape.com
223e70cbbd Initial add. Regression test for bug 157652.
git-svn-id: svn://10.0.0.236/trunk@125322 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:23:58 +00:00
ducarroz%netscape.com
71d5be248f Fix for bug 143882 (remaining problem). We need to remove internal headers when sending message as attachment. R=varada, SR=bienvenu, A=asa
git-svn-id: svn://10.0.0.236/trunk@125321 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:18:46 +00:00
igor%mir2.org
64213cbcf3 Serialization fixes to correctly restore members and related fields in NativeJavaClass.
git-svn-id: svn://10.0.0.236/trunk@125320 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:17:09 +00:00
igor%mir2.org
8b45eec30f Fixing the bug 157196: custom serialization of ScriptableObject not to save deleted/empty slot.
git-svn-id: svn://10.0.0.236/trunk@125319 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:15:51 +00:00
wtc%netscape.com
76a809a67c Bug 157750: handle the possibility that some certs do not have a label.
git-svn-id: svn://10.0.0.236/trunk@125316 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 21:13:40 +00:00
nhotta%netscape.com
f5796b5f71 Changed charset conversions for clipboard, D&D,
* copy from Mozilla, added fallback to try non system default scripts
* copy to Mozilla, check 'styl' and if available use that script instead of
using the system's default
bug 108029, r=pinkerton, sr=sfraser, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125312 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 19:38:08 +00:00
despotdaemon%netscape.com
1b7caa10dc Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125308 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 18:45:22 +00:00
sfraser%netscape.com
111f6a2e8d Adding files for the Appearance prefs panel, and adding this panel to the static build target.
git-svn-id: svn://10.0.0.236/trunk@125305 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:47:23 +00:00
sfraser%netscape.com
01c46ae9cd Adding the Appearance prefs panel to the list of panels, fixing the prefs panel base class to use UTF-8 for prefs, and adding a changeFont handler on the window's controller that can forward changeFont() messages back to the current prefs pane (used by the Appearance pane).
git-svn-id: svn://10.0.0.236/trunk@125304 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:45:48 +00:00
sfraser%netscape.com
2a055af3f8 More changes for the fonts prefs panel.
git-svn-id: svn://10.0.0.236/trunk@125303 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:43:43 +00:00
igor%mir2.org
0b2c94950a Checking for 1.2 version in toString for objects and arrays is replaced by calling cx.hasFeature(Context.FEATURE_TO_STRING_AS_SOURCE) to allow to control toString from applications without switching on other JS 1.2 features.
git-svn-id: svn://10.0.0.236/trunk@125302 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:42:18 +00:00
igor%mir2.org
f3367c89e9 I removed startString/getString and their support code as TokenStream uses its own buffer and fixed the bug 151337 which was cause by incorrect getLine
git-svn-id: svn://10.0.0.236/trunk@125301 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 17:37:46 +00:00
relyea%netscape.com
48c6b9c1ce Automatically recover from database corruptions when importing new certs.
git-svn-id: svn://10.0.0.236/trunk@125299 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 16:44:22 +00:00
ian%hixie.ch
4dcb11a39f Some minor code fixups with no semantic change. Also, fixed the getArgumentsAsString method to not screw up the output when there are empty arrays in the arguments hash (as can happen when you call createArgument, which happens when getArgument is called and the argument is missing) and when the arguments hash contains scalars.
git-svn-id: svn://10.0.0.236/trunk@125298 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 15:50:14 +00:00
peterv%netscape.com
76b49d7465 Temporarily disable the code that caused the slowdown in Txul, Tp and Ts. Bug 156452.
git-svn-id: svn://10.0.0.236/trunk@125297 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 15:46:39 +00:00
ian%hixie.ch
690d2c0bef Add support for a command which does nothing but pass its argument to the output system. This is especially useful for templates that want to show other templates without actually doing anything else, and so the command is called 'showTemplate'.
git-svn-id: svn://10.0.0.236/trunk@125296 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 15:46:28 +00:00
dbaron%fas.harvard.edu
f9da4499fa Work around crashes at ChildIterator::get using bounds check on ChildIterator::seek. sr=waterson r=kin a=asa b=133219
git-svn-id: svn://10.0.0.236/trunk@125295 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 14:53:43 +00:00
sicking%bigfoot.com
7ef44d6e76 Add same-origin checks in a few DOM methods. Patch by me and jst.
b=156452, r=jst/me, sr=bz, a=pending


git-svn-id: svn://10.0.0.236/trunk@125294 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 13:09:15 +00:00
axel%pike.org
3495eca2d7 remove security checks from buster, it's chrome:// now. Not part of build
git-svn-id: svn://10.0.0.236/trunk@125293 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 11:58:26 +00:00
locka%iol.ie
4bd8981445 Move appstrings.properties into new docshell/resources dir. b=156988 r=brade@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125292 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 11:54:44 +00:00
kairo%kairo.at
7d69abde8e reorder/split strings in language/content pref panel to better remind users of restarting, bug 137324, r=axel@pike.org, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@125291 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 09:38:42 +00:00
despotdaemon%netscape.com
4b278d819a Pseudo-automatic update of changes made by bugreport@peshkin.net.
git-svn-id: svn://10.0.0.236/trunk@125275 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 03:26:59 +00:00
dveditz%netscape.com
f2f1b42a6b Correct preference escaping for bug 143459, r=bnesse,mstoltz sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@125273 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 02:09:34 +00:00
kyle.yuan%sun.com
98c1392734 Sorry, my previous checkin is not the final one. Fixed!
git-svn-id: svn://10.0.0.236/trunk@125272 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 01:45:38 +00:00
jkeiser%netscape.com
d0f3fe54a4 Make form.submit() work in onSubmit in standards mode (bug 155453), r=bzbarsky@mit.edu, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@125270 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 01:43:21 +00:00
sdagley%netscape.com
23ed5d660d Fix #143543 - Work around Nav Services 1.0 flaw so Save File dialogs works on Mac OS 8.6. r/sr=sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@125269 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 01:39:39 +00:00
kyle.yuan%sun.com
ac37835845 Bug 154929 Wrong behavior when dragging splitter in mail thread pane
r=varga, sr=bryner, a=asa
omitted hidden columns when dragging


git-svn-id: svn://10.0.0.236/trunk@125268 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 01:23:43 +00:00
jpierre%netscape.com
5a725d3799 Make certutil use the new CERT_VerifyCertificate function when verifying certs
git-svn-id: svn://10.0.0.236/trunk@125265 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 00:45:50 +00:00
despotdaemon%netscape.com
d3b242d8b6 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125261 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-16 00:03:14 +00:00
dougt%netscape.com
44e616bb84 Fixing bug 157192. r=me, sr=dbaron, a=asa.
git-svn-id: svn://10.0.0.236/trunk@125259 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:32:36 +00:00
despotdaemon%netscape.com
be927b60f1 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125258 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:31:05 +00:00
despotdaemon%netscape.com
b72e38951c Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125257 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:21:01 +00:00
pschwartau%netscape.com
be4875d3c7 Initial add. Regression test for bug 58274.
git-svn-id: svn://10.0.0.236/trunk@125256 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:20:15 +00:00
pschwartau%netscape.com
4c78026770 Initial add. Testing identifiers with double-byte names; see bug 58274.
git-svn-id: svn://10.0.0.236/trunk@125254 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:15:52 +00:00
nhotta%netscape.com
ead545266a Changed to return a result code for conversions so the caller can try fallback,
also changed convert from Unicode to try keyscript in addition to the system default,
bug 108029, r=pinkerton, sr=sfraser, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125253 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 23:01:17 +00:00
nhotta%netscape.com
29ca846b8b Adding new files for utitily functions to convert between native script and Unicode,
bug 108029, r=pinkerton, sr=sfraser, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125251 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:57:35 +00:00
nicolson%netscape.com
202ab4d6e1 fix 157622: cleanup javadoc warnings.
Have the build system automatically copy overview-summary.html over
index.html so we get a frame-free version.


git-svn-id: svn://10.0.0.236/trunk@125249 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:52:58 +00:00
jst%netscape.com
4a5f28b71e Checking in alexey@ihug.com.au's fix for bug 144040. Make sure the enabled column in about:plugins contains correct information. r=peterl@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@125248 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:50:49 +00:00
nicolson%netscape.com
8c3d311cb9 Fix 157622: cleanup javadoc warnings.
These changes should only affect documentation. There should be no
functional effect of the changes.


git-svn-id: svn://10.0.0.236/trunk@125247 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:48:06 +00:00
mjudge%netscape.com
2210006d15 r=akkana sr=sfrasier 125146 a=asa This patch will make the embedding API's a better friend to all. It eliminates the use of multibyte strings in command names and also allows for simple command to not require the nsICommandParams interface to be filled.
git-svn-id: svn://10.0.0.236/trunk@125242 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 22:04:13 +00:00
cltbld%netscape.com
c05cd73c0a updating for mozilla1.1b, kysmith checking in as cltbld, sr=leaf, bugzilla 157557
git-svn-id: svn://10.0.0.236/trunk@125241 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 21:40:28 +00:00
cltbld%netscape.com
1c29191311 updating for mozilla1.1b, sr=leaf, kysmith checking in as cltbld, bugzilla 157557
git-svn-id: svn://10.0.0.236/trunk@125238 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 21:13:59 +00:00
shrutiv%netscape.com
fe40cb95cb updating images
git-svn-id: svn://10.0.0.236/trunk@125237 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 21:00:59 +00:00
pavlov%netscape.com
6998788589 checking in fix for bug 155222 r=pavlov sr=tor@acm.org
git-svn-id: svn://10.0.0.236/trunk@125235 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 20:17:09 +00:00
axel%pike.org
b5574b2a89 chromeing XSLT QA app buster, not removing security checks yet, though. Plus, adding stats and test display by peterv. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@125234 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 19:51:27 +00:00
sicking%bigfoot.com
f0e2529596 Add sameorigin checks to treewalker
b=156452, r=mstoltz, sr=jst, a=chofmann


git-svn-id: svn://10.0.0.236/trunk@125233 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 19:25:27 +00:00
sfraser%netscape.com
48ac123446 Add implementation of the Fonts pref panel, and add the contents of the .nib file
git-svn-id: svn://10.0.0.236/trunk@125232 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 19:14:08 +00:00
locka%iol.ie
1c9690aa38 Ensure load error pages don't end up in the session history. b=157004 r=radha sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/trunk@125231 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 19:10:13 +00:00
igor%mir2.org
55ae98c99d I changed TokenStream to use internal buffer in place of LineBuffer#startString/getString to store currently read characters for identifiers, strings and numbers. For the price of yet another character coping it allows to simplify code logic especially regarding interaction with LineBuffer.
I also fixed http://bugzilla.mozilla.org/show_bug.cgi?id=157509


git-svn-id: svn://10.0.0.236/trunk@125229 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 18:49:42 +00:00
depstein%netscape.com
7d4747a04e new string handling for webProg notification flags.
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@125228 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 18:25:47 +00:00
mostafah%oeone.com
5a20737e37 Checking in patch for bug 132231 ( leaving out changes to description/categories/locations/url ): No support for International characters
git-svn-id: svn://10.0.0.236/trunk@125226 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 17:31:40 +00:00
pschwartau%netscape.com
d896129cde Correcting two sections of test.
git-svn-id: svn://10.0.0.236/trunk@125225 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 17:28:05 +00:00
pschwartau%netscape.com
5fb9b41f57 Expanding a comment for one section in greater detail.
git-svn-id: svn://10.0.0.236/trunk@125224 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 17:04:38 +00:00
mostafah%oeone.com
55dbf25c70 Checked in patch for bug 156495: VCALENDAR objects of TODO items don't have 'version' and 'prodid' properties.
git-svn-id: svn://10.0.0.236/trunk@125220 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 16:20:29 +00:00
pschwartau%netscape.com
4bb036ffe0 Initial add. Regression test for bug 157509.
git-svn-id: svn://10.0.0.236/trunk@125219 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 15:22:35 +00:00
karnaze%netscape.com
3ce2c0f149 new regression tests not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@125218 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 15:18:28 +00:00
pschwartau%netscape.com
e2aaf6643f Comment edit.
git-svn-id: svn://10.0.0.236/trunk@125217 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 15:07:33 +00:00
pschwartau%netscape.com
cd52e68590 Added revision date + comment clean-up.
git-svn-id: svn://10.0.0.236/trunk@125216 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 15:06:37 +00:00
karnaze%netscape.com
ed50f0e383 bug 154741 - use macros instead of NS_FRAME_COMPLETE, a=asa, sr=kin, r=alexsavulov.
git-svn-id: svn://10.0.0.236/trunk@125215 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 14:46:01 +00:00
kaie%netscape.com
a87d01f430 b=153232 Add better error message for -8182
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125211 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 13:39:13 +00:00
kaie%netscape.com
55bf8b4f06 b=151250 False warning posting to https site from http site.
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125210 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 13:37:22 +00:00
kaie%netscape.com
7c8854f3d0 b=114893 Can't send encrypted mail if encryption cert has not been imported. Smartcard issue.
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/trunk@125209 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 13:35:30 +00:00
rods%netscape.com
09fb40aa17 Forgot to initialize the arg to false, and th js code needs to finsih PP in the catch if an error is passed back.
Bug 157129 r=carlen sr=waterson a=asa


git-svn-id: svn://10.0.0.236/trunk@125207 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 11:44:42 +00:00
pete.zha%sun.com
ea278357db Implementation of nsIAccessibleValue
bug=150606 r=kyle.yuan@sun.com sr=jag patch=gilbert.fang@sun.com


git-svn-id: svn://10.0.0.236/trunk@125194 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 02:23:23 +00:00
pschwartau%netscape.com
aa9222e54c Correcting an error in the test. See bug 155291.
git-svn-id: svn://10.0.0.236/trunk@125193 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 00:40:14 +00:00
pschwartau%netscape.com
2aa4367266 Correcting errors in test. See bug 155289.
git-svn-id: svn://10.0.0.236/trunk@125192 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 00:29:37 +00:00
pschwartau%netscape.com
05b930589a Correcting errors in the test. See bug 155289.
git-svn-id: svn://10.0.0.236/trunk@125191 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-15 00:04:22 +00:00
pschwartau%netscape.com
5a05ebc498 Correcting errors in the test. See bug 155289.
git-svn-id: svn://10.0.0.236/trunk@125190 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 23:57:03 +00:00
pschwartau%netscape.com
970893aaaf Correcting an error in one section of the test. See bug 155285.
git-svn-id: svn://10.0.0.236/trunk@125189 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 23:42:23 +00:00
pschwartau%netscape.com
e7e5a1677a Rhino has also decided to conform with SpiderMonkey on this test. Adding early return for Rhino as well.
git-svn-id: svn://10.0.0.236/trunk@125187 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 22:34:50 +00:00
pschwartau%netscape.com
3dd30e325a Rhino has also decided to conform with SpiderMonkey on this test. Removing early return for Rhino.
git-svn-id: svn://10.0.0.236/trunk@125186 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 22:23:52 +00:00
jshin%mailaps.org
a1c1e34624 bug 133216 - make multibyte decoder more robust for invalid octet sequence.
r=yokoyama, sr=alecf, a=asa


git-svn-id: svn://10.0.0.236/trunk@125182 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 10:45:54 +00:00
jshin%mailaps.org
a2468389cc bug 135850 - Make Korean JOHAB encoder (Compatibility Jamo part) aligned with
Adobe CMap and XFree86 font encoding file for JOHAB.
r=yokoyama,sr=alecf,a=asa


git-svn-id: svn://10.0.0.236/trunk@125181 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 10:28:48 +00:00
sfraser%netscape.com
eb22c6a272 Adding Appearance pref pane files to project.
git-svn-id: svn://10.0.0.236/trunk@125170 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 02:15:14 +00:00
sfraser%netscape.com
d37a90f0b3 Changing the Navigation prefs pane to use the common base class. Also changed the wording of the 'load tabs in background' checkbox to indicate that this pref affects new windows too.
git-svn-id: svn://10.0.0.236/trunk@125169 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 02:13:13 +00:00
sfraser%netscape.com
ff6fec4d67 New files for Appearance pref pane. The tiff is temporary.
git-svn-id: svn://10.0.0.236/trunk@125168 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 02:11:32 +00:00
sfraser%netscape.com
42dc561f4c New base class for Preference Pane implementations, provides methods for getting and setting mozilla prefs.
git-svn-id: svn://10.0.0.236/trunk@125167 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 02:10:30 +00:00
bryner%netscape.com
069dbfb68c Fix full-page plugins on static builds by registering the docloader factory via nsIComponentRegistrar::RegisterFactory, so we don't have to depend on there being a plugin shared library in the components directory. r=peterl, sr=shaver, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@125164 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-14 00:39:35 +00:00
bryner%netscape.com
0941d2ecdb On second thought, only allocate the extra space when determining the element size; still paint the indicator at its "real" size. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@125160 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 23:27:16 +00:00
bryner%netscape.com
92c533513a Put a hardcoded min size of 14px on checkbox and radio button indicators, since many themes have indicators that are larger than the default 10px indicator_size, but don't bother setting the property. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@125156 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 22:05:38 +00:00
locka%iol.ie
fc56222620 Support client specific manifests. b=154878 r=chak@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125151 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 15:09:26 +00:00
locka%iol.ie
dd99f9e5bc Support client specific manifests. b=154878 r=chak@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125150 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 14:41:45 +00:00
caillon%returnzero.com
bfa2307cf1 Bug 157083. Smart Browsing Advanced window is sized too small when no checkboxes checked.
r=bzbarsky sr=blake a=asa


git-svn-id: svn://10.0.0.236/trunk@125149 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 11:30:09 +00:00
mstoltz%netscape.com
436a8b02f7 bug 125725, part 2 - pass nsIURIs instead of char* URL specs into nsCookies.
That way, we won't try to get or set cookies on protocols that don't support host.
r=morse, sr=dveditz, a=asa


git-svn-id: svn://10.0.0.236/trunk@125142 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 03:45:05 +00:00
relyea%netscape.com
9dc2692721 Fix solaris signed/unsigned warnings.
On updating nicknames, create a nickname record if one doesn't exist (that is
somehow the database got corrupted).


git-svn-id: svn://10.0.0.236/trunk@125140 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 02:45:04 +00:00
ccarlen%netscape.com
8fe2ca829c Fixing bustage on planetoid.
git-svn-id: svn://10.0.0.236/trunk@125139 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 01:07:57 +00:00
waldemar%netscape.com
b2fd32511a Obsolete
git-svn-id: svn://10.0.0.236/trunk@125137 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 00:52:10 +00:00
despotdaemon%netscape.com
f80ad3f50f Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@125136 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 00:26:25 +00:00
ccarlen%netscape.com
96a6b4aa46 Bug 154883 - Use session printing APIs on Mac OSX. r=pinkerton/sr=sfraser/a=asa
git-svn-id: svn://10.0.0.236/trunk@125133 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 00:18:46 +00:00
ccarlen%netscape.com
71ffff784e Adding new files for bug 154883 - using session printing APIs on OSX. r=pinkerton/sr=sfraser/a=asa
git-svn-id: svn://10.0.0.236/trunk@125132 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-13 00:08:42 +00:00
shrutiv%netscape.com
7e2893cc71 Fix for bug 155468: Installation of c11n build crash due to incorrect
attributes for Viewpoint (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@125131 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 23:48:13 +00:00
cltbld%netscape.com
3f1b90e393 Adding default, blank string for BuildNameExtra. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125129 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 22:45:41 +00:00
brade%netscape.com
3b0fc8bc5c bug 156918; cleanup QI usage and fix some recent regressions (r=Neil, Akkana, sr=Simon)
git-svn-id: svn://10.0.0.236/trunk@125128 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 22:28:30 +00:00
brade%netscape.com
0dde44ee8b fix typo (r=akkana, sr=sfraser)
git-svn-id: svn://10.0.0.236/trunk@125127 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 22:24:39 +00:00
leaf%mozilla.org
c8844accd0 Automated update
git-svn-id: svn://10.0.0.236/trunk@125126 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:40:22 +00:00
dmose%netscape.com
e8c3820f63 Add a configure option and hack for Linux x86 to make existing plugin binaries (eg flash, real, ...) work with gcc 3.1 builds (bug 154206). r=bryner@netscape.com, serge@netscape.com; sr=blizzard@mozilla.org; a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@125125 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:30:31 +00:00
rginda%netscape.com
175c89a2ea bug 155838, "Infinite loop caused by strange code", r=peterv, sr=brendan, a=roc+moz@cs.cmu.edu
don't leave gDeadScripts pointing at garbage.  May or may not fix the problem at hand, but is an improvement in either case.


git-svn-id: svn://10.0.0.236/trunk@125124 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:28:29 +00:00
shannond%netscape.com
a7311a64c7 Bug 147978 - The copy of an existing config should use its own Workspace
r=mitchf@netscape.com
This checkin to take into account if the administrator changed the path in the original configuration.


git-svn-id: svn://10.0.0.236/trunk@125123 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:27:34 +00:00
radha%netscape.com
8f44bb451e Fix for bug # 124245. javascript onload redirect breaks back button. r= rpotts sr=alecf, a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@125122 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:15:51 +00:00
rbs%maths.uq.edu.au
7934fc0bf6 Align the bar of the radical on pixel boundaries to get a nicer & uniform spacing on stacked radicals, b=130282, r=roc+moz, sr=waterson, a=asa
git-svn-id: svn://10.0.0.236/trunk@125121 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:14:32 +00:00
nicolson%netscape.com
7a797251db put back the assertion check.
git-svn-id: svn://10.0.0.236/trunk@125119 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:12:22 +00:00
dougt%netscape.com
368181a95d nscore.h has unreachable MSVC #defines (mutually exclusive nested #if), r=dbaron sr=scc a=superfly asa
git-svn-id: svn://10.0.0.236/trunk@125118 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:08:56 +00:00
nicolson%netscape.com
0f1ab3ab0c Fix misspelled exception name.
git-svn-id: svn://10.0.0.236/trunk@125117 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:08:22 +00:00
nicolson%netscape.com
ad1a1e4c9c add default constructor
git-svn-id: svn://10.0.0.236/trunk@125116 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:07:40 +00:00
bzbarsky%mit.edu
050d8e8c55 Add some more Ethiopic list styles. Bug 154503, patch by yacob@geez.org
(Daniel Yacob), r=dbaron, rs=brendan, a=asa


git-svn-id: svn://10.0.0.236/trunk@125114 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 20:46:19 +00:00
nicolson%netscape.com
e8aaf9ad36 This test isn't working yet, but I may get it working at some point.
git-svn-id: svn://10.0.0.236/trunk@125113 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 20:33:39 +00:00
alecf%netscape.com
9abc7e5dc6 bug 156736 - reorganize basebrowser-* to make it easier for embeddors to pick & choose components
r=adamlock, sr=dveditz, a=asa


git-svn-id: svn://10.0.0.236/trunk@125112 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 20:33:12 +00:00
mkaply%us.ibm.com
1e8274b9b8 #67913
r=pedemont, sr=blizzard (platform specific code)
OS/2 only = 800x600 reports the workarea size incorrectly, so explictly use the height of warpcenter


git-svn-id: svn://10.0.0.236/trunk@125109 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 20:01:59 +00:00
igor%mir2.org
7368ef0536 Call to InterpretedFunction.construct is inlined to avoid argument array allocation.
git-svn-id: svn://10.0.0.236/trunk@125106 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:40:49 +00:00
igor%mir2.org
c95dcd43e0 Creation and initialization of new object in BaseFunction.construct is moved to a separated function createObject to simplify inlining of InterpretedFunction.construct in Interpreter
git-svn-id: svn://10.0.0.236/trunk@125105 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:39:57 +00:00
mikep%oeone.com
c9f6793cd8 Fixing bug 137513 for mouse wheel scrolling, and also fixing display time for alarms in alarm dialog (problme with repeating events.)
git-svn-id: svn://10.0.0.236/trunk@125104 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:39:37 +00:00
igor%mir2.org
63fd7c33bc Added ObjToIntMap.intern()
git-svn-id: svn://10.0.0.236/trunk@125103 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:37:20 +00:00
dmose%netscape.com
87d338aa27 Fix OSF/1 build bustage (bug 144280). Patch from shanmu@netscape.com; r=dmose@netscape.com, sr=bienvenu@netscape.com, a=roc+moz@cs.cmu.edu
git-svn-id: svn://10.0.0.236/trunk@125102 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:29:52 +00:00
alecf%netscape.com
2f59581288 bug 66759 - finally remove XPCOM_STANDALONE completely
r=dougt, rs=brendan, a=asa


git-svn-id: svn://10.0.0.236/trunk@125100 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 19:14:35 +00:00
dsirnapalli%netscape.com
5d8fa23aad Updated the test case.
git-svn-id: svn://10.0.0.236/trunk@125098 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 18:38:20 +00:00
mikep%oeone.com
38a5767562 Fixing bug 137513, problem with mouse scrolling after switching to week and day views.
git-svn-id: svn://10.0.0.236/trunk@125097 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 18:33:23 +00:00
naving%netscape.com
f44a2d8138 156368 patch by t.bugz@lament.cjb.net r=naving sr=bienvenu a=roc+moz fixing quicksearch fails if focus was in threadpane before search box
git-svn-id: svn://10.0.0.236/trunk@125093 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 17:57:02 +00:00
pinkerton%netscape.com
f1c996ad85 Replace the standard gecko 'image placeholder' with a more aqua-one from ugo
git-svn-id: svn://10.0.0.236/trunk@125092 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 15:22:28 +00:00
kaie%netscape.com
f8b44ebc4e b=135214 tentative fix for "signed icon in 3-pane isn't going away"
r=dbaron sr=mscott


git-svn-id: svn://10.0.0.236/trunk@125091 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 11:53:34 +00:00
rods%netscape.com
44a86dac88 changed all the DEVMODE allocating and freeing to native Windows calls HeapAlloc and HeapFree
nsPrintSettingsWin.cpp was creating and copying only the non-platform specific data by using the
"sizeof" of the DEVMODE struct, instead of checking the struct size with dmSize
and the size of the private (device-specific) data with dmDriverExtra. Now it
creates the correct size of memory and copies all the non-private data and private data.
Bug 156318 r=dcone sr=kin,waterson,rpotts a=asa


git-svn-id: svn://10.0.0.236/trunk@125089 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 11:48:38 +00:00
rods%netscape.com
e37e3dadbd Minor comment change
Bug 99619 r=kmcclusk sr=sspitzer a=jud adt=paw


git-svn-id: svn://10.0.0.236/trunk@125088 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 11:34:52 +00:00
aaronl%netscape.com
b992a26c12 Not part of build. Typeaheadfind: clean up emacsish/repeated character logic
git-svn-id: svn://10.0.0.236/trunk@125083 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 08:10:13 +00:00
aaronl%netscape.com
b8c854e6a8 Not part of build. Typeaheadfind (bug 30088): Prefer an exact match, if it exists, when the same character is repeated. Should make the emacs folks happy
git-svn-id: svn://10.0.0.236/trunk@125082 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 07:41:22 +00:00
aaronl%netscape.com
74eef6bba9 Not part of build. Fix for crash in typeaheadfind (bug 30088)
git-svn-id: svn://10.0.0.236/trunk@125081 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 07:23:09 +00:00
brendan%mozilla.org
90ad3b5df3 Emulate IE6 by making RegExp.prototype match the empty string (156355, r=rogerl, sr=shaver, a=dbaron).
git-svn-id: svn://10.0.0.236/trunk@125078 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:54:57 +00:00
bbaetz%student.usyd.edu.au
238bee30e8 Bug 155032 - Memory leak of 18 bytes from 1 block allocated in
nsSOCKSSocketInfo::GetProxyHost
r=smeredith, sr=alecf, a=roc+moz


git-svn-id: svn://10.0.0.236/trunk@125077 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:54:09 +00:00
bryner%netscape.com
5a608bcf5e Remove non-functional help menu item, add an Info menu item that goes to the download page.
git-svn-id: svn://10.0.0.236/trunk@125076 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:53:12 +00:00
pete.zha%sun.com
f8753fa9cf "Quote Message" menu item doesn't work on recently trunk. bug=156876 r=ducarroz sr=bienvenu a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@125071 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:33:16 +00:00
nicolson%netscape.com
40b78d68bf Fix 98613: using SSLSocket after close causes crash.
Now the SSLSocket and SSLServerSocket close() methods only call PR_Close()
on the underlying fd. Freeing data structures is postponed until the
Java object is finalized.


git-svn-id: svn://10.0.0.236/trunk@125070 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:26:56 +00:00
nicolson%netscape.com
34f86dd48b clarify error message.
git-svn-id: svn://10.0.0.236/trunk@125069 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 04:09:14 +00:00
cltbld%netscape.com
5e83c9f0ea 154815 fixed, removing hack. -mcafee
git-svn-id: svn://10.0.0.236/trunk@125068 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 03:50:49 +00:00
mozilla.BenB%bucksch.org
67e2928527 same as previous. patch by Tuukka Tolvanen <t.bugz@lament.cjb.net>
git-svn-id: svn://10.0.0.236/trunk@125067 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 03:39:14 +00:00
mozilla.BenB%bucksch.org
2c5eb70b01 156984: Typo (missing "P"). r=rods, sr=kin, a=roc
git-svn-id: svn://10.0.0.236/trunk@125066 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 03:34:17 +00:00
relyea%netscape.com
52ca8acde6 Update the CERTDB_USER bits when our key gets imported through pkcs #12.
git-svn-id: svn://10.0.0.236/trunk@125064 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 03:27:44 +00:00
pete.zha%sun.com
ef2e3f111b mozilla1.1a core dump at PR_AtomicDecrement()
bug=154730 r=bryner sr=jst a=asa patch=antonio.xu@sun.com


git-svn-id: svn://10.0.0.236/trunk@125061 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 02:56:18 +00:00
jpierre%netscape.com
7b06b4f219 Make CERT_VerifyCertificate actually work . Oops.
git-svn-id: svn://10.0.0.236/trunk@125060 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 02:37:49 +00:00
dbaron%fas.harvard.edu
f397c8ab4e Fix crash when we do a ReconstructDocElementHierarchy on a XUL document, which destroys the nsDocElementBoxFrame (which constructs the popupset) but not the nsRootBoxFrame. b=156719 r=waterson sr=ben a=asa
git-svn-id: svn://10.0.0.236/trunk@125058 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 01:46:20 +00:00
bienvenu%netscape.com
051c35befa fix crash shutting down while offline r=dougt, sr=dveditz a=chofmann 156851
git-svn-id: svn://10.0.0.236/trunk@125055 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 01:00:08 +00:00
seawood%netscape.com
39c72e94a1 Create a symlink named "bin" in the dist/mozilla directory and then run pkgcp.pl using dist/mozilla as the srcdir. This will let us avoid accidentally stripping the files in dist/bin.
Thanks to Brian Ryner <bryner@netscape.com> for the patch.
Bug #156983 r=sgehani sr=leaf


git-svn-id: svn://10.0.0.236/trunk@125053 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 00:37:46 +00:00
caillon%returnzero.com
459e27115c New icons for composer and addressbook. Icons by marlon@netscape.com.
Bug 156822. Also see bugscape #16402.
moa=jag, a=asa.


git-svn-id: svn://10.0.0.236/trunk@125051 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 00:19:08 +00:00
dsirnapalli%netscape.com
79ae232008 Test Cases to test XUL Elements for Accessibility.
git-svn-id: svn://10.0.0.236/trunk@125049 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 23:33:04 +00:00
jkeiser%netscape.com
8dddb7432c Make mailto form submit work (bug 61893), r=alexsavulov@netscape.com, sr=dveditz@netscape.com, a=asa
git-svn-id: svn://10.0.0.236/trunk@125048 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 23:32:13 +00:00
shrutiv%netscape.com
57bf7291a9 Fix for bugscape bug 17654: Blank OS and Language-Region dropdown menu
using previous existing config files (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@125047 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 23:23:53 +00:00
oeschger%netscape.com
479087e18e added help content for http networking, brought over from ns help, bug=143590
git-svn-id: svn://10.0.0.236/trunk@125046 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 22:58:43 +00:00
edburns%acm.org
9ad9ff18de debug_options
git-svn-id: svn://10.0.0.236/trunk@125045 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 22:19:59 +00:00
edburns%acm.org
d2d0482cb1 debug_options
git-svn-id: svn://10.0.0.236/trunk@125044 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 22:15:46 +00:00
edburns%acm.org
89ce8241d1 debug_options
git-svn-id: svn://10.0.0.236/trunk@125043 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 22:12:10 +00:00
morse%netscape.com
ae7548953e bug 152694, cookies with spaces in the value get mangled, r=law, sr=jag, a=asa
git-svn-id: svn://10.0.0.236/trunk@125042 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 21:58:43 +00:00
24006 changed files with 5848128 additions and 5 deletions

43
mozilla/LEGAL Normal file
View File

@@ -0,0 +1,43 @@
Please be apprised of the following Legal Notices:
A) The U.S. District Court for the Eastern District of Virginia has
ruled that the Netscape Navigator code does not infringe Wang's U.S.
Patent No. 4,751,669 ("the '669 Patent") because: 1) HTML is not
Videotex as defined by the '669 patent; 2) web servers are not central
suppliers; and 3) Navigator does not "connect," as defined by the '669
Patent, to web servers on the Internet. Wang may appeal this decision to
the Federal Circuit. Wang contended that its Patent disclosing a
"Videotext" system, is infringed by the following functionality in the
Netscape Navigator code: 1) the animated logo and status line indicators
--See Claims 1,8 and 9; 2) the "File Save As" function --See Claims
23-27; 3) Bookmarks and Rename Bookmarks in the Properties window --See
Claims 20-22; 4) storing HTML, GIF, and JPEG files and adding filename
extensions --See Claim 38
B) Intermind owns pending U.S. patent applications on communications
systems which employ metadata ("channel objects") to define a control
structure for information transfer. The Netscape code does not infringe
as released; however, modifications which utilize channel objects as
described by Intermind should be considered carefully. The following is
a statement from Intermind: "Intermind's claims fundamentally involve
the use of a control structure to automate communications. ...The
essence of Intermind's top claim is that two devices sender and
receiver have persistent storage, communicate over a network,
and exchange a control structure including metadata which describes: 1)
what information is to be updated, 2) when to update this information,
and 3) how to transfer the updated information. In addition, at least
the receiving device must be able to process the metadata in order to
perform the update determination and transfer. Any digital
communications system which incorporates all of these elements will be
covered by Intermind's patents." See Intermind.com.
C) Stac, Inc., and its licensing agent Hi/fn, own several patents which
disclose data compression methods implementing an LZS compression
algorithm, including U.S. Patent Nos. 4,701,745 and 5,016, 009 ("the
Stac Patents"). The Netscape Communicator code does not perform
compression. If you modify the Netscape source code to perform
compression, please take notice of the Stac Patents.
D) Netscape Communications Corporation ("Netscape") does not guarantee
that any source code or executable code available from the mozilla.org
domain is Year 2000 compliant.

567
mozilla/LICENSE Normal file
View File

@@ -0,0 +1,567 @@
MOZILLA PUBLIC LICENSE
Version 1.1
---------------
1. Definitions.
1.0.1. "Commercial Use" means distribution or otherwise making the
Covered Code available to a third party.
1.1. "Contributor" means each entity that creates or contributes to
the creation of Modifications.
1.2. "Contributor Version" means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. "Covered Code" means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. "Electronic Distribution Mechanism" means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. "Executable" means Covered Code in any form other than Source
Code.
1.6. "Initial Developer" means the individual or entity identified
as the Initial Developer in the Source Code notice required by Exhibit
A.
1.7. "Larger Work" means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. "License" means this document.
1.8.1. "Licensable" means having the right to grant, to the maximum
extent possible, whether at the time of the initial grant or
subsequently acquired, any and all of the rights conveyed herein.
1.9. "Modifications" means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. "Original Code" means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this
License is not already Covered Code governed by this License.
1.10.1. "Patent Claims" means any patent claim(s), now owned or
hereafter acquired, including without limitation, method, process,
and apparatus claims, in any patent Licensable by grantor.
1.11. "Source Code" means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus
any associated interface definition files, scripts used to control
compilation and installation of an Executable, or source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. "You" (or "Your") means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this
License or a future version of this License issued under Section 6.1.
For legal entities, "You" includes any entity which controls, is
controlled by, or is under common control with You. For purposes of
this definition, "control" means (a) the power, direct or indirect,
to cause the direction or management of such entity, whether by
contract or otherwise, or (b) ownership of more than fifty percent
(50%) of the outstanding shares or beneficial ownership of such
entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) under intellectual property rights (other than patent or
trademark) Licensable by Initial Developer to use, reproduce,
modify, display, perform, sublicense and distribute the Original
Code (or portions thereof) with or without Modifications, and/or
as part of a Larger Work; and
(b) under Patents Claims infringed by the making, using or
selling of Original Code, to make, have made, use, practice,
sell, and offer for sale, and/or otherwise dispose of the
Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are
effective on the date Initial Developer first distributes
Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is
granted: 1) for code that You delete from the Original Code; 2)
separate from the Original Code; or 3) for infringements caused
by: i) the modification of the Original Code or ii) the
combination of the Original Code with other software or devices.
2.2. Contributor Grant.
Subject to third party intellectual property claims, each Contributor
hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or
trademark) Licensable by Contributor, to use, reproduce, modify,
display, perform, sublicense and distribute the Modifications
created by such Contributor (or portions thereof) either on an
unmodified basis, with other Modifications, as Covered Code
and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or
selling of Modifications made by that Contributor either alone
and/or in combination with its Contributor Version (or portions
of such combination), to make, use, sell, offer for sale, have
made, and/or otherwise dispose of: 1) Modifications made by that
Contributor (or portions thereof); and 2) the combination of
Modifications made by that Contributor with its Contributor
Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
effective on the date Contributor first makes Commercial Use of
the Covered Code.
(d) Notwithstanding Section 2.2(b) above, no patent license is
granted: 1) for any code that Contributor has deleted from the
Contributor Version; 2) separate from the Contributor Version;
3) for infringements caused by: i) third party modifications of
Contributor Version or ii) the combination of Modifications made
by that Contributor with other software (except as part of the
Contributor Version) or other devices; or 4) under Patent Claims
infringed by Covered Code in the absence of Modifications made by
that Contributor.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be
distributed only under the terms of this License or a future version
of this License released under Section 6.1, and You must include a
copy of this License with every copy of the Source Code You
distribute. You may not offer or impose any terms on any Source Code
version that alters or restricts the applicable version of this
License or the recipients' rights hereunder. However, You may include
an additional document offering the additional rights described in
Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which You contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that
the Modification is derived, directly or indirectly, from Original
Code provided by the Initial Developer and including the name of the
Initial Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If Contributor has knowledge that a license under a third party's
intellectual property rights is required to exercise the rights
granted by such Contributor under Sections 2.1 or 2.2,
Contributor must include a text file with the Source Code
distribution titled "LEGAL" which describes the claim and the
party making the claim in sufficient detail that a recipient will
know whom to contact. If Contributor obtains such knowledge after
the Modification is made available as described in Section 3.2,
Contributor shall promptly modify the LEGAL file in all copies
Contributor makes available thereafter and shall take other steps
(such as notifying appropriate mailing lists or newsgroups)
reasonably calculated to inform those who received the Covered
Code that new knowledge has been obtained.
(b) Contributor APIs.
If Contributor's Modifications include an application programming
interface and Contributor has knowledge of patent licenses which
are reasonably necessary to implement that API, Contributor must
also include this information in the LEGAL file.
(c) Representations.
Contributor represents that, except as disclosed pursuant to
Section 3.4(a) above, Contributor believes that Contributor's
Modifications are Contributor's original creation(s) and/or
Contributor has sufficient rights to grant the rights conveyed by
this License.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code. If it is not possible to put such notice in a particular Source
Code file due to its structure, then You must include such notice in a
location (such as a relevant directory) where a user would be likely
to look for such a notice. If You created one or more Modification(s)
You may add your name as a Contributor to the notice described in
Exhibit A. You must also duplicate this License in any documentation
for the Source Code where You describe recipients' rights or ownership
rights relating to Covered Code. You may choose to offer, and to
charge a fee for, warranty, support, indemnity or liability
obligations to one or more recipients of Covered Code. However, You
may do so only on Your own behalf, and not on behalf of the Initial
Developer or any Contributor. You must make it absolutely clear than
any such warranty, support, indemnity or liability obligation is
offered by You alone, and You hereby agree to indemnify the Initial
Developer and every Contributor for any liability incurred by the
Initial Developer or such Contributor as a result of warranty,
support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of
the Covered Code is available under the terms of this License,
including a description of how and where You have fulfilled the
obligations of Section 3.2. The notice must be conspicuously included
in any notice in an Executable version, related documentation or
collateral in which You describe recipients' rights relating to the
Covered Code. You may distribute the Executable version of Covered
Code or ownership rights under a license of Your choice, which may
contain terms different from this License, provided that You are in
compliance with the terms of this License and that the license for the
Executable version does not attempt to limit or alter the recipient's
rights in the Source Code version from the rights set forth in this
License. If You distribute the Executable version under a different
license You must make it absolutely clear that any terms which differ
from this License are offered by You alone, not by the Initial
Developer or any Contributor. You hereby agree to indemnify the
Initial Developer and every Contributor for any liability incurred by
the Initial Developer or such Contributor as a result of any such
terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description
must be included in the LEGAL file described in Section 3.4 and must
be included with all distributions of the Source Code. Except to the
extent prohibited by statute or regulation, such description must be
sufficiently detailed for a recipient of ordinary skill to be able to
understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation ("Netscape") may publish revised
and/or new versions of the License from time to time. Each version
will be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If You create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), You must (a) rename Your license so that
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
"MPL", "NPL" or any confusingly similar phrase do not appear in your
license (except to note that your license differs from this License)
and (b) otherwise make it clear that Your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial
Developer, Original Code or Contributor in the notice described in
Exhibit A shall not of themselves be deemed to be modifications of
this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1. This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
8.2. If You initiate litigation by asserting a patent infringement
claim (excluding declatory judgment actions) against Initial Developer
or a Contributor (the Initial Developer or Contributor against whom
You file such action is referred to as "Participant") alleging that:
(a) such Participant's Contributor Version directly or indirectly
infringes any patent, then any and all rights granted by such
Participant to You under Sections 2.1 and/or 2.2 of this License
shall, upon 60 days notice from Participant terminate prospectively,
unless if within 60 days after receipt of notice You either: (i)
agree in writing to pay Participant a mutually agreeable reasonable
royalty for Your past and future use of Modifications made by such
Participant, or (ii) withdraw Your litigation claim with respect to
the Contributor Version against such Participant. If within 60 days
of notice, a reasonable royalty and payment arrangement are not
mutually agreed upon in writing by the parties or the litigation claim
is not withdrawn, the rights granted by Participant to You under
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant's
Contributor Version, directly or indirectly infringes any patent, then
any rights granted to You by such Participant under Sections 2.1(b)
and 2.2(b) are revoked effective as of the date You first made, used,
sold, distributed, or had made, Modifications made by that
Participant.
8.3. If You assert a patent infringement claim against Participant
alleging that such Participant's Contributor Version directly or
indirectly infringes any patent where such claim is resolved (such as
by license or settlement) prior to the initiation of patent
infringement litigation, then the reasonable value of the licenses
granted by such Participant under Sections 2.1 or 2.2 shall be taken
into account in determining the amount or value of any payment or
license.
8.4. In the event of termination under Sections 8.1 or 8.2 above,
all end user license agreements (excluding distributors and resellers)
which have been validly granted by You or any distributor hereunder
prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a "commercial item," as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
software" and "commercial computer software documentation," as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if
any, provides otherwise), excluding its conflict-of-law provisions.
With respect to disputes in which at least one party is a citizen of,
or an entity chartered or registered to do business in the United
States of America, any litigation relating to this License shall be
subject to the jurisdiction of the Federal Courts of the Northern
District of California, with venue lying in Santa Clara County,
California, with the losing party responsible for costs, including
without limitation, court costs and reasonable attorneys' fees and
expenses. The application of the United Nations Convention on
Contracts for the International Sale of Goods is expressly excluded.
Any law or regulation which provides that the language of a contract
shall be construed against the drafter shall not apply to this
License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is
responsible for claims and damages arising, directly or indirectly,
out of its utilization of rights under this License and You agree to
work with Initial Developer and Contributors to distribute such
responsibility on an equitable basis. Nothing herein is intended or
shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
Developer permits you to utilize portions of the Covered Code under
Your choice of the NPL or the alternative licenses, if any, specified
by the Initial Developer in the file described in Exhibit A.
EXHIBIT A -Mozilla Public 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 Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the terms
of the _____ license (the "[___] License"), in which case the
provisions of [______] License are applicable instead of those
above. If you wish to allow use of your version of this file only
under the terms of the [____] License and not to allow others to use
your version of this file under the MPL, indicate your decision by
deleting the provisions above and replace them with the notice and
other provisions required by the [___] License. If you do not delete
the provisions above, a recipient may use your version of this file
under either the MPL or the [___] License."
[NOTE: The text of this Exhibit A may differ slightly from the text of
the notices in the Source Code files of the Original Code. You should
use the text of this Exhibit A rather than the text found in the
Original Code Source Code for Your Modifications.]
----------------------------------------------------------------------
AMENDMENTS
The Netscape Public License Version 1.1 ("NPL") consists of the
Mozilla Public License Version 1.1 with the following Amendments,
including Exhibit A-Netscape Public License. Files identified with
"Exhibit A-Netscape Public License" are governed by the Netscape
Public License Version 1.1.
Additional Terms applicable to the Netscape Public License.
I. Effect.
These additional terms described in this Netscape Public
License -- Amendments shall apply to the Mozilla Communicator
client code and to all Covered Code under this License.
II. "Netscape's Branded Code" means Covered Code that Netscape
distributes and/or permits others to distribute under one or more
trademark(s) which are controlled by Netscape but which are not
licensed for use under this License.
III. Netscape and logo.
This License does not grant any rights to use the trademarks
"Netscape", the "Netscape N and horizon" logo or the "Netscape
lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
"Smart Browsing" even if such marks are included in the Original
Code or Modifications.
IV. Inability to Comply Due to Contractual Obligation.
Prior to licensing the Original Code under this License, Netscape
has licensed third party code for use in Netscape's Branded Code.
To the extent that Netscape is limited contractually from making
such third party code available under this License, Netscape may
choose to reintegrate such code into Covered Code without being
required to distribute such code in Source Code form, even if
such code would otherwise be considered "Modifications" under
this License.
V. Use of Modifications and Covered Code by Initial Developer.
V.1. In General.
The obligations of Section 3 apply to Netscape, except to
the extent specified in this Amendment, Section V.2 and V.3.
V.2. Other Products.
Netscape may include Covered Code in products other than the
Netscape's Branded Code which are released by Netscape
during the two (2) years following the release date of the
Original Code, without such additional products becoming
subject to the terms of this License, and may license such
additional products on different terms from those contained
in this License.
V.3. Alternative Licensing.
Netscape may license the Source Code of Netscape's Branded
Code, including Modifications incorporated therein, without
such Netscape Branded Code becoming subject to the terms of
this License, and may license such Netscape Branded Code on
different terms from those contained in this License.
VI. Litigation.
Notwithstanding the limitations of Section 11 above, the
provisions regarding litigation in Section 11(a), (b) and (c) of
the License shall apply to all disputes relating to this License.
EXHIBIT A-Netscape Public License.
"The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the
terms of the _____ license (the "[___] License"), in which case
the provisions of [______] License are applicable instead of
those above. If you wish to allow use of your version of this
file only under the terms of the [____] License and not to allow
others to use your version of this file under the NPL, indicate
your decision by deleting the provisions above and replace them
with the notice and other provisions required by the [___]
License. If you do not delete the provisions above, a recipient
may use your version of this file under either the NPL or the
[___] License."

399
mozilla/Makefile.in Normal file
View File

@@ -0,0 +1,399 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = .
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/build/unix/modules.mk
ifneq ($(BUILD_MODULES),all)
DIRS = $(BUILD_MODULE_DIRS)
EXPORT_DIRS = $(BUILD_MODULE_DEP_DIRS)
else
#
# And now for something completely different...
# Divide the default build into tiers.
# Tiers must be defined on module boundaries
#
default: $(SUBMAKEFILES)
$(MAKE) tier_0
$(MAKE) nspr
$(MAKE) ldap
ifdef MOZ_ENABLE_XFT
$(MAKE) freetype
$(MAKE) expat
endif
$(MAKE) tier_1
$(MAKE) tier_2
$(MAKE) tier_9
ifdef MOZ_EXTENSIONS
$(MAKE) tier_94
endif
ifdef MOZ_PSM
$(MAKE) tier_95
endif
ifdef MOZ_MAIL_NEWS
$(MAKE) tier_97
endif
ifdef MOZ_CALENDAR
$(MAKE) tier_98
endif
$(MAKE) tier_99
# Make sure that the existing rulesets work
DIRS = \
$(tier_0_dirs) \
$(tier_1_dirs) \
$(tier_2_dirs) \
$(tier_9_dirs) \
$(NULL)
ifdef GC_LEAK_DETECTOR
DIRS += gc/boehm
endif
ifdef MOZ_EXTENSIONS
DIRS += $(tier_94_dirs)
endif
ifdef MOZ_PSM
DIRS += $(tier_95_dirs)
endif
ifdef MOZ_MAIL_NEWS
DIRS += $(tier_97_dirs)
endif
ifdef MOZ_CALENDAR
DIRS += $(tier_98_dirs)
endif
DIRS += $(tier_99_dirs)
#
# tier 0 - base build config dirs
#
tier_0_dirs = \
config \
build \
include \
$(NULL)
#
# tier 1 - 3rd party individual libraries
#
tier_1_dirs += dbm
ifndef MOZ_NATIVE_JPEG
tier_1_dirs += jpeg
endif
ifndef MOZ_NATIVE_ZLIB
tier_1_dirs += modules/zlib
endif
# Installer needs standalone libjar, hence standalone zlib
ifdef MOZ_INSTALLER
tier_1_dirs += modules/zlib/standalone
endif
ifdef MOZ_INTERNAL_LIBART_LGPL
tier_1_dirs += other-licenses/libart_lgpl
endif
#
# tier 2 - base libraries
#
tier_2_dirs = js
# MacOSX needs to build lib for MoreFiles before xpcom
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
tier_2_dirs += lib/mac/MoreFiles
endif
tier_2_dirs += \
modules/libreg \
string \
xpcom \
$(NULL)
#
# tier 9 - core components (necko,gecko)
#
tier_9_dirs += \
js/src/xpconnect \
intl \
modules/libjar \
$(NULL)
ifdef MOZ_JAVA_SUPPLEMENT
tier_9_dirs += \
java/util \
java/webclient \
$(NULL)
endif
ifdef MOZ_OJI
tier_9_dirs += js/src/liveconnect
endif
ifdef MOZ_JSDEBUGGER
tier_9_dirs += js/jsd
endif
ifdef MOZ_ENABLE_XFT
tier_9_dirs += other-licenses/Xft
endif
ifdef MOZ_ENABLE_XLIB
tier_9_dirs += gfx/src/xlibrgb widget/src/xlibxtbin
endif
ifdef MOZ_ENABLE_GTK
tier_9_dirs += widget/src/gtksuperwin widget/src/gtkxtbin
endif
tier_9_dirs += \
modules/libutil \
netwerk \
modules/mpfilelocprovider \
uriloader \
modules/libpref \
modules/libimg \
modules/oji \
caps \
rdf \
expat \
htmlparser \
gfx \
gfx2 \
modules/libpr0n \
modules/plugin \
dom \
view \
widget \
content \
layout \
db \
docshell \
webshell \
embedding \
editor \
sun-java \
profile \
themes \
$(NULL)
ifdef ACCESSIBILITY
tier_9_dirs += accessible
endif
ifdef MOZ_LDAP_XPCOM
tier_9_dirs += directory/xpcom
endif
# This must preceed xpfe
ifdef MOZ_JPROF
tier_9_dirs += tools/jprof
endif
tier_9_dirs += xpfe xpinstall
ifdef MOZ_LEAKY
tier_9_dirs += tools/leaky
endif
ifdef NS_TRACE_MALLOC
tier_9_dirs += tools/trace-malloc
endif
tier_9_dirs += l10n
#
# tier 9x - application features
#
ifdef MOZ_EXTENSIONS
tier_94_dirs += extensions
endif
ifdef MOZ_PSM
tier_95_dirs += security/manager
endif
ifdef MOZ_MAIL_NEWS
tier_97_dirs += mailnews
endif
ifdef MOZ_CALENDAR
tier_98_dirs += calendar
endif
#
# tier 99 - application binaries
#
ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
tier_99_dirs += modules/staticmod
endif
tier_99_dirs += xpfe/bootstrap
ifdef MOZ_ENABLE_GTK
tier_99_dirs += embedding/browser/gtk/tests
endif
endif # BUILD_MODULES == all
STATIC_MAKEFILES := nsprpub directory/c-sdk
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 \
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
ifeq ($(BUILD_MODULES),all)
# Build psuedo-external modules first when export is explicitly called
export::
$(MAKE) -C config export
$(MAKE) nspr
$(MAKE) ldap
ifdef MOZ_ENABLE_XFT
$(MAKE) freetype
$(MAKE) expat
endif
install::
ifndef MOZ_NATIVE_NSPR
$(MAKE) -C nsprpub real_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
endif
include $(topsrcdir)/config/rules.mk
ifeq ($(BUILD_MODULES),all)
# Clean up after psuedo-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
endif
tier_%:
@echo "$@: $($@_dirs)"
@$(EXIT_ON_ERROR) \
for d in $($@_dirs); do $(UPDATE_TITLE) \
$(MAKE) -C $$d export; \
done ; \
$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include ;\
for d in $($@_dirs); do $(UPDATE_TITLE) \
$(MAKE) -C $$d libs; \
done
#
# 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
freetype:
ifdef MOZ_ENABLE_XFT
ifndef MOZ_XFT_SYSTEM_FREETYPE2
$(MAKE) -C other-licenses/freetype
$(MAKE) -C other-licenses/freetype install
endif
endif
expat:
ifdef MOZ_ENABLE_XFT
$(MAKE) -C other-licenses/expat
$(MAKE) -C other-licenses/expat install
endif
# For modules.mk standalone build
export::
+$(LOOP_OVER_EXPORT_DIRS)
export::
@$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include
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
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 {} \;
endif # MOZILLA_OFFICIAL
deliver: splitsymbols rebase
endif # WINNT
# Temporary hack for NSS 3.4 landing (bug 116334, wtc@netscape.com)
ifdef MOZ_PSM
ifdef COMPILER_DEPEND
depend::
$(MAKE) -C security/manager depend
endif
endif

325
mozilla/README.txt Normal file
View File

@@ -0,0 +1,325 @@
==============================================================
= = = = = = = = = = 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/nightly/
For the very latest builds, see
ftp://ftp.mozilla.org/pub/mozilla/nightly/latest
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 8.6 or later
-PowerPC 604e 266 MHz or faster processor, or G3/G4
-64 MB RAM
-36 MB of free hard disk space
*Windows
-Windows 9x/Me or Windows NT 4/2000/XP
-Intel Pentium-class 233 MHz (or faster) processor
-64 MB RAM
-26 MB free hard disk space
*Linux
-Red Hat Linux 6.x or 7 with X11 R6
[Note: Mozilla is certified and fully supported on
Red Hat Linux, but will run on other Linux
distributions, such as Debian 2.1 (or later) or
SuSE 6.2 (or later). The libraries glibc 2.1 (or
higher) and libjpeg.so.62 (or higher) are required.]
-Intel Pentium-class 233 MHz (or faster) processor
-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 Installation Instructions
--------------------------------
Note: If the downloaded file does not expand automatically
you must expand the file using a program such as StuffIt
Expander. Expander ships with all new Macs and comes with the
default system install, so you may want to do a find in
Sherlock for "StuffIt" to make sure that you don't already
have it installed.
If you don't have Expander, you can get a copy at the
following Web site:
http://www.aladdinsys.com/expander/expander_mac_login.html
If you do already have Expander, you need to set it to start
by default. See the above URL for info on using Expander.
To install Mozilla by downloading the Mozilla installer,
(recommended) follow these steps:
1. Click the MacMozillaInstaller.sea.bin link on the
site you're downloading Mozilla from to download the
file to your Mac's desktop. A MozillaInstaller
folder is created.
2. Double-click the MozillaInstaller folder in the
Finder.
3. Double-click the Mozilla Installer icon.
4. Follow the on-screen instructions to complete the
installation process.
5. To start Mozilla, open the folder where you
installed Mozilla and double-click the Mozilla icon.
To install Mozilla by downloading the .bin file and
installing manually, follow these steps:
1. Click the mozilla-mac-*.sea.bin link on the site
you're downloading Mozilla from to download the
Mozilla binary to your Mac's desktop.
2. Double-click the mozilla-mac-*.sea.sit.bin icon
on your desktop.
3. Choose the directory where you want to install
Mozilla.
4. To start Mozilla, open the folder where you
installed Mozilla and double-click the Mozilla icon.
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

@@ -0,0 +1,3 @@
For mozilla-the-client build instructions, please read:
http://www.mozilla.org/build/

View File

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

View File

@@ -0,0 +1,190 @@
<html>
<head>
<title>
How the Accessible Module works
</title>
</head>
<body>
<h1>How the Accessible module (accessibility.dll) works</h1>
<ul>
<p>
See also:
<a href="http://www.mozilla.org/projects/ui/accessibility/vendors-win.html">Gecko Info for Windows Accessibility Vendors</a>, a primer for vendors of 3rd party accessibility software, on how to use our MSAA and other relevant API's.
</p>
<p>
The <a href="http://lxr.mozilla.org/seamonkey/source/accessible/">Accessible module</a> is where we implement support for the <a href="http://www.microsoft.com/enable/msaa/">Microsoft Active Accessibility (MSAA) API</a>
(<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=12952">bug 12952</a>).
Support for Sun's <a href="http://www.sun.com/access/gnome/">Gnome Accessibility API</a> is part of our future plans as well.
</p>
</ul>
<h2>What is MSAA?</h2>
<ul>
<p>
A 3rd part accessibility aid, such as a screen reader, wants to track what's happening inside Mozilla. It needs to know about
focus changes and other events, and it needs to know whtat data nodes there are in the layout tree.
Using this information,
the screen reader will speak out loud important changes to the document or UI, and allow the user to track
where they navigate. Some screen readers also magnify text and images in the currently focused area, and others
show information on a <a href="http://www.audiodata.de/e/produkte/pc/lapbraille/">refreshable braille display</a>.
</p>
<p>
In Windows, accesibility aids acquires the necessary information to do this using hacks and MSAA. MSAA is supposed
to be the "right way" for accessibility aids to get information, but sometimes the hacks are more effective.
For example, screen readers look for screen draws of a vertical blinking line, to determine the location of the caret.
Without doing this, screen readers would not be able to let the user know where there caret has moved to in most programs,
because so many applications do not use the system caret (ours is an example). This is so commonly done, that
no one even bothers to support the MSAA caret, because the hack works.
</p>
<p>
MSAA provides information in two different ways:
<ol>
<li>a COM interface (IAccessible) that allows applications to expose the tree of data nodes that make up
each window in the user interface currently being interacted with and</li>
<li> a set of system messages
that confer accessibility-related events such as focus changes, changes to document content and alerts.</li>
</ol>
</p>
<p>
To really learn about MSAA, you need to download
the entire <a href="http://www.microsoft.com/enable/msaa/download.htm">MSAA SDK</a>.
Without downloading the SDK, you won't get the complete documentation.
The SDK also contains some very useful tools, such as the Accessible Event Watcher, which shows what accessible
events are being generated by a given piece of software. The Accessible Explorer and Inspect Object tools
show the tree of data nodes the Accessible object is exposing through COM.
</p>
</ul>
<h2>IAccessible Interface</h2>
<ul>
<p>
The IAccessible interface is used in a tree of IAccessible's, each one representing a data node, similar to a DOM.
</p>
<p>
Here are the methods supported in IAccessible:
<ul>
<li>get_accParent: Get the parent of an IAccessible.</li>
<li>get_accChildCount: Get the number of children of an IAccesible.</li>
<li>get_accChild: Get the child of an Iaccessible.</li>
<li>get_accName: Get the "name" of the IAccessible, for example the name of a button, checkbox or menuitem.</li>
<li>get_accValue: Get the "value" of the IAccessible, for example a number in a slider, a URL for a link, the text a user entered in a field.</li>
<li>get_accDescription: Get a long description of the current IAccessible. This is not really too useful.</li>
<li>get_accRole: Get an enumerated value representing what this IAccessible is used for, for example.</li>
is it a link, static text, editable text, a checkbox, or a table cell, etc.</li>
<li>get_accState: a 32 bit field representing possible on/off states, such as focused, fousable, selected, selectable, visible, protected (for passwords),
checked, etc. </li>
<li>get_accHelp: Get context sensitive help for the IAccessible.</li>
<li>get_accHelpTopic: We don't use this, it's only if the Windows help system is used.</li>
<li>get_accKeyboardShortcut: What is the keyboard shortcut for this IAccessible.</li>
<li>get_accFocus: Which child is focused?</li>
<li>get_accSelection: Which children of this item are selected?</li>
<li>get_accDefaultAction: Get a description or name of the default action for this component, such as "jump" for links.</li>
<li>accSelect: Select the item associated with this IAccessible.</li>
<li>accLocation: Get the x,y coordinates, and the height and width of this IAccessible node.</li>
<li>accNavigate: Navigate up, down, left or right from this IAccessible.</li>
<li>accHitTest: Find out what IAccessible exists and a specific coordinate.</li>
<li>accDoDefaultAction: Perform the action described by get_accDefaultAction.</li>
<li>put_accName: Change the name.</li>
<li>put_accValue: Change the value.</li>
</ul>
</p>
</ul>
<h2>The Basics</h2>
<ul>
<p>
Rather than directly implement IAccessible with an Accessible class, we have chosen to proxy to our own cross-platform interface,
called nsIAccessible, which is more robust. It has the capability of supporting other new accessibility API's such
as Sun's Gnome Accessiblity API. The nsIAccessible interface is implemented by a variety of classes for each of the
various objects in HTML. Each class is tailored to the specific abilities and properties of the HTML objects it applies to.
</p>
<p>
The first thing that happens when an accessibility aid wants to watch our application is calls the Windows API function
AccessibleObjectFromWindow(). This in turns sends the window in question
a <a href="http://lxr.mozilla.org/seamonkey/search?string=WM_GETOBJECT">WM_GETOBJECT</a> message requesting an IAccessible for the window.
In our case, this event is received in mozilla/widget/src/windows/nsWindow.cpp.
We send back an IAccessible interface that represents that root window. The accessibility aid will use
that first IAccessible to reach rest of the IAccessible hierarchy, by asking for it's children IAccessibles, asking the children for the
grandchildren IAccessibles, and so on. Until this WM_GETOBJECT message is processed, the accessibility.dll is not loaded,
so there is almost zero overhead for accessibility in Mozilla.
</p>
</ul>
<h2>How the IAccessible's are Created</h2>
<ul>
<p>
To create the root IAccessible for a window the first time it gets the <a href="http://lxr.mozilla.org/seamonkey/search?string=WM_GETOBJECT">WM_GETOBJECT</a> message in,
nsWindow.cpp first generates an internal event
called <a href="http://lxr.mozilla.org/seamonkey/search?string=NS_GETACCESSIBLE">NS_GETACCESSIBLE</a>,
which is handled in nsFrame.cpp via the creation of an nsRootAccessible implementation of the nsIAccessible interface.
The first IAccessible is then created by instantiating a RootAccessible class. This RootAccessible is also cached by
the nsWindow it's for, so that any additional WM_GETOBJECT messages use the same RootAccessible.
The RootAccessible class used to implement IAccessible here is slightly different from the normal Accessible class
that's used, in that it keeps track of event data.
RootAccessible and Accessible are both implemented
in <a href="http://lxr.mozilla.org/seamonkey/source/widget/source/windows/Accessible.cpp">
mozilla/widget/src/windows/Accessible.cpp</a>).
</P>
</ul>
<h2>The Real Power Behind IAccessible's</h2>
<ul>
<p>The implementations of IAccessible (Accessible and RootAccessible), don't know anything about Mozilla
objects. They merely proxy to our cross platform accessibility classes, which all have an nsIAccessible interface.
</h2>
<p>
The base implementation for nsIAccessible is called nsAccessible. It has default implementations for all the
nsIAccessible methods. It also knows how
to walk Mozilla's content DOM and frame tree, exposing only the objects that are needed for accessibility.
Essentially, nsAccessible knows what it needs to expose by asking each DOM node's primary frame for
an nsIAccessible, using the GetAccessible() method. If it gets one, it's considered an accessible object.
A frame that wishes to return
an nsIAccessible GetAccessible() is called, creates one of the correct type on the fly using
nsIAccessibilityService methods built for that purpose.
</p>
<p>
The specific implementations
of nsIAccessible for each widget or content type inherit from nsAccessible.
Each implementation then overrides those methods
it wishes to implement, and does nothing for those methods it wants the default behavior for.
For example, the default behavior for nsIAccessible::getAccFirstChild is to
instantial a nsDOMTreeWalker, and ask it for the first child. However, nsImageAccessible overrides getAccFirstChild,
returning the first area of an image map if there is one, otherwise nsnull.
</p>
</ul>
<h2>MSAA Events</h2>
<ul>
<p>
When an accessibility-related event occurs within an application such as Mozilla, it must use NotifyWinEvent from
the Win32 API. NotifyWinEvent is passed arguments for the window the event occured in, and the number of the child
within that window. Accessibility aids use the Win32 call SetWinEventHook() to register as a listener for these events.
</p>
<p>
The accessibility aid is choose which events it is interested in learning more about by using the Win32 API call
AccessibleObjectFromEvent, requesting the IAccessible to the node corresponding to the
child number that had been indicated from NotifyWinEvent(). This ends up asking our RootAccessible for the child
IAccessible that matches the window handle and child id we indicated through NotofyWinEvent().
</p>
<p>
In Mozilla, this creates a problem. We cannot
keep track of a child number for every important accessible node in a document. We deal with this by generating fake
child IDs for the most recent accessibile events that we have generated, in a circular array.
</p>
<p>
Since there is a RootAccessible for each top level window that might generate MSAA events, that's where we do the bookkeeping
for these events and their nsIAccessible's. Whenever NotifyWinEvent() is called, a new fake ID is generated (We use
negative numbers for the fake IDs). When the callback comes to request the IAccessible for that child number,
we check the circular array for that ID, and voila, we have the corresponding nsIAccessible to proxy.
</p>
<p>
Every RootAccessible has an nsRootAccessible which is an nsIAccessibleEventReceiver. The RootAccessible
uses this to register itself as an nsIAccessibleEventListener. In the end, nsRootAccessible registers itself as a listener
of Mozilla's internal and DOM events. It's HandleEvent routine translates these events into MSAA events, and passes them along to
with an nsIAccessible to the original RootAccessible::HandleEvent
which turns that nsIAccessible into a NotifyWinEvent call, complete with a fake child ID.
</p>
<p>
Most MSAA events aren't utilized by accessibility aids. Therefore we implement only the handful that matter.
The most important event is the focus event, followed by name, state and value change events.
</p>
</ul>
</body>
</html>

View File

@@ -0,0 +1,68 @@
#
# 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): John Gaunt (jgaunt@netscape.com)
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
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
REQUIRES = \
xpcom \
string \
dom \
$(NULL)
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) \
$(NULL)
ifdef MOZ_XUL
SHARED_LIBRARY_LIBS += $(DIST)/lib/$(LIB_PREFIX)accessibility_xul_s.$(LIB_SUFFIX)
endif
EXTRA_DSO_LIBS = \
gkconshared_s \
gkgfx \
$(NULL)
EXTRA_DSO_LDOPTS = \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,56 @@
#!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): John Gaunt (jgaunt@netscape.com)
DEPTH=..\..
MODULE=accessibility
REQUIRES = \
xpcom \
string \
dom \
$(NULL)
LIBRARY_NAME=accessibility
MODULE_NAME=nsAccessibilityModule
include <$(DEPTH)\config\config.mak>
CPP_OBJS=\
.\$(OBJDIR)\nsAccessibilityFactory.obj \
$(NULL)
LINCS = $(LINCS) -I..\src # for implementation headers
SUB_LIBRARIES=\
$(DIST)\lib\accessibility_base_s.lib \
$(DIST)\lib\accessibility_html_s.lib \
!ifdef MOZ_XUL
$(DIST)\lib\accessibility_xul_s.lib \
!endif
$(NULL)
LLIBS=\
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\gkgfx.lib \
$(DIST)\lib\contentshared_s.lib \
$(LIBNSPR) \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,76 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"
#include "nsIAccessibilityService.h"
#include "nscore.h"
static NS_IMETHODIMP
NS_ConstructAccessibilityService(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
nsresult rv;
NS_ASSERTION(aOuter == nsnull, "no aggregation");
nsIAccessibilityService* accessibility;
rv = NS_NewAccessibilityService(&accessibility);
if (NS_FAILED(rv)) {
NS_ERROR("Unable to construct chrome registry");
return rv;
}
rv = accessibility->QueryInterface(aIID, aResult);
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
NS_RELEASE(accessibility);
return rv;
}
// The list of components we register
static const nsModuleComponentInfo components[] =
{
{ "AccessibilityService",
NS_ACCESSIBILITY_SERVICE_CID,
"@mozilla.org/accessibilityService;1",
NS_ConstructAccessibilityService
},
};
NS_IMPL_NSGETMODULE(nsAccessibilityModule, components);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,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

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

View File

@@ -0,0 +1,48 @@
#!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 \
.\nsIAccessibleAction.idl \
.\nsIAccessibleCaret.idl \
.\nsIAccessibleDocument.idl \
.\nsIAccessibleEditableText.idl \
.\nsIAccessibleEventReceiver.idl \
.\nsIAccessibleEventListener.idl \
.\nsIAccessibleHyperLink.idl \
.\nsIAccessibleHyperText.idl \
.\nsIAccessibleProvider.idl \
.\nsIAccessibleSelectable.idl \
.\nsIAccessibleTable.idl \
.\nsIAccessibleText.idl \
.\nsIAccessibleValue.idl \
.\nsIAccessibleWin32Object.idl \
$(NULL)
EXPORTS = \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,109 @@
/* -*- 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 Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "domstubs.idl"
#include "nsIAtom.idl"
#include "domstubs.idl"
#include "nsIAccessible.idl"
#include "nsIAccessibleCaret.idl"
interface nsIWeakReference;
interface nsIAccessibleEventListener;
[scriptable, uuid(68D9720A-0984-42b6-A3F5-8237ED925727)]
interface nsIAccessibilityService : nsISupports
{
nsIAccessible createAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
nsIAccessible createIFrameAccessible(in nsIDOMNode aNode);
nsIAccessible createRootAccessible(in nsISupports aPresContext, in nsISupports aFrame);
nsIAccessibleCaret createCaretAccessible(in nsIDOMNode aNode, in nsIAccessibleEventListener aListener);
nsIAccessible createHTML4ButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTMLAreaAccessible(in nsIWeakReference aPresShell, in nsIDOMNode aDOMNode, in nsIAccessible aAccParent);
nsIAccessible createHTMLBlockAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
nsIAccessible createHTMLButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTMLButtonAccessibleXBL(in nsIDOMNode aNode);
nsIAccessible createHTMLCheckboxAccessible(in nsISupports aFrame);
nsIAccessible createHTMLCheckboxAccessibleXBL(in nsIDOMNode aNode);
nsIAccessible createHTMLComboboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
nsIAccessible createHTMLGroupboxAccessible(in nsISupports aFrame);
nsIAccessible createHTMLImageAccessible(in nsISupports aFrame);
nsIAccessible createHTMLListboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
nsIAccessible createHTMLNativeWindowAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell, in PRInt32 aHWnd);
nsIAccessible createHTMLPluginAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell);
nsIAccessible createHTMLRadioButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTMLRadioButtonAccessibleXBL(in nsIDOMNode aNode);
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsISupports aPresShell);
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 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 createXULTreeAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTreeColumnsAccessible(in nsIDOMNode aNode);
nsIAccessible createXULTreeColumnitemAccessible(in nsIDOMNode aNode);
nsIAccessible getAccessibleFor(in nsIDOMNode aNode);
};
%{ C++
// for component registration
// {DE401C37-9A7F-4278-A6F8-3DE2833989EF}
#define NS_ACCESSIBILITY_SERVICE_CID \
{ 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } }
extern nsresult
NS_NewAccessibilityService(nsIAccessibilityService** aResult);
%}

View File

@@ -0,0 +1,331 @@
/* -*- 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):
* Aaron Leventhal
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIDOMNode.idl"
#include "domstubs.idl"
[scriptable, uuid(B26FBE47-9A5F-42a1-822B-082461AE4D6D)]
interface nsIAccessible : nsISupports
{
readonly attribute nsIAccessible accParent;
readonly attribute nsIAccessible accNextSibling;
readonly attribute nsIAccessible accPreviousSibling;
readonly attribute nsIAccessible accFirstChild;
readonly attribute nsIAccessible accLastChild;
readonly attribute long accChildCount;
attribute AString accName;
readonly attribute AString accValue;
readonly attribute long accId;
readonly attribute AString accDescription;
readonly attribute AString accKeyboardShortcut;
readonly attribute unsigned long accRole;
readonly attribute unsigned long accState;
readonly attribute unsigned long accExtState;
readonly attribute AString accHelp;
readonly attribute nsIAccessible accFocused;
nsIAccessible accGetAt(in long x, in long y);
nsIAccessible accNavigateRight();
nsIAccessible accNavigateLeft();
nsIAccessible accNavigateUp();
nsIAccessible accNavigateDown();
void accGetBounds(out long x,
out long y,
out long width,
out long height);
void accAddSelection();
void accRemoveSelection();
void accExtendSelection();
void accTakeSelection();
void accTakeFocus();
readonly attribute PRUint8 accNumActions;
AString getAccActionName(in PRUint8 index);
void accDoAction(in PRUint8 index); // Action number 0 is the default action
nsIDOMNode accGetDOMNode();
// Used by Accessible implementation to save data and speed up accessibility tree walking
[noscript] void CacheOptimizations(in nsIAccessible aParent, in PRInt32 aSiblingIndex, in nsIDOMNodeList aSiblingList);
// 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;
const unsigned long STATE_PRESSED = 0x00000008;
const unsigned long STATE_CHECKED = 0x00000010;
const unsigned long STATE_MIXED = 0x00000020; // 3-state checkbox or toolbar button
const unsigned long STATE_READONLY = 0x00000040; // Maps to opposite of Java/Gnome/ATK EDITABLE state
const unsigned long STATE_HOTTRACKED = 0x00000080;
const unsigned long STATE_DEFAULT = 0x00000100;
const unsigned long STATE_EXPANDED = 0x00000200;
const unsigned long STATE_COLLAPSED = 0x00000400;
const unsigned long STATE_BUSY = 0x00000800;
const unsigned long STATE_FLOATING = 0x00001000; // Children "owned" not "contained" by parent
const unsigned long STATE_MARQUEED = 0x00002000;
const unsigned long STATE_ANIMATED = 0x00004000;
const unsigned long STATE_INVISIBLE = 0x00008000;
const unsigned long STATE_OFFSCREEN = 0x00010000;
const unsigned long STATE_SIZEABLE = 0x00020000;
const unsigned long STATE_MOVEABLE = 0x00040000;
const unsigned long STATE_SELFVOICING = 0x00080000;
const unsigned long STATE_FOCUSABLE = 0x00100000;
const unsigned long STATE_SELECTABLE = 0x00200000;
const unsigned long STATE_LINKED = 0x00400000;
const unsigned long STATE_TRAVERSED = 0x00800000;
const unsigned long STATE_MULTISELECTABLE = 0x01000000; // Supports multiple selection
const unsigned long STATE_EXTSELECTABLE = 0x02000000; // Supports extended selection
const unsigned long STATE_ALERT_LOW = 0x04000000; // This information is of low priority
const unsigned long STATE_ALERT_MEDIUM = 0x08000000; // This information is of medium priority
const unsigned long STATE_ALERT_HIGH = 0x10000000; // This information is of high priority
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
// 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
%{C++
#ifdef MOZ_ACCESSIBILITY_ATK
/*******************************************************************************
The following nsIAccessible roles are traslated 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_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 currrent 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 = 22U }; // ATK_ROLE_FRAME
// The object represents a document window, only for MDI windows
enum { ROLE_DOCUMENT = 68U }; // ATK_ROLE_WINDOW
enum { ROLE_PANE = 38U }; // ATK_ROLE_PANEL
enum { ROLE_CHART = 26U }; // ATK_ROLE_IMAGE
enum { ROLE_DIALOG = 16U }; // ATK_ROLE_DIALOG
enum { ROLE_BORDER = 66U }; // ATK_ROLE_UNKNOWN
enum { ROLE_GROUPING = 66U }; // ATK_ROLE_UNKNOWN
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 = 66U }; // ATK_ROLE_UNKNOWN
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 = 0U }; // ATK_ROLE_INVALID
#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_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_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 };
#endif
%}
};

View File

@@ -0,0 +1,51 @@
/* -*- 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: Marc Mulcahy (marc.mulcahy@sun.com)
*
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*/
#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

@@ -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: Aaron Leventhal (aaronl@netscape.com)
*
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
[scriptable, uuid(9124c666-6133-4be6-b3ed-dd0ec35f1e64)]
interface nsIAccessibleCaret : nsISupports
{
void attachNewSelectionListener(in nsIDOMNode aFocusedNode);
void removeSelectionListener();
};

View File

@@ -0,0 +1,42 @@
/* -*- 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: Aaron Leventhal
*
* Contributor(s):
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
#include "domstubs.idl"
#include "nsIAccessibleCaret.idl"
interface nsIDocument;
[scriptable, uuid(8781FC88-355F-4439-881F-6504A0A1CEB6)]
interface nsIAccessibleDocument : nsISupports
{
readonly attribute AString URL;
readonly attribute AString title;
readonly attribute AString mimeType;
readonly attribute AString docType;
AString getNameSpaceURIForID(in short nameSpaceID);
[noscript] nsIDocument getDocument();
readonly attribute nsIAccessibleCaret caretAccessible;
};

View File

@@ -0,0 +1,53 @@
/* -*- 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: Marc Mulcahy (marc.mulcahy@sun.com)
*
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*/
#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

@@ -0,0 +1,99 @@
/* -*- 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"
%{ C++
// extra event data (currently used by ATK)
struct AccessibleEventData {
PRUint32 aUnused;
};
%}
[ptr] native AccessibleEventData(AccessibleEventData);
[scriptable, uuid(BEE49E7D-9D06-49bf-8984-1694C697D74F)]
interface nsIAccessibleEventListener : nsISupports
{
// 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;
[noscript]
void handleEvent(in unsigned long aEvent, in nsIAccessible aTarget, in AccessibleEventData aData);
};

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();
};

View File

@@ -0,0 +1,60 @@
/* -*- 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: Marc Mulcahy (marc.mulcahy@sun.com)
*
* Contributor(s): Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
interface nsIURI;
[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 ();
};
/*
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

@@ -0,0 +1,38 @@
/* -*- 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: Marc Mulcahy (marc.mulcahy@sun.com)
*
* Contributor(s): Bill Haneman (bill.haneman@sun.com)
* Paul Sandoz (paul.sandoz@sun.com)
* John Gaunt (jgaunt@netscape.com)
*/
#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);
};

View File

@@ -0,0 +1,33 @@
/* -*- 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: John Gaunt (jgaunt@netscape.com)
*
* Contributor(s):
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
[scriptable, uuid(3f0e3eb0-1dd2-11b2-9605-be5b8e76cf4b)]
interface nsIAccessibleProvider : nsISupports
{
readonly attribute nsIAccessible accessible;
};

View File

@@ -0,0 +1,76 @@
/* -*- 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: John Gaunt (jgaunt@netscape.com)
*
* Contributor(s):
* John Gaunt
* Marc Mulcahy (marc.mulcahy@sun.com)
* Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* Kyle Yuan (kyle.yuan@sun.com)
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
#include "nsISupportsArray.idl"
[scriptable, uuid(34d268d6-1dd2-11b2-9d63-83a5e0ada290)]
interface nsIAccessibleSelectable : nsISupports
{
nsISupportsArray 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.
*/
void addSelection(in long index);
/**
* Removes the specified child of the object from the object's selection.
*/
void removeSelection(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.
*/
nsIAccessible refSelection(in long index);
/**
* Determines if the current child of this object is selected
*/
boolean isChildSelected(in long index);
/**
* If the object does not accept multiple selection, return false.
*/
boolean selectAllSelection();
};

View File

@@ -0,0 +1,66 @@
/* -*- 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: Marc Mulcahy (marc.mulcahy@sun.com)
*
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
[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

@@ -0,0 +1,131 @@
/* -*- 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: Marc Mulcahy (marc.mulcahy@sun.com)
*
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
* Bill Haneman (bill.haneman@sun.com)
* John Gaunt (jgaunt@netscape.com)
*/
#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);
/**
* 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);
AString getTextBeforeOffset (in long offset,
in nsAccessibleTextBoundary boundaryType,
out long startOffset,
out long endOffset);
void getCharacterExtents (in long offset,
out long x,
out long y,
out long length,
out long width,
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

@@ -0,0 +1,60 @@
/* -*- 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: Marc Mulcahy (marc.mulcahy@sun.com)
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
*/
#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,34 @@
/* -*- 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: John Gaunt (jgaunt@netscape.com)
*
* Contributor(s):
*
*/
#include "nsISupports.idl"
[scriptable, uuid(ca7a3a93-822f-4cdf-8cb4-c52d16b9afc7)]
interface nsIAccessibleWin32Object : nsISupports
{
/** handle to the external window implementing IAccessible */
readonly attribute long hwnd;
};

View File

@@ -0,0 +1,39 @@
#
# 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): John Gaunt (jgaunt@netscape.com)
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
base \
html \
$(null)
ifdef MOZ_XUL
DIRS += xul
endif
include $(topsrcdir)/config/rules.mk

View File

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

View File

@@ -0,0 +1,78 @@
#
# 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): John Gaunt (jgaunt@netscape.com)
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
LIBRARY_NAME = accessibility_base_s
REQUIRES = content \
docshell \
dom \
gfx \
htmlparser \
intl \
layout \
locale \
necko \
plugin \
pref \
string \
uriloader \
view \
webshell \
widget \
xpcom \
xuldoc \
$(NULL)
CPPSRCS = \
nsAccessibilityService.cpp \
nsAccessible.cpp \
nsBaseWidgetAccessible.cpp \
nsFormControlAccessible.cpp \
nsGenericAccessible.cpp \
nsRootAccessible.cpp \
nsCaretAccessible.cpp \
nsSelectAccessible.cpp \
nsTextAccessible.cpp \
$(NULL)
EXPORTS = \
nsRootAccessible.h \
nsAccessibleEventData.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
LOCAL_INCLUDES += \
-I$(srcdir) \
-I$(srcdir)/../html \
-I$(srcdir)/../xul \
-I$(srcdir)/../../../layout/html/base/src \
$(NULL)

View File

@@ -0,0 +1,11 @@
jump = Jump
press = Press
check = Check
uncheck = Uncheck
select = Select
open = Open
close = Close
switch = Switch
click = Click
collapse= Collapse
expand = Expand

View File

@@ -0,0 +1,9 @@
en-win.jar:
locale/en-US/global-platform/accessible.properties
en-unix.jar:
locale/en-US/global-platform/accessible.properties
en-mac.jar:
locale/en-US/global-platform/accessible.properties

View File

@@ -0,0 +1,83 @@
#!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): John Gaunt (jgaunt@netscape.com)
DEPTH = ..\..\..
MODULE = accessibility
LIBRARY_NAME = accessibility_base_s
REQUIRES = \
content \
content_xul \
docshell \
dom \
gfx \
intl \
layout \
layout_xul \
locale \
necko \
plugin \
pref \
string \
uriloader \
view \
webshell \
widget \
xpcom \
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\nsAccessibilityService.obj \
.\$(OBJDIR)\nsAccessible.obj \
.\$(OBJDIR)\nsBaseWidgetAccessible.obj \
.\$(OBJDIR)\nsFormControlAccessible.obj \
.\$(OBJDIR)\nsGenericAccessible.obj \
.\$(OBJDIR)\nsRootAccessible.obj \
.\$(OBJDIR)\nsCaretAccessible.obj \
.\$(OBJDIR)\nsSelectAccessible.obj \
.\$(OBJDIR)\nsTextAccessible.obj \
$(NULL)
EXPORTS = \
.\nsRootAccessible.h \
.\nsAccessibleEventData.h \
$(NULL)
LINCS = \
-I..\html \
-I..\xul \
-I..\..\..\layout\html\forms\public \
-I..\..\..\layout\html\forms\src \
-I..\..\..\layout\html\base\src \
-I..\..\..\widget\src\windows \
$(NULL)
include <$(DEPTH)\config\rules.mak>
libs:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,72 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.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.
*
* Original Author: David W. Hyatt (hyatt@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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsAccessibilityService_h__
#define __nsAccessibilityService_h__
#include "nsIAccessibilityService.h"
#include "nsIContent.h"
#include "nsIPresShell.h"
#include "nsIDocShell.h"
#include "nsObjectFrame.h"
class nsIFrame;
class nsIWeakReference;
class nsIDOMNode;
class nsAccessibilityService : public nsIAccessibilityService
{
public:
nsAccessibilityService();
virtual ~nsAccessibilityService();
NS_DECL_ISUPPORTS
// nsIAccessibilityService methods:
NS_DECL_NSIACCESSIBILITYSERVICE
static nsresult GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **weakShell);
private:
nsresult GetHTMLObjectAccessibleFor(nsIDOMNode *aNode, nsIPresShell *aShell, nsObjectFrame *aFrame, nsIAccessible **_retval);
nsresult GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIWeakReference** aShell, nsIDOMNode** aContent);
void GetOwnerFor(nsIPresShell *aPresShell, nsIPresShell **aOwnerShell, nsIContent **aOwnerContent);
nsIContent* FindContentForDocShell(nsIPresShell* aPresShell, nsIContent* aContent, nsIDocShell* aDocShell);
};
#endif /* __nsIAccessibilityService_h__ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,178 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsAccessible_H_
#define _nsAccessible_H_
#include "nsCOMPtr.h"
#include "nsGenericAccessible.h"
#include "nsIAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIDOMNode.h"
#include "nsIFocusController.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsPoint.h"
#include "nsRect.h"
#include "nsWeakReference.h"
#include "nsIDOMNodeList.h"
#include "nsIBindingManager.h"
#include "nsIStringBundle.h"
#define ACCESSIBLE_BUNDLE_URL "chrome://global-platform/locale/accessible.properties"
#define PLATFORM_KEYS_BUNDLE_URL "chrome://global-platform/locale/platformKeys.properties"
class nsIContent;
class nsIDocShell;
class nsIFrame;
class nsIWebShell;
enum { eSiblingsUninitialized = -1, eSiblingsWalkNormalDOM = -2}; // Used in sibling index field as flags
class nsAccessible : public nsGenericAccessible
{
public:
// to eliminate the confusion of "magic numbers" -- if ( 0 ){ foo; }
enum { eAction_Switch=0, eAction_Jump=0, eAction_Click=0, eAction_Select=0 };
// how many actions
enum { eNo_Action=0, eSingle_Action=1 };
nsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
virtual ~nsAccessible();
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccId(PRInt32 *_retval);
NS_IMETHOD GetAccKeyboardShortcut(nsAString& _retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccFocused(nsIAccessible **_retval);
NS_IMETHOD AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD AccRemoveSelection(void);
NS_IMETHOD AccTakeSelection(void);
NS_IMETHOD AccTakeFocus(void);
NS_IMETHOD AccGetDOMNode(nsIDOMNode **_retval);
protected:
virtual nsIFrame* GetFrame();
virtual nsIFrame* GetBoundsFrame();
virtual void GetBounds(nsRect& aRect, nsIFrame** aRelativeFrame);
virtual void GetPresContext(nsCOMPtr<nsIPresContext>& aContext);
PRBool IsPartiallyVisible();
NS_IMETHOD AppendLabelText(nsIDOMNode *aLabelNode, nsAString& _retval);
NS_IMETHOD AppendLabelFor(nsIContent *aLookNode, const nsAString *aId, nsAString *aLabel);
NS_IMETHOD GetHTMLAccName(nsAString& _retval);
NS_IMETHOD GetXULAccName(nsAString& _retval);
NS_IMETHOD AppendFlatStringFromSubtree(nsIContent *aContent, nsAString *aFlatString);
NS_IMETHOD AppendFlatStringFromContentNode(nsIContent *aContent, nsAString *aFlatString);
NS_IMETHOD AppendStringWithSpaces(nsAString *aFlatString, const nsAString& textEquivalent);
NS_IMETHOD GetFocusedNode(nsIDOMNode **aFocusedNode);
NS_IMETHOD CacheOptimizations(nsIAccessible *aParent, PRInt32 aSiblingIndex, nsIDOMNodeList *aSiblingList);
// helper method to verify frames
static PRBool IsCorrectFrameType(nsIFrame* aFrame, nsIAtom* aAtom);
static nsresult InitStringBundleService();
static nsresult GetFullKeyName(const nsAString& aModifierName, const nsAString& aKeyName, nsAString& aStringOut);
static nsresult GetTranslatedString(const nsAString& aKey, nsAString& aStringOut);
void GetScrollOffset(nsRect *aRect);
void GetScreenOrigin(nsIPresContext *aPresContext, nsIFrame *aFrame, nsRect *aRect);
// Data Members
nsCOMPtr<nsIDOMNode> mDOMNode;
nsCOMPtr<nsIWeakReference> mPresShell;
nsCOMPtr<nsIAccessible> mParent;
nsCOMPtr<nsIDOMNodeList> mSiblingList; // If some of our computed siblings are anonymous content nodes, cache node list
PRInt32 mSiblingIndex; // Cache where we are in list of kids that we got from nsIBindingManager::GetContentList(parentContent)
static PRUint32 gInstanceCount;
static nsIStringBundle *gStringBundle;
static nsIStringBundle *gKeyStringBundle;
};
/** This class is used to walk the DOM tree. It skips
* everything but nodes that either implement nsIAccessible
* or have primary frames that implement "GetAccessible"
*/
struct WalkState {
nsCOMPtr<nsIAccessible> accessible;
nsCOMPtr<nsIDOMNode> domNode;
nsCOMPtr<nsIDOMNodeList> siblingList;
PRInt32 siblingIndex; // Holds a state flag or an index into the siblingList
WalkState *prevState;
};
class nsAccessibleTreeWalker {
public:
nsAccessibleTreeWalker(nsIWeakReference* aShell, nsIDOMNode* aContent,
PRInt32 aCachedSiblingIndex, nsIDOMNodeList *aCachedSiblingList, PRBool mWalkAnonymousContent);
~nsAccessibleTreeWalker();
NS_IMETHOD GetNextSibling();
NS_IMETHOD GetPreviousSibling();
NS_IMETHOD GetParent();
NS_IMETHOD GetFirstChild();
NS_IMETHOD GetLastChild();
PRInt32 GetChildCount();
WalkState mState;
protected:
NS_IMETHOD GetChildBefore(nsIDOMNode* aParent, nsIDOMNode* aChild);
PRBool IsHidden();
PRBool GetAccessible();
NS_IMETHOD GetFullTreeParentNode(nsIDOMNode *aChildNode, nsIDOMNode **aParentNodeOut);
void GetSiblings(nsIDOMNode *aOneOfTheSiblings);
void GetKids(nsIDOMNode *aParent);
void ClearState();
NS_IMETHOD PushState();
NS_IMETHOD PopState();
nsCOMPtr<nsIWeakReference> mPresShell;
nsCOMPtr<nsIAccessibilityService> mAccService;
nsCOMPtr<nsIBindingManager> mBindingManager;
};
#endif

View File

@@ -0,0 +1,93 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kyle Yuan (kyle.yuan@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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsAccessibleEventData_H_
#define _nsAccessibleEventData_H_
#ifdef MOZ_ACCESSIBILITY_ATK
struct AtkStateChange {
PRUint32 state;
PRBool enable;
};
enum AtkProperty {
PROP_0, // gobject convention
PROP_NAME,
PROP_DESCRIPTION,
PROP_PARENT, // ancestry has changed
PROP_VALUE,
PROP_ROLE,
PROP_LAYER,
PROP_MDI_ZORDER,
PROP_TABLE_CAPTION,
PROP_TABLE_COLUMN_DESCRIPTION,
PROP_TABLE_COLUMN_HEADER,
PROP_TABLE_ROW_DESCRIPTION,
PROP_TABLE_ROW_HEADER,
PROP_TABLE_SUMMARY,
PROP_LAST // gobject convention
};
struct AtkPropertyChange {
PRInt32 type; // property type as listed above
void *oldvalue;
void *newvalue;
};
struct AtkChildrenChange {
PRUint32 index; // index of child in parent
nsIAccessible *child;
PRBool add; // true for add, false for delete
};
struct AtkTextChange {
PRUint32 start;
PRUint32 length;
PRBool add; // true for add, false for delete
};
struct AtkTableChange {
PRUint32 index; // the start row/column after which the rows are inserted/deleted.
PRUint32 count; // the number of inserted/deleted rows/columns
};
#endif
#endif

View File

@@ -0,0 +1,438 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 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 "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsCOMPtr.h"
#include "nsGUIEvent.h"
#include "nsIContent.h"
#include "nsIDOMElement.h"
#include "nsIDOMEventReceiver.h"
#include "nsIFrame.h"
#include "nsILink.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
// ------------
// nsBlockAccessible
// ------------
nsBlockAccessible::nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):nsAccessible(aNode, aShell)
{
}
/* nsIAccessible accGetAt (in long x, in long y); */
NS_IMETHODIMP nsBlockAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_retval)
{
// We're going to find the child that contains coordinates (tx,ty)
PRInt32 x,y,w,h;
AccGetBounds(&x,&y,&w,&h); // Get bounds for this accessible
if (tx >= x && tx < x + w && ty >= y && ty < y + h)
{
// It's within this nsIAccessible, let's drill down
nsCOMPtr<nsIAccessible> child;
nsCOMPtr<nsIAccessible> smallestChild;
PRInt32 smallestArea = -1;
nsCOMPtr<nsIAccessible> next;
GetAccFirstChild(getter_AddRefs(child));
PRInt32 cx,cy,cw,ch; // Child bounds
while(child) {
child->AccGetBounds(&cx,&cy,&cw,&ch);
// ok if there are multiple frames the contain the point
// and they overlap then pick the smallest. We need to do this
// for text frames.
// For example, A point that's in block #2 is also in block #1, but we want to return #2:
//
// [[block #1 is long wrapped text that continues to
// another line]] [[here is a shorter block #2]]
if (tx >= cx && tx < cx + cw && ty >= cy && ty < cy + ch)
{
if (smallestArea == -1 || cw*ch < smallestArea) {
smallestArea = cw*ch;
smallestChild = child;
}
}
child->GetAccNextSibling(getter_AddRefs(next));
child = next;
}
if (smallestChild != nsnull)
{
*_retval = smallestChild;
NS_ADDREF(*_retval);
return NS_OK;
}
*_retval = this;
NS_ADDREF(this);
return NS_OK;
}
*_retval = nsnull;
return NS_OK;
}
/**
* nsContainerAccessible
*/
nsContainerAccessible::nsContainerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/** no actions */
NS_IMETHODIMP nsContainerAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eNo_Action;
return NS_OK;
}
/** no actions */
NS_IMETHODIMP nsContainerAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
return NS_OK;
}
/** no actions */
NS_IMETHODIMP nsContainerAccessible::AccDoAction(PRUint8 index)
{
return NS_OK;
}
/** no state -- normal */
NS_IMETHODIMP nsContainerAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = 0;
return NS_OK;
}
/** no value */
NS_IMETHODIMP nsContainerAccessible::GetAccValue(nsAString& _retval)
{
return NS_OK;
}
/** no name*/
NS_IMETHODIMP nsContainerAccessible::GetAccName(nsAString& _retval)
{
return NS_OK;
}
//-------------
// nsLeafFrameAccessible
//-------------
nsLeafAccessible::nsLeafAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsLeafAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsLeafAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsLeafAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
//----------------
// nsLinkableAccessible
//----------------
nsLinkableAccessible::nsLinkableAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell), mIsALinkCached(PR_FALSE), mLinkContent(nsnull), mIsLinkVisited(PR_FALSE)
{
}
NS_IMETHODIMP nsLinkableAccessible::AccTakeFocus()
{
if (IsALink()) {
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
mLinkContent->SetFocus(context);
}
return NS_OK;
}
/* long GetAccState (); */
NS_IMETHODIMP nsLinkableAccessible::GetAccState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_SELECTABLE;
if (IsALink()) {
*_retval |= STATE_LINKED;
if (mIsLinkVisited)
*_retval |= STATE_TRAVERSED;
}
// Get current selection and find out if current node is in it
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame = nsnull;
if (content && NS_SUCCEEDED(shell->GetPrimaryFrameFor(content, &frame)) && frame) {
nsCOMPtr<nsISelectionController> selCon;
frame->GetSelectionController(context,getter_AddRefs(selCon));
if (selCon) {
nsCOMPtr<nsISelection> domSel;
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
if (domSel) {
PRBool isSelected = PR_FALSE, isCollapsed = PR_TRUE;
domSel->ContainsNode(mDOMNode, PR_TRUE, &isSelected);
domSel->GetIsCollapsed(&isCollapsed);
if (isSelected && !isCollapsed)
*_retval |=STATE_SELECTED;
}
}
}
if (IsALink()) {
// Make sure we also include all the states of the parent link, such as focusable, focused, etc.
PRUint32 role;
GetAccRole(&role);
if (role != ROLE_LINK) {
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccParent(getter_AddRefs(parentAccessible));
if (parentAccessible) {
PRUint32 orState = 0;
parentAccessible->GetAccState(&orState);
*_retval |= orState;
}
}
}
return NS_OK;
}
NS_IMETHODIMP nsLinkableAccessible::GetAccValue(nsAString& _retval)
{
if (IsALink()) {
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mLinkContent));
if (elt)
return elt->GetAttribute(NS_LITERAL_STRING("href"), _retval);
}
return NS_ERROR_NOT_IMPLEMENTED;
}
/* PRUint8 getAccNumActions (); */
NS_IMETHODIMP nsLinkableAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/* wstring getAccActionName (in PRUint8 index); */
NS_IMETHODIMP nsLinkableAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
// Action 0 (default action): Jump to link
if (index == eAction_Jump) {
if (IsALink()) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("jump"), _retval);
return NS_OK;
}
return NS_ERROR_NOT_IMPLEMENTED;
}
return NS_ERROR_INVALID_ARG;
}
/* void accDoAction (in PRUint8 index); */
NS_IMETHODIMP nsLinkableAccessible::AccDoAction(PRUint8 index)
{
// Action 0 (default action): Jump to link
if (index == eAction_Jump) {
if (IsALink()) {
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
if (presContext) {
nsMouseEvent linkClickEvent;
linkClickEvent.eventStructType = NS_EVENT;
linkClickEvent.message = NS_MOUSE_LEFT_CLICK;
linkClickEvent.isShift = PR_FALSE;
linkClickEvent.isControl = PR_FALSE;
linkClickEvent.isAlt = PR_FALSE;
linkClickEvent.isMeta = PR_FALSE;
linkClickEvent.clickCount = 0;
linkClickEvent.widget = nsnull;
nsEventStatus eventStatus = nsEventStatus_eIgnore;
mLinkContent->HandleDOMEvent(presContext,
&linkClickEvent,
nsnull,
NS_EVENT_FLAG_INIT,
&eventStatus);
return NS_OK;
}
}
}
return NS_ERROR_INVALID_ARG;
}
PRBool nsLinkableAccessible::IsALink()
{
if (mIsALinkCached) // Cached answer?
return mLinkContent? PR_TRUE: PR_FALSE;
nsCOMPtr<nsIContent> walkUpContent(do_QueryInterface(mDOMNode));
if (walkUpContent) {
nsCOMPtr<nsIContent> tempContent = walkUpContent;
while (walkUpContent) {
nsCOMPtr<nsILink> link(do_QueryInterface(walkUpContent));
if (link) {
mLinkContent = tempContent;
mIsALinkCached = PR_TRUE;
nsLinkState linkState;
link->GetLinkState(linkState);
if (linkState == eLinkState_Visited)
mIsLinkVisited = PR_TRUE;
return PR_TRUE;
}
walkUpContent->GetParent(*getter_AddRefs(tempContent));
walkUpContent = tempContent;
}
}
mIsALinkCached = PR_TRUE; // Cached that there is no link
return PR_FALSE;
}
// ------------
// nsMenuListenerAccessible
// ------------
NS_IMPL_ISUPPORTS_INHERITED1(nsMenuListenerAccessible, nsAccessible, nsIDOMXULListener)
nsMenuListenerAccessible::nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
mRegistered = PR_FALSE;
mOpen = PR_FALSE;
}
nsMenuListenerAccessible::~nsMenuListenerAccessible()
{
if (mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (eventReceiver)
eventReceiver->RemoveEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
}
}
NS_IMETHODIMP nsMenuListenerAccessible::PopupShowing(nsIDOMEvent* aEvent)
{
mOpen = PR_TRUE;
/* TBD send state change event */
return NS_OK;
}
NS_IMETHODIMP nsMenuListenerAccessible::PopupHiding(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
NS_IMETHODIMP nsMenuListenerAccessible::Close(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
void
nsMenuListenerAccessible::SetupMenuListener()
{
// if not already one, register ourselves as a popup listener
if (!mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (!eventReceiver) {
return;
}
nsresult rv = eventReceiver->AddEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
if (NS_FAILED(rv)) {
return;
}
mRegistered = PR_TRUE;
}
}

View File

@@ -0,0 +1,149 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsBaseWidgetAccessible_H_
#define _nsBaseWidgetAccessible_H_
#include "nsAccessible.h"
#include "nsCOMPtr.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIDOMXULListener.h"
/**
* This file contains a number of classes that are used as base
* classes for the different accessibility implementations of
* the HTML and XUL widget sets. --jgaunt
*/
/**
* Special Accessible that knows how to handle hit detection for flowing text
*/
class nsBlockAccessible : public nsAccessible
{
public:
nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval);
};
/**
* Special Accessible that just contains other accessible objects
* no actions, no name, no state, no value
*/
class nsContainerAccessible : public nsAccessible
{
public:
nsContainerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccName(nsAString& _retval);
};
/**
* Leaf version of DOM Accessible -- has no children
*/
class nsLeafAccessible : public nsAccessible
{
public:
nsLeafAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
/**
* A type of accessible for DOM nodes containing an href="" attribute.
* It knows how to report the state of the link ( traveled or not )
* and can activate ( click ) the link programmatically.
*/
class nsLinkableAccessible : public nsAccessible
{
public:
nsLinkableAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD AccTakeFocus();
protected:
PRBool IsALink();
PRBool mIsALinkCached; // -1 = unknown, 0 = not a link, 1 = is a link
nsCOMPtr<nsIContent> mLinkContent;
PRBool mIsLinkVisited;
};
/*
* A base class that can listen to menu events. Its used by selects so the
* button and the window accessibles can change their name and role
* depending on whether the drop down list is dropped down on not
*/
class nsMenuListenerAccessible : public nsAccessible, public nsIDOMXULListener
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsMenuListenerAccessible();
// popup listener
NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent);
NS_IMETHOD PopupShown(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD PopupHiding(nsIDOMEvent* aEvent);
NS_IMETHOD PopupHidden(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Close(nsIDOMEvent* aEvent);
NS_IMETHOD Command(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD Broadcast(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }
virtual void SetupMenuListener();
PRBool mRegistered;
PRBool mOpen;
};
#endif

View File

@@ -0,0 +1,227 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* 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 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 "nsCOMPtr.h"
#include "nsCaretAccessible.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsICaret.h"
#include "nsISelectionController.h"
#include "nsIFrame.h"
#include "nsISelectionPrivate.h"
#include "nsIAccessibleEventListener.h"
#include "nsIViewManager.h"
#include "nsIWidget.h"
#include "nsIPresShell.h"
NS_IMPL_ISUPPORTS_INHERITED2(nsCaretAccessible, nsLeafAccessible, nsIAccessibleCaret, nsISelectionListener)
nsCaretAccessible::nsCaretAccessible(nsIDOMNode* aDocumentNode, nsIWeakReference* aShell, nsIAccessibleEventListener *aListener):
nsLeafAccessible(aDocumentNode, aShell), mVisible(PR_TRUE), mListener(aListener)
{
}
NS_IMETHODIMP nsCaretAccessible::RemoveSelectionListener()
{
nsCOMPtr<nsISelection> prevDomSel(do_QueryReferent(mDomSelectionWeak));
nsCOMPtr<nsISelectionPrivate> selPrivate(do_QueryInterface(prevDomSel));
if (selPrivate) {
mDomSelectionWeak = nsnull;
return selPrivate->RemoveSelectionListener(this);
}
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::AttachNewSelectionListener(nsIDOMNode *aCurrentNode)
{
// When focus moves such that the caret is part of a new frame selection
// this removes the old selection listener and attaches a new one for the current focus
nsCOMPtr<nsIDOMDocument> domDoc;
aCurrentNode->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
if (!doc) // we also should try to QI to document instead (necessary to do when node is a document)
doc = do_QueryInterface(aCurrentNode);
if (!doc)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresShell> presShell;
doc->GetShellAt(0, getter_AddRefs(presShell));
nsCOMPtr<nsIContent> content(do_QueryInterface(aCurrentNode));
if (!content)
doc->GetRootContent(getter_AddRefs(content)); // If node is not content, use root content
if (!presShell || !content)
return NS_ERROR_FAILURE;
nsIFrame *frame = nsnull;
presShell->GetPrimaryFrameFor(content, &frame);
nsCOMPtr<nsIPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
if (!frame || !presContext)
return NS_ERROR_FAILURE;
nsCOMPtr<nsISelectionController> selCon;
frame->GetSelectionController(presContext, getter_AddRefs(selCon));
if (!selCon)
return NS_ERROR_FAILURE;
nsCOMPtr<nsISelection> domSel, prevDomSel(do_QueryReferent(mDomSelectionWeak));
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
if (domSel == prevDomSel)
return NS_OK; // This is already the selection we're listening to
RemoveSelectionListener();
nsCOMPtr<nsISelectionPrivate> selPrivate(do_QueryInterface(domSel));
if (!selPrivate)
return NS_ERROR_FAILURE;
mDomSelectionWeak = do_GetWeakReference(domSel);
return selPrivate->AddSelectionListener(this);
}
NS_IMETHODIMP nsCaretAccessible::NotifySelectionChanged(nsIDOMDocument *aDoc, nsISelection *aSel, short aReason)
{
nsCOMPtr<nsIDocument> doc(do_QueryInterface(aDoc));
if (!doc)
return NS_OK;
nsCOMPtr<nsIPresShell> presShell;
doc->GetShellAt(0, getter_AddRefs(presShell));
nsCOMPtr<nsISelection> domSel(do_QueryReferent(mDomSelectionWeak));
if (!presShell || domSel != aSel)
return NS_OK; // Only listening to selection changes in currently focused frame
nsCOMPtr<nsICaret> caret;
presShell->GetCaret(getter_AddRefs(caret));
if (!caret)
return NS_OK;
nsRect caretRect;
PRBool isCollapsed;
caret->GetCaretCoordinates(nsICaret::eTopLevelWindowCoordinates, domSel, &caretRect, &isCollapsed);
PRBool visible = (caretRect.x >= 0 && caretRect.y >= 0 && caretRect.width >= 0 && caretRect.height >= 0);
if (visible) // Make sure it's visible both by looking at coordinates and visible flag
caret->GetCaretVisible(&visible);
if (visible != mVisible) {
mVisible = visible;
mListener->HandleEvent(mVisible? nsIAccessibleEventListener::EVENT_SHOW: nsIAccessibleEventListener::EVENT_HIDE, this, nsnull);
}
nsCOMPtr<nsIPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
nsCOMPtr<nsIViewManager> viewManager;
presShell->GetViewManager(getter_AddRefs(viewManager));
if (!presContext || !viewManager)
return NS_OK;
nsIView *view = nsnull;
viewManager->GetRootView(view);
if (!view)
return NS_OK;
nsCOMPtr<nsIWidget> widget;
view->GetWidget(*getter_AddRefs(widget));
if (!widget)
return NS_OK;
float t2p;
presContext->GetTwipsToPixels(&t2p);
// Convert to pixels using that scale
caretRect.x = NSTwipsToIntPixels(caretRect.x, t2p);
caretRect.y = NSTwipsToIntPixels(caretRect.y, t2p);
caretRect.width = NSTwipsToIntPixels(caretRect.width, t2p);
caretRect.height = NSTwipsToIntPixels(caretRect.height, t2p);
nsRect caretScreenRect;
widget->WidgetToScreen(caretRect, mCaretRect);
#ifndef MOZ_ACCESSIBILITY_ATK
if (visible)
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_LOCATION_CHANGE, this, nsnull);
#else
if (isCollapsed) {
PRInt32 caretOffset;
domSel->GetFocusOffset(&caretOffset);
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_ATK_TEXT_CARET_MOVE, this, (AccessibleEventData*)&caretOffset);
}
else
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_ATK_TEXT_SELECTION_CHANGE, this, nsnull);
#endif
return NS_OK;
}
/** Return the caret's bounds */
NS_IMETHODIMP nsCaretAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
if (!mVisible)
return NS_ERROR_FAILURE; // When root accessible hasn't yet called SetCaretBounds()
*x = mCaretRect.x;
*y = mCaretRect.y;
*width = mCaretRect.width;
*height = mCaretRect.height;
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_CARET;
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = mVisible? 0: STATE_INVISIBLE;
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}

View File

@@ -0,0 +1,87 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsCaretAccessible_h__
#define __nsCaretAccessible_h__
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsIWeakReference.h"
#include "nsIDOMNode.h"
#include "nsIAccessibleCaret.h"
#include "nsISelectionListener.h"
/*
* This special accessibility class is for the caret, which is really the currently focused selection.
* There is only 1 visible caret per top level window (nsRootAccessible)
* The caret accesible does not exist within the normal accessible tree; it lives in a different world.
* In MSAA, it is retrieved with via the WM_GETOBJECT message with lParam = OBJID_CARET,
* (as opposed to the root accessible tree for a window which is retrieved with OBJID_CLIENT)
* The caret accessible is owned by the nsRootAccessible for the top level window that it's in.
*/
class nsCaretAccessible : public nsLeafAccessible, public nsIAccessibleCaret, public nsISelectionListener
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsCaretAccessible(nsIDOMNode* aDocumentNode, nsIWeakReference* aShell, nsIAccessibleEventListener *aListener);
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
/* ----- nsIAccessibleCaret ------ */
NS_IMETHOD AttachNewSelectionListener(nsIDOMNode *aFocusedNode);
NS_IMETHOD RemoveSelectionListener();
/* ----- nsISelectionListener ---- */
NS_IMETHOD NotifySelectionChanged(nsIDOMDocument *aDoc, nsISelection *aSel, short aReason);
private:
nsRect mCaretRect;
PRBool mVisible;
// mListener is not a com pointer. It's a copy of the listener in the nsRootAccessible owner.
//See nsRootAccessible.h for details of the lifetime if this listener
nsIAccessibleEventListener *mListener;
nsCOMPtr<nsIWeakReference> mDomSelectionWeak;
};
#endif

View File

@@ -0,0 +1,180 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
* 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 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 ***** */
// NOTE: alphabetically ordered
#include "nsFormControlAccessible.h"
#include "nsIDocument.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLLabelElement.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsIDOMXULDocument.h"
#include "nsIDOMXULElement.h"
#include "nsIDOMXULLabelElement.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsReadableUtils.h"
#include "nsString.h"
/**
* nsFormControlAccessible
*/
nsFormControlAccessible::nsFormControlAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/**
* XUL states: focused, unavailable(disabled), focusable, ?protected?
* HTML states: focused, unabailable(disabled), focusable, protected
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccState(PRUint32 *_retval)
{
// Get the focused state from the nsAccessible
nsAccessible::GetAccState(_retval);
PRBool disabled = PR_FALSE;
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMHTMLInputElement> htmlFormElement(do_QueryInterface(mDOMNode, &rv));
if (NS_SUCCEEDED(rv) && htmlFormElement) {
htmlFormElement->GetDisabled(&disabled);
nsAutoString typeString;
htmlFormElement->GetType(typeString);
if (typeString.EqualsIgnoreCase("password"))
*_retval |= STATE_PROTECTED;
}
else {
nsCOMPtr<nsIDOMXULControlElement> xulFormElement(do_QueryInterface(mDOMNode, &rv));
if (NS_SUCCEEDED(rv) && xulFormElement) {
xulFormElement->GetDisabled(&disabled);
/* XXX jgaunt do XUL elements support password fields? */
}
}
if (disabled)
*_retval |= STATE_UNAVAILABLE;
else
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
/**
* Will be called by both HTML and XUL elements, this method
* merely checks who is calling and then calls the appropriate
* protected method for the XUL or HTML element.
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccName(nsAString& _retval)
{
nsCOMPtr<nsIDOMXULElement> xulFormElement(do_QueryInterface(mDOMNode));
if (xulFormElement)
return GetXULAccName(_retval);
else
return GetHTMLAccName(_retval);
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
// ------------
// Radio button
// ------------
nsRadioButtonAccessible::nsRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("select"), _retval);
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_RADIOBUTTON;
return NS_OK;
}

View File

@@ -0,0 +1,77 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric D Vaughan (evaughan@netscape.com)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsFormControlAccessible_H_
#define _nsFormControlAccessible_H_
#include "nsBaseWidgetAccessible.h"
/**
* This supports name and state information for both XUL and HTML
* widgets. Designed to be a base class for the impls of XUL
* and HTML form widget Accessibles
*/
class nsFormControlAccessible : public nsAccessible
{
public:
nsFormControlAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
/**
*
*/
class nsRadioButtonAccessible : public nsFormControlAccessible
{
public:
nsRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
};
#endif

View File

@@ -0,0 +1,254 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric Vaughan (evaughan@netscape.com)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsGenericAccessible.h"
#include "nsCOMPtr.h"
#include "nsIWeakReference.h"
#include "nsReadableUtils.h"
#include "nsIContent.h"
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsGenericAccessible, nsIAccessible)
nsGenericAccessible::nsGenericAccessible()
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
}
nsGenericAccessible::~nsGenericAccessible()
{
/* destructor code */
}
/* nsIAccessible getAccParent (); */
NS_IMETHODIMP nsGenericAccessible::GetAccParent(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccNextSibling (); */
NS_IMETHODIMP nsGenericAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccPreviousSibling (); */
NS_IMETHODIMP nsGenericAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsGenericAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsGenericAccessible::GetAccLastChild(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsGenericAccessible::GetAccChildCount(PRInt32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getAccName (); */
NS_IMETHODIMP nsGenericAccessible::GetAccName(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getAccValue (); */
NS_IMETHODIMP nsGenericAccessible::GetAccValue(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute long accId; */
NS_IMETHODIMP nsGenericAccessible::GetAccId(PRInt32 *aAccId)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setAccName (in DOMString name); */
NS_IMETHODIMP nsGenericAccessible::SetAccName(const nsAString& name)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getAccDescription (); */
NS_IMETHODIMP nsGenericAccessible::GetAccDescription(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getAccKeyboardShortcut (); */
NS_IMETHODIMP nsGenericAccessible::GetAccKeyboardShortcut(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsGenericAccessible::GetAccRole(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getAccState (); */
NS_IMETHODIMP nsGenericAccessible::GetAccState(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* PRUint8 getAccNumActions (); */
NS_IMETHODIMP nsGenericAccessible::GetAccNumActions(PRUint8 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getAccActionName (in PRUint8 index); */
NS_IMETHODIMP nsGenericAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accDoAction (in PRUint8 index); */
NS_IMETHODIMP nsGenericAccessible::AccDoAction(PRUint8 index)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccFocused(); */
NS_IMETHODIMP nsGenericAccessible::GetAccFocused(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getAccHelp (); */
NS_IMETHODIMP nsGenericAccessible::GetAccHelp(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accGetAt (in long x, in long y); */
NS_IMETHODIMP nsGenericAccessible::AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateRight (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateRight(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateLeft (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateLeft(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateUp (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateUp(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accNavigateDown (); */
NS_IMETHODIMP nsGenericAccessible::AccNavigateDown(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accGetBounds (out long x, out long y, out long width, out long height); */
NS_IMETHODIMP nsGenericAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accAddSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccAddSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accRemoveSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccRemoveSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accExtendSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccExtendSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accTakeSelection (); */
NS_IMETHODIMP nsGenericAccessible::AccTakeSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accTakeFocus (); */
NS_IMETHODIMP nsGenericAccessible::AccTakeFocus()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long getAccExtState (); */
NS_IMETHODIMP nsGenericAccessible::GetAccExtState(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsGenericAccessible::AccGetDOMNode(nsIDOMNode **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsGenericAccessible::CacheOptimizations(nsIAccessible *aParent, PRInt32 aSiblingIndex, nsIDOMNodeList *aSiblingList)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -0,0 +1,67 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.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: Eric D Vaughan (evaughan@netscape.com)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsGenericAccessible_H_
#define _nsGenericAccessible_H_
#include "nsISupports.h"
#include "nsIAccessible.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsCOMPtr.h"
#include "nsIWeakReference.h"
/**
* Basic implementation
* supports nothing
*/
class nsGenericAccessible : public nsIAccessible
{
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLE
public:
nsGenericAccessible();
virtual ~nsGenericAccessible();
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,173 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsRootAccessible_H_
#define _nsRootAccessible_H_
#include "nsAccessible.h"
#include "nsIAccessibleEventReceiver.h"
#include "nsIAccessibleEventListener.h"
#include "nsIAccessibleDocument.h"
#include "nsIDOMFormListener.h"
#include "nsIDOMXULListener.h"
#include "nsIDOMFocusListener.h"
#include "nsIDocument.h"
#include "nsIAccessibilityService.h"
#include "nsIWebProgressListener.h"
#include "nsIWeakReference.h"
#include "nsITimer.h"
#include "nsITimerCallback.h"
#include "nsIWebProgress.h"
#include "nsIScrollPositionListener.h"
#include "nsIScrollableView.h"
#include "nsHashtable.h"
const PRInt32 SCROLL_HASH_START_SIZE = 6;
class nsDocAccessibleMixin
{
public:
nsDocAccessibleMixin(nsIDocument *doc);
nsDocAccessibleMixin(nsIWeakReference *aShell);
virtual ~nsDocAccessibleMixin();
NS_DECL_NSIACCESSIBLEDOCUMENT
protected:
NS_IMETHOD GetDocShellFromPS(nsIPresShell* aPresShell, nsIDocShell** aDocShell);
nsCOMPtr<nsIDocument> mDocument;
};
class nsRootAccessible : public nsAccessible,
public nsDocAccessibleMixin,
public nsIAccessibleDocument,
public nsIAccessibleEventReceiver,
public nsIDOMFocusListener,
public nsIDOMFormListener,
public nsIDOMXULListener,
public nsIWebProgressListener,
public nsITimerCallback,
public nsIScrollPositionListener,
public nsSupportsWeakReference
{
NS_DECL_ISUPPORTS_INHERITED
public:
enum EBusyState {eBusyStateUninitialized, eBusyStateLoading, eBusyStateDone};
nsRootAccessible(nsIWeakReference* aShell);
virtual ~nsRootAccessible();
/* attribute wstring accName; */
NS_IMETHOD GetAccName(nsAString& aAccName);
NS_IMETHOD GetAccValue(nsAString& aAccValue);
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccState(PRUint32 *aAccState);
// ----- nsIAccessibleEventReceiver -------------------
NS_IMETHOD AddAccessibleEventListener(nsIAccessibleEventListener *aListener);
NS_IMETHOD RemoveAccessibleEventListener();
// ----- nsIDOMEventListener --------------------------
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
// ----- nsIDOMFocusListener --------------------------
NS_IMETHOD Focus(nsIDOMEvent* aEvent);
NS_IMETHOD Blur(nsIDOMEvent* aEvent);
// ----- nsIDOMFormListener ---------------------------
NS_IMETHOD Submit(nsIDOMEvent* aEvent);
NS_IMETHOD Reset(nsIDOMEvent* aEvent);
NS_IMETHOD Change(nsIDOMEvent* aEvent);
NS_IMETHOD Select(nsIDOMEvent* aEvent);
NS_IMETHOD Input(nsIDOMEvent* aEvent);
NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent);
NS_IMETHOD PopupShown(nsIDOMEvent* aEvent);
NS_IMETHOD PopupHiding(nsIDOMEvent* aEvent);
NS_IMETHOD PopupHidden(nsIDOMEvent* aEvent);
NS_IMETHOD Close(nsIDOMEvent* aEvent);
NS_IMETHOD Command(nsIDOMEvent* aEvent);
NS_IMETHOD Broadcast(nsIDOMEvent* aEvent);
NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent);
// ----- nsIScrollPositionListener ---------------------------
NS_IMETHOD ScrollPositionWillChange(nsIScrollableView *aView, nscoord aX, nscoord aY);
NS_IMETHOD ScrollPositionDidChange(nsIScrollableView *aView, nscoord aX, nscoord aY);
// ----- nsITimerCallback ------------------------------------
NS_IMETHOD_(void) Notify(nsITimer *timer);
NS_DECL_NSIACCESSIBLEDOCUMENT
NS_DECL_NSIWEBPROGRESSLISTENER
protected:
NS_IMETHOD GetTargetNode(nsIDOMEvent *aEvent, nsCOMPtr<nsIDOMNode>& aTargetNode);
virtual void GetBounds(nsRect& aRect, nsIFrame** aRelativeFrame);
virtual nsIFrame* GetFrame();
void FireAccessibleFocusEvent(nsIAccessible *focusAccessible, nsIDOMNode *focusNode);
void StartDocReadyTimer();
void AddScrollListener(nsIPresShell *aPresShell);
void RemoveScrollListener(nsIPresShell *aPresShell);
friend PRBool PR_CALLBACK RemoveScrollListenerEnum(nsHashKey *aKey, void *aData, void* aClosure);
static PRUint32 gInstanceCount;
// mListener is not a com pointer. We don't own the listener
// it is the callers responsibility to remove the listener
// otherwise we will get into circular referencing problems
// We don't need a weak reference, because we're owned by this listener
nsIAccessibleEventListener *mListener;
static nsIDOMNode * gLastFocusedNode; // we do our own refcounting for this
nsCOMPtr<nsITimer> mTimer;
nsCOMPtr<nsIWebProgress> mWebProgress;
nsCOMPtr<nsIAccessibilityService> mAccService;
EBusyState mBusy;
// Used for tracking scroll events
PRUint32 mScrollPositionChangedTicks;
nsSupportsHashtable *mScrollablePresShells;
nsCOMPtr<nsIWeakReference> mLastScrolledPresShell;
nsCOMPtr<nsIAccessibleCaret> mCaretAccessible;
};
#endif

View File

@@ -0,0 +1,545 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
* Contributor(s): 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 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 "nsCOMPtr.h"
#include "nsFormControlAccessible.h"
#include "nsIAtom.h"
#include "nsIComboboxControlFrame.h"
#include "nsIDOMHTMLOptGroupElement.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIDOMText.h"
#include "nsIDOMXULMultSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsIFrame.h"
#include "nsIListControlFrame.h"
#include "nsISelectControlFrame.h"
#include "nsIServiceManager.h"
#include "nsLayoutAtoms.h"
#include "nsRootAccessible.h"
#include "nsSelectAccessible.h"
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/** Constructor -- cache our parent */
nsSelectListAccessible::nsSelectListAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell)
:nsAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/** Return our parents bounds */
NS_IMETHODIMP nsSelectListAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
return mParent->AccGetBounds(x,y,width,height);
}
/** Return our cached parent */
NS_IMETHODIMP nsSelectListAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_ADDREF(*_retval);
return NS_OK;
}
/** We are a list */
NS_IMETHODIMP nsSelectListAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
}
/** We are an only child */
NS_IMETHODIMP nsSelectListAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/** We are an only child */
NS_IMETHODIMP nsSelectListAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* nsSelectOptionAccessible
*/
/** Constructor -- cache our parent */
nsSelectOptionAccessible::nsSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsLeafAccessible(aDOMNode, aShell)
{
if (aParent)
mParent = aParent;
else {
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
nsCOMPtr<nsIDOMNode> parentNode, parentNode1;
nsCOMPtr<nsIAccessible> parentAccessible, lastChildAcc;
aDOMNode->GetParentNode(getter_AddRefs(parentNode));
if (parentNode) {
// this parent could be a Combobox or a ListBox. Each has a different
// was to get to the ListElement.
nsCOMPtr<nsIDOMHTMLOptGroupElement> optGroupElement(do_QueryInterface(parentNode));
if (optGroupElement) {
parentNode->GetParentNode(getter_AddRefs(parentNode1));
parentNode = parentNode1;
}
accService->GetAccessibleFor(parentNode, getter_AddRefs(parentAccessible));
PRUint32 role;
do {
parentAccessible->GetAccLastChild(getter_AddRefs(lastChildAcc));
if (lastChildAcc)
lastChildAcc->GetAccRole(&role);
parentAccessible = lastChildAcc;
} while (role != nsIAccessible::ROLE_LIST && lastChildAcc);
}
mParent = parentAccessible;
}
}
/** We are a ListItem */
NS_IMETHODIMP nsSelectOptionAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LISTITEM;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsSelectOptionAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* Get our Name from our Content's subtree
*/
NS_IMETHODIMP nsSelectOptionAccessible::GetAccName(nsAString& _retval)
{
// CASE #1 -- great majority of the cases
// find the label attribute - this is what the W3C says we should use
nsCOMPtr<nsIDOMElement> domElement(do_QueryInterface(mDOMNode));
NS_ASSERTION(domElement, "No domElement for accessible DOM node!");
nsresult rv = domElement->GetAttribute(NS_LITERAL_STRING("label"), _retval) ;
if (NS_SUCCEEDED(rv) && !_retval.IsEmpty() ) {
return NS_OK;
}
// CASE #2 -- no label parameter, get the first child,
// use it if it is a text node
nsCOMPtr<nsIDOMNode> child;
mDOMNode->GetFirstChild(getter_AddRefs(child));
if (child) {
nsCOMPtr<nsIDOMText> text (do_QueryInterface(child));
if (text) {
nsCOMPtr<nsIContent> content (do_QueryInterface(child));
if (!content) {
return NS_ERROR_FAILURE;
}
nsAutoString txtValue;
rv = AppendFlatStringFromContentNode(content, &txtValue);
if (NS_SUCCEEDED(rv)) {
// Temp var (txtValue) needed until CompressWhitespace built for nsAString
txtValue.CompressWhitespace();
_retval.Assign(txtValue);
return NS_OK;
}
}
}
return NS_ERROR_FAILURE;
}
/** ----- nsComboboxTextFieldAccessible ----- */
/** Constructor */
nsComboboxTextFieldAccessible::nsComboboxTextFieldAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsLeafAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/**
* Currently gets the text from the first option, needs to check for selection
* and then return that text.
* Walks the Frame tree and checks for proper frames.
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccValue(nsAString& _retval)
{
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!frame || !context)
return NS_ERROR_FAILURE;
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return NS_ERROR_FAILURE;
#endif
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::textFrame))
return NS_ERROR_FAILURE;
#endif
nsCOMPtr<nsIContent> content;
frame->GetContent(getter_AddRefs(content));
if (!content)
return NS_ERROR_FAILURE;
AppendFlatStringFromSubtree(content, &_retval);
return NS_OK;
}
/**
* Gets the bounds for the BlockFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsComboboxTextFieldAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our first child's frame
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!frame || !context)
return;
frame->FirstChild(context, nsnull, aBoundingFrame);
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return;
#endif
frame->GetRect(aBounds);
}
/** Return our cached parent */
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* We are the first child of our parent, no previous sibling
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* Our role is currently only static text, but we should be able to have
* editable text here and we need to check that case.
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_STATICTEXT;
return NS_OK;
}
/**
* As a nsComboboxTextFieldAccessible we can have the following states:
* STATE_READONLY
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsComboboxTextFieldAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/** -----ComboboxButtonAccessible ----- */
/** Constructor -- cache our parent */
nsComboboxButtonAccessible::nsComboboxButtonAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsLeafAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/** Just one action ( click ). */
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/**
* Gets the bounds for the gfxButtonControlFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsComboboxButtonAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our second child's frame
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!context)
return;
*aBoundingFrame = frame; // bounding frame is the ComboboxControlFrame
frame->FirstChild(context, nsnull, &frame); // first frame is for the textfield
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return;
#endif
frame->GetNextSibling(&frame); // sibling frame is for the button
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::gfxButtonControlFrame))
return;
#endif
frame->GetRect(aBounds);
}
/** We are a button. */
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* Gets the name from GetAccActionName()
*/
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccName(nsAString& _retval)
{
return GetAccActionName(eAction_Click, _retval);
}
/**
* Our action name is the reverse of our state:
* if we are closed -> open is our name.
* if we are open -> closed is our name.
* Uses the frame to get the state, updated on every click
*/
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
nsIComboboxControlFrame* comboFrame;
boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
if (!comboFrame)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (isOpen)
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("close"), _retval);
else
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("open"), _retval);
return NS_OK;
}
/**
* As a nsComboboxButtonAccessible we can have the following states:
* STATE_PRESSED
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsComboboxButtonAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
// we are open or closed --> pressed or not
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
nsIComboboxControlFrame* comboFrame;
boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
if (!comboFrame)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (isOpen)
*_retval |= STATE_PRESSED;
*_retval |= STATE_FOCUSABLE;
return NS_OK;
}
/** ----- nsComboboxWindowAccessible ----- */
/**
* Constructor -- cache our parent
*/
nsComboboxWindowAccessible::nsComboboxWindowAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
mParent = aParent;
}
/**
* As a nsComboboxWindowAccessible we can have the following states:
* STATE_FOCUSED
* STATE_FOCUSABLE
* STATE_INVISIBLE
* STATE_FLOATING
*/
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
// we are open or closed
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
nsIComboboxControlFrame* comboFrame = nsnull;
boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
if (!comboFrame)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (! isOpen)
*_retval |= STATE_INVISIBLE;
*_retval |= STATE_FOCUSABLE | STATE_FLOATING;
return NS_OK;
}
/** We are a window */
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_WINDOW;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
/**
* We are the last sibling of our parent.
*/
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* We only have one child, a list
*/
NS_IMETHODIMP nsComboboxWindowAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 1;
return NS_OK;
}
/**
* Gets the bounds for the areaFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsComboboxWindowAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our first option
nsCOMPtr<nsIDOMNode> child;
mDOMNode->GetFirstChild(getter_AddRefs(child));
// now get its frame
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
*aBoundingFrame = nsnull;
return;
}
nsIFrame* frame = nsnull;
nsCOMPtr<nsIContent> content(do_QueryInterface(child));
shell->GetPrimaryFrameFor(content, &frame);
if (!frame) {
*aBoundingFrame = nsnull;
return;
}
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return;
#endif
frame->GetParent(aBoundingFrame);
frame->GetParent(&frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::areaFrame))
return;
#endif
frame->GetRect(aBounds);
}

View File

@@ -0,0 +1,174 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@netscape.com)
* Contributor(s): 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsSelectAccessible_h__
#define __nsSelectAccessible_h__
#include "nsBaseWidgetAccessible.h"
#include "nsIAccessibleSelectable.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMXULListener.h"
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
enum { eSelection_Add=0, eSelection_Remove=1, eSelection_GetState=2 };
/**
* The list that contains all the options in the select.
*/
class nsSelectListAccessible : public nsAccessible
{
public:
nsSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsSelectListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* Options inside the select, contained within the list
*/
class nsSelectOptionAccessible : public nsLeafAccessible
{
public:
nsSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsSelectOptionAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* A class the represents the text field in the Combobox to the left
* of the drop down button
*/
class nsComboboxTextFieldAccessible : public nsLeafAccessible
{
public:
nsComboboxTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxTextFieldAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* A class that represents the button inside the Select to the
* right of the text field
*/
class nsComboboxButtonAccessible : public nsLeafAccessible
{
public:
nsComboboxButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxButtonAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/**
* A class that represents the window that lives to the right
* of the drop down button inside the Select. This is the window
* that is made visible when the button is pressed.
*/
class nsComboboxWindowAccessible : public nsAccessible
{
public:
nsComboboxWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxWindowAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
#endif

View File

@@ -0,0 +1,488 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com)
* Aaron Leventhal (aaronl@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 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 ***** */
// NOTE: alphabetically ordered
#include "nsContentCID.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMRange.h"
#include "nsIFrame.h"
#include "nsITextContent.h"
#include "nsTextAccessible.h"
#include "nsTextFragment.h"
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
NS_IMPL_ISUPPORTS1(nsAccessibleText, nsIAccessibleText)
nsAccessibleText::nsAccessibleText()
{
NS_INIT_ISUPPORTS();
}
nsAccessibleText::~nsAccessibleText()
{
}
void nsAccessibleText::SetTextNode(nsIDOMNode *aNode)
{
mTextNode = aNode;
}
/**
* nsIAccessibleText impl.
*/
nsresult nsAccessibleText::GetSelections(nsISelectionController **aSelCon, nsISelection **aDomSel)
{
nsCOMPtr<nsIDOMDocument> domDoc;
mTextNode->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
if (!doc)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresShell> shell;
doc->GetShellAt(0, getter_AddRefs(shell));
if (!shell)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsIContent> content(do_QueryInterface(mTextNode));
nsIFrame *frame = nsnull;
if (content && NS_SUCCEEDED(shell->GetPrimaryFrameFor(content, &frame)) && frame) {
frame->GetSelectionController(context, aSelCon);
if (*aSelCon)
(*aSelCon)->GetSelection(nsISelectionController::SELECTION_NORMAL, aDomSel);
}
if (*aSelCon && *aDomSel)
return NS_OK;
return NS_ERROR_FAILURE;
}
/*
Gets the specified text.
aBoundaryType means:
ATK_TEXT_BOUNDARY_CHAR
The character before/at/after the offset is returned.
ATK_TEXT_BOUNDARY_WORD_START
The returned string is from the word start before/at/after the offset to the next word start.
ATK_TEXT_BOUNDARY_WORD_END
The returned string is from the word end before/at/after the offset to the next work end.
ATK_TEXT_BOUNDARY_SENTENCE_START
The returned string is from the sentence start before/at/after the offset to the next sentence start.
ATK_TEXT_BOUNDARY_SENTENCE_END
The returned string is from the sentence end before/at/after the offset to the next sentence end.
ATK_TEXT_BOUNDARY_LINE_START
The returned string is from the line start before/at/after the offset to the next line start.
ATK_TEXT_BOUNDARY_LINE_END
The returned string is from the line end before/at/after the offset to the next line start.
*/
nsresult nsAccessibleText::GetTextHelper(EGetTextType aType, nsAccessibleTextBoundary aBoundaryType,
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval)
{
nsCOMPtr<nsISelectionController> selCon;
nsCOMPtr<nsISelection> domSel;
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMRange> range(do_CreateInstance(kRangeCID));
if (!range)
return NS_ERROR_OUT_OF_MEMORY;
*aStartOffset = *aEndOffset = aOffset;
// Move caret position to offset
range->SetStart(mTextNode, aOffset);
range->SetEnd(mTextNode, aOffset);
domSel->RemoveAllRanges();
domSel->AddRange(range);
// Step1: move caret to an appropriate start position
// Step2: move caret to end postion and select the text
PRBool isStep1Forward, isStep2Forward; // Moving directions for two steps
switch (aType)
{
case eGetBefore:
isStep1Forward = PR_FALSE;
isStep2Forward = PR_FALSE;
break;
case eGetAt:
isStep1Forward = PR_FALSE;
isStep2Forward = PR_TRUE;
break;
case eGetAfter:
isStep1Forward = PR_TRUE;
isStep2Forward = PR_TRUE;
break;
default:
return NS_ERROR_INVALID_ARG;
}
switch (aBoundaryType)
{
case BOUNDARY_CHAR:
if (aType == eGetAfter) { // We need the character next to current position
selCon->CharacterMove(isStep1Forward, PR_FALSE);
domSel->GetFocusOffset(aStartOffset);
}
selCon->CharacterMove(isStep2Forward, PR_TRUE);
domSel->GetFocusOffset(aEndOffset);
break;
case BOUNDARY_WORD_START:
selCon->WordMove(isStep1Forward, PR_FALSE); // Move caret to previous/next word start boundary
domSel->GetFocusOffset(aStartOffset);
selCon->WordMove(isStep2Forward, PR_TRUE); // Select previous/next word
domSel->GetFocusOffset(aEndOffset);
break;
case BOUNDARY_LINE_START:
if (aType != eGetAt) { // We need adjust the caret position to previous/next line
selCon->LineMove(isStep1Forward, PR_TRUE);
domSel->GetFocusOffset(aEndOffset);
}
selCon->IntraLineMove(PR_FALSE, PR_FALSE); // Move caret to the line start
domSel->GetFocusOffset(aStartOffset);
selCon->IntraLineMove(PR_TRUE, PR_TRUE); // Move caret to the line end and select the whole line
domSel->GetFocusOffset(aEndOffset);
break;
case BOUNDARY_WORD_END:
case BOUNDARY_LINE_END:
case BOUNDARY_SENTENCE_START:
case BOUNDARY_SENTENCE_END:
case BOUNDARY_ATTRIBUTE_RANGE:
return NS_ERROR_NOT_IMPLEMENTED;
default:
return NS_ERROR_INVALID_ARG;
}
nsXPIDLString text;
// Get text from selection
domSel->ToString(getter_Copies(text));
domSel->RemoveAllRanges();
_retval = text;
// Ensure aStartOffset <= aEndOffset
if (*aStartOffset > *aEndOffset) {
PRInt32 tmp = *aStartOffset;
*aStartOffset = *aEndOffset;
*aEndOffset = tmp;
}
return NS_OK;
}
/*
* Gets the offset position of the caret (cursor).
*/
NS_IMETHODIMP nsAccessibleText::GetCaretOffset(PRInt32 *aCaretOffset)
{
nsCOMPtr<nsISelectionController> selCon;
nsCOMPtr<nsISelection> domSel;
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
return NS_ERROR_FAILURE;
return domSel->GetFocusOffset(aCaretOffset);
}
/*
* Sets the caret (cursor) position to the specified offset.
*/
NS_IMETHODIMP nsAccessibleText::SetCaretOffset(PRInt32 aCaretOffset)
{
nsCOMPtr<nsISelectionController> selCon;
nsCOMPtr<nsISelection> domSel;
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMRange> range(do_CreateInstance(kRangeCID));
if (! range)
return NS_ERROR_OUT_OF_MEMORY;
range->SetStart(mTextNode, aCaretOffset);
range->SetEnd(mTextNode, aCaretOffset);
return domSel->AddRange(range);
}
/*
* Gets the character count.
*/
NS_IMETHODIMP nsAccessibleText::GetCharacterCount(PRInt32 *aCharacterCount)
{
nsCOMPtr<nsITextContent> textContent(do_QueryInterface(mTextNode));
if (!textContent)
return NS_ERROR_FAILURE;
return textContent->GetTextLength(aCharacterCount);
}
/*
* Gets the number of selected regions.
*/
NS_IMETHODIMP nsAccessibleText::GetSelectionCount(PRInt32 *aSelectionCount)
{
nsCOMPtr<nsISelectionController> selCon;
nsCOMPtr<nsISelection> domSel;
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
return NS_ERROR_FAILURE;
return domSel->GetRangeCount(aSelectionCount);
}
/*
* Gets the specified text.
*/
NS_IMETHODIMP nsAccessibleText::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString & _retval)
{
nsAutoString text;
mTextNode->GetNodeValue(text);
_retval = Substring(text, aStartOffset, aEndOffset - aStartOffset);
return NS_OK;
}
NS_IMETHODIMP nsAccessibleText::GetTextBeforeOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval)
{
return GetTextHelper(eGetBefore, aBoundaryType, aOffset, aStartOffset, aEndOffset, _retval);
}
NS_IMETHODIMP nsAccessibleText::GetTextAtOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval)
{
return GetTextHelper(eGetAt, aBoundaryType, aOffset, aStartOffset, aEndOffset, _retval);
}
NS_IMETHODIMP nsAccessibleText::GetTextAfterOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval)
{
return GetTextHelper(eGetAfter, aBoundaryType, aOffset, aStartOffset, aEndOffset, _retval);
}
/*
* Gets the specified text.
*/
NS_IMETHODIMP nsAccessibleText::GetCharacterAtOffset(PRInt32 aOffset, PRUnichar *_retval)
{
nsCOMPtr<nsITextContent> textContent(do_QueryInterface(mTextNode));
if (!textContent)
return NS_ERROR_FAILURE;
const nsTextFragment *textFrag;
textContent->GetText(&textFrag);
*_retval = textFrag->CharAt(aOffset);
return NS_OK;
}
NS_IMETHODIMP nsAccessibleText::GetAttributeRange(PRInt32 aOffset, PRInt32 *aRangeStartOffset, PRInt32 *aRangeEndOffset, nsISupports **_retval)
{
// will do better job later
return NS_ERROR_NOT_IMPLEMENTED;
}
/*
* Given an offset, the x, y, width, and height values are filled appropriately.
*/
NS_IMETHODIMP nsAccessibleText::GetCharacterExtents(PRInt32 aOffset, PRInt32 *aX, PRInt32 *aY, PRInt32 *aLength, PRInt32 *aWidth, nsAccessibleCoordType aCoordType)
{
// will do better job later
return NS_ERROR_NOT_IMPLEMENTED;
}
/*
* Gets the offset of the character located at coordinates x and y. x and y are interpreted as being relative to
* the screen or this widget's window depending on coords.
*/
NS_IMETHODIMP nsAccessibleText::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY, nsAccessibleCoordType aCoordType, PRInt32 *_retval)
{
// will do better job later
return NS_ERROR_NOT_IMPLEMENTED;
}
/*
* Gets the start and end offset of the specified selection.
*/
NS_IMETHODIMP nsAccessibleText::GetSelectionBounds(PRInt32 aSelectionNum, PRInt32 *aStartOffset, PRInt32 *aEndOffset)
{
nsCOMPtr<nsISelectionController> selCon;
nsCOMPtr<nsISelection> domSel;
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
return NS_ERROR_FAILURE;
PRInt32 rangeCount;
domSel->GetRangeCount(&rangeCount);
if (aSelectionNum < 0 || aSelectionNum >= rangeCount)
return NS_ERROR_INVALID_ARG;
nsCOMPtr<nsIDOMRange> range;
domSel->GetRangeAt(aSelectionNum, getter_AddRefs(range));
range->GetStartOffset(aStartOffset);
range->GetEndOffset(aEndOffset);
return NS_OK;
}
/*
* Changes the start and end offset of the specified selection.
*/
NS_IMETHODIMP nsAccessibleText::SetSelectionBounds(PRInt32 aSelectionNum, PRInt32 aStartOffset, PRInt32 aEndOffset)
{
nsCOMPtr<nsISelectionController> selCon;
nsCOMPtr<nsISelection> domSel;
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
return NS_ERROR_FAILURE;
PRInt32 rangeCount;
domSel->GetRangeCount(&rangeCount);
if (aSelectionNum < 0 || aSelectionNum >= rangeCount)
return NS_ERROR_INVALID_ARG;
nsCOMPtr<nsIDOMRange> range;
domSel->GetRangeAt(aSelectionNum, getter_AddRefs(range));
nsCOMPtr<nsIDOMNode> startParent;
nsCOMPtr<nsIDOMNode> endParent;
range->GetStartContainer(getter_AddRefs(startParent));
range->GetEndContainer(getter_AddRefs(endParent));
range->SetStart(startParent, aStartOffset);
range->SetEnd(endParent, aEndOffset);
return NS_OK;
}
/*
* Adds a selection bounded by the specified offsets.
*/
NS_IMETHODIMP nsAccessibleText::AddSelection(PRInt32 aStartOffset, PRInt32 aEndOffset)
{
nsCOMPtr<nsISelectionController> selCon;
nsCOMPtr<nsISelection> domSel;
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMRange> range(do_CreateInstance(kRangeCID));
if (! range)
return NS_ERROR_OUT_OF_MEMORY;
range->SetStart(mTextNode, aStartOffset);
range->SetEnd(mTextNode, aEndOffset);
return domSel->AddRange(range);
}
/*
* Removes the specified selection.
*/
NS_IMETHODIMP nsAccessibleText::RemoveSelection(PRInt32 aSelectionNum)
{
nsCOMPtr<nsISelectionController> selCon;
nsCOMPtr<nsISelection> domSel;
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
return NS_ERROR_FAILURE;
PRInt32 rangeCount;
domSel->GetRangeCount(&rangeCount);
if (aSelectionNum < 0 || aSelectionNum >= rangeCount)
return NS_ERROR_INVALID_ARG;
nsCOMPtr<nsIDOMRange> range;
domSel->GetRangeAt(aSelectionNum, getter_AddRefs(range));
return domSel->RemoveRange(range);
}
// ------------
// Text Accessibles
// ------------
nsTextAccessible::nsTextAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDOMNode, aShell)
{
SetTextNode(aDOMNode);
}
NS_IMPL_ISUPPORTS_INHERITED1(nsTextAccessible, nsLinkableAccessible, nsAccessibleText)
/**
* We are text
*/
NS_IMETHODIMP nsTextAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_TEXT;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}

View File

@@ -0,0 +1,88 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric D Vaughan (evaughan@netscape.com)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsTextAccessible_H_
#define _nsTextAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsIAccessibleText.h"
#include "nsISelectionController.h"
class nsAccessibleText : public nsIAccessibleText
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLETEXT
nsAccessibleText();
virtual ~nsAccessibleText();
void SetTextNode(nsIDOMNode *aNode);
private:
nsCOMPtr<nsIDOMNode> mTextNode;
enum EGetTextType { eGetBefore=-1, eGetAt=0, eGetAfter=1 };
nsresult GetSelections(nsISelectionController **aSelCon, nsISelection **aDomSel);
nsresult GetTextHelper(EGetTextType aType, nsAccessibleTextBoundary aBoundaryType,
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval);
};
/**
* Text nodes have no children, but since double inheritance
* no-worky we have to re-impl the LeafAccessiblity blocks
* this way.
*/
class nsTextAccessible : public nsLinkableAccessible,
public nsAccessibleText
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
#endif

View File

@@ -0,0 +1,75 @@
#
# 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): John Gaunt (jgaunt@netscape.com)
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
LIBRARY_NAME = accessibility_html_s
REQUIRES = \
appshell \
content \
docshell \
dom \
editor \
gfx \
gfx2 \
htmlparser \
imglib2 \
intl \
layout \
locale \
necko \
plugin \
string \
uriloader \
view \
webshell \
widget \
xpcom \
$(NULL)
CPPSRCS = \
nsHTMLAreaAccessible.cpp \
nsHTMLFormControlAccessible.cpp \
nsHTMLIFrameRootAccessible.cpp \
nsHTMLImageAccessible.cpp \
nsHTMLLinkAccessible.cpp \
nsHTMLPluginAccessible.cpp \
nsHTMLSelectAccessible.cpp \
nsHTMLTableAccessible.cpp \
nsHTMLTextAccessible.cpp \
nsHTMLWin32ObjectAccessible.cpp \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES = \
-I$(srcdir)/../base \
-I$(srcdir)/../../../layout/html/base/src \
$(NULL)

View File

@@ -0,0 +1,84 @@
#!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): John Gaunt (jgaunt@netscape.com)
DEPTH = ..\..\..
MODULE = accessibility
LIBRARY_NAME = accessibility_html_s
REQUIRES = \
appshell \
content \
docshell \
dom \
editor \
gfx \
gfx2 \
htmlparser \
imglib2 \
intl \
layout \
locale \
necko \
plugin \
string \
uriloader \
view \
webBrowser_core \
webshell \
widget \
xpcom \
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\nsHTMLAreaAccessible.obj \
.\$(OBJDIR)\nsHTMLFormControlAccessible.obj \
.\$(OBJDIR)\nsHTMLIFrameRootAccessible.obj \
.\$(OBJDIR)\nsHTMLImageAccessible.obj \
.\$(OBJDIR)\nsHTMLLinkAccessible.obj \
.\$(OBJDIR)\nsHTMLPluginAccessible.obj \
.\$(OBJDIR)\nsHTMLSelectAccessible.obj \
.\$(OBJDIR)\nsHTMLTableAccessible.obj \
.\$(OBJDIR)\nsHTMLTextAccessible.obj \
.\$(OBJDIR)\nsHTMLWin32ObjectAccessible.obj \
$(NULL)
EXPORTS = \
.\nsHTMLWin32ObjectAccessible.h \
$(NULL)
LINCS = \
-I..\base \
-I..\..\..\layout\html\forms\public \
-I..\..\..\layout\html\forms\src \
-I..\..\..\layout\html\base\src \
$(NULL)
include <$(DEPTH)\config\rules.mak>
libs:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -0,0 +1,169 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 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 "nsGenericAccessible.h"
#include "nsHTMLAreaAccessible.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "nsIDOMElement.h"
#include "nsIDOMHTMLAreaElement.h"
// --- area -----
nsHTMLAreaAccessible::nsHTMLAreaAccessible(nsIDOMNode *aDomNode, nsIAccessible *aAccParent, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell), mAccParent(aAccParent)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccName(nsAString & _retval)
{
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt) {
nsAutoString hrefString;
elt->GetAttribute(NS_LITERAL_STRING("title"), _retval);
}
return NS_OK;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
return NS_OK;
}
/* wstring getAccValue (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccValue(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt)
elt->GetAttribute(NS_LITERAL_STRING("href"), _retval);
return NS_OK;
}
/* wstring getAccDescription (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccDescription(nsAString& _retval)
{
// Still to do - follow IE's standard here
nsCOMPtr<nsIDOMHTMLAreaElement> area(do_QueryInterface(mDOMNode));
if (area)
area->GetShape(_retval);
return NS_OK;
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccParent(nsIAccessible * *aAccParent)
{
*aAccParent = mAccParent;
NS_IF_ADDREF(*aAccParent);
return NS_OK;
}
nsIAccessible *nsHTMLAreaAccessible::CreateAreaAccessible(nsIDOMNode *aDOMNode)
{
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
if (accService) {
nsIAccessible* acc = nsnull;
accService->CreateHTMLAreaAccessible(mPresShell, aDOMNode, mAccParent, &acc);
return acc;
}
return nsnull;
}
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccNextSibling(nsIAccessible * *aAccNextSibling)
{
*aAccNextSibling = nsnull;
nsCOMPtr<nsIDOMNode> nextNode;
mDOMNode->GetNextSibling(getter_AddRefs(nextNode));
if (nextNode)
*aAccNextSibling = CreateAreaAccessible(nextNode);
return NS_OK;
}
/* readonly attribute nsIAccessible accPreviousSibling; */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccPreviousSibling(nsIAccessible * *aAccPrevSibling)
{
*aAccPrevSibling = nsnull;
nsCOMPtr<nsIDOMNode> prevNode;
mDOMNode->GetPreviousSibling(getter_AddRefs(prevNode));
if (prevNode)
*aAccPrevSibling = CreateAreaAccessible(prevNode);
return NS_OK;
}
/* void accGetBounds (out long x, out long y, out long width, out long height); */
NS_IMETHODIMP nsHTMLAreaAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
//nsIFrame *frame;
// Do a better job on this later - need to use GetRect on mAreas of nsImageMap from nsImageFrame
//return mAccParent->nsAccessible::AccGetBounds(x,y,width,height);
*x = *y = *width = *height = 0;
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLAreaAccessible_H_
#define _nsHTMLAreaAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsAccessible.h"
/* Accessible for image map areas - must be child of image
*/
class nsHTMLAreaAccessible : public nsLinkableAccessible
{
public:
nsHTMLAreaAccessible(nsIDOMNode *domNode, nsIAccessible *accParent, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString & _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
NS_IMETHOD GetAccNextSibling(nsIAccessible * *aAccNextSibling);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible * *aAccPreviousSibling);
NS_IMETHOD GetAccDescription(nsAString& _retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
protected:
nsIAccessible *CreateAreaAccessible(nsIDOMNode *aDOMNode);
nsCOMPtr<nsIAccessible> mAccParent;
};
#endif

View File

@@ -0,0 +1,580 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric Vaughan (evaughan@netscape.com)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsAccessible.h"
#include "nsFormControlAccessible.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsIClipboard.h"
#include "nsIDOMHTMLButtonElement.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMNSHTMLButtonElement.h"
#include "nsIDOMHTMLLabelElement.h"
#include "nsIDOMHTMLTextAreaElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIEditor.h"
#include "nsIEventStateManager.h"
#include "nsIFrame.h"
#include "nsITextControlFrame.h"
#include "nsINameSpaceManager.h"
#include "nsIPlaintextEditor.h"
#include "nsISelectionController.h"
#include "nsReadableUtils.h"
#include "nsWeakReference.h"
// --- checkbox -----
nsHTMLCheckboxAccessible::nsHTMLCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) { // 0 is the magic value for default action
// check or uncheck
PRUint32 state;
GetAccState(&state);
if (state & STATE_CHECKED)
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("uncheck"), _retval);
else
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("check"), _retval);
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) { // 0 is the magic value for default action
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement(do_QueryInterface(mDOMNode));
if (htmlCheckboxElement) {
htmlCheckboxElement->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement(do_QueryInterface(mDOMNode));
if (htmlCheckboxElement)
htmlCheckboxElement->GetChecked(&checked);
if (checked)
*_retval |= STATE_CHECKED;
return NS_OK;
}
//------ Radio button -------
nsHTMLRadioButtonAccessible::nsHTMLRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsRadioButtonAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLRadioButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(mDOMNode));
if (element) {
element->Click();
return NS_OK;
}
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLRadioButtonAccessible::GetAccState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
nsCOMPtr<nsIDOMHTMLInputElement> htmlRadioElement(do_QueryInterface(mDOMNode));
if (htmlRadioElement)
htmlRadioElement->GetChecked(&checked);
if (checked)
*_retval |= STATE_CHECKED;
return NS_OK;
}
// ----- Button -----
nsHTMLButtonAccessible::nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("press"), _retval);
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(mDOMNode));
if (element) {
element->Click();
return NS_OK;
}
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No nsIDOMElement for button node!");
nsAutoString buttonType;
element->GetAttribute(NS_LITERAL_STRING("type"), buttonType);
if (buttonType.EqualsIgnoreCase("submit"))
*_retval |= STATE_DEFAULT;
return NS_OK;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccName(nsAString& _retval)
{
nsCOMPtr<nsIDOMHTMLInputElement> button(do_QueryInterface(mDOMNode));
if (!button)
return NS_ERROR_FAILURE;
nsAutoString name;
button->GetValue(name);
name.CompressWhitespace();
_retval.Assign(name);
return NS_OK;
}
// ----- HTML 4 Button: can contain arbitrary HTML content -----
nsHTML4ButtonAccessible::nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsLeafAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("press"), _retval);
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMNSHTMLButtonElement> buttonElement(do_QueryInterface(mDOMNode));
if ( buttonElement )
{
buttonElement->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE;
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No nsIDOMElement for button node!");
nsAutoString buttonType;
element->GetAttribute(NS_LITERAL_STRING("type"), buttonType);
if (buttonType.EqualsIgnoreCase("submit"))
*_retval |= STATE_DEFAULT;
return NS_OK;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccName(nsAString& _retval)
{
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsAutoString name;
if (content)
rv = AppendFlatStringFromSubtree(content, &name);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAString
name.CompressWhitespace();
_retval.Assign(name);
}
return rv;
}
// --- textfield -----
nsHTMLTextFieldAccessible::nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
// In nsHTMLTextFieldAccessible, mDOMNode is a nsHTMLInputElement. But we need
// a *true* text node(nsTextNode) for the text operation. It's the first child
// of our editor's root element
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell)
return;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame = nsnull;
shell->GetPrimaryFrameFor(content, &frame);
nsCOMPtr<nsITextControlFrame> tframe(do_QueryInterface(frame));
if (!tframe)
return;
nsCOMPtr<nsIEditor> editor;
tframe->GetEditor(getter_AddRefs(editor));
if (!editor)
return;
nsCOMPtr<nsIDOMElement> rootElement;
editor->GetRootElement(getter_AddRefs(rootElement));
nsCOMPtr<nsIDOMNode> rootNode(do_QueryInterface(rootElement));
if (rootNode) {
nsCOMPtr<nsIDOMNode> domNode;
rootNode->GetFirstChild(getter_AddRefs(domNode));
SetTextNode(domNode);
}
}
NS_IMPL_ISUPPORTS_INHERITED2(nsHTMLTextFieldAccessible, nsFormControlAccessible, nsIAccessibleEditableText, nsAccessibleText)
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_TEXT;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccValue(nsAString& _retval)
{
PRUint32 state;
GetAccState(&state);
if (state & STATE_PROTECTED) // Don't return password text!
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mDOMNode));
if (textArea) {
textArea->GetValue(_retval);
return NS_OK;
}
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
if (inputElement) {
inputElement->GetValue(_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccState(PRUint32 *_retval)
{
// can be
// focusable, focused, protected. readonly, unavailable, selected
nsAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE;
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
PRBool isReadOnly = PR_FALSE;
elt->HasAttribute(NS_LITERAL_STRING("readonly"), &isReadOnly);
if (isReadOnly)
*_retval |= STATE_READONLY;
// Get current selection and find out if current node is in it
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame = nsnull;
if (content && NS_SUCCEEDED(shell->GetPrimaryFrameFor(content, &frame)) && frame) {
nsCOMPtr<nsISelectionController> selCon;
frame->GetSelectionController(context,getter_AddRefs(selCon));
if (selCon) {
nsCOMPtr<nsISelection> domSel;
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
if (domSel) {
PRBool isCollapsed = PR_TRUE;
domSel->GetIsCollapsed(&isCollapsed);
if (!isCollapsed)
*_retval |=STATE_SELECTED;
}
}
}
if (!textArea) {
if (inputElement) {
/////// ====== Must be a password field, so it uses nsIDOMHTMLFormControl ==== ///////
PRUint32 moreStates = 0;
nsresult rv = nsFormControlAccessible::GetAccState(&moreStates);
*_retval |= moreStates;
return rv;
}
return NS_ERROR_FAILURE;
}
PRBool disabled = PR_FALSE;
textArea->GetDisabled(&disabled);
if (disabled)
*_retval |= STATE_UNAVAILABLE;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::SetAttributes(PRInt32 aStartPos, PRInt32 aEndPos, nsISupports *aAttributes)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::SetTextContents(const nsAString &aText)
{
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mDOMNode));
if (textArea)
return textArea->SetValue(aText);
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
if (inputElement)
return inputElement->SetValue(aText);
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::MakeSelection(PRInt32 aStartPos, PRInt32 aEndPos, nsIEditor **aEditor)
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell)
return NS_ERROR_FAILURE;
AccTakeFocus();
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame = nsnull;
shell->GetPrimaryFrameFor(content, &frame);
nsCOMPtr<nsITextControlFrame> tframe(do_QueryInterface(frame));
if (!tframe)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIEditor> editor;
tframe->SetSelectionRange(aStartPos, aEndPos);
tframe->GetEditor(getter_AddRefs(editor));
if (!editor)
return NS_ERROR_FAILURE;
*aEditor = editor;
NS_ADDREF(*aEditor);
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::InsertText(const nsAString &aText, PRInt32 aPosition)
{
nsCOMPtr<nsIEditor> editor;
if (NS_SUCCEEDED(MakeSelection(aPosition, aPosition, getter_AddRefs(editor)))) {
nsCOMPtr<nsIPlaintextEditor> peditor(do_QueryInterface(editor));
peditor->InsertText(aText);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos)
{
nsCOMPtr<nsIEditor> editor;
if (NS_SUCCEEDED(MakeSelection(aStartPos, aEndPos, getter_AddRefs(editor)))) {
editor->Copy();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos)
{
nsCOMPtr<nsIEditor> editor;
if (NS_SUCCEEDED(MakeSelection(aStartPos, aEndPos, getter_AddRefs(editor)))) {
editor->Cut();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos)
{
nsCOMPtr<nsIEditor> editor;
if (NS_SUCCEEDED(MakeSelection(aStartPos, aEndPos, getter_AddRefs(editor)))) {
editor->DeleteSelection(nsIEditor::eNone);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::PasteText(PRInt32 aPosition)
{
nsCOMPtr<nsIEditor> editor;
if (NS_SUCCEEDED(MakeSelection(aPosition, aPosition, getter_AddRefs(editor)))) {
editor->Paste(nsIClipboard::kGlobalClipboard);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
// --- groupbox -----
/*
* The HTML for this is <fieldset> <legend>box-title</legend> form elements </fieldset>
*/
nsHTMLGroupboxAccessible::nsHTMLGroupboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_GROUPING;
return NS_OK;
}
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetAccState(PRUint32 *_retval)
{
// Groupbox doesn't support any states!
*_retval = 0;
return NS_OK;
}
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetAccName(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
if (element) {
nsCOMPtr<nsIDOMNodeList> legends;
element->GetElementsByTagName(NS_LITERAL_STRING("legend"), getter_AddRefs(legends));
if (legends) {
nsCOMPtr<nsIDOMNode> legendNode;
legends->Item(0, getter_AddRefs(legendNode));
nsCOMPtr<nsIContent> legendContent(do_QueryInterface(legendNode));
if (legendContent) {
_retval.Assign(NS_LITERAL_STRING("")); // Default name is blank
return AppendFlatStringFromSubtree(legendContent, &_retval);
}
}
}
return NS_OK;
}

View File

@@ -0,0 +1,125 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org 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: Eric D Vaughan (evaughan@netscape.com)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLFormControlAccessible_H_
#define _nsHTMLFormControlAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsFormControlAccessible.h"
#include "nsIAccessibleEditableText.h"
#include "nsTextAccessible.h"
class nsICheckboxControlFrame;
class nsHTMLCheckboxAccessible : public nsFormControlAccessible
{
public:
nsHTMLCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
class nsHTMLRadioButtonAccessible : public nsRadioButtonAccessible
{
public:
nsHTMLRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
class nsHTMLButtonAccessible : public nsFormControlAccessible
{
public:
nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
class nsHTML4ButtonAccessible : public nsLeafAccessible
{
public:
nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
class nsIEditor;
class nsHTMLTextFieldAccessible : public nsFormControlAccessible,
public nsIAccessibleEditableText,
public nsAccessibleText
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEEDITABLETEXT
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
protected:
NS_IMETHOD MakeSelection(PRInt32 aStartPos, PRInt32 aEndPos, nsIEditor **aEditor);
};
class nsHTMLGroupboxAccessible : public nsAccessible
{
public:
nsHTMLGroupboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
};
#endif

View File

@@ -0,0 +1,395 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLIFrameRootAccessible.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsIDOMDocument.h"
#include "nsReadableUtils.h"
NS_INTERFACE_MAP_BEGIN(nsHTMLIFrameRootAccessible)
NS_INTERFACE_MAP_END_INHERITING(nsRootAccessible)
NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
NS_IMPL_ISUPPORTS_INHERITED2(nsHTMLIFrameAccessible, nsBlockAccessible, nsIAccessibleDocument, nsIAccessibleHyperText)
nsHTMLIFrameAccessible::nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *aDoc):
nsBlockAccessible(aNode, aShell), nsDocAccessibleMixin(aDoc), mRootAccessible(aRoot)
{
}
/* attribute wstring accName; */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccName(nsAString& aAccName)
{
return GetTitle(aAccName);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccValue(nsAString& aAccValue)
{
return GetURL(aAccValue);
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
return mRootAccessible->GetAccFirstChild(_retval);
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccLastChild(nsIAccessible **_retval)
{
return mRootAccessible->GetAccLastChild(_retval);
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccChildCount(PRInt32 *_retval)
{
return mRootAccessible->GetAccChildCount(_retval);
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PANE;
return NS_OK;
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccState(PRUint32 *aAccState)
{
return nsAccessible::GetAccState(aAccState);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetURL(nsAString& aURL)
{
return nsDocAccessibleMixin::GetURL(aURL);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetTitle(nsAString& aTitle)
{
return nsDocAccessibleMixin::GetTitle(aTitle);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetMimeType(nsAString& aMimeType)
{
return nsDocAccessibleMixin::GetMimeType(aMimeType);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetDocType(nsAString& aDocType)
{
return nsDocAccessibleMixin::GetDocType(aDocType);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAString& aNameSpaceURI)
{
return nsDocAccessibleMixin::GetNameSpaceURIForID(aNameSpaceID, aNameSpaceURI);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetDocument(nsIDocument **doc)
{
return nsDocAccessibleMixin::GetDocument(doc);
}
NS_IMETHODIMP nsHTMLIFrameAccessible::GetCaretAccessible(nsIAccessibleCaret **aCaretAccessible)
{
// Caret only owned by top level window's document
*aCaretAccessible = nsnull;
return NS_OK;
}
// ------- nsIAccessibleHyperText ---------------
/* readonly attribute long links; */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetLinks(PRInt32 *aLinks)
{
*aLinks = GetLinksFromAccNode(this);
return NS_OK;
}
/* nsIAccessibleHyperLink getLink (in long index); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetLink(PRInt32 aIndex,
nsIAccessibleHyperLink **_retval)
{
return GetLinkFromAccNode(aIndex, this, _retval);
}
/* long getLinkIndex (in long charIndex); */
NS_IMETHODIMP nsHTMLIFrameAccessible::GetLinkIndex(PRInt32 aCharIndex,
PRInt32 *_retval)
{
return GetLinkIndexFromAccNode(this, aCharIndex, _retval);
}
//helper function for nsIAccessibleHyperText
PRBool nsHTMLIFrameAccessible::IsHyperLink(nsIAccessible *aAccNode)
{
nsCOMPtr<nsIAccessibleHyperLink> hyperlink(do_QueryInterface(aAccNode));
return hyperlink? PR_TRUE: PR_FALSE;
}
PRInt32 nsHTMLIFrameAccessible::GetLinksFromAccNode(nsIAccessible *aAccNode)
{
PRInt32 rv = IsHyperLink(aAccNode) ? 1 : 0;
// Here, all the links of accChild should be summed up
nsCOMPtr<nsIAccessible> childa;
nsCOMPtr<nsIAccessible> child;
aAccNode->GetAccFirstChild(getter_AddRefs(child));
while (child) {
rv += GetLinksFromAccNode(child);
child->GetAccNextSibling(getter_AddRefs(childa));
child = childa;
}
//end for summing up accChildren's links
return rv;
}
nsresult nsHTMLIFrameAccessible::GetLinkFromAccNode(PRInt32 aIndex,
nsIAccessible *aAccNode,
nsIAccessibleHyperLink **_retval)
{
PRInt32 links;
//firstly, to see whether beginning node is a hyperlink
links = 0;
if (aIndex < 0) {
//of course, the aIndex is not right.
*_retval = nsnull;
return NS_ERROR_INVALID_ARG;
}
if (IsHyperLink(aAccNode)) {
links = 1;
if (0 == aIndex) {
return CallQueryInterface(aAccNode, _retval);
}
}
//navigate all accChildren to getLink for the aIndex
nsCOMPtr<nsIAccessible> child;
nsCOMPtr<nsIAccessible> childa;
aIndex = aIndex - links;
aAccNode->GetAccFirstChild(getter_AddRefs(child));
while (child) {
links = GetLinksFromAccNode(child);
if (aIndex < links) {
return GetLinkFromAccNode(aIndex, child, _retval);
}
aIndex -= links;
child->GetAccNextSibling(getter_AddRefs(childa));
child = childa;
}
//end of navigate accChild
*_retval = nsnull;
return NS_ERROR_INVALID_ARG;
}
PRInt32 nsHTMLIFrameAccessible::GetAccNodeCharLength(nsIAccessible *aAccNode)
{
PRUint32 role;
PRInt32 childCharLength;
nsAutoString tempAccName;
PRInt32 rv = 0;
role = ROLE_NOTHING;
aAccNode->GetAccRole(&role);
//ROLE_TEXT
if (ROLE_TEXT == role) {
aAccNode->GetAccName(tempAccName);
rv = tempAccName.Length();
}
//sum up the number all accChildren's characters
nsCOMPtr<nsIAccessible> childa;
nsCOMPtr<nsIAccessible> child;
aAccNode->GetAccFirstChild(getter_AddRefs(child));
while (child) {
childCharLength = GetAccNodeCharLength(child);
rv += childCharLength;
child->GetAccNextSibling(getter_AddRefs(childa));
child = childa;
}
return rv;
}
// *_retval is zero-based index, so -1 for no index.
// be careful, charIndex is zero-index, but length is not.
nsresult nsHTMLIFrameAccessible::GetLinkIndexFromAccNode(nsIAccessible *aAccNode,
PRInt32 aCharIndex,
PRInt32 *_retval)
{
nsresult rv;
PRUint32 role;
nsAutoString tempAccName;
PRInt32 charLength;
PRInt32 links;
*_retval = -1;
links = 0;
charLength = 0;
role = ROLE_NOTHING;
aAccNode->GetAccRole(&role);
// if the beginning node is hyperlink
if (IsHyperLink(aAccNode)) {
charLength = GetAccNodeCharLength(aAccNode);
if (aCharIndex < charLength) {
*_retval = 0;
return NS_OK;
}
*_retval = -1;
return NS_OK;
}
//begin to count char length
if (ROLE_TEXT == role) {
aAccNode->GetAccName(tempAccName);
charLength = tempAccName.Length();
if (aCharIndex < charLength) {
*_retval = -1;
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
if (IsHyperLink(aAccNode)) {
links = 1;
}
//exam the beginning node end
//getLinkIndex from accChildren
nsCOMPtr<nsIAccessible> childa;
nsCOMPtr<nsIAccessible> child;
PRInt32 childCharLength;
PRInt32 childLinks;
aAccNode->GetAccFirstChild(getter_AddRefs(child));
while (child) {
childCharLength = GetAccNodeCharLength(child);
if (aCharIndex < charLength + childCharLength) {
rv = GetLinkIndexFromAccNode(child, aCharIndex - charLength, _retval);
*_retval += links;
return rv;
}
charLength += childCharLength;
childLinks = GetLinksFromAccNode(child);
links += childLinks;
child->GetAccNextSibling(getter_AddRefs(childa));
child = childa;
}
return NS_ERROR_INVALID_ARG;
}
//=============================//
// nsHTMLIFrameRootAccessible //
//=============================//
//-----------------------------------------------------
// construction
//-----------------------------------------------------
nsHTMLIFrameRootAccessible::nsHTMLIFrameRootAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsRootAccessible(aShell), mOuterNode(aNode)
{
}
//-----------------------------------------------------
// destruction
//-----------------------------------------------------
nsHTMLIFrameRootAccessible::~nsHTMLIFrameRootAccessible()
{
}
void nsHTMLIFrameRootAccessible::Init()
{
nsCOMPtr<nsIDOMDocument> domDoc;
mOuterNode->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
if (doc) {
nsCOMPtr<nsIPresShell> parentShell;
doc->GetShellAt(0, getter_AddRefs(parentShell));
if (parentShell) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mOuterNode));
nsIFrame* frame = nsnull;
parentShell->GetPrimaryFrameFor(content, &frame);
NS_ASSERTION(frame, "No outer frame.");
if (!frame)
return;
frame->GetAccessible(getter_AddRefs(mOuterAccessible));
NS_ASSERTION(mOuterAccessible, "Something's wrong - there's no accessible for the outer parent of this frame.");
}
}
}
void nsHTMLIFrameRootAccessible::Init(nsIAccessible *aOuterAccessible)
{
if (aOuterAccessible) {
mOuterAccessible = aOuterAccessible;
}
}
/* readonly attribute nsIAccessible accParent; */
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccParent(nsIAccessible **_retval)
{
if (!mOuterAccessible)
Init();
return mOuterAccessible->GetAccParent(_retval);
}
/* nsIAccessible getAccNextSibling (); */
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
if (!mOuterAccessible)
Init();
return mOuterAccessible->GetAccNextSibling(_retval);
}
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
if (!mOuterAccessible)
Init();
return mOuterAccessible->GetAccPreviousSibling(_retval);
}

View File

@@ -0,0 +1,117 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsIFrameRootAccessible_H_
#define _nsIFrameRootAccessible_H_
#include "nsBaseWidgetAccessible.h"
#include "nsRootAccessible.h"
#include "nsAccessible.h"
#include "nsIAccessibleDocument.h"
#include "nsIAccessibleHyperText.h"
class nsIWebShell;
class nsIWeakReference;
class nsHTMLIFrameAccessible : public nsBlockAccessible,
public nsIAccessibleDocument,
public nsIAccessibleHyperText,
public nsDocAccessibleMixin
{
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEDOCUMENT
NS_DECL_NSIACCESSIBLEHYPERTEXT
public:
nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *doc);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccName(nsAString& aAccName);
NS_IMETHOD GetAccValue(nsAString& AccValue);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccState(PRUint32 *aAccState);
protected:
nsCOMPtr<nsIAccessible> mRootAccessible;
//helper function for nsIAccessibleHyperText
PRBool IsHyperLink(nsIAccessible *aAccNode);
PRInt32 GetLinksFromAccNode(nsIAccessible *aAccNode);
nsresult GetLinkFromAccNode(PRInt32 aIndex, nsIAccessible *aAccNode,
nsIAccessibleHyperLink **_retval);
PRInt32 GetAccNodeCharLength(nsIAccessible *aAccNode);
nsresult GetLinkIndexFromAccNode(nsIAccessible *aAccNode,
PRInt32 aCharIndex, PRInt32 *_retval);
};
class nsHTMLIFrameRootAccessible : public nsRootAccessible
{
NS_DECL_ISUPPORTS_INHERITED
public:
nsHTMLIFrameRootAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
virtual ~nsHTMLIFrameRootAccessible();
/* attribute wstring accName; */
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
/* nsIAccessible getAccNextSibling (); */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
/* nsIAccessible getAccPreviousSibling (); */
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
protected:
void Init();
public:
void Init(nsIAccessible *aOuterAccessible);
// In these variable names, "outer" relates to the nsHTMLIFrameAccessible, as opposed to the
// nsHTMLIFrameRootAccessible which is "inner".
// The outer node is a <browser> or <iframe> tag, whereas the inner node corresponds to the inner document root.
nsCOMPtr<nsIDOMNode> mOuterNode;
nsCOMPtr<nsIAccessible> mOuterAccessible;
};
#endif

View File

@@ -0,0 +1,276 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 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 "nsGenericAccessible.h"
#include "nsHTMLImageAccessible.h"
#include "nsReadableUtils.h"
#include "nsAccessible.h"
#include "nsIHTMLDocument.h"
#include "nsIDocument.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "imgIRequest.h"
#include "imgIContainer.h"
#include "nsIImageFrame.h"
#include "nsNetUtil.h"
// --- image -----
nsHTMLImageAccessible::nsHTMLImageAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDOMNode, aShell)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(aDOMNode));
nsCOMPtr<nsIDocument> doc;
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell)
return;
shell->GetDocument(getter_AddRefs(doc));
nsAutoString mapElementName;
if (doc && element) {
nsCOMPtr<nsIHTMLDocument> htmlDoc(do_QueryInterface(doc));
element->GetAttribute(NS_LITERAL_STRING("usemap"),mapElementName);
if (htmlDoc && !mapElementName.IsEmpty()) {
if (mapElementName.CharAt(0) == '#')
mapElementName.Cut(0,1);
htmlDoc->GetImageMap(mapElementName, getter_AddRefs(mMapElement));
}
}
}
NS_IMETHODIMP nsHTMLImageAccessible::GetAccState(PRUint32 *_retval)
{
// The state is a bitfield, get our inherited state, then logically OR it with STATE_ANIMATED if this
// is an animated image.
nsLinkableAccessible::GetAccState(_retval);
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
nsIFrame *frame = nsnull;
if (content && shell)
shell->GetPrimaryFrameFor(content, &frame);
nsCOMPtr<nsIImageFrame> imageFrame(do_QueryInterface(frame));
nsCOMPtr<imgIRequest> imageRequest;
if (imageFrame)
imageFrame->GetImageRequest(getter_AddRefs(imageRequest));
nsCOMPtr<imgIContainer> imgContainer;
if (imageRequest)
imageRequest->GetImage(getter_AddRefs(imgContainer));
if (imgContainer) {
PRUint32 numFrames;
imgContainer->GetNumFrames(&numFrames);
if (numFrames > 1)
*_retval |= STATE_ANIMATED;
}
return NS_OK;
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccName(nsAString& _retval)
{
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> imageContent(do_QueryInterface(mDOMNode));
if (imageContent) {
nsAutoString name;
rv = AppendFlatStringFromContentNode(imageContent, &name);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAString
name.CompressWhitespace();
_retval.Assign(name);
}
}
return rv;
}
/* wstring getAccRole (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_GRAPHIC;
return NS_OK;
}
nsIAccessible *nsHTMLImageAccessible::CreateAreaAccessible(PRUint32 areaNum)
{
if (!mMapElement)
return nsnull;
if (areaNum == -1) {
PRInt32 numAreaMaps;
GetAccChildCount(&numAreaMaps);
if (numAreaMaps<=0)
return nsnull;
areaNum = NS_STATIC_CAST(PRUint32,numAreaMaps-1);
}
nsCOMPtr<nsIDOMHTMLCollection> mapAreas;
mMapElement->GetAreas(getter_AddRefs(mapAreas));
if (!mapAreas)
return nsnull;
nsCOMPtr<nsIDOMNode> domNode;
mapAreas->Item(areaNum,getter_AddRefs(domNode));
if (!domNode)
return nsnull;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
if (!accService)
return nsnull;
if (accService) {
nsIAccessible* acc = nsnull;
accService->CreateHTMLAreaAccessible(mPresShell, domNode, this, &acc);
return acc;
}
return nsnull;
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = CreateAreaAccessible(0);
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = CreateAreaAccessible(-1);
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 0;
if (mMapElement) {
nsIDOMHTMLCollection *mapAreas;
mMapElement->GetAreas(&mapAreas);
if (mapAreas) {
PRUint32 length;
mapAreas->GetLength(&length);
*_retval = NS_STATIC_CAST(PRInt32, length);
}
}
return NS_OK;
}
// Image map hyperlink
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLImageMapAccessible, nsHTMLImageAccessible, nsIAccessibleHyperLink)
/* readonly attribute long anchors; */
NS_IMETHODIMP nsHTMLImageMapAccessible::GetAnchors(PRInt32 *aAnchors)
{
return GetAccChildCount(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 **_retval)
{
*_retval = 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<nsIDocument> doc;
if (NS_SUCCEEDED(content->GetDocument(*getter_AddRefs(doc)))) {
nsCOMPtr<nsIURI> baseURI;
if (NS_SUCCEEDED(doc->GetBaseURL(*getter_AddRefs(baseURI)))) {
nsCOMPtr<nsIDOMElement> area(do_QueryInterface(domNode));
nsAutoString hrefValue;
if (NS_SUCCEEDED(area->GetAttribute(NS_LITERAL_STRING("href"), hrefValue))) {
return NS_NewURI(_retval, hrefValue, nsnull, baseURI);
}
}
}
}
return NS_ERROR_FAILURE;
}
/* nsIAccessible getObject (in long i); */
NS_IMETHODIMP nsHTMLImageMapAccessible::GetObject(PRInt32 aIndex,
nsIAccessible **_retval)
{
*_retval = CreateAreaAccessible(aIndex);
return NS_OK;
}
/* boolean isValid (); */
NS_IMETHODIMP nsHTMLImageMapAccessible::IsValid(PRBool *_retval)
{
*_retval = PR_TRUE;
return NS_OK;
}

View File

@@ -0,0 +1,87 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLImageAccessible_H_
#define _nsHTMLImageAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsIAccessibleHyperLink.h"
#include "nsIFrame.h"
#include "nsIImageFrame.h"
#include "nsIDOMHTMLMapElement.h"
/* Accessible for supporting images
* supports:
* - gets name, role
* - support basic state
*/
class nsHTMLImageAccessible : public nsLinkableAccessible
{
public:
nsHTMLImageAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
protected:
nsIAccessible *CreateAreaAccessible(PRUint32 areaNum);
nsCOMPtr<nsIDOMHTMLMapElement> mMapElement;
};
/* Accessible for support images with "use=#map".
* only this kind of images will support nsIAccessibleHyperLink
*/
class nsHTMLImageMapAccessible : public nsHTMLImageAccessible,
public nsIAccessibleHyperLink
{
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEHYPERLINK
public:
nsHTMLImageMapAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell)
: nsHTMLImageAccessible(aDomNode, aShell)
{
}//constructor end
};
#endif

View File

@@ -0,0 +1,143 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 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 "nsHTMLLinkAccessible.h"
#include "nsWeakReference.h"
#include "nsIFrame.h"
#include "nsILink.h"
#include "nsILinkHandler.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
#include "nsIPresContext.h"
#include "nsIURI.h"
#include "nsNetUtil.h"
#include "nsReadableUtils.h"
#include "nsIDOMElement.h"
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLLinkAccessible, nsLinkableAccessible, nsIAccessibleHyperLink)
nsHTMLLinkAccessible::nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccName(nsAString& _retval)
{
if (!IsALink()) // Also initializes private data members
return NS_ERROR_FAILURE;
nsAutoString name;
nsresult rv = AppendFlatStringFromSubtree(mLinkContent, &name);
if (NS_SUCCEEDED(rv)) {
// Temp var needed until CompressWhitespace built for nsAString
name.CompressWhitespace();
_retval.Assign(name);
}
return rv;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
return NS_OK;
}
/* readonly attribute long anchors; */
NS_IMETHODIMP nsHTMLLinkAccessible::GetAnchors(PRInt32 *aAnchors)
{
if (!IsALink())
return NS_ERROR_FAILURE;
*aAnchors = 1;
return NS_OK;
}
/* readonly attribute long startIndex; */
NS_IMETHODIMP nsHTMLLinkAccessible::GetStartIndex(PRInt32 *aStartIndex)
{
//not see the value to implement this attributes
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute long endIndex; */
NS_IMETHODIMP nsHTMLLinkAccessible::GetEndIndex(PRInt32 *aEndIndex)
{
//not see the value to implement this attributes
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIURI getURI (in long i); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetURI(PRInt32 i, nsIURI **_retval)
{
//I do not know why we have to retrun a nsIURI instead of
//nsILink or just a string of url. Anyway, maybe nsIURI is
//more powerful for the future.
*_retval = nsnull;
nsCOMPtr<nsILink> link(do_QueryInterface(mLinkContent));
if (link) {
nsXPIDLCString hrefValue;
if (NS_SUCCEEDED(link->GetHrefCString(*getter_Copies(hrefValue)))) {
return NS_NewURI(_retval, hrefValue, nsnull, nsnull);
}
}
return NS_ERROR_FAILURE;
}
/* nsIAccessible getObject (in long i); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetObject(PRInt32 aIndex,
nsIAccessible **_retval)
{
if (0 != aIndex)
return NS_ERROR_FAILURE;
return QueryInterface(NS_GET_IID(nsIAccessible), (void **)_retval);
}
/* boolean isValid (); */
NS_IMETHODIMP nsHTMLLinkAccessible::IsValid(PRBool *_retval)
{
// I have not found the cause which makes this attribute false.
*_retval = PR_TRUE;
return NS_OK;
}

View File

@@ -0,0 +1,59 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLLinkAccessible_H_
#define _nsHTMLLinkAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsIAccessibleHyperLink.h"
class nsHTMLLinkAccessible : public nsLinkableAccessible,
public nsIAccessibleHyperLink
{
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEHYPERLINK
public:
nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,96 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 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 "nsHTMLPluginAccessible.h"
#include "nsIContent.h"
#include "nsObjectFrame.h"
#include "nsplugindefs.h"
#include "nsAccessibilityService.h"
nsHTMLPluginAccessible::nsHTMLPluginAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1"))
{
}
NS_IMETHODIMP
nsHTMLPluginAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
nsIFrame* frame = nsnull;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
shell->GetPrimaryFrameFor(content, &frame);
if (!frame)
return NS_ERROR_FAILURE;
nsObjectFrame* objectFrame = NS_STATIC_CAST(nsObjectFrame*, frame);
#ifdef XP_WIN
HWND pluginPort = nsnull;
objectFrame->GetPluginPort(&pluginPort);
if (pluginPort) {
if (mAccService)
mAccService->CreateHTMLNativeWindowAccessible(mDOMNode, mPresShell, (PRInt32)pluginPort, _retval);
}
#else
*_retval = nsnull;
#endif
NS_IF_ADDREF(*_retval);
return NS_OK;
}
NS_IMETHODIMP
nsHTMLPluginAccessible::GetAccLastChild(nsIAccessible **_retval)
{
return GetAccFirstChild(_retval);
}
NS_IMETHODIMP
nsHTMLPluginAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 1;
return NS_OK;
}
NS_IMETHODIMP
nsHTMLPluginAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_WINDOW;
return NS_OK;
}

View File

@@ -0,0 +1,61 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 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 "nsAccessible.h"
/**
* This class is used to wrap the window for the plugin. It's only child
* is a shim class that will allow the platform specific layer of our
* accessibility support to get the IAccessible from the plugin itself
* (via the windows call to get he accessible by window).
*/
class nsHTMLPluginAccessible : public nsAccessible
{
public:
nsHTMLPluginAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
protected:
nsCOMPtr<nsIAccessibilityService> mAccService;
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,275 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsHTMLSelectAccessible_h__
#define __nsHTMLSelectAccessible_h__
#include "nsCOMPtr.h"
#include "nsIAccessibleSelectable.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMNode.h"
#include "nsIWeakReference.h"
#include "nsSelectAccessible.h"
/**
* Selects, Listboxes and Comboboxes, are made up of a number of different
* widgets, some of which are shared between the two. This file contains * all of the widgets for both of the Selects, for HTML only. Some of them
* extend classes from nsSelectAccessible.cpp, which contains base classes
* that are also extended by the XUL Select Accessibility support.
*
* Listbox:
* - nsHTMLListboxAccessible
* - nsHTMLSelectListAccessible
* - nsHTMLSelectOptionAccessible
*
* Comboboxes:
* - nsHTMLComboboxAccessible
* - nsHTMLComboboxTextFieldAccessible
* - nsHTMLComboboxButtonAccessible
* - nsHTMLComboboxWindowAccessible
* - nsHTMLSelectListAccessible
* - nsHTMLSelectOptionAccessible(s)
*/
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/*
* The basic implemetation of nsIAccessibleSelectable.
*/
class nsHTMLSelectableAccessible : public nsAccessible,
public nsIAccessibleSelectable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
nsHTMLSelectableAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLSelectableAccessible() {}
protected:
NS_IMETHOD ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState);
class iterator
{
protected:
PRUint32 mLength;
PRUint32 mIndex;
PRInt32 mSelCount;
nsHTMLSelectableAccessible *mParent;
nsCOMPtr<nsIDOMHTMLCollection> mOptions;
nsCOMPtr<nsIDOMHTMLOptionElement> mOption;
public:
iterator(nsHTMLSelectableAccessible *aParent);
void CalcSelectionCount(PRInt32 *aSelectionCount);
void Select(PRBool aSelect);
void AddAccessibleIfSelected(nsIAccessibilityService *aAccService, nsISupportsArray *aSelectedAccessibles, nsIPresContext *aContext);
PRBool GetAccessibleIfSelected(PRInt32 aIndex, nsIAccessibilityService *aAccService, nsIPresContext *aContext, nsIAccessible **_retval);
PRBool Advance();
};
friend class iterator;
};
/*
* The list that contains all the options in the select.
*/
class nsHTMLSelectListAccessible : public nsSelectListAccessible
{
public:
nsHTMLSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLSelectListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *aAccChildCount) ;
};
/*
* Options inside the select, contained within the list
*/
class nsHTMLSelectOptionAccessible : public nsSelectOptionAccessible
{
public:
nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLSelectOptionAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
static nsresult GetFocusedOptionNode(nsIDOMNode *aListNode, nsCOMPtr<nsIDOMNode>& aFocusedOptionNode);
};
/*
* Opt Groups inside the select, contained within the list
*/
class nsHTMLSelectOptGroupAccessible : public nsHTMLSelectOptionAccessible
{
public:
nsHTMLSelectOptGroupAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLSelectOptGroupAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
};
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/*
* A class the represents the HTML Listbox widget.
*/
class nsHTMLListboxAccessible : public nsHTMLSelectableAccessible
{
public:
nsHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLListboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
};
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/*
* A class the represents the HTML Combobox widget.
*/
class nsHTMLComboboxAccessible : public nsHTMLSelectableAccessible
{
public:
nsHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
};
/*
* A class the represents the text field in the Select to the left
* of the drop down button
*/
class nsHTMLComboboxTextFieldAccessible : public nsComboboxTextFieldAccessible
{
public:
nsHTMLComboboxTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxTextFieldAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
};
/**
* A class that represents the button inside the Select to the
* right of the text field
*/
class nsHTMLComboboxButtonAccessible : public nsComboboxButtonAccessible
{
public:
nsHTMLComboboxButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxButtonAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
/*
* A class that represents the window that lives to the right
* of the drop down button inside the Select. This is the window
* that is made visible when the button is pressed.
*/
class nsHTMLComboboxWindowAccessible : public nsComboboxWindowAccessible
{
public:
nsHTMLComboboxWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxWindowAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
};
#endif

View File

@@ -0,0 +1,646 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 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 "nsHTMLTableAccessible.h"
#include "nsWeakReference.h"
#include "nsReadableUtils.h"
nsHTMLTableCellAccessible::nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsBlockAccessible(aDomNode, aShell)
{
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccRole(PRUint32 *aResult)
{
*aResult = ROLE_CELL;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccState(PRUint32 *aResult)
{
nsAccessible::GetAccState(aResult);
*aResult &= ~STATE_FOCUSABLE; // Inherit all states except focusable state since table cells cannot be focused
return NS_OK;
}
nsHTMLTableCaptionAccessible::nsHTMLTableCaptionAccessible
(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsAccessible(aDomNode, aShell)
{
}
NS_IMETHODIMP
nsHTMLTableCaptionAccessible::GetAccState(PRUint32 *aResult)
{
nsAccessible::GetAccState(aResult);
*aResult &= ~STATE_FOCUSABLE;
return NS_OK;
}
NS_IMETHODIMP
nsHTMLTableCaptionAccessible::GetAccValue(nsAString& aResult)
{
aResult.Assign(NS_LITERAL_STRING("")); // Default name is blank
nsCOMPtr<nsIContent> captionContent(do_QueryInterface(mDOMNode));
AppendFlatStringFromSubtree(captionContent, &aResult);
return NS_OK;
}
NS_IMPL_ISUPPORTS_INHERITED2(nsHTMLTableAccessible,
nsBlockAccessible,
nsIAccessible,
nsIAccessibleTable)
nsHTMLTableAccessible::nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsBlockAccessible(aDomNode, aShell)
{
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLTableAccessible::GetAccRole(PRUint32 *aResult)
{
*aResult = ROLE_TABLE;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTableAccessible::GetAccState(PRUint32 *aResult)
{
nsAccessible::GetAccState(aResult);
*aResult &= ~STATE_FOCUSABLE; // Inherit all states except focusable state since tables cannot be focused
return NS_OK;
}
NS_IMETHODIMP nsHTMLTableAccessible::GetAccName(nsAString& aResult)
{
aResult.Assign(NS_LITERAL_STRING("")); // Default name is blank
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
if (element) {
nsCOMPtr<nsIDOMNodeList> captions;
element->GetElementsByTagName(NS_LITERAL_STRING("caption"), getter_AddRefs(captions));
if (captions) {
nsCOMPtr<nsIDOMNode> captionNode;
captions->Item(0, getter_AddRefs(captionNode));
if (captionNode) {
nsCOMPtr<nsIContent> captionContent(do_QueryInterface(captionNode));
AppendFlatStringFromSubtree(captionContent, &aResult);
}
}
}
return NS_OK;
}
/* Implementation of nsIAccessibleTable */
NS_IMETHODIMP
nsHTMLTableAccessible::GetCaption(nsIAccessible **aCaption)
{
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);
return accService->CreateHTMLTableCaptionAccessible(captionNode, aCaption);
}
NS_IMETHODIMP
nsHTMLTableAccessible::SetCaption(nsIAccessible *aCaption)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMNode> domNode;
rv = aCaption->AccGetDOMNode(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
nsHTMLTableAccessible::GetSummary(nsAString &aSummary)
{
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
return table->GetSummary(aSummary);
}
NS_IMETHODIMP
nsHTMLTableAccessible::SetSummary(const nsAString &aSummary)
{
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
return table->SetSummary(aSummary);
}
NS_IMETHODIMP
nsHTMLTableAccessible::GetColumns(PRInt32 *aColumns)
{
nsITableLayout *tableLayout = nsnull;
nsresult rv = GetTableLayout(&tableLayout);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 rows;
return tableLayout->GetTableSize(rows, *aColumns);
}
NS_IMETHODIMP
nsHTMLTableAccessible::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;
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
nsHTMLTableAccessible::GetRows(PRInt32 *aRows)
{
nsITableLayout *tableLayout = nsnull;
nsresult rv = GetTableLayout(&tableLayout);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 columns;
return tableLayout->GetTableSize(*aRows, columns);
}
NS_IMETHODIMP
nsHTMLTableAccessible::GetRowHeader(nsIAccessibleTable **aRowHeader)
{
// Can not implement because there is no row header in html table
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableAccessible::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
nsHTMLTableAccessible::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
nsHTMLTableAccessible::CellRefAt(PRInt32 aRow, PRInt32 aColumn,
nsIAccessible **_retval)
{
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->GetAccessibleFor(cellElement, _retval);
}
NS_IMETHODIMP
nsHTMLTableAccessible::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
nsHTMLTableAccessible::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
nsHTMLTableAccessible::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
nsHTMLTableAccessible::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
nsHTMLTableAccessible::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
nsHTMLTableAccessible::GetColumnDescription(PRInt32 aColumn, nsAString &_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableAccessible::GetRowDescription(PRInt32 aRow, nsAString &_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsHTMLTableAccessible::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
nsHTMLTableAccessible::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
nsHTMLTableAccessible::IsCellSelected(PRInt32 aRow, PRInt32 aColumn,
PRBool *_retval)
{
nsITableLayout *tableLayout = nsnull;
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
nsHTMLTableAccessible::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
nsHTMLTableAccessible::GetTableLayout(nsITableLayout **aLayoutObject)
{
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);
nsCOMPtr<nsIDocument> document;
rv = content->GetDocument(*getter_AddRefs(document));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIPresShell> presShell;
rv = document->GetShellAt(0, getter_AddRefs(presShell));
NS_ENSURE_SUCCESS(rv, rv);
nsISupports *layoutObject = nsnull;
rv = presShell->GetLayoutObjectFor(content, &layoutObject);
NS_ENSURE_SUCCESS(rv, rv);
*aLayoutObject = nsnull;
return layoutObject->QueryInterface(NS_GET_IID(nsITableLayout),
(void **)aLayoutObject);
}
nsresult
nsHTMLTableAccessible::GetCellAt(PRInt32 aRowIndex,
PRInt32 aColIndex,
nsIDOMElement* &aCell)
{
PRInt32 startRowIndex = 0, startColIndex = 0,
rowSpan, colSpan, actualRowSpan, actualColSpan;
PRBool isSelected;
nsITableLayout *tableLayout = nsnull;
nsresult rv = GetTableLayout(&tableLayout);
NS_ENSURE_SUCCESS(rv, rv);
return tableLayout->GetCellDataAt(aRowIndex, aColIndex, aCell,
startRowIndex, startColIndex,
rowSpan, colSpan,
actualRowSpan, actualColSpan,
isSelected);
}
//Class nsHTMLTableHeadAccessible
nsHTMLTableHeadAccessible::nsHTMLTableHeadAccessible(nsIDOMNode *aDomNode,
nsIWeakReference *aShell):
nsHTMLTableAccessible(aDomNode, aShell)
{
}
NS_IMETHODIMP
nsHTMLTableHeadAccessible::GetAccRole(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);
}
/* End of Implementation of nsIAccessibleTable */

View File

@@ -0,0 +1,114 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLTableAccessible_H_
#define _nsHTMLTableAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsIAccessibleTable.h"
#include "nsIServiceManager.h"
#include "nsIDocument.h"
#include "nsIDOMElement.h"
#include "nsIDOMHTMLTableElement.h"
#include "nsIDOMHTMLTableCaptionElem.h"
#include "nsIDOMHTMLTableRowElement.h"
#include "nsIDOMHTMLTableCellElement.h"
#include "nsIDOMHTMLTableSectionElem.h"
#include "nsIDOMHTMLCollection.h"
#include "nsITableLayout.h"
class nsHTMLTableCellAccessible : public nsBlockAccessible
{
public:
nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *aResult);
NS_IMETHOD GetAccState(PRUint32 *aResult);
};
class nsHTMLTableCaptionAccessible : public nsAccessible
{
public:
nsHTMLTableCaptionAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccState(PRUint32 *aResult);
NS_IMETHOD GetAccValue(nsAString& aResult);
};
class nsHTMLTableAccessible : public nsBlockAccessible,
public nsIAccessibleTable
{
public:
nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
/* nsIAccessible */
NS_IMETHOD GetAccRole(PRUint32 *aResult);
NS_IMETHOD GetAccState(PRUint32 *aResult);
NS_IMETHOD GetAccName(nsAString& aResult);
/* nsIAccessibleTable */
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLETABLE
protected:
nsresult GetTableNode(nsIDOMNode **_retval);
nsresult GetTableLayout(nsITableLayout **aLayoutObject);
nsresult GetCellAt(PRInt32 aRowIndex,
PRInt32 aColIndex,
nsIDOMElement* &aCell);
};
class nsHTMLTableHeadAccessible : public nsHTMLTableAccessible
{
public:
nsHTMLTableHeadAccessible(nsIDOMNode *aDomNode, nsIWeakReference *aShell);
/* nsIAccessible */
NS_IMETHOD GetAccRole(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

@@ -0,0 +1,51 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Eric Vaughan (evaughan@netscape.com)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLTextAccessible.h"
nsHTMLTextAccessible::nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsTextAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLTextAccessible::GetAccName(nsAString& _retval)
{
return mDOMNode->GetNodeValue(_retval);
}

View File

@@ -0,0 +1,54 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLTextAccessible_H_
#define _nsHTMLTextAccessible_H_
#include "nsTextAccessible.h"
class nsIWeakReference;
class nsHTMLTextAccessible : public nsTextAccessible
{
public:
nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
};
#endif

View File

@@ -0,0 +1,61 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com) (original author)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLWin32ObjectAccessible.h"
#include "nsAccessible.h"
nsHTMLWin32ObjectAccessible::nsHTMLWin32ObjectAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell, PRInt32 aHwnd):
nsAccessible(aNode, aShell)
{
if (aHwnd) {
// XXX - when we get accessible plugins we may have to check here
// for the proper window handle using Win32 APIs so we check
// the proper IAccessible for the information we need.
mHwnd = aHwnd;
}
}
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLWin32ObjectAccessible, nsAccessible, nsIAccessibleWin32Object)
NS_IMETHODIMP
nsHTMLWin32ObjectAccessible::GetHwnd(PRInt32 *aHwnd) {
*aHwnd = mHwnd;
return NS_OK;
}

View File

@@ -0,0 +1,79 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John Gaunt (jgaunt@netscape.com) (original author)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsHTMLWin32ObjectAccessible_H_
#define _nsHTMLWin32ObjectAccessible_H_
#include "nsIAccessibleWin32Object.h"
#include "nsAccessible.h"
struct IAccessible;
/**
* This class is used only internally, we never! send out an IAccessible linked
* back to this object. This class is used to represent a plugin object when
* referenced as a child or sibling of another nsAccessible node. We need only
* a limited portion of the nsIAccessible interface implemented here. The
* in depth accessible information will be returned by the actual IAccessible
* object returned by us in Accessible::NewAccessible() that gets the IAccessible
* from the windows system from the window handle.
*/
class nsHTMLWin32ObjectAccessible : public nsAccessible,
public nsIAccessibleWin32Object
{
public:
nsHTMLWin32ObjectAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell, PRInt32 aHwnd);
virtual ~nsHTMLWin32ObjectAccessible() {}
NS_DECL_ISUPPORTS_INHERITED
// ---- nsIAccessibleWin32Object ----
NS_IMETHOD GetHwnd(PRInt32 *aHwnd);
protected:
// ---- Data Members ----
/**
* A handle to the native plugin window (hopefully), given to
* Accessible::NewAccessible() so the actual IAccessible can be retrieved.
*/
PRInt32 mHwnd;
};
#endif

View File

@@ -0,0 +1,34 @@
#!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): John Gaunt (jgaunt@netscape.com)
DEPTH = ..\..
include <$(DEPTH)\config\config.mak>
DIRS = \
base \
html \
!ifdef MOZ_XUL
xul \
!endif
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,73 @@
#
# 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): John Gaunt (jgaunt@netscape.com)
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
LIBRARY_NAME = accessibility_xul_s
REQUIRES = \
appshell \
content \
docshell \
dom \
gfx \
htmlparser \
intl \
layout \
locale \
necko \
plugin \
pref \
string \
view \
webbrwsr \
webshell \
widget \
xpcom \
$(NULL)
CPPSRCS = \
nsXULColorPickerAccessible.cpp \
nsXULFormControlAccessible.cpp \
nsXULMenuAccessible.cpp \
nsXULSelectAccessible.cpp \
nsXULTabAccessible.cpp \
nsXULTextAccessible.cpp \
nsXULTreeAccessible.cpp \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES = \
-I$(srcdir)/../base \
-I$(srcdir)/../html \
-I$(srcdir)/../../../layout/html/base/src \
-I$(srcdir)/../../../layout/html/forms/src \
-I$(srcdir)/../../../layout/html/forms/public \
$(NULL)

View File

@@ -0,0 +1,77 @@
#!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): John Gaunt (jgaunt@netscape.com)
DEPTH = ..\..\..
MODULE = accessibility
LIBRARY_NAME = accessibility_xul_s
REQUIRES = \
appshell \
content \
docshell \
dom \
gfx \
intl \
layout \
layout_xul \
locale \
necko \
plugin \
pref \
string \
webBrowser_core \
webshell \
widget \
xpcom \
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\nsXULColorPickerAccessible.obj \
.\$(OBJDIR)\nsXULFormControlAccessible.obj \
.\$(OBJDIR)\nsXULMenuAccessible.obj \
.\$(OBJDIR)\nsXULSelectAccessible.obj \
.\$(OBJDIR)\nsXULTabAccessible.obj \
.\$(OBJDIR)\nsXULTextAccessible.obj \
.\$(OBJDIR)\nsXULTreeAccessible.obj \
$(NULL)
EXPORTS = \
$(NULL)
LINCS = \
-I..\base \
-I..\html \
-I..\..\..\layout\html\forms\public \
-I..\..\..\layout\html\forms\src \
-I..\..\..\layout\html\base\src \
-I..\..\..\widget\src\windows \
$(NULL)
include <$(DEPTH)\config\rules.mak>
libs:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -0,0 +1,136 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: 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 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 ***** */
// NOTE: alphabetically ordered
#include "nsXULColorPickerAccessible.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsXULFormControlAccessible.h"
#include "nsIDOMElement.h"
/**
* XUL Color Picker Tile
*/
/**
* Default Constructor
*/
nsXULColorPickerTileAccessible::nsXULColorPickerTileAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
* We are a pushbutton
*/
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
/**
* Possible states: focused, focusable, selected
*/
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE;
// Focused?
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No XUL Element for colorpicker");
PRBool isFocused = PR_FALSE;
element->HasAttribute(NS_LITERAL_STRING("hover"), &isFocused);
if (isFocused)
*_retval |= STATE_FOCUSED;
PRBool isSelected = PR_FALSE;
element->HasAttribute(NS_LITERAL_STRING("selected"), &isSelected);
if (isFocused)
*_retval |= STATE_SELECTED;
return NS_OK;
}
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccName(nsAString& _retval)
{
_retval.Assign(NS_LITERAL_STRING(""));
return NS_OK;
}
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccValue(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No XUL Element for colorpicker");
return element->GetAttribute(NS_LITERAL_STRING("color"), _retval);
}
/**
* XUL Color Picker
*/
/**
* Default Constructor
*/
nsXULColorPickerAccessible::nsXULColorPickerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsXULColorPickerTileAccessible(aNode, aShell)
{
}
/**
* Possible states: focused, focusable, unavailable(disabled)
*/
NS_IMETHODIMP nsXULColorPickerAccessible::GetAccState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
*_retval |= STATE_FOCUSABLE | STATE_HASPOPUP;
return NS_OK;
}
NS_IMETHODIMP nsXULColorPickerAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_BUTTONDROPDOWNGRID;
return NS_OK;
}

View File

@@ -0,0 +1,64 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsXULColorPickerAccessible_H_
#define _nsXULColorPickerAccessible_H_
// NOTE: alphabetically ordered
#include "nsFormControlAccessible.h"
class nsXULColorPickerTileAccessible : public nsFormControlAccessible
{
public:
nsXULColorPickerTileAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
};
class nsXULColorPickerAccessible : public nsXULColorPickerTileAccessible
{
public:
nsXULColorPickerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,640 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: 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 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 ***** */
// NOTE: alphabetically ordered
#include "nsIDocument.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULCheckboxElement.h"
#include "nsIDOMXULDocument.h"
#include "nsIDOMXULLabelElement.h"
#include "nsIDOMXULMenuListElement.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsXULFormControlAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
/**
* XUL Button: can contain arbitrary HTML content
*/
/**
* Default Constructor
*/
// Don't inherit from nsFormControlAccessible - it doesn't allow children and a button can have a dropmarker child
nsXULButtonAccessible::nsXULButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsXULButtonAccessible::GetAccName(nsAString& aResult)
{
return GetXULAccName(aResult);
}
/**
* Only one actions available
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("press"), _retval);
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Tell the button to do it's action
*/
NS_IMETHODIMP nsXULButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMXULButtonElement> buttonElement(do_QueryInterface(mDOMNode));
if ( buttonElement )
{
buttonElement->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/**
* We are a pushbutton
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
/**
* Possible states: focused, focusable, unavailable(disabled)
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsAccessible::GetAccState(_retval);
PRBool disabled = PR_FALSE;
nsCOMPtr<nsIDOMXULControlElement> xulFormElement(do_QueryInterface(mDOMNode));
if (xulFormElement) {
xulFormElement->GetDisabled(&disabled);
if (disabled)
*_retval |= STATE_UNAVAILABLE;
else
*_retval |= STATE_FOCUSABLE;
}
// Buttons can be checked -- they simply appear pressed in rather than checked
nsCOMPtr<nsIDOMXULButtonElement> xulButtonElement(do_QueryInterface(mDOMNode));
if (xulButtonElement) {
PRBool checked = PR_FALSE;
PRInt32 checkState = 0;
xulButtonElement->GetChecked(&checked);
if (checked) {
*_retval |= STATE_PRESSED;
xulButtonElement->GetCheckState(&checkState);
if (checkState == nsIDOMXULButtonElement::CHECKSTATE_MIXED)
*_retval |= STATE_MIXED;
}
}
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No nsIDOMElement for button node!");
PRBool isDefault = PR_FALSE;
element->HasAttribute(NS_LITERAL_STRING("default"), &isDefault) ;
if (isDefault)
*_retval |= STATE_DEFAULT;
return NS_OK;
}
/**
* Perhaps 1 child - if there's a <dropmarker>
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccFirstChild(nsIAccessible **aResult)
{
*aResult = nsnull;
nsCOMPtr<nsIAccessible> testAccessible;
nsAccessible::GetAccLastChild(getter_AddRefs(testAccessible));
// If the anonymous tree walker can find accessible children, and the last one is a push button,
// then use it as the only accessible child -- because this is the scenario where we have a dropmarker child
if (testAccessible) {
PRUint32 role;
if (NS_SUCCEEDED(testAccessible->GetAccRole(&role)) && role == ROLE_PUSHBUTTON) {
*aResult = testAccessible;
NS_ADDREF(*aResult);
}
}
return NS_OK;
}
NS_IMETHODIMP nsXULButtonAccessible::GetAccLastChild(nsIAccessible **aResult)
{
return GetAccFirstChild(aResult);
}
NS_IMETHODIMP nsXULButtonAccessible::GetAccChildCount(PRInt32 *aResult)
{
*aResult = 0;
nsCOMPtr<nsIAccessible> accessible;
GetAccFirstChild(getter_AddRefs(accessible));
if (accessible)
*aResult = 1;
return NS_OK;
}
/**
* XUL Dropmarker: can contain arbitrary HTML content
*/
/**
* Default Constructor
*/
nsXULDropmarkerAccessible::nsXULDropmarkerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
* Only one actions available
*/
NS_IMETHODIMP nsXULDropmarkerAccessible::GetAccNumActions(PRUint8 *aResult)
{
*aResult = eSingle_Action;
return NS_OK;;
}
PRBool nsXULDropmarkerAccessible::DropmarkerOpen(PRBool aToggleOpen)
{
PRBool isOpen = PR_FALSE;
nsCOMPtr<nsIDOMNode> parentButtonNode;
mDOMNode->GetParentNode(getter_AddRefs(parentButtonNode));
nsCOMPtr<nsIDOMXULButtonElement> parentButtonElement(do_QueryInterface(parentButtonNode));
if (parentButtonElement) {
parentButtonElement->GetOpen(&isOpen);
if (aToggleOpen)
parentButtonElement->SetOpen(!isOpen);
}
else {
nsCOMPtr<nsIDOMXULMenuListElement> parentMenuListElement(do_QueryInterface(parentButtonNode));
if (parentMenuListElement) {
parentMenuListElement->GetOpen(&isOpen);
if (aToggleOpen)
parentMenuListElement->SetOpen(!isOpen);
}
}
return isOpen;
}
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULDropmarkerAccessible::GetAccActionName(PRUint8 index, nsAString& aResult)
{
if (index == eAction_Click) {
if (DropmarkerOpen(PR_FALSE))
aResult = NS_LITERAL_STRING("close");
else
aResult = NS_LITERAL_STRING("open");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Tell the Dropmarker to do it's action
*/
NS_IMETHODIMP nsXULDropmarkerAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Click) {
DropmarkerOpen(PR_TRUE); // Reverse the open attribute
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
* We are a pushbutton
*/
NS_IMETHODIMP nsXULDropmarkerAccessible::GetAccRole(PRUint32 *aResult)
{
*aResult = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsXULDropmarkerAccessible::GetAccState(PRUint32 *aResult)
{
*aResult = 0;
if (DropmarkerOpen(PR_FALSE))
*aResult = STATE_PRESSED;
return NS_OK;
}
/**
* XUL checkbox
*/
/**
* Default Constructor
*/
nsXULCheckboxAccessible::nsXULCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
/**
* We are a CheckButton
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
return NS_OK;
}
/**
* Only one action available
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
// check or uncheck
PRUint32 state;
GetAccState(&state);
if (state & STATE_CHECKED)
_retval = NS_LITERAL_STRING("uncheck");
else
_retval = NS_LITERAL_STRING("check");
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Tell the checkbox to do its only action -- check( or uncheck) itself
*/
NS_IMETHODIMP nsXULCheckboxAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Click) {
PRBool checked = PR_FALSE;
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
if (xulCheckboxElement) {
xulCheckboxElement->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Possible states: focused, focusable, unavailable(disabled), checked
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
// Determine Checked state
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
if (xulCheckboxElement) {
PRBool checked = PR_FALSE;
xulCheckboxElement->GetChecked(&checked);
if (checked) {
*_retval |= STATE_CHECKED;
PRInt32 checkState = 0;
xulCheckboxElement->GetCheckState(&checkState);
if (checkState == nsIDOMXULCheckboxElement::CHECKSTATE_MIXED)
*_retval |= STATE_MIXED;
}
}
return NS_OK;
}
/**
* XUL groupbox
*/
nsXULGroupboxAccessible::nsXULGroupboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsXULGroupboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_GROUPING;
return NS_OK;
}
NS_IMETHODIMP nsXULGroupboxAccessible::GetAccState(PRUint32 *_retval)
{
// Groupbox doesn't support any states!
*_retval = 0;
return NS_OK;
}
NS_IMETHODIMP nsXULGroupboxAccessible::GetAccName(nsAString& _retval)
{
_retval.Assign(NS_LITERAL_STRING("")); // Default name is blank
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
if (element) {
nsCOMPtr<nsIDOMNodeList> captions;
element->GetElementsByTagName(NS_LITERAL_STRING("caption"), getter_AddRefs(captions));
if (captions) {
nsCOMPtr<nsIDOMNode> captionNode;
captions->Item(0, getter_AddRefs(captionNode));
if (captionNode) {
element = do_QueryInterface(captionNode);
NS_ASSERTION(element, "No nsIDOMElement for caption node!");
element->GetAttribute(NS_LITERAL_STRING("label"), _retval) ;
}
}
}
return NS_OK;
}
/**
* progressmeter
*/
NS_IMPL_ISUPPORTS_INHERITED1(nsXULProgressMeterAccessible, nsFormControlAccessible, nsIAccessibleValue)
nsXULProgressMeterAccessible::nsXULProgressMeterAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsXULProgressMeterAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PROGRESSBAR;
return NS_OK;
}
/**
* No states supported for progressmeter
*/
NS_IMETHODIMP nsXULProgressMeterAccessible::GetAccState(PRUint32 *_retval)
{
*_retval =0;
return NS_OK;
}
NS_IMETHODIMP nsXULProgressMeterAccessible::GetAccValue(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No element for DOM node!");
element->GetAttribute(NS_LITERAL_STRING("value"), _retval);
if (!_retval.IsEmpty() && _retval.Last() != '%')
_retval.Append(NS_LITERAL_STRING("%"));
return NS_OK;
}
/* readonly attribute double maximumValue; */
NS_IMETHODIMP nsXULProgressMeterAccessible::GetMaximumValue(double *aMaximumValue)
{
*aMaximumValue = 1; // 100% = 1;
return NS_OK;
}
/* readonly attribute double minimumValue; */
NS_IMETHODIMP nsXULProgressMeterAccessible::GetMinimumValue(double *aMinimumValue)
{
*aMinimumValue = 0;
return NS_OK;
}
/* readonly attribute double currentValue; */
NS_IMETHODIMP nsXULProgressMeterAccessible::GetCurrentValue(double *aCurrentValue)
{
nsAutoString currentValue;
GetAccValue(currentValue);
PRInt32 error;
*aCurrentValue = currentValue.ToFloat(&error) / 100;
return NS_OK;
}
/* boolean setCurrentValue (in double value); */
NS_IMETHODIMP nsXULProgressMeterAccessible::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.Append(NS_LITERAL_STRING("%"));
if (NS_SUCCEEDED(element->SetAttribute(NS_LITERAL_STRING("value"), valueString))) {
*_retval = PR_TRUE;
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/**
* XUL Radio Button
*/
/** Constructor */
nsXULRadioButtonAccessible::nsXULRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsRadioButtonAccessible(aNode, aShell)
{
}
/** Our only action is to click */
NS_IMETHODIMP nsXULRadioButtonAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMXULSelectControlItemElement> radioButton(do_QueryInterface(mDOMNode));
if (radioButton) {
radioButton->Click();
return NS_OK;
}
}
return NS_ERROR_INVALID_ARG;
}
/** We are Focusable and can be Checked and focused */
NS_IMETHODIMP nsXULRadioButtonAccessible::GetAccState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
PRBool selected = PR_FALSE; // Radio buttons can be selected
nsCOMPtr<nsIDOMXULSelectControlItemElement> radioButton(do_QueryInterface(mDOMNode));
if (radioButton)
radioButton->GetSelected(&selected);
if (selected) {
*_retval |= STATE_CHECKED;
// If our parent radio group is focused, then consider this radio button focused
nsCOMPtr<nsIDOMNode> parentNode;
mDOMNode->GetParentNode(getter_AddRefs(parentNode));
if (parentNode) {
nsCOMPtr<nsIDOMNode> focusedNode;
GetFocusedNode(getter_AddRefs(focusedNode));
if (focusedNode == parentNode)
*_retval |= STATE_FOCUSED;
}
}
return NS_OK;
}
/**
* This gets the parent of the RadioGroup (our grandparent) and sets it
* as our parent, for future calls.
*/
NS_IMETHODIMP nsXULRadioButtonAccessible::GetAccParent(nsIAccessible ** aAccParent)
{
if (! mParent) {
nsCOMPtr<nsIAccessible> tempParent;
nsAccessible::GetAccParent(getter_AddRefs(tempParent));
if (tempParent)
tempParent->GetAccParent(getter_AddRefs(mParent));
}
NS_ASSERTION(mParent,"Whoa! This RadioButtonAcc doesn't have a parent! Better find out why.");
*aAccParent = mParent;
NS_ADDREF(*aAccParent);
return NS_OK;
}
/**
* XUL Radio Group
* The Radio Group proxies for the Radio Buttons themselves. The Group gets
* focus whereas the Buttons do not. So we only have an accessible object for
* this for the purpose of getting the proper RadioButton. Need this here to
* avoid circular reference problems when navigating the accessible tree and
* for getting to the radiobuttons.
*/
/** Constructor */
nsXULRadioGroupAccessible::nsXULRadioGroupAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsXULRadioGroupAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_GROUPING;
return NS_OK;
}
NS_IMETHODIMP nsXULRadioGroupAccessible::GetAccState(PRUint32 *_retval)
{
// The radio group is not focusable.
// Sometimes the focus controller will report that it is focused.
// That means that the actual selected radio button should be considered focused
nsAccessible::GetAccState(_retval);
*_retval &= ~(STATE_FOCUSABLE | STATE_FOCUSED);
return NS_OK;
}
/**
* XUL StatusBar: can contain arbitrary HTML content
*/
/**
* Default Constructor
*/
nsXULStatusBarAccessible::nsXULStatusBarAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/**
* We are a statusbar
*/
NS_IMETHODIMP nsXULStatusBarAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_STATUSBAR;
return NS_OK;
}
NS_IMETHODIMP nsXULStatusBarAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = 0; // no special state flags for status bar
return NS_OK;
}

View File

@@ -0,0 +1,139 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsXULFormControlAccessible_H_
#define _nsXULFormControlAccessible_H_
// NOTE: alphabetically ordered
#include "nsBaseWidgetAccessible.h"
#include "nsFormControlAccessible.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsIAccessibleValue.h"
class nsXULButtonAccessible : public nsAccessible
// Don't inherit from nsFormControlAccessible - it doesn't allow children and a button can have a dropmarker child
{
public:
nsXULButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& aResult);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
class nsXULCheckboxAccessible : public nsFormControlAccessible
{
public:
nsXULCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
class nsXULDropmarkerAccessible : public nsFormControlAccessible
{
public:
nsXULDropmarkerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
private:
PRBool DropmarkerOpen(PRBool aToggleOpen);
};
class nsXULGroupboxAccessible : public nsAccessible
{
public:
nsXULGroupboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
};
class nsXULProgressMeterAccessible : public nsFormControlAccessible,
public nsIAccessibleValue
{
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEVALUE
public:
nsXULProgressMeterAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString &_retval);
};
class nsXULRadioButtonAccessible : public nsRadioButtonAccessible
{
public:
nsXULRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
class nsXULRadioGroupAccessible : public nsAccessible
{
public:
nsXULRadioGroupAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
class nsXULStatusBarAccessible : public nsAccessible
{
public:
nsXULStatusBarAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,378 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 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 "nsXULMenuAccessible.h"
#include "nsAccessible.h"
#include "nsIAccessible.h"
#include "nsIDOMElement.h"
#include "nsIDOMXULElement.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsIDOMKeyEvent.h"
#include "nsIPref.h"
#include "nsIServiceManager.h"
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
// ------------------------ Menu Item -----------------------------
nsXULMenuitemAccessible::nsXULMenuitemAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
// Focused?
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No DOM element for menu node!");
PRBool isFocused = PR_FALSE;
element->HasAttribute(NS_LITERAL_STRING("_moz-menuactive"), &isFocused);
if (isFocused)
*_retval |= STATE_FOCUSED;
// Has Popup?
nsAutoString tagName;
element->GetLocalName(tagName);
if (tagName.Equals(NS_LITERAL_STRING("menu")))
*_retval |= STATE_HASPOPUP;
nsAutoString menuItemType;
element->GetAttribute(NS_LITERAL_STRING("type"), menuItemType);
if (!menuItemType.IsEmpty()) {
// Selectable?
if (menuItemType.Equals(NS_LITERAL_STRING("radio")))
*_retval |= STATE_SELECTABLE;
// Checked?
PRBool isChecked = PR_FALSE;
element->HasAttribute(NS_LITERAL_STRING("checked"), &isChecked);
if (isChecked) {
if (*_retval & STATE_SELECTABLE)
*_retval |= STATE_SELECTED; // Use STATE_SELECTED for radio buttons
else *_retval |= STATE_CHECKED;
}
}
// Offscreen?
// If parent or grandparent menuitem is offscreen, then we're offscreen too
// We get it by replacing the current offscreen bit with the parent's
PRUint32 parentState = 0;
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccParent(getter_AddRefs(parentAccessible));
parentAccessible->GetAccState(&parentState);
*_retval &= ~STATE_OFFSCREEN; // clear the old OFFSCREEN bit
*_retval |= (parentState & STATE_OFFSCREEN); // or it with the parent's offscreen bit
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccName(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No DOM element for menu node!");
element->GetAttribute(NS_LITERAL_STRING("label"), _retval);
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccKeyboardShortcut(nsAString& _retval)
{
static PRInt32 gMenuAccesskeyModifier = -1; // magic value of -1 indicates unitialized state
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt) {
nsAutoString accesskey;
elt->GetAttribute(NS_LITERAL_STRING("accesskey"), accesskey);
if (accesskey.IsEmpty())
return NS_OK;
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccParent(getter_AddRefs(parentAccessible));
if (parentAccessible) {
PRUint32 role;
parentAccessible->GetAccRole(&role);
if (role == ROLE_MENUBAR) {
// If top level menu item, add Alt+ or whatever modifier text to string
// No need to cache pref service, this happens rarely
if (gMenuAccesskeyModifier == -1) { // Need to initialize cached global accesskey pref
gMenuAccesskeyModifier = 0;
nsresult result;
nsCOMPtr<nsIPref> prefService(do_GetService(kPrefCID, &result));
if (NS_SUCCEEDED(result) && prefService)
prefService->GetIntPref("ui.key.menuAccessKey", &gMenuAccesskeyModifier);
}
nsAutoString propertyKey;
switch (gMenuAccesskeyModifier) {
case nsIDOMKeyEvent::DOM_VK_CONTROL: propertyKey = NS_LITERAL_STRING("VK_CONTROL"); break;
case nsIDOMKeyEvent::DOM_VK_ALT: propertyKey = NS_LITERAL_STRING("VK_ALT"); break;
case nsIDOMKeyEvent::DOM_VK_META: propertyKey = NS_LITERAL_STRING("VK_META"); break;
}
if (!propertyKey.IsEmpty())
nsAccessible::GetFullKeyName(propertyKey, accesskey, _retval);
}
}
if (_retval.IsEmpty())
_retval = accesskey;
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_MENUITEM;
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccFirstChild(nsIAccessible **aAccFirstChild)
{
*aAccFirstChild = nsnull;
// Last argument of PR_FALSE indicates we don't walk anonymous children for menuitems
nsAccessibleTreeWalker walker(mPresShell, mDOMNode, mSiblingIndex, mSiblingList, PR_FALSE);
if (NS_SUCCEEDED(walker.GetFirstChild())) {
*aAccFirstChild = walker.mState.accessible;
NS_ADDREF(*aAccFirstChild);
}
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccLastChild(nsIAccessible **aAccLastChild)
{
*aAccLastChild = nsnull;
// Last argument of PR_FALSE indicates we don't walk anonymous children for menuitems
nsAccessibleTreeWalker walker(mPresShell, mDOMNode, mSiblingIndex, mSiblingList, PR_FALSE);
if (NS_SUCCEEDED(walker.GetLastChild())) {
*aAccLastChild = walker.mState.accessible;
NS_ADDREF(*aAccLastChild);
}
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
{
// Last argument of PR_FALSE indicates we don't walk anonymous children for menuitems
nsAccessibleTreeWalker walker(mPresShell, mDOMNode, mSiblingIndex, mSiblingList, PR_FALSE);
*aAccChildCount = walker.GetChildCount();
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Select) { // default action
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectItem(do_QueryInterface(mDOMNode));
if (selectItem)
selectItem->DoCommand();
else {
nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(mDOMNode));
if (xulElement) {
xulElement->Click();
}
}
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccParent(getter_AddRefs(parentAccessible));
if (parentAccessible) {
PRUint32 role;
parentAccessible->GetAccRole(&role);
if (role == ROLE_LIST) {
nsCOMPtr<nsIAccessible> buttonAccessible;
parentAccessible->GetAccPreviousSibling(getter_AddRefs(buttonAccessible));
PRUint32 state;
buttonAccessible->GetAccState(&state);
if (state & STATE_PRESSED)
buttonAccessible->AccDoAction(eAction_Click);
}
}
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/** select us! close combo box if necessary*/
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Select) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("select"), _retval);
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
// ------------------------ Menu Separator ----------------------------
nsXULMenuSeparatorAccessible::nsXULMenuSeparatorAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsXULMenuitemAccessible(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccState(PRUint32 *_retval)
{
// Isn't focusable, but can be offscreen
nsXULMenuitemAccessible::GetAccState(_retval);
*_retval &= STATE_OFFSCREEN;
return NS_OK;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccName(nsAString& _retval)
{
_retval.Assign(NS_LITERAL_STRING(""));
return NS_OK;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_SEPARATOR;
return NS_OK;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::AccDoAction(PRUint8 index)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccNumActions(PRUint8 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
// ------------------------ Menu Popup -----------------------------
nsXULMenupopupAccessible::nsXULMenupopupAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell): nsAccessible(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULMenupopupAccessible::GetAccState(PRUint32 *_retval)
{
// We are onscreen if our parent is active
*_retval = 0;
PRBool isActive = PR_FALSE;
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
element->HasAttribute(NS_LITERAL_STRING("menuactive"), &isActive);
if (!isActive) {
nsCOMPtr<nsIAccessible> parentAccessible;
nsCOMPtr<nsIDOMNode> parentNode;
GetAccParent(getter_AddRefs(parentAccessible));
if (parentAccessible)
parentAccessible->AccGetDOMNode(getter_AddRefs(parentNode));
element = do_QueryInterface(parentNode);
if (element)
element->HasAttribute(NS_LITERAL_STRING("open"), &isActive);
}
if (!isActive)
*_retval |= STATE_OFFSCREEN;
return NS_OK;
}
NS_IMETHODIMP nsXULMenupopupAccessible::GetAccName(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No element for popup node!");
while (element) {
element->GetAttribute(NS_LITERAL_STRING("label"), _retval);
if (!_retval.IsEmpty())
return NS_OK;
nsCOMPtr<nsIDOMNode> parentNode, node(do_QueryInterface(element));
if (!node)
return NS_ERROR_FAILURE;
node->GetParentNode(getter_AddRefs(parentNode));
element = do_QueryInterface(parentNode);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULMenupopupAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_MENUPOPUP;
return NS_OK;
}
// ------------------------ Menu Bar -----------------------------
nsXULMenubarAccessible::nsXULMenubarAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell): nsAccessible(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULMenubarAccessible::GetAccState(PRUint32 *_retval)
{
nsresult rv = nsAccessible::GetAccState(_retval);
*_retval &= ~STATE_FOCUSABLE; // Menu bar iteself is not actually focusable
return rv;
}
NS_IMETHODIMP nsXULMenubarAccessible::GetAccName(nsAString& _retval)
{
_retval = NS_LITERAL_STRING("menubar");
return NS_OK;
}
NS_IMETHODIMP nsXULMenubarAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_MENUBAR;
return NS_OK;
}

View File

@@ -0,0 +1,94 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsXULMenuAccessible_H_
#define _nsXULMenuAccessible_H_
#include "nsAccessible.h"
/* Accessible for supporting XUL menus
*/
class nsXULMenuitemAccessible : public nsAccessible
{
public:
nsXULMenuitemAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccKeyboardShortcut(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **aAccFirstChild);
NS_IMETHOD GetAccLastChild(nsIAccessible **aAccLastChild);
NS_IMETHOD GetAccChildCount(PRInt32 *aAccChildCount);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
};
class nsXULMenuSeparatorAccessible : public nsXULMenuitemAccessible
{
public:
nsXULMenuSeparatorAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
};
class nsXULMenupopupAccessible : public nsAccessible
{
public:
nsXULMenupopupAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
class nsXULMenubarAccessible : public nsAccessible
{
public:
nsXULMenubarAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,540 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@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 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 "nsCOMPtr.h"
#include "nsXULSelectAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMXULMenuListElement.h"
#include "nsIDOMXULMultSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIServiceManager.h"
#include "nsLayoutAtoms.h"
/**
* Selects, Listboxes and Comboboxes, are made up of a number of different
* widgets, some of which are shared between the two. This file contains
* all of the widgets for both of the Selects, for XUL only. Some of them
* extend classes from nsSelectAccessible.cpp, which contains base classes
* that are also extended by the XUL Select Accessibility support.
*
* Listbox:
* - nsXULListboxAccessible
* - nsXULSelectListAccessible
* - nsXULSelectOptionAccessible
*
* Comboboxes:
* - nsXULComboboxAccessible
* - nsHTMLTextFieldAccessible (editable) or nsTextAccessible (readonly)
* - nsXULComboboxButtonAccessible
* - nsXULSelectListAccessible
* - nsXULSelectOptionAccessible
*/
/** ------------------------------------------------------ */
/** Impl. of nsXULSelectableAccessible */
/** ------------------------------------------------------ */
// Helper methos
nsXULSelectableAccessible::nsXULSelectableAccessible(nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
}
NS_IMPL_ISUPPORTS_INHERITED1(nsXULSelectableAccessible, nsAccessible, nsIAccessibleSelectable)
NS_IMETHODIMP nsXULSelectableAccessible::ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState)
{
*aSelState = PR_FALSE;
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
if (xulMultiSelect) {
nsCOMPtr<nsIDOMNodeList> nodeList;
xulMultiSelect->GetChildNodes(getter_AddRefs(nodeList));
if (nodeList) {
nsCOMPtr<nsIDOMNode> node;
nodeList->Item(aIndex, getter_AddRefs(node));
nsCOMPtr<nsIDOMXULSelectControlItemElement> item(do_QueryInterface(node));
item->GetSelected(aSelState);
if (eSelection_Add == aMethod && !(*aSelState))
xulMultiSelect->AddItemToSelection(item);
else if (eSelection_Remove == aMethod && (*aSelState))
xulMultiSelect->RemoveItemFromSelection(item);
}
return NS_OK;
}
nsCOMPtr<nsIDOMXULSelectControlElement> xulSelect(do_QueryInterface(mDOMNode));
if (xulSelect) {
PRInt32 selIndex;
xulSelect->GetSelectedIndex(&selIndex);
if (selIndex == aIndex)
*aSelState = PR_TRUE;
if (eSelection_Add == aMethod && !(*aSelState))
xulSelect->SetSelectedIndex(aIndex);
else if (eSelection_Remove == aMethod && (*aSelState)) {
xulSelect->SetSelectedIndex(-1);
}
return NS_OK;
}
return NS_ERROR_FAILURE;
}
// Interface methods
NS_IMETHODIMP nsXULSelectableAccessible::GetSelectedChildren(nsISupportsArray **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
if (!accService)
return NS_ERROR_FAILURE;
nsCOMPtr<nsISupportsArray> selectedAccessibles;
NS_NewISupportsArray(getter_AddRefs(selectedAccessibles));
if (!selectedAccessibles)
return NS_ERROR_OUT_OF_MEMORY;
// For XUL multi-select control
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
if (xulMultiSelect) {
PRInt32 length = 0;
xulMultiSelect->GetSelectedCount(&length);
for (PRInt32 index = 0; index < length; index++) {
nsCOMPtr<nsIAccessible> tempAccessible;
nsCOMPtr<nsIDOMXULSelectControlItemElement> tempNode;
xulMultiSelect->GetSelectedItem(index, getter_AddRefs(tempNode));
nsCOMPtr<nsIDOMNode> tempDOMNode (do_QueryInterface(tempNode));
accService->CreateXULListitemAccessible(tempDOMNode, getter_AddRefs(tempAccessible));
if (tempAccessible)
selectedAccessibles->AppendElement(tempAccessible);
}
}
PRUint32 uLength = 0;
selectedAccessibles->Count(&uLength);
if (uLength != 0) { // length of nsISupportsArray containing selected options
*_retval = selectedAccessibles;
NS_ADDREF(*_retval);
}
return NS_OK;
}
// return the nth selected child's nsIAccessible object
NS_IMETHODIMP nsXULSelectableAccessible::RefSelection(PRInt32 aIndex, nsIAccessible **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
if (!accService)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMXULSelectControlItemElement> tempDOMNode;
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
if (xulMultiSelect)
xulMultiSelect->GetSelectedItem(aIndex, getter_AddRefs(tempDOMNode));
nsCOMPtr<nsIDOMXULSelectControlElement> xulSelect(do_QueryInterface(mDOMNode));
if (xulSelect && aIndex == 0)
xulSelect->GetSelectedItem(getter_AddRefs(tempDOMNode));
if (tempDOMNode) {
nsCOMPtr<nsIAccessible> tempAccess;
accService->CreateXULListitemAccessible(tempDOMNode, getter_AddRefs(tempAccess));
*_retval = tempAccess;
NS_ADDREF(*_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULSelectableAccessible::GetSelectionCount(PRInt32 *aSelectionCount)
{
*aSelectionCount = 0;
// For XUL multi-select control
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
if (xulMultiSelect)
return xulMultiSelect->GetSelectedCount(aSelectionCount);
// For XUL single-select control/menulist
nsCOMPtr<nsIDOMXULSelectControlElement> xulSelect(do_QueryInterface(mDOMNode));
if (xulSelect) {
PRInt32 index;
xulSelect->GetSelectedIndex(&index);
if (index >= 0)
*aSelectionCount = 1;
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULSelectableAccessible::AddSelection(PRInt32 aIndex)
{
PRBool isSelected;
return ChangeSelection(aIndex, eSelection_Add, &isSelected);
}
NS_IMETHODIMP nsXULSelectableAccessible::RemoveSelection(PRInt32 aIndex)
{
PRBool isSelected;
return ChangeSelection(aIndex, eSelection_Remove, &isSelected);
}
NS_IMETHODIMP nsXULSelectableAccessible::IsChildSelected(PRInt32 aIndex, PRBool *_retval)
{
*_retval = PR_FALSE;
return ChangeSelection(aIndex, eSelection_GetState, _retval);
}
NS_IMETHODIMP nsXULSelectableAccessible::ClearSelection()
{
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
if (xulMultiSelect)
return xulMultiSelect->ClearSelection();
nsCOMPtr<nsIDOMXULSelectControlElement> xulSelect(do_QueryInterface(mDOMNode));
if (xulSelect)
return xulSelect->SetSelectedIndex(-1);
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULSelectableAccessible::SelectAllSelection(PRBool *_retval)
{
*_retval = PR_TRUE;
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
if (xulMultiSelect)
return xulMultiSelect->SelectAll();
// otherwise, don't support this method
*_retval = PR_FALSE;
return NS_OK;
}
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/** ----- nsXULSelectListAccessible ----- */
/** Default Constructor */
nsXULSelectListAccessible::nsXULSelectListAccessible(nsIDOMNode* aDOMNode,
nsIWeakReference* aShell)
:nsAccessible(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULSelectListAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
}
/**
* As a nsXULSelectListAccessible we can have the following states:
* STATE_MULTISELECTABLE
* STATE_EXTSELECTABLE
*/
NS_IMETHODIMP nsXULSelectListAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = 0;
nsAutoString selectionTypeString;
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No nsIDOMElement for caption node!");
element->GetAttribute(NS_LITERAL_STRING("seltype"), selectionTypeString) ;
if (selectionTypeString.EqualsIgnoreCase("multiple"))
*_retval |= STATE_MULTISELECTABLE | STATE_EXTSELECTABLE;
return NS_OK;
}
/** ----- nsXULSelectOptionAccessible ----- */
/** Default Constructor */
nsXULSelectOptionAccessible::nsXULSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsXULMenuitemAccessible(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULSelectOptionAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LISTITEM;
return NS_OK;
}
/**
* As a nsXULSelectOptionAccessible we can have the following states:
* STATE_SELECTABLE
* STATE_SELECTED
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsXULSelectOptionAccessible::GetAccState(PRUint32 *_retval)
{
nsXULMenuitemAccessible::GetAccState(_retval);
nsCOMPtr<nsIDOMXULSelectControlItemElement> item(do_QueryInterface(mDOMNode));
PRBool isSelected = PR_FALSE;
item->GetSelected(&isSelected);
if (isSelected)
*_retval |= STATE_SELECTED;
return NS_OK;
}
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/** ----- nsXULListboxAccessible ----- */
/** Constructor */
nsXULListboxAccessible::nsXULListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsXULSelectableAccessible(aDOMNode, aShell)
{
}
/**
* Let Accessible count them up
*/
NS_IMETHODIMP nsXULListboxAccessible::GetAccChildCount(PRInt32 *_retval)
{
return nsAccessible::GetAccChildCount(_retval);
}
/**
* As a nsXULListboxAccessible we can have the following states:
* STATE_FOCUSED
* STATE_READONLY
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsXULListboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
// see if we are multiple select if so set ourselves as such
nsCOMPtr<nsIDOMElement> element (do_QueryInterface(mDOMNode));
if (element) {
nsAutoString selType;
element->GetAttribute(NS_LITERAL_STRING("seltype"), selType);
if (!selType.IsEmpty() && selType.Equals(NS_LITERAL_STRING("multiple")))
*_retval |= STATE_MULTISELECTABLE;
}
*_retval |= STATE_FOCUSABLE ;
return NS_OK;
}
/**
* Our value is the value of our ( first ) selected child. nsIDOMXULSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsXULListboxAccessible::GetAccValue(nsAString& _retval)
{
_retval.Truncate();
nsCOMPtr<nsIDOMXULSelectControlElement> select(do_QueryInterface(mDOMNode));
if (select) {
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectedItem;
select->GetSelectedItem(getter_AddRefs(selectedItem));
if (selectedItem)
return selectedItem->GetLabel(_retval);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULListboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
}
/** ----- nsXULListitemAccessible ----- */
/** Constructor */
nsXULListitemAccessible::nsXULListitemAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsXULMenuitemAccessible(aDOMNode, aShell)
{
}
/** Inherit the ISupports impl from nsAccessible, we handle nsIAccessibleSelectable */
NS_IMPL_ISUPPORTS_INHERITED0(nsXULListitemAccessible, nsXULMenuitemAccessible)
/**
* If there is a Listcell as a child ( not anonymous ) use it, otherwise
* default to getting the name from GetXULAccName
*/
NS_IMETHODIMP nsXULListitemAccessible::GetAccName(nsAString& _retval)
{
nsCOMPtr<nsIDOMNode> child;
if (NS_SUCCEEDED(mDOMNode->GetFirstChild(getter_AddRefs(child)))) {
nsCOMPtr<nsIDOMElement> childElement (do_QueryInterface(child));
if (childElement) {
nsAutoString tagName;
childElement->GetLocalName(tagName);
if (tagName.Equals(NS_LITERAL_STRING("listcell"))) {
childElement->GetAttribute(NS_LITERAL_STRING("label"), _retval);
return NS_OK;
}
}
}
return GetXULAccName(_retval);
}
/**
*
*/
NS_IMETHODIMP nsXULListitemAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LISTITEM;
return NS_OK;
}
/**
*
*/
NS_IMETHODIMP nsXULListitemAccessible::GetAccState(PRUint32 *_retval)
{
// nsAccessible::GetAccState(_retval); // get focused state
nsCOMPtr<nsIDOMXULSelectControlItemElement> listItem (do_QueryInterface(mDOMNode));
if (listItem) {
PRBool isSelected;
listItem->GetSelected(&isSelected);
if (isSelected)
*_retval |= STATE_SELECTED;
nsCOMPtr<nsIDOMNode> domParent;
mDOMNode->GetParentNode(getter_AddRefs(domParent));
nsCOMPtr<nsIDOMXULMultiSelectControlElement> parent(do_QueryInterface(domParent));
if (parent) {
nsCOMPtr<nsIDOMXULSelectControlItemElement> current;
parent->GetCurrentItem(getter_AddRefs(current));
if (listItem == current)
*_retval |= STATE_FOCUSED;
}
*_retval |= STATE_FOCUSABLE | STATE_SELECTABLE;
}
return NS_OK;
}
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/** ----- nsXULComboboxAccessible ----- */
/** Constructor */
nsXULComboboxAccessible::nsXULComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsXULSelectableAccessible(aDOMNode, aShell)
{
}
/** We are a combobox */
NS_IMETHODIMP nsXULComboboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_COMBOBOX;
return NS_OK;
}
/**
* We always have 3 children: TextField, Button, Window. In that order
*/
NS_IMETHODIMP nsXULComboboxAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 3;
return NS_OK;
}
/**
* As a nsComboboxAccessible we can have the following states:
* STATE_FOCUSED
* STATE_READONLY
* STATE_FOCUSABLE
* STATE_HASPOPUP
* STATE_EXPANDED
* STATE_COLLAPSED
*/
NS_IMETHODIMP nsXULComboboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mDOMNode));
if (menuList) {
PRBool isOpen;
menuList->GetOpen(&isOpen);
if (isOpen)
*_retval |= STATE_EXPANDED;
else
*_retval |= STATE_COLLAPSED;
}
*_retval |= STATE_HASPOPUP | STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/**
* Our value is the name of our ( first ) selected child. nsIDOMXULSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsXULComboboxAccessible::GetAccValue(nsAString& _retval)
{
// The first accessible child is the text accessible that contains the name of the selected element.
// This is our value
nsCOMPtr<nsIAccessible> firstChild;
GetAccFirstChild(getter_AddRefs(firstChild));
return firstChild->GetAccName(_retval);
}

View File

@@ -0,0 +1,184 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: Eric Vaughan (evaughan@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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsXULSelectAccessible_h__
#define __nsXULSelectAccessible_h__
#include "nsCOMPtr.h"
#include "nsIAccessibleSelectable.h"
#include "nsIDOMNode.h"
#include "nsIWeakReference.h"
#include "nsSelectAccessible.h"
#include "nsXULMenuAccessible.h"
/**
* Selects, Listboxes and Comboboxes, are made up of a number of different
* widgets, some of which are shared between the two. This file contains
* all of the widgets for both of the Selects, for XUL only. Some of them
* extend classes from nsSelectAccessible.cpp, which contains base classes
* that are also extended by the XUL Select Accessibility support.
*
* Listbox:
* - nsXULListboxAccessible
* - nsXULSelectListAccessible
* - nsXULSelectOptionAccessible
*
* Comboboxes:
* - nsXULComboboxAccessible <menulist />
* - nsHTMLTextFieldAccessible
* - nsXULComboboxButtonAccessible
* - nsXULSelectListAccessible <menupopup />
* - nsXULSelectOptionAccessible(s) <menuitem />
*/
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/*
* The basic implemetation of nsIAccessibleSelectable.
*/
class nsXULSelectableAccessible : public nsAccessible,
public nsIAccessibleSelectable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
nsXULSelectableAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULSelectableAccessible() {}
protected:
NS_IMETHOD ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState);
};
/*
* The list that contains all the options in the select.
*/
class nsXULSelectListAccessible : public nsAccessible
{
public:
nsXULSelectListAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULSelectListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
/*
* Options inside the select, contained within the list
*/
class nsXULSelectOptionAccessible : public nsXULMenuitemAccessible
{
public:
nsXULSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULSelectOptionAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
static nsresult GetFocusedOptionNode(nsIWeakReference *aPresShell, nsIDOMNode *aListNode, nsCOMPtr<nsIDOMNode>& aFocusedOptionNode);
};
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/*
* A class the represents the XUL Listbox widget.
*/
class nsXULListboxAccessible : public nsXULSelectableAccessible
{
public:
nsXULListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULListboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
};
/**
* Listitems -- used in listboxes
*/
class nsXULListitemAccessible : public nsXULMenuitemAccessible
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsXULListitemAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULListitemAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/*
* A class the represents the XUL Combobox widget.
*/
class nsXULComboboxAccessible : public nsXULSelectableAccessible
{
public:
nsXULComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULComboboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
};
#endif

View File

@@ -0,0 +1,321 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: 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 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 ***** */
// NOTE: alphabetically ordered
#include "nsAccessibilityService.h"
#include "nsXULTabAccessible.h"
#include "nsIContentViewer.h"
#include "nsIDocShell.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsIFrame.h"
#include "nsIPluginViewer.h"
#include "nsIScriptGlobalObject.h"
#include "nsIStyleContext.h"
#include "nsIWebShell.h"
#include "nsIWebShellWindow.h"
#include "nsplugindefs.h"
#include "nsPluginViewer.h"
/**
* XUL Tab
*/
/** Constructor */
nsXULTabAccessible::nsXULTabAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsLeafAccessible(aNode, aShell)
{
}
/**
* Might need to use the GetXULAccName method from nsFormControlAcc.cpp
*/
NS_IMETHODIMP nsXULTabAccessible::GetAccName(nsAString& _retval)
{
nsCOMPtr<nsIDOMXULSelectControlItemElement> tab(do_QueryInterface(mDOMNode));
if (tab)
return GetXULAccName(_retval);
return NS_ERROR_FAILURE;
}
/** Only one action available */
NS_IMETHODIMP nsXULTabAccessible::GetAccNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/** Return the name of our only action */
NS_IMETHODIMP nsXULTabAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("switch"), _retval);
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/** Tell the tab to do it's action */
NS_IMETHODIMP nsXULTabAccessible::AccDoAction(PRUint8 index)
{
if (index == eAction_Switch) {
nsCOMPtr<nsIDOMXULSelectControlItemElement> tab(do_QueryInterface(mDOMNode));
if ( tab )
{
tab->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/** We are a tab */
NS_IMETHODIMP nsXULTabAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PAGETAB;
return NS_OK;
}
/**
* Possible states: focused, focusable, unavailable(disabled), offscreen
*/
NS_IMETHODIMP nsXULTabAccessible::GetAccState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsLeafAccessible::GetAccState(_retval);
// In the past, tabs have been focusable in classic theme
// They may be again in the future
// Check style for -moz-user-focus: normal to see if it's focusable
*_retval &= ~STATE_FOCUSABLE;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mPresShell));
if (presShell && content) {
nsIFrame *frame = nsnull;
const nsStyleUserInterface* ui;
presShell->GetPrimaryFrameFor(content, &frame);
if (frame) {
frame->GetStyleData(eStyleStruct_UserInterface, ((const nsStyleStruct*&)ui));
if (ui->mUserFocus == NS_STYLE_USER_FOCUS_NORMAL)
*_retval |= STATE_FOCUSABLE;
}
}
return NS_OK;
}
/**
* XUL TabBox
* to facilitate naming of the tabPanels object we will give this the name
* of the selected tab in the tabs object.
*/
/** Constructor */
nsXULTabBoxAccessible::nsXULTabBoxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell)
{
}
/** We are a window*/
NS_IMETHODIMP nsXULTabBoxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_WINDOW;
return NS_OK;
}
/** Possible states: normal */
NS_IMETHODIMP nsXULTabBoxAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = 0;
return NS_OK;
}
/** 2 children, tabs, tabpanels */
NS_IMETHODIMP nsXULTabBoxAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 2;
return NS_OK;
}
/**
* XUL TabPanels
* XXX jgaunt -- this has to report the info for the selected child, reachable through
* the DOMNode. The TabPanels object has as its children the different
* vbox/hbox/whatevers that provide what you look at when you click on
* a tab.
* Here is how this will work: when asked about an object the tabPanels object will find
* out the selected child and create the tabPanel object using the child. That should wrap
* any XUL/HTML content in the child, since it is a simple nsAccessible basically.
* or maybe we just do that on creation. Not use the DOMnode we are given, but cache the selected
* DOMnode and then run from there.
*/
/** Constructor */
nsXULTabPanelsAccessible::nsXULTabPanelsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(aNode, aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1"))
{
}
/** We are a Property Page */
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PROPERTYPAGE;
return NS_OK;
}
/**
* Possible values: unavailable
*/
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccState(PRUint32 *_retval)
{
// get focus and disable status from base class -- skip container because we have state
nsAccessible::GetAccState(_retval);
*_retval &= ~STATE_FOCUSABLE;
return NS_OK;
}
/**
* The name for the panel is the name from the tab associated with
* the panel. XXX not sure if the "panels" object should have the
* same name.
*/
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccName(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
nsAccessible::GetAccFirstChild(_retval);
if (*_retval == nsnull)
GetAccPluginChild(_retval);
return NS_OK;
}
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccLastChild(nsIAccessible **_retval)
{
nsAccessible::GetAccLastChild(_retval);
if (*_retval == nsnull)
GetAccPluginChild(_retval);
return NS_OK;
}
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccChildCount(PRInt32 *_retval)
{
nsAccessible::GetAccChildCount(_retval);
if (*_retval == 0) {
*_retval = 1;
}
return NS_OK;
}
nsresult nsXULTabPanelsAccessible::GetAccPluginChild(nsIAccessible **_retval)
{
// this big mess eventually gets the HWND for the full
// page plugin, and creates the shim class so we can
// get the IAccessible from the system in the widget/src code
nsCOMPtr<nsIDOMDocument> domDoc;
mDOMNode->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
if (doc) {
nsCOMPtr<nsIScriptGlobalObject> globalObj;
doc->GetScriptGlobalObject(getter_AddRefs(globalObj));
if (globalObj) {
nsCOMPtr<nsIDocShell> docShell;
globalObj->GetDocShell(getter_AddRefs(docShell));
nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(docShell));
if (webShell) {
nsCOMPtr<nsIWebShellContainer> container;
webShell->GetContainer(*getter_AddRefs(container));
nsCOMPtr<nsIWebShellWindow> wsWin(do_QueryInterface(container));
if (wsWin) {
nsCOMPtr<nsIWebShell> contentShell;
wsWin->GetContentWebShell(getter_AddRefs(contentShell));
nsCOMPtr<nsIDocShell> contentDocShell(do_QueryInterface(contentShell));
if (contentDocShell) {
nsCOMPtr<nsIContentViewer> contentViewer;
contentDocShell->GetContentViewer(getter_AddRefs(contentViewer));
nsCOMPtr<nsIPluginViewer> pluginViewer (do_QueryInterface(contentViewer));
if (pluginViewer) {
nsIPluginViewer *pViewer = pluginViewer.get();
PluginViewerImpl *viewer = (PluginViewerImpl*)pViewer;
#ifdef XP_WIN
// Plugin code tends to be very platform specific, need to rev this
// when linux/mac plugins come into the picture HWND == windows
HWND pluginPort = nsnull;
viewer->GetPluginPort(&pluginPort);
if (pluginPort != 0) {
if (mAccService) {
mAccService->CreateHTMLNativeWindowAccessible(mDOMNode, mPresShell, (PRInt32)pluginPort, _retval);
return NS_OK;
}
}
#else
*_retval = nsnull;
#endif
}
}
}
}
}
}
return NS_ERROR_FAILURE;
}
/**
* XUL Tabs - the s really stands for strip. this is a collection of tab objects
*/
/** Constructor */
nsXULTabsAccessible::nsXULTabsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsContainerAccessible(aNode, aShell)
{
}
/** We are a Page Tab List */
NS_IMETHODIMP nsXULTabsAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PAGETABLIST;
return NS_OK;
}

View File

@@ -0,0 +1,107 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsXULTabAccessible_H_
#define _nsXULTabAccessible_H_
// NOTE: alphabetically ordered
#include "nsBaseWidgetAccessible.h"
#include "nsFormControlAccessible.h"
#include "nsHTMLFormControlAccessible.h"
/** An individual tab */
class nsXULTabAccessible : public nsLeafAccessible
{
public:
nsXULTabAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
/**
* Contains a tabs object and a tabPanels object. A complete
* entity with relationships between tabs and content to
* be displayed in the tabpanels object
*/
class nsXULTabBoxAccessible : public nsAccessible
{
public:
nsXULTabBoxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
};
/**
* Represents the content area associated with the tabs object (when
* used together)
*/
class nsXULTabPanelsAccessible : public nsAccessible
{
public:
nsXULTabPanelsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
protected:
nsresult GetAccPluginChild(nsIAccessible **_retval);
// data members
nsCOMPtr<nsIDOMNode> mGParentDOMNode;
nsCOMPtr<nsIDOMNode> mParentDOMNode;
nsCOMPtr<nsIAccessibilityService> mAccService;
};
/** merely a container of tab obejcts */
class nsXULTabsAccessible : public nsContainerAccessible
{
public:
nsXULTabsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,70 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: 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 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 ***** */
// NOTE: alphabetically ordered
#include "nsIDOMXULDescriptionElement.h"
#include "nsWeakReference.h"
#include "nsXULTextAccessible.h"
/**
* For XUL descriptions and labels
*/
nsXULTextAccessible::nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsTextAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsXULTextAccessible::GetAccName(nsAString& _retval)
{
nsCOMPtr<nsIDOMXULDescriptionElement> descriptionElement(do_QueryInterface(mDOMNode));
if (descriptionElement) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
return AppendFlatStringFromSubtree(content, &_retval);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULTextAccessible::GetAccState(PRUint32 *_retval)
{
// Labels and description can only have read only state
// They are not focusable or selectable
*_retval = STATE_READONLY;
return NS_OK;
}

View File

@@ -0,0 +1,56 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: 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 NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsXULTextAccessible_H_
#define _nsXULTextAccessible_H_
#include "nsTextAccessible.h"
class nsIWeakReference;
class nsXULTextAccessible : public nsTextAccessible
{
public:
nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: 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 ***** */
#ifndef __nsXULTreeAccessible_h__
#define __nsXULTreeAccessible_h__
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
#include "nsCOMPtr.h"
#include "nsIDOMNode.h"
#include "nsIWeakReference.h"
#include "nsITreeBoxObject.h"
#include "nsITreeView.h"
#include "nsXULSelectAccessible.h"
#include "nsIAccessibleTable.h"
/*
* A class the represents the XUL Tree widget.
*/
class nsXULTreeAccessible : public nsXULSelectableAccessible,
public nsIAccessibleTable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
NS_DECL_NSIACCESSIBLETABLE
nsXULTreeAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULTreeAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
static void GetTreeBoxObject(nsIDOMNode* aDOMNode, nsITreeBoxObject** aBoxObject);
private:
nsCOMPtr<nsITreeBoxObject> mTree;
nsCOMPtr<nsITreeView> mTreeView;
nsCOMPtr<nsIAccessible> mCaption;
nsString mSummary;
NS_IMETHOD ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState);
};
/**
* Treeitems -- used in Trees
*/
class nsXULTreeitemAccessible : public nsLeafAccessible
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsXULTreeitemAccessible(nsIAccessible *aParent, nsIDOMNode *aDOMNode, nsIWeakReference *aShell, PRInt32 aRow, PRInt32 aColumn = -1);
virtual ~nsXULTreeitemAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccId(PRInt32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD AccRemoveSelection(void);
NS_IMETHOD AccTakeSelection(void);
NS_IMETHOD AccTakeFocus(void);
private:
nsCOMPtr<nsITreeBoxObject> mTree;
nsCOMPtr<nsITreeView> mTreeView;
PRInt32 mRow, mColumnIndex;
nsString mColumn;
};
class nsXULTreeColumnsAccessible : public nsAccessible,
public nsIAccessibleTable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLETABLE
nsXULTreeColumnsAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULTreeColumnsAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
private:
nsCOMPtr<nsIAccessible> mCaption;
nsString mSummary;
};
class nsXULTreeColumnitemAccessible : public nsLeafAccessible
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsXULTreeColumnitemAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULTreeColumnitemAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
};
#endif

16
mozilla/aclocal.m4 vendored Normal file
View File

@@ -0,0 +1,16 @@
dnl
dnl Local autoconf macros used with mozilla
dnl The contents of this file are under the Public Domain.
dnl
builtin(include, build/autoconf/glib.m4)dnl
builtin(include, build/autoconf/gtk.m4)dnl
builtin(include, build/autoconf/libIDL.m4)dnl
builtin(include, build/autoconf/nspr.m4)dnl
builtin(include, build/autoconf/libart.m4)dnl
builtin(include, build/autoconf/pkg.m4)dnl
builtin(include, build/autoconf/freetype2.m4)dnl
dnl
define(MOZ_TOPSRCDIR,.)dnl MOZ_TOPSRCDIR is used in altoptions.m4
builtin(include, build/autoconf/altoptions.m4)dnl

1239
mozilla/allmakefiles.sh Executable file

File diff suppressed because it is too large Load Diff

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