Compare commits

..

511 Commits

Author SHA1 Message Date
syd%netscape.com
9ef1ad9fbc Checked in patch for bug 148889, approval to PR1_BRANCH from ADT.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@123483 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 00:48:57 +00:00
syd%netscape.com
10b01c369c Checked in patch for 135737. approval from adt, reviews noted in bug
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@123188 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 21:09:42 +00:00
sspitzer%netscape.com
104c8fe8d7 fix for bugscape bug #15485. turbo users can get password prompts
for AOL mail and netscape web mail accounts *after* they exit.
r/sr=mscott.  a=putterman


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@121355 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-12 21:17:16 +00:00
bryner%netscape.com
34f7e107ff Fix undefined entities in hiddenWindow.xul, the cause of missing menus on Mac when no windows are open (bug 143141). r=jag, sr=hewitt, a=asa.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@121233 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 01:20:04 +00:00
cltbld%netscape.com
a3bebc6b0f updated to pull from the branch. ycalonje checking in as cltbld
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@121208 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 22:55:31 +00:00
(no author)
9c8991cc44 This commit was manufactured by cvs2svn to create branch
'NETSCAPE_7_0_PR1_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@121159 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 06:51:34 +00:00
shanjian%netscape.com
21b640baee #143132 Installation failed when installing under some locales
removed dependency on charset conversion modules.
r=syd, sr=mscott a=asa, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121158 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 06:51:33 +00:00
darin%netscape.com
aa9bee63fc fixes bug 139817 "M1RC1 topcrash [@ nsHttpChannel::OnStartRequest]"
r=gordon sr=jst a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121157 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 06:43:49 +00:00
bryner%netscape.com
35b56c75c2 Don't crash if the view manager has gone away before a menu popup is dismissed. Bug 126277, r=ben, sr=hyatt, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121156 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 05:21:48 +00:00
bryner%netscape.com
6991439448 Fix positioning of XUL popups inside an iframe. Bug 129782, r=pavlov, sr=ben, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121153 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 05:19:23 +00:00
jst%netscape.com
7bee723d56 Fixing bug 143088. Freezing the interfaces nsIDOMWindow, nsIDOMWindowCollection, and nsIDOMBarProp. Comment changes only, no real code changes. r=fabian@bluishgecko.net, sr=vidur@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121151 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 04:47:15 +00:00
jst%netscape.com
df2a5275d4 Fixing bug 140462. String manipulation problems in the fragment getters for nsIURI that caused problems when accessing href.pathname n' friends. r=bbaetz@student.usyd.edu.au, sr=darin@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121149 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 03:24:46 +00:00
bzbarsky%mit.edu
aff4e0bb2f Bug 139624 (minor fixes to view-source menus). Patch by
gregvalure@yahoo.com (Greg Valure), r=bzbarsky, sr=alecf, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121144 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 02:55:53 +00:00
dougt%netscape.com
b81d803390 Fix for 117628. DNS reset on failure. r=brendan, sr=darin, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121141 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 02:24:12 +00:00
darin%netscape.com
ab6ac0a31d fixes bug 142843 "mozilla ignores 'Expires: 0' and 'Pragma: no-cache' when
sent with a 'Last-Modified' header"
r=bbaetz sr=rpotts a=valeski,chofmann ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121128 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-09 00:01:12 +00:00
cotter%netscape.com
472d6e0cfb ongoing s help content updates per bugzilla 122806 & ADT, r=oeschger; misc. privacy & security content & formatting updates
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121125 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 23:29:29 +00:00
(no author)
d0c0a6a921 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121123 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 23:25:41 +00:00
seawood%netscape.com
72900e0edb BeOS needs unistd.h for read() and friends.
Fixing tinderbox bustage.
Bug #109913 a=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121120 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 23:20:48 +00:00
ben%netscape.com
cbe2249b39 bug 129980 - crash right clicking while loading victoria's secret page.
A must fix!
Patch by hewitt@netscape.com, r=peterl, sr=ben@netscape.com, contact selmer@netscape.com for any questions ;-)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121056 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 09:25:35 +00:00
ssu%netscape.com
ab0aa7118c fixing bug 142805 - Installation failed when installing 1.0 build on JA RH 7.1. r=dprice sr=jag a=leaf, adt1.0.0
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121051 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 07:33:44 +00:00
mstoltz%netscape.com
a4c3785f50 Bug 133170 - Do a same-origin security check after redirects on XMLHttpRequest
and document.load calls. Also enable HTTP basic-auth dialog for both functions.
r=heikki, jst sr=jband, a=chofmann, putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121049 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 06:30:55 +00:00
leaf%mozilla.org
28fea7fe7d allow pulling by using MOZ_DATE in addition to the usual branch tag.
bug 142906, a=asa, r=cls


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121043 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 05:53:09 +00:00
dbragg%netscape.com
ba98c54594 localeVersion update for RC2. Using string 1.0.0rc2. Fixes bug 142823 r=tao, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121029 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-08 01:19:10 +00:00
jaggernaut%netscape.com
2250ff40dc Bug 142871: Need way to override navigator window title, r=bryner, sr=alecf, a=drivers, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121019 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 23:43:59 +00:00
jkeiser%netscape.com
e2b8fd356a Allow javascript URI form submits to call .submit(). bug 139798, r=alexsavulov@netscape.com, sr=attinasi@netscape.com, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121001 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 22:47:13 +00:00
caillon%returnzero.com
a33ccabd1e 142711, add a trailing slash to the default homepage to avoid an extra connection for the user and save some load on the server. r=timeless, sr=shaver, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120997 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 22:16:13 +00:00
brendan%mozilla.org
3c96562702 Avoid toSource bloat in e.stack; fix related crash due to unrooted errObject in js_ErrorToException (139316, r=rginda, sr=shaver).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120991 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 21:59:56 +00:00
jaggernaut%netscape.com
80bafa48f9 Bug 129428: Paste doesn't work in bookmark manager. Patch by ben@netscape.com, r=pierrechanial@netscape.net, sr=jag, a=drivers, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120988 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 21:55:49 +00:00
bienvenu%netscape.com
ef779b7b11 checking in fix for 141028 from trunk, shutdown crash in nsMsgDatabase a=drivers
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120947 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 14:53:11 +00:00
kaie%netscape.com
b1ac5dd228 b=139329 Crashes trying to send signed mail.
r=javi sr=alecf a=asa adt=jaimejr


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120933 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 09:39:13 +00:00
brendan%mozilla.org
db876e378d Fix script attribute handling so type trumps language (135493, r=heikki, sr=jst, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120927 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 09:08:29 +00:00
racham%netscape.com
ea4c27d979 Fixing bug 142627. Making copies and folders settings to hold. Landing for Navin. r=bhuvan, sr=bienvenu, a=asa,adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120922 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 07:30:17 +00:00
rginda%netscape.com
9bed9c8290 bug 140088, "Chatzilla is crashing when switching tabs."
patch=jst, r=rginda, sr=hyatt, a=asa
clear element box object when the element is removed from the document.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120918 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 03:24:13 +00:00
dprice%netscape.com
6d752f5d9b 142170 r=ssu sr=jag adt=jaime a=asa
add message= flag to RunApp sections of .ini files

142282 r=ssu,syd,dprice sr=mscott adt=jaime a=chofmann
add supercede attribute to Components sections of .ini files


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120914 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 02:44:12 +00:00
dougt%netscape.com
8fc073e52b Relanding dveditz's xpinstall/unicode patch. bugs 142107/125107 r=dougt, sr=alecf, a=asa/chofmann, adt=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120886 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-06 22:10:05 +00:00
saari%netscape.com
5a31496eb0 fix form bugzilla 142138, adding null checks to prevent embedding layer from exploding when processing an activate event during window teardown. sr=jag, r=chak, adt and driver approved, kid tested
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120852 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-06 19:36:22 +00:00
bzbarsky%mit.edu
3519bd22cf 140262 - context menu for input type=password should include
paste. r=biesi sr=blake, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120804 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 22:43:59 +00:00
blakeross%telocity.com
cb38baf4c8 137815 - crash hitting enter key before panel content finishes loading [@nsTreeSelection::FireOnSelectHandler]. r=bryner sr=ben a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120801 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 20:34:35 +00:00
sgehani%netscape.com
dd53284abb Disable dropping onto toolbar folders on unices.
b=96504; r=law; sr=blizzard; a=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120800 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 18:30:12 +00:00
darin%netscape.com
0b3df0b317 cleaning up documentation, marking some interfaces frozen, and splitting
up some interfaces into separate IDL files (b=124465)
reviewed by dougt and bbaetz


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120799 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 17:55:27 +00:00
bryner%netscape.com
fd5e4b32c1 Checking mkaply's OS/2 bustage fix into the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120795 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-05 03:34:22 +00:00
bryner%netscape.com
b8ed7d5184 Make the XUL cache lock gc'ing of script objects while they are in the cache, to prevent pulling out a bogus JSObject. Bug 132216, r=waterson, sr=brendan, a=asa (and hopefully no OS/2 bustage this time).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120791 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 19:06:54 +00:00
bryner%netscape.com
6c88206d50 Adding the functions JS_LockGCThingRT and JS_UnlockGCThingRT, which are variants that only require a JSRuntime, not a JSContext. Converted some internal callers to use the new interface. Bug 141356, patch from shaver, r=bryner, sr=brendan, a=asa (via bug 132216).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120784 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 07:54:59 +00:00
ducarroz%netscape.com
6300150636 Fix for bug 137627. Need to check for null pointer to avoid to crash in some specific cases.
R=kaie, SR=sspitzer, A=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120775 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 01:29:31 +00:00
oeschger%netscape.com
fa48dfcca2 updating help content, dispensation per 122806: adding entries to search database, r=cotter
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120774 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 01:28:49 +00:00
mscott%netscape.com
8ae38475b0 Bug #121583 --> work around the infinite reflow loop in various windows that use tree widgets by
forcing a min height and min width on the the tree. This fixes the famous 100 % CPU hang.

Patch from kin@netscape.com
r=mscott
sr=hyatt
a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120763 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:35:18 +00:00
ssu%netscape.com
d8b7e7f848 fixing bug 141858 - unexpected setup\setup.exe error message after installing browser, r=dprice, sr=mscott, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120760 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:20:03 +00:00
yokoyama%netscape.com
89fbc40586 Bug 139842
Mail/News only.  Freeze when user scroll the msg header.
- infinite loop caused by creating an invalid UTF-8 string.
- invalid UTF-8 string was created when Unicode Decoder failed.
/r=nhotta, /sr=bienvenu, /a=asa, /adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120757 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:13:56 +00:00
brendan%mozilla.org
3fca8a4975 Fix js_SetProtoOrParent to handle non-native and native-but-incompatible-class-change proto-setting scenarios (140164, r=khanson, sr=jband, a=rjesup).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120756 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:11:05 +00:00
rginda%netscape.com
e9031b6800 - venkman only -
bug 137327, r=caillon@returnzero.com,a=shaver
translate null to -1 in getParentIndex return, to avoid infinite loop


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120754 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:04:07 +00:00
rginda%netscape.com
efbd75a0b3 - cview only -
bug 137327, r=caillon@returnzero.com,a=shaver
translate null to -1 in getParentIndex return, to avoid infinite loop


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120753 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 00:03:28 +00:00
rginda%netscape.com
cb74781241 - chatzilla only -
correct the command name for the View->Open At Startup option


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120752 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 23:59:49 +00:00
(no author)
62ca5a2c59 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120746 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 23:27:34 +00:00
dougt%netscape.com
bb399b0937 Fixes 138254 and 138157. Both are related to ftp uploading and publishing. r=bbaetz sr=darin, a=scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120741 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 22:53:58 +00:00
leaf%mozilla.org
1bff3d0f84 missed some of dveditz's files
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120737 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 22:31:21 +00:00
timeless%mac.com
a672bca9fe 3.46 <wtc@netscape.com> 11 Apr 2002 11:34
Deleted a printf statement in the Neutrino builds. Bug 135692.
a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120735 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 22:05:12 +00:00
leaf%mozilla.org
8b85480c73 backing out dveditz's unapproved checkin (and pink's subsequent mac
build-bustage fix).


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120730 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 21:41:44 +00:00
pinkerton%netscape.com
c22abfef1a fix bustage, cast required for wchar_t.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120698 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 15:31:23 +00:00
dveditz%netscape.com
a65215f7d3 bug 125106,126276 make Installer (particularly Windows) work on localized OS's. Also fixes 84492 and bugscape 14315. r=dougt/sr=alecf.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120689 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 11:32:32 +00:00
rods%netscape.com
4c2e366f9b Add strnig for can't print xul docs error
Bug 136185 r=dcone sr=attinasi a=scc adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120688 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 11:07:43 +00:00
hyatt%netscape.com
fcc1b296a8 Fix for 121583. r=ben, sr=kin, adt=selmer
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120679 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 07:03:27 +00:00
mhammond%skippinet.com.au
954a04b866 Merge from trunk.
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120670 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 05:16:44 +00:00
smontagu%netscape.com
2b62bd490c Fix hang and crash when pressing ENTER in Hebrew text fields. Bug 95228, r=lkemmel@il.ibm.com, jkeiser; sr=waterson, attinasi; a=shaver,asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120668 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 05:02:29 +00:00
law%netscape.com
969733934b Bug 141330 (for branch); a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120661 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 04:10:47 +00:00
timeless%mac.com
92504d633b Bug 137171 XML-RPC bug handling dates with months 10 and over
patch by samuel@sieb.net r=rginda sr=sspitzer a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120659 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 04:09:59 +00:00
law%netscape.com
6345f05f54 Bug 141647 (for branch); ensure profile is selected when opening window; this is needed to handle command line options that include -turbo and some other option that causes a window to open; r=jelwell@netscape.com, sr=jaggernaut@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120650 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 03:15:36 +00:00
sspitzer%netscape.com
aaef08a0d4 fix for #140094. typo in attribute name leads to LDIF dataloss.
thanks to dp for the fix.  r=blizzard,sr=bienvenu,a=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120642 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 02:52:33 +00:00
sspitzer%netscape.com
bc513f36aa fix for bugzilla bug #137886. add support for re-migration of defunct
profiles.  r=ccarlen, sr=bievenu, a=chofmann.  thanks to ccarlen for the
initial patch.  by default, no re-migration for mozilla builds.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120637 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 02:33:39 +00:00
mhammond%skippinet.com.au
344a2a950f Merge from trunk.
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120628 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 01:32:51 +00:00
cotter%netscape.com
afd9deff38 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; minor updates for certs help.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120626 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 01:22:20 +00:00
mhammond%skippinet.com.au
21c1975abf Only support dynamic linking - finally works for both Windows and Linux :)
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120621 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 00:59:23 +00:00
pavlov%netscape.com
f01bb5c354 part of earlier checkin for timers. r=rjesup sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120600 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 23:00:10 +00:00
mkaply%us.ibm.com
5738f2de70 #141676
r=pedemonte, sr=blizzard, a=rjesup
OS/2 only - don't add the hidden window to the task list


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120598 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 22:58:01 +00:00
khanson%netscape.com
b1bcc03db3 Patch for Bug #138666, memory leak in jsdtoa.c, sr=brendan, r=khanson, a=chofmann, has adt approval
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120596 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 22:56:50 +00:00
pavlov%netscape.com
f57bfe8089 checking in bug 129953 into the 1.0 branch. part 2 of 2. r=rjesup sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120586 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 21:52:30 +00:00
pavlov%netscape.com
9696b2257b checking in bug 129953 into the 1.0 branch. part 1 of 2. r=rjesup sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120584 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 21:46:09 +00:00
blizzard%redhat.com
6308211d36 Use an nsFixedSizeAllocator to legalize the bit-packing's assumption that
all nsXULAttributes pointers will be 8-byte aligned. Bug 124335, r=brendan,
sr=waterson, a=rjesup (shaver's bug.)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120583 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 21:37:37 +00:00
pinkerton%netscape.com
087b513af8 remove portions of smfr's last scrolling optimization. the OffsetRgn calls seem un-necessary and caused problems with redrawing outliners and scrolling while windows overlapped the scrolled widget. r=sdagley/sr=beard/a=asa. bug# 141249
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120572 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 21:03:32 +00:00
rjesup%wgate.com
55781765c2 Bug 125489: mkdir issues causing problems with Privacy/Security & Tasks
menus. r=dougt  sr=brendan a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120571 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 20:59:43 +00:00
tor%cs.brown.edu
0b880c3f33 Bug 53597 - make gamma correction (or lack thereof) consistent.
r=dbaron, sr=brendan, a=roc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120568 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 20:40:35 +00:00
peterlubczynski%netscape.com
07c3528f53 Implementing plugin scanning in their installation folders and fixing Real Player in the components folder, bug 133282 r=av, sr=attinasi,waterson a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120567 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 20:40:10 +00:00
tor%cs.brown.edu
433f63c85f Bug 137694 - only create the 1-bit GC once we've created a 1-bit pixmap.
r=pavlov, sr=blizzard, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120566 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 20:37:48 +00:00
sicking%bigfoot.com
2c9d5ffb80 Bug 140687: Make substring() work for all startindexes.
r=Pike sr=jst a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120546 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 14:59:41 +00:00
rjesup%wgate.com
57359a5752 Bug 141718: 1.0 needs to have it's own start page. r=gerv, sr=shaver, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120545 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 14:53:14 +00:00
kaie%netscape.com
dd0a7ce7ea b=139948 SSL Tooltip not updated when going from one ssl site to another
r=javi sr=jag a=rjesup adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120532 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 07:58:59 +00:00
timeless%mac.com
0d02bd205a bug 139989, Fieldset needs prettier default border
patch by mabus@runbox.no, r=axel@pike.org, sr=ben, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120531 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 07:15:43 +00:00
mkaply%us.ibm.com
8cf733bbc1 #140574
r=mkaply, sr=blizzard, a=rjesup@wgate.com
OS/2 only - Remove unnecessary pixelscale - fix print preview scaling


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120520 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 03:22:50 +00:00
bryner%netscape.com
b5cb98b819 Fixing mach-o build bustage on MOZILLA_1_0_0_BRANCH. a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120516 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-02 03:17:58 +00:00
rbs%maths.uq.edu.au
90402b9a8c bug 121748 - stretch fences at a size that fully covers non-fences. Also improve the height of token elements such as <mi> when they involve symbol fonts with weird metrics, r=roc+moz, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120489 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:37:40 +00:00
brendan%mozilla.org
6423619c8f Followup fix for 138791, neil@parkwaycc.co.uk's superior bit-fu (r=rjesup, sr=waterson, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120488 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:35:46 +00:00
rginda%netscape.com
9209ff62fe bug 135455, Missing chatzilla icon in Window dropdown menu
patch=mailto:andreas.premstaller@uibk.ac.at, r=rginda,sr=ben,a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120482 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:06:19 +00:00
(no author)
a0d1145f8e This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120481 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:06:13 +00:00
rginda%netscape.com
74e73e10f3 bug 135455, Missing chatzilla icon in Window dropdown menu
patch=mailto:andreas.premstaller@uibk.ac.at, r=rginda,sr=ben,a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120480 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:06:12 +00:00
cavin%netscape.com
238feddbd6 Fix for 123804 and 138804. Put child folders in the pending list when parent folders are missing and process these child folders when parent folders show up. r=ducarroz, sr=sspitzer, a=rjesup@wgate.com, adt=jaimejr.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120477 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 23:04:10 +00:00
brendan%mozilla.org
a978be0193 Avoid opening and trying to reopen in CopyTo, so we work on FAT32 filesystems mounted on Linux (e.g.; 134163, r=dougt, sr=waterson, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120472 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 22:50:20 +00:00
naving%netscape.com
cb5b4b1b01 138297 r=bienvenu sr=mscott a=rjesup Fix problems with single profile filter for imap accts when using quick
launch. Don't null the filter list on server unless we are unloading it.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120471 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 22:47:23 +00:00
brendan%mozilla.org
3ec439a1fd Don't 'constant-fold' if(false)var foo=42 into nothing (140974, r=khanson, sr=shaver, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120469 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 22:40:14 +00:00
jkeiser%netscape.com
c16ff0faf0 Fix Mac radio button click / general event crasher. bug 134934, r=saari@netscape.com, sr=attinasi@netscape.com, a=chofmann
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120463 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 22:03:28 +00:00
ssu%netscape.com
506b99572b fixing bug 100822 - Shut down running browsers after download. r=curt sr=dveditz a=drivers,adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120460 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 21:51:09 +00:00
av%netscape.com
4679a340c1 Backing out changes from fixing bug 104611 as it may have caused a regression in page load time, see bug 141518
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120446 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 18:09:45 +00:00
bzbarsky%mit.edu
9bc7ddddf4 Landing Neil's fix for bug 132682 - Twisties aren't clickable in History
Sidebar, r=varga, sr=alecf, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120442 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 15:00:58 +00:00
mhammond%skippinet.com.au
a9d5b91669 Oops - screwed up last checking - windows tries to init/finalize twice!
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120434 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 14:03:24 +00:00
mhammond%skippinet.com.au
64a4b4e041 s/false/0/ - must have been in js mode :)
Not part of the build.  Global a= for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120433 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 14:02:24 +00:00
rods%netscape.com
bb57de0d36 This line got backed out of the trunk, but not the branch and should have
Discovered by Bug 140116
Bug 64165 r=jkeiser sr=attinasi a=asa adt=jamime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120430 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 13:03:22 +00:00
rods%netscape.com
ade3fc802f safety check to keep it from crashing
The safety checks in finalize_translation is the key to stopping the crash, but
the added ones in end_document are important also.
Bug 139369 r=dcone,roland sr=attinasi adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120427 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 11:36:07 +00:00
blizzard%redhat.com
c478573816 Bug #129591. nsWindow::Enabled is a no-op on GTK. Also fixes bug #65521 ([linux] modal dialogs should only freeze parent window (not all windows)) and bug #130855 (clicking on menuitem with submenu often activates an item on the submenu). Rewrite events to be much more sane. r=bryner, sr=jst, a=rjesup,shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120418 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 04:05:29 +00:00
dbaron%fas.harvard.edu
6d80075884 Rename Mozilla-extension values for real CSS properties to begin with -moz-. Remove some unused code. b=3935 r=hixie sr=waterson a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120417 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 03:55:40 +00:00
hewitt%netscape.com
3eb34b884b 134195 - trees don't work in builds installed over old builds, r=dbaron, sr=jag, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120415 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 03:15:50 +00:00
hewitt%netscape.com
4353adcf44 123834 - no text in wizard buttons on mac, r=andreww, sr=ben, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120409 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 03:02:56 +00:00
dbaron%fas.harvard.edu
8ce8efd86e Add command-line tool for parsing CSS files. b=139943 sr=waterson r=attinasi a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120407 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 02:54:11 +00:00
cotter%netscape.com
22af3d19b0 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. SDX & interface updates
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120399 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 02:34:47 +00:00
chak%netscape.com
3e667aeba3 Fix for #141247 - Enable HTML dir listings
r=dougt, sr=darin, a=adt, a=drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120391 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 02:01:11 +00:00
chak%netscape.com
9717ee655a Fixes #141235. Indexed-html converter doesn't handle parent directories for file protocol.
[Checking in for dougt]
r=chak@netscape.com, sr=darin@netscape.com, a=adt, a=drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120390 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 01:59:33 +00:00
darin%netscape.com
8bf0331753 fixes bug 141061 "XMLHttpRequest allows reading of local files"
r=mstoltz sr=heikki a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120379 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 01:20:13 +00:00
darin%netscape.com
131bb3f6bb fixes bug 138877 "Browser crashes if HREF contains entity #9619; M1RC1
topcrash [@ MSVCRT.DLL - PR_Free] [@ libc.so.6 - PR_Free]"
r=nhotta sr=rpotts a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120378 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 01:15:12 +00:00
bzbarsky%mit.edu
b0533dc7a4 Disable Link Toolbar on the branch only. Bug 138496, patch by
sballard@netreach.net (Stuart Ballard), r=bzbarsky, sr=jag, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120374 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 00:39:47 +00:00
dprice%netscape.com
2464767a0e 139641 r=ssu sr=dveditz a=rjesup adt=putterman
add flexable directory lookup to the install wizard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120371 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 00:22:38 +00:00
(no author)
b3ff479e57 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120366 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-01 00:03:58 +00:00
danm%netscape.com
8edc1bfe80 two new makefiles in xpfe/components/autocomplete/resources. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120350 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:37:55 +00:00
danm%netscape.com
9151441b62 process resources directory, Windows-only. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120349 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:36:45 +00:00
danm%netscape.com
e90f36f1ba process content directory. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120348 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:35:38 +00:00
danm%netscape.com
b085bafb64 force popup widget to be invisible when the menu is not explicitly open. bug 120155 r=bryner,hyatt a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120346 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:34:27 +00:00
danm%netscape.com
ab66163d40 new empty makefile to process jar.mn. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120345 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:33:16 +00:00
danm%netscape.com
f72164b69a windows-only override for autocomplete.css bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120343 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:32:05 +00:00
danm%netscape.com
0a3fb441b8 windows-only version with visibility:hidden rule. bug 120155 r=bryner,jag a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120342 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:31:31 +00:00
karnaze%netscape.com
ace6774c42 bug 138292 - add a non table related frame to its parent frame's child list when the parent frame is an anonymous table cell frame, a=rjesup, adt=putterman, sr=waterson, r=alexsavulov.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120341 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:21:58 +00:00
(no author)
90cc2ae2ad This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120339 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:10:23 +00:00
varada%netscape.com
486c6118e2 fix for 141314;associate the right smtp server with each account;r=racham;sr=sspitzer
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120337 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 22:08:39 +00:00
naving%netscape.com
84438fad56 139833 r=racham sr=sspitzer a=rjesup default sent/templates/drafts folder uri's should use internal names,
do not use localized names.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120332 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 21:37:57 +00:00
av%netscape.com
c9db4ed2fd Fixing 106411 -- 'Starting plugin...' message is stuck in the status bar, r=serge, sr=beard, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120321 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 20:54:11 +00:00
darin%netscape.com
0dd4d12051 fix assertion in nsHttpPipeline due to missing NS_INIT_ISUPPORTS... this
patch was meant to land along with yesterday's pipelining landing.
r=gagan sr=rpotts a=chofmann ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120315 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 20:08:30 +00:00
jkeiser%netscape.com
584cad73f4 Fix form restoration for pages with multiple forms. bug 138892, r=rods@netscape.com, sr=attinasi@netscape.com, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120314 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 19:52:45 +00:00
varga%utcru.sk
e851fcf629 Fix for bug 135002 - timing issues in the outliner content model.
r=bryner, sr=hewitt, adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120304 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 16:22:31 +00:00
rods%netscape.com
c8cd4c0142 forgot about this additional change
Bug 136185 r=dcone sr=attinasi a=asa adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120294 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 10:57:46 +00:00
rods%netscape.com
eed8ea112d temp fix so XUL document won't print
Bug 136185 r=dcone sr=attinasi a=asa adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120293 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 10:46:26 +00:00
law%netscape.com
0cdefef72b Bug 136188 (for branch); add support for WWW_GetWindowInfo DDE topic; r=John Weilander (support@kaylon.com); sr=roc+moz@cs.cmu.edu, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120290 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 07:57:42 +00:00
sspitzer%netscape.com
7bc93da4c9 fix build issue. thanks to jefft for the patch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120289 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 06:33:18 +00:00
mstoltz%netscape.com
6505f6ae3f Bug 140133 - Changing dangerous strcpy call to strncpy, and null-terminating
the result. r=nhotta, sr=heikki, a=asa, putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120286 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 04:18:32 +00:00
av%netscape.com
327e48530d Fixing 132430 -- Real JukeBox breaks the Plugin Finder Service, r=peterl, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120278 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 02:16:40 +00:00
av%netscape.com
ecc5bf01f7 Fixing 132430 -- Real JukeBox breaks the Plugin Finder Service, r=peterl, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120277 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 02:08:01 +00:00
av%netscape.com
56e1aee489 Fix 132430 -- Real JukeBox breaks the Plugin Finder Service, r=peterl, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120276 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 02:06:14 +00:00
law%netscape.com
01f4d66b6b Bug 141068; turn on the pref that will cause exit when last window closes in turbo mode, if the user has multiple profiles, r=sgehani@netscape.com, sr=jaggernaut@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120275 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 01:55:45 +00:00
darin%netscape.com
e5e4f0b26c fixes bug 93054 "implement HTTP/1.1 pipelining" (disabled by default)
r=gagan sr=rpotts a=chofmann ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120268 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 01:11:16 +00:00
mhammond%skippinet.com.au
a792c0ba44 s/wchar_t/PRUnicode/ for Linux.
Not part of the build.  Global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120267 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 01:05:19 +00:00
mhammond%skippinet.com.au
9f7c157dc0 Add some standard header files.
Not part of the build.  Global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120266 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 01:04:01 +00:00
bzbarsky%mit.edu
a1c5d620cf Make selecting parts of a line in align:justify work right on
Mac/Linux.  Bug 58704, r=akkana, sr=kin, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120255 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 23:54:43 +00:00
mhammond%skippinet.com.au
647489f91d Remove signed/unsigned mismatch warning.
Not part of the build; global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120251 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 23:23:37 +00:00
mhammond%skippinet.com.au
79017aee7c Ensure result code always initialized, even when we don't go around the loop
Not part of the build; global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120250 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 23:22:52 +00:00
mhammond%skippinet.com.au
7093aeefa2 Yet another attempt at portable library init and finalize. Thanks to
Christof Meerwald.

Not part of the build; global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120249 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 23:22:16 +00:00
mkaply%us.ibm.com
9187ea31c1 #140538
r=pedemont, sr=blizzard, a=asa
OS/2 only - fix some edge cases where file dialog didn't appear, general cleanup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120245 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:50:50 +00:00
serge%netscape.com
959b0bd890 fix #131153 [PDF plugin doesn't work, it expects file extension for stream type == StreamType_AsFile] r=peterl,sr=darin,a=asa,adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120244 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:48:32 +00:00
varga%utcru.sk
e9b4d1c37e Fix for bug 135294 - Click on splitter causes semi-hang.
r=hwaara, sr=ben, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120240 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:37:13 +00:00
leaf%mozilla.org
4de9db38fa update to release candidate 2 in case we do one ;) r=aki, bug 134264
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120237 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:06:33 +00:00
jj%netscape.com
95537ada6b bugscape 13170: updating 'vers' 2 again (in fact restoring rev 1.9.44.2)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120234 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 22:03:26 +00:00
jfrancis%netscape.com
c7287e9c01 branch landing of 100855: getting correct ui feedback in composer's paragraph format menu. r=brade, sr=kin, adt=jaime, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120225 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 21:19:12 +00:00
locka%iol.ie
d096ea5ef8 Add missing scrollbar graphic. b=138692 r=adamlock@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org a=jaimejr@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120224 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 21:14:48 +00:00
radha%netscape.com
5cff0b49e8 Fix for bug # 138134. General anchor traversal broken by ScrollIfAnchor(). r=adamlock sr=alecf a=rjesup. Approved by ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120223 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 20:58:23 +00:00
law%netscape.com
1986167e81 Bug 133120; re-applying this fix on the branch, it was previously applied weeks ago but I screwed up CVS and it got backed out
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120222 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 20:42:08 +00:00
cbiesinger%web.de
16c69a134c bug 140146 patch by ere@atp.fi r=bienvenu sr=mscott a=asa
crash in nsMsgFolder during shutdown; M1RC1 topcrash [@ nsMsgFolder::SetBiffState]


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120221 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 20:33:36 +00:00
mkaply%us.ibm.com
1baf46f180 #67749
r=cls, a=dbaron
OS/2 only - add OS/2 specific forms.css


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120219 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 20:29:07 +00:00
jaggernaut%netscape.com
9e403beae8 Bug 37638: URL bar is given focus by default in new window [via accel+N or File > New Navigator Window]
Bug 89835: Window opened up with JavaScript has focus in the URL bar while NN4 and IE put focus on the content area

Focus will now always go to the content area unless we're opening for a blank page.

r=sgehani, sr=hewitt, a=drivers, a=adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120186 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 09:40:03 +00:00
glazman%netscape.com
888df6e957 Add ability to remove named anchors from Composer's Format menu and contextual menu; b=80742, r=jfrancis, sr=kin, a=rjesup@wgate.com, adt=jaime
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120184 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 09:31:03 +00:00
ben%netscape.com
05920ee992 127476 - adt1.0.0+ non-ASCII characters in imported IE bookmarks are displayed
as garbage. r=ftang, sr=hyatt, a=dbaron.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120183 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 09:22:04 +00:00
badami%netscape.com
0194225d8b bug 122877 r=bratell sr=jst a=asa patch=t_mutreja@yahoo.com
case insensitive matching for attributes (HREF != href)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120177 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 06:25:55 +00:00
mhammond%skippinet.com.au
97c9c1ece8 New file needed by last checkin. Not part of the build.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120174 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 05:54:52 +00:00
mhammond%skippinet.com.au
50d2799bf8 Add support for nsIVariant, and fix a number of other bugs. Replace
nsAllocator with nsMemory.

Not part of the build; using global "a=" for this part of the tree.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120173 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 05:32:45 +00:00
karnaze%netscape.com
509866e746 bug 138436 - remove redundant style change reflows. a=asa, adt=putterman, sr=attinasi, r=alexsavulov.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120171 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 03:37:51 +00:00
dbaron%fas.harvard.edu
11f00a6636 Better simulate the automated update to configure that would have happened on the trunk (fixes line numbers for error reports during build). See bug 91305.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120160 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-28 23:36:58 +00:00
blakeross%telocity.com
00c4fb82f8 134039 - theme switching should shut down QL. r=law sr=hyatt a=dbaron adt1.0.0+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120157 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-28 22:48:50 +00:00
shanjian%netscape.com
b73ef7a9df update configure base on configure.in.
(configure.in change was made for :
#91305 add universal chardet into unix default extensions list.
That was checked in a week ago, but configure file is not updated yet.
)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120154 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-28 22:22:27 +00:00
darin%netscape.com
484eac2e03 fixes bug 138780 "Redirect with non-ASCII in URL fails"
r=andreas.otte@debitel.net sr=rpotts a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120145 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-28 19:40:00 +00:00
alecf%netscape.com
edc01d68be fix comments to actually describe the interface for bug 136235
r=chak, sr=dveditz, a=dbaron
no ADT because this is simply a comment/doc change - there is no code involved.
trying to do the right thing here and just land this puppy.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120083 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 04:32:23 +00:00
wtc%netscape.com
c863d44ace Bugzilla bug 129080: Unroll the collect_data code. Pin the required buffers.
Allow the cache to grow if necessary to hold large objects. r=nelsonb,wtc.
a=asa (on behalf of drivers) for checkin to the 1.0 branch
Modified Files: h_bigkey.c hash_buf.c
Tag: MOZILLA_1_0_0_BRANCH


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120076 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 03:43:49 +00:00
wtc%netscape.com
e418971eda Cause tinderbox to rebuild. (Tag: MOZILLA_1_0_0_BRANCH)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120073 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 03:05:59 +00:00
wtc%netscape.com
dd7b6b45f5 Backed out the fix for bug 121975 on the MOZILLA_1_0_0_BRANCH. It doesn't
work on Windows 95.
Modified files: configure configure.in WIN32.mk _win95.h w95dllmain.c
w95thred.c


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120072 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 03:02:01 +00:00
sspitzer%netscape.com
a1721de603 fix for #134743. mailing list entries get duplicated when you use turbo.
r=racham,sr=mscott,a=dbaron,a=adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120071 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 02:54:53 +00:00
law%netscape.com
a696f04d4d Bug 136940; check new pref browser.turbo.singleProfileOnly, and if set, exit when last window closes. This code provides a stop-gap in case multi-profile bugs can't be fixed; r=morse, sr=blake, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120065 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:57:01 +00:00
(no author)
c3af0047a7 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120062 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:47:19 +00:00
law%netscape.com
f4637ef0de Bug 116938; ensure temp file has extension matching content type, and, prevent ShellExecute on executable files; r=sgehani, sr=mscott, a=shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120060 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:40:17 +00:00
morse%netscape.com
cb3a2e0996 bug 132641, -killAll to close all windows, r=law, sr=jag, a=rjesup@wgate.com, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120055 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:15:44 +00:00
cltbld%netscape.com
a5212f8062 fixing previous checkin: to rc2 for the moment.
asasaki checking in as cltbld, still bug 133797.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120054 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:13:48 +00:00
jst%netscape.com
9c851a6d41 Fixing OS/2 bustage.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120052 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 01:07:40 +00:00
leaf%mozilla.org
9ff0d77979 force empty commit to branch to allow checking out with branch and date
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120049 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 00:39:10 +00:00
cltbld%netscape.com
72108100e8 Updating user agent string for 1.0, bug 133797.
r=lpham, sr=leaf, a=asa for blanket version approval.
asasaki checking in as cltbld.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120045 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 00:04:43 +00:00
curt%netscape.com
e3a4480ddc Fixes infinite loop in windows installer
(r=leaf, sr=dveditz, r=leaf)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120035 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 23:27:40 +00:00
kmcclusk%netscape.com
4a76d52d77 Abort paint if destroying the PresShell and check for null PresShell in nsImageLoader. bug 102585. r=waterson sr=attinasi a=dbaron adt_a=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120028 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 23:05:09 +00:00
jst%netscape.com
256c0c9094 Fixing bug 98654. Making document.write() after setting window.location from within a script that comes from document.write() not cancel the load that was intiated by setting window.location. r=bzbarsky@mit.edu, sr=vidur@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120024 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 22:53:10 +00:00
brendan%mozilla.org
02d880cb36 Fix for 131348 (a=asa, r=shaver, sr=brendan, checking in for khanson).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120013 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 22:10:25 +00:00
peterv%netscape.com
1b3fa859b9 Fix for bug 135825 (No scrollbars in P3P summary window). r=Pike, sr=heikki, a=dbaron, adt1.0.0+.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120009 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 21:45:19 +00:00
mscott%netscape.com
a6bb24d4c8 Bug #121299 --> fix the cookie icon to use an icon with a transparent background
r=morse
sr=sspitzer
a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120007 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 21:42:29 +00:00
peterv%netscape.com
7c9a240e91 Fix for bug 56087 (XSLTProcessor::TransformDocument can't work on existing document). r=harishd, sr=heikki, a=scc, adt1.0.0+.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120006 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 21:17:45 +00:00
rginda%netscape.com
5cee5838bf - venkman only -
bug 139883, "ErrorHookProc can be tricked into thinking it never finished running", r=peterv, a=scc
fixes bad early return in jsds_ErrorHookProc
test for correct max params (12, not 8) in CreatePPLineMap
use nsnull instead of 0 for null pointer return value


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120001 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:59:02 +00:00
cbiesinger%web.de
0726835c64 last checkin had a=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119997 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:42:31 +00:00
cbiesinger%web.de
320ca6ca28 bug 104825 r=caillon sr=attinasi
ABBR and ACRONYM should not have arrow/question cursor


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119996 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:41:04 +00:00
andreas.otte%debitel.net
4072445f12 fix bug 132254 [Invalid URL confuses mozilla], while resolving a
possible relative url do not return an error when the urlparser
identifies an invalid scheme, instead take the string as relative url
instead, r=morse, sr=darin, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119995 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:39:31 +00:00
pinkerton%netscape.com
3f8bb42c7e delay mediator hookup to later in reflow to catch some other outliners. r=sdagley/sr=ben/a=roc. bug# 139263
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119994 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:27:10 +00:00
chak%netscape.com
44eccf3e99 Backing out fix for #106253 - Plugins aren't adding themselves to load groups
a=adt, a=drivers, r=peterl, sr=alecf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119990 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:19:44 +00:00
oeschger%netscape.com
bca9d10196 help content update: search database additions, dispensation per 122806
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119989 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:19:05 +00:00
dougt%netscape.com
5d265597f7 Reduces the chance of losing a known race condition. 139556. r=rpotts@netscape.com, sr=darin@netscape.com, a=asa, *dt=jamiejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119988 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:16:47 +00:00
rjesup%wgate.com
533e58886e Bug 135361: Print properties margin callouts mislabeled.
r=bzbarsky, sr=attinasi, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119966 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 15:07:30 +00:00
karnaze%netscape.com
afd1e054ec bug 136746 - null pointer check if line is empty. a=asa, adt=jaimejr, sr=waterson/attinasi, r=alexsavulov
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119964 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 14:55:25 +00:00
morse%netscape.com
42f8892aeb bug 132641 implement -killAll, r=law, sr=sgehani, a=rjesup@wgate.com, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119952 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:51:57 +00:00
jaggernaut%netscape.com
c6b05ab2a7 Bug 139522: SSL Pages are incorrectly displayed as being not encrypted. r=kaie, sr=alecf, a=drivers, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119951 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:50:33 +00:00
jaggernaut%netscape.com
8d79ab9138 Backing myself out. This was an accidental checkin, but it'll come for real soon, I promise :-)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119950 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:47:17 +00:00
jaggernaut%netscape.com
8a331877f7 *** empty log message ***
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119948 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:44:20 +00:00
morse%netscape.com
bf5f91136e bug 132641 implement -killAll, r=law, sr=sgehani, a=rjesup@wgate.com, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119947 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:26:07 +00:00
morse%netscape.com
92dc132e55 bug 132641 implement -killAll, r=law, sr=sgehani, a=rjesup@wgate.com, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119946 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 06:19:53 +00:00
curt%netscape.com
6320031aac Differentiate between a product name we show the user and an internal product
name we use for regisry and path names
  (Bug 140178, r=ssu, sr=dveditz, a=asa)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119941 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 04:49:56 +00:00
jkeiser%netscape.com
324d0ddc3b Fix crash with keyboard access to comboboxes (bug 136606), r=rods@netscape.com, sr=attinasi@netscape.com, a=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119939 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 04:16:57 +00:00
bienvenu%netscape.com
95cb3a686d fix bug 127707 from trunk crash adding news server after removing news server r=navin, sr=sspitzer a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119936 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 02:09:16 +00:00
ducarroz%netscape.com
51fa48e028 Fix for bug 138619. We must initialize rv before using it!. R=srilatha, SR=bienvenu, A=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119920 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 00:48:29 +00:00
nhotta%netscape.com
030dc46ba9 Adding a localization comment to a property file not to translate the strings,
bug 139615, r=rchen, a=rjesup@wgate.com, adt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119919 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 00:47:23 +00:00
sspitzer%netscape.com
a3ae03ad37 fix for #101527
moveTo() [of directories with subdirectories] on windows doesn't behave the same as it does on linux and mac.  r=dougt, sr=bienvenu, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119916 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 00:39:53 +00:00
brendan%mozilla.org
514f134015 Purge the deflated string cache entry, if any, before finalizing external strings (140070, r=jband, sr=shaver, a=rjesup).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119913 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:54:34 +00:00
darin%netscape.com
8a410b6fe1 fixes bug 137965 "document contains no data on disconnect"
r=bbaetz sr=rpotts a=asa ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119912 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:54:31 +00:00
cotter%netscape.com
509d393ae1 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; content & formatting fixes for certs help
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119910 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:45:04 +00:00
sspitzer%netscape.com
1f51267cb5 new string for bug #137886. r=ccarlen,sr=bienvenu,a=putterman,mcarlson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119906 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:31:59 +00:00
darin%netscape.com
2e507a2491 fixes bug 139202 "should not send extra FTP commands"
patch=brade, r=mstoltz, sr=alecf,darin


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119905 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 23:30:25 +00:00
peterlubczynski%netscape.com
17d4973104 Fixing last checkin so it matches what's in the trunk (and doesn't crash on startup)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119891 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 22:36:58 +00:00
morse%netscape.com
8da15e1c80 bug 123633, prefs not written on shutdown, r=sgehani, sr=jag, a=rjesup@wgate.com, adt=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119888 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 22:34:32 +00:00
brendan%mozilla.org
19e0851b35 Handle wraparound of PRIntervalTime, plus crucial fixes thanks to Ere Maijala <ere@atp.fi> (138791, r=rjesup, sr=waterson, a=blizzard).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119882 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:59:36 +00:00
heikki%netscape.com
3106d5e24d Bug 129607, do not try to parse when data in not XML. This improves performance and also fixes a hang if the data is HTML that has inline style elements. r=harishd, sr=vidur, a=rjesup@wgate.com,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119881 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:41:26 +00:00
pinkerton%netscape.com
ff9eb3391c oops, missing a {
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119879 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:35:14 +00:00
pinkerton%netscape.com
ee124649b2 package download progress on mac for embedding. fix jar manifest to not pull en-unix on every platform. r=bryner/sr=ben/a=rjesup. bug#134523
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119867 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:09:37 +00:00
mkaply%us.ibm.com
902cd5e269 #125076
r=mkaply, sr=blizzard, a=roc+moz
OS/2 only - from Jessica Blanco - different way to allocate printer data to fix crash/hang on some drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119864 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:04:59 +00:00
mkaply%us.ibm.com
40e5a9d113 #139852
r=mkaply, sr=blizzard, a=roc+moz
OS/2 only - from Javier Pedemonte - implement ConstrainPosition


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119862 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:03:12 +00:00
mkaply%us.ibm.com
8df34cd68e #139219
r=pedemont, sr=blizzard, a=roc+moz
OS/2 only - handle zorder event


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119861 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 21:00:24 +00:00
dbragg%netscape.com
8e808c44ee Missed checking in these files when I fixed bug 126785. Opened as bug 138740. r=tao, sr=scc, a=rjesup@wgate.com
adt approved.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119860 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 20:58:57 +00:00
mkaply%us.ibm.com
cfcaa9c909 #138728
r=pedemont, sr=blizzard, a=roc+moz
OS/2 only - convert filtername to platform specific charset


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119859 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 20:57:48 +00:00
peterlubczynski%netscape.com
4023b25ccc adding missed file
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119828 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 15:11:45 +00:00
peterlubczynski%netscape.com
168b044abc Fixing crash with default plugin, r=av, sr=waterson, bug 139529 a=chofmann
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119827 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 14:25:24 +00:00
peterlubczynski%netscape.com
01a5f01e3f Implementing BP_GetSupportedMIMETypes and NP_GetMIMEDescription on Mac to get MPEGs to work with Quicktime, bug 113464 r=bnesse sr=beard a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119826 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 14:23:26 +00:00
pinkerton%netscape.com
93cb40a1c2 Second attempt to fix bug 137295; gaps appearing in images on Mac OS X. Changed to not pass in the clipRgn when we're drawing to another image (e.g. animated GIFs), or another non-window destination where we don't want to clip. r=pink, sr=beard. a=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119825 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 14:15:33 +00:00
pete.zha%sun.com
e33240dbef bug 92491:press letters to select item in XUL menu, menulist
r=aaronl sr=hyatt a=shaver
Check in for Kyle Yuan's(kyle.yuan@sun.com) fix


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119821 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 10:44:07 +00:00
sspitzer%netscape.com
5c8009f90e fix for #124208. Address Book window shows LDAP directories from previous Profile in turbo mode.
r=bienvenu, sr=mscott.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119815 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 05:37:13 +00:00
jj%netscape.com
812bb1716c backing out last checkin
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119814 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 05:36:59 +00:00
morse%netscape.com
dd51cc7727 bug 136972, change p3p default settings, r=sgehani, sr=jag, a=rjesup@wgate.com, adt=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119813 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 04:10:50 +00:00
dprice%netscape.com
9b5a6028f2 130428 - r=syd sr=dveditz a=scc adt=putterman
xpis can be triggered from urls with query strings
118216 - r=syd sr=dveditz a=scc adt=putterman
avoid edge case crashes by adding a few error checks


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119812 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 03:47:59 +00:00
mscott%netscape.com
83f74adbed Bug #132731 --> dynamically adjust the width of the alert window to avoid truncation issues. Use the correct
font in the alert.
r=neil
sr=hewitt
a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119808 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 01:44:23 +00:00
sgehani%netscape.com
6d7ba532c9 Use getComplexValue() instead of getLocalizedUnicharPref().
b=139355; r=bryner; sr=alecf; a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119802 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 00:52:18 +00:00
dbaron%fas.harvard.edu
719f6148dd Fix up and enable hierarchical :hover and remove the hacks that made :hover work for anchors without it. Pass mask rather than pseudo-class to ContentStatesChanged notifications. Optimize event state changes in the style system by passing state mask to HasStateDependentStyle and using it in HasStateDependentStyle implementations. b=5693 r=bryner, joki sr=hyatt. Also includes fixes for regressions from original checkin: bug 137556 (r=bryner sr=kin) and bug 137067 (r=bzbarsky sr=waterson). a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119796 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-25 00:24:49 +00:00
bzbarsky%mit.edu
5d62c3cc6a Fix parsing of content-types. Bug 138639, r=bbaetz, sr=darin, a=scc.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119787 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:54:35 +00:00
cotter%netscape.com
aae80b929a ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. content updates
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119782 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:39:56 +00:00
rbs%maths.uq.edu.au
c3c7fa242d MathML entries are missing in embedding packages, b=137029, r=adamlock, sr=heikki, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119777 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:13:26 +00:00
kaie%netscape.com
8d102035fa b=134992 Fix crash when displaying some S/Mime messages.
r=javi sr=alecf adt=putterman a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119776 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:10:59 +00:00
kaie%netscape.com
aa91314590 b=139349 Need to use dont_AddRef with GetCertAtIndex
r=bryner sr=alecf adt=putterman a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119775 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:09:55 +00:00
kaie%netscape.com
f1d171d635 b=139325 Leaking CERTCertificate references from
nsNSSCertificate::GetChain
r=bryner/javi sr=alecf adt=jaime a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119774 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:08:17 +00:00
kaie%netscape.com
b3068b50ef b=125607 Temporary workaround for better displaying signed S/Mime messages
w/ attachments from IMAP servers.
r=ducarroz sr=bienvenu adt=putterman a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119773 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:04:33 +00:00
rbs%maths.uq.edu.au
7579ba6446 MathML entries are missing in embedding packages, b=137029, r=adamlock, sr=heikki, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119771 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:02:37 +00:00
mscott%netscape.com
eaa65c0868 Bug #133580 --> make image/tiff attachments show up as external attachments
instead of acting non-existent in the message.
r=ducarroz
sr=bienvenu
a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119770 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 22:56:42 +00:00
bryner%netscape.com
09e6ecc483 Bug 124304 - make tab/shift+tab cycle through all recipients in the mail compose window (even ones not scrolled into view). r=ben, sr=hewitt, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119768 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 22:31:23 +00:00
sicking%bigfoot.com
cbe5acd88b bug 137399: Make removeAttribute work again for html-elements not in main doc-tree
r=glazou sr=jst a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119765 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 22:14:39 +00:00
mkaply%us.ibm.com
44309b6b69 #124164
r=pedemont, sr=blizzard, a=asa
OS/2 only - remove unnecessary XP_OS2 chunk that tries to fix form element fonts


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119762 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 22:05:17 +00:00
nhotta%netscape.com
e232ba020c Changed to use a different util function which does not call the converter repeatedly in a loop
in order to workaround the converter problem (bug 138578),
bug 120728, r=ducarroz, sr=sspitzer, a=rjesup@wgate.com, adt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119761 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:56:13 +00:00
mkaply%us.ibm.com
aaf2e134b8 #136958
r=cls, a=scc
OS/2 only - remove high performance timer code - switch to OS millisecond timers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119760 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:55:38 +00:00
nhotta%netscape.com
29c0a861b1 Added out argument for NS_MsgStripRE to avoid altering the const argument,
bug 131983, r=ducarroz, sr=bienvenu, a=rjesup@wgate.com, adt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119759 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:54:13 +00:00
brade%netscape.com
699a315d5e fix double-click bug (clicking twice quickly in scrollbar invokes properties dialogs); bug 134503, r=akkana, sr=kin, a=scc, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119750 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:32:12 +00:00
shanjian%netscape.com
6e2c371544 #115114 autodetect universal detects french as Central European (ISO-8859-2)
removing latin2 and win1250 prober to prevent latin1 confusion.
r=ftang, sr=scc, a=rjesup, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119745 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:16:26 +00:00
varga%utcru.sk
6c1e42594e Fix for bug 135764 - mozilla crashes in DOM Inspector - Trunk [@ nsTreeBodyFrame::SetBounds]
r=bryner, sr=ben, a=scc


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119744 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:05:32 +00:00
jfrancis%netscape.com
45b43ac004 branch landing of fix for bugzilla 135337: adt=jaime, a=shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119743 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:04:17 +00:00
blizzard%redhat.com
b502b8efc1 Bug #81779 . Mozilla crashes if you higlight and repeatedly drag text. Return if the source data items aren't available. r=rjesup,sr=shaver,a=shaver
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119742 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 21:03:46 +00:00
cltbld%netscape.com
52bc62de79 bugscape bug 13170: updated 'vers' to 2 - kysmith checking in as cltbld
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119737 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 20:24:15 +00:00
cotter%netscape.com
7beecd0046 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. cert updates, help on help
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119691 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 05:55:48 +00:00
(no author)
959f48bb82 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119689 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 05:52:06 +00:00
saari%netscape.com
9392bde1e3 fix for bugzilla 135226. Slight modification of previous patch to disable image optimization to DDBs when displaying on a paletted device. This isn't the ideal solution, but it is what I'm going with for the moment to deal with the embedding pull tomorrow morning.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119687 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 04:53:42 +00:00
shanjian%netscape.com
d4bc26bd24 #138002 nsParser should not accept charset notification coming from low priority source
check existing charset source and send notification only when existing charset source is
lower than meta charset.
r=ftang, sr=jst, a=shaver, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119663 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 00:49:38 +00:00
locka%iol.ie
aa4c21982b Add missing nssckbi library to embedding manifests. b=134034 r=kaie@netscape.com sr=rpotts@netscape.com a=putterman@netscape.com a=valeski@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119641 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 22:51:46 +00:00
suresh%netscape.com
9820819552 fix for 138231. select a tab if the last selected one is not in view. r=suresh, sr=alecf.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119636 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 22:27:08 +00:00
dougt%netscape.com
880f61a67c PAC instantiation hangs Regxpcom Solaris nightly build packaging process. Fixing timer logic. Patch by Kenneth Herron. r=dougt@netscape.com, sr=brendan@mozilla.org, a=rjesup@wgate.com , b=106009
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119633 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:32:33 +00:00
dougt%netscape.com
521e7835df Fix for 139512. GPF During Installation in Regxpcom during install. patch by jband, r=dougt, sr=shaver, a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119632 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:19:39 +00:00
mkaply%us.ibm.com
c5bd386711 #100676
r=pedemont,cls (makefile), sr=alecf, a=shaver
OS/2 only - remove dependency on uconv for filename conversions


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119631 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:11:47 +00:00
bzbarsky%mit.edu
e85e0624e7 Fix cloneNode() to properly copy the "style" attr as an object, not a
string.  Bug 137428, r=fabian, sr=jst, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119630 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:08:11 +00:00
bzbarsky%mit.edu
9821e88608 Fix crash on copying string with embedded nulls. Bug 136278, r=brade,
sr=kin, a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119629 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:05:38 +00:00
mkaply%us.ibm.com
b4b60272e8 #100676
r=pedemont,cls (makefile), sr=alecf, a=shaver
OS/2 only - remove dependency on uconv for filename conversions


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119628 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:04:20 +00:00
varada%netscape.com
fc89f1262e fix for 136937- mail compose body becomes uneditable after send failure;r=srilatha;sr=mscott;a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119627 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:01:59 +00:00
mkaply%us.ibm.com
3e5989752f #124164
r=mkaply, sr=blizzard, a=shaver
OS/2 only - code from Javier Pedemonte to properly set font heights


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119626 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 21:01:28 +00:00
cavin%netscape.com
a40574c03f Fix for 134897. Reset 'mInitialized' and 'm_initialized' for imap so that the folder obj will be re-initialized for new profiles. Also reset 'mPath' and 'm_pathName' for imap so that it points to the right physical location for the new profile (instead of carrying over from previous profile). r=bienvenu, sr=sspitzer, a=asa, adt=putterman.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119625 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 20:55:20 +00:00
brade%netscape.com
f6cf35ca4e remove FontManager (moved to gfxComponent.xml) so it can be weak linked (bug 138495); r=ccarlen, pinkerton, sr=sfraser, a=rjesup, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119611 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 13:23:15 +00:00
brade%netscape.com
33244035e4 add fontmanager library (bug 138495) r=ccarlen, pinkerton, sr=sfraser, a=rjesup, adt=putterman
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119610 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 13:06:05 +00:00
peterv%netscape.com
1071f10c04 Fix for bug 135895 (XHTML <style> element not working). r=sicking, sr=jst, a=asa, adt1.0.0+.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119607 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 12:37:17 +00:00
darin%netscape.com
e6328bd509 fixes bug 136216 "[viewpoint] GetURL fails on https file when the file is
partially in the browser's memory cache" r=serge, sr=rpotts, a=asa, ADT+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119602 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 05:47:43 +00:00
naving%netscape.com
d86149a289 134291 r=mscott sr=bienvenu a=rjesup. Make migration work for 2nd profile w/ imap acct in turbo mode.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119586 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 00:57:41 +00:00
rdayal%netscape.com
14eda85230 Fix for leaks by each entry retrieved during any LDAP search, bug # 134069
r=dmose, sr=sspitzer, a=roc+moz


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119580 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-23 00:02:44 +00:00
srilatha%netscape.com
57e6b9c547 Fix for bug #134947. Import text dialog unusable,
r=varada, sr=sspitzer, a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119579 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 23:57:55 +00:00
bzbarsky%mit.edu
82d1070192 Inspector shows wrong list of style rules for table elements. Bug
122557, r=caillon, sr=hewitt, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119577 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 23:51:23 +00:00
rdayal%netscape.com
c0392aee23 fix for MAPI Send of file with non English filenames, bug # 103313
r=nhotta, sr=mscott, a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119565 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 22:30:40 +00:00
ducarroz%netscape.com
02822617db Fix for bug 136008. Do not cache the compose window if it's the last window else that will prevent the application to shutdown. Patch submitted by antonio.xu@sun.com. R=ducarroz, SR=bienvenu, A=rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119563 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 20:58:35 +00:00
ducarroz%netscape.com
172fc515a3 Fix for bug 134729. Remove cols attibute passed down when user press the delete key and instead add a function to calculate the number of columns. R=varada,shuehan SR=sspitzer, A= rjesup@wgate.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119559 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 20:37:09 +00:00
jdunn%netscape.com
eac3008773 adding a newline (HP requires them)
r=cls@seawood.org
a=asasaki@netscape.com
# 139191


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119550 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 17:04:18 +00:00
kaie%netscape.com
52cca6ed36 b=137154 PSM needs to call SSL_ClearSessionCache before switching profiles
r=wtc/javi sr=alecf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119541 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 13:55:32 +00:00
brade%netscape.com
02f579ce4a show error when unable to publish (such as being unable to create a uri) bug 126258; r=cmanske, sr=kin, a=asa, adt=jaime
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119537 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 13:08:35 +00:00
rods%netscape.com
9ed956dcca Cache the Zoom and TextZoom for the main DC while in Print Preview and then set
it back when leaving Print Preview
Bug 136785 r=dcone sr=attinasi adt=putterman


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119536 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 12:18:39 +00:00
blakeross%telocity.com
96d8a8ece0 105547 - remove pref to control where new windows open (tab or window). r=bryner sr=ben a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119533 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 03:13:11 +00:00
blakeross%telocity.com
bf9337f3d8 105547 - windows open in new window instead of tabs (remove pref for now). r=bryner sr=ben a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119531 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 03:08:12 +00:00
naving%netscape.com
4ce66d0295 22994 r=morse sr=dveditz sspitzer a=asa Add support for blocking cookies in mailnews by default. Used an overlay to add this new checkbox that gets the value from disableCookieForMailNews pref
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119530 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 01:46:26 +00:00
naving%netscape.com
5b7d330067 137008 r=bienvenu sr=mscott a=asa. Make redo delete messages work for quick search results when folder was in
threaded view.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119529 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-22 01:33:36 +00:00
sicking%bigfoot.com
9c4bd18276 Bug 132302: Throw right exceptions for DOM Ranges.
r=Pike, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119520 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-21 18:01:15 +00:00
cbiesinger%web.de
36ca27b46a bug 136402 patch by neil.marshall@sympatico.ca r=db48x sr=alecf a=asa
Case of first letter in text labels is sometimes wrong in the Media tab


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119499 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 18:12:00 +00:00
caillon%returnzero.com
998811395f Page info shouldn't open cache items in blocking mode. Fixes Bug 124566, 'View Page Info whilst this page loading hangs browser.' Patch by db48x@yahoo.com, r=caillon, sr=darin, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119492 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 14:48:47 +00:00
caillon%returnzero.com
e7acea9915 Bug 137297. Alphabetize computed style's queryableProperties list. r=bzbarsky, sr=hewitt, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119491 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 14:40:32 +00:00
jfrancis%netscape.com
65d1906f81 branch landing of 136944: crash in editor when typing.
a=asa; adt=Jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119489 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 14:14:01 +00:00
hwaara%chello.se
fce95b6677 #128527, "disabling a radiobutton doesn't disable the text"
r=andreww, sr=hewitt, a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119488 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 13:12:40 +00:00
rods%netscape.com
2ec240eb5c This displays a focus ring when the listbox has focus for HTML listboxes (NOT XBL listboxes)
The idea is that when the SelectAreaFrame (which is the parent) of the options
is asked to paint then it asks the ListControlframe to paint the focus ring in
the correct spot. It need to find the first non-disabled option (ignoring opt
groups) and if nothing is selected it need to find the first frame which is the
dummy option. Also, it now track thru a static data member which listControl
frame currently has focus (this was taking from how comboboxes track it internally)
Bug 64165 r=jkeiser sr=attinasi adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119486 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 12:29:40 +00:00
mscott%netscape.com
21202829f3 Bug #133130 --> fix a race condition that caused the notification icon
to never go away.

Bug #135753 --> figure out the folder to select when the user clicks on the
animated alert to ensure that we select the right folder.

Bug #123104 --> fix an inaccuracy in the new mail count. Always reset to 0
if we discover we have no new mail even if the state has already been changed
that way.

r=naving, sr=bienvenu/sspitzer
a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119471 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 03:11:20 +00:00
oeschger%netscape.com
df8ed489af adding image to help, author=robinf, r=oeschger, dispensation for regular updates per 122806
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119447 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-20 01:22:41 +00:00
harishd%netscape.com
759cc84ac4 Prevent charset loading for document.write content because it's already in unicode. b=125317, r=ftang, sr=jst, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119439 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 23:24:07 +00:00
heikki%netscape.com
5e7aa6a1c8 Bug 137632, going back and forward in history does not scroll back to anchor location nor does it select the anchor (if pref set). r=radha, sr=jst, a=rjesup,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119436 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 23:13:15 +00:00
(no author)
943efc9e9f This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119426 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 22:25:24 +00:00
bzbarsky%mit.edu
b7b3e572b6 Make the "Close" menuitem and shortcut work in Inspector. Bug 128663,
r=hwaara, sr=hewitt, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119424 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 22:24:45 +00:00
ftang%netscape.com
2b12789fbf fix bug 131837 r=nhotta sr=kin. fix simp chinese to unicode mapping table for se
veral sites
carry from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119423 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:58:18 +00:00
mkaply%us.ibm.com
aaa9ecf79b #137693
r=mkaply, sr=blizzard, a=rjesup@wgate.com
OS/2 only - workaround for MINCHO font bug


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119422 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:57:22 +00:00
nhotta%netscape.com
9ac4527500 Use ISO-8859-1 as a compose charset if us-ascii, change for edit as new,
bug 136938, r=ducarroz, sr=kin, a=asa, adt.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119419 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:37:36 +00:00
harishd%netscape.com
d9d21ee90f Initialize token allocator, in the BuildMode(), regardless of whether a sink is available or not. b=137644, r=heikki, sr=jst, a=adt,asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119418 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:09:20 +00:00
harishd%netscape.com
0068546bf3 Fixed a crash by making sure that the CNavDTD and nsHTMLContentSink stacjs are synchronized when handling FORM. b=133410, r=heikki, sr=jst, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119417 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 21:00:14 +00:00
peterlubczynski%netscape.com
0d8ecd0d21 Fixing smoketest blocker bug 138500 r=av sr=jag a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119410 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 18:18:58 +00:00
cbiesinger%web.de
a41a9d2a9e bug 138475 r=bbaetz sr=darin a=asa
data: protocol doesn't unescape its uri string
also fixes bug where data: urls w/o mimetype didn't work (e.g. data:,foobar)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119404 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 15:16:41 +00:00
varada%netscape.com
39b506ab01 fix for 58506;smtp panel doesnt get refreshed when creating a new default smtp server;r=srilatha;sr=mscott;a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119401 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 14:22:54 +00:00
kin%netscape.com
bd004663da Fix for bug 106489 (Text entered in box does not appear)
- Moved MoveChildrenTo() and GetRealFrame() to a point in the
  file where they could be called from my new utility method
  AdjustOutOfFlowFrameParentPtrs().

- Modified MoveChildrenTo() to take an nsFrameConstructorState arg,
  so that it can call my new method AdjustOutOfFlowFrameParentPtrs()
  so that out-of-flow floater frames are reparented to the correct
  containing block when the placeholder is moved under the block
  created in ConstructInline().

r=attinasi@netscape.com  sr=waterson@netscape.com
adt=jaimejr@netscape.com  a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119395 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 13:37:35 +00:00
kin%netscape.com
6ee8dd438a Fix for bug 68331 (Moving caret in TEXTAREA to start of line can cause page to scroll horizontally)
- Modified GetSelectionRegionRectAndScrollableView() to clip
  aRect so that it is completely within the bounds of the
  scrolledView. This insures that other scrolled views in
  the parent hierarchy will not scroll more than they have to.

r=brade@netscape.com  sr=sfraser@netscape.com
adt=jaimejr@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119394 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 13:36:31 +00:00
sicking%bigfoot.com
a8674b4e10 Bug 132300. A better way to bootstrap XPathEvaluator by following the specs recommendation and making documents implement the interface.
r=pike sr=jst a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119393 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 13:26:19 +00:00
rjc%netscape.com
31f63c43ed Fix adt1.0.0+ bug #132493 on MOZILLA_1_0_0_BRANCH (already on tip): Mac OS X multiple sheets issue. r=pink sr=ben a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119390 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 10:29:16 +00:00
mjudge%netscape.com
4eb038a1c4 82151 fix for caret jumping in text areas from beginning to end. adt+ a+ ect QA tested on Trunk
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119388 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 10:09:17 +00:00
mjudge%netscape.com
094f94cb44 adt+ and a+ 82151. fix to stop caret from jumping to beginning or ending of text area.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119387 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 10:08:18 +00:00
rpotts%netscape.com
82b127ba0b bug #105253 (r=peterl, sr=jst, a=adt) plugin streams are not added to the loadgroup...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119385 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 08:24:08 +00:00
gerv%gerv.net
93d7608437 Bug 3935 - mozilla-native psuedo classes and properties should be marked as such. This fixes a number of them; still a few more to do. Patch by gerv, r=dbaron, sr=jst, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119384 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 08:07:11 +00:00
cotter%netscape.com
efe7a90161 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc. uprivacy feature updates
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119383 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:51:30 +00:00
shliang%netscape.com
3c852822ad 135975 - theme preview images are outdated - images by gregvalure@yahoo.com - r=andreww, sr=hewitt, a=jesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119381 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:38:23 +00:00
shliang%netscape.com
195ec35e03 134801 - account manager panels out of order - r=bhuvan,sr=sspitzer,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119380 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:22:44 +00:00
shliang%netscape.com
ffc3fedbde 133863 - plugin finder service pref ui - r=hewitt, sr=jag, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119377 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:15:03 +00:00
rdayal%netscape.com
70903d0a21 Fix for MAPI send to work without causing any hang of the calling MAPI apps.
bug # 129347.
r=ducarroz, sr=mscott, a=asa.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119376 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 07:11:28 +00:00
jefft%netscape.com
ce8692fe97 fixed bug 133437 - Pop acnts:Sent Copy of MDN Request messages should have MSG_FLAG_MDN_REPORT_NEEDED turned off, r=ducarroz, sr=bienvenu, a=jaimejr; bug 136476 - MDN:If you filter mesgs and receive a mesg that is requesting RR, you are prompted to send the RR before you actually click on the mesg; r=bienvenu,sr=sspitzer,a=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119373 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:42:12 +00:00
sfraser%netscape.com
a41718dcc7 Fix for bug 127362 -- incremental scrolling gets slower and slower. Make sure that we shift window->visRgn to the correct coordinates before doing region math, and ensure that HandleUpdateEvent() leaves the port in the way that it found it. r=pinkerton, sr=beard. a=asa for branch checkin.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119372 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:30:57 +00:00
srilatha%netscape.com
133c46acb5 Part of fix for bug# 134947. Import Text Dialog unusable
r=varada, sr=sspitzer, a=jesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119371 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:29:15 +00:00
racham%netscape.com
a7ee21f18d Fixing bug 137876. This fixes a typo in the function call so that ISPs can execute customized routines at the end of mailnews account creation process. r=andreww, sr=sspitzer, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119370 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:20:34 +00:00
racham%netscape.com
ea39f306d9 Fixing bug 131330. This fix allows ISPs to customize wizard pages with desired style rules example being setting customized images for page header. r=andreww, sr=sspitzer, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119369 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:14:52 +00:00
mjudge%netscape.com
c71efb01ce 103888 adt approved. QA tested on trunk. fix for typing and having characters end up at end of inline style block after a <BR>
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119368 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:09:17 +00:00
danm%netscape.com
e0a60c50f5 make blur() available to embedded apps. bug 57841 in its third avatar r=jst,scc a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119367 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:06:36 +00:00
bbaetz%student.usyd.edu.au
efec05ce41 Bug 134270 - ftp password displayed in page heading
r=dougt, sr=darin, a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119365 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 06:02:42 +00:00
mjudge%netscape.com
b5d53cbfd1 102220 r=jfrancis sr=kin QA approved on trunk. fix forup down situation with typing and shift selecting.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119364 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:55:23 +00:00
heikki%netscape.com
07e496302c Bug 136788, XML pages do not display when going back and forward in history. Patch from peterv, r=jst, sr=heikki, a=asa,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119363 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:49:32 +00:00
srilatha%netscape.com
329777865b Fix for bug # 129708. Multibyte baseDN gets garbled in Directory Server Properties dialog
r=ducarroz, sr=sspitzer, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119362 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:48:04 +00:00
joki%netscape.com
bde5680d10 Fix for bug 93111, fix event targetting in tables over rowspans and empty cells by making rows and cols invalid targets (forcing targetting of cells or the table itself). r:dbaron, sr:jst, a:asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119361 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:47:38 +00:00
bnesse%netscape.com
60f04d9ed1 Fix for bug 123787. Insure gRoot is allocated before attempting to free it. r=sfraser, sr=alecf, a=valeski, adt=paw.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119360 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:46:07 +00:00
joki%netscape.com
a44296e6f4 Fix for bug 128676, Have focus events sent directly to their widgets since using coord targeting can now be inaccurate. r:roc+moz, sr:jst, a:asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119359 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:42:27 +00:00
joki%netscape.com
4fd072f9b3 Fix for bug 135345, stop infinite recursion caused when calling select() from inside a focus event handler. r:jkeiser, sr:jst, a:asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119358 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:38:29 +00:00
mjudge%netscape.com
02d6beada3 7868 QA checked it out on trunk. fx will allow a QI to nsISelectionDisplay of nsPresShell and a GetInterface of nsISelectionDisplay on the webbrowser.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119357 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 05:33:39 +00:00
jkeiser%netscape.com
cf4ae53af2 rods's patch to move print properties to global dialog for embedding (bug 138026), r=dcone@netscape.com, sr=attinasi@netscape.com, a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119356 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-19 04:46:29 +00:00
timeless%mac.com
c5bcf9cb2d Bug 136910ÿldap build bustage on QNX
r=dmose r=cls a=asa (for build bustage checkin and on behalf of drivers)


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119299 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-18 21:32:36 +00:00
dougt%netscape.com
31012ea782 Fixing 138080 on the branch. a=leaf@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119272 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-18 16:17:29 +00:00
kaie%netscape.com
3045303bda b=119418 Fix handling of opaque signed S/Mime messages.
Also fixes some other S/Mime issues, as described in the bug.
r=ddrinan/ducarroz/darin sr=alecf a=rjesup
Fixing bustage, approval for checkin to the closed tree from asasaki


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119238 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 17:21:14 +00:00
dougt%netscape.com
664f7b6ba9 Backing out pavlov's changes. Note to self: never check in other people's code.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119237 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 16:23:35 +00:00
peterlubczynski%netscape.com
ae1c53e386 Fixing bustage in REQUIRES line for Windows gmake builds
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119236 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 16:07:09 +00:00
caillon%returnzero.com
0b3bab9d61 Make WidgetStateManager also remember the .checked property for <listitem type="checkbox"/>. This fixes bug 134441, Scripts & Windows pref panel doesn't remember checkboxes on viewing it the second time. r=hewitt, sr=ben
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119234 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:46:21 +00:00
peterlubczynski%netscape.com
7234c2c8d4 Fix for hidden attribute not working correctly on EMBED tag, bug 136456 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119232 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:32:27 +00:00
kaie%netscape.com
a86b530963 b=119418 Fix handling of opaque signed S/Mime messages.
Also fixes some other S/Mime issues, as described in the bug.
r=ddrinan/ducarroz/darin sr=alecf a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119230 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:24:53 +00:00
caillon%returnzero.com
7798a03d15 Bug 137103, Remove a duplicate pref that slipped in with the fix for 117707. Thanks to jonasj@jonasj.dk for noticing this and providing the patch. r=caillon sr=tor a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119229 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:17:31 +00:00
pinkerton%netscape.com
bc50d32b62 package xul security dialogs in embedding. also add appcomps to embed to get session history. r=ccarlen/sr=alecf/a=rjesup. bug# 135211
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119227 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:11:36 +00:00
peterlubczynski%netscape.com
8fa83f72eb Changes for plugin finder service, bug 133864, r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119225 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 14:07:10 +00:00
pinkerton%netscape.com
c27c3fcdcc fixes to make tabs look much nicer in dialogs. r=pink/sr=hyatt. bug# 134447
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119223 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 13:51:35 +00:00
karnaze%netscape.com
735a2536da bug 125543 - Row groups are prevented from splitting in the reflow preceeding the special height reflow. Cells are only notified that they should observe a percent height element if the element is inside the table's cell. Percent height elements inside the body will have a height based on the page height when printing. a=asa, adt=paw, sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119222 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 13:01:22 +00:00
rods%netscape.com
f24f902979 Add a new attr to PrintObject for identifying POs that are to be hidden, not
reflowed. So if a frameset frame's root frame is zero height then we mark it
hidden and not to be printed.
Bug 134769 r=dcone sr=attinasi adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119221 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 12:37:04 +00:00
heikki%netscape.com
64dd27f57c Bug 128541, make send(null) work again, and make us match IE6 more closely regarding the parameters we accept. r=harishd, sr=jst, a=rjesup,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119214 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 06:33:57 +00:00
heikki%netscape.com
33ecf1d294 Bug 128326, disable save as complete for XML because of serious dataloss bugs. r=bzbarsky, sr=blake, a=asa,ADT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119213 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 06:29:44 +00:00
shanjian%netscape.com
918dad7488 #128154 Crash: opening non-ascii attachments
replace default "default char" from '?' to '_'. The former one is not
acceptable in windows filename.
r=ftang, sr=alecf, a=asa, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119212 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 06:01:51 +00:00
dprice%netscape.com
0d3b70b536 1364967 r=jfrancis sr=dveditz a=rjesup adt=putterman
add xpicleanup to carbon builds


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119208 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 04:57:35 +00:00
cotter%netscape.com
6ebf49f699 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; minor fix for smime help.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119207 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 04:52:07 +00:00
jst%netscape.com
b1df11336d Checking in jeff.qiu@sun.com's fix for bug 77585. Speeding up AppendData() on nsGenericDOMDataNode, this speeds up loading of long text documents. r=cbiesinger@web.de, sr=jst@netscape.com, a=rjesup@wgate.com.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119186 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 00:26:53 +00:00
ccarlen%netscape.com
6497384abd Bug 136311 - Can't install on 8.6 because MSL is using functions not available there. Set the compile flags so we don't use HFS. r=brade/sr=sfraser/a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119180 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 00:07:01 +00:00
jaggernaut%netscape.com
af6d4e6058 Bug 121841: <!ENTITY> hangs 0.9.8 and trunk using 100% CPU. r=bryner, sr=scc, a=scc, a=adt, approval from leaf and asa to check into closed tree.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119179 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-17 00:02:33 +00:00
rods%netscape.com
d0ddeb0ea7 backing out unwanted check in
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119164 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 22:39:07 +00:00
sspitzer%netscape.com
177c560d03 temporary fix for #130581. the cached compose window has issues on linux, if your
focus model is "focus follows mouse".  Until we figure that out (see #137698),
we need to disable this performance trick on unix.
APPROVED FOR THE CLOSED 1.0 BRANCH.
r/sr=bienvenu, a=asa,leaf, adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119163 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 22:36:43 +00:00
rods%netscape.com
b5137cca5b Add a new attr to PrintObject for identifying POs that are to be hidden, not
reflowed. So if a frameset frame's root frame is zero height then we mark it
hidden and not to be printed.
Bug 134769 r=dcone sr=attinasi adt=jaime


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119152 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 22:04:47 +00:00
brade%netscape.com
5b4d8f10d0 back out changes that were inadvertently checked in with previous revision (a=asa, a=leaf) bug 137790
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119146 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 21:04:40 +00:00
waterson%netscape.com
15861e0899 Bug 137378. Stop ancestor frame notification at a frame that is an NS_FRAME_REFLOW_ROOT. r=karnaze, sr=kin, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119143 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 20:56:18 +00:00
dougt%netscape.com
459491e786 Landing the better part of 129953 and in the process fixing a smoketest blocker. a=leaf
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119142 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 20:55:29 +00:00
andreww%netscape.com
a25e0f514e bug 128895 removing aqua button appearance to throbber in osx , r=shliang, sr=sfraser, adt=jaimejr a=asa and a=asa+leaf on checking this into closed tree.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119139 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 20:04:11 +00:00
mkaply%us.ibm.com
c5eb29c591 OS/2 bustage
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119134 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 19:22:46 +00:00
(no author)
5551933833 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119132 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 19:09:58 +00:00
jj%netscape.com
6f7df30dbe #134227: Updated Mozilla installer strings to 1.0.0 (branch). r=leaf, sr=granrose, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119113 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 17:41:03 +00:00
jj%netscape.com
c7bae18605 #134223: udpating Finder's Get Info strings to 1.0 for OS9 and OSX. r=asaki, sr=granrose, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119112 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 17:29:13 +00:00
kaie%netscape.com
cbac461555 b=118319 Fix memory leak.
r=javi/wtc sr=blizzard a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119107 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 14:16:13 +00:00
kaie%netscape.com
e7af3755e5 b=136908 Make CRL manager UI work again.
r=kaie sr=ben a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119105 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 14:11:27 +00:00
bbaetz%student.usyd.edu.au
cf1554a393 Bug 129420 - mailto: urls not working with PAC
r=dougt, sr=darin, a=dbaron


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119092 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 07:44:10 +00:00
ftang%netscape.com
45fcc528e6 carry ccarlen's mac os 9 trunk bustage fix to branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119085 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 06:33:34 +00:00
jaggernaut%netscape.com
6fb703b7e6 Bug 128965: Better icons for components, images by Andreas Premstaller <andreas.premstaller@uibk.ac.at>, r=marlon, sr=jag, a=drivers, a=adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119081 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 05:45:34 +00:00
dprice%netscape.com
c90c704127 123649 r=mjudge sr=dveditz a=rjesup adt=putterman
crasher fix landing on branch


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119079 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 05:19:17 +00:00
dougt%netscape.com
bc2f5778ac I am with Alec. I really hate the mac build system.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119077 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 04:55:48 +00:00
dougt%netscape.com
5820b9d970 xpcom initalization of event queue. r=brendan@mozilla.org, sr=darin@netscape.com, a=asa@mozilla.org, 135531
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119068 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 04:03:48 +00:00
rbs%maths.uq.edu.au
26432dcb35 dataloss, SaveAs leaves private [-|_moz] attributes in the output, b=134298, r=akkana, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119063 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 03:22:31 +00:00
dougt%netscape.com
a060ea6240 xpcom initalization of event queue. r=brendan@mozilla.org, sr=darin@netscape.com, a=asa@mozilla.org, 135531
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119060 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 03:07:13 +00:00
dougt%netscape.com
fdfe478178 Addresses threadsafe of native loader. 98755, r=waterson, sr=jband, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119059 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 03:02:40 +00:00
dougt%netscape.com
cea9c992fa Fixes shutdown crash [@PR_EnterMonitor] called with a deleted monitor on the MemoryFlusher thread. 135330, r=brendan@mozilla.org, sr=jband@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119058 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 03:00:04 +00:00
dougt%netscape.com
e510dfda65 Landing 129953 for pavlov@netscape.com. r=rjesup@wgate.com, sr=rpotts@netscape.com, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119057 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 02:52:49 +00:00
leaf%mozilla.org
3349bf4f6c bug 136673. version mozilla.exe. code from asasaki@netscape.com, r=cls, sr=leaf
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119053 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 02:18:12 +00:00
mkaply%us.ibm.com
50de85c1f1 #59403
r=pedemont, sr=blizzard, a=asa
OS/2 only - beginning of drag/drop


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119052 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 02:17:11 +00:00
mkaply%us.ibm.com
f5acf31b44 #135795
r=cls, a=asa
Disable mkdepend on OS/2 for now


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119051 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 02:14:20 +00:00
varga%utcru.sk
9a5c5ad50c Fix for bug 137178 - Outliner tree expanded by default, should not be.
- prevent insertions to closed containers
r=sgehani/varga, sr=hewitt, patch=sgehani,varga, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119048 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 01:15:28 +00:00
morse%netscape.com
bd887d65a7 bug 137551, form manager stopped working, sr=scc, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119046 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 01:08:12 +00:00
shliang%netscape.com
dfc2a9baa4 137211 - change Netcenter reference in absync to Netscape.com. r=ssu,sr=sspitzer,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119043 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:15:25 +00:00
smontagu%netscape.com
785b3a8b97 (Checkin for Roland.Mainz@informatik.med.uni-giessen.de). Bug 127520 "Large pictures print corrupted", r=db48x, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119040 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:11:08 +00:00
ftang%netscape.com
e089b55ded fix bug 110726. r=ccarlen sr=sfraser a=asa
install Carbon Input Text event handler for embedding project
from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119039 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:10:02 +00:00
ftang%netscape.com
56eaff5f89 fix bug 110726. add imlementation of Carbone Text Event handler forwarding code to CBrowserShell
r=ccarlen sr=sfraser a=asa
from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119036 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:08:10 +00:00
ftang%netscape.com
b1b0b5e26f add CTextInputEventHandling.cpp to the project
fix bug 110726. r=ccarlen sr=sfraser a=asa
from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119035 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:05:43 +00:00
ftang%netscape.com
5f9959cb6a fix bug 110726. r=ccarlen sr=sfraser a=asa
from trunk. add implementation to deal with Carboneevnt for input method


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119034 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:04:11 +00:00
ftang%netscape.com
d0d165e336 fix bug 110726. add CTextInputEventHandler.h
r=ccarlen sr=sfraser a=asa
from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119033 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:03:25 +00:00
attinasi%netscape.com
673fac74ae Migrating patch from trunk to branch: prevent crash by clearing undisplayed map when style sheet is added. b=118014 r=dbaron sr=kin a=asa and jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119032 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:03:15 +00:00
ftang%netscape.com
849a03fcf4 fix bug 110726. impelement nsIMacTextInputEventSink on nsMacWindow
to fix embedding input method
r=ccarlen sr=sfraser a=asa
carry from trunk


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119030 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:01:01 +00:00
dcone%netscape.com
43b89a87c3 b=121230 r=kmcclusk sr=attinasi a=tor. ADT+ approved. Fix PNG rendering.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119029 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-16 00:00:01 +00:00
ftang%netscape.com
2b462d89ac add nsIMacTextInputEventSink.idl to the widetIDL. move from trunk
fix bug 110726. r=ccarlen sr=sfraser a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119028 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:58:56 +00:00
ftang%netscape.com
7f02e46de6 add this from trunk
fix bug 110726 r=ccarlen sr=sfraser a=asa
add idl for mac input method.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119026 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:56:53 +00:00
leaf%mozilla.org
6ea3a5d455 bugs 133794 and 135585, update release notes urls, fix about: page user-agent
printing. reviews/approvals noted in bugs.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119023 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:50:17 +00:00
(no author)
6fd3021383 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119022 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:49:30 +00:00
harishd%netscape.com
75ffa9f160 Fix js line numbers in html documents. b=111576, r=heikki, sr=jst a=asa,scc
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119016 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 23:44:48 +00:00
brade%netscape.com
ae776da105 bug 135862, use correct strings for new composer window (submitted by cmanske, r=brade, sr=kin, a=rjesup, adt=jaime, l10n=rchen)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118985 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 14:42:09 +00:00
brade%netscape.com
add60686df bug 75898 (force platform overlays during jar process) r=pinkerton, sr=sfraser, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118984 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 14:28:32 +00:00
brade%netscape.com
318c4d4e32 remove Composer's debug menu (bug 83349, r=rcassubm cmanske, sr=sfraser, a=asa, adt=jaime)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118982 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 13:54:24 +00:00
kaie%netscape.com
e93a97fc87 b=119481 Fix various unitialized variables.
r=kaie/javi sr=kin a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118977 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 11:37:58 +00:00
kaie%netscape.com
758b75177d b=129740 Fix client auth with profiles migrated from Communicator.
r=javi sr=alecf a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118976 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 11:34:38 +00:00
kaie%netscape.com
045bea67fd b=132543 Fix crash when downloading CRL
r=javi sr=alecf a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118975 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 11:32:10 +00:00
jkeiser%netscape.com
d78f3e282e Fix reflow problems for boxes with non-box children (bug 119849), r=hewitt, sr=attinasi, a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118972 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 04:54:23 +00:00
dcone%netscape.com
f6400c0959 b=135208 r=kmcclusk, sr=attinasi a=asa adt approved. Fix color printout of light text.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118971 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 04:09:28 +00:00
naving%netscape.com
9507ed70ae 136636 r=bienvenu sr=sspitzer a=rjesup. Do not set m_ownFolderStream to false, StartBatch is called twice here
and would leave the stream open.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118970 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-15 04:01:50 +00:00
jdunn%netscape.com
358d670381 Use compiler define _AIX instead of user defined AIX4_3 (which isn't set
on AIX5L)
# 133834
r=dmose@netscape.com
a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118952 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-14 11:15:10 +00:00
timeless%mac.com
76ee3df50c Bug 129999 needs ansi-1251 font support in nsFontMetricsGTK/nsFontMetricsXlib
patch by Roland.Mainz@informatik.med.uni-giessen.de r=katakai sr=attinasi a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118946 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-14 00:40:26 +00:00
seawood%netscape.com
d37950ff50 Make --srcdir autodetection work with activestate perl
Bug #135589


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118942 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 23:03:00 +00:00
caillon%returnzero.com
a31ba917d3 Bug 133764. Unable to change content pack and language pack at once. Patch by kairo@kairo.at, r=dbragg, sr=alecf, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118941 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 22:49:21 +00:00
dbragg%netscape.com
72cf8919f4 Regular update of localeVersion to 1.0.0 (bug 126785) r=tao, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118932 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 16:22:23 +00:00
dbragg%netscape.com
a533e6f79e Regular update of localeVersion strings to 1.0.0. (bug 126785) r=tao, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118931 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 16:09:05 +00:00
dbaron%fas.harvard.edu
e8755c4945 Fix percentage font sizes when all font properties specified (and not inherited) by weaking (again) optimization of not calling parent's GetStyleData. b=132381 r=hyatt sr=waterson a=rjesup
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118930 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 15:40:31 +00:00
sicking%bigfoot.com
e661aff94e Bug 119317: move the "inherits" attribute to the xbl namespace for most clients.
r=hixie sr=hyatt a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118928 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 15:05:18 +00:00
colin%theblakes.com
11af650b54 Fix busted printing for OpenVMS.
All these changes should be OpenVMS only.
b=136884 r=rods sr=attinasi a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118924 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 12:53:28 +00:00
cbiesinger%web.de
7bdf727629 bug 44716 r=pavlov sr=tor a=asa
Mozilla doesn't claim .jfif, .pjpeg, .pjp extensions when checked


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118918 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 09:55:39 +00:00
cotter%netscape.com
804d8b6a74 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; update for edit ciphers section per new UI
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118912 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 05:38:36 +00:00
danm%netscape.com
4699ab09d6 changing the format of the comment describing registerNotification, as requested by depstein. bug 99618
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118902 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:55:13 +00:00
peterlubczynski%netscape.com
a7ec286d93 Stop sending bogus menu events to full-page plugins bug 93895 r=av sr=attinasi
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118896 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:46:31 +00:00
waterson%netscape.com
10b1eb2d72 Bug 135146. Implement NS_FRAME_REFLOW_ROOT to allow reflows for <textarea> and <input type='text'> to be dispatched from the scroll frame within the nsGfxTextControlFrame2. r=kin, sr=attinasi, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118894 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:36:58 +00:00
yokoyama%netscape.com
f9b23c4cbf Bug 135476
Customize Character coding dialog box doesn't
display charencoding correctly.
Fixing typo in pref-charset.js
/r=ftang;/sr=hewitt;/adt+=paw@netscape.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118892 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:35:57 +00:00
mstoltz%netscape.com
8a360f6c9d Bug 136993 - Put the "trusted codebase principals" feature back in.
r=harishd, sr=jst, a=valeski


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118889 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 01:15:57 +00:00
cltbld%netscape.com
b3f041a340 Bug# 134225 - Updated milestone string from 0.9.9+ to 1.0.0+ r=asaki, sr/a=leaf. ycalonje checking in as cltbld
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118887 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 00:54:04 +00:00
jgmyers%netscape.com
f1ccc4dde2 Remove no longer needed forcehandshake code, fixing SSL/IMAP over SOCKS: bug 133434 r=kaie@netscape.com sr=brendan@mozilla.org a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118886 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 00:35:43 +00:00
leaf%mozilla.org
42d216f822 bug 133794 r/a=blizzard. User agent change for rc1, about: page spell-out of "Release
Candidate 1"


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118885 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 00:28:12 +00:00
shanjian%netscape.com
9e65ef69a5 #91305 add univerialchardet into unix default extensions list
add universalchardet.so to unix package as well.
r=cls, sr=hewitt, a=rjesup, adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118884 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-13 00:20:05 +00:00
sspitzer%netscape.com
36cdd5f3ff fix for blocker bug #136874. can't open mail/news window after closing.
r=shuehan, sr=bienvenu.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118881 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 21:16:38 +00:00
ccarlen%netscape.com
d0f31fb261 Fix for blocker bug 136693 - form submission not working dur to unimplemented confirmEx. r=pink/sr=sfraser
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118873 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 20:57:32 +00:00
pinkerton%netscape.com
f8e3cddf0a turn off double-buffering on osx with a new method on nsIRenderingContext. r=kmcclusk/sr=sfraser/a=valeski. bug# 78764
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118853 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 13:56:53 +00:00
brade%netscape.com
4604325dfc fix warning (bug 135771) r=akkana; sr=kin; a=asa; adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118845 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 13:00:48 +00:00
brade%netscape.com
34ed215e04 change progress status icons if cancellation of publish, fix SetProgressFinished to handle cases where we don't have a filename (bug 126258 and 135771) r=cmanske, akkana; sr=kin, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118844 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 12:59:36 +00:00
brade%netscape.com
fa5c5eeb7d disable debug output, handle aborted error as a non-error, handle cases where we have a null channel (bugs 135527, 126258, 135771) r=cmanske, akkana; sr=kin, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118843 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 12:57:53 +00:00
kaie%netscape.com
3317bd174a b=128586 Fix restoring certificates
adt=jaimejr a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118842 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 12:56:08 +00:00
caillon%returnzero.com
04958e3f9b Bug 117707. Disabling most of the prefs in Edit>Prefs>Advanced>Scripts/Windows was causing real JS scripts to break because it used CAPS. Move the checks for these features into C++, with new prefs. Patch by doronr@naboonline.com (initial work) and caillon@returnzero.com. r=fabian sr=jst a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118839 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 10:11:39 +00:00
seawood%netscape.com
92ff2b7272 Roll our own version of abs2rel to fix bustage when MOZ_OBJDIR contains ..
Bug #135589 r=kaie a=jesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118828 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 04:09:31 +00:00
kmcclusk%netscape.com
58150531b4 Fix off by one pixel scrolling errors running under 96DPI by replacing the damageRect.ScaleRoundOut(p2t) call with explicit conversion to twips because ScaleRoundOut introduced errors in the pixel to twips conversion. bug 120918; sr=attinasi r=dcone a=asa adt_a=paw
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118825 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 03:36:37 +00:00
jj%netscape.com
0869043d48 #4830: turning traceback option off for optimized non-Carbon classic builds - 1.0.0 BRANCH
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118817 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 01:06:28 +00:00
wtc%netscape.com
c8e259b919 Bugzilla bug 135448: removed a level of code to make semaphores faster.
This patch is contributed by Michael Kaply <mkaply@us.ibm.com>.
Modified files: _os2 os2cv.c os2vacpp.asm
Tag: MOZILLA_1_0_0_BRANCH


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118815 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 00:27:29 +00:00
morse%netscape.com
c74d723da4 remove the send flyout menu, r=sgehani, sr=jag, a=asa, adt=putterman, ok'ed by mcarlson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118814 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-12 00:04:50 +00:00
shliang%netscape.com
d3fb5163a2 132896 - remove offline mode at startup ui in pref panel - r=ssu,sr=sspitzer,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118811 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 23:40:48 +00:00
darin%netscape.com
4ce3a9d36f fixes bug 136857 "Enable Pipelining doesn't remain disabled when HTTP 1.0
selected" patch=davidstl@yahoo.com r=brade sr=darin


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118806 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:50:59 +00:00
naving%netscape.com
e629278774 136443 r=blake sr=sspitzer a=asa. Make stop button, stop from menus work again in mailnews.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118805 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:44:06 +00:00
dbragg%netscape.com
22d56d374f Final little teeny part of bug 130102. Adding a comma after toolbars. r=bzbarsky, sr=alecf, a=asa (for drivers)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118804 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:34:01 +00:00
blakeross%telocity.com
587635d6b6 127349 - remove partial favicon support. r=ben sr=alecf a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118803 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:27:33 +00:00
(no author)
551965e5db This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118801 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:18:56 +00:00
wtc%netscape.com
1e111acc39 Merged the fix for Bugzilla bug 136625 on the MOZILLA_1_0_0_BRANCH.
r=relyea. a=jaimejr@netscape.com adt1.0.0+ (on ADT's behalf).


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118799 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 22:13:47 +00:00
darin%netscape.com
c461ca32b7 fixes bug 130079 "Importing IE favorites turns spaces into %20 (URL-encoded)"
patch=andreas.otte@debitel.net
r=ben sr=darin a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118786 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 21:12:27 +00:00
pinkerton%netscape.com
a0bac4e516 actually hook up dnd overriding apis to webbrowserchrome. r=brade/sr=blizzard/a=valeski. bug# 136744.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118781 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 19:47:23 +00:00
wtc%netscape.com
8e4140b79c Bugzilla bug 135119: fixed compilation problems on Linux Alpha. r=cls.
a=rjesup@wgate.com for check into the mozilla 1.0.0 branch.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118773 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 18:14:39 +00:00
oeschger%netscape.com
7f3448f68f just updating some mozilla help content, dispensation per 122806, updating per 46917, r=oeschger, author=jayesh sheth
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118764 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:43:36 +00:00
(no author)
0ee3a71577 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118763 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:41:30 +00:00
pinkerton%netscape.com
b1e2b1e3bf clean up checking for a golden child menu. don't delete a golden child menu when setting the hidden attribute. that would be bad. r=saari/sr=sfraser/a=asa. bug# 136460
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118760 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:37:39 +00:00
seawood%netscape.com
2ade79cfe2 Fix link ordering problem when building with static components and a static gtk.
Bug #136192 r=bryner a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118757 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:31:27 +00:00
kin%netscape.com
f57fa35533 Fix for bug 128136 (Printing disables keyboard movement of caret in textfields)
Added SuppressEventHandlers() utility routine, which PreDestroy()
and CreateAnonymousContent() now call to determine if the controller
unregister/register code should be executed.

r=rods@netscape.com  sr=sfraser@netscape.com
adt=jaimejr@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118754 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:22:32 +00:00
kin%netscape.com
c89366eb3e Fix for bug 110940 (order List ID does not display correctly after change )
RenumberListsFor() now calls Invalidate() for a bullet frame if it's ordinal is changed.

r=kmcclusk@netscape.com  sr=waterson@netscape.com
adt=jaimejr@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118753 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:19:49 +00:00
seawood%netscape.com
204c694be1 Add dependency to fix -jx build bustage.
Bug #136297 r=dcran,dmose a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118751 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 14:01:14 +00:00
cbiesinger%web.de
b148ba5407 bug 136382 r=rjesup@wgate.com sr=tor a=asa
preference to disable image placeholders


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118742 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 12:22:31 +00:00
timeless%mac.com
9090496ade Bug 135903 'Size' items in Page Info hasn't units
patch by db48x@yahoo.com r=biesi sr=alecf a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118737 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 06:46:18 +00:00
timeless%mac.com
1d66a32348 Bug 69295 [RFE] Unable to follow link/copy/drag elements of Page Info, e.g. images
patch by db48x@yahoo.com r=kerz sr=alecf a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118736 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 06:45:06 +00:00
badami%netscape.com
d8a4df2f50 HTTP 300 page screws up session history
bug=114982 sr=darin r=rpotts a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118724 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 04:56:03 +00:00
dbaron%fas.harvard.edu
daca085785 Fix topcrash by clearing the view manager's weak pointer back to the pres shell before the pres shell goes away. b=134664 r=roc+moz sr=jag a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118717 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 04:05:10 +00:00
dbaron%fas.harvard.edu
992e77fb04 Fix potential leak of view observer (pres shell). b=134664 r=roc+moz sr=jag a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118716 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 04:04:19 +00:00
serge%netscape.com
fbe8d4409c fix #94895, Flash movie is constantly stopped and restarted, r=peterl, sr=beard, a=paw
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118714 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 03:40:42 +00:00
dveditz%netscape.com
4743655549 fix chromeless/blank browser after upgrade (bug 135222) r=syd, sr=sfraser, a=rjesup, adt=paw
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118705 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 01:42:17 +00:00
(no author)
08b55a8c92 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118704 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 01:28:52 +00:00
saari%netscape.com
358a7fceee small fix 7868 r=jfrancis sr= kin adt+ ect. Added parameter that was in 9.8 branch now to 1.0 branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118694 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 01:02:16 +00:00
darin%netscape.com
6f907b6f81 fixes bug 136678 "byte range request fails if server returns anything other
than 206" r=dougt sr=rpotts a=asa adt1.0.0+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118685 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 00:27:11 +00:00
darin%netscape.com
be52de925f fixes bug 135547 "make event queues more robust"
r=danm sr=rpotts,brendan a=drivers,adt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118683 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 00:19:25 +00:00
alexsavulov%netscape.com
d7072a40f3 fix for bug 107545
added nullcheck for frame pointer
r=kmccluskey sr=attinasi a=rjesup adt1.0.0+=syd


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118681 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-11 00:12:48 +00:00
cotter%netscape.com
7d36c6511d ongoing privacy & securtity help content updates per 122806, r=oeschger; misc. minor correx.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118675 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 23:31:16 +00:00
akkana%netscape.com
9d9d6d8619 129122: Add a new serializer mode (used primarily by mail)
in which <br> tags within <pre> blocks are translated to newlines.
r=nhotta,ducarroz,tmutreja sr=sspitzer a=rjesup adt1.0.0+


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118673 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 23:27:20 +00:00
mkaply%us.ibm.com
239695399c #135450
r=wtc, a=asa
OS/2 only - don't set priority if it is the default


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118669 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 23:05:03 +00:00
mkaply%us.ibm.com
c1b3007458 #136622
r=pedemont, sr=blizzard, a=asa
OS/2 only - rewrite cursor code - support crosshair


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118667 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 22:55:38 +00:00
mkaply%us.ibm.com
731717a2fe OS/2 bustage - need extern C - already baked on trunk - r=dmose
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118657 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 22:12:19 +00:00
kin%netscape.com
c92d888b06 Fix for bug 136408 (Crash editing pages with text widgets)
Use :canvas as selector to avoid triggering layout crash bug 123049.
Added isindex and textarea to list of items to use default cursor.

r=jfrancis@netscape.com  sr=sfraser@netscape.com
adt=syd@netscape.com  a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118655 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 22:02:27 +00:00
ducarroz%netscape.com
3722e59eaa Fix for bug 129358. Need to pre-initialize spec.name to void memory corruption in the copy constructor when the file doesn't exist. Also protect the copy constructor against bogus spec.name. R=fraser, SR=sspitzer, A=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118647 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 21:32:27 +00:00
danm%netscape.com
7341a8a72f freezing interface for 1.0. bug 99618 r=chak,rpotts a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118644 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 21:21:46 +00:00
danm%netscape.com
d87745cb1f freezing interface for 1.0. bug 99617 r=chak,rpotts a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118643 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 21:21:12 +00:00
danm%netscape.com
26fe20452e freezing interface for 1.0. bug 136275 r=chak,rpotts a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118641 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 21:20:10 +00:00
ducarroz%netscape.com
fa18c05f79 Fix for bug 120594. Add a null pointer check to avoid crashing. R=varada, SR=bienvenu, A=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118636 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 20:53:57 +00:00
radha%netscape.com
a48dbb8e4c Fix for bug 135868. crash due to null pointer reference in nsDocShell::InternalLoad().
r=mcafee, sr=rpotts a=valeski. Approved by ADT.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118634 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 19:41:04 +00:00
sicking%bigfoot.com
e317dd137f Bug 135679: fixes form submit when target url is same page and current url has anchor.
r=jkeiser sr=attinasi a=rjesup


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118619 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 14:03:12 +00:00
shliang%netscape.com
8946cfe8c2 133355 - adding fake free web mail account to folder pane - will only show up in commercial builds - r=bhuvan,sr=sspitzer,a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118614 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 11:59:45 +00:00
locka%iol.ie
4a01af29d0 Fix an %s which should have been an %S. b=131143 r=chak@netscape.com sr=rpotts@netscape.com a=lorikaplan@netscape.com (locale) a=jaimejr@netscape.com (adt) a=asa@mozilla.org (drivers)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118612 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 11:30:09 +00:00
locka%iol.ie
c14766db45 Lower limit on number of nested content frames before giving up. b=126466 r=fabian@bluishgecko.net sr=jst@netscape.com a=rjesup@wgate.com (drivers) a=jaimejr@netscape.com (adt)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118611 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 11:28:01 +00:00
caillon%returnzero.com
e885f1dd15 Bug 135998, Clean up and shrink output of the HTML directory listing. r=bbaetz,glazou sr=darin a=valeski
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118608 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 10:28:57 +00:00
varga%utcru.sk
bab75062ce Fix for bug 135048 - Folder pane won't auto scroll down during drag and drop.
Covers 134889 also.
r=bryner, sr=ben, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118607 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 09:48:53 +00:00
racham%netscape.com
49443b5f2c Fixing bug 135594. Allow ISPs to customize mailnews account wizard via overlay wizard pages. r/sr=sspitzer, a=asa, adt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118603 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 09:02:09 +00:00
dmose%netscape.com
895a74da95 LDAP over SSL (bug 107411). UI changes thanks to srilatha@netscape.com nsLDAPSecurityGlue.cpp: r=mcs@netscape.com; Mac S/MIME build changes: r=javi@netscape.com; Mac Project changes: r=rdayal; all other files: r=bhuvan@netscape.com; entire patch: sr=sspitzer@netscape.com; a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118597 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 05:56:07 +00:00
(no author)
446b07e818 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118589 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 04:41:24 +00:00
danm%netscape.com
7fbc9919c2 reverting rev 3.409. this re-opens bug 120155 but fixes bug 134317 and bug 135528. snif.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118587 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 04:36:20 +00:00
cltbld%netscape.com
6320f9759f force commit to allow checkouts by branch and date
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118581 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-10 03:46:58 +00:00
leaf%mozilla.org
72b6ef5cdc testing dolog change, comment change only
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118579 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-09 23:49:17 +00:00
jj%netscape.com
024577fbad pull from MOZILLA_1_0_0_BRANCH tag
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118574 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-09 22:20:34 +00:00
(no author)
6e8bb30a03 This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@118551 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-09 14:31:21 +00:00
25111 changed files with 6160555 additions and 103548 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."

388
mozilla/Makefile.in Normal file
View File

@@ -0,0 +1,388 @@
#
# 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_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_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 - base libraries
#
tier_1_dirs = js
# MacOSX needs to build lib for MoreFiles before xpcom
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
tier_1_dirs += lib/mac/MoreFiles
endif
#
# tier 9 - core components (xpcom,necko,gecko)
#
# intl should not be in here - it's just temporary until
# xpconnect's dependency on intl is repaired - see bug 106130
tier_9_dirs += \
modules/libreg \
string \
xpcom \
intl \
$(NULL)
ifndef MOZ_NATIVE_ZLIB
tier_9_dirs += modules/zlib
endif
# Installer needs standalone libjar, hence standalone zlib
ifneq (,$(filter Linux SunOS WINNT,$(OS_ARCH)))
tier_9_dirs += modules/zlib/standalone
endif
tier_9_dirs += \
modules/libjar \
$(NULL)
ifdef MOZ_JAVA_SUPPLEMENT
tier_9_dirs += \
java/util \
java/webclient \
$(NULL)
endif
ifndef MOZ_NATIVE_JPEG
tier_9_dirs += jpeg
endif
tier_9_dirs += dbm js/src/xpconnect
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
ifdef MOZ_INTERNAL_LIBART_LGPL
tier_9_dirs += other-licenses/libart_lgpl
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 ENABLE_TESTS
tier_9_dirs += xpcom/tests
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
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,55 @@
#!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,46 @@
#
# 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 \
nsIAccessibleDocument.idl \
nsIAccessibleEventReceiver.idl \
nsIAccessibleEventListener.idl \
nsIAccessibleSelectable.idl \
nsIAccessibleProvider.idl \
$(NULL)
EXPORTS = \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

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

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 Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "domstubs.idl"
#include "nsIAtom.idl"
#include "domstubs.idl"
#include "nsIAccessible.idl"
interface nsIWeakReference;
[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);
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 createHTMLCheckboxAccessible(in nsISupports aFrame);
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);
// new
// nsIAccessible CreateHTMLObjectAccessible(in nsISupports aFrame);
// end new
nsIAccessible createHTMLRadioButtonAccessible(in nsISupports aFrame);
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsISupports aPresShell);
nsIAccessible createHTMLTableAccessible(in nsISupports aFrame);
nsIAccessible createHTMLTableCellAccessible(in nsISupports aFrame);
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 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,193 @@
/* -*- 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 DOMString accName;
readonly attribute DOMString accValue;
readonly attribute DOMString accDescription;
readonly attribute unsigned long accRole;
readonly attribute unsigned long accState;
readonly attribute unsigned long accExtState;
readonly attribute DOMString 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;
DOMString 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
// MSAA Roles - only one per nsIAccessible or IAccessible
const unsigned long ROLE_TITLEBAR = 0x00000001;
const unsigned long ROLE_MENUBAR = 0x00000002;
const unsigned long ROLE_SCROLLBAR = 0x00000003;
const unsigned long ROLE_GRIP = 0x00000004;
const unsigned long ROLE_SOUND = 0x00000005;
const unsigned long ROLE_CURSOR = 0x00000006;
const unsigned long ROLE_CARET = 0x00000007;
const unsigned long ROLE_ALERT = 0x00000008;
const unsigned long ROLE_WINDOW = 0x00000009;
const unsigned long ROLE_CLIENT = 0x0000000A;
const unsigned long ROLE_MENUPOPUP = 0x0000000B;
const unsigned long ROLE_MENUITEM = 0x0000000C;
const unsigned long ROLE_TOOLTIP = 0x0000000D;
const unsigned long ROLE_APPLICATION = 0x0000000E;
const unsigned long ROLE_DOCUMENT = 0x0000000F;
const unsigned long ROLE_PANE = 0x00000010;
const unsigned long ROLE_CHART = 0x00000011;
const unsigned long ROLE_DIALOG = 0x00000012;
const unsigned long ROLE_BORDER = 0x00000013;
const unsigned long ROLE_GROUPING = 0x00000014;
const unsigned long ROLE_SEPARATOR = 0x00000015;
const unsigned long ROLE_TOOLBAR = 0x00000016;
const unsigned long ROLE_STATUSBAR = 0x00000017;
const unsigned long ROLE_TABLE = 0x00000018;
const unsigned long ROLE_COLUMNHEADER = 0x00000019;
const unsigned long ROLE_ROWHEADER = 0x0000001A;
const unsigned long ROLE_COLUMN = 0x0000001B;
const unsigned long ROLE_ROW = 0x0000001C;
const unsigned long ROLE_CELL = 0x0000001D;
const unsigned long ROLE_LINK = 0x0000001E;
const unsigned long ROLE_HELPBALLOON = 0x0000001F;
const unsigned long ROLE_CHARACTER = 0x00000020;
const unsigned long ROLE_LIST = 0x00000021;
const unsigned long ROLE_LISTITEM = 0x00000022;
const unsigned long ROLE_OUTLINE = 0x00000023;
const unsigned long ROLE_OUTLINEITEM = 0x00000024;
const unsigned long ROLE_PAGETAB = 0x00000025;
const unsigned long ROLE_PROPERTYPAGE = 0x00000026;
const unsigned long ROLE_INDICATOR = 0x00000027;
const unsigned long ROLE_GRAPHIC = 0x00000028;
const unsigned long ROLE_STATICTEXT = 0x00000029;
const unsigned long ROLE_TEXT = 0x0000002A; // Editable, selectable, etc.
const unsigned long ROLE_PUSHBUTTON = 0x0000002B;
const unsigned long ROLE_CHECKBUTTON = 0x0000002C;
const unsigned long ROLE_RADIOBUTTON = 0x0000002D;
const unsigned long ROLE_COMBOBOX = 0x0000002E;
const unsigned long ROLE_DROPLIST = 0x0000002F;
const unsigned long ROLE_PROGRESSBAR = 0x00000030;
const unsigned long ROLE_DIAL = 0x00000031;
const unsigned long ROLE_HOTKEYFIELD = 0x00000032;
const unsigned long ROLE_SLIDER = 0x00000033;
const unsigned long ROLE_SPINBUTTON = 0x00000034;
const unsigned long ROLE_DIAGRAM = 0x00000035;
const unsigned long ROLE_ANIMATION = 0x00000036;
const unsigned long ROLE_EQUATION = 0x00000037;
const unsigned long ROLE_BUTTONDROPDOWN = 0x00000038;
const unsigned long ROLE_BUTTONMENU = 0x00000039;
const unsigned long ROLE_BUTTONDROPDOWNGRID = 0x0000003A;
const unsigned long ROLE_WHITESPACE = 0x0000003B;
const unsigned long ROLE_PAGETABLIST = 0x0000003C;
const unsigned long ROLE_CLOCK = 0x0000003D;
const unsigned long ROLE_SPLITBUTTON = 0x0000003E; // New in MSAA 2.0
const unsigned long ROLE_IPADDRESS = 0x0000003F; // New in MSAA 2.0
const unsigned long ROLE_NOTHING = 0xffffffff;
};

View File

@@ -0,0 +1,41 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Aaron Leventhal
*
* Contributor(s):
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
#include "domstubs.idl"
interface nsIDocument;
[scriptable, uuid(8781FC88-355F-4439-881F-6504A0A1CEB6)]
interface nsIAccessibleDocument : nsISupports
{
readonly attribute DOMString URL;
readonly attribute DOMString title;
readonly attribute DOMString mimeType;
readonly attribute DOMString docType;
DOMString getNameSpaceURIForID(in short nameSpaceID);
[noscript] nsIDocument getDocument();
};

View File

@@ -0,0 +1,45 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric D Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
[scriptable, uuid(BEE49E7D-9D06-49bf-8984-1694C697D74F)]
interface nsIAccessibleEventListener : nsISupports
{
// these are set to the values given by MSAA
const unsigned long EVENT_FOCUS = 0x8005;
const unsigned long EVENT_STATE_CHANGE = 0x800A;
const unsigned long EVENT_NAME_CHANGE = 0x800C;
const unsigned long EVENT_SELECTION = 0x8006;
const unsigned long EVENT_SELECTION_ADD = 0x8007;
const unsigned long EVENT_SELECTION_REMOVE = 0x8008;
const unsigned long EVENT_SELECTION_WITHIN = 0x8009;
const unsigned long EVENT_MENUSTART = 0x0004;
const unsigned long EVENT_MENUEND = 0x0005;
const unsigned long EVENT_MENUPOPUPSTART = 0x0006;
const unsigned long EVENT_MENUPOPUPEND = 0x0007;
void handleEvent(in unsigned long aEvent, in nsIAccessible aTarget);
};

View File

@@ -0,0 +1,32 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: Eric D Vaughan (evaughan@netscape.com)
*
* Contributor(s):
*/
#include "nsIAccessibleEventListener.idl"
[scriptable, uuid(AB331E47-4FAA-4a12-9480-9B480DD78B39)]
interface nsIAccessibleEventReceiver : nsISupports
{
void addAccessibleEventListener(in nsIAccessibleEventListener aListener);
void removeAccessibleEventListener();
};

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,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):
* John Gaunt
*/
#include "nsISupports.idl"
#include "nsIAccessible.idl"
#include "nsISupportsArray.idl"
[scriptable, uuid(34d268d6-1dd2-11b2-9d63-83a5e0ada290)]
interface nsIAccessibleSelectable : nsISupports
{
nsISupportsArray GetSelectedChildren();
};

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,77 @@
#
# 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 \
content_xul \
docshell \
dom \
gfx \
gfx2 \
htmlparser \
imglib2 \
intl \
layout \
locale \
necko \
string \
uriloader \
view \
webshell \
widget \
xpcom \
xuldoc \
webbrwsr \
$(NULL)
CPPSRCS = \
nsAccessibilityService.cpp \
nsAccessible.cpp \
nsBaseWidgetAccessible.cpp \
nsFormControlAccessible.cpp \
nsGenericAccessible.cpp \
nsRootAccessible.cpp \
nsSelectAccessible.cpp \
$(NULL)
EXPORTS = \
nsRootAccessible.h \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += \
-I$(srcdir) \
-I$(srcdir)/../html \
-I$(srcdir)/../xul \
$(NULL)

View File

@@ -0,0 +1,8 @@
jump = Jump
press = Press
check = Check
uncheck = Uncheck
select = Select
open = Open
close = Close
switch = Switch

View File

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

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_base_s
REQUIRES = \
content \
content_xul \
docshell \
dom \
gfx \
intl \
layout \
locale \
necko \
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)\nsSelectAccessible.obj \
$(NULL)
EXPORTS = \
.\nsRootAccessible.h \
$(NULL)
LINCS = \
-I..\html \
-I..\xul \
-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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,69 @@
/* -*- 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"
class nsIFrame;
class nsIWeakReference;
class nsIDOMNode;
class nsAccessibilityService : public nsIAccessibilityService
{
public:
nsAccessibilityService();
virtual ~nsAccessibilityService();
NS_DECL_ISUPPORTS
// nsIAccessibilityService methods:
NS_DECL_NSIACCESSIBILITYSERVICE
private:
nsresult GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIWeakReference** aShell, nsIDOMNode** aContent);
nsresult GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **weakShell);
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,168 @@
/* -*- 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"
#define ACCESSIBLE_BUNDLE_URL "chrome://global-platform/locale/accessible.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 };
// how many actions
enum { eNo_Action=0, eSingle_Action=1 };
nsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
virtual ~nsAccessible();
NS_IMETHOD GetAccName(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 GetFocusedElement(nsIDOMElement **aFocusedElement);
NS_IMETHOD CacheOptimizations(nsIAccessible *aParent, PRInt32 aSiblingIndex, nsIDOMNodeList *aSiblingList);
// helper method to verify frames
static PRBool IsCorrectFrameType(nsIFrame* aFrame, nsIAtom* aAtom);
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)
};
/** 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,425 @@
/* -*- 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)
{
}
/* 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 == 0) {
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,148 @@
/* -*- 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);
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,226 @@
/* -*- 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;
}
// ------------
// Text Accessibles
// ------------
nsTextAccessible::nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell)
{
}
/**
* 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,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):
* 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);
};
/**
* 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:
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,242 @@
/* -*- 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;
}
/* wstring getAccName (); */
NS_IMETHODIMP nsGenericAccessible::GetAccName(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccValue (); */
NS_IMETHODIMP nsGenericAccessible::GetAccValue(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setAccName (in wstring name); */
NS_IMETHODIMP nsGenericAccessible::SetAccName(const nsAString& name)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring getAccDescription (); */
NS_IMETHODIMP nsGenericAccessible::GetAccDescription(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsGenericAccessible::GetAccRole(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* wstring 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;
}
/* wstring 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;
}
/* wstring 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

View File

@@ -0,0 +1,681 @@
/* -*- 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 "nsIAccessible.h"
#include "nsRootAccessible.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsIDOMNSDocument.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsIDOMEventTarget.h"
#include "nsIDOMElement.h"
#include "nsIDOMNSEvent.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMEventListener.h"
#include "nsReadableUtils.h"
#include "nsILink.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsHTMLLinkAccessible.h"
#include "nsIURI.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsIWebNavigation.h"
#include "nsIXULDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMDocumentType.h"
#include "nsINameSpaceManager.h"
#include "nsIDOMNSHTMLSelectElement.h"
#include "nsIAccessibleSelectable.h"
#include "nsLayoutAtoms.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "nsHTMLSelectAccessible.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsCURILoader.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIScriptGlobalObject.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
NS_INTERFACE_MAP_BEGIN(nsRootAccessible)
NS_INTERFACE_MAP_ENTRY(nsIAccessibleDocument)
NS_INTERFACE_MAP_ENTRY(nsIAccessibleEventReceiver)
NS_INTERFACE_MAP_ENTRY(nsIDOMFocusListener)
NS_INTERFACE_MAP_ENTRY(nsIDOMFormListener)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMFormListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMFormListener)
NS_INTERFACE_MAP_END_INHERITING(nsAccessible)
NS_IMPL_ADDREF_INHERITED(nsRootAccessible, nsAccessible);
NS_IMPL_RELEASE_INHERITED(nsRootAccessible, nsAccessible);
nsIDOMNode * nsRootAccessible::gLastFocusedNode = 0; // Strong reference
PRUint32 nsRootAccessible::gInstanceCount = 0;
//#define DEBUG_LEAKS 1 // aaronl debug
//-----------------------------------------------------
// construction
//-----------------------------------------------------
nsRootAccessible::nsRootAccessible(nsIWeakReference* aShell):nsAccessible(nsnull,aShell),
nsDocAccessibleMixin(aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1")),
mBusy(eBusyStateUninitialized)
{
mListener = nsnull;
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (shell) {
shell->GetDocument(getter_AddRefs(mDocument));
mDOMNode = do_QueryInterface(mDocument);
}
nsLayoutAtoms::AddRefAtoms();
++gInstanceCount;
#ifdef DEBUG_LEAKS
printf("=====> %d nsRootAccessible's %x\n", gInstanceCount, (PRUint32)this);
#endif
}
//-----------------------------------------------------
// destruction
//-----------------------------------------------------
nsRootAccessible::~nsRootAccessible()
{
if (--gInstanceCount == 0)
NS_IF_RELEASE(gLastFocusedNode);
#ifdef DEBUG_LEAKS
printf("======> %d nsRootAccessible's %x\n", gInstanceCount, (PRUint32)this);
#endif
nsLayoutAtoms::ReleaseAtoms();
RemoveAccessibleEventListener();
}
/* attribute wstring accName; */
NS_IMETHODIMP nsRootAccessible::GetAccName(nsAString& aAccName)
{
return GetTitle(aAccName);
}
// helpers
nsIFrame* nsRootAccessible::GetFrame()
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
nsIFrame* root = nsnull;
if (shell)
shell->GetRootFrame(&root);
return root;
}
void nsRootAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame)
{
*aRelativeFrame = GetFrame();
if (*aRelativeFrame)
(*aRelativeFrame)->GetRect(aBounds);
}
/* readonly attribute nsIAccessible accParent; */
NS_IMETHODIMP nsRootAccessible::GetAccParent(nsIAccessible * *aAccParent)
{
*aAccParent = nsnull;
return NS_OK;
}
/* readonly attribute unsigned long accRole; */
NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
if (!shell) {
*aAccRole = 0;
return NS_ERROR_FAILURE;
}
/*
// Commenting this out for now.
// It was requested that we always use MSAA ROLE_PANE objects instead of client objects.
// However, it might be asked that we put client objects back.
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsISupports> container;
context->GetContainer(getter_AddRefs(container));
if (container) {
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem, docTreeItem(do_QueryInterface(container));
if (docTreeItem) {
docTreeItem->GetSameTypeParent(getter_AddRefs(parentTreeItem));
// Basically, if this docshell has a parent of the same type, it's a frame
if (parentTreeItem) {
*aAccRole = ROLE_PANE;
return NS_OK;
}
}
}
*aAccRole = ROLE_CLIENT;
*/
*aAccRole = ROLE_PANE;
// If it's a <dialog>, use ROLE_DIALOG instead
nsCOMPtr<nsIContent> rootContent;
mDocument->GetRootContent(getter_AddRefs(rootContent));
if (rootContent) {
nsCOMPtr<nsIDOMElement> rootElement(do_QueryInterface(rootContent));
if (rootElement) {
nsAutoString name;
rootElement->GetLocalName(name);
if (name.Equals(NS_LITERAL_STRING("dialog")))
*aAccRole = ROLE_DIALOG;
}
}
return NS_OK;
}
NS_IMETHODIMP nsRootAccessible::GetAccState(PRUint32 *aAccState)
{
*aAccState = STATE_FOCUSABLE;
if (mBusy == eBusyStateLoading)
*aAccState |= STATE_BUSY;
return NS_OK;
}
NS_IMETHODIMP nsRootAccessible::GetAccValue(nsAString& aAccValue)
{
return GetURL(aAccValue);
}
void nsRootAccessible::Notify(nsITimer *timer)
{
// Short timer is finished
if (mBusy != eBusyStateDone) {
mBusy = eBusyStateDone;
if (mListener)
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
}
}
void nsRootAccessible::StartDocReadyTimer()
{
if (!mTimer) {
nsresult rv;
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
if (NS_SUCCEEDED(rv)) {
const PRUint32 kUpdateTimerDelay = 1;
mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this), kUpdateTimerDelay);
}
}
}
/* void addAccessibleEventListener (in nsIAccessibleEventListener aListener); */
NS_IMETHODIMP nsRootAccessible::AddAccessibleEventListener(nsIAccessibleEventListener *aListener)
{
NS_ASSERTION(aListener, "Trying to add a null listener!");
if (mListener)
return NS_OK;
mListener = aListener;
// use AddEventListener from the nsIDOMEventTarget interface
nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(mDocument));
if (target) {
// capture DOM focus events
nsresult rv = target->AddEventListener(NS_LITERAL_STRING("focus"), NS_STATIC_CAST(nsIDOMFocusListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// capture Form change events
rv = target->AddEventListener(NS_LITERAL_STRING("change"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// add ourself as a CheckboxStateChange listener (custom event fired in nsHTMLInputElement.cpp)
rv = target->AddEventListener(NS_LITERAL_STRING("CheckboxStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// add ourself as a RadioStateChange Listener ( custom event fired in in nsHTMLInputElement.cpp & radio.xml)
rv = target->AddEventListener(NS_LITERAL_STRING("RadioStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
rv = target->AddEventListener(NS_LITERAL_STRING("ListitemStateChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
rv = target->AddEventListener(NS_LITERAL_STRING("popupshowing"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
rv = target->AddEventListener(NS_LITERAL_STRING("popuphiding"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
rv = target->AddEventListener(NS_LITERAL_STRING("DOMMenuItemActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
// Extremely short timer, after which we announce that page is finished loading
// By waiting until after this short time, we know that the 3rd party accessibility software
// has received it's accessible, and can handle events on it.
StartDocReadyTimer();
// Set up web progress listener - we need to know when page loading is finished
// That way we can send the STATE_CHANGE events for the MSAA root "pane" object (ROLE_PANE),
// and change the STATE_BUSY bit flag
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mPresShell));
if (presShell) {
nsCOMPtr<nsIPresContext> context;
presShell->GetPresContext(getter_AddRefs(context));
if (context) {
nsCOMPtr<nsISupports> container; context->GetContainer(getter_AddRefs(container));
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
if (docShell) {
mWebProgress = do_GetInterface(docShell);
mWebProgress->AddProgressListener(this);
}
}
}
NS_ASSERTION(mWebProgress, "Could not get nsIWebProgress for nsRootAccessible");
mWebProgress->AddProgressListener(this);
}
return NS_OK;
}
/* void removeAccessibleEventListener (); */
NS_IMETHODIMP nsRootAccessible::RemoveAccessibleEventListener()
{
if (mListener) {
nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(mDocument));
if (target) {
target->RemoveEventListener(NS_LITERAL_STRING("focus"), NS_STATIC_CAST(nsIDOMFocusListener*, this), PR_TRUE);
target->RemoveEventListener(NS_LITERAL_STRING("change"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
target->RemoveEventListener(NS_LITERAL_STRING("CheckboxStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
target->RemoveEventListener(NS_LITERAL_STRING("popupshowing"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
target->RemoveEventListener(NS_LITERAL_STRING("popuphiding"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
target->RemoveEventListener(NS_LITERAL_STRING("DOMMenuItemActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
target->RemoveEventListener(NS_LITERAL_STRING("RadioStateChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
target->RemoveEventListener(NS_LITERAL_STRING("ListitemStateChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
}
if (mTimer) {
mTimer->Cancel();
mTimer = nsnull;
}
if (mWebProgress) {
mWebProgress->RemoveProgressListener(this);
mWebProgress = nsnull;
}
mListener = nsnull;
}
return NS_OK;
}
void nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *focusAccessible, nsIDOMNode *focusNode)
{
if (focusNode && gLastFocusedNode != focusNode) {
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, focusAccessible);
NS_IF_RELEASE(gLastFocusedNode);
gLastFocusedNode = focusNode;
NS_ADDREF(gLastFocusedNode);
}
}
// --------------- nsIDOMEventListener Methods (3) ------------------------
NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
{
if (mListener) {
// optionTargetNode is set to current option for HTML selects
nsCOMPtr<nsIDOMNode> targetNode, optionTargetNode;
nsresult rv = GetTargetNode(aEvent, targetNode);
if (NS_FAILED(rv))
return rv;
// Check to see if it's a select element. If so, need the currently focused option
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement(do_QueryInterface(targetNode));
if (selectElement) // ----- Target Node is an HTML <select> element ------
nsHTMLSelectOptionAccessible::GetFocusedOptionNode(targetNode, optionTargetNode);
// for focus events on Radio Groups we give the focus to the selected button
nsCOMPtr<nsIDOMXULSelectControlElement> selectControl(do_QueryInterface(targetNode));
if (selectControl) {
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectItem;
selectControl->GetSelectedItem(getter_AddRefs(selectItem));
optionTargetNode = do_QueryInterface(selectItem);
}
nsAutoString eventType;
aEvent->GetType(eventType);
nsCOMPtr<nsIAccessible> accessible;
if (NS_SUCCEEDED(mAccService->GetAccessibleFor(targetNode, getter_AddRefs(accessible)))) {
if (eventType.EqualsIgnoreCase("focus") || eventType.EqualsIgnoreCase("DOMMenuItemActive")) {
if (optionTargetNode &&
NS_SUCCEEDED(mAccService->GetAccessibleFor(optionTargetNode, getter_AddRefs(accessible)))) {
FireAccessibleFocusEvent(accessible, optionTargetNode);
}
else
FireAccessibleFocusEvent(accessible, targetNode);
}
else if (eventType.EqualsIgnoreCase("change")) {
if (!selectControl) // Don't use onchange to fire EVENT_STATE_CHANGE events for selects
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
}
else if (eventType.EqualsIgnoreCase("ListitemStateChange")) {
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, accessible);
}
else if (eventType.EqualsIgnoreCase("CheckboxStateChange")) {
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
}
else if (eventType.EqualsIgnoreCase("RadioStateChange") ) {
// first the XUL radio buttons
if (targetNode &&
NS_SUCCEEDED(mAccService->GetAccessibleFor(targetNode, getter_AddRefs(accessible)))) {
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, accessible);
}
else { // for the html radio buttons -- apparently the focus code just works. :-)
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
}
}
else if (eventType.EqualsIgnoreCase("popupshowing"))
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPSTART, accessible);
else if (eventType.EqualsIgnoreCase("popuphiding"))
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPEND, accessible);
}
}
return NS_OK;
}
NS_IMETHODIMP nsRootAccessible::GetTargetNode(nsIDOMEvent *aEvent, nsCOMPtr<nsIDOMNode>& aTargetNode)
{
nsCOMPtr<nsIDOMEventTarget> domEventTarget;
nsCOMPtr<nsIDOMNSEvent> nsevent(do_QueryInterface(aEvent));
if (nsevent) {
nsevent->GetOriginalTarget(getter_AddRefs(domEventTarget));
}
nsresult rv;
aTargetNode = do_QueryInterface(domEventTarget, &rv);
return rv;
}
// ------- nsIDOMFocusListener Methods (1) -------------
NS_IMETHODIMP nsRootAccessible::Focus(nsIDOMEvent* aEvent)
{
return HandleEvent(aEvent);
}
NS_IMETHODIMP nsRootAccessible::Blur(nsIDOMEvent* aEvent) { return NS_OK; }
// ------- nsIDOMFormListener Methods (5) -------------
NS_IMETHODIMP nsRootAccessible::Submit(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::Reset(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::Change(nsIDOMEvent* aEvent)
{
// get change events when the form elements changes its state, checked->not,
// deleted text, new text, change in selection for list/combo boxes
// this may be the event that we have the individual Accessible objects
// handle themselves -- have list/combos figure out the change in selection
// have textareas and inputs fire a change of state etc...
return HandleEvent(aEvent);
}
// gets Select events when text is selected in a textarea or input
NS_IMETHODIMP nsRootAccessible::Select(nsIDOMEvent* aEvent) { return NS_OK; }
// gets Input events when text is entered or deleted in a textarea or input
NS_IMETHODIMP nsRootAccessible::Input(nsIDOMEvent* aEvent) { return NS_OK; }
// ------- nsIDOMXULListener Methods (8) ---------------
NS_IMETHODIMP nsRootAccessible::PopupShowing(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::PopupShown(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::PopupHiding(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::PopupHidden(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::Close(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::Command(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::Broadcast(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHODIMP nsRootAccessible::CommandUpdate(nsIDOMEvent* aEvent) { return NS_OK; }
// ------- nsIAccessibleDocument Methods (5) ---------------
NS_IMETHODIMP nsRootAccessible::GetURL(nsAString& aURL)
{
return nsDocAccessibleMixin::GetURL(aURL);
}
NS_IMETHODIMP nsRootAccessible::GetTitle(nsAString& aTitle)
{
return nsDocAccessibleMixin::GetTitle(aTitle);
}
NS_IMETHODIMP nsRootAccessible::GetMimeType(nsAString& aMimeType)
{
return nsDocAccessibleMixin::GetMimeType(aMimeType);
}
NS_IMETHODIMP nsRootAccessible::GetDocType(nsAString& aDocType)
{
return nsDocAccessibleMixin::GetDocType(aDocType);
}
NS_IMETHODIMP nsRootAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAString& aNameSpaceURI)
{
return nsDocAccessibleMixin::GetNameSpaceURIForID(aNameSpaceID, aNameSpaceURI);
}
NS_IMETHODIMP nsRootAccessible::GetDocument(nsIDocument **doc)
{
return nsDocAccessibleMixin::GetDocument(doc);
}
NS_IMETHODIMP nsRootAccessible::OnStateChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 aStateFlags, PRUint32 aStatus)
{
return NS_OK;
}
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
NS_IMETHODIMP nsRootAccessible::OnProgressChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
{
return NS_OK;
}
/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location); */
NS_IMETHODIMP nsRootAccessible::OnLocationChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, nsIURI *location)
{
// Load has been verified, it will occur, about to commence
if (mListener && mBusy != eBusyStateLoading) {
mBusy = eBusyStateLoading;
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
StartDocReadyTimer();
}
return NS_OK;
}
/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
NS_IMETHODIMP nsRootAccessible::OnStatusChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage)
{
return NS_OK;
}
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long state); */
NS_IMETHODIMP nsRootAccessible::OnSecurityChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 state)
{
return NS_OK;
}
nsDocAccessibleMixin::nsDocAccessibleMixin(nsIDocument *aDoc):mDocument(aDoc)
{
}
nsDocAccessibleMixin::nsDocAccessibleMixin(nsIWeakReference *aPresShell)
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(aPresShell));
if (shell)
shell->GetDocument(getter_AddRefs(mDocument));
}
nsDocAccessibleMixin::~nsDocAccessibleMixin()
{
}
NS_IMETHODIMP nsDocAccessibleMixin::GetURL(nsAString& aURL)
{
nsCOMPtr<nsIPresShell> presShell;
mDocument->GetShellAt(0, getter_AddRefs(presShell));
if (!presShell)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDocShell> docShell;
GetDocShellFromPS(presShell, getter_AddRefs(docShell));
nsCOMPtr<nsIWebNavigation> webNav(do_GetInterface(docShell));
nsCAutoString theURL;
if (webNav) {
nsCOMPtr<nsIURI> pURI;
webNav->GetCurrentURI(getter_AddRefs(pURI));
if (pURI)
pURI->GetSpec(theURL);
}
//XXXaaronl Need to use CopyUTF8toUCS2(nsDependentCString(theURL), aURL); when it's written
aURL.Assign(NS_ConvertUTF8toUCS2(theURL));
return NS_OK;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetTitle(nsAString& aTitle)
{
// This doesn't leak - we don't own the const pointer that's returned
aTitle = *(mDocument->GetDocumentTitle());
return NS_OK;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetMimeType(nsAString& aMimeType)
{
nsCOMPtr<nsIDOMNSDocument> domnsDocument(do_QueryInterface(mDocument));
if (domnsDocument) {
return domnsDocument->GetContentType(aMimeType);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetDocType(nsAString& aDocType)
{
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocument));
nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(mDocument));
nsCOMPtr<nsIDOMDocumentType> docType;
if (xulDoc) {
aDocType = NS_LITERAL_STRING("window"); // doctype not implemented for XUL at time of writing - causes assertion
return NS_OK;
}
else if (domDoc && NS_SUCCEEDED(domDoc->GetDoctype(getter_AddRefs(docType))) && docType) {
return docType->GetName(aDocType);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAString& aNameSpaceURI)
{
if (mDocument) {
nsCOMPtr<nsINameSpaceManager> nameSpaceManager;
if (NS_SUCCEEDED(mDocument->GetNameSpaceManager(*getter_AddRefs(nameSpaceManager))))
return nameSpaceManager->GetNameSpaceURI(aNameSpaceID, aNameSpaceURI);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetDocument(nsIDocument **doc)
{
*doc = mDocument;
if (mDocument) {
NS_IF_ADDREF(*doc);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessibleMixin::GetDocShellFromPS(nsIPresShell* aPresShell, nsIDocShell** aDocShell)
{
*aDocShell = nsnull;
if (aPresShell) {
nsCOMPtr<nsIDocument> doc;
aPresShell->GetDocument(getter_AddRefs(doc));
if (doc) {
nsCOMPtr<nsIScriptGlobalObject> scriptObj;
doc->GetScriptGlobalObject(getter_AddRefs(scriptObj));
if (scriptObj) {
scriptObj->GetDocShell(aDocShell);
if (*aDocShell)
return NS_OK;
}
}
}
return NS_ERROR_FAILURE;
}

View File

@@ -0,0 +1,156 @@
/* -*- 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"
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 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);
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();
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;
};
#endif

View File

@@ -0,0 +1,743 @@
/* -*- 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)
*
*
* 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 "nsIDOMEventReceiver.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLOptGroupElement.h"
#include "nsIDOMText.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIFrame.h"
#include "nsIListControlFrame.h"
#include "nsISelectControlFrame.h"
#include "nsLayoutAtoms.h"
#include "nsRootAccessible.h"
#include "nsSelectAccessible.h"
#include "nsIServiceManager.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;
}
}
/** click us! */
NS_IMETHODIMP nsSelectOptionAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("select"), _retval);
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
/** 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;
}
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/** ----- nsListboxAccessible ----- */
/** Constructor */
nsListboxAccessible::nsListboxAccessible(nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
}
/** We are a window, as far as MSAA is concerned */
NS_IMETHODIMP nsListboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_WINDOW;
return NS_OK;
}
/**
* We always have 1 child: a subclass of nsSelectListAccessible.
*/
NS_IMETHODIMP nsListboxAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 1;
return NS_OK;
}
/**
* As a nsHTMLListboxAccessible we can have the following states:
* STATE_FOCUSED
* STATE_READONLY
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsListboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/** ----- nsComboboxAccessible ----- */
/**
* Constructor -- set initial state - closed, register ourself
*/
nsComboboxAccessible::nsComboboxAccessible(nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsAccessible(aDOMNode, aShell)
{
mRegistered = PR_FALSE;
mOpen = PR_FALSE;
SetupMenuListener();
}
/**
* Destructor -- If we are registered, remove ourselves as a listener.
*/
nsComboboxAccessible::~nsComboboxAccessible()
{
if (mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (eventReceiver)
eventReceiver->RemoveEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
}
}
/**
* Inherit the ISupports impl from nsAccessible,
* handle nsIDOMXULListener and nsIAccessibleSelectable ourself
*/
NS_IMPL_ISUPPORTS_INHERITED2(nsComboboxAccessible, nsAccessible, nsIDOMXULListener, nsIAccessibleSelectable)
/**
* If we aren't already registered, register ourselves as a
* listener to "popupshowing" events on our DOM node. Set our
* state to registered, but don't notify MSAA as they
* don't need to know about this state.
*/
void
nsComboboxAccessible::SetupMenuListener()
{
// if not already registered as a popup listener, register ourself
if (!mRegistered) {
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
if (eventReceiver && NS_SUCCEEDED(eventReceiver->AddEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE)))
mRegistered = PR_TRUE;
}
}
/** We are a combobox */
NS_IMETHODIMP nsComboboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_COMBOBOX;
return NS_OK;
}
/**
* We always have 3 children: TextField, Button, Window. In that order
*/
NS_IMETHODIMP nsComboboxAccessible::GetAccChildCount(PRInt32 *_retval)
{
*_retval = 3;
return NS_OK;
}
/**
* nsIAccessibleSelectable method. No-op because our selection is returned through
* GetValue(). This _may_ change just to provide additional info for the vendors
* and another option for them to get at stuff. Despite the fact that we are
* single selection only.
*/
NS_IMETHODIMP nsComboboxAccessible::GetSelectedChildren(nsISupportsArray **_retval)
{
*_retval = nsnull;
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 nsComboboxAccessible::GetAccState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
if (mOpen)
*_retval |= STATE_EXPANDED;
else
*_retval |= STATE_COLLAPSED;
*_retval |= STATE_HASPOPUP | STATE_READONLY | STATE_FOCUSABLE;
return NS_OK;
}
/**
* Set our state to open and (TBD) fire an event to MSAA saying our state
* has changed.
*/
NS_IMETHODIMP nsComboboxAccessible::PopupShowing(nsIDOMEvent* aEvent)
{
mOpen = PR_TRUE;
/* TBD send state change event */
return NS_OK;
}
/**
* Set our state to not open and (TDB) fire an event to MSAA saying
* our state has changed.
*/
NS_IMETHODIMP nsComboboxAccessible::PopupHiding(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
/**
* Set our state to not open and (TDB) fire an event to MSAA saying
* our state has changed.
*/
NS_IMETHODIMP nsComboboxAccessible::Close(nsIDOMEvent* aEvent)
{
mOpen = PR_FALSE;
/* TBD send state change event */
return NS_OK;
}
/** ----- 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,238 @@
/* -*- 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)
*
*
* 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 "nsIDOMXULListener.h"
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/**
* 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 GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
protected:
nsCOMPtr<nsIAccessible> mParent;
};
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/**
* A class that represents the Listbox widget.
*/
class nsListboxAccessible : public nsAccessible
{
public:
nsListboxAccessible (nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsListboxAccessible () {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/**
* A class the represents the HTML Combobox widget.
*/
class nsComboboxAccessible : public nsAccessible,
public nsIAccessibleSelectable,
public nsIDOMXULListener
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
nsComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsComboboxAccessible();
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
/* ----- nsIDOMXULListener ----- */
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();
protected:
PRBool mRegistered;
PRBool mOpen;
};
/**
* 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,71 @@
#
# 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 = \
content \
content_xul \
docshell \
dom \
gfx \
gfx2 \
htmlparser \
imglib2 \
intl \
layout \
locale \
necko \
string \
uriloader \
view \
webshell \
widget \
xpcom \
webbrwsr \
$(NULL)
CPPSRCS = \
nsHTMLAreaAccessible.cpp \
nsHTMLFormControlAccessible.cpp \
nsHTMLIFrameRootAccessible.cpp \
nsHTMLImageAccessible.cpp \
nsHTMLLinkAccessible.cpp \
nsHTMLSelectAccessible.cpp \
nsHTMLTableAccessible.cpp \
nsHTMLTextAccessible.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 \
$(NULL)

View File

@@ -0,0 +1,74 @@
#!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 = \
content \
dom \
gfx \
gfx2 \
htmlparser \
imglib2 \
layout \
locale \
necko \
string \
uriloader \
webshell \
widget \
xpcom \
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\nsHTMLAreaAccessible.obj \
.\$(OBJDIR)\nsHTMLFormControlAccessible.obj \
.\$(OBJDIR)\nsHTMLIFrameRootAccessible.obj \
.\$(OBJDIR)\nsHTMLImageAccessible.obj \
.\$(OBJDIR)\nsHTMLLinkAccessible.obj \
.\$(OBJDIR)\nsHTMLSelectAccessible.obj \
.\$(OBJDIR)\nsHTMLTableAccessible.obj \
.\$(OBJDIR)\nsHTMLTextAccessible.obj \
$(NULL)
EXPORTS = \
$(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,446 @@
/* -*- 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 "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 "nsINameSpaceManager.h"
#include "nsIFrame.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)
{
}
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;
}
// --- 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,113 @@
/* -*- 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"
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 nsHTMLTextFieldAccessible : public nsFormControlAccessible
{
public:
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
};
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,205 @@
/* -*- 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_ADDREF_INHERITED(nsHTMLIFrameAccessible, nsBlockAccessible);
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameAccessible, nsBlockAccessible);
NS_IMETHODIMP
nsHTMLIFrameAccessible::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
NS_ASSERTION(aInstancePtr, "QueryInterface requires a non-NULL destination!");
if ( !aInstancePtr )
return NS_ERROR_NULL_POINTER;
if (aIID.Equals(NS_GET_IID(nsIAccessibleDocument))) {
*aInstancePtr = (void*)(nsIAccessibleDocument*) this;
NS_IF_ADDREF(this);
return NS_OK;
}
return nsBlockAccessible::QueryInterface(aIID, aInstancePtr);
}
nsHTMLIFrameAccessible::nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *aDoc):
nsBlockAccessible(aNode, aShell), mRootAccessible(aRoot), nsDocAccessibleMixin(aDoc)
{
}
/* 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);
}
//=============================//
// nsHTMLIFrameRootAccessible //
//=============================//
//-----------------------------------------------------
// construction
//-----------------------------------------------------
nsHTMLIFrameRootAccessible::nsHTMLIFrameRootAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
mOuterNode(aNode), nsRootAccessible(aShell)
{
}
//-----------------------------------------------------
// destruction
//-----------------------------------------------------
nsHTMLIFrameRootAccessible::~nsHTMLIFrameRootAccessible()
{
}
void nsHTMLIFrameRootAccessible::Init()
{
if (!mOuterAccessible) {
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.");
frame->GetAccessible(getter_AddRefs(mOuterAccessible));
NS_ASSERTION(mOuterAccessible, "Something's wrong - there's no accessible for the outer parent of this frame.");
}
}
}
}
/* readonly attribute nsIAccessible accParent; */
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccParent(nsIAccessible * *_retval)
{
Init();
return mOuterAccessible->GetAccParent(_retval);
}
/* nsIAccessible getAccNextSibling (); */
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
Init();
return mOuterAccessible->GetAccNextSibling(_retval);
}
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
Init();
return mOuterAccessible->GetAccPreviousSibling(_retval);
}

View File

@@ -0,0 +1,101 @@
/* -*- 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"
class nsIWebShell;
class nsIWeakReference;
class nsHTMLIFrameAccessible : public nsBlockAccessible,
public nsIAccessibleDocument,
public nsDocAccessibleMixin
{
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLEDOCUMENT
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;
};
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();
// 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,205 @@
/* -*- 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"
// --- 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);
}
nsIDOMHTMLCollection *mapAreas;
mMapElement->GetAreas(&mapAreas);
if (!mapAreas)
return nsnull;
nsIDOMNode *domNode = nsnull;
mapAreas->Item(areaNum,&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;
}

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 _nsHTMLImageAccessible_H_
#define _nsHTMLImageAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.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;
};
#endif

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):
* 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 "nsReadableUtils.h"
#include "nsIDOMElement.h"
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;
}

View File

@@ -0,0 +1,55 @@
/* -*- 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"
class nsHTMLLinkAccessible : public nsLinkableAccessible
{
public:
nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
};
#endif

View File

@@ -0,0 +1,706 @@
/* -*- 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)
*
*
* 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 "nsHTMLSelectAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIFrame.h"
#include "nsIComboboxControlFrame.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLOptGroupElement.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIDOMHTMLOListElement.h"
#include "nsIListControlFrame.h"
#include "nsIServiceManager.h"
#include "nsLayoutAtoms.h"
#include "nsIDocument.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:
* - nsHTMLComboboxAccessilbe
* - nsHTMLComboboxTextFieldAccessible
* - nsHTMLComboboxButtonAccessible
* - nsHTMLComboboxWindowAccessilbe
* - nsHTMLSelectListAccessible
* - nsHTMLSelectOptionAccessible
*/
/** ------------------------------------------------------ */
/** First, the common widgets */
/** ------------------------------------------------------ */
/** ----- nsHTMLSelectListAccessible ----- */
/** Default Constructor */
nsHTMLSelectListAccessible::nsHTMLSelectListAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell)
:nsSelectListAccessible(aParent, aDOMNode, aShell)
{
}
/**
* As a nsHTMLSelectListAccessible we can have the following states:
* STATE_MULTISELECTABLE
* STATE_EXTSELECTABLE
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccState(PRUint32 *_retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if ( select ) {
PRBool multiple;
select->GetMultiple(&multiple);
if ( multiple )
*_retval |= STATE_MULTISELECTABLE | STATE_EXTSELECTABLE;
}
return NS_OK;
}
/**
* Gets the last child of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccLastChild(nsIAccessible **_retval)
{
nsCOMPtr<nsIDOMNode> last;
mDOMNode->GetLastChild(getter_AddRefs(last));
*_retval = new nsHTMLSelectOptionAccessible(this, last, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Gets the child count of a Select List Accessible. We want to count
* all the <optgroup>s and <option>s as children because we want a
* flat tree under the Select List.
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
{
// Count the number of <Option Group> and <option> elements and return
// this number. This is so the tree can be flattened
nsCOMPtr<nsIDOMNode> next, nextInner, nextChild;
nsCOMPtr<nsIDOMHTMLOptionElement> optionElement(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
PRInt32 countChild;
countChild = 0;
mDOMNode->GetFirstChild(getter_AddRefs(next));
while (next) {
nsCOMPtr<nsIDOMHTMLOptGroupElement> optGroupElement(do_QueryInterface(next));
countChild++;
if (optGroupElement) {
next->GetFirstChild(getter_AddRefs(nextInner));
while (nextInner ) {
nsCOMPtr<nsIDOMHTMLOptionElement> optionElement(do_QueryInterface(nextInner));
if (optionElement) {
countChild++;
}
nextInner->GetNextSibling(getter_AddRefs(nextChild));
nextInner = nextChild;
} // endWhile nextInner
} // endif optGroupElement
next->GetNextSibling(getter_AddRefs(nextInner));
next = nextInner;
} // endWhile next
*aAccChildCount = countChild;
return NS_OK;
}
/** ----- nsHTMLSelectOptionAccessible ----- */
/** Default Constructor */
nsHTMLSelectOptionAccessible::nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsSelectOptionAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Gets the next accessible sibling of the mDOMNode and creates and returns
* a nsHTMLSelectOptionAccessible or nsHTMLSelectOptGroupAccessible.
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
// Get next sibling and if found create and return an accessible for it
// When getting the next sibling of an SelectOption we could be working with
// either an optgroup or an option. We process this tree as flat.
*_retval = nsnull;
nsCOMPtr<nsIDOMNode> next;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
nsCOMPtr<nsIDOMHTMLOptGroupElement> currOptGroupElement(do_QueryInterface(mDOMNode));
if (currOptGroupElement) {
mDOMNode->GetFirstChild(getter_AddRefs(next));
}
if (!next) // no child under a <optgroup> or we started with a <option>
mDOMNode->GetNextSibling(getter_AddRefs(next)); // See if there is another <optgroup>
if (next) {
accService->GetAccessibleFor(next, _retval);
return NS_OK;
}
// else No child then or child is not a <option> nor an <optgroup>
// go back up to the parent and get next sibling from there,
nsCOMPtr<nsIDOMNode> parent, parentNextSib;
mDOMNode->GetParentNode(getter_AddRefs(parent));
if (!parent) {
return NS_OK;
} else {
nsCOMPtr<nsIDOMHTMLOListElement> listElement(do_QueryInterface(parent));
if (listElement) // we are done!
return NS_OK;
}
parent->GetNextSibling(getter_AddRefs(parentNextSib));
if (!parentNextSib)
return NS_OK; // done
// We have a parent that is an option or option group
// get accessible for either one and return it
accService->GetAccessibleFor(parentNextSib, _retval);
return NS_OK;
}
/**
* Gets the previous accessible sibling of the mDOMNode and creates and returns
* a nsHTMLSelectOptionAccessible or nsHTMLSelectOptGroupAccessible.
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
nsCOMPtr<nsIAccessible> thisAcc, selectListAcc, nextSiblingAcc;
accService->GetAccessibleFor(mDOMNode, getter_AddRefs(thisAcc));
// The accessible parent of an <option> or <optgroup> is always the SelectListAcc - see GetAccessibleFor()
thisAcc->GetAccParent(getter_AddRefs(selectListAcc));
if (!selectListAcc) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIDOMNode> siblingDOMNode;
selectListAcc->GetAccFirstChild(_retval);
// Go thru all the siblings until we find ourselves(mDOMNode) then use the
// sibling right before us.
do {
(*_retval)->GetAccNextSibling(getter_AddRefs(nextSiblingAcc));
if (!nextSiblingAcc) {
*_retval = nsnull;
return NS_ERROR_FAILURE;
}
nextSiblingAcc->AccGetDOMNode(getter_AddRefs(siblingDOMNode));
if (siblingDOMNode == mDOMNode) {
break; // we found ourselves!
}
NS_RELEASE(*_retval);
*_retval = nextSiblingAcc;
NS_IF_ADDREF(*_retval);
} while (nextSiblingAcc);
return NS_OK;
}
/**
* As a nsHTMLSelectOptionAccessible we can have the following states:
* STATE_SELECTABLE
* STATE_SELECTED
* STATE_FOCUSED
* STATE_FOCUSABLE
* STATE_INVISIBLE -- not implemented yet
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccState(PRUint32 *_retval)
{
*_retval = 0;
nsCOMPtr<nsIDOMNode> focusedOptionNode, parentNode;
// Go up to parent <select> element
nsCOMPtr<nsIDOMNode> thisNode(do_QueryInterface(mDOMNode));
do {
thisNode->GetParentNode(getter_AddRefs(parentNode));
nsCOMPtr<nsIDOMHTMLSelectElement> selectControl(do_QueryInterface(parentNode));
if (selectControl) {
break;
}
thisNode = parentNode;
} while (parentNode);
if (!parentNode) {
return NS_ERROR_FAILURE;
}
// find out if we are the focused node
GetFocusedOptionNode(parentNode, focusedOptionNode);
if (focusedOptionNode == mDOMNode)
*_retval |= STATE_FOCUSED;
// Are we selected?
nsCOMPtr<nsIDOMHTMLOptionElement> option (do_QueryInterface(mDOMNode));
if ( option ) {
PRBool isSelected = PR_FALSE;
option->GetSelected(&isSelected);
if ( isSelected )
*_retval |= STATE_SELECTED;
}
*_retval |= STATE_SELECTABLE | STATE_FOCUSABLE;
return NS_OK;
}
/**
* Helper method for getting the focused DOM Node from our parent(list) node. We
* need to use the frame to get the focused option because for some reason we
* weren't getting the proper notification when the focus changed using the DOM
*/
nsresult nsHTMLSelectOptionAccessible::GetFocusedOptionNode(nsIDOMNode *aListNode,
nsCOMPtr<nsIDOMNode>& aFocusedOptionNode)
{
NS_ASSERTION(aListNode, "Called GetFocusedOptionNode without a valid list node");
nsCOMPtr<nsIContent> content(do_QueryInterface(aListNode));
nsCOMPtr<nsIDocument> document;
content->GetDocument(*getter_AddRefs(document));
nsCOMPtr<nsIPresShell> shell;
if (document)
document->GetShellAt(0,getter_AddRefs(shell));
if (!shell)
return NS_ERROR_FAILURE;
nsIFrame *frame = nsnull;
shell->GetPrimaryFrameFor(content, &frame);
PRInt32 focusedOptionIndex = 0;
// Get options
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement(do_QueryInterface(aListNode));
NS_ASSERTION(selectElement, "No select element where it should be");
nsCOMPtr<nsIDOMHTMLCollection> options;
nsresult rv = selectElement->GetOptions(getter_AddRefs(options));
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIListControlFrame> listFrame(do_QueryInterface(frame));
if (listFrame) {
// Get what's focused in listbox by asking frame for "selected item".
// Can't use dom interface for this, because it will always return the first selected item
// when there is more than 1 item selected. We need the focused item, not
// the first selected item.
rv = listFrame->GetSelectedIndex(&focusedOptionIndex);
}
else // Combo boxes can only have 1 selected option, so they can use the dom interface for this
rv = selectElement->GetSelectedIndex(&focusedOptionIndex);
}
// Either use options and focused index, or default to list node itself
if (NS_SUCCEEDED(rv) && options && focusedOptionIndex >= 0) // Something is focused
rv = options->Item(focusedOptionIndex, getter_AddRefs(aFocusedOptionNode));
else { // If no options in list or focusedOptionIndex <0, then we are not focused on an item
aFocusedOptionNode = aListNode; // return normal target content
rv = NS_OK;
}
return rv;
}
/** ----- nsHTMLSelectOptGroupAccessible ----- */
/** Default Constructor */
nsHTMLSelectOptGroupAccessible::nsHTMLSelectOptGroupAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsHTMLSelectOptionAccessible(aParent, aDOMNode, aShell)
{
}
/**
* As a nsHTMLSelectOptGroupAccessible we can have the following states:
* STATE_SELECTABLE
*/
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetAccState(PRUint32 *_retval)
{
nsHTMLSelectOptionAccessible::GetAccState(_retval);
*_retval &= ~(STATE_FOCUSABLE|STATE_SELECTABLE);
return NS_OK;
}
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/** ----- nsHTMLListboxAccessible ----- */
/** Constructor */
nsHTMLListboxAccessible::nsHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsListboxAccessible(aDOMNode, aShell)
{
}
/** Inherit the ISupports impl from nsAccessible, we handle nsIAccessibleSelectable */
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLListboxAccessible, nsListboxAccessible, nsIAccessibleSelectable)
/**
* Our last (and only) child is an nsHTMLSelectListAccessible object
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our first (and only) child is an nsHTMLSelectListAccessible object
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if ( ! *_retval )
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our value is the value of our ( first ) selected child. nsIDOMHTMLSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccValue(nsAString& _retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if ( select ) {
select->GetValue(_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
/**
* nsIAccessibleSelectable method.
* - gets from the Select DOMNode the list of all Select Options
* - iterates through all of the options looking for selected Options
* - creates IAccessible objects for selected Options
* - Returns the IAccessibles for selectd Options in the nsISupportsArray
*
* retval will be nsnull if:
* - there are no Options in the Select Element
* - there are Options but none are selected
* - the DOMNode is not a nsIDOMHTMLSelectElement ( shouldn't happen )
*/
NS_IMETHODIMP nsHTMLListboxAccessible::GetSelectedChildren(nsISupportsArray **_retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select(do_QueryInterface(mDOMNode));
if(select) {
nsCOMPtr<nsIDOMHTMLCollection> options;
// get all the options in the select
select->GetOptions(getter_AddRefs(options));
if (options) {
// set up variables we need to get the selected options and to get their nsIAccessile objects
PRUint32 length;
options->GetLength(&length);
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
nsCOMPtr<nsISupportsArray> selectedAccessibles;
NS_NewISupportsArray(getter_AddRefs(selectedAccessibles));
if (!selectedAccessibles || !accService)
return NS_ERROR_FAILURE;
// find the selected options and get the accessible objects;
PRBool isSelected = PR_FALSE;
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
for (PRUint32 i = 0 ; i < length ; i++) {
nsCOMPtr<nsIDOMNode> tempNode;
options->Item(i,getter_AddRefs(tempNode));
if (tempNode) {
nsCOMPtr<nsIDOMHTMLOptionElement> tempOption(do_QueryInterface(tempNode));
if (tempOption)
tempOption->GetSelected(&isSelected);
if (isSelected) {
nsCOMPtr<nsIAccessible> tempAccess;
accService->CreateHTMLSelectOptionAccessible(tempOption, this, context, getter_AddRefs(tempAccess));
if ( tempAccess )
selectedAccessibles->AppendElement(tempAccess);
isSelected = PR_FALSE;
}
}
}
selectedAccessibles->Count(&length); // reusing length
if ( length != 0 ) { // length of nsISupportsArray containing selected options
*_retval = selectedAccessibles;
NS_IF_ADDREF(*_retval);
return NS_OK;
}
}
}
// no options, not a select or none of the options are selected
*_retval = nsnull;
return NS_OK;
}
/** ------------------------------------------------------ */
/** Finally, the Combobox widgets */
/** ------------------------------------------------------ */
/** ----- nsHTMLComboboxAccessible ----- */
/** Constructor */
nsHTMLComboboxAccessible::nsHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
nsComboboxAccessible(aDOMNode, aShell)
{
}
/**
* Our last child is an nsHTMLComboboxWindowAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLComboboxWindowAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our last child is an nsHTMLComboboxTextFieldAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLComboboxTextFieldAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our value is the value of our ( first ) selected child. nsIDOMHTMLSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccValue(nsAString& _retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if (select) {
select->GetValue(_retval);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
/** ----- nsHTMLComboboxTextFieldAccessible ----- */
/** Constructor */
nsHTMLComboboxTextFieldAccessible::nsHTMLComboboxTextFieldAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsComboboxTextFieldAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Our next sibling is an nsHTMLComboboxButtonAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxButtonAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/** -----ComboboxButtonAccessible ----- */
/** Constructor -- cache our parent */
nsHTMLComboboxButtonAccessible::nsHTMLComboboxButtonAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsComboboxButtonAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Programmaticaly click on the button, causing either the display or
* the hiding of the drop down box ( window ).
* Walks the Frame tree and checks for proper frames.
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::AccDoAction(PRUint8 index)
{
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context;
GetPresContext(context);
if (!context)
return NS_ERROR_FAILURE;
frame->FirstChild(context, nsnull, &frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::blockFrame))
return NS_ERROR_FAILURE;
#endif
frame->GetNextSibling(&frame);
#ifdef DEBUG
if (! nsAccessible::IsCorrectFrameType(frame, nsLayoutAtoms::gfxButtonControlFrame))
return NS_ERROR_FAILURE;
#endif
nsCOMPtr<nsIContent> content;
frame->GetContent(getter_AddRefs(content));
// We only have one action, click. Any other index is meaningless(wrong)
if (index == eAction_Click) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(content));
if (element)
{
element->Click();
return NS_OK;
}
return NS_ERROR_FAILURE;
}
return NS_ERROR_INVALID_ARG;
}
/**
* Our next sibling is an nsHTMLComboboxWindowAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccNextSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxWindowAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* Our next sibling is an nsHTMLComboboxTextFieldAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxTextFieldAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/** ----- nsHTMLComboboxWindowAccessible ----- */
/**
* Constructor -- cache our parent
*/
nsHTMLComboboxWindowAccessible::nsHTMLComboboxWindowAccessible(nsIAccessible* aParent,
nsIDOMNode* aDOMNode,
nsIWeakReference* aShell):
nsComboboxWindowAccessible(aParent, aDOMNode, aShell)
{
}
/**
* Our previous sibling is a nsHTMLComboboxButtonAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxWindowAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> parent;
GetAccParent(getter_AddRefs(parent));
*_retval = new nsHTMLComboboxButtonAccessible(parent, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* We only have one child, a list
*/
NS_IMETHODIMP nsHTMLComboboxWindowAccessible::GetAccLastChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}
/**
* We only have one child, a list
*/
NS_IMETHODIMP nsHTMLComboboxWindowAccessible::GetAccFirstChild(nsIAccessible **_retval)
{
*_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell);
if (! *_retval)
return NS_ERROR_FAILURE;
NS_ADDREF(*_retval);
return NS_OK;
}

View File

@@ -0,0 +1,224 @@
/* -*- 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)
*
*
* 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 "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 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 GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_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);
};
/** ------------------------------------------------------ */
/** Secondly, the Listbox widget */
/** ------------------------------------------------------ */
/*
* A class the represents the HTML Listbox widget.
*/
class nsHTMLListboxAccessible : public nsListboxAccessible,
public nsIAccessibleSelectable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
nsHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLListboxAccessible() {}
/* ----- nsIAccessible ----- */
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 nsComboboxAccessible
{
public:
nsHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsHTMLComboboxAccessible() {}
/* ----- nsIAccessible ----- */
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,101 @@
/* -*- 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"
#include "nsIDOMElement.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;
}
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;
}

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 _nsHTMLTableAccessible_H_
#define _nsHTMLTableAccessible_H_
#include "nsAccessible.h"
#include "nsBaseWidgetAccessible.h"
class nsHTMLTableCellAccessible : public nsBlockAccessible
{
public:
nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *aResult);
NS_IMETHOD GetAccState(PRUint32 *aResult);
};
class nsHTMLTableAccessible : public nsBlockAccessible
{
public:
nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *aResult);
NS_IMETHOD GetAccState(PRUint32 *aResult);
NS_IMETHOD GetAccName(nsAString& aResult);
};
#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 "nsFormControlAccessible.h"
class nsIWeakReference;
class nsHTMLTextAccessible : public nsTextAccessible
{
public:
nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
};
#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,70 @@
#
# 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 = \
content \
content_xul \
docshell \
dom \
gfx \
gfx2 \
htmlparser \
imglib2 \
intl \
layout \
locale \
necko \
string \
uriloader \
view \
webshell \
widget \
xpcom \
webbrwsr \
$(NULL)
CPPSRCS = \
nsXULColorPickerAccessible.cpp \
nsXULFormControlAccessible.cpp \
nsXULMenuAccessible.cpp \
nsXULSelectAccessible.cpp \
nsXULTabAccessible.cpp \
nsXULTextAccessible.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 \
$(NULL)

View File

@@ -0,0 +1,67 @@
#!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 = \
content \
dom \
gfx \
layout \
necko \
string \
widget \
xpcom \
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\nsXULColorPickerAccessible.obj \
.\$(OBJDIR)\nsXULFormControlAccessible.obj \
.\$(OBJDIR)\nsXULMenuAccessible.obj \
.\$(OBJDIR)\nsXULSelectAccessible.obj \
.\$(OBJDIR)\nsXULTabAccessible.obj \
.\$(OBJDIR)\nsXULTextAccessible.obj \
$(NULL)
EXPORTS = \
$(NULL)
LINCS = \
-I..\base \
-I..\html \
-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,130 @@
/* -*- 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;
}

View File

@@ -0,0 +1,63 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.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);
};
#endif

View File

@@ -0,0 +1,566 @@
/* -*- 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 "nsIDOMXULDescriptionElement.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), mAccService(do_GetService("@mozilla.org/accessibilityService;1"))
{
}
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->DoCommand();
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->GetChecked(&checked);
xulCheckboxElement->SetChecked(!checked);
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
*/
nsXULProgressMeterAccessible::nsXULProgressMeterAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
nsAccessible(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);
_retval.Append(NS_LITERAL_STRING("%"));
return NS_OK;
}
/**
* 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->DoCommand();
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;
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)
{
}
/**
* 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,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 ***** */
#ifndef _nsXULFormControlAccessible_H_
#define _nsXULFormControlAccessible_H_
// NOTE: alphabetically ordered
#include "nsBaseWidgetAccessible.h"
#include "nsFormControlAccessible.h"
#include "nsHTMLFormControlAccessible.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);
private:
nsCOMPtr<nsIAccessibilityService> mAccService;
};
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 nsAccessible
{
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);
};
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,264 @@
/* -*- 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 "nsIDOMXULPopupElement.h"
// ------------------------ 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::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;
}
// ------------------------ 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;
}
// ------------------------ 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)
{
return nsAccessible::GetAccState(_retval);
}
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,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 _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 GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **aAccFirstChild);
NS_IMETHOD GetAccLastChild(nsIAccessible **aAccLastChild);
NS_IMETHOD GetAccChildCount(PRInt32 *aAccChildCount);
};
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);
};
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,360 @@
/* -*- 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)
*
*
* 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 "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
*/
/** ------------------------------------------------------ */
/** 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):
nsListboxAccessible(aDOMNode, aShell)
{
}
/** Inherit the ISupports impl from nsAccessible, we handle nsIAccessibleSelectable */
NS_IMPL_ISUPPORTS_INHERITED1(nsXULListboxAccessible, nsListboxAccessible, nsIAccessibleSelectable)
/**
* 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
nsListboxAccessible::GetAccState(_retval);
// 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)
{
nsCOMPtr<nsIDOMXULSelectControlElement> select(do_QueryInterface(mDOMNode));
if (select) {
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectedItem;
select->GetSelectedItem(getter_AddRefs(selectedItem));
return selectedItem->GetValue(_retval);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULListboxAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
}
/**
* nsIAccessibleSelectable method.
* - gets from the Select DOMNode the list of all Select Options
* - iterates through all of the options looking for selected Options
* - creates IAccessible objects for selected Options
* - Returns the IAccessibles for selected Options in the nsISupportsArray
*
* retval will be nsnull if:
* - there are no Options in the Select Element
* - there are Options but none are selected
* - the DOMNode is not a nsIDOMXULSelectControlElement ( shouldn't happen )
*/
NS_IMETHODIMP nsXULListboxAccessible::GetSelectedChildren(nsISupportsArray **_retval)
{
*_retval = nsnull;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
nsCOMPtr<nsISupportsArray> selectedAccessibles;
NS_NewISupportsArray(getter_AddRefs(selectedAccessibles));
if (!selectedAccessibles || !accService)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMNodeList> selectedItems;
nsCOMPtr<nsIDOMXULMultiSelectControlElement> listbox (do_QueryInterface(mDOMNode));
PRInt32 length = 0;
if (listbox) {
listbox->GetSelectedCount(&length);
for ( PRInt32 i = 0 ; i < length ; i++ ) {
nsCOMPtr<nsIAccessible> tempAccessible;
nsCOMPtr<nsIDOMXULSelectControlItemElement> tempNode;
listbox->GetSelectedItem(i, 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);
}
// no options, not a select or none of the options are selected
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):
nsComboboxAccessible(aDOMNode, aShell)
{
}
/**
* Our value is the value of our ( first ) selected child. nsIDOMXULSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsXULComboboxAccessible::GetAccValue(nsAString& _retval)
{
nsCOMPtr<nsIDOMXULSelectControlElement> select(do_QueryInterface(mDOMNode));
if (select) {
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectedItem;
select->GetSelectedItem(getter_AddRefs(selectedItem));
return selectedItem->GetValue(_retval);
}
return NS_ERROR_FAILURE;
}

View File

@@ -0,0 +1,167 @@
/* -*- 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)
*
*
* 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 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 nsListboxAccessible,
public nsIAccessibleSelectable
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLESELECTABLE
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 nsComboboxAccessible
{
public:
nsXULComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULComboboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccValue(nsAString& _retval);
};
#endif

View File

@@ -0,0 +1,211 @@
/* -*- 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 "nsXULTabAccessible.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.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->DoCommand();
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);
*_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)
{
}
/** We are a Property Page */
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccRole(PRUint32 *_retval)
{
*_retval = ROLE_PROPERTYPAGE;
return NS_OK;
}
/**
* Possible values: focused, focusable, 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;
}
/**
* 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,99 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* 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 GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
protected:
nsCOMPtr<nsIDOMNode> mGParentDOMNode;
nsCOMPtr<nsIDOMNode> mParentDOMNode;
};
/** 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,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.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;
}

View File

@@ -0,0 +1,55 @@
/* -*- 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 "nsFormControlAccessible.h"
class nsIWeakReference;
class nsXULTextAccessible : public nsTextAccessible
{
public:
nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
};
#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

1244
mozilla/allmakefiles.sh Executable file

File diff suppressed because it is too large Load Diff

39
mozilla/build/Makefile.in Normal file
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 Communicator client code,
# released March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifeq (,$(filter WINNT OS2,$(OS_ARCH)))
DIRS = unix
endif
include $(topsrcdir)/config/rules.mk
# Install bloaturls.txt file for tinderbox Bloaty test.
libs:: bloaturls.txt
$(INSTALL) $< $(DIST)/bin

View File

@@ -0,0 +1,179 @@
#! /usr/bin/env perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# acoutput-fast.pl - Quickly create makefiles that are in a common format.
#
# Most of the makefiles in mozilla only refer to two configure variables:
# @srcdir@
# @top_srcdir@
# However, configure does not know any better and it runs sed on each file
# with over 150 replacement rules (slow as molasses).
#
# This script takes a list of makefiles as input. For example,
#
# echo $MAKEFILES | acoutput-fast.pl
#
# The script creates each Makefile that only references @srcdir@ and
# @top_srcdir@. For other files, it lists them in a shell command that is
# printed to stdout:
#
# CONFIG_FILES="unhandled_files..."; export CONFIG_FILES
#
# This command can be used to have config.status create the unhandled
# files. For example,
#
# eval "echo $MAKEFILES | acoutput-fast.pl"
# AC_OUTPUT($MAKEFILES)
#
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
#use File::Basename;
sub dirname {
my $dir = $_[0];
return '.' if not $dir =~ m%/%;
$dir =~ s%/[^/][^/]*$%%;
return $dir;
}
# Create one directory. Assumes it doesn't already exist.
# Will create parent(s) if needed.
sub create_directory {
my $dir = $_[0];
my $parent = dirname($dir);
create_directory($parent) if not -d $parent;
mkdir "$dir",0777;
}
# Create all the directories at once.
# This can be much faster than calling mkdir() for each one.
sub create_directories {
my @makefiles = @_;
my @dirs = ();
my $ac_file;
foreach $ac_file (@makefiles) {
push @dirs, dirname($ac_file);
}
# Call mkdir with the directories sorted by subdir count (how many /'s)
if (@dirs) {
my $mkdir_command = "mkdir -p ". join(' ', @dirs);
if (system($mkdir_command) != 0) {
print STDERR "Creating dirs all at once failed; trying one at atime\n";
foreach $dir (@dirs) {
if (not -d $dir) {
print STDERR "Creating directory $dir\n";
create_directory($dir);
}
}
}
}
}
if ($ARGV[0] =~ /^--srcdir=/) {
$ac_given_srcdir = (split /=/, shift @ARGV)[1];
} else {
$ac_given_srcdir = $0;
$ac_given_srcdir =~ s|/?build/autoconf/.*$||;
$ac_given_srcdir = '.' if $ac_given_srcdir eq '';
}
# Read list of makefiles from the stdin or,
# from files listed on the command-line.
#
@makefiles=();
push @makefiles, split while (<STDIN>);
# Create all the directories at once.
# This can be much faster than calling mkdir() for each one.
create_directories(@makefiles);
# Output the makefiles.
#
@unhandled=();
foreach $ac_file (@makefiles) {
if (not $ac_file =~ /Makefile$/ or $ac_file =~ /:/) {
push @unhandled, $ac_file;
next;
}
$ac_file_in = "$ac_given_srcdir/$ac_file.in";
$ac_dir = dirname($ac_file);
if ($ac_dir eq '.') {
$ac_dir_suffix = '';
$ac_dots = '';
} else {
$ac_dir_suffix = "/$ac_dir";
$ac_dir_suffix =~ s%^/\./%/%;
$ac_dots = $ac_dir_suffix;
$ac_dots =~ s%/[^/]*%../%g;
}
if ($ac_given_srcdir eq '.') {
$srcdir = '.';
if ($ac_dots eq '') {
$top_srcdir = '.'
} else {
$top_srcdir = $ac_dots;
$top_srcdir =~ s%/$%%;
}
} elsif ($ac_given_srcdir =~ m%^/% or $ac_given_srcdir =~ m%^.:/%) {
$srcdir = "$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_given_srcdir";
} else {
$srcdir = "$ac_dots$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_dots$ac_given_srcdir";
}
if (-e $ac_file) {
next if -M _ < -M $ac_file_in;
print STDERR "updating $ac_file\n";
} else {
print STDERR "creating $ac_file\n";
}
open (INFILE, "<$ac_file_in")
or ( warn "can't read $ac_file_in: No such file or directory\n" and next);
open (OUTFILE, ">$ac_file")
or ( warn "Unable to create $ac_file\n" and next);
while (<INFILE>) {
#if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
# warn "Two defines on a line:$ac_file:$.:$_";
# push @unhandled, $ac_file;
# last;
#}
s/\@srcdir\@/$srcdir/g;
s/\@top_srcdir\@/$top_srcdir/g;
if (/\@[_a-zA-Z]*\@/) {
warn "Unknown variable:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}
print OUTFILE;
}
close INFILE;
close OUTFILE;
}
# Print the shell command to be evaluated by configure.
#
print "CONFIG_FILES=\"".join(' ', @unhandled)."\"; export CONFIG_FILES\n";

View File

@@ -0,0 +1,140 @@
dnl The contents of this file are subject to the Netscape Public
dnl License Version 1.1 (the "License"); you may not use this file
dnl except in compliance with the License. You may obtain a copy of
dnl the License at http://www.mozilla.org/NPL/
dnl
dnl Software distributed under the License is distributed on an "AS
dnl IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
dnl implied. See the License for the specific language governing
dnl rights and limitations under the License.
dnl
dnl The Original Code is mozilla.org code.
dnl
dnl The Initial Developer of the Original Code is Netscape
dnl Communications Corporation. Portions created by Netscape are
dnl Copyright (C) 1999 Netscape Communications Corporation. All
dnl Rights Reserved.
dnl
dnl Contributor(s):
dnl
dnl altoptions.m4 - An alternative way of specifying command-line options.
dnl These macros are needed to support a menu-based configurator.
dnl This file also includes the macro, AM_READ_MYCONFIG, for reading
dnl the 'myconfig.m4' file.
dnl Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
dnl MOZ_ARG_ENABLE_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE]])
dnl MOZ_ARG_DISABLE_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE]])
dnl MOZ_ARG_ENABLE_STRING( NAME, HELP, IF-SET [, ELSE])
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING( NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
dnl MOZ_ARG_WITH_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE])
dnl MOZ_ARG_WITHOUT_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE])
dnl MOZ_ARG_WITH_STRING( NAME, HELP, IF-SET [, ELSE])
dnl MOZ_ARG_HEADER(Comment)
dnl MOZ_CHECK_PTHREADS( NAME, IF-YES [, ELSE ])
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
dnl MOZ_TWO_STRING_TEST(NAME, VAL, STR1, IF-STR1, STR2, IF-STR2 [, ELSE])
AC_DEFUN(MOZ_TWO_STRING_TEST,
[if test "[$2]" = "[$3]"; then
ifelse([$4], , :, [$4])
elif test "[$2]" = "[$5]"; then
ifelse([$6], , :, [$6])
else
ifelse([$7], ,
[AC_MSG_ERROR([Option, [$1], does not take an argument ([$2]).])],
[$7])
fi])
dnl MOZ_ARG_ENABLE_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE]])
AC_DEFUN(MOZ_ARG_ENABLE_BOOL,
[AC_ARG_ENABLE([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], [$enableval], yes, [$3], no, [$4])],
[$5])])
dnl MOZ_ARG_DISABLE_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE]])
AC_DEFUN(MOZ_ARG_DISABLE_BOOL,
[AC_ARG_ENABLE([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], [$enableval], no, [$3], yes, [$4])],
[$5])])
dnl MOZ_ARG_ENABLE_STRING(NAME, HELP, IF-SET [, ELSE])
AC_DEFUN(MOZ_ARG_ENABLE_STRING,
[AC_ARG_ENABLE([$1], [$2], [$3], [$4])])
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING(NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
AC_DEFUN(MOZ_ARG_ENABLE_BOOL_OR_STRING,
[ifelse([$5], ,
[errprint([Option, $1, needs an "IF-SET" argument.
])
m4exit(1)],
[AC_ARG_ENABLE([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], [$enableval], yes, [$3], no, [$4], [$5])],
[$6])])])
dnl MOZ_ARG_WITH_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE])
AC_DEFUN(MOZ_ARG_WITH_BOOL,
[AC_ARG_WITH([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], [$withval], yes, [$3], no, [$4])],
[$5])])
dnl MOZ_ARG_WITHOUT_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE])
AC_DEFUN(MOZ_ARG_WITHOUT_BOOL,
[AC_ARG_WITH([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], [$withval], no, [$3], yes, [$4])],
[$5])])
dnl MOZ_ARG_WITH_STRING(NAME, HELP, IF-SET [, ELSE])
AC_DEFUN(MOZ_ARG_WITH_STRING,
[AC_ARG_WITH([$1], [$2], [$3], [$4])])
dnl MOZ_ARG_HEADER(Comment)
dnl This is used by webconfig to group options
define(MOZ_ARG_HEADER, [# $1])
dnl
dnl Apparently, some systems cannot properly check for the pthread
dnl library unless <pthread.h> is included so we need to test
dnl using it
dnl
dnl MOZ_CHECK_PTHREADS(lib, success, failure)
AC_DEFUN(MOZ_CHECK_PTHREADS,
[
AC_MSG_CHECKING([for pthread_create in -l$1])
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
int main() {
pthread_t t;
if (!pthread_create(&t, 0, &foo, 0)) {
pthread_join(t, 0);
}
exit(0);
}" > dummy.c ;
echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS" 1>&5;
${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS 2>&5;
_res=$? ;
rm -f dummy.c dummy${ac_exeext} ;
if test "$_res" = "0"; then
AC_MSG_RESULT([yes])
[$2]
else
AC_MSG_RESULT([no])
[$3]
fi
])
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
AC_DEFUN(MOZ_READ_MOZCONFIG,
[AC_REQUIRE([AC_INIT_BINSH])dnl
# Read in '.mozconfig' script to set the initial options.
# See the mozconfig2configure script for more details.
_AUTOCONF_TOOLS_DIR=`dirname [$]0`/[$1]/build/autoconf
. $_AUTOCONF_TOOLS_DIR/mozconfig2configure])
dnl This gets inserted at the top of the configure script
MOZ_READ_MOZCONFIG(MOZ_TOPSRCDIR)

View File

@@ -0,0 +1,54 @@
#!/bin/sh
#
# 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):
#
# clean-config.sh - Removes all files generated by mozilla configure.
# Only removes files from the topsrcdir. To clean up an objdir,
# simply remove the directory and start over.
#
# Usage:
# 1. cd <topsrcdir>
# 2. build/autoconf/clean-config.sh
#
# Send comments, improvements, bugs to slamm@netscape.com
topsrcdir=`cd \`dirname $0\`/../..; pwd`
if [ ! -f configure.in ]; then
echo "clean-config.sh only cleans the source tree. To run," 2>&1
echo " cd $topsrcdir; build/autoconf/clean-config.sh" 2>&1
echo " (To clean a separate objdir, simple remove the directory.)" 2>&1
exit 1
fi
if [ -f mailnews/makefiles ]; then
MOZ_MAIL_NEWS=1
export MOZ_MAIL_NEWS
fi
. allmakefiles.sh
rm -fr $MAKEFILES \
config-defs.h \
config.cache \
config.log \
config.status \
$NULL

1326
mozilla/build/autoconf/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1424
mozilla/build/autoconf/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,137 @@
# Configure paths for FreeType2
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
dnl AM_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS
dnl
AC_DEFUN(AC_CHECK_FT2,
[dnl
dnl Get the cflags and libraries from the freetype-config script
dnl
AC_ARG_WITH(freetype-prefix,
[ --with-ft-prefix=PFX Prefix where FreeType is installed (optional)],
ft_config_prefix="$withval", ft_config_prefix="")
AC_ARG_WITH(freetype-exec-prefix,
[ --with-ft-exec-prefix=PFX
Exec prefix where FreeType is installed (optional)],
ft_config_exec_prefix="$withval", ft_config_exec_prefix="")
AC_ARG_ENABLE(freetypetest,
[ --disable-freetypetest
Do not try to compile and run a test FreeType program],
[], enable_fttest=yes)
if test x$ft_config_exec_prefix != x ; then
ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
if test x${FT2_CONFIG+set} != xset ; then
FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
fi
fi
if test x$ft_config_prefix != x ; then
ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
if test x${FT2_CONFIG+set} != xset ; then
FT2_CONFIG=$ft_config_prefix/bin/freetype-config
fi
fi
AC_PATH_PROG(FT2_CONFIG, freetype-config, no)
min_ft_version=ifelse([$1], ,6.1.0,$1)
AC_MSG_CHECKING(for FreeType - version >= $min_ft_version)
no_ft=""
if test "$FT2_CONFIG" = "no" ; then
no_ft=yes
else
FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
ft_min_major_version=`echo $min_ft_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
ft_min_minor_version=`echo $min_ft_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
ft_min_micro_version=`echo $min_ft_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_fttest" = "xyes" ; then
ft_config_is_lt=no
if test $ft_config_major_version -lt $ft_min_major_version ; then
ft_config_is_lt=yes
else
if test $ft_config_major_version -eq $ft_min_major_version ; then
if test $ft_config_minor_version -lt $ft_min_minor_version ; then
ft_config_is_lt=yes
else
if test $ft_config_minor_version -eq $ft_min_minor_version ; then
if test $ft_config_micro_version -lt $ft_min_micro_version ; then
ft_config_is_lt=yes
fi
fi
fi
fi
fi
if test "x$ft_config_is_lt" = "xyes" ; then
ifelse([$3], , :, [$3])
AC_MSG_RESULT(no)
else
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $FT2_CFLAGS"
LIBS="$FT2_LIBS $LIBS"
dnl
dnl Sanity checks for the results of freetype-config to some extent
dnl
AC_TRY_RUN([
#include <ft2build.h>
#include FT_FREETYPE_H
#include <stdio.h>
#include <stdlib.h>
int
main()
{
FT_Library library;
FT_Error error;
error = FT_Init_FreeType(&library);
if (error)
return 1;
else
{
FT_Done_FreeType(library);
return 0;
}
}
],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi # test $ft_config_version -lt $ft_min_version
fi # test "x$enable_fttest" = "xyes"
fi # test "$FT2_CONFIG" = "no"
if test "x$ft_config_is_lt" != "xyes" ; then
if test "x$no_ft" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$FT2_CONFIG" = "no" ; then
echo "*** The freetype-config script installed by FreeType 2 could not be found."
echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the FT2_CONFIG environment variable to the"
echo "*** full path to freetype-config."
else
echo "*** The FreeType test program failed to run. If your system uses"
echo "*** shared libraries and they are installed outside the normal"
echo "*** system library path, make sure the variable LD_LIBRARY_PATH"
echo "*** (or whatever is appropiate for your system) is correctly set."
fi
FT2_CFLAGS=""
FT2_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(FT2_CFLAGS)
AC_SUBST(FT2_LIBS)
fi
])

View File

@@ -0,0 +1,200 @@
# Configure paths for GLIB
# Owen Taylor 97-11-3
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
dnl gthread is specified in MODULES, pass to glib-config
dnl
AC_DEFUN(AM_PATH_GLIB,
[dnl
dnl Get the cflags and libraries from the glib-config script
dnl
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
glib_config_prefix="$withval", glib_config_prefix="")
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX
Exec prefix where GLIB is installed (optional)],
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
if test x$glib_config_exec_prefix != x ; then
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
fi
fi
if test x$glib_config_prefix != x ; then
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
fi
fi
for module in . $4
do
case "$module" in
gmodule)
glib_config_args="$glib_config_args gmodule"
;;
gthread)
glib_config_args="$glib_config_args gthread"
;;
esac
done
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
unset ac_cv_path_GLIB_CONFIG
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
min_glib_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
no_glib=""
if test "$GLIB_CONFIG" = "no" ; then
no_glib=yes
else
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of glib-config to some extent
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If glib-config was correct, then it is best\n");
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
printf("*** correct copy of glib-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GLIB_CONFIG" = "no" ; then
echo "*** The glib-config script installed by GLIB could not be found"
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
echo "*** full path to glib-config."
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
rm -f conf.glibtest
])

View File

@@ -0,0 +1,191 @@
# Configure paths for GTK+
# Owen Taylor 97-11-3
# (copy of gtk.m4 (public domain))
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
AC_DEFUN(AM_PATH_GTK,
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX
Exec prefix where GTK is installed (optional)],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
, enable_gtktest=yes)
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
fi
fi
if test x$gtk_config_prefix != x ; then
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
fi
fi
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
unset ac_cv_path_GTK_CONFIG
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
min_gtk_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
if test "$GTK_CONFIG" = "no" ; then
no_gtk=yes
else
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
dnl
dnl Now check if the installed GTK is sufficiently new. (Also sanity
dnl checks the results of gtk-config to some extent
dnl
rm -f conf.gtktest
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtktest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||
(gtk_micro_version != $gtk_config_micro_version))
{
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If gtk-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
(gtk_minor_version != GTK_MINOR_VERSION) ||
(gtk_micro_version != GTK_MICRO_VERSION))
{
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
}
#endif /* defined (GTK_MAJOR_VERSION) ... */
else
{
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GTK_CONFIG" = "no" ; then
echo "*** The gtk-config script installed by GTK could not be found."
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GTK_CONFIG environment variable to the"
echo "*** full path to gtk-config."
echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk"
else
if test -f conf.gtktest ; then
:
else
echo "*** Could not run GTK test program, checking why..."
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_TRY_LINK([
#include <gtk/gtk.h>
#include <stdio.h>
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK or finding the wrong"
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
rm -f conf.gtktest
])

119
mozilla/build/autoconf/install-sh Executable file
View File

@@ -0,0 +1,119 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5; it is not part of GNU.
#
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
instcmd="$mvprog"
chmodcmd=""
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
fi
# Make a temp file name in the proper directory.
dstdir=`dirname $dst`
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp
# and set any options; do chmod last to preserve setuid bits
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
# Now rename the file to the real destination.
$doit $rmcmd $dst
$doit $mvcmd $dsttmp $dst
exit 0

View File

@@ -0,0 +1,198 @@
# Configure paths for LIBIDL
dnl AM_PATH_LIBIDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for LIBIDL, and define LIBIDL_CFLAGS and LIBIDL_LIBS
dnl
AC_DEFUN(AM_PATH_LIBIDL,
[dnl
dnl Get the cflags and libraries from the libIDL-config script
dnl
AC_ARG_WITH(libIDL-prefix,[ --with-libIDL-prefix=PFX
Prefix where libIDL is installed (optional)],
libIDL_config_prefix="$withval", libIDL_config_prefix="")
AC_ARG_WITH(libIDL-exec-prefix,[ --with-libIDL-exec-prefix=PFX
Exec prefix where libIDL is installed (optional)],
libIDL_config_exec_prefix="$withval", libIDL_config_exec_prefix="")
AC_ARG_ENABLE(libIDLtest, [ --disable-libIDLtest Do not try to compile and run a test libIDL program],
, enable_libIDLtest=yes)
if test x$libIDL_config_exec_prefix != x ; then
libIDL_config_args="$libIDL_config_args --exec-prefix=$libIDL_config_exec_prefix"
if test x${LIBIDL_CONFIG+set} != xset ; then
LIBIDL_CONFIG=$libIDL_config_exec_prefix/bin/libIDL-config
fi
fi
if test x$libIDL_config_prefix != x ; then
libIDL_config_args="$libIDL_config_args --prefix=$libIDL_config_prefix"
if test x${LIBIDL_CONFIG+set} != xset ; then
LIBIDL_CONFIG=$libIDL_config_prefix/bin/libIDL-config
fi
fi
AM_PATH_GLIB(1.2.0)
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
unset ac_cv_path_LIBIDL_CONFIG
AC_PATH_PROG(LIBIDL_CONFIG, libIDL-config, no)
min_libIDL_version=ifelse([$1], ,0.6.0,$1)
AC_MSG_CHECKING(for libIDL - version >= $min_libIDL_version)
no_libIDL=""
if test "$LIBIDL_CONFIG" = "no" ; then
no_libIDL=yes
else
LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
# hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
# this after we start requiring libIDL 0.6.8 or anything higher
LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
libIDL_config_minor_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_libIDLtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
LIBS="$LIBIDL_LIBS $LIBS"
dnl
dnl Now check if the installed LIBIDL is sufficiently new.
dnl
rm -f conf.libIDLtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <libIDL/IDL.h>
int
main ()
{
int major, minor, micro;
int libIDL_major_version;
int libIDL_minor_version;
int libIDL_micro_version;
char *tmp_version;
system ("touch conf.libIDLtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup ("$min_libIDL_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_libIDL_version");
exit(1);
}
tmp_version = g_strdup (IDL_get_libver_string ());
if (sscanf(tmp_version, "%d.%d.%d",
&libIDL_major_version,
&libIDL_minor_version,
&libIDL_micro_version) != 3) {
printf("%s, bad version string\n", tmp_version);
exit(1);
}
if ((libIDL_major_version != $libIDL_config_major_version) ||
(libIDL_minor_version != $libIDL_config_minor_version) ||
(libIDL_micro_version != $libIDL_config_micro_version))
{
printf("\n*** 'libIDL-config --version' returned %d.%d.%d, but libIDL (%d.%d.%d)\n",
$libIDL_config_major_version, $libIDL_config_minor_version, $libIDL_config_micro_version,
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
printf ("*** was found! If libIDL-config was correct, then it is best\n");
printf ("*** to remove the old version of LIBIDL. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If libIDL-config was wrong, set the environment variable LIBIDL_CONFIG\n");
printf("*** to point to the correct copy of libIDL-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((libIDL_major_version != LIBIDL_MAJOR_VERSION) ||
(libIDL_minor_version != LIBIDL_MINOR_VERSION) ||
(libIDL_micro_version != LIBIDL_MICRO_VERSION))
{
printf("\n*** libIDL header files (version %d.%d.%d) do not match\n",
LIBIDL_MAJOR_VERSION, LIBIDL_MINOR_VERSION, LIBIDL_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
}
else
{
if ((libIDL_major_version > major) ||
((libIDL_major_version == major) && (libIDL_minor_version > minor)) ||
((libIDL_major_version == major) && (libIDL_minor_version == minor) && (libIDL_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of libIDL (%d.%d.%d) was found.\n",
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
printf("*** You need at least libIDL version %d.%d.%d.\n",
major, minor, micro);
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the libIDL-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of libIDL, but you can also set the LIBIDL_CONFIG environment to point to the\n");
printf("*** correct copy of libIDL-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_libIDL=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_libIDL" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$LIBIDL_CONFIG" = "no" ; then
echo "*** The libIDL-config script installed by libIDL could not be found"
echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the LIBIDL_CONFIG environment variable to the"
echo "*** full path to libIDL-config."
else
if test -f conf.libIDLtest ; then
:
else
echo "*** Could not run libIDL test program, checking why..."
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
LIBS="$LIBS $LIBIDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <stdlib.h>
#include <libIDL/IDL.h>
], [ return IDL_get_libver_string ? 1 : 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding libIDL or finding the wrong"
echo "*** version of LIBIDL. If it is not finding libIDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means libIDL was incorrectly installed"
echo "*** or that you have moved libIDL since it was installed. In the latter case, you"
echo "*** may want to edit the libIDL-config script: $LIBIDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
LIBIDL_CFLAGS=""
LIBIDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(LIBIDL_CFLAGS)
AC_SUBST(LIBIDL_LIBS)
rm -f conf.libIDLtest
])

View File

@@ -0,0 +1,165 @@
# Configure paths for LIBART
# Raph Levien 98-11-18
# stolen from Manish Singh 98-9-30
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_LIBART([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for LIBART, and define LIBART_CFLAGS and LIBART_LIBS
dnl
AC_DEFUN(AM_PATH_LIBART,
[dnl
dnl Get the cflags and libraries from the libart-config script
dnl
AC_ARG_WITH(libart-prefix,[ --with-libart-prefix=PFX Prefix where LIBART is installed (optional)],
libart_prefix="$withval", libart_prefix="")
AC_ARG_WITH(libart-exec-prefix,[ --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)],
libart_exec_prefix="$withval", libart_exec_prefix="")
AC_ARG_ENABLE(libarttest, [ --disable-libarttest Do not try to compile and run a test LIBART program],
, enable_libarttest=yes)
if test x$libart_exec_prefix != x ; then
libart_args="$libart_args --exec-prefix=$libart_exec_prefix"
if test x${LIBART_CONFIG+set} != xset ; then
LIBART_CONFIG=$libart_exec_prefix/bin/libart-config
fi
fi
if test x$libart_prefix != x ; then
libart_args="$libart_args --prefix=$libart_prefix"
if test x${LIBART_CONFIG+set} != xset ; then
LIBART_CONFIG=$libart_prefix/bin/libart-config
fi
fi
AC_PATH_PROG(LIBART_CONFIG, libart-config, no)
min_libart_version=ifelse([$1], ,0.2.5,$1)
AC_MSG_CHECKING(for LIBART - version >= $min_libart_version)
no_libart=""
if test "$LIBART_CONFIG" = "no" ; then
no_libart=yes
else
LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags`
LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs`
libart_major_version=`$LIBART_CONFIG $libart_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
libart_minor_version=`$LIBART_CONFIG $libart_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_libarttest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $LIBART_CFLAGS"
LIBS="$LIBS $LIBART_LIBS"
dnl
dnl Now check if the installed LIBART is sufficiently new. (Also sanity
dnl checks the results of libart-config to some extent
dnl
rm -f conf.libarttest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libart_lgpl/libart.h>
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.libarttest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_libart_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_libart_version");
exit(1);
}
if (($libart_major_version > major) ||
(($libart_major_version == major) && ($libart_minor_version > minor)) ||
(($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version);
printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n");
printf("*** to point to the correct copy of libart-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_libart=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_libart" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$LIBART_CONFIG" = "no" ; then
echo "*** The libart-config script installed by LIBART could not be found"
echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the LIBART_CONFIG environment variable to the"
echo "*** full path to libart-config."
else
if test -f conf.libarttest ; then
:
else
echo "*** Could not run LIBART test program, checking why..."
CFLAGS="$CFLAGS $LIBART_CFLAGS"
LIBS="$LIBS $LIBART_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <libart_lgpl/libart.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding LIBART or finding the wrong"
echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means LIBART was incorrectly installed"
echo "*** or that you have moved LIBART since it was installed. In the latter case, you"
echo "*** may want to edit the libart-config script: $LIBART_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
LIBART_CFLAGS=""
LIBART_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(LIBART_CFLAGS)
AC_SUBST(LIBART_LIBS)
rm -f conf.libarttest
])

View File

@@ -0,0 +1,280 @@
#! /usr/bin/env perl
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# make-makefiles - Quickly create Makefiles for subdirectories.
# Also, creates any needed subdirectories.
#
# usage: make-makefiles [ -t <topsrcdir> -d <depth> ] [ <subdir> | <subdir>/Makefile ] ...
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
#$debug = 1;
# Determine various tree path variables
#
($topsrcdir, $depth, @makefiles) = parse_arguments(@ARGV);
$object_fullpath = `pwd`;
chdir $depth;
$object_root = `pwd`;
chomp $object_fullpath;
chomp $object_root;
# $source_subdir is the path from the object root to where
# 'make-makefile' was called. For example, if make-makefile was
# called from "mozilla/gfx/src", then $source_subdir would be
# "gfx/src/".
$source_subdir = "$object_fullpath/";
my $quoted_object_root = quotemeta($object_root);
$source_subdir =~ s|^$quoted_object_root/||;
# Prefix makefiles with $source_subdir so that paths
# will be relative to the top of the object tree.
#
for $makefile (@makefiles) {
$makefile = "$source_subdir$makefile";
}
create_directories(@makefiles);
# Find the path to the source directory based on how 'make-makefile'
# was invoked. The path is either relative to the object directory
# or an absolute path.
$given_srcdir = find_srcdir($topsrcdir, $depth);
if ($debug) {
warn "object_fullpath = $object_fullpath\n";
warn "object_root = $object_root\n";
warn "source_subdir = $source_subdir\n";
warn "makefiles = @makefiles\n";
warn "given_srcdir = $given_srcdir\n";
}
@unhandled = update_makefiles($given_srcdir, @makefiles);
run_config_status(@unhandled);
# end of Main
############################################################
sub dirname {
return $_[0] =~ /(.*)\/.*/ ? "$1" : '.';
}
# find_depth: Pull the value of DEPTH out of a Makefile (or Makefile.in)
sub find_depth {
my $depth = '';
open(MAKEFILE, "<$_[0]") || die "Unable to open $_[0]: $!\n";
while (<MAKEFILE>) {
next unless /^DEPTH\s*=\s*(\..*)/;
$depth = $1;
last;
}
close MAKEFILE;
return $depth;
}
sub parse_arguments {
my @args = @_;
my $depth = '';
my $topsrcdir = '';
my @makefiles = ();
while (1) {
if ($args[0] eq '-d') {
$depth = $args[1];
shift @args;
shift @args;
} elsif ($args[0] eq '-t') {
$topsrcdir = $args[1];
shift @args;
shift @args;
} else {
last;
}
}
if ($topsrcdir eq '') {
$topsrcdir = $0; # Figure out topsrcdir based on program name.
$topsrcdir =~ s|/?build/autoconf/.*$||;
}
if ($depth eq '') {
# Use $(DEPTH) in the Makefile or Makefile.in to determine the depth
if (-e "Makefile.in") {
$depth = find_depth("Makefile.in");
} elsif (-e "Makefile") {
$depth = find_depth("Makefile");
} elsif (-e "../Makefile") {
$depth = "../".find_depth("../Makefile");
$depth =~ s/\/\.$//;
} else {
warn "Unable to determine depth (e.g. ../..) to root of objdir tree.\n";
die "No Makefile(.in) present. Try running with '-d <depth>'\n";
}
}
# Build the list of makefiles to generate
#
@makefiles = ();
my $makefile;
foreach $makefile (@args) {
$makefile =~ s/\.in$//;
$makefile =~ s/\/$//;
$makefile =~ /Makefile$/ or $makefile .= "/Makefile";
push @makefiles, "$makefile";
}
@makefiles = "Makefile" unless @args;
return ($topsrcdir, $depth, @makefiles);
}
# Create all the directories at once.
# This can be much faster than calling mkdir() for each one.
sub create_directories {
my @makefiles = @_;
my @dirs = ();
my $ac_file;
foreach $ac_file (@makefiles) {
push @dirs, dirname($ac_file);
}
# Call mkdir with the directories sorted by subdir count (how many /'s)
system "mkdir -p ". join(' ', @dirs) if @dirs;
}
# Find the top of the source directory
# (Assuming that the executable is in $top_srcdir/build/autoconf)
sub find_srcdir {
my ($ac_given_srcdir, $depth) = @_;
if ($debug) {
print "ac_given_srcdir = $ac_given_srcdir\n";
print "depth = $depth\n";
}
if ($ac_given_srcdir =~ /^\./ and $depth ne '.') {
my $quoted_depth = quotemeta($depth);
$ac_given_srcdir =~ s|^$quoted_depth/?||;
}
if ($debug) {
print "ac_given_srcdir = $ac_given_srcdir\n";
}
$ac_given_srcdir = '.' if $ac_given_srcdir eq '';
return $ac_given_srcdir;
}
# Output the makefiles.
#
sub update_makefiles {
my ($ac_given_srcdir, @makefiles) = @_;
my @unhandled=();
my $ac_file;
foreach $ac_file (@makefiles) {
my $ac_file_in = "$ac_given_srcdir/${ac_file}.in";
my $ac_dir = dirname($ac_file);
my $ac_dots = '';
my $ac_dir_suffix = '';
my $srcdir = '.';
my $top_srcdir = '.';
# Determine $srcdir and $top_srcdir
#
if ($ac_dir ne '.') {
$ac_dir_suffix = "/$ac_dir";
$ac_dir_suffix =~ s%^/\./%/%;
$ac_dots = $ac_dir_suffix;
$ac_dots =~ s%/[^/]*%../%g;
}
if ($ac_given_srcdir eq '.') {
if ($ac_dots ne '') {
$top_srcdir = $ac_dots;
$top_srcdir =~ s%/$%%;
}
} elsif ($ac_given_srcdir =~ m%^/% or $ac_given_srcdir =~ m%^.:/%) {
$srcdir = "$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_given_srcdir";
} else {
$srcdir = "$ac_dots$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_dots$ac_given_srcdir";
}
if ($debug) {
print "ac_dir = $ac_dir\n";
print "ac_file = $ac_file\n";
print "ac_file_in = $ac_file_in\n";
print "srcdir = $srcdir\n";
print "top_srcdir = $top_srcdir\n";
print "cwd = " . `pwd` . "\n";
}
# Copy the file and make substitutions.
# @srcdir@ -> value of $srcdir
# @top_srcdir@ -> value of $top_srcdir
#
if (-e $ac_file) {
next if -M _ < -M $ac_file_in; # Next if Makefile is up-to-date.
warn "updating $ac_file\n";
} else {
warn "creating $ac_file\n";
}
open INFILE, "<$ac_file_in" or do {
warn "$0: Cannot read $ac_file_in: No such file or directory\n";
next;
};
open OUTFILE, ">$ac_file" or do {
warn "$0: Unable to create $ac_file\n";
next;
};
while (<INFILE>) {
#if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
# #warn "Two defines on a line:$ac_file:$.:$_";
# push @unhandled, $ac_file;
# last;
#}
s/\@srcdir\@/$srcdir/g;
s/\@top_srcdir\@/$top_srcdir/g;
if (/\@[_a-zA-Z]*\@/) {
#warn "Unknown variable:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}
print OUTFILE;
}
close INFILE;
close OUTFILE;
}
return @unhandled;
}
sub run_config_status {
my @unhandled = @_;
# Run config.status with any unhandled files.
#
if (@unhandled) {
$ENV{CONFIG_FILES}= join ' ', @unhandled;
system "./config.status";
}
}

View File

@@ -0,0 +1,85 @@
#!/bin/sh
#
# 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):
#
#
# This script will match a dir with a set of dirs.
#
# Usage: match-dir.sh match [dir1 dir2 ... dirn]
#
# Send comments, improvements, bugs to ramiro@netscape.com
#
if [ -f Makefile ]; then
MAKEFILE="Makefile"
else
if [ -f Makefile.in ]; then
MAKEFILE="Makefile.in"
else
echo
echo "There ain't no 'Makefile' or 'Makefile.in' over here: $pwd, dude."
echo
exit 1
fi
fi
# Use DEPTH in the Makefile.in to determine the depth
depth=`grep -w DEPTH ${MAKEFILE} | grep "\.\." | awk -F"=" '{ print $2; }'`
cwd=`pwd`
# Determine the depth count
n=`echo $depth | tr '/' ' ' | wc -w`
cd $depth
objdir=`pwd`
path=`echo $cwd | sed "s|^${objdir}/||"`
match=$path
for i in $*
do
# echo "Looking for $match in $i"
echo $i | grep -q -x $match
if [ $? -eq 0 ]
then
echo "1"
exit 0
fi
# echo "Looking for $i in $match"
echo $match | grep -q $i
if [ $? -eq 0 ]
then
echo "1"
exit 0
fi
done
echo "0"
exit 0

View File

@@ -0,0 +1,46 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stephen Lamm <slamm@netscape.com>
#
# mozconfigfind - Loads options from .mozconfig onto configure's
# command-line. The .mozconfig file is searched for in the
# order:
# if $MOZCONFIG is set, use that.
# Otherwise, use $TOPSRCDIR/.mozconfig
# Otherwise, use $HOME/.mozconfig
#
topsrcdir=$1
for _config in $MOZCONFIG \
$MOZ_MYCONFIG \
$topsrcdir/.mozconfig \
$topsrcdir/mozconfig \
$topsrcdir/mozconfig.sh \
$topsrcdir/myconfig.sh \
$HOME/.mozconfig \
$HOME/.mozconfig.sh \
$HOME/.mozmyconfig.sh
do
if test -f $_config; then
echo $_config;
exit 0
fi
done

View File

@@ -0,0 +1,94 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stephen Lamm <slamm@netscape.com>
#
# mozconfig2client-mk - Translates .mozconfig into options for client.mk.
# Prints defines to stdout.
#
# See mozconfig2configure for more details
print_header() {
_mozconfig=${MOZCONFIG:-$HOME/.mozconfig}
cat >> $tmp_file <<EOF
# gmake
# This file is automatically generated for client.mk.
# Do not edit. Edit $_mozconfig instead.
# To create a new .mozconfig file, you can visit,
# http://webtools.mozilla.org/build/config.cgi
EOF
}
ac_add_options() {
echo "# $* is used by configure (not client.mk)" >> $tmp_file
}
mk_add_options() {
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash,
# and substitute '@<word>@' with '$(<word>)'.
_opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'`
echo $_opt;
opts="${opts:+$opts^}$_opt";
done >> $tmp_file
}
mk_echo_options() {
echo "Adding client.mk options from $MOZCONFIG:"
IFS=^
for _opt in $opts; do
echo " $_opt"
done
}
# Main
#--------------------------------------------------
scriptdir=`dirname $0`
topsrcdir=$1
out_file=$2
tmp_file="$out_file-tmp$$"
opts=""
trap "rm -f $tmp_file; exit 1" 1 2 15
MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
print_header > $tmp_file
# If the path changes, configure should be rerun
echo "# PATH=$PATH" >> $tmp_file
if [ "$MOZCONFIG" ]
then
. $MOZCONFIG
fi
if [ "$opts" ]; then
mk_echo_options
fi
if test -f $out_file && cmp -s $tmp_file $out_file; then
rm $tmp_file
else
mv -f $tmp_file $out_file
fi

View File

@@ -0,0 +1,70 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stephen Lamm (slamm@netscape.com)
#
# mozconfig2configurator - Translates .mozconfig into options for
# the online configurator,
#
# http://webtools.mozilla.org/build/config.cgi
#
# This is called by the 'webconfig' target of mozilla/client.mk
#
ac_add_options() {
for _opt
do
# Escape special url characters
_opt=`echo $_opt | sed -e 's/%/%25/g;s/ /%20/g;s/&/%26/g;'`
case "$_opt" in
--*-*= ) url="$url$_opt&" ;;
--*-* ) url="$url$_opt=yes&" ;;
esac
done
}
mk_add_options() {
for _opt
do
# Escape special url characters
# Escape special url characters
_opt=`echo $_opt | sed -e 's/%/%25/g;s/ /%20/g;s/&/%26/g;'`
url="$url$_opt&"
done
}
#
# main
#
# find-mozconfig.sh
# In params: $MOZCONFIG $HOME ($MOZ_MYCONFIG)
scriptdir=`dirname $0`
MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
if [ "$MOZCONFIG" ]
then
url="http://webtools.mozilla.org/build/config.cgi?"
. $MOZCONFIG
# Drop the last character of $url
echo `expr "$url" : "\(.*\)."`
fi

View File

@@ -0,0 +1,99 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stephen Lamm <slamm@netscape.com>
#
# mozconfig2configure - Loads options from .mozconfig onto configure's
# command-line. See find-mozconfig.sh for how the config file is
# found
#
# The options from .mozconfig are inserted into the command-line
# before the real command-line options. This way the real options
# will override any .mozconfig options.
#
# .mozconfig is a shell script. To add an option to configure's
# command-line use the pre-defined function, ac_add_options,
#
# ac_add_options <configure-option> [<configure-option> ... ]
#
# For example,
#
# ac_add_options --with-pthreads --enable-debug
#
# ac_add_options can be called multiple times in .mozconfig.
# Each call adds more options to configure's command-line.
# Note: $_AUTOCONF_TOOLS_DIR must be defined in the script that includes this.
ac_add_options() {
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash.
_opt=`echo $_opt | sed -e 's/\([\ \ \$\"\\]\)/\\\\\1/g;s/@\([^@]*\)@/\$\1/g;'`
_opt=`echo $_opt | sed -e 's/@\([^@]*\)@/\$(\1)/g'`
# Avoid adding duplicates
case "$ac_options" in
*"$_opt"* ) ;;
* ) mozconfig_ac_options="$mozconfig_ac_options $_opt" ;;
esac
done
}
mk_add_options() {
# These options are for client.mk
# configure can safely ignore them.
:
}
ac_echo_options() {
echo "Adding configure options from $MOZCONFIG:"
eval "set -- $mozconfig_ac_options"
for _opt
do
echo " $_opt"
done
}
# Main
#--------------------------------------------------
_topsrcdir=`dirname $0`
ac_options=
mozconfig_ac_options=
# Save the real command-line options
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash.
_opt=`echo $_opt | sed -e 's/\([\ \ \$\"\\]\)/\\\\\1/g;'`
ac_options="$ac_options \"$_opt\""
done
MOZCONFIG=`$_AUTOCONF_TOOLS_DIR/mozconfig-find $_topsrcdir`
if [ "$MOZCONFIG" ]; then
. $MOZCONFIG
fi
if [ "$mozconfig_ac_options" ]; then
ac_echo_options 1>&2
fi
eval "set -- $mozconfig_ac_options $ac_options"

View File

@@ -0,0 +1,67 @@
# -*- tab-width: 4; -*-
# Configure paths for NSPR
# Public domain - Chris Seawood <cls@seawood.org> 2001-04-05
# Based upon gtk.m4 (also PD) by Owen Taylor
dnl AM_PATH_NSPR([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for NSPR, and define NSPR_CFLAGS and NSPR_LIBS
AC_DEFUN(AM_PATH_NSPR,
[dnl
AC_ARG_WITH(nspr-prefix,
[ --with-nspr-prefix=PFX Prefix where NSPR is installed],
nspr_config_prefix="$withval",
nspr_config_prefix="")
AC_ARG_WITH(nspr-exec-prefix,
[ --with-nspr-exec-prefix=PFX
Exec prefix where NSPR is installed],
nspr_config_exec_prefix="$withval",
nspr_config_exec_prefix="")
if test -n "$nspr_config_exec_prefix"; then
nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
if test -z "$NSPR_CONFIG"; then
NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
fi
fi
if test -n "$nspr_config_prefix"; then
nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
if test -z "$NSPR_CONFIG"; then
NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
fi
fi
unset ac_cv_path_NSPR_CONFIG
AC_PATH_PROG(NSPR_CONFIG, nspr-config, no)
min_nspr_version=ifelse([$1], ,4.0.0,$1)
AC_MSG_CHECKING(for NSPR - version >= $min_nspr_version (skipping))
no_nspr=""
if test "$NSPR_CONFIG" = "no"; then
no_nspr="yes"
else
NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
dnl Skip version check for now
nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
nspr_config_micro_version=`$NSPR_CONFIG $nspr_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
fi
if test -z "$no_nspr"; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
fi
AC_SUBST(NSPR_CFLAGS)
AC_SUBST(NSPR_LIBS)
])

View File

@@ -0,0 +1,57 @@
dnl This file is Copyright 2001 Red Hat, Inc.
dnl This file is in the public domain.
dnl
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
dnl also defines GSTUFF_PKG_ERRORS on error
AC_DEFUN(PKG_CHECK_MODULES, [
succeeded=no
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" = "no" ; then
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
else
if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7.0; then
echo "*** Your version of pkg-config is too old. You need version 0.7.0 or newer."
echo "*** See http://www.freedesktop.org/software/pkgconfig"
else
AC_MSG_CHECKING(for $2)
if $PKG_CONFIG --exists "$2" ; then
AC_MSG_RESULT(yes)
succeeded=yes
AC_MSG_CHECKING($1_CFLAGS)
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
AC_MSG_RESULT($$1_CFLAGS)
AC_MSG_CHECKING($1_LIBS)
$1_LIBS=`$PKG_CONFIG --libs "$2"`
AC_MSG_RESULT($$1_LIBS)
else
$1_CFLAGS=""
$1_LIBS=""
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
ifelse([$4], ,echo $1_PKG_ERRORS,)
fi
AC_SUBST($1_CFLAGS)
AC_SUBST($1_LIBS)
fi
fi
if test $succeeded = yes; then
ifelse([$3], , :, [$3])
else
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
fi
])

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