Compare commits

...

553 Commits

Author SHA1 Message Date
bryner%netscape.com
575c69df66 pull from 0.7 release tag
git-svn-id: svn://10.0.0.236/branches/CAMINO_0_7_RELEASE_MINIBRANCH@139045 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-06 21:46:15 +00:00
(no author)
e383fac5a3 This commit was manufactured by cvs2svn to create branch
'CAMINO_0_7_RELEASE_MINIBRANCH'.

git-svn-id: svn://10.0.0.236/branches/CAMINO_0_7_RELEASE_MINIBRANCH@138906 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-05 02:46:11 +00:00
bryner%netscape.com
6c3df13d5c Build mozilla/camino instead of mozilla/chimera.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@138905 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-05 02:46:10 +00:00
bryner%netscape.com
0766701537 new splash (thanks kerz)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@138883 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-04 22:35:11 +00:00
bryner%netscape.com
2cd8de3f5d s/Navigator/Camino/
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@138878 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-04 22:15:41 +00:00
(no author)
06795c0107 This commit was manufactured by cvs2svn to create branch
'CHIMERA_M1_0_1_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@138868 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-04 18:18:54 +00:00
bryner%netscape.com
63aa9fbb16 s/Navigator/Camino
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@138849 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-04 05:16:46 +00:00
bryner%netscape.com
7825c91231 Change Chimera and Navigator to Camino, round 1.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@138825 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-04 01:43:23 +00:00
bryner%netscape.com
a77ce55b17 tell the BrowserView to activate, so focusing items works (bug 175029)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@138017 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-20 02:14:59 +00:00
bryner%netscape.com
8559afda75 remove pippki.jar, it's unnecessary
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137693 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-11 23:07:00 +00:00
bryner%netscape.com
d278ee0aa9 In the case where a larger area of the image is invalidated than has been decoded, use code that's logically equivalent (at least for aSX == 0) but less prone to floating point errors, and also handle constraining the src rect to the top, left, and right of the decoded rect. This code is lifted from the nsImageGTK implementation. Fixes one cause (hopefully all) of bug 159796, blank lines in images. r=pinkerton, sr=sfraser.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137652 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-11 06:53:01 +00:00
bryner%netscape.com
655c3c4956 add link to chimera.org
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137621 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-10 05:50:20 +00:00
sfraser%netscape.com
7fa1851adc Fix bug 192122. Don't try to delete partially-downloaded files, because there really is nothing to delete, and you might delete the wrong file.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137497 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-06 20:58:31 +00:00
bryner%netscape.com
195fff088c fix tabbing through dialogs (bug 192082)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137490 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-06 19:03:08 +00:00
bryner%netscape.com
e3f5e2e508 back out version number increase, we're not quite ready
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137469 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-06 04:03:46 +00:00
sfraser%netscape.com
50cd311c8c Ensure that -url on the commandline can override the start page, so that tinderbox tests run correctly.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137466 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-06 02:58:03 +00:00
bryner%netscape.com
f4dc004263 Update version number to 0.7.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137440 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-05 22:55:54 +00:00
sfraser%netscape.com
b548424cf7 Adding 0.7 release notes.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137439 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-05 22:53:35 +00:00
pinkerton%netscape.com
be1111fd94 Always make sure a browser is open when user clicks on app icon in dock even if
other (non-browser) windows are open.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137383 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-04 20:33:17 +00:00
sfraser%netscape.com
4b43e573f5 Fix bug 188202: put new downloads at the top.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137381 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-04 20:01:42 +00:00
pinkerton%netscape.com
a50311f502 don't change selection when closing tabs not in fg.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137322 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-03 15:47:38 +00:00
bryner%netscape.com
72f4375bc4 removing unneeded cruft from Bundle Resources in the static target.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137282 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-03 02:42:17 +00:00
pinkerton%netscape.com
5e62caf170 select next tab when closing instead of previous (bug 168564)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137089 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-29 21:17:46 +00:00
pinkerton%netscape.com
8c672d15be rearranging bookmarks menu to make it easier to follow and moving "manage
bookmarks" from view to bookmaks to make it easier to find.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137087 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-29 19:58:36 +00:00
pinkerton%netscape.com
b76444883d better align checkbox and its label. Wrap label in a button so that clicks
on it trigger the checkbox.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137086 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-29 19:01:47 +00:00
pinkerton%netscape.com
28df7c1221 remove
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137085 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-29 18:59:26 +00:00
pinkerton%netscape.com
8d1f4981cf respond to "del" (forward delete) key for deleting items from outline.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137080 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-29 15:57:45 +00:00
sfraser%netscape.com
d7412653b1 Fix bug 189666: fix keyboard focus in alert dialogs, and add key equivalents for the default and cancel buttons.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137072 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-29 07:14:37 +00:00
bryner%netscape.com
21f71c30fd Fix scrolling when fixed-positioned elements are present by making the widget behavior match what the view system is expecting -- that sibling/non-ancestor widgets won't be blitted (actually, approximate this by invalidating the area after the blit). Bug 190383, r=pinkerton.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137050 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-29 00:57:44 +00:00
pinkerton%netscape.com
ad7574be7e use pixels instead of points so form controls don't get huge in 96dpi
emulation. (r=bryner)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137040 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-28 21:26:44 +00:00
bryner%netscape.com
02b30ea44e merge ccarlen's trunk patch to use rsync to populate dist/Mozilla.app, to speed up depend builds.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@137018 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-28 04:29:09 +00:00
pinkerton%netscape.com
4b53b435c3 show document context menu when flags are null (bug 161832)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136984 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-27 18:56:15 +00:00
pinkerton%netscape.com
8898787986 don't offer to save name/password if either is empty (bug 187308)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136940 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-24 16:07:58 +00:00
pinkerton%netscape.com
9efd2126b3 Fix bug where if you picked a suggestion from the list, edited it in the
middle, and hit return, we'd load the original suggestion.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136939 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-24 15:46:47 +00:00
pinkerton%netscape.com
0d539d2f74 remove stray log
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136921 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-24 03:31:10 +00:00
pinkerton%netscape.com
640c5d73fd fix include path for static build.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136910 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-23 22:01:26 +00:00
pinkerton%netscape.com
b54d1c0b9b Fix hebrew and an exception when the encoding wasn't in the menu.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136888 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-23 16:14:23 +00:00
pinkerton%netscape.com
b2c458d227 Add text encoding menu (bug 153150)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136883 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-23 15:09:10 +00:00
pinkerton%netscape.com
22bfb18527 new file for text encoding menu.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136882 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-23 15:05:00 +00:00
pinkerton%netscape.com
b0bc56e7b6 make sure content area is focused if chimera is in the bg while page finishes
loading (but doesn't if you've typed in url bar). (bug 188088 for bryner)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136435 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-16 20:54:01 +00:00
pinkerton%netscape.com
e043e6819f ensure all text fits in dialog sheets. marks localized.strings as unicode
for the new version of PB. remove references to alert.nib since it's no
longer needed (all dialog sheets are sized to fit and built from scratch).
(bug 152752)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136265 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-13 23:08:56 +00:00
pinkerton%netscape.com
a7d89d318e correctly store ftp passwords in keychain
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136264 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-13 22:42:07 +00:00
pinkerton%netscape.com
40769283cb update finder immediately when d/l successfully completes.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136249 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-13 19:10:22 +00:00
pinkerton%netscape.com
e2e57bb82e comment to clarify what the array contains
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136247 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-13 18:19:21 +00:00
pinkerton%netscape.com
775934727f delete entire sites in history when folder is selected. (bug 179124)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136174 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-10 21:27:47 +00:00
pinkerton%netscape.com
ebcecf7310 if the server supplies a value for the username, only autofill if the supplied value matches what is stored in the keychain, otherwise leave the password field blank (bug 169760)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136170 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-10 20:07:40 +00:00
pinkerton%netscape.com
546cb8a17f respect the "autocomplete=off" attribute for forms and individual fields. (bug 183804)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136167 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-10 19:19:37 +00:00
pinkerton%netscape.com
0c168c6fa9 allow bg tabs to show errors and respond to GetVisibility/GetDimensions. (bug 178698)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136074 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-09 18:31:33 +00:00
sfraser%netscape.com
c61af0b100 Fix for bug 172044: handle the 'url ' and 'urld' drag data types on OS X. Breaking the 'kURLMime' flavor (url\ntitle) into two separate flavors makes this much easier. Also add url flavor data to image drags. r=pink.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136045 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-09 01:45:57 +00:00
sfraser%netscape.com
46c0ebd190 Fix for bug 172044: handle the 'url ' and 'urld' drag data types on OS X. Breaking the 'kURLMime' flavor (url\ntitle) into two separate flavors makes this much easier. Also add url flavor data to image drags. Bug 172044, r=pink.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136044 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-09 01:44:19 +00:00
pinkerton%netscape.com
02142bbe06 activate a fg tab before we load the url so that we push the url into
the urlbar immediately instead of waiting for the server to connect.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136039 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-09 00:24:43 +00:00
pinkerton%netscape.com
d18760a2d7 if the user has typed anything in the urlbar since the last page-load, don't
allow anything to replace it (such as the page finishing loading or switching
tabs). put the url in the bar as soon as we kick off the page load so that
even if it fails the user still has the url to play with. (bug 155218)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136027 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-08 23:05:26 +00:00
pinkerton%netscape.com
91a2e468dd Remove some dpi code that got turned on by accident. (r=bryner/sr=sfraser)
(bug 188220)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@136018 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-08 22:28:57 +00:00
sfraser%netscape.com
949231f50b Fix scrollwheel code so that shift-mousewheel scrolls sideways. Bug 170403. r/sr=bryner.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135931 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-07 05:35:42 +00:00
sfraser%netscape.com
d480180c1d Fix for bug 187983 (bug 45823 and bug 45824 in mozilla) -- allow dragging of images to the Finder, and to other applications.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135923 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-07 02:12:12 +00:00
sfraser%netscape.com
75d837a71a Fix for bug 187983 (bug 45823 and bug 45824 in mozilla) -- allow dragging of images to the Finder, and to other applications.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135918 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-07 01:07:42 +00:00
sfraser%netscape.com
9ab4233ddb Fix for bug 187983 (bug 45823 and bug 45824 in mozilla) -- allow dragging of images to the Finder, and to other applications.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135916 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-07 00:45:38 +00:00
sfraser%netscape.com
ab81100f37 Fix bug 153292: allow Save As from the context menu to show the format popup in the save dialog.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135807 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-03 02:19:02 +00:00
bryner%netscape.com
e4866fc79b Add missing xmlextras.xpt to fix using the dom serializer from js (i.e. bugzilla edit attachment as comment), bug 180850. Also removed some stuff that accidentely crept into Bundle Resources. r=sfraser.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135795 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-02 22:16:42 +00:00
sfraser%netscape.com
d159023fbb Only show 'connection refused' and 'unknown host' dialogs for the URL loading in the top frame, not any subframes or images. Fixes 160047, helping those who do adblocking via proxies or hostfile mappingn tricks. Merged from trunk, and not to be merged back.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135746 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-01 00:26:54 +00:00
sfraser%netscape.com
ee383aefb5 Premultiplied to quiet console output.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135743 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 22:59:34 +00:00
sfraser%netscape.com
f674d25d87 Remove bogus NSLog
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135742 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 22:58:22 +00:00
sfraser%netscape.com
c1b01a3246 Fix bug 187271: don't show passwords in URLs in the download window.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135741 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 22:10:55 +00:00
sfraser%netscape.com
9c8a56b18a Fix a bug that caused copying images to randomly fail sometimes (set the port to the GWorld, and set up the origin and colors before copying).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135740 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 21:45:58 +00:00
sfraser%netscape.com
94048781eb Add some assertions to the clipboard code.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135739 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 21:45:12 +00:00
sfraser%netscape.com
49b3f773ac Add Copy Image to the Image/Link context menu.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135738 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 21:41:55 +00:00
pinkerton%netscape.com
fb74ff562c factor keychain dialogs out of alert.nib so embedding doesn't take the hit.
added "deny list" and the capability to stop asking to save passwords from
entire sites ("Never Remember"). fixed up some absolute paths in the project.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135734 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 17:05:00 +00:00
pinkerton%netscape.com
c38ef588c7 moving keychain dialogs out of alert.nib
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135733 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 15:37:49 +00:00
sfraser%netscape.com
5103b7052d Tweak the layout of the print dialog panel.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135729 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 05:30:53 +00:00
ccarlen%netscape.com
58e0098952 Bug 186401 - Can't print background colors. This adds a new PDE which allows printing of background colors and images to be specified.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135727 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 02:48:24 +00:00
sfraser%netscape.com
db6bee8634 Help typing performance in textareas by moving a view resize bug fix from the trunk (bug 186066), and turning off async reflow of text widgets (bug 141900).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135725 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 01:29:28 +00:00
sfraser%netscape.com
266734214e Add Copy Image to the image context menu, bug 178998.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135723 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 00:36:21 +00:00
sfraser%netscape.com
c5403082af Undo some changes checked in by mistake.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135722 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 00:34:22 +00:00
sfraser%netscape.com
53d6b68232 Backend support for Copy Image Contents, bug 178998.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135721 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 00:29:51 +00:00
sfraser%netscape.com
e462e81b3f Backend changes for Copy Image contents, bug 178998.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135720 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 00:28:07 +00:00
sfraser%netscape.com
cbe5b5b098 Fix bug 182930: services was ignoring the selection for text fields, and getting the entire textfield contents.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135717 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 22:20:09 +00:00
sfraser%netscape.com
f72b98de34 Remove include of removed file.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135705 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 07:54:25 +00:00
sfraser%netscape.com
953128f346 Move a header file into the proper place.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135703 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 07:49:53 +00:00
sfraser%netscape.com
4f38cd2016 New files added for Download Manager (bug 181167).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135702 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 07:46:34 +00:00
sfraser%netscape.com
379213d6b1 Resource changes for Download Manager (bug 181167).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135701 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 07:45:50 +00:00
sfraser%netscape.com
b1b3d181a6 Add a Download Manager (bug 181167), replacing individual download windows with a single window containing a scrollable stack of download views. Downloads are not (yet) saved between runs. Original patch from Calum Robinson (calumr@mac.com), modified to deal with non auto-helper app launching, to enable scrollable views, fix window sizing, memory leaks, and some architectural issues.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135700 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 07:41:34 +00:00
sfraser%netscape.com
dfd32cd302 Make sure the nsExternalAppHandler passes downloading errors to the frontend, so we can tell when the download was canceled or interrupted. Part of bug 181167.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135699 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 07:35:11 +00:00
sfraser%netscape.com
bce802b4bc Fix bugs 185352 and 186628 -- cosmetic issues in prefs panels.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135623 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-24 23:04:45 +00:00
sfraser%netscape.com
42e167df87 Improve global history performance by caching localtime/gmt offsets, to eliminate lots of localtime() calls. Also optimize some of the LL_ math. Bug 180109.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135608 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-24 02:03:00 +00:00
sfraser%netscape.com
0d9ed59595 Make sure the history data source is cleaned up correctly by eliminating conflicts between 'cleanup' selectors in the HistoryDataSource and its superclass. Also fix a cell value leak.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135607 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-24 02:00:07 +00:00
sfraser%netscape.com
a7a2ea05f3 Fix leaks in the RDF data source.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135606 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-24 01:59:04 +00:00
sfraser%netscape.com
6ed39efb6f Fix leaks of site icon image data.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135605 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-24 01:58:16 +00:00
sfraser%netscape.com
c3ef72cd50 Fix leak of bookmarks cell value.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135604 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-24 01:57:59 +00:00
sdagley%netscape.com
02a4183321 Fix #185930 - work around Cocoa bug so all windows don't close when DL finishes and user
has the option key held down. r=sfraser

----------------------------------------------------------------------


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135464 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-18 22:16:58 +00:00
sfraser%netscape.com
052a0d128c Optimize history performance by reducing the number of times we call PR_Now(). Bug 180109.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135444 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-18 02:04:50 +00:00
sfraser%netscape.com
85179628cb Optimize history performance by caching more data in RDFOutlineViewItems, and making sure we update the history sidebar only once per page load. Bug 180109. Performance is still poor; fixing that would require not using RDF.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135443 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-18 02:04:19 +00:00
sfraser%netscape.com
5b2933ddcc Fix project issue with libjsloader (we don't want to link with it).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135292 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-14 03:42:50 +00:00
sfraser%netscape.com
b31338e0c7 #if DEBUG an NSLog.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135287 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-14 01:55:18 +00:00
sfraser%netscape.com
3f5d48be36 Fix the code that syncs system configuration proxy settings with the mozilla proxy prefs to get notified of proxy changes on the fly (e.g. because of locatin changes, bug 167900), and to not nuke the proxy settings when the proxy type is 2 (for PAC, bug 156115).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135286 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-14 01:54:19 +00:00
sfraser%netscape.com
62cd1e861f Add the libjsloader.dylib component, for bug 156115.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135285 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-14 01:52:05 +00:00
sfraser%netscape.com
4a4374d28e Add libjsloader to the list of static modules, which is required to load the PAC JS component for bug 156115.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135284 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-14 01:51:31 +00:00
sfraser%netscape.com
dbba3b3f1c Add nsProxyAutoConfig.js to the project, for bug 156115.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135283 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-14 01:44:11 +00:00
sfraser%netscape.com
548b7482e6 Removing nsProxyAutoConfig.js. We don't really need this here to include it in chimera.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135282 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-14 01:39:40 +00:00
sfraser%netscape.com
0f6a0d91aa Add nsProxyAutoConfig.js to the embedding manifest for Mac, so that chimera can implement PAC. Bug 156115.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135281 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-14 01:34:51 +00:00
pinkerton%netscape.com
9e46419494 define IBMBIDI so that we don't crash clicking a SELECT
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135252 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-13 18:21:43 +00:00
sfraser%netscape.com
cd18427e17 Fix spelling error (bug 184604)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135038 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-10 17:30:20 +00:00
sdagley%netscape.com
8e1b4f9530 Fix #179968 - Add "Mach-O" to UA string to sync w/Mozilla Mach-O build UA
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135031 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-10 15:11:33 +00:00
sfraser%netscape.com
0708ba094e Pad JNIInvokeInterface_ like we do for JNINativeInterface_ to match system jni.h layout, for CFM vs. Macho. Bug 183681.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135023 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-10 07:33:17 +00:00
sfraser%netscape.com
e0467cfab0 Fix for bug 183681: padd the JNINativeInterface_ table to taking CFM vs. Macho function pointer alignments into account. r=beard.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135022 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-10 07:31:57 +00:00
sfraser%netscape.com
4f50301bb2 Bump version number to 1.0fc3
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135019 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-10 04:09:40 +00:00
sfraser%netscape.com
ef63f7efb5 Bump visible version number to 1.0fc3
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135018 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-10 04:08:08 +00:00
sfraser%netscape.com
3acbfaa3e5 Fix bug 183780: remove dock menu bookmarks on 10.1 to avoid an Apple bug which makes them not work.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135012 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-09 23:51:25 +00:00
sfraser%netscape.com
f0df8f6ae3 Fix the build.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135011 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-09 23:41:56 +00:00
pinkerton%netscape.com
e76aefae07 use utf8 when storing usernames and passwords instead of cstrings. (bug 184094)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@135006 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-09 22:23:01 +00:00
sfraser%netscape.com
313844a379 Add ChimeraUIConstants.h
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134994 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-09 19:21:27 +00:00
sfraser%netscape.com
6ac76507ee UI changes for Rendezvous support (bug 176348), including a new pref, "chimera.enable_rendezvous", which defaults to off.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134993 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-09 19:20:44 +00:00
sfraser%netscape.com
66bc482b2b Finish up Rendezvous support (bug 176348). Add new file, ChimeraUIConstants.h, for UI constants (such as menu item tags).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134992 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-09 19:19:52 +00:00
sfraser%netscape.com
a8bdf415d0 Make the location sheet a little wider and shorter, and also resizable so that the user can display more of the url.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134951 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 20:46:46 +00:00
sfraser%netscape.com
7d69e20b65 Make sure we hold a ref to the AppDirServiceProvider over the call to NS_InitEmbedding, to avoid it being deleted by AddRef/Release.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134949 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 20:22:41 +00:00
sfraser%netscape.com
61fa3ec0f8 Use NSMenuItem* rather than just 'id' in the rendezvous code.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134948 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 20:21:56 +00:00
sfraser%netscape.com
94979bffe6 Change the StreamLoaderContext to use NS_IMPL_THREADSAFE_ISUPPORTS1. Fixes runtime assertions.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134947 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 20:20:53 +00:00
sfraser%netscape.com
f799fe83e9 Fix build warnings.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134944 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 19:49:14 +00:00
sfraser%netscape.com
2bc92db6a2 Add new source files for Rendezvous support, bug 176348.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134930 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 02:36:41 +00:00
sfraser%netscape.com
3ecf0186d0 Add new menu items and strings for rendezvous support (still WIP). Bug 176348.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134929 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 02:36:18 +00:00
sfraser%netscape.com
5930716bbc Add support for Rendezvous, on 10.2.3 and later. Bug 176348. Still work in progress, is preffed off by default.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134928 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 02:19:13 +00:00
sfraser%netscape.com
d560a50886 New files for rendezvous support.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134927 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 02:16:04 +00:00
sfraser%netscape.com
52a37ea203 Add more folks
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134926 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 02:13:41 +00:00
sfraser%netscape.com
6dc3f5d369 New download window icons from Ugo.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134915 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-07 00:46:37 +00:00
sfraser%netscape.com
5e9549561d Fix mismatch between jni.h versions in sun-java/include, and Apple's JavaVM.framework, adding padding so that function pointers line up for Mach-O. Fixes bug 183681, r=beard.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134910 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-06 23:23:25 +00:00
sfraser%netscape.com
a588ed764f Adding a Makefile for the MRJ project.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134909 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-06 21:04:31 +00:00
sdagley%netscape.com
ab1a314b6f Fix #183856 - Don't cache DL folder on Mac since it may change while we're running. r=ccarlen
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134895 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-06 16:21:13 +00:00
sdagley%netscape.com
c1a77f87be Fix #183848 - some download types not being handled by autoDispatch
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134885 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-06 04:54:55 +00:00
sfraser%netscape.com
726e29b02e New strings file for the Navigation prefs panel.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134881 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-06 03:48:37 +00:00
sfraser%netscape.com
b4c56f42bb Fix some string issues which fell out of the compiler option changes.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134879 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-06 03:38:13 +00:00
sfraser%netscape.com
8ccd7ec6a8 Fix the Navigation prefs panel to show the download folder using the directory service, and rejig the panel layouts slightly.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134877 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-06 03:37:46 +00:00
sfraser%netscape.com
9c383fe50a Add a prefix file to include config-defs.h, and some compiler flags so that Chimera code is built with the same options as Mozilla code. This was all necessary to get XP_MACOSX to be defined, which is required for the Navigation prefs panel.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134876 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-06 03:37:06 +00:00
pinkerton%netscape.com
aedc25bee2 clean up history panel, add new download panel
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134844 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 19:13:18 +00:00
sfraser%netscape.com
44e6bf3917 Moving patches from bug 164712 (LiveConnect on 10.2) onto the Chimera branch. Checking in the patch in bug 178329 onto the Chimera branch (make sure we load the correct JavaVM). Sundry other warning fixes and code cleanup.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134840 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 09:08:50 +00:00
sfraser%netscape.com
f67bfec449 Updating project for PB 2.0.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134839 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 09:05:58 +00:00
sfraser%netscape.com
543989a190 Fix bug 152528: high CPU usage after waking from sleep. This patch disables timer firing between sleep and wake notifications, and forces the timer thread to readjust the timer calibration after wake.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134838 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 08:13:42 +00:00
sfraser%netscape.com
993d4825a3 Bullet-proof destroyWebBrowser against being called twice.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134837 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 07:15:06 +00:00
sfraser%netscape.com
b1d6fadb4f Bullet-proof CheckXMLDocumentParseSuccessful against a null bookmarks doc.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134836 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 07:14:37 +00:00
sfraser%netscape.com
109864f884 Have 'make clean' nuke the generated Localized.rsrc.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134835 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 07:11:25 +00:00
sfraser%netscape.com
70a744b9c5 Add code to show users a start page when they first run a new milestone build. Bug 181891.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134834 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 06:46:08 +00:00
sfraser%netscape.com
59787fc856 Add methods for setting prefs. Also register as an XPCOM termination and shutdown listener, so that we can clean up, and save the prefs, before XPCOM shuts down. This allows us to save prefs that are set at runtime without an explicit file save (needed for bug 181891).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134833 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 06:44:50 +00:00
sfraser%netscape.com
b129376c39 Add assertion to catch bad shutdown ordering.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134832 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 06:39:10 +00:00
sdagley%netscape.com
0bf1e58abb bookmark tweaking and alphabetization
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134830 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 06:16:47 +00:00
sdagley%netscape.com
a2afe62931 Revisit #178956 - Got verification format choice is only a good idea for text/html content type
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134829 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 05:59:33 +00:00
sdagley%netscape.com
2f8d620f77 Fix #178956 - Don't offer format popup when saving text/xml document
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134828 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 05:29:54 +00:00
sdagley%netscape.com
8a601a8001 Fix #183652 - make sure no conversion is applied to files downloaded via webpersist (aka when using 'Download Link Target...')
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134827 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 04:55:55 +00:00
sfraser%netscape.com
fcc2debdb0 Change default home page (bug 183629), and assign a start page url (bug 181891).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134825 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 02:52:08 +00:00
sfraser%netscape.com
f0df29eb72 Better fix for bug 183288 -- QuickDraw port left in a bad state causes random crashes. SetPort(NULL) on Mac OS X is guaranteed to set the port to a known safe port, so we don't need to have our own code for that. Also removed the code that set _savePort when a view is removed from the window, since we no longer need that.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134824 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 02:40:34 +00:00
sfraser%netscape.com
0494fc211b Put the PLEvent handling back the way it was (eats CPU, but is faster).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134823 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 02:35:42 +00:00
sfraser%netscape.com
93dde801f6 Fix bug 182454: properly disable Close tab item in toolbar.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134822 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 02:15:26 +00:00
sfraser%netscape.com
8727e08e8a Fix bug 183628 (bookmarks file saved too often with the Info window open), bug 183624 (blank line added to the bm file on every save), bug 167520 (with disk full, lose bookmarks).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134821 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-05 01:53:50 +00:00
sfraser%netscape.com
31f8159609 Clean up the manage bookmarks submenu (bug 182455). Removed the Add Separator item because it's nonfunctional.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134816 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 23:36:13 +00:00
sfraser%netscape.com
551b77bf5e Add a separator between Close Tab and Close Other Tabs to make the latter harder to hit by mistake.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134815 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 23:34:55 +00:00
sfraser%netscape.com
88054c5db7 Turn off inline bookmark editing. Bug 180183.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134814 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 23:33:54 +00:00
sfraser%netscape.com
b4742fb886 Fix code that commits inline editing changes, for bug 180183, but leave inline editing off for now.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134813 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 23:33:30 +00:00
sfraser%netscape.com
d5fa8480a1 Add licenses, and tweak includes to try and fix build warnings.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134808 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 21:21:17 +00:00
sfraser%netscape.com
28e34847c8 Fix bug 173745 -- GetURL would always open a new window, rather than a new tab, if Navigator was in the background. Fix that by using the frontmost browser window, rather than [NSApp mainWindow].
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134807 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 21:20:32 +00:00
sdagley%netscape.com
6bad4c0934 Fix #159162 - can't cancel uriloader initiated downloads. r=sfraser,ccarlen
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134804 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 19:51:28 +00:00
sfraser%netscape.com
6461631f07 Make About window title localizable.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134767 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 03:51:32 +00:00
sfraser%netscape.com
4958c9d671 Fix bug 182384, and probably a bunch of other QuickDraw crashers, by ensuring that we always leave the QuickDraw port in a known good state.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134766 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 03:47:06 +00:00
sfraser%netscape.com
1e505dbcd2 Avoid recursive [window close] madness if a page does window.close() in its onunload handler. Bug 183288.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134761 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 02:28:07 +00:00
sfraser%netscape.com
d9bdb66010 Fix bug 182925: crash when site icon loads after window is closed. Unregister for notifications, and clear fields in the BrowserWrapper in windowClosed.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134733 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 23:43:45 +00:00
pinkerton%netscape.com
2443d74d27 disable tooltips on browser tabs to work around an apple bug (bug 168719)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134710 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 19:58:41 +00:00
pinkerton%netscape.com
cb7f307225 pick the right routine for setting the url text depending on if it has
focus or not.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134703 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 18:16:33 +00:00
sfraser%netscape.com
d61fa6eb9a New edit bookmark images from Ugo.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134702 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 18:07:24 +00:00
ccarlen%netscape.com
ebcefe7581 Bug 177587 - Return a non-failure error code if fcntl file lock fails for an unknown reason (attempted use on a remote server) The app can then decide how to handle this situation. Chimera now ignores it and runs anyway.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134701 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 17:38:31 +00:00
pinkerton%netscape.com
abf7f6fa95 Don't call ::HideDragHilite() since a) it doesn't do much of anything and
b) it crashes if our port is messed up for any reason. bad all around.
(bandaid for bug 167312)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134700 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 16:48:22 +00:00
pinkerton%netscape.com
86407cdaee when setting text in urlbar (such as when url is done loading), do it in such
a way that it triggers the autocomplete code so that we close the popup, etc
if it was open. bulletproof the autocomplete code to bail if we get
weird data rather than crash in appkit trying to create a string the size
of main memory. (bugs 181174, 178775)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134699 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 16:35:38 +00:00
ccarlen%netscape.com
87e6c8e4e9 Bug 173368 - InitWithNativePath crashes if given a URL which begins with a forward slash. This happens during URI fixup. r=sdagley/sr=jaggernaut
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134697 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 16:08:25 +00:00
sdagley%netscape.com
959828d129 SharedMenusCocoa.framework contributor
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134671 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 06:38:46 +00:00
sdagley%netscape.com
d1af003900 Revisiting #169044 - now use seperate prefs for auto-download and auto-dispatch
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134670 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 06:29:45 +00:00
sfraser%netscape.com
b36a20b18d Fix bug 137535 for chimera: call the BP_GetSupportedMIMETypes entrypoint on the plugin. This allows QuickTime to register for extra MIME types. Also port an assertion fix from the 1.0 branch.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134650 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 00:12:41 +00:00
sfraser%netscape.com
4172cf6865 Fix build warnings, and make the prefs window title localizable. Patch partly from Josh Aas.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134647 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-02 23:44:36 +00:00
sfraser%netscape.com
ad2e93d882 Make the Prefs window title localizable.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134646 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-02 23:43:29 +00:00
sfraser%netscape.com
4fedeeef0d Fix build warnings.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134644 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-02 23:36:33 +00:00
sfraser%netscape.com
eb2a080165 Fix build warnings; remove unused and untyped consts.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134643 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-02 23:33:31 +00:00
sfraser%netscape.com
c6ada50146 Reduce the min height of the location bar toolbar item, to allow the 'small icons only' toolbar view to be shorter. Bug 182673.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134642 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-02 23:29:56 +00:00
sfraser%netscape.com
584faabcd1 New artwork from Ugo; slightly less bright icons.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134641 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-02 23:25:19 +00:00
sfraser%netscape.com
ced806c250 New artwork from Ugo for pref panel icons.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134639 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-02 23:24:30 +00:00
sdagley%netscape.com
62c658156e Followup to fix #175848 - when we get an error like 404 on a .dmg file don't try and download the error
page (since it will also have a .dmg extension). As suggested by bz CVS:
----------------------------------------------------------------------


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134635 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-02 22:47:58 +00:00
sdagley%netscape.com
f84cc0dae7 Pull in an nsHttpChannel change from trunk for a succeeded test on a channel. Used by
fix for #175848 CVS: ----------------------------------------------------------------------


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134634 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-02 22:45:40 +00:00
sfraser%netscape.com
a117aaaf35 Fix sizing issues (bug 182718).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134601 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-30 21:26:01 +00:00
sfraser%netscape.com
632b12117b Fix sizing issues with the Add Bookmarks dialog.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134600 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-30 21:23:59 +00:00
sfraser%netscape.com
7d088a62cd Bump the max PLEvent time up to 500ms, to see what this does to pageload.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134579 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-28 22:20:06 +00:00
sfraser%netscape.com
ba4a5df643 Fix bug 182371 (remove nsRepeater from the build).
Change the way that PLEvents are handled to make Chimera more responsive when long pages are loading (bug 159672); rather than trying to process events a fixed number of times, process events for a max of 200ms before yielding back to the user. This may have a negative impact on pageload times.
Also cleaned up some widget code by removing obsolete methods (test for Appearance manager, application layering).


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134563 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-28 05:49:19 +00:00
sfraser%netscape.com
2128e2c38b Make tab and window titles show something useful for local files and pages without <title> tags.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134552 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-28 01:04:17 +00:00
sfraser%netscape.com
e8db5bde51 Fix bug 157033: maintain the progress meter state when switching between tabs.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134550 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-28 00:43:56 +00:00
sfraser%netscape.com
86b594f0b8 Fix bug 164706 (loading tab titles get reset to 'untitled' when you switch to them) and bug 160407 (throbber animates for background tabs).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134549 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-28 00:29:01 +00:00
sfraser%netscape.com
2b9309e004 Make our content views resturn NO to [NSView mouseDownCanMoveWindow], so that when metallizing hacks are applied, content clicks don't move the window.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134544 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-27 23:10:31 +00:00
sfraser%netscape.com
b47eb3e04a Fix bug 181388: allow clicks on tabs in background windows to change tabs.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134543 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-27 23:08:23 +00:00
sfraser%netscape.com
992dd61d30 Avoid an assertion in nsStandardURL::GetFile by not calling GetFile on non-file URLs. Also detabbed some code.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134539 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-27 21:18:31 +00:00
sfraser%netscape.com
e87228f894 Add the Default plugin to the Chimera package. Bug 166998
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134528 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-27 03:56:51 +00:00
sfraser%netscape.com
7230b52264 Add a 'vers' resource to Chimera, so that Shockwave Director content loads (bug 151677).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134525 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-27 03:41:08 +00:00
pinkerton%netscape.com
9895ed57af more adjusting
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134487 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-26 21:24:41 +00:00
pinkerton%netscape.com
f85f7e3cb9 spreading holiday cheer
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134486 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-26 21:22:06 +00:00
sfraser%netscape.com
ee12244a4c Port the fix for bug 159973 (right-to-left form controls) to the chimera branch.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134485 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-26 21:17:09 +00:00
sfraser%netscape.com
8dbb127163 Landing fix for bug 76190 ("visual selection" issue) for Chimera.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134481 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-26 21:08:25 +00:00
sfraser%netscape.com
f2562afa1f Fix for bug 148685: popups in form controls draw too 'bold' (double drawing). Comment out redundant form frame drawing.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134480 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-26 21:04:26 +00:00
pinkerton%netscape.com
3646b58b74 fix password saving in prompt dialogs (bug 182079)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134476 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-26 20:56:13 +00:00
sfraser%netscape.com
8f3c893600 Land fix for bug 82352 on the Chimera branch.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134473 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-26 20:30:50 +00:00
sfraser%netscape.com
a48542b7f9 Fix various plugin bugs: 158345 (plugin context menus), 177103 (drawing RealPlayer video), 180589 (send autokey events to plugins), 180596 (don't call plugins reentrantly and nuke their port state), 181947 (typing of international characters into plugins).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134441 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-26 03:19:32 +00:00
pinkerton%netscape.com
0ff7ef7213 backout last fix for 181174, it should be fixed in a different way.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134414 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 22:51:15 +00:00
pinkerton%netscape.com
1106c1e419 push the decision to close a window up to the app so that window.close()
doesn't automatically close the window at the embedding layer. now the BWC
closes the appropriate tab or the whole window if there are no tabs.
(bug 181635)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134413 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 22:04:43 +00:00
pinkerton%netscape.com
b40f1498fe don't clear the url bar when loading about blank. this fixes not only
the problem where we'd clear out what the user typed, but crashes that
would come from the autocomplete of what was typed that was now gone.
(bugs 181174, 178775)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134411 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 21:22:36 +00:00
pinkerton%netscape.com
fba38f032d add menu item for getting directly to history sidebar panel.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134410 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 21:03:04 +00:00
sfraser%netscape.com
0f581a5734 Add a DOCTYPE to the default bookmarks, to help with bug 179601 in future.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134409 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 18:55:29 +00:00
sfraser%netscape.com
dd3c7aff44 Fix bug 179601: add ability to import XML bookmarks files (for now, just Chimera BM files).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134408 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 18:42:53 +00:00
sfraser%netscape.com
13ee6e4770 Chimera fix for bug 181823: always return a value from CheckSameOrigin (might fix issues with loss of bookmarks on quit).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134394 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 06:46:09 +00:00
sfraser%netscape.com
71fa9417d9 Add shortcut for Home page (command-shift-H). Bug 156348.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134392 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 05:17:54 +00:00
sfraser%netscape.com
f881efc2a7 Fix bug 181421: possible crash on quit if History sidebar is open.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134391 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 05:15:18 +00:00
sfraser%netscape.com
f3aedb6376 Add QA and project management to credits.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134388 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 04:40:29 +00:00
sfraser%netscape.com
37a055a90a Fix bug 181657: extra items in bookmarks menus afte moving folders.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134387 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-25 04:39:44 +00:00
sfraser%netscape.com
fc19dfa4c2 Move the Bigger/Smaller text code down into the browser view where it belongs, and make sure the UI elements update correctly.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134356 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-23 02:20:49 +00:00
sfraser%netscape.com
e963deb78f Add new toolbar icons from Ugo. Make new toolbar buttons for New Tab (bug 160566), Close Tab, Send Link, and move some code around to make wiring them cleaner.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134354 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-23 01:47:34 +00:00
pinkerton%netscape.com
48cc89674e when we get an AE and are maxed out on tabs, open a new window instead
of reusing the last tab (bug 181402)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134330 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-22 14:51:09 +00:00
sdagley%netscape.com
1b690cbe5e Fix logic in checkin for #169044 to supress Keep Open button when browser.download.autoDispatch pref is set
CVS:
----------------------------------------------------------------------


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134313 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-22 06:36:21 +00:00
bryner%netscape.com
b81ffacb9a Bug 162038 - frameset pages come up blank when loaded in a background tab. Merge the patch from bug 48422 from the trunk to fix some bogus logic in nsHTMLFrameSetFrame::Reflow which was causing the frame sizes to not be recalculated on a resize reflow _from_ 0,0.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134281 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-21 23:02:19 +00:00
sfraser%netscape.com
bfd761f31c Fix bug 181234 and bug 181090 -- Send Link didn't correctly encode URLs containing & and ?, causing truncate with some mailers.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134272 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-21 18:21:16 +00:00
sfraser%netscape.com
a141cd1b9a Fix bug 179598: add a checkbox to the Bookmark Info panel to allow you to convert a folder into a tab group and back. Also fixed bug 181013: made keywords work for tab groups.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134254 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-21 07:59:13 +00:00
sfraser%netscape.com
36f647b4ac Fix bug 181191: shift-delete should go forwards.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134245 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-21 05:16:17 +00:00
pinkerton%netscape.com
f1f3b96569 dim "edit sites" explanitory text when button is disabled. use LS to
get correct keychain app so we don't launch the os9 one by accident (bug 178445)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134218 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-20 23:21:00 +00:00
pinkerton%netscape.com
fbb5133cb1 store port in keychain correctly (bug 178655)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134213 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-20 23:13:47 +00:00
sdagley%netscape.com
f7ad55feb1 Fix #151047 and #169044 - allow single click download and dispatch to helper app controlled by a
pref that will have UI explaining the potential security issue of this feature.
 CVS:
----------------------------------------------------------------------


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134208 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-20 22:45:36 +00:00
pinkerton%netscape.com
5686d39061 Add alert that allows you to change keychain username/password for a site
when it differs from what you have previously entered (bug 181171)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134205 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-20 21:51:28 +00:00
sfraser%netscape.com
2d215d9d75 Fix another XPCOM shutdown issue; make sure global history goes away before XPCOM shutdown.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134142 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-20 01:17:22 +00:00
sfraser%netscape.com
99da060c7d Move the call to CHBrowserService::BrowserClosed(); from the CHBrowserView dealloc to the destroyWebBrowser, so that we're not reliant on autorelease timing to shut down XPCOM. Also move some cleanup that requires XPCOM in BrowserWindowController from dealloc to windowWillClose. This fixes bug 172195.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134138 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-20 00:57:23 +00:00
sfraser%netscape.com
6fe02ab5db Add support for getting the URL of the front window via Apple Events.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134130 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 23:38:02 +00:00
sfraser%netscape.com
d3d36b632e Fix bug 167178: prevent crashes due to mismatched binary formats (CFM vs. Macho) by adding new flags for MachO scriptables. patch by peterl, r=beard, sr=sfraser.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134121 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 20:43:30 +00:00
sfraser%netscape.com
11697efdf9 Add a DeploymentSymbols Build Style.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134115 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 19:01:37 +00:00
sfraser%netscape.com
cd0cee96cf Fix crash when clicking on menubar with no windows open, and bullet-proof other callers against similar issues.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134112 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 17:57:20 +00:00
pinkerton%netscape.com
73b4d90272 attempt to make cookie prefs clearer (bug 180248).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134111 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 16:18:28 +00:00
pinkerton%netscape.com
81bb51da48 Filter out folders from the history drag so that they cannot be dragged
(bug 180807)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134099 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 15:15:21 +00:00
sfraser%netscape.com
a75a2b9e91 Adding a 'Send Link' option to the File menu. Bug 146321. Patch mostly by pilot@feldnet.org.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134092 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 07:31:49 +00:00
sfraser%netscape.com
5cfc68da17 Implement bookmarks keywords, bug 159497.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134089 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 06:42:30 +00:00
sfraser%netscape.com
e5666ef9eb Whitespace change.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134088 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 06:35:03 +00:00
sfraser%netscape.com
f374b1366a Fix bug 164990: open command-clicked toolbar and sidebar bookmarks in a new tab, following the pref. Also fix the sidebar drag feedback when option-dragging items to allow drops adjacent to the source.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134081 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 05:12:34 +00:00
sfraser%netscape.com
72ade811fa Add the Mac OS X default plugin to the build.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134070 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 03:29:24 +00:00
sfraser%netscape.com
44bab98f2f Build changes for default plugin
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134069 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 03:26:28 +00:00
pinkerton%netscape.com
8d431d9eb3 Fix UI to match the prefs for reusing the browser window when getting
a GURL. Now supports 3 options: open new window, open new tab, reuse existing
window. (bug 180570)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@134046 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-18 19:48:41 +00:00
sfraser%netscape.com
6ed2796892 Fix EventRecord corruption issues where the EventRecord passed to the plugin pointed to an out-of-scope stack variable.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133962 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-16 07:44:07 +00:00
sfraser%netscape.com
0fbcc0fd0f Fix bug 180416 -- window.resizeBy moving the window top/left position.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133937 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-16 02:31:28 +00:00
sfraser%netscape.com
04469db00c Fix bug 180405: correctly enable services menu items.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133933 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-16 00:53:55 +00:00
sfraser%netscape.com
de9e4e52b9 Fix for bug 180405 (enabling of Services menu items). Adding implementation of cmd_getContents in editor. This is necessary because the impl in nsGlobalWindow, for the browser area, is not able to get at the selection in text widgets. Also fixed a bug getting the enabled state for the insertText command.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133932 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-16 00:53:34 +00:00
sfraser%netscape.com
265ff2938e Hook up command-(shift-)up/down arrow to move to top or bottom of document, selecting if the shift key is down. Bug 166281.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133930 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-15 23:30:28 +00:00
sfraser%netscape.com
953a958871 Fix bug 180267: crash when quitting with bookmark info window showing, for tab group or folder.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133921 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-15 20:34:43 +00:00
pinkerton%netscape.com
9b7258e3d0 don't load a new tab when the always_reuse_window pref is set. just reuse
the window.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133918 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-15 20:12:55 +00:00
sfraser%netscape.com
f2589c343b Fix bug 179746 -- allow setting min font size back to 'None'.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133917 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-15 20:11:55 +00:00
sfraser%netscape.com
323e15f3fa Final fix for bug 164679: give the exported file a TEXT file type so that IE imports it correctly.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133915 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-15 19:07:56 +00:00
sfraser%netscape.com
2e94200504 Polish bookmarks export (bug 164679). IE importing doesn't yet work right; it seems to need a type/creator on the file, or something.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133880 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-15 03:01:04 +00:00
sfraser%netscape.com
c43591cc5e Fix for bug 180247 -- crash if you remove a bookmark toolbar item, then revisit the site. Also did more bookmarks code cleanup, moving code that creates items, folders and groups from the Add Bookmark dialog into the BookmarksManager. Also cleaned up some singleton creation issues.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133876 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-15 01:52:10 +00:00
pinkerton%netscape.com
1c1a706925 work around cocoa bug to force scrollbar to enable correctly (bug 172982)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133844 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-14 20:20:00 +00:00
sfraser%netscape.com
0e395f2cf1 Fix bug 164679 -- add code for bookmarks exporting, and a menu item on the "Manage Bookmarks" submenu for exporting.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133827 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-14 16:46:49 +00:00
sdagley%netscape.com
b14ab0738a Fix #179901 - downloads should default to '~/Desktop' rather than '~/Desktop Folder' when InternetConfig DL
folder pref not initialized (it isn't with a new user under Mac OS X 10.2-10.2.2 due to an Apple bug)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133820 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-14 07:04:34 +00:00
sdagley%netscape.com
52d2639d49 Fix #171004 - Shared Menu support for Chimera. r=sfraser
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133819 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-14 06:33:07 +00:00
bryner%netscape.com
ce7e59ec92 Fix handling of disabled form controls (bug 149653) -- make sure to disable the menu items when necessary in CHClickListener, and make the 'color' rule for disabled form controls be !important, since the non-disabled rule uses !important. r=sfraser.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133776 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 22:10:11 +00:00
pinkerton%netscape.com
c096717761 Add preliminary dnd support to history panel for single urls. Panel will
now notice newly visited urls (before we only noticed urls already in history)
so it no longer gets out of sync and hence really slow.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133763 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 19:55:55 +00:00
sfraser%netscape.com
f7d886076b Make it possible to show JS errors in the console, using a hidden pref "chimera.log_js_to_console". The JSConsole code could be expanded later to show a list in the UI. Bug 179869.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133729 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 04:03:15 +00:00
sfraser%netscape.com
fe563c272f Renaming chimera.js to all-chimera.js so that it loads after all.js. Bug 177573.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133726 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 03:18:18 +00:00
sfraser%netscape.com
23461543f0 Fix localization issues with "Show/Hide Toolbar" menu items, and the "Show All" button in the prefs window.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133724 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 02:54:41 +00:00
sfraser%netscape.com
607630b71f Changes to build the default plugin as Mach-O, using a Project Builder project. The Mach-O plugin has to wrap outgoing function pointers with TVector glue, and fix up incoming TVP so they are callable from Mach-O.
The plugin was also changed to use CFPreferences to store the list of MIME types that it has seen, rather than writing a STR# in a place that might be write-protected for the user. r=sdagley/beard.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133723 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 02:47:54 +00:00
sfraser%netscape.com
8b2e053c30 Add support for GetContents and InsertText commands, using nsICommandManger and parameter-based commmands. Chimera uses these commands for services support. Bug 152023.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133722 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 02:25:33 +00:00
sfraser%netscape.com
e5494d49df Add support for GetContents and InsertText commands, using nsICommandManger and parameter-based commmands. Chimera uses these commands for services support. Bug 152023.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133721 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 02:07:31 +00:00
sfraser%netscape.com
1349f20b46 Support for services in CHBrowserViews. Bug 152023.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133720 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 02:04:14 +00:00
sfraser%netscape.com
533b43126a Fix bug 165774: make favicons show up on the personal toolbar (but not in menus or the sidebar, for performance reasons).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133718 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 01:11:24 +00:00
sfraser%netscape.com
a7fe82e807 Add Init method to nsIStreamLoader to take an nsIChannel, so that we can set up the channel ourselves (for bug 165774). Similar patch has already landed on trunk. DO NOT LAND THIS ON THE TRUNK.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133717 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 01:08:43 +00:00
pinkerton%netscape.com
9364e0414b allow deletion of pages from history (but not folders, yet). turn on
multiple selection in history outline. (bug 179124)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133675 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-12 19:18:00 +00:00
ccarlen%netscape.com
46d8a27a74 Bug 145896 - The page setup dialog being shown is the wrong one, so all settings made in it are ignored. r=sfraser
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133663 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-12 18:12:47 +00:00
sfraser%netscape.com
0e9c106649 Fix bug 179583: open tab groups in new window loaded them in the existing window.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133662 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-12 18:06:10 +00:00
pinkerton%netscape.com
638447c33c Add tooltip support to the history view and make it an ExtendedOutlineView
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133658 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-12 16:42:44 +00:00
sdagley%netscape.com
53f20171ec Fix #179647 - don't ask event for keyCode if it isn't an NSKeyDown event
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133630 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-12 06:46:30 +00:00
sfraser%netscape.com
60f69d1bc0 Fix tab order in bookmarks panel.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133628 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-12 05:58:52 +00:00
sfraser%netscape.com
304f728e5c Fix the bookmarks info window to always save changes, and fix keyboard order.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133627 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-12 05:58:30 +00:00
sdagley%netscape.com
0883c6342b Fix #179592 - bad copy & paste in case statement noticed by depstein
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133603 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-12 00:53:51 +00:00
pinkerton%netscape.com
e7dd3a5e2f Turn on history panel by default, now that it doesn't totally suck
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133590 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-11 21:55:56 +00:00
pinkerton%netscape.com
22257e32bf Fix history code so that it updates correctly as you load pages. History
observers and data sources are only initialized when the panel is displayed.
(bug 155272)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133589 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-11 21:48:56 +00:00
pinkerton%netscape.com
18659e4452 Add history.properties to get relative date titles for folders (bug 162750)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133572 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-11 16:11:55 +00:00
sfraser%netscape.com
51579425f6 New strings for warning dialog on quit when there are downloads running, bug 174147.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133563 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-11 07:02:32 +00:00
sfraser%netscape.com
4a1a75e5ec Fix bug 174147: show warning dialog if quitting while downloads are in progress.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133562 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-11 07:01:31 +00:00
sdagley%netscape.com
dd280742cf No bug, just fixing wrong logic on this #if to match trunk (where it was rs=sfraser w/o a bug)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133560 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-11 06:45:17 +00:00
sfraser%netscape.com
065987d303 Adding a pref for minimum font size in the Advanced panel of the Appearance prefs. Also fixing keyboard order in all the panels.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133457 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-09 04:07:40 +00:00
sfraser%netscape.com
21b25f498f Moving patch for bug 28583 onto the chimera branch. Tabbing into a text input now selects its contents.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133342 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-08 00:02:46 +00:00
sfraser%netscape.com
7aaac4b6d3 Migrate fix for bug 133654 (<param> values in <object> tags in XHTML) onto the branch, being careful not to clobber the fix for bug 152334 in the same code.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133338 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 23:22:34 +00:00
sfraser%netscape.com
cf33a483c2 Port fix for bug 127321 onto chimera branch -- fix option-arrows to not stop at punctuation.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133325 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 22:10:08 +00:00
sfraser%netscape.com
ddfb9a9b73 Change text of "bigger/smaller text" buttons in toolbar to match menu. Bug 178260.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133277 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 07:02:57 +00:00
sfraser%netscape.com
94985bf972 Attempt to fix the static build weirdness.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133273 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 06:32:18 +00:00
sfraser%netscape.com
588adfbdd1 Fix bug 165036 -- make 'Create new folder' work for the bookmarks toolbar. Also removing some errant NSLogs from earlier checkins.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133266 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 05:54:20 +00:00
sfraser%netscape.com
8a8a1d42b4 Fixing bug 153508: adding Copy and Select All to the page context menu.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133257 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 04:39:29 +00:00
sfraser%netscape.com
355ad7e872 Fix bug 178783, and other bugs related to context menus in frames. When in a frameset, change the context menu to contain 'Save Frame As', and 'View Frame Source', which apply to the focussed frame. Make sure the top-level menus for save and view source apply to the root document. Added context menu items to Open in New Window and Open in New Tab when in frames.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133255 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 04:20:57 +00:00
sfraser%netscape.com
39c1c7bdb4 Fix warning.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133252 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 04:05:15 +00:00
sfraser%netscape.com
9fd4601ed3 Adding context menu items for frames (frame in new window, new tab) (bug 159049, bug 158442), and images (view image, copy image location).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133246 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 02:43:54 +00:00
sfraser%netscape.com
2f37232902 Fix crash when running a second copy, and quitting after dismissing the 'already running' alert. Also bullet-proof against null profiles, and a failure to read bookmarks.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133243 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 02:11:44 +00:00
sfraser%netscape.com
b54366b2ca Fix leak of bookmarks toolbar; unregister the bookmarks client when it leaves the window.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133241 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 01:50:42 +00:00
sfraser%netscape.com
cc3d4884d4 Make throbber point to chimera page (bug 178349).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133224 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-06 23:44:02 +00:00
sfraser%netscape.com
7244dcf499 Fix setTag return type.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133219 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-06 23:18:00 +00:00
sfraser%netscape.com
379a520592 Minor tidyup
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133218 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-06 23:17:36 +00:00
sfraser%netscape.com
3e4581dbd8 Added BookmarksMenu.h/mm
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133217 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-06 23:17:20 +00:00
sfraser%netscape.com
4a88c95eb6 Resource changes for dock bookmarks menu (bug 163646), and bookmarks info window resizing fix (bug 162905)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133216 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-06 23:15:32 +00:00
sfraser%netscape.com
d76d3b972a Changes for bug 178744 (general bookmarks fixing), bug 163646 (bookmarks on dock menu), bug 162905 (resizing the bookmarks info window) and more.
Main changes are to move out of BookmarksService all code that deal with UI, and instead register clients that get notified of bookmark changes. A new class, BookmarksMenu, handles the updating of bookmark menus (main menu, dock, and any temporary menus).


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133213 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-06 23:12:12 +00:00
sfraser%netscape.com
c16d19a1ee Fix memory leak.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133027 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-05 20:31:03 +00:00
sfraser%netscape.com
30e707d5a9 Fix bug 178010: prevent focus() calls on form elements from focussing the window.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133019 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-05 18:07:03 +00:00
sfraser%netscape.com
25ff987a8e Fix bug 159410 (popups made visible before resize). Eliminate the modal session stuff, and fix some logic to make windows opened in the background stay that way.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133018 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-05 18:04:58 +00:00
pinkerton%netscape.com
61ddba5f88 expand what we think is a "full browser" window when looking for the
frontmost. fixes bug where windows opened by a new target would never
get focus from cmd-l. (bug 168688).


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133017 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-05 15:49:22 +00:00
pinkerton%netscape.com
337ea8cda1 Break out context menu listener from <SELECT> menu listener so select
handling can be done in embedding layer. New file CHClickListener.*


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133016 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-05 15:38:43 +00:00
bryner%netscape.com
5880fe4d88 Bump UA version to 0.6+
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@133005 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-05 05:50:05 +00:00
bryner%netscape.com
bb103ab1bd oops, wrong branch
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132964 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-04 23:59:54 +00:00
bryner%netscape.com
2ec4474ddc pull from 0.6 release tag
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132962 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-04 23:59:52 +00:00
sfraser%netscape.com
02df7a13f4 Release notes update
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132951 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-04 23:13:03 +00:00
sfraser%netscape.com
cfe4dae232 Update release notes for 0.6
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132949 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-04 23:06:45 +00:00
bryner%netscape.com
fa8610f008 Update version numbers to 0.6.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132947 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-04 23:02:29 +00:00
bryner%netscape.com
7e1d9c45e6 Checklist of things to do before releasing; not part of the build
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132943 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-04 22:06:45 +00:00
sfraser%netscape.com
9c0dc1f2b6 Change feedback item to load the mozilla feedback page, rather than do a mailto:.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132809 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-01 02:34:41 +00:00
pinkerton%netscape.com
df32cdc0dd Copy over the correct files (mac v unix) and fix the res/builtin files so
text fields appear.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132781 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-31 18:13:25 +00:00
pinkerton%netscape.com
27d5070928 adding click listener for doing select lists as native menus. registering
the listener from w/in the CHBrowserView's init.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132780 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-31 18:12:32 +00:00
sfraser%netscape.com
0e3c85da45 Update feedback url to point to Chimera feedback page.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132692 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-30 07:28:27 +00:00
sfraser%netscape.com
39656d1844 Fix bugs 177369 and maybe bug 177338; make sure that the QuickDraw port remains valid after an NSQuickDraw goes away by setting the internal _savedPort member to a known good port when the view is about to be removed from the window.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132691 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-30 07:06:48 +00:00
sdagley%netscape.com
5b14edcde8 Fix issue with URLs containing a query in previous 'fix' for #175848
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132678 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-30 03:03:44 +00:00
sfraser%netscape.com
72084ad93a Change default bookmarks. Bug 168293.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132628 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-29 05:20:39 +00:00
bryner%netscape.com
5162c7784b Use only fcntl locking (not symlink-based locking) on OS X. Works around bug 176608. r=ccarlen, sr=jag.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132614 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-29 01:00:57 +00:00
sfraser%netscape.com
5b01b455af Do some bullet-proofing so that directory listings don't crash when the file listing images in res/html are missing.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132600 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-28 20:33:34 +00:00
sfraser%netscape.com
cd5fb16f1d Add file listing images to the project, and set the pref to use HTML-format listings.
Bug 166391, patch from Conrad Carlen.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132599 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-28 20:31:49 +00:00
ccarlen%netscape.com
05a9485a34 Bug 166391 - Chimera is missing icons for dir listings. Adding the icons to the embedding manifests
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132596 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-28 19:25:23 +00:00
pinkerton%netscape.com
b87f2f5538 remove "close box" from sheets so that when they come up as standalone
windows for bg tabs, they don't let you close them and screw up the app
(bug 173604)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132589 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-28 16:37:08 +00:00
sfraser%netscape.com
5a62a0707c Fix bug 102812: make directory listings show up as HTML in chimera.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132578 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-28 05:12:00 +00:00
sfraser%netscape.com
4b4600df59 Fix bug 177059: nsLocalFile::GetFileSize was unreliable for directories, sometimes returning a non-zero value (OS bug?).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132577 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-28 05:08:26 +00:00
sdagley%netscape.com
35eff7492a Fix #175848 for Chimera only - special case .dmg files if we see them as text/plain or
text/html. sr=bzbarsky


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132570 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-27 05:43:24 +00:00
sfraser%netscape.com
2c4c7b0759 Undo booboo with earlier checkin, which set the plugin timer to 2 secs, rather
than 1/60th of a sec. That slowed down flash animations rather.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132556 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-26 02:41:38 +00:00
sfraser%netscape.com
4ab57a41f3 Add resources for the Macho default plugin
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132555 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-26 01:59:55 +00:00
sfraser%netscape.com
537d7a85a7 Add a PB project to build a Macho default plugin.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132554 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-26 01:59:35 +00:00
sfraser%netscape.com
47af6a8370 Fix bug 176649 (Chimera plugin issues).
Plugins drawing over chrome (bug 172688)
Plugins showing through tabs (bug 158018, bug 156583)
Plugins not drawing initially on page load (bug 147728, bug 161378)

Bugs _not_ fixed:
Visual corruption when scrolling with QT movie (bug 160435)
Crashes when loading plugins which are offscreen (bug 161378), tho it seems much
less easy to reproduce now.

Quick summary of changes:

Added nsIPluginWidget to allow plugin code to get the widget clip rectangle and
origin. Fixes drawing over chrome for plugins in iframes.

Always use [mView qdPort], not the WindowRef port, for gecko rendering (making
nsIRenderingContexts). Only use the WindowRef port for plugin drawing. Fixes
drawing over chrome.

Always call SetPortVisibleRegion() before plugin drawing, because we don't know
what part of the BeginUpdate/EndUpdate cycle we're in.

Keep track of whether views are in the frontmost tab (i.e. have a window), and
hide/show views immediately on tab switching, rather than on the next timer
fire. Fixes plugins stomping through tabs (mostly).

Add smarts to FixUpPluginWindow() in nsObjectFrame so that it knows when it's Ok
to display the plugin (after a ::Paint()). Fixes plugins drawing in the wrong
place/not drawing on initial page load.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132538 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-25 20:15:29 +00:00
sfraser%netscape.com
404e336322 Plugin fixes for bug 176649.
Fixes:
Plugins drawing over chrome (bug 172688)
Plugins showing through tabs (bug 158018, bug 156583)
Plugins not drawing initially on page load (bug 147728, bug 161378)

Bugs _not_ fixed:
Visual corruption when scrolling with QT movie (bug 160435)
Crashes when loading plugins which are offscreen (bug 161378), tho it seems much
less easy to reproduce now.

Quick summary of changes:

Added nsIPluginWidget to allow plugin code to get the widget clip rectangle and
origin. Fixes drawing over chrome for plugins in iframes.

Always use [mView qdPort], not the WindowRef port, for gecko rendering (making
nsIRenderingContexts). Only use the WindowRef port for plugin drawing. Fixes
drawing over chrome.

Always call SetPortVisibleRegion() before plugin drawing, because we don't know
what part of the BeginUpdate/EndUpdate cycle we're in.

Keep track of whether views are in the frontmost tab (i.e. have a window), and
hide/show views immediately on tab switching, rather than on the next timer
fire. Fixes plugins stomping through tabs (mostly).

Add smarts to FixUpPluginWindow() in nsObjectFrame so that it knows when it's Ok
to display the plugin (after a ::Paint()). Fixes plugins drawing in the wrong
place/not drawing on initial page load.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132537 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-25 20:12:54 +00:00
bryner%netscape.com
9746d48c15 Generate the Finder metadata file with 10.1 instead of 10.2, so that the disk image background shows up on 10.1. Bug 168373.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132342 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-21 22:44:13 +00:00
pinkerton%netscape.com
3be3e36c42 Updating privacy icon from Ugo
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132244 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-18 17:29:26 +00:00
pinkerton%netscape.com
fad23d9d43 Adding bigger/smaller text toolbar buttons and an API to the browser
wrapper to ask if it's showing about:blank (cleans up the maincontroller a
bit).


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132238 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-18 14:16:40 +00:00
pinkerton%netscape.com
6b0f966061 new icons
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132233 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-18 13:14:08 +00:00
sfraser%netscape.com
876165998f Fixing bug 161376: add contextual menu support for tabs.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132181 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-17 22:05:05 +00:00
pinkerton%netscape.com
cd9026c63f Don't clear the container before shutting down the web browser. This
prevents the onUnload handler from firing. (bug 174416)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@132024 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-15 17:18:32 +00:00
bryner%netscape.com
e5689fedd9 Enable the toolbar in the disk image window so that users can drag the Chimera icon onto the Applications icon
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131882 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-13 02:09:53 +00:00
bryner%netscape.com
e5147752fe Trying to fix window background
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131873 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-12 10:24:52 +00:00
bryner%netscape.com
db0cc48e1d Adding background image and Finder data file for disk image background (bug 168373). Thanks to Ugo Santana for the artwork!
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131856 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-12 01:05:27 +00:00
ccarlen%netscape.com
5a65ee5899 Bug 173311 - .xpt files which are aliases (RealPlayer One) cause crash at startup. r=bnesse
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131819 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-11 19:38:32 +00:00
bryner%netscape.com
4541fcaea0 Bug 171343 - nsProfileAccess's signal handler should use SA_SIGINFO and sa_sigaction where available. r=ccarlen, cls, sr=brendan.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131803 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-11 10:14:48 +00:00
sfraser%netscape.com
3c73ceea00 Save bookmarks folder states (expanded/collapsed) between sessions. Bug 168010.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131783 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-11 05:41:57 +00:00
sfraser%netscape.com
25f2cd899a Fix bug 164976 -- respect pref to load homepage in new tabs.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131781 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-11 05:18:06 +00:00
sfraser%netscape.com
77fc29bba8 Fix bug 169204 -- odd browser window appearance if you don't have a saved window size.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131779 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-11 04:57:33 +00:00
sfraser%netscape.com
fd4277f726 Remove bogus double include of <Cocoa.h>
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131778 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-11 04:47:30 +00:00
sfraser%netscape.com
1a6391bcd8 Use stringByTrimmingWhitespace so that this works on 10.1. Bug 173766.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131777 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-11 04:46:13 +00:00
sfraser%netscape.com
c38f8a218a Add a stringByTrimmingWhitespace category method.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131776 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-11 04:45:19 +00:00
sfraser%netscape.com
1a0b0807ab Fix bug 172242: bogus attempt to go to www.foo.bar is the search pref is empty.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131773 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-11 03:48:50 +00:00
bnesse%netscape.com
d610c3f123 Changing patch for bug 154361 to only return parent information for widgets that are plugins. Essentially an attempt to reduce/eliminate our QuickDraw crashing problems. r/a=sfraser.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131717 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-10 21:03:59 +00:00
pinkerton%netscape.com
313b705e37 Don't rely on a grafPtr for the highlight color, use the theme color. (bug 150887)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131694 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-10 19:14:14 +00:00
pinkerton%netscape.com
4dc67d059c Fix crash with window.close() caused by bad refcounting of the progress
strings. Moved BWC back to being autoreleased, but now shutting down gecko
in windowDidClose. Moved "Document:Done" string to localizable.strings so
it can be localized. (bug 170774)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131599 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-09 17:16:18 +00:00
sfraser%netscape.com
519f48080d Fix bug 173377: hang hitting return in empty url bar.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131511 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-09 00:28:32 +00:00
sfraser%netscape.com
f46d58a36a Select the URL bar text on proxy icon click.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131307 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-07 16:41:58 +00:00
bnesse%netscape.com
351e9759ae Fix for bug 167333. Mouse click coordinates are incorrect. r=beard
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131248 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-05 21:13:49 +00:00
bryner%netscape.com
792a14f1d5 Build the DeploymentSymbols build style if you have CHIMERA_OPT_SYMBOLS set in the environment.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131229 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-05 08:56:18 +00:00
bryner%netscape.com
62663241e7 Bug 169982, add same origin check for serializeToStream (merge from MOZILLA_1_0_BRANCH).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131227 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-05 07:09:42 +00:00
bryner%netscape.com
1a14567ab6 Bug 145579, send the correct referrer for images (merge from MOZILLA_1_0_BRANCH).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131226 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-05 07:07:25 +00:00
bryner%netscape.com
03d698b86b Remove "Deployment -O3" build style, which wasn't all that useful, and added a new build style, DeploymentSymbols, to generate an optimized build with debugging symbols.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131225 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-05 06:03:43 +00:00
pinkerton%netscape.com
b6f4fe0275 updated icon
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131157 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-04 14:48:54 +00:00
bnesse%netscape.com
83b71cbc4a Fix for bug 166550. Do not adjust for title bar offset on Jaguar. r=beard.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131105 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-03 22:07:56 +00:00
bryner%netscape.com
4767789e9c Add Chimera/<version> to the UA string (version right now is "0.5+"). Bug 167732.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131102 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-03 21:34:16 +00:00
pinkerton%netscape.com
6a396e1763 Make drawer open on the left or the right, if there's room, and only
resize if it can't fit on either. had to reshuffle the window resize code
to get this working.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131096 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-03 20:43:48 +00:00
pinkerton%netscape.com
8378de3d1d fix opening drawer on secondary monitor in negative coordinate space (bug 167641, again)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131090 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-03 20:04:54 +00:00
sfraser%netscape.com
b369b0a8e8 Fix bug 172233 -- bad bookmarks file after dragging in from Sherlock. Sherlock has a bogus null byte at the end of its url drag data, which we need to strip out.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131060 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-03 05:57:54 +00:00
sfraser%netscape.com
f52626e214 Fix NSPasteboard+Utils.mm so that it really exists in the static target (working around a PB 2.0 bug).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131021 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 20:11:13 +00:00
bnesse%netscape.com
13bfc0e6bc Fix for bug 154023. Initialize library refcounts properly. r=sfraser.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131020 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 20:04:47 +00:00
pinkerton%netscape.com
e8cac65b72 adding localized string file and an include path to the privacy panel
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@131000 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 17:19:17 +00:00
pinkerton%netscape.com
5477f3b806 Add way to edit cookie sites that are blocked or allowed (bug 160123)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130999 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 17:09:32 +00:00
sfraser%netscape.com
90897c81a1 Fix testing string I was using for the search page default.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130976 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 07:18:54 +00:00
sfraser%netscape.com
249eb41c58 Allow the user to set their search page in the prefs, and use that, or the setting from WebsiteDefaults.strings as appropriate. Bug 165535.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130975 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 07:13:09 +00:00
sfraser%netscape.com
f0ed4da79f Adding default search page setting, for bug 165535.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130973 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 07:11:44 +00:00
sfraser%netscape.com
b720dab6c0 Adding a Search page field (bug 165535).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130971 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 07:10:23 +00:00
sfraser%netscape.com
86924cc2e4 Fixing bug 167423 -- wire up the pref to disable plugins.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130970 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 06:03:53 +00:00
sfraser%netscape.com
6414486872 Add a default for the "chimera.enable_plugins" pref.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130969 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 05:59:57 +00:00
sfraser%netscape.com
d7e2c87955 Wire up the "chimera.enable_plugins" pref.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130968 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 05:59:22 +00:00
sfraser%netscape.com
06f104ed74 Remove an NSLog call.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130959 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 02:28:53 +00:00
sfraser%netscape.com
ffdaeb4e67 Fix bug 166694 -- non-ASCII suggested filenames not showing up in save file dialog. Also fix a possible crasher when saving with names containing ':' or '/'. In addition, fix a couple of type coercion warnings.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130958 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 02:27:59 +00:00
sdagley%netscape.com
cf65b8e144 Oops, Jaguar == Mac OS X 10.2, not Mac OS X 12.0. No bug, just brain fade. rs=sfraser
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130955 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 01:51:37 +00:00
sfraser%netscape.com
a9cec51950 Fix bug 163107 (drag and drop from sherlock) for the chrome, by accepting the NSURLPboardType flavor everywhere.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130951 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 01:06:53 +00:00
sfraser%netscape.com
cb6d183924 Fix the beep when hitting Return in forms by adding a dummy implementation of insertNewline.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130945 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 00:12:17 +00:00
sfraser%netscape.com
736dd225b9 Clean up string usage, and fix warnings.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130944 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 00:10:48 +00:00
sfraser%netscape.com
8028fc26e7 Adding NSPasteboard+Utils.h/mm
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130941 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 23:31:45 +00:00
sfraser%netscape.com
1d36bb3832 Adding license.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130940 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 23:30:57 +00:00
sfraser%netscape.com
02fe512ad4 Fix bug 162449 (make urls draggable to the dock), and refactor some URL pasteboard code into a category.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130939 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 23:30:04 +00:00
pinkerton%netscape.com
018573aa9e cleanup of unused identifiers
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130919 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 21:09:05 +00:00
pinkerton%netscape.com
9f7d478877 split pref panels into 2 groups
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130918 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 21:03:09 +00:00
pinkerton%netscape.com
55fa37f760 Added two new pref panels, webFeatures and Security. Shuffled some prefs
around between them to better align things


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130917 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 20:51:50 +00:00
pinkerton%netscape.com
357f9819e2 new webfeatures panel
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130916 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 20:48:30 +00:00
pinkerton%netscape.com
32df07f98e New security panel
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130915 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 20:47:08 +00:00
sfraser%netscape.com
770b32f7f1 Fix bug 170027 -- bad behaviour dragging to empty bookmarks toolbar.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130906 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 19:35:03 +00:00
sfraser%netscape.com
f3d9c13eb9 Fix bug 167446: crash using Info window after deleting bookmark. Also hooked the bookmarks toolbar context menu back up.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130904 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 19:30:59 +00:00
pinkerton%netscape.com
369fd1b4cc make "done" button default
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130903 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 19:09:58 +00:00
sfraser%netscape.com
5871de4806 Adding Localizable.strings for the Appearance pref pane.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130901 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 18:51:32 +00:00
pinkerton%netscape.com
49aff9a19c Properly stagger windows, even with multiple monitors (bug 153991)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130898 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 18:39:34 +00:00
sfraser%netscape.com
a7dcc54b2e Updating the font prefs panel to fix a number of font pref issues.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130896 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 18:34:27 +00:00
sfraser%netscape.com
9447dfcc29 Add new getLocalizedString method for prefs panels, which looks in the correct bundle.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130893 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 18:01:38 +00:00
pinkerton%netscape.com
84c4e0454d updated invalid cert dialog warning text.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130887 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 15:44:40 +00:00
pinkerton%netscape.com
e1d253230e don't purge typed and hidden urls that have been visited, they're from
a redirect. keep them around for the autocomplete result pool (bug 112208 and
159013)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130886 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 14:48:53 +00:00
brade%netscape.com
b454a2969c use selection color instead of inverting text for IME (r=mjudge, pinkerton); bug 170951
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130811 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-30 20:55:27 +00:00
brade%netscape.com
dc334619d8 fix a IME issue(s); especially those related to typing high-ascii characters (bug 162666); r=pinkerton
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130803 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-30 20:20:28 +00:00
pinkerton%netscape.com
e8f9813e5c fix signed/unsigned issues and keep things in range of [0, mMaxValue] when
going through UpdateContentPosition. r=sfraser (bug 153574)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130599 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-27 18:59:36 +00:00
pinkerton%netscape.com
a09cfeaf94 null check, fixes crash (bug 170371)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130587 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-27 15:08:19 +00:00
pinkerton%netscape.com
fb4003458b switching to main.mm
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130585 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-27 13:57:59 +00:00
pinkerton%netscape.com
fe576402e6 adding
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130584 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-27 13:57:12 +00:00
bnesse%netscape.com
04941d315b Fix for bug 154361. Set plugin cliprect correctly for cocoa. r=beard.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130531 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-26 21:18:40 +00:00
pinkerton%netscape.com
62c2f9d2ea fix flags on keychain panel to not be utility window
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130526 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-26 18:55:27 +00:00
sdagley%netscape.com
c9629c0ba7 Actually fix #170586 - LaunchServices under 10.1 seems to be unreliable when calling
LSGetApplicationForURL() so defer to IC prior to 10.2
 CVS: ----------------------------------------------------------------------


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130444 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-25 21:51:31 +00:00
pinkerton%netscape.com
50dcb5a5c6 Fix issue with alerts coming back as unattached sheet windows. Somehow they
were set to be utility windows, so i think an activate was causing them
to reappear after being hidden (they're not destroyed on close). Also
remove an unused outlet from 2 confirm alerts. (bug 170772)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130431 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-25 18:26:51 +00:00
pinkerton%netscape.com
07f29d0716 don't use selectRowAt: in onBlur to avoid showing then hiding popup
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130430 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-25 18:25:34 +00:00
pinkerton%netscape.com
669e3ec856 Only show "remember password" dialog when submitting the form that contains
the username/password fields. (bug 169828)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130428 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-25 16:57:48 +00:00
pinkerton%netscape.com
0aaffdffe0 don't wrap when scrolling off bottom in autocomplete (bug 170695)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130427 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-25 16:48:31 +00:00
pinkerton%netscape.com
f540ec1ded Fix more more issues with lingering autocomplete selection interfering with
typing (bug 170186)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130426 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-25 15:49:38 +00:00
sdagley%netscape.com
dc59dc0df3 Checking in changes for #159667 in the hope it'll fix #170586 (I'm running 10.2.1 and it WFM). partial
r=ccarlen
 CVS: ----------------------------------------------------------------------


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130406 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-25 04:47:35 +00:00
brade%netscape.com
67fa95db43 fix bug 151110 (again); pay attention to the length of "characters" for the key events since it can be 0 for dead keys; r=smfr
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130364 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-24 19:49:00 +00:00
pinkerton%netscape.com
c9ec5f2e8c Actually register chimera's components (bug 170530, 170528)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130357 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-24 17:02:39 +00:00
pinkerton%netscape.com
6c469c17a7 Now it even runs ;)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130276 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 20:01:37 +00:00
pinkerton%netscape.com
7f249070e7 Updating protocol names to match embed layer
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130269 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 19:24:00 +00:00
pinkerton%netscape.com
f73228920e More fixes
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130265 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 19:06:44 +00:00
pinkerton%netscape.com
c30363e120 Compiles w/out errors and registers components
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130264 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 19:06:39 +00:00
pinkerton%netscape.com
57c2de2ce7 Ok, well it builds ;)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130254 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 17:59:22 +00:00
pinkerton%netscape.com
55e6d83d3d More embed layer cleanup
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130253 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 17:59:06 +00:00
pinkerton%netscape.com
8a30afc501 removing old files
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130247 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 17:15:10 +00:00
pinkerton%netscape.com
ab1c5df311 Updating embedding layer
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130246 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 17:12:55 +00:00
pinkerton%netscape.com
0fe01bf029 *** empty log message ***
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130245 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 17:11:31 +00:00
pinkerton%netscape.com
0f9f47a7f0 Fixing issues with cocoa embed layer
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130244 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 17:11:02 +00:00
pinkerton%netscape.com
51959516bf Changed keychain dialog "cancel" text.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130242 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 15:14:34 +00:00
pinkerton%netscape.com
2e927d81fa Re-enable resizing of the window to make the drawer fit. also really fix 167641.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130241 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-23 14:57:57 +00:00
bnesse%netscape.com
5a70261fd5 Fix for bug 157157. Always use nsInputStreamTee objects for streaming plugin data. r=beard
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130155 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-20 17:04:25 +00:00
seawood%netscape.com
5c97461a8a Wrap chimera bits in Darwin ifdef.
Fixing linux tinderbox bustage


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130141 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-20 10:32:50 +00:00
seawood%netscape.com
587d2d1e84 Build chimera by default.
Bug #169517 r=pavlov


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130126 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-20 08:29:39 +00:00
pinkerton%netscape.com
148c46d0a7 use a better set of flags for saving files (bug 169683)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130059 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-19 18:20:18 +00:00
pinkerton%netscape.com
47a3a6e8ac Adding toolbar button for "add bookmark". Fixing webpages coming to front
when they finish loading and get activated. Fix crash in keychain code when
importing bookmarks. Clean up CHBrowserView's _webBrowser member use and
fix a potential issue with setWebBrowser:. (bug 169595, and probably a
few others).


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130058 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-19 18:14:24 +00:00
sdagley%netscape.com
3fcabcff9b Fix #167901 - use LaunchServices rather than InternetConfig to determine if a protocol handler is available
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130012 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-19 04:49:07 +00:00
pinkerton%netscape.com
4a84213d5b Added cmd-opt-H for "Hide others"
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129930 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-18 19:26:26 +00:00
sfraser%netscape.com
70dc83d243 Fix bug 160556. Implement various navigation commands here, so that we can map them to back and forward.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129840 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-17 23:26:28 +00:00
sfraser%netscape.com
860dd44de2 Part of fix for bug 160556: have nsChildView's doCommandBySelector calls its super, so that the command gets sent up the responder chain.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129839 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-17 23:25:05 +00:00
pinkerton%netscape.com
0e1db92624 Fix cocoa re-entrancy problem minimizing window with a sheet (bug 165883), restore sidebar to standard cocoa behavior (no longer resizes window; fixes 167641
among other things).


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129813 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-17 20:29:59 +00:00
pinkerton%netscape.com
5ac5bcc915 when window is going away, tear down the BWC immediately rather than
autoreleasing it. this stops all open net connections and halts gecko in
its tracks, so there's no chance of the window reappearing and giving cocoa
an event target. (bug 160922)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129794 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-17 14:56:39 +00:00
pinkerton%netscape.com
f2ce2cc057 Turn off drawing focus rings for Jaguar until bugs in DrawThemeButton in
CG contexts are fixed there. (bug 162482)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129792 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-17 14:18:15 +00:00
pinkerton%netscape.com
2fe31c1ac8 Put the keychain prefs here so they're on by default. (bug 169070)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129790 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-17 13:52:04 +00:00
pinkerton%netscape.com
a295925084 when hitting backspace, clear the autocomplete table selection so that it
doesn't get replaced when hitting return (bug 163811)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129743 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-16 20:22:55 +00:00
pinkerton%netscape.com
4ac0c83c71 subclassing the autocomplete text field to override paste: in order to strip
out control chars (bug 160132)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129717 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-16 17:14:27 +00:00
pinkerton%netscape.com
81d53db129 Add pref to enable/disable popup blocking at any time.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129715 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-16 16:41:18 +00:00
pinkerton%netscape.com
7df9d0d133 return screen.y in quickdraw coordinate system.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129710 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-16 15:17:19 +00:00
pinkerton%netscape.com
be605b8074 Made toolbar button strings localizable (bug 155932)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129708 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-16 14:51:48 +00:00
pinkerton%netscape.com
b08e679b11 Support for webloc and url files dragged to app icon (bug 167966)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129707 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-16 14:45:44 +00:00
pinkerton%netscape.com
bef6b2d3a2 Made build id selectable for pasting into bug reports.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129702 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-16 14:24:52 +00:00
pinkerton%netscape.com
06b95991ba Adding support to remember passwords via keychain (bug 152485)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129696 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-16 13:58:04 +00:00
sfraser%netscape.com
4324804e52 Really fix 154468: make sure we cleanly erase the bookmarks toolbar when hiding it.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129533 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 18:22:52 +00:00
bryner%netscape.com
bd1d166b5e Fixing bustage for real by checking in configure that matches configure.in.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129508 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 06:58:38 +00:00
sfraser%netscape.com
e7e0b97ab0 Adjust status bar size slightly.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129505 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 06:14:48 +00:00
sfraser%netscape.com
ede9a21e84 Push the status bar inside the BrowserContentView, so that the latter can handle its being hidden and shown. Also fix chromeless popup windows, so that they don't crash, and resize the browser area correctly.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129504 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 06:09:18 +00:00
sfraser%netscape.com
c2eef2c56b Re-fix bug 151344; discourage cocoa from coalescing dirty rects from the content and status bar.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129498 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 05:10:47 +00:00
sfraser%netscape.com
f258953010 New files for wrapper views.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129497 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 05:09:30 +00:00
sfraser%netscape.com
e7f250c2ec Improve the control of sizing of the bookmarks toolbar and browser tab views, both to fix cosmetic bugs (154468), and to make the code cleaner. I added a new view (BrowserContainerView) that wraps the BrowserTabView and handles its size and placement to hide tab widget shadows, and another new view that contains the bookmarks toolbar and BrowserContainerView, whose job it is to deal with the BM toolbar resizing, and consequent resizing of the BrowserContainerView. I also fixed bug 168059 in the process.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129496 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 04:51:45 +00:00
sfraser%netscape.com
3be2ba4703 Make sure that we always have a bookmarks manager, so that it can register for shutdown notifications.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129495 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 04:37:39 +00:00
sfraser%netscape.com
f1ce7a9d4f We were relying on the order in which various views got autoreleased to properly save bookmarks, and clean up, which was fragile. With these changes, CHBrowserService sends out two new notifications that listeners can use to save their data, and dispose of XPCOM data structures, before XPCOM termination.
This should fix some potential issues with crashing, or failure to save bookmarks, on quit.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129494 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 04:35:41 +00:00
sfraser%netscape.com
ca15db2c6e Add license, and clean up spacing.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129493 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 04:30:16 +00:00
sfraser%netscape.com
c503267751 Remove bogus NSLog
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129485 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 03:35:40 +00:00
sfraser%netscape.com
8548c55275 Fix for bugs 157635 and 153073 (if scrolling with a dirty region, just invalidate the entire widget). Also changed from scrolling the [self bounds] to the [self visibleRect], which fixes problems of scrolling turds when a part of the view is covered.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129484 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 03:34:42 +00:00
bryner%netscape.com
64616b27ed Fixing linux bustage.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129468 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-13 01:15:42 +00:00
bryner%netscape.com
6f194d824d Changes to make builds done on Mac OS 10.2 work on 10.1:
- Add a configure option, --enable-macos-target=<version>, defaulting to 10.1.
- Redefine FLT_ROUNDS to 1 in prdtoa.c and jsdtoa.c so that we don't reference a newly-introduced internal function.
- Don't check for strtok_r and localtime_r in configure if we're building for 10.1.

Bug 165602, r=cls.


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129445 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-12 23:28:33 +00:00
beard%netscape.com
011df3afcd Fix for bug #168064, crash when ~/Library/Logs doesn't exist. r=bnesse, sr=sfraser
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129406 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-12 20:18:55 +00:00
sdagley%netscape.com
75cc745c67 fix #168102 by falling back to Desktop Folder if we fail to get a Download Folder. Inferred r=ccarlen
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129301 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-12 04:07:41 +00:00
sfraser%netscape.com
c386ca6ec5 Leak fix, bug 166764
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129178 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-10 23:45:37 +00:00
sfraser%netscape.com
892979d5da Fix leaks in drawing bookmarks cell contents. Bug 166764.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129168 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-10 19:32:53 +00:00
sfraser%netscape.com
acd4f59863 Fix string usage.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129150 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-10 05:27:24 +00:00
sfraser%netscape.com
08df28d7af Fix memory leaks (bug 166764)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129147 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-10 05:05:18 +00:00
sfraser%netscape.com
85b7c10cef Memory leak fix (bug 166764)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129146 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-10 05:01:03 +00:00
sfraser%netscape.com
15a5b8d5ba Fix memory leak (bug 166764)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129145 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-10 04:53:15 +00:00
sfraser%netscape.com
b80caa216a Fix for bug 164741: use a load group for favicon requests, so that they can be cancelled en masse at quit time.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129131 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-10 01:00:21 +00:00
sfraser%netscape.com
09f97236c2 Fix bug 166203 (failure to import large bookmarks files). Deal with charset-induced reloads of the bookmarks.html file by waiting for a successful load before importing bookmarks.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129130 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-10 00:50:49 +00:00
sfraser%netscape.com
3a4b796401 When loading bookmarks.xml fails, save the failed load document (which contains information about where the failure occurred in the <parsererror> node) to "bookmarks_parse_error.xml". Bug 167625.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129129 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-10 00:48:26 +00:00
sfraser%netscape.com
910e2fec7a Updated release notes.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129107 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-09 19:52:55 +00:00
sfraser%netscape.com
d07a42bfee Updated readme and release notes files; moved Known Issues section into the Release notes, and added more generic stuff into the Readme.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129080 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-09 06:20:58 +00:00
sfraser%netscape.com
756b198837 Adding new files for the ReadMe, and Release Notes
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129077 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-09 03:32:22 +00:00
sfraser%netscape.com
58c509875e Update the Info and Feedback URLs to point to the chimera project page.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129029 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-07 02:19:00 +00:00
sfraser%netscape.com
60e291aa29 Update version number in localized info.plist strings file.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@129001 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-06 21:40:43 +00:00
ccarlen%netscape.com
fada38b792 Bug 166835 - InitWithNativePath crashes on 10.2 with extremely long paths. r=sfraser
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128908 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-05 21:16:08 +00:00
sfraser%netscape.com
b0051dab9f Fix the Info.plist URL types to be more like other browsers, in the hope that this will fix issues under 10.2 with Navigator not sticking as the default browser as set in the Internet prefs pane.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128891 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-05 19:07:51 +00:00
sfraser%netscape.com
ad10d31be5 Fix for bug 166747: don't crash on startup if the boomarks.xml file is malformed.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128858 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-05 01:30:03 +00:00
bryner%netscape.com
b96354f027 Copy xhtml11.dtd to res/dtd so that xhtml parsing works (bug 158222). Patch from hsivonen@niksula.hut.fi, r=bryner.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128857 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-05 01:23:00 +00:00
sfraser%netscape.com
6c83cd7015 Back out part of changes for optimizing status string drawing; no longer redraw 'onStatusChange' messages immeditately, as it hurts pageload performance.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128834 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-04 17:50:15 +00:00
sfraser%netscape.com
34f302814a Update version number to 0.5.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128779 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-04 00:06:53 +00:00
sfraser%netscape.com
f3bc8589a0 Update version numbers to 0.5, and rename SplashScreenWindow.m to SplashScreenWindow.mm.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128777 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-03 23:50:48 +00:00
sfraser%netscape.com
638e30bc05 Update the splash screen to show the version string, and build ID. Also fixing ugly old splash screen code.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128776 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-03 23:49:53 +00:00
sfraser%netscape.com
62ea48e843 Remove version number from splash screen, and compress the splash screen TIFF.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128749 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-03 22:39:48 +00:00
sfraser%netscape.com
c000726acb Fix bug 162755 -- crash when copying large amounts of text. Fix the length passed in to be a character count, not a byte count. r=bryner.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128737 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-03 21:53:45 +00:00
bryner%netscape.com
76d9a91b50 Don't run the prebinding script on 10.2, since the OS does it for us (bug 165803). r=sfraser.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128728 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-03 21:33:48 +00:00
sfraser%netscape.com
e841284696 Fix for bug 166437: back out the change to make the status text opaque, as it clobbers the shadow of the tab widget in the status bar, looking bad. Instead, do a 'displayIfNeeded' when the string changes.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128727 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-03 21:08:48 +00:00
bnesse%netscape.com
461ffea341 Arg. Backing out file that should not have landed.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128708 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-03 17:01:24 +00:00
bnesse%netscape.com
9cc3b7c367 Fix for bug 165507. Clean up code and fix leaking callback allocations. sr=beard.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128707 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-03 16:56:22 +00:00
bryner%netscape.com
07d5f6cfca Use -mdynamic-no-pic when building non-PIC code with gcc 3.1 on MacOS 10.2 (bug 165851). r=cls.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128612 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-31 04:36:54 +00:00
beard%netscape.com
286f319df0 Prepends plugin classes to the beginning of the boot class path, to fix part 2 of bug #164712. r=sdagley, sr=sfraser.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128519 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-30 02:38:00 +00:00
pinkerton%netscape.com
8b113ffe07 make status text area opaque so that cocoa doesn't make a bounding box
out of any dirty rects accumulated at the same time (such as a :hover
over a url). (bug 151344)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128492 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 22:05:49 +00:00
pinkerton%netscape.com
cf8e634b87 landed correction for BOM on jaguar when reading the utxt scrap flavor
(bug 165266)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128482 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 20:03:00 +00:00
pinkerton%netscape.com
0f88f1263b new icon
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128481 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 19:37:19 +00:00
pinkerton%netscape.com
bd40e8d0ad new icon to be hooked up later
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128480 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 18:19:14 +00:00
pinkerton%netscape.com
1e5dd73f6a Updated images from Ugo
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128479 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 18:16:23 +00:00
pinkerton%netscape.com
88bb5a7b1d update kathy
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128476 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 17:23:04 +00:00
brade%netscape.com
b261a3a568 initialize mSerializingOutput (bug 164917)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128460 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 13:45:00 +00:00
brade%netscape.com
cbc7a1ba2b improve cookie read performance (bug 164278)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128459 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 13:20:33 +00:00
sfraser%netscape.com
df65a0c56f Fix for bug 164924: turn off the binhex stream converter on Mac, where we want to leave BinHex decoding to helper apps that can set file types etc. Also enable the AppleSingle decoder. r=sdagley/bryner, sr=darin.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128443 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 07:41:26 +00:00
sfraser%netscape.com
a8a4ceb33f Fix bug 165227 by removing a 'delete' that was wrongly transferred from the trunk. r=bryner
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128441 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 07:05:23 +00:00
sfraser%netscape.com
383877e76e Some uriloader changes for bug 151047 that I missed last time; these should not affect code that's hit, until we turn on automatic helper app launching.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128419 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 02:57:11 +00:00
ccarlen%netscape.com
c3dec83c87 Bug 159350 - downloading fails when copying to location on other drive. This was originally fixed by the patch for bug 159987 but that change never made it to CHIMERA_M1_0_1_BRANCH r=sfraser
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128405 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 00:41:27 +00:00
sfraser%netscape.com
b5eb2395e1 Tweak to the fix for bug 164936: don't try to clone bookmark folders on option-drag, until we can do a deep copy.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128401 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-28 23:55:53 +00:00
sfraser%netscape.com
edf3333710 Fix bug 164936 -- fix dragging items in the bookmarks sidebar and the bookmarks toolbar to move them, not copy them, unless the option key is held down.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128399 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-28 23:35:06 +00:00
bnesse%netscape.com
a3b4e056ab Fix for bug 164925. Not loading plugins from the application directory. r=ccarlen.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128386 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-28 21:30:30 +00:00
sfraser%netscape.com
13eafd9d01 Fix for bug 164917; download dialog stays open after Save As HTML complete. We didn't set up the flags on the nsIWebBrowserPersist.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128382 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-28 21:09:42 +00:00
bryner%netscape.com
cafe687399 Bug 160158 - select popup won't select correct item. Change the code to not use the content ID as a unique identifier for option elements since it's always 0 for dynamically inserted options. Instead, just stuff the content pointer into the menu item tag. r=pink.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128294 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 21:56:27 +00:00
brade%netscape.com
4dc8f7b3c8 carryover memory leak fix from trunk (bug 145153)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128259 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 14:29:07 +00:00
brade%netscape.com
99e26e3587 carryover memory leak fix from trunk
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128258 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 14:27:24 +00:00
brade%netscape.com
0f48a30ed9 carryover memory leak fix from trunk (bug 140150)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128257 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 14:23:36 +00:00
brade%netscape.com
46d3c09165 carry over memory leak fix from the trunk (bug 159053)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128256 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 14:20:45 +00:00
brade%netscape.com
84b4e0d82d #ifdef around printfs, carryover memory leak fix from trunk (bug 164276)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128254 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 14:06:09 +00:00
sfraser%netscape.com
3d38278b12 Temporarily turn off favicon loading for bookmarks to work around a couple of nasty issues. If you want favicons in bookmarks, set the "browser.chrome.favicons" pref to 'true' in your prefs.js file.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128235 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 05:18:51 +00:00
sdagley%netscape.com
2c7cc1630c Fix #164103 - scroll wheel sanity for Mac OS X 10.2. r=beard
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128234 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 05:11:27 +00:00
beard%netscape.com
e0047c6711 fix for bug #160433
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128231 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 04:41:11 +00:00
sfraser%netscape.com
43a6e5310a Bug 151047: changes for single-click helper app launching (disabled for now). patch by sdagley.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128209 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 02:40:22 +00:00
sfraser%netscape.com
5d6dc874d0 Fix bug 153970: the bookmarks toolbar layout code was broken, causing toolbar bookmarks to disappear on window resize.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128207 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 02:23:21 +00:00
sfraser%netscape.com
3b02b9584b Fix bug 164738: option-drag should clone bookmarks, not move them.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128204 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 02:05:25 +00:00
sfraser%netscape.com
d8b58a2c54 Allow dragging of bookmark toolbar items to the trash. Also fixed the code that lays out buttons to correctly size the toolbar.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128195 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 01:23:13 +00:00
sfraser%netscape.com
6d3f0f8f65 Implement drag and drop of items on bookmarks toolbar. Also fix drop feedback when dragging an item over itself. Bugs 156977, 153945.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128187 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-26 23:50:56 +00:00
pinkerton%netscape.com
7dafa0b809 fix leak when picking cancel in prompt dialogs (bug 163916)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128177 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-26 22:47:48 +00:00
pinkerton%netscape.com
475d6f9f9b move code for showing/hiding progress meter into the BWC so we don't
lose track of the superview in the wrapper. (bug 157033)


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128175 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-26 22:29:55 +00:00
pinkerton%netscape.com
03667e3130 make strings scrolled instead of wrap (bug 163535)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128155 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-26 20:51:48 +00:00
sfraser%netscape.com
19a7bdf595 Move NSBezierPath+Utils to a new file.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128140 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-26 20:11:32 +00:00
sfraser%netscape.com
6dcce95c8c Move NSBezierPath+Utils into a new file.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128137 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-26 20:07:30 +00:00
sfraser%netscape.com
27ee899c75 Hook up shift-reload, bug 164659.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128126 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-26 18:11:15 +00:00
bryner%netscape.com
ab6b49449f Remove incorrect comment.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128029 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-24 01:54:32 +00:00
bryner%netscape.com
02e80aabbb More bustage fixing.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128028 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-24 01:47:36 +00:00
bryner%netscape.com
c29372566a Fixing bustage.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128026 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-24 01:24:58 +00:00
bryner%netscape.com
69ea31679c Restrict access to non-XBL anonymous content (bug 164086 and 163598). Patch by jkeiser, r=sicking, sr=bryner.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128014 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 23:50:07 +00:00
bryner%netscape.com
cc9497adf4 Make MachO mac build use Mac locale code (bug 158266). r=pinkerton, sr=sfraser.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128007 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 23:16:38 +00:00
bryner%netscape.com
9612ad98ae Restrict access to non-XBL anonymous content (bug 164086 and 163598). Patch by jkeiser, r=sicking, sr=me.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128005 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 23:10:23 +00:00
bryner%netscape.com
0d1df09d12 bug 162239 - POST document could not inherit charset from previous page if the previous charset is from autodetection. Add PrevDocCharset field and use it for POST document charset resolution. Patch by shanjian, r=ftang, darin, sr=jst.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128001 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 22:57:13 +00:00
bryner%netscape.com
6a22790358 Wrap a pref around the fix for bug 154930 and default to the old behavior in 1.0. Patch by dveditz, r=syd, sr=jst. (see also evangelism bug 160339)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127999 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 22:51:02 +00:00
pinkerton%netscape.com
f73d34998b Force us to use the universal charset detector (bug 162851)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127991 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 21:41:46 +00:00
pinkerton%netscape.com
5a0c1c18cc turn on universal charset detection (bug 162851)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127984 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 20:51:07 +00:00
bnesse%netscape.com
60fb5e6636 workaround fix for bug #154699, clear java exceptions on startup. Patch by beard, r=sdagley, sr=bryner.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127960 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 17:54:46 +00:00
sfraser%netscape.com
5ecb578a47 Fix bug 164190 (which in turn helps fix bug 163543); don't try to get the parent from an nsILocalFile which has been deleted. r=conrad, sr=alecf
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127925 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 05:47:02 +00:00
sfraser%netscape.com
265a9c6627 Part of fix for bug 163543 (prefs not saved between sessions): fix FSCopyObject to take a destination file name. patch by ccarlen, r=sfraser/pinkerton.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127924 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 05:37:19 +00:00
sfraser%netscape.com
9ebc8ac9d3 Part of fix for bug 163543 (prefs not saved between sessions): fix FSCopyObject to take a destination file name, and don't update the mFSRef of the nsLocalFile when making a copy. r=ccarlen/pinkerton.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127923 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 05:34:40 +00:00
sfraser%netscape.com
1ce90c0435 Check out mozilla/chimera from the CHIMERA_M1_0_1_BRANCH
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127906 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-22 23:22:24 +00:00
(no author)
9809b53f97 This commit was manufactured by cvs2svn to create branch
'CHIMERA_M1_0_1_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127844 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-22 06:09:57 +00:00
brade%netscape.com
30742c41f9 use calloc instead of malloc/memset 0; bug 163472; r=Roland.Mainz@informatik.med
.uni-giessen.de, sr=darin


git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127774 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-21 13:17:01 +00:00
brade%netscape.com
fb77819715 clean up some NSLogs, remove memory leak of RgnHandle (bug 163661); r=smfr,pink
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127770 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-21 12:59:09 +00:00
brade%netscape.com
d4e45e8f0e keep a region around to prevent memleak; r=pink/smfr (bug 163661)
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127769 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-21 12:58:11 +00:00
bryner%netscape.com
ae8789c009 Whitespace change to force tinderbox to rebuild nspr.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127482 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-16 18:20:34 +00:00
bryner%netscape.com
3bf85bb709 Sync Chimera changes with CHIMERA_M1_0_1_BRANCH (bug 161668). In addition to landing all the Chimera-specific changes here, I'm creating a new chimera.js file with our Chimera-specific prefs (and moving them out of all.js). r=brade.
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127478 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-16 17:35:52 +00:00
mcafee%netscape.com
f7e21fb706 checking in the rest of the client.mk change from my previous checkin (161668).
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127330 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-15 00:52:59 +00:00
mcafee%netscape.com
ecbc236386 Checking in branch tag for the branch (161668). r/a=bryner
git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127325 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-15 00:34:27 +00:00
(no author)
ae5b8f8645 This commit was manufactured by cvs2svn to create branch
'CHIMERA_M1_0_1_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@127271 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-14 19:37:41 +00:00
25046 changed files with 24 additions and 6217630 deletions

View File

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

View File

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

View File

@@ -1,399 +0,0 @@
#
# 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
install::
ifndef MOZ_NATIVE_NSPR
$(MAKE) -C nsprpub real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/nspr
$(RM) -f $(addprefix $(DESTDIR)$(mozappdir)/$(LIB_PREFIX), $(addsuffix .$(LIB_SUFFIX), nspr4 plds4 plc4))
$(RM) -f $(addprefix $(DESTDIR)$(bindir)/,nspr-config compile-et.pl prerr.properties)
endif
ifdef MOZ_LDAP_XPCOM
$(MAKE) -C directory/c-sdk real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/ldap
endif
endif
include $(topsrcdir)/config/rules.mk
ifeq ($(BUILD_MODULES),all)
# Clean up after psuedo-external modules
clean clobber realclean clobber_all distclean::
ifndef MOZ_NATIVE_NSPR
$(MAKE) -C nsprpub $@
endif
ifdef MOZ_LDAP_XPCOM
$(MAKE) -C directory/c-sdk $@
endif
endif
tier_%:
@echo "$@: $($@_dirs)"
@$(EXIT_ON_ERROR) \
for d in $($@_dirs); do $(UPDATE_TITLE) \
$(MAKE) -C $$d export; \
done ; \
$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include ;\
for d in $($@_dirs); do $(UPDATE_TITLE) \
$(MAKE) -C $$d libs; \
done
#
# Individual modules
#
boehm:
ifdef GC_LEAK_DETECTOR
$(MAKE) -C gc/boehm
endif
nspr: boehm
ifndef MOZ_NATIVE_NSPR
$(MAKE) -C nsprpub
endif
ldap:
ifdef MOZ_LDAP_XPCOM
$(MAKE) -C directory/c-sdk
endif
freetype:
ifdef MOZ_ENABLE_XFT
ifndef MOZ_XFT_SYSTEM_FREETYPE2
$(MAKE) -C other-licenses/freetype
$(MAKE) -C other-licenses/freetype install
endif
endif
expat:
ifdef MOZ_ENABLE_XFT
$(MAKE) -C other-licenses/expat
$(MAKE) -C other-licenses/expat install
endif
# For modules.mk standalone build
export::
+$(LOOP_OVER_EXPORT_DIRS)
export::
@$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include
distclean::
cat unallmakefiles | $(XARGS) rm -f
rm -f unallmakefiles $(DIST_GARBAGE)
ifeq ($(OS_ARCH),WINNT)
rebase:
ifdef MOZILLA_OFFICIAL
echo rebasing $(DIST)
/bin/find $(DIST) -name "*.dll" > rebase.lst
rebase -b 60000000 -R . -G rebase.lst
rm rebase.lst
endif
splitsymbols:
ifdef MOZILLA_OFFICIAL
echo splitting symbols out of binaries
/bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
/bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
/bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
endif # MOZILLA_OFFICIAL
deliver: splitsymbols rebase
endif # WINNT
# Temporary hack for NSS 3.4 landing (bug 116334, wtc@netscape.com)
ifdef MOZ_PSM
ifdef COMPILER_DEPEND
depend::
$(MAKE) -C security/manager depend
endif
endif

View File

@@ -1,325 +0,0 @@
==============================================================
= = = = = = = = = = Mozilla Read Me = = = = = = = = = = =
==============================================================
Mozilla is subject to the terms detailed in the license
agreement accompanying it.
This Read Me file contains information about system
requirements and installation instructions for the Windows,
Mac OS, and Linux builds of Mozilla.
For more info on Mozilla, see www.mozilla.org. To submit bugs
or other feedback, see the Navigator QA menu and check out
Bugzilla at http://bugzilla.mozilla.org for links to known
bugs, bug-writing guidelines, and more. You can also get help
with Bugzilla by pointing your IRC client to #mozillazine
at irc.mozilla.org.
==============================================================
Getting Mozilla
==============================================================
You can download nightly builds of Mozilla from the
Mozilla.org FTP site at
ftp://ftp.mozilla.org/pub/mozilla/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

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

View File

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

View File

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

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

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

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

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

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

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

View File

@@ -1,43 +0,0 @@
#
# 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)
include $(topsrcdir)/config/rules.mk

View File

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

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

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

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

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

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

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

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

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

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

View File

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

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

View File

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

View File

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

@@ -1,69 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,168 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,425 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,148 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,226 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,93 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,242 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,67 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,684 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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, nsIWebProgress::NOTIFY_LOCATION |
nsIWebProgress::NOTIFY_STATE_DOCUMENT);
}
}
}
NS_ASSERTION(mWebProgress, "Could not get nsIWebProgress for nsRootAccessible");
}
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, PRUint32 aStateFlags, nsresult 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)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
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)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
return NS_OK;
}
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */
NS_IMETHODIMP nsRootAccessible::OnSecurityChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRUint32 state)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
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

@@ -1,156 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

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

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

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

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

@@ -1,169 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,446 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,113 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,205 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,101 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,205 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,79 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,55 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

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

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

@@ -1,101 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,64 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,51 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,54 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

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

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

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

@@ -1,130 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,63 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,566 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,136 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,264 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,87 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

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

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

@@ -1,211 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,99 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,62 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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

@@ -1,55 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the 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
View File

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

File diff suppressed because it is too large Load Diff

View File

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

@@ -1,179 +0,0 @@
#! /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

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

@@ -1,54 +0,0 @@
#!/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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

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

@@ -1,191 +0,0 @@
# 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
])

View File

@@ -1,119 +0,0 @@
#!/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

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

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

@@ -1,280 +0,0 @@
#! /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

@@ -1,85 +0,0 @@
#!/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

@@ -1,46 +0,0 @@
#! /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

@@ -1,94 +0,0 @@
#! /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

@@ -1,70 +0,0 @@
#! /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

@@ -1,99 +0,0 @@
#! /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

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

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