Compare commits
2005 Commits
less_stati
...
ALERT_SERV
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d633e9c9c6 | ||
|
|
0391dbe928 | ||
|
|
05b3a7f99b | ||
|
|
3fe14b0510 | ||
|
|
218f723f40 | ||
|
|
282fc2ff6b | ||
|
|
edfd631be9 | ||
|
|
3c61b4556a | ||
|
|
367e478e43 | ||
|
|
d0df836477 | ||
|
|
cf82e3dac3 | ||
|
|
86429be7f9 | ||
|
|
5876ce510a | ||
|
|
d9937a7919 | ||
|
|
c28762ea40 | ||
|
|
293a25a28e | ||
|
|
a6599291f9 | ||
|
|
9ef680360c | ||
|
|
3926d23e55 | ||
|
|
1b9bffd8f4 | ||
|
|
aa2f61dcff | ||
|
|
c18ca5a7ca | ||
|
|
5e83b361f7 | ||
|
|
2a425e2e8c | ||
|
|
0368f6be71 | ||
|
|
3486261dc7 | ||
|
|
b9641e3283 | ||
|
|
45a3d537f9 | ||
|
|
39ea3b99cc | ||
|
|
27a18709b5 | ||
|
|
bd50ec16c8 | ||
|
|
be436b64ef | ||
|
|
9f8c6c28ce | ||
|
|
20e1fc7409 | ||
|
|
a970af6da5 | ||
|
|
807988509b | ||
|
|
792f53e71f | ||
|
|
da4f50af96 | ||
|
|
864a511d11 | ||
|
|
6d3a196e3e | ||
|
|
2c670cd977 | ||
|
|
c64ced63d8 | ||
|
|
2e58797523 | ||
|
|
e801d86d86 | ||
|
|
344465fc39 | ||
|
|
4fa3a782f7 | ||
|
|
30e843bc8f | ||
|
|
fefb97b01b | ||
|
|
46fc58c873 | ||
|
|
44621b8969 | ||
|
|
f6e9cc6ac0 | ||
|
|
89e7c1812f | ||
|
|
0cb2dcd84e | ||
|
|
088aa198db | ||
|
|
471e4f2c63 | ||
|
|
813a48bf6b | ||
|
|
a8a7919ed6 | ||
|
|
957108dff1 | ||
|
|
7ae7bdcccc | ||
|
|
4dcda01e26 | ||
|
|
ed8ed010cb | ||
|
|
0f371858b3 | ||
|
|
40edf590ec | ||
|
|
3bbeb5cb64 | ||
|
|
4e818534f4 | ||
|
|
7064a564ac | ||
|
|
2a60f88162 | ||
|
|
0c4cdf1906 | ||
|
|
54c9882aff | ||
|
|
ded7d2bc59 | ||
|
|
6a28a5e882 | ||
|
|
a488b9c029 | ||
|
|
2b80c5ed0b | ||
|
|
0a6f86bc0a | ||
|
|
ff68fadfec | ||
|
|
beca771403 | ||
|
|
13aa0b3295 | ||
|
|
9851bfde7a | ||
|
|
4cd9a846e9 | ||
|
|
fc7aaabd6d | ||
|
|
d8f58724e7 | ||
|
|
04849998e1 | ||
|
|
d6d2d2537e | ||
|
|
48079dabad | ||
|
|
884ceb2a0e | ||
|
|
39264b68bf | ||
|
|
32fbf8f488 | ||
|
|
d9d7d97feb | ||
|
|
759f2423b1 | ||
|
|
2e601a2947 | ||
|
|
75401be452 | ||
|
|
482e8bd78a | ||
|
|
33faee2a61 | ||
|
|
548b1ac6fd | ||
|
|
c6b3d5be1b | ||
|
|
56ec9679a0 | ||
|
|
7a7d9d1e31 | ||
|
|
21da9e2293 | ||
|
|
23078fbff6 | ||
|
|
343767e274 | ||
|
|
ac1356834f | ||
|
|
cbc75c453c | ||
|
|
b6f6295e04 | ||
|
|
a97cad95f6 | ||
|
|
449d62f723 | ||
|
|
d622bbb81b | ||
|
|
975fab18ab | ||
|
|
c42edc81c4 | ||
|
|
356be46c7f | ||
|
|
9bc13c9d4d | ||
|
|
f5b948c4a3 | ||
|
|
dbbaca3fdc | ||
|
|
a7f45cbbc0 | ||
|
|
74d223827d | ||
|
|
8cc792af65 | ||
|
|
8f0d4d308a | ||
|
|
c86b17dd93 | ||
|
|
e4e276a45d | ||
|
|
bd85994ddb | ||
|
|
89a7434272 | ||
|
|
309350a2eb | ||
|
|
b74c4c76b4 | ||
|
|
209436a3b7 | ||
|
|
2d0f1e8673 | ||
|
|
aa1acbaf75 | ||
|
|
7455592a09 | ||
|
|
8064f3d51b | ||
|
|
0be147b295 | ||
|
|
c167d985d2 | ||
|
|
7d2a89ccdf | ||
|
|
e7204779bb | ||
|
|
b1a2c74e4e | ||
|
|
7ed7837311 | ||
|
|
6251eec470 | ||
|
|
0b6bc8a53a | ||
|
|
970eee3834 | ||
|
|
374a98ef8e | ||
|
|
3a85aaa3ab | ||
|
|
2b5f274a6e | ||
|
|
3d14baef0e | ||
|
|
f5b9dd1387 | ||
|
|
8686403dcc | ||
|
|
b9be6f3f0d | ||
|
|
392f726bc8 | ||
|
|
c164f1d423 | ||
|
|
baccc58329 | ||
|
|
842c743bf4 | ||
|
|
2a228664fb | ||
|
|
caad416afb | ||
|
|
0eba97f2d5 | ||
|
|
fb3f17d7c5 | ||
|
|
8987693613 | ||
|
|
8c163d43e8 | ||
|
|
18dc83df05 | ||
|
|
6275d4e963 | ||
|
|
546db633a3 | ||
|
|
9d0f870c8d | ||
|
|
3995ddd6d7 | ||
|
|
594dd0831d | ||
|
|
37739bf3ee | ||
|
|
4c3bac27cf | ||
|
|
a570ccd75e | ||
|
|
86e8e64c75 | ||
|
|
4291f1c62c | ||
|
|
31a9a10375 | ||
|
|
b11bfd6fd7 | ||
|
|
e952c115b4 | ||
|
|
73f333fde8 | ||
|
|
32f1457ac2 | ||
|
|
829c3195fd | ||
|
|
dd14f825fd | ||
|
|
86520ae750 | ||
|
|
240e36124f | ||
|
|
fc3818e9a4 | ||
|
|
8d3b264218 | ||
|
|
69252ef472 | ||
|
|
0913674a48 | ||
|
|
1dce016ad7 | ||
|
|
e27fdb2ae7 | ||
|
|
0b13a489ca | ||
|
|
94dd36abc6 | ||
|
|
4ff0a278ea | ||
|
|
c183c918a2 | ||
|
|
ae90796cb3 | ||
|
|
2eb36945dd | ||
|
|
87fe569783 | ||
|
|
9872daecf4 | ||
|
|
2afa8c034c | ||
|
|
3521650380 | ||
|
|
1d87933ca2 | ||
|
|
299eed4101 | ||
|
|
db1df18b6a | ||
|
|
ff5a46b4db | ||
|
|
9ad4829ba0 | ||
|
|
74294097f4 | ||
|
|
9c1844d8ef | ||
|
|
ee9b3af8ec | ||
|
|
0d64fabaf3 | ||
|
|
73c4c0f1f8 | ||
|
|
44bb02b969 | ||
|
|
455c4d4a53 | ||
|
|
0782aaaef5 | ||
|
|
c0f66ed4ef | ||
|
|
72f3a4d5bc | ||
|
|
a7f05811c3 | ||
|
|
9973d07f16 | ||
|
|
c214055773 | ||
|
|
196d2c3384 | ||
|
|
d8dae82dd4 | ||
|
|
509c6a36ee | ||
|
|
e4202d7a3e | ||
|
|
15f5739ec9 | ||
|
|
3517522f22 | ||
|
|
a9a015ddaf | ||
|
|
8755908f04 | ||
|
|
b17d04a4f2 | ||
|
|
de9260d595 | ||
|
|
0c5698d9bf | ||
|
|
b05500f1e0 | ||
|
|
dcff08de8b | ||
|
|
c941d6aacc | ||
|
|
a009cfd31f | ||
|
|
33cc392ebb | ||
|
|
9a5ed94d7e | ||
|
|
fb585f901e | ||
|
|
b0ca435145 | ||
|
|
21da91d3b3 | ||
|
|
e82ef1f2a4 | ||
|
|
6d33096b28 | ||
|
|
0fd4de720c | ||
|
|
c6c1bc65dc | ||
|
|
e5ac95f0ec | ||
|
|
a32de30fd5 | ||
|
|
8149c8bc80 | ||
|
|
d9ee124943 | ||
|
|
529085615c | ||
|
|
9b34093905 | ||
|
|
58d6918fd6 | ||
|
|
65023cbef8 | ||
|
|
1f814ad3ce | ||
|
|
013dbec8be | ||
|
|
e2a6e67a74 | ||
|
|
b21da840a7 | ||
|
|
eb8288419b | ||
|
|
ac9c06750c | ||
|
|
3277ea7abb | ||
|
|
cdbfcb8846 | ||
|
|
bcd434bb05 | ||
|
|
192e083099 | ||
|
|
d20f3f5ea5 | ||
|
|
aa01255798 | ||
|
|
b5d7c30d5b | ||
|
|
ff160c220d | ||
|
|
f1f88d6ea7 | ||
|
|
0114c269f9 | ||
|
|
6aaceba52a | ||
|
|
8ee37f1a4f | ||
|
|
43dca94a2e | ||
|
|
880634a0ce | ||
|
|
b19cc226e6 | ||
|
|
af01c27e5a | ||
|
|
52fa0a2506 | ||
|
|
035b12c4cf | ||
|
|
b503102b3d | ||
|
|
6917b74a2e | ||
|
|
610f6ff57d | ||
|
|
6cd8bbc150 | ||
|
|
dbc7acf404 | ||
|
|
9c7e23ae29 | ||
|
|
fbff40cd74 | ||
|
|
b37e8b5854 | ||
|
|
a2de7f9311 | ||
|
|
2baa8d30af | ||
|
|
4816045c3f | ||
|
|
8247777570 | ||
|
|
cb8bee44c1 | ||
|
|
963700aadd | ||
|
|
07afd54c5f | ||
|
|
2522cdd3e3 | ||
|
|
e2ef0ce9e8 | ||
|
|
402dfd533d | ||
|
|
7d59ac43e4 | ||
|
|
52b48ed244 | ||
|
|
4c13063475 | ||
|
|
76d47b021c | ||
|
|
f5fdf12415 | ||
|
|
6ef2ae37f0 | ||
|
|
d16a2c3b7c | ||
|
|
7f327f1aa9 | ||
|
|
8f20158796 | ||
|
|
60ce101e44 | ||
|
|
20c3675c43 | ||
|
|
5c323b2bf0 | ||
|
|
00d0cd98ea | ||
|
|
370c15e2c8 | ||
|
|
ff5acec16d | ||
|
|
441a3172dd | ||
|
|
e77f26b222 | ||
|
|
cd677c6d65 | ||
|
|
95be2734e2 | ||
|
|
02e68e1d98 | ||
|
|
3bf5790c95 | ||
|
|
471c345a82 | ||
|
|
88e73ded84 | ||
|
|
67617b3e3e | ||
|
|
69846e6d74 | ||
|
|
104ab33335 | ||
|
|
1bd627dc7c | ||
|
|
4ec04895f7 | ||
|
|
f9bfe150f7 | ||
|
|
2e9ea9efce | ||
|
|
c30bfac365 | ||
|
|
4d3af7b911 | ||
|
|
d33de75519 | ||
|
|
0e56cc4e71 | ||
|
|
e8fb2c3384 | ||
|
|
c5a7516615 | ||
|
|
7d3627e07b | ||
|
|
4e577a0798 | ||
|
|
2a1cd564be | ||
|
|
1e9d342ebe | ||
|
|
692cbbfaac | ||
|
|
77f0b9ab02 | ||
|
|
c3fc5f0fb5 | ||
|
|
a4a11ae91d | ||
|
|
721fea3535 | ||
|
|
ab4f551df5 | ||
|
|
568795168b | ||
|
|
490f3e947f | ||
|
|
6fcdea4df3 | ||
|
|
7bee9d2667 | ||
|
|
0306556cc3 | ||
|
|
93ee0059c5 | ||
|
|
9fd5ab8a9b | ||
|
|
36b644d370 | ||
|
|
13aec58b3b | ||
|
|
1d15e09d55 | ||
|
|
dc70a490b5 | ||
|
|
a72d288b1a | ||
|
|
3d69a522d5 | ||
|
|
6cc73ab3e6 | ||
|
|
8701e27250 | ||
|
|
9d9d7f0421 | ||
|
|
fef881bb92 | ||
|
|
479c37d192 | ||
|
|
fb65be4af3 | ||
|
|
854e42c594 | ||
|
|
844a7715e3 | ||
|
|
fe833d390b | ||
|
|
c32accad45 | ||
|
|
adc53c0103 | ||
|
|
a15d7e5b23 | ||
|
|
1d7f092dc2 | ||
|
|
d463321358 | ||
|
|
b7c25d95a7 | ||
|
|
27e272068d | ||
|
|
cf51ffc0bc | ||
|
|
df5dcd1798 | ||
|
|
e1a2bc2fe4 | ||
|
|
e2311b3c25 | ||
|
|
4de1fca0c2 | ||
|
|
adaa84d070 | ||
|
|
909c8ae3f4 | ||
|
|
db960d1dce | ||
|
|
c257f09d8a | ||
|
|
0d1e5c8014 | ||
|
|
034a317c33 | ||
|
|
e0534d95e1 | ||
|
|
a0bfcec93b | ||
|
|
64e009df7b | ||
|
|
7a9a29e46c | ||
|
|
86c9042fd1 | ||
|
|
ceae945ef2 | ||
|
|
8fa9272d6f | ||
|
|
5fd1019b70 | ||
|
|
f5dcb16a4d | ||
|
|
1daa551aa1 | ||
|
|
2ce0acd912 | ||
|
|
4d292871d6 | ||
|
|
abf938de72 | ||
|
|
a446ec6523 | ||
|
|
694dd0619b | ||
|
|
4c33c446dc | ||
|
|
522f17a6a3 | ||
|
|
93de6465b2 | ||
|
|
57dc09386a | ||
|
|
b2eb75e1c1 | ||
|
|
6ed0398082 | ||
|
|
c7d3cfd4eb | ||
|
|
fb88c1c256 | ||
|
|
ab8ef802d5 | ||
|
|
4c412642a0 | ||
|
|
d9f66c585b | ||
|
|
8a71c22a7d | ||
|
|
83a2d3351f | ||
|
|
1ba1069e60 | ||
|
|
85686b425c | ||
|
|
e86ba7ca20 | ||
|
|
7e4cc26c7b | ||
|
|
a4ebf6625d | ||
|
|
0b57d4aa2f | ||
|
|
640add85a6 | ||
|
|
9cc420a417 | ||
|
|
eb210e0f11 | ||
|
|
cd3608bd1c | ||
|
|
3711f08f77 | ||
|
|
2ebf6ced5f | ||
|
|
9e23424495 | ||
|
|
693a145d66 | ||
|
|
9915882306 | ||
|
|
89fd8b91ad | ||
|
|
af3483a885 | ||
|
|
ddc4e56e6d | ||
|
|
a81db5e449 | ||
|
|
5aa10f8236 | ||
|
|
ed3713311b | ||
|
|
0af279e6fb | ||
|
|
d99d81c2f3 | ||
|
|
fde0bdcdaa | ||
|
|
c2fbab4ccf | ||
|
|
ad1315f3be | ||
|
|
99b8dde3e1 | ||
|
|
7c7e7b9c1e | ||
|
|
4b4d43644c | ||
|
|
e63f7c5f2c | ||
|
|
3fa24b0448 | ||
|
|
0af0b9cffe | ||
|
|
2bc4e3cbf3 | ||
|
|
6eec4a407f | ||
|
|
0f6124893c | ||
|
|
f0d879b4c3 | ||
|
|
e608138d48 | ||
|
|
cfb03c182f | ||
|
|
0bebb95ceb | ||
|
|
25727f6104 | ||
|
|
513b02ab47 | ||
|
|
a50077091c | ||
|
|
9c658700c1 | ||
|
|
e53617a1dc | ||
|
|
6e385fd8ea | ||
|
|
37b88b6c8b | ||
|
|
f9602bf1b6 | ||
|
|
81f96700be | ||
|
|
034250f695 | ||
|
|
cc630ddcfb | ||
|
|
2de3f624f6 | ||
|
|
53c3ffa4c8 | ||
|
|
99f53a6a0f | ||
|
|
2242c38798 | ||
|
|
9dcf52c85b | ||
|
|
102fd63c1f | ||
|
|
21b412d3f3 | ||
|
|
ad9eb15021 | ||
|
|
2da9c0987b | ||
|
|
f190fa25b0 | ||
|
|
3082e46795 | ||
|
|
4be5190aa4 | ||
|
|
c4499c97cc | ||
|
|
011459ed64 | ||
|
|
3ab0c59a74 | ||
|
|
67ee301f6b | ||
|
|
bfb475b6c9 | ||
|
|
1e75bfc90c | ||
|
|
289a9859cd | ||
|
|
63eb66a2a3 | ||
|
|
ee50e62257 | ||
|
|
a2411d6068 | ||
|
|
185ed3d0f6 | ||
|
|
1ce1f61b7f | ||
|
|
4073594551 | ||
|
|
c8a065c248 | ||
|
|
dd9621d65e | ||
|
|
5314fb0a2c | ||
|
|
2d6732e6d1 | ||
|
|
8852fa5c75 | ||
|
|
147f64f4c1 | ||
|
|
c99b277334 | ||
|
|
df64ab2a97 | ||
|
|
ee7e1ff729 | ||
|
|
ace4e0564e | ||
|
|
f922d593e8 | ||
|
|
977eb67d39 | ||
|
|
498b19f4ab | ||
|
|
2fd301c4bb | ||
|
|
bfa7065961 | ||
|
|
0e2f0b5e4e | ||
|
|
04ea03f366 | ||
|
|
2352f5115a | ||
|
|
865e375f71 | ||
|
|
5a450351db | ||
|
|
f900c9c17f | ||
|
|
1face598cb | ||
|
|
571105f5e4 | ||
|
|
cc572f4f37 | ||
|
|
741acbe78c | ||
|
|
af78329b48 | ||
|
|
fa97833f1a | ||
|
|
79d21ca38c | ||
|
|
2aa120d0a6 | ||
|
|
369c443ee4 | ||
|
|
6340080d47 | ||
|
|
76f9a42d49 | ||
|
|
c559d9bfe0 | ||
|
|
dd5e460b0a | ||
|
|
2f3145cf0a | ||
|
|
5f66144291 | ||
|
|
48fe96650e | ||
|
|
118ad3c9f7 | ||
|
|
f59867d4df | ||
|
|
07186d47ad | ||
|
|
c1929b9f84 | ||
|
|
e7b9cff695 | ||
|
|
e62e6a70bc | ||
|
|
c799026c85 | ||
|
|
b1cc9ed8d8 | ||
|
|
048b0ea1fa | ||
|
|
750e632d11 | ||
|
|
f95a59f3df | ||
|
|
ffa1f91d62 | ||
|
|
83898a9eec | ||
|
|
984dbd651c | ||
|
|
34a29da01f | ||
|
|
b95b10fb11 | ||
|
|
76df730fa8 | ||
|
|
f676f2064e | ||
|
|
d92656f385 | ||
|
|
5eb1f5725e | ||
|
|
17d7a075a5 | ||
|
|
f5dd00cd56 | ||
|
|
99e158ca1d | ||
|
|
b73e7e29c0 | ||
|
|
ba654ff84f | ||
|
|
3de996f11f | ||
|
|
6f1cc2c23d | ||
|
|
1352d3b472 | ||
|
|
bb2192c805 | ||
|
|
83a45e96da | ||
|
|
abab10e532 | ||
|
|
c046046c39 | ||
|
|
d884ad6b15 | ||
|
|
3c3985ebaa | ||
|
|
b5d4403fd5 | ||
|
|
f873cedc37 | ||
|
|
f5b7b272dd | ||
|
|
54006577b8 | ||
|
|
7eb98a9eb6 | ||
|
|
66acb67330 | ||
|
|
fdae976915 | ||
|
|
1fbf4a7ca5 | ||
|
|
74a0cb1096 | ||
|
|
56d8b2b84a | ||
|
|
486ccdc851 | ||
|
|
3f1aeb458d | ||
|
|
361e4a97df | ||
|
|
d13290489f | ||
|
|
e2ffd199c0 | ||
|
|
db28d958d0 | ||
|
|
99db5dd573 | ||
|
|
c01441892a | ||
|
|
8599fca924 | ||
|
|
73f5df54c0 | ||
|
|
10505804fb | ||
|
|
18d5826f1c | ||
|
|
1f4a0fa159 | ||
|
|
eb8490a832 | ||
|
|
6977d8c974 | ||
|
|
2b8a7de572 | ||
|
|
6770b82ba7 | ||
|
|
a83bd3ab92 | ||
|
|
300dcaff19 | ||
|
|
1831493a20 | ||
|
|
e5bc07f502 | ||
|
|
624fcf1f96 | ||
|
|
ffacd7bc78 | ||
|
|
2d59fcc183 | ||
|
|
da76abe8f6 | ||
|
|
b227c84c1e | ||
|
|
e7701eccba | ||
|
|
7ef4d61e74 | ||
|
|
61a5347fab | ||
|
|
e83acfc477 | ||
|
|
e5a858c429 | ||
|
|
525910d346 | ||
|
|
213adbd40a | ||
|
|
04268ce076 | ||
|
|
788df1798a | ||
|
|
03fed263e0 | ||
|
|
cf66fbb40b | ||
|
|
9c32550d39 | ||
|
|
a1c3edffaf | ||
|
|
819c9ffa7a | ||
|
|
71b65d1299 | ||
|
|
c4ea5d30b9 | ||
|
|
75bf5d9198 | ||
|
|
8970e0cb2c | ||
|
|
00c87cda17 | ||
|
|
fcf9b38601 | ||
|
|
609239a780 | ||
|
|
7fa7a3a60b | ||
|
|
4f98f59229 | ||
|
|
4e7b4452ad | ||
|
|
7302984c86 | ||
|
|
20b13988e5 | ||
|
|
64c95321b5 | ||
|
|
b2580b197b | ||
|
|
507100437f | ||
|
|
f33d85b532 | ||
|
|
9f65b801b0 | ||
|
|
e28dda9706 | ||
|
|
8be217703a | ||
|
|
aa3d6ab3c8 | ||
|
|
606f32d468 | ||
|
|
700e28a74a | ||
|
|
6889b4fa22 | ||
|
|
cb447f80d2 | ||
|
|
1dd9667d80 | ||
|
|
0b3d0b4c69 | ||
|
|
2f6c26846e | ||
|
|
57c47d6829 | ||
|
|
94bb41db11 | ||
|
|
bb303fcebc | ||
|
|
f780c9a84e | ||
|
|
68356dd711 | ||
|
|
fe94eccd9f | ||
|
|
11017f9fe8 | ||
|
|
1c0be6f544 | ||
|
|
49a8ae4205 | ||
|
|
df0d298536 | ||
|
|
25812279fc | ||
|
|
47117364a9 | ||
|
|
c9ec997b94 | ||
|
|
0bfd43ba9b | ||
|
|
d170406692 | ||
|
|
b9916651eb | ||
|
|
3734ecabbd | ||
|
|
26058dd19f | ||
|
|
7de5ca9696 | ||
|
|
894fd136de | ||
|
|
d5d7780d4d | ||
|
|
b34cb4f263 | ||
|
|
7d3bdc4d21 | ||
|
|
24f2000319 | ||
|
|
3d8eb7ab21 | ||
|
|
f3f8c4c531 | ||
|
|
524aef24b9 | ||
|
|
ba96145cb0 | ||
|
|
25dc57767d | ||
|
|
191e5fd3c7 | ||
|
|
9dcec09a9d | ||
|
|
839d16d4e3 | ||
|
|
dd8e3dd5a8 | ||
|
|
30eddece55 | ||
|
|
4a27c314c5 | ||
|
|
c2d408eb56 | ||
|
|
6a74635a48 | ||
|
|
6d75523e55 | ||
|
|
e139578d94 | ||
|
|
15674e14d6 | ||
|
|
59360e1209 | ||
|
|
1359074487 | ||
|
|
c34b666ccc | ||
|
|
bac653e3fe | ||
|
|
cac7132437 | ||
|
|
475853fda0 | ||
|
|
a5df41d59b | ||
|
|
c2264aba71 | ||
|
|
3aaf92852a | ||
|
|
1f0f0acd24 | ||
|
|
56d6c62c2a | ||
|
|
e548a55553 | ||
|
|
49f9b7a928 | ||
|
|
57f590a5d8 | ||
|
|
c005a882ed | ||
|
|
8da02c62a5 | ||
|
|
52f5bfd019 | ||
|
|
991787f749 | ||
|
|
baf641fd27 | ||
|
|
fcf0585ead | ||
|
|
570fe50853 | ||
|
|
fba080d11c | ||
|
|
6f25ce2529 | ||
|
|
11169260e5 | ||
|
|
2ad120d98c | ||
|
|
e24f45ee3e | ||
|
|
4f5a33dbb4 | ||
|
|
4cf2f1ba8c | ||
|
|
91eac9645b | ||
|
|
ad69eae88a | ||
|
|
6eef150651 | ||
|
|
83651adfff | ||
|
|
5a52cfb5d7 | ||
|
|
05758c84bd | ||
|
|
7285ce9e01 | ||
|
|
5a31def979 | ||
|
|
655caf10cf | ||
|
|
0876fd184e | ||
|
|
dd0987d239 | ||
|
|
c5d3293b1d | ||
|
|
c1625dfb30 | ||
|
|
d3dcd235ef | ||
|
|
947746f3e4 | ||
|
|
4f9223fb98 | ||
|
|
657aa472d1 | ||
|
|
cf263a055c | ||
|
|
fc183b1c37 | ||
|
|
0a7ad5616f | ||
|
|
1f7574cebc | ||
|
|
202313e65b | ||
|
|
a8e41a657c | ||
|
|
6d0d8441b6 | ||
|
|
4b069d41b2 | ||
|
|
4206e67ceb | ||
|
|
3b53957b04 | ||
|
|
b222174cab | ||
|
|
deda8b4f83 | ||
|
|
7ad4b4026a | ||
|
|
e2b4c181a8 | ||
|
|
c17d2e5a82 | ||
|
|
4d91459de3 | ||
|
|
1f4bcbb88a | ||
|
|
ad685a20c2 | ||
|
|
6dfd260a5f | ||
|
|
5c98780877 | ||
|
|
db50f2fb18 | ||
|
|
e169bde736 | ||
|
|
b202b509c0 | ||
|
|
46c42a9045 | ||
|
|
f7e9f57834 | ||
|
|
5a011ce9dc | ||
|
|
d74c74f523 | ||
|
|
4d733f2193 | ||
|
|
55595210ae | ||
|
|
764a1f1e58 | ||
|
|
26cb682311 | ||
|
|
d6be3b1b48 | ||
|
|
7dc274e489 | ||
|
|
c5d18ad8c1 | ||
|
|
b6a548fad4 | ||
|
|
c972b3fe60 | ||
|
|
a36014d49b | ||
|
|
c63eada302 | ||
|
|
cd81e6219e | ||
|
|
a25dbbd889 | ||
|
|
2b1570a032 | ||
|
|
33aef81219 | ||
|
|
4e11e651a1 | ||
|
|
b45ed9fd8c | ||
|
|
511518616e | ||
|
|
b1582a7dc4 | ||
|
|
7ab3c4014b | ||
|
|
18d411fe5d | ||
|
|
b06065c41d | ||
|
|
68f39806b3 | ||
|
|
a07081d36e | ||
|
|
5ee130d40e | ||
|
|
5ec3d3684a | ||
|
|
34ff13e6c2 | ||
|
|
d9a0bd6bca | ||
|
|
7f79330aa2 | ||
|
|
0b600e8c11 | ||
|
|
3e6b411297 | ||
|
|
9556798310 | ||
|
|
28e563b3a0 | ||
|
|
8e8830682b | ||
|
|
7260d4e2be | ||
|
|
801d9342df | ||
|
|
a4177155b3 | ||
|
|
994e815065 | ||
|
|
a73ac4fc75 | ||
|
|
c1b38beab8 | ||
|
|
b5d66d0be8 | ||
|
|
5d2c4d7fcc | ||
|
|
16201999e4 | ||
|
|
e16d1d46e6 | ||
|
|
23f94daf82 | ||
|
|
fe6b53739a | ||
|
|
0604f64bed | ||
|
|
660ab2c0e8 | ||
|
|
e56f01c063 | ||
|
|
99cfff7b38 | ||
|
|
ee5bd6103b | ||
|
|
2175432b2c | ||
|
|
7f7ad8c6a7 | ||
|
|
d9bb857aa4 | ||
|
|
b8a3a15c26 | ||
|
|
c2e9120f96 | ||
|
|
bef20ca9df | ||
|
|
51f944fe8d | ||
|
|
dfc7d25ee2 | ||
|
|
15e6f7d32c | ||
|
|
6b84c9d933 | ||
|
|
97cfb7b78f | ||
|
|
bded77e04f | ||
|
|
9868ccda10 | ||
|
|
9518ab89ff | ||
|
|
e210348deb | ||
|
|
3eac8bb56c | ||
|
|
95ae5532b2 | ||
|
|
d7c0f29fa6 | ||
|
|
b1ebf33381 | ||
|
|
1ce87fe994 | ||
|
|
f0eca83c67 | ||
|
|
ca0ebf3fe6 | ||
|
|
9d92a7c416 | ||
|
|
6a0e426e6c | ||
|
|
094e13d6fb | ||
|
|
62082bc91f | ||
|
|
77d4083faf | ||
|
|
dc2420a155 | ||
|
|
33c49ab860 | ||
|
|
ff7c89d6f9 | ||
|
|
949db40184 | ||
|
|
e2640f450e | ||
|
|
7becb2bb13 | ||
|
|
e0bb3d1c56 | ||
|
|
bb1f1d2087 | ||
|
|
d781bc3674 | ||
|
|
a240366484 | ||
|
|
235d655099 | ||
|
|
7922aa5330 | ||
|
|
4d29697e83 | ||
|
|
2baaf83b8f | ||
|
|
c899834350 | ||
|
|
2345629aa3 | ||
|
|
00f1179b87 | ||
|
|
8934664f7b | ||
|
|
5b4ec5ba97 | ||
|
|
a2127abd9a | ||
|
|
102230db45 | ||
|
|
924e9b3a0b | ||
|
|
7aecf8e469 | ||
|
|
b93135a58a | ||
|
|
c22b40c1b3 | ||
|
|
7562360869 | ||
|
|
42d570bddc | ||
|
|
7a3c8b04cb | ||
|
|
e696ddd4bb | ||
|
|
55bf179df4 | ||
|
|
df77c10637 | ||
|
|
db09c7f87f | ||
|
|
2e50022ce0 | ||
|
|
ae47ccc704 | ||
|
|
cb84d51fca | ||
|
|
d03e46b2bf | ||
|
|
ede69d0b9a | ||
|
|
0ba82820c6 | ||
|
|
6df13f8120 | ||
|
|
00cc82b2a7 | ||
|
|
a6fa9e39c3 | ||
|
|
1597fc0a9c | ||
|
|
a1dc44a2de | ||
|
|
1be77ac75f | ||
|
|
40a6834d93 | ||
|
|
3a936c3077 | ||
|
|
58ba5b055e | ||
|
|
e51968e5eb | ||
|
|
41c01215ce | ||
|
|
d4bd380211 | ||
|
|
4281b39a7d | ||
|
|
d45c6e25f1 | ||
|
|
91468521dd | ||
|
|
ecdd4eb6af | ||
|
|
28bce6046e | ||
|
|
a733e80e45 | ||
|
|
bb3d09156a | ||
|
|
2f7b56270c | ||
|
|
e4beb05e73 | ||
|
|
29beedeb0d | ||
|
|
dd327121f2 | ||
|
|
0e09d6450f | ||
|
|
adb8072aaf | ||
|
|
c69aaa6d4d | ||
|
|
e062d3a804 | ||
|
|
be5ac9d0a7 | ||
|
|
552b14c1fd | ||
|
|
869ebcd121 | ||
|
|
d65be682b1 | ||
|
|
43735b115e | ||
|
|
04c3580b8b | ||
|
|
1bdf0dd8ca | ||
|
|
bb2690755b | ||
|
|
df549a9260 | ||
|
|
57bd9db886 | ||
|
|
d93d2484e1 | ||
|
|
f178aa40ac | ||
|
|
33a0508bfc | ||
|
|
c076eca201 | ||
|
|
bd7d7c1bf1 | ||
|
|
4ca6dc62ac | ||
|
|
b49318adc9 | ||
|
|
475b54447d | ||
|
|
f446513d7d | ||
|
|
fda1c3b05c | ||
|
|
d8d40875b4 | ||
|
|
3b38357cf3 | ||
|
|
c777c794ee | ||
|
|
b87aae1f18 | ||
|
|
bc1c25f6fb | ||
|
|
f85a67075e | ||
|
|
ee97348478 | ||
|
|
18647eee0a | ||
|
|
c409a89b6c | ||
|
|
095543d2f8 | ||
|
|
908e34841f | ||
|
|
5d7bbba33d | ||
|
|
ce56b8fc88 | ||
|
|
a58dd42daf | ||
|
|
27123eb55d | ||
|
|
a46ca5d7d2 | ||
|
|
e401944c63 | ||
|
|
56781266ab | ||
|
|
c8e7c886e0 | ||
|
|
1e6ecfd307 | ||
|
|
c3fd01caee | ||
|
|
96d388d9f9 | ||
|
|
d392c57939 | ||
|
|
707f822bde | ||
|
|
44df1f1fa9 | ||
|
|
46dd45e3ec | ||
|
|
c8545dff04 | ||
|
|
83b9b630e2 | ||
|
|
41e3a777e3 | ||
|
|
ef05b65cfb | ||
|
|
efc862c6ef | ||
|
|
0b97d4fccf | ||
|
|
d0afe74092 | ||
|
|
2fa52a2da9 | ||
|
|
28c9878e85 | ||
|
|
6f09324ed7 | ||
|
|
699ab5e44e | ||
|
|
430941b018 | ||
|
|
f915ef807f | ||
|
|
24837172c9 | ||
|
|
0a7f3ffdbb | ||
|
|
329ee294f0 | ||
|
|
4c972e2fbe | ||
|
|
93a46ee258 | ||
|
|
2e152ec52a | ||
|
|
b38a95dde6 | ||
|
|
c3c6dd1adf | ||
|
|
31165ba709 | ||
|
|
221670b5c2 | ||
|
|
11a6c0c0fe | ||
|
|
b7194ebab6 | ||
|
|
4ed5035aa4 | ||
|
|
ab49f36890 | ||
|
|
c68b7c8980 | ||
|
|
8331526176 | ||
|
|
e4d434e2ba | ||
|
|
758d860008 | ||
|
|
2b1244ccf3 | ||
|
|
8a64e4f492 | ||
|
|
dd2dbeef82 | ||
|
|
a9d7de11b5 | ||
|
|
26c9bf542d | ||
|
|
350129e0b1 | ||
|
|
b8cedf8e73 | ||
|
|
3bc0bfe8c3 | ||
|
|
0bac2c0150 | ||
|
|
44c62ad490 | ||
|
|
c93312040a | ||
|
|
ee6ecf963a | ||
|
|
2cf5c952c3 | ||
|
|
6e89beffd6 | ||
|
|
4885d00b22 | ||
|
|
fd7671f948 | ||
|
|
c2f0ad7960 | ||
|
|
65f1aed4fd | ||
|
|
7b150042ea | ||
|
|
ca7c6cfe6b | ||
|
|
1efd2d9c93 | ||
|
|
a34966fb87 | ||
|
|
8a3c032b4f | ||
|
|
e6e451f8f3 | ||
|
|
740ec7cd6c | ||
|
|
8be697d4bf | ||
|
|
956986a72e | ||
|
|
ec382db561 | ||
|
|
3ce9957582 | ||
|
|
1999bf0431 | ||
|
|
0877fc9773 | ||
|
|
50c69be4a2 | ||
|
|
60dc31b4b8 | ||
|
|
5c89a47ef8 | ||
|
|
1e5c3a8000 | ||
|
|
b9645ce2ce | ||
|
|
0bcb639fd0 | ||
|
|
0e1090c7d8 | ||
|
|
0950ea9ade | ||
|
|
d3500d94c5 | ||
|
|
deb837ffc3 | ||
|
|
19e88b48ad | ||
|
|
d9113378ce | ||
|
|
bdcaf886f7 | ||
|
|
583ab047e8 | ||
|
|
cdf4582e1f | ||
|
|
84d82a83f8 | ||
|
|
1cc61e485b | ||
|
|
1623070ca0 | ||
|
|
655e93d84c | ||
|
|
6b89ad1ce9 | ||
|
|
d9424d750c | ||
|
|
47d396b630 | ||
|
|
2204d3ea68 | ||
|
|
a2ec5e88f6 | ||
|
|
c32eda13b3 | ||
|
|
2645fbe684 | ||
|
|
f71e860cc9 | ||
|
|
deabb03ed0 | ||
|
|
c068f535fe | ||
|
|
ebb6dc6f70 | ||
|
|
c1f1eaac87 | ||
|
|
0f776c56ca | ||
|
|
d8e62cd414 | ||
|
|
65d13a8893 | ||
|
|
1c7ae7ac8d | ||
|
|
ddcd03d7f5 | ||
|
|
b4e07815b5 | ||
|
|
4df920fc3b | ||
|
|
eb30dee02f | ||
|
|
1d38a01a11 | ||
|
|
3bd4da6536 | ||
|
|
dc8a6d8602 | ||
|
|
1748e30579 | ||
|
|
5059e09837 | ||
|
|
2830e9c169 | ||
|
|
789a127d29 | ||
|
|
cd9d637fde | ||
|
|
fa2841c3f1 | ||
|
|
c21adc031f | ||
|
|
8616cabb4f | ||
|
|
612caf8375 | ||
|
|
6d4b365143 | ||
|
|
8f23a91622 | ||
|
|
16a29eb1ea | ||
|
|
693fa87f55 | ||
|
|
eff2f0d65b | ||
|
|
a5ce086c1e | ||
|
|
4fc17247ef | ||
|
|
3f8e7b6069 | ||
|
|
057eaef9e2 | ||
|
|
c0e0ef41ce | ||
|
|
fc30c42b73 | ||
|
|
9c3fae6fd7 | ||
|
|
e60ecfce9b | ||
|
|
70fef0f981 | ||
|
|
beaefa90ef | ||
|
|
dab926fb61 | ||
|
|
01a14f6fd6 | ||
|
|
57d2891003 | ||
|
|
8dc9425371 | ||
|
|
9442b10401 | ||
|
|
0b52cd743b | ||
|
|
c73c521f6c | ||
|
|
14130fefa0 | ||
|
|
c0355eba6a | ||
|
|
075241850f | ||
|
|
46ecb3be02 | ||
|
|
8bbd0881bc | ||
|
|
473e783afe | ||
|
|
98780c47ba | ||
|
|
527d475452 | ||
|
|
2a09e3e01f | ||
|
|
70ab7629d2 | ||
|
|
540443268d | ||
|
|
e0498fea57 | ||
|
|
fa461c8fe9 | ||
|
|
bfb2992079 | ||
|
|
bf33b04993 | ||
|
|
a6de6cd010 | ||
|
|
57672d7802 | ||
|
|
66897d1108 | ||
|
|
d02969f676 | ||
|
|
81a7731014 | ||
|
|
a19cfe5c57 | ||
|
|
b5586e12f0 | ||
|
|
8bf7696929 | ||
|
|
dbe191ec15 | ||
|
|
562957293e | ||
|
|
897209b0a8 | ||
|
|
ab6750dcd1 | ||
|
|
0ae4261046 | ||
|
|
e25b630e69 | ||
|
|
625c4a735e | ||
|
|
9329a4002f | ||
|
|
cd5cfb7a21 | ||
|
|
837719b147 | ||
|
|
7fcc0197d4 | ||
|
|
ac0812f472 | ||
|
|
81dd7bbf15 | ||
|
|
63da40c526 | ||
|
|
994b8ecb36 | ||
|
|
8ca972219b | ||
|
|
a8e8c6b036 | ||
|
|
37b02d7cfc | ||
|
|
dd2c45762c | ||
|
|
aacb407b7a | ||
|
|
deddbbf75d | ||
|
|
7ec80078ac | ||
|
|
590c18dc31 | ||
|
|
075ef24b69 | ||
|
|
f7c0ebb989 | ||
|
|
d9e2457288 | ||
|
|
40b27bb40e | ||
|
|
833c81c424 | ||
|
|
ab96532bac | ||
|
|
89decb1f37 | ||
|
|
bc67898b0b | ||
|
|
aceb9cf07c | ||
|
|
167a36d625 | ||
|
|
fee916c743 | ||
|
|
b43a10eb2a | ||
|
|
82dad72e79 | ||
|
|
8b9b94159d | ||
|
|
dd68bb8e4c | ||
|
|
8158d5bfb4 | ||
|
|
98278b1663 | ||
|
|
bac4de7e4a | ||
|
|
21d5932fc5 | ||
|
|
4efd2f9438 | ||
|
|
212bd9164b | ||
|
|
0b05579809 | ||
|
|
c61d62d410 | ||
|
|
0771c16208 | ||
|
|
cf7bc09284 | ||
|
|
a72534e093 | ||
|
|
0eeb9a3030 | ||
|
|
aa0af4b14a | ||
|
|
b74c77bfa4 | ||
|
|
d09b3a5ffb | ||
|
|
53a0d1c6fe | ||
|
|
1f6bdf2bf2 | ||
|
|
643d24f7a1 | ||
|
|
9f5f9240e6 | ||
|
|
c99fe54e3a | ||
|
|
0feda16c3c | ||
|
|
56673c63ab | ||
|
|
5ef0589c9c | ||
|
|
2376592f1d | ||
|
|
20a351f8f5 | ||
|
|
3a6eaa05a8 | ||
|
|
85d89ecb4f | ||
|
|
09b9f2d34e | ||
|
|
de976acd14 | ||
|
|
56d97799b2 | ||
|
|
4a286ef616 | ||
|
|
ae718269e8 | ||
|
|
d45f1774d0 | ||
|
|
09406f293d | ||
|
|
ddd38ff67f | ||
|
|
6f3d0f1b34 | ||
|
|
3129840cf0 | ||
|
|
e3e3be3de3 | ||
|
|
22d24cb393 | ||
|
|
5ed6553b0d | ||
|
|
c40418b528 | ||
|
|
152311587f | ||
|
|
d5b6a2cebe | ||
|
|
ac6b721449 | ||
|
|
ddfc778b27 | ||
|
|
ffe7bd2072 | ||
|
|
609c63819b | ||
|
|
e3729478ae | ||
|
|
2c5c9121b8 | ||
|
|
6fc51fa7e7 | ||
|
|
ac7e6017f4 | ||
|
|
65a73e1ef6 | ||
|
|
8e0bb5176f | ||
|
|
8c2399d877 | ||
|
|
97401f0c18 | ||
|
|
02aacf2f31 | ||
|
|
bf1a53ad74 | ||
|
|
95d4e1d394 | ||
|
|
5398b032d2 | ||
|
|
94b2eecd42 | ||
|
|
1de0acf64d | ||
|
|
2094e0931d | ||
|
|
913eaca8b9 | ||
|
|
2c8a528665 | ||
|
|
26bd706ce7 | ||
|
|
b9887b7961 | ||
|
|
f5a0f630c6 | ||
|
|
96046e257b | ||
|
|
3aa36d0520 | ||
|
|
4d5aaddc36 | ||
|
|
3c79d47137 | ||
|
|
c4d91d0aeb | ||
|
|
374de22dfc | ||
|
|
3e7d183b2e | ||
|
|
7a1bd360f3 | ||
|
|
d9575605b1 | ||
|
|
5c4077a05e | ||
|
|
6ca42a6702 | ||
|
|
18d1efd0f7 | ||
|
|
8e87b38c01 | ||
|
|
5f32ec59fc | ||
|
|
d7f37a4594 | ||
|
|
3ae029c918 | ||
|
|
4672f0ae97 | ||
|
|
03c0377948 | ||
|
|
8be1372cc3 | ||
|
|
ed6721da35 | ||
|
|
628b736830 | ||
|
|
b4f613523b | ||
|
|
df9ad11280 | ||
|
|
705ddb7aa7 | ||
|
|
cc99141ddd | ||
|
|
c9bc0b393e | ||
|
|
d52ef51e98 | ||
|
|
ebce73e93a | ||
|
|
f664a91f2a | ||
|
|
8317d4a7e0 | ||
|
|
806521a530 | ||
|
|
e951f0eacd | ||
|
|
fddd101b7f | ||
|
|
1a47678bfb | ||
|
|
dcd9f80f80 | ||
|
|
4c86bf2d42 | ||
|
|
424f513e6a | ||
|
|
fd8ed7509f | ||
|
|
a432a42cb4 | ||
|
|
a799fbf226 | ||
|
|
3437826da3 | ||
|
|
27c6b2fa52 | ||
|
|
6f95840709 | ||
|
|
0b2b0678b9 | ||
|
|
4d37ad7449 | ||
|
|
20257fd053 | ||
|
|
1ba4423e5c | ||
|
|
8b0ed05ba8 | ||
|
|
17c1c09c53 | ||
|
|
9a4b3ca294 | ||
|
|
fb1b4319a0 | ||
|
|
8f9244cc3a | ||
|
|
09bc815c72 | ||
|
|
3bf2f19204 | ||
|
|
8aac793dd1 | ||
|
|
88629b5fca | ||
|
|
f203fb9a01 | ||
|
|
d58ebedbc4 | ||
|
|
68e3ff3855 | ||
|
|
6c190a7dc1 | ||
|
|
65e3c226c7 | ||
|
|
ee5c92c39f | ||
|
|
ead663f30f | ||
|
|
d0139a5eab | ||
|
|
e8e8eefb91 | ||
|
|
d45ec7f015 | ||
|
|
d20c13a8dc | ||
|
|
8944f478a1 | ||
|
|
6b51b3040b | ||
|
|
a490d83518 | ||
|
|
e09f4b6c69 | ||
|
|
b094a79b89 | ||
|
|
58ede4c24c | ||
|
|
4514549d4b | ||
|
|
61724752a4 | ||
|
|
a1398fd8fe | ||
|
|
5a286a8892 | ||
|
|
4ea3385c3f | ||
|
|
bdd53275c4 | ||
|
|
ab202f8fef | ||
|
|
3f3d8fdcb5 | ||
|
|
355e33e08c | ||
|
|
fa3c418ee9 | ||
|
|
d8f342cb2c | ||
|
|
6d8ad54abc | ||
|
|
04856595c2 | ||
|
|
9965dab7c4 | ||
|
|
37a12a3213 | ||
|
|
8d106f2a2a | ||
|
|
2d4a2e72bc | ||
|
|
80166e4a8a | ||
|
|
836cd5c8df | ||
|
|
5eba13b7a1 | ||
|
|
dcfe535ae6 | ||
|
|
2db802dff3 | ||
|
|
8ed52839ab | ||
|
|
fdd1846921 | ||
|
|
2afc9150ce | ||
|
|
faec2f03d1 | ||
|
|
7476da1396 | ||
|
|
c1bf43920f | ||
|
|
6301300f47 | ||
|
|
dcafbec72f | ||
|
|
df537cff7a | ||
|
|
5398952125 | ||
|
|
bc90a54455 | ||
|
|
861df3465d | ||
|
|
08ce078c01 | ||
|
|
c08ff7d56f | ||
|
|
1523cf5acd | ||
|
|
18aaee49b0 | ||
|
|
f50a76509b | ||
|
|
ffef5431d8 | ||
|
|
4aa0daeaaf | ||
|
|
f5bfc799ad | ||
|
|
75ee95af3f | ||
|
|
010ad5486d | ||
|
|
23b43b15c4 | ||
|
|
7c37414040 | ||
|
|
e4337ac76b | ||
|
|
9a0a1314f6 | ||
|
|
7a32b48116 | ||
|
|
180dc76794 | ||
|
|
d16035663a | ||
|
|
1a9e99d353 | ||
|
|
1fe130f902 | ||
|
|
5a78793da8 | ||
|
|
d4204329ee | ||
|
|
1d1f95e7c0 | ||
|
|
e206b014b9 | ||
|
|
a959243ac9 | ||
|
|
6326ee9424 | ||
|
|
5271edd456 | ||
|
|
a50149cf9e | ||
|
|
6166352177 | ||
|
|
3cf31cd3ff | ||
|
|
b5e27846e1 | ||
|
|
2689a47385 | ||
|
|
134a374d43 | ||
|
|
11e8bf019e | ||
|
|
146e73d680 | ||
|
|
2f1758952f | ||
|
|
43905c7fcf | ||
|
|
8d45b9ba58 | ||
|
|
e80bbe75f5 | ||
|
|
ae04d41a52 | ||
|
|
e89cafd183 | ||
|
|
989ae6d9c4 | ||
|
|
d6007c572e | ||
|
|
0700eab060 | ||
|
|
fffd3d319c | ||
|
|
5496399de5 | ||
|
|
9804c3be09 | ||
|
|
358f1a0a6a | ||
|
|
8d1678576d | ||
|
|
30fa280d76 | ||
|
|
055c809419 | ||
|
|
048dee9aab | ||
|
|
f2b54c8910 | ||
|
|
0cc38f1628 | ||
|
|
27e6f13d75 | ||
|
|
d36b2c48b7 | ||
|
|
f932249c3a | ||
|
|
a8b401eb33 | ||
|
|
c309e98277 | ||
|
|
2b95036759 | ||
|
|
a35891e81f | ||
|
|
5f8367e018 | ||
|
|
3902d6df27 | ||
|
|
26517908e7 | ||
|
|
86e25935ba | ||
|
|
aceedfa29f | ||
|
|
25b555d7c3 | ||
|
|
d5a29ff661 | ||
|
|
3d45989abb | ||
|
|
2e6edd2049 | ||
|
|
76ebd6b5a4 | ||
|
|
b313f7893f | ||
|
|
c3462e03e5 | ||
|
|
05857104bf | ||
|
|
626655134c | ||
|
|
aed7a1a9e4 | ||
|
|
5ab1d5892a | ||
|
|
11f8961b68 | ||
|
|
3dcfb2627c | ||
|
|
d6041abff8 | ||
|
|
52eb4e183d | ||
|
|
5f93f9345d | ||
|
|
d07f07501f | ||
|
|
c0346e1280 | ||
|
|
ee8f97679e | ||
|
|
84d08ef50f | ||
|
|
0d23fb9c84 | ||
|
|
6306f00510 | ||
|
|
0ecadf23c7 | ||
|
|
2f0384cd32 | ||
|
|
d518e725e0 | ||
|
|
f67a71c1b3 | ||
|
|
0c2dc79bd1 | ||
|
|
0fd922f942 | ||
|
|
1edd210910 | ||
|
|
a81513d4cf | ||
|
|
923075c872 | ||
|
|
93ff9a85af | ||
|
|
3820be4c49 | ||
|
|
36cb618c2c | ||
|
|
6e5a5a63e0 | ||
|
|
afa0b149aa | ||
|
|
a64fbb7774 | ||
|
|
3cdee8a490 | ||
|
|
773c19b934 | ||
|
|
5ad5f00454 | ||
|
|
4541c66d72 | ||
|
|
9a08053469 | ||
|
|
f16c8107c5 | ||
|
|
de4794f2ad | ||
|
|
11100e5a79 | ||
|
|
7dd901b407 | ||
|
|
9eb92f7071 | ||
|
|
e9d6489ec1 | ||
|
|
72fb740f5a | ||
|
|
e43c1bf5cb | ||
|
|
012b5bee00 | ||
|
|
db7857c882 | ||
|
|
c035e9299f | ||
|
|
8527b4210c | ||
|
|
0ac8554787 | ||
|
|
15beb1d045 | ||
|
|
09b2352881 | ||
|
|
01cdf251f0 | ||
|
|
4dd1089efb | ||
|
|
025e636383 | ||
|
|
08ac6b4ae8 | ||
|
|
8e52360527 | ||
|
|
314c2a9c2d | ||
|
|
61f6206ff4 | ||
|
|
911a154626 | ||
|
|
e9def99fb8 | ||
|
|
727481fd7b | ||
|
|
fb8c245e11 | ||
|
|
1c56c63b81 | ||
|
|
8b23e2ee5b | ||
|
|
f7c0d9ae76 | ||
|
|
86bd7aa33b | ||
|
|
0408a6e7a0 | ||
|
|
008a93b001 | ||
|
|
3791cf5f6f | ||
|
|
46fc3561bd | ||
|
|
de9689a31b | ||
|
|
1b0baad92a | ||
|
|
5316554c5b | ||
|
|
dcfc963e67 | ||
|
|
0981d9555c | ||
|
|
6074d9f973 | ||
|
|
03197e7fd2 | ||
|
|
166cf4ab77 | ||
|
|
75bc7b09ce | ||
|
|
7f8bba8468 | ||
|
|
551166c6d8 | ||
|
|
35a8170b30 | ||
|
|
3fd4c30b0c | ||
|
|
5d9e5de380 | ||
|
|
ae543c8a25 | ||
|
|
7dbccc55a3 | ||
|
|
1a9f705818 | ||
|
|
3c71ea2b99 | ||
|
|
98e393ae55 | ||
|
|
79bcc86bfa | ||
|
|
ef228c243f | ||
|
|
dd10841dd7 | ||
|
|
adb417255e | ||
|
|
1265717118 | ||
|
|
bd0c4f0b0e | ||
|
|
dc2eee5464 | ||
|
|
67d7f402b1 | ||
|
|
8a9d3597d0 | ||
|
|
904896ca95 | ||
|
|
37652babe4 | ||
|
|
15ed53df07 | ||
|
|
5b528517dc | ||
|
|
f293093002 | ||
|
|
d9c6ed0fb7 | ||
|
|
5bd31d7e20 | ||
|
|
345b378aa0 | ||
|
|
5a6b1bf870 | ||
|
|
8018723bcc | ||
|
|
ce50f8dca2 | ||
|
|
63124db3fa | ||
|
|
6f3cc2ec32 | ||
|
|
75e0933dc1 | ||
|
|
0d757b6279 | ||
|
|
797ae82416 | ||
|
|
d9cad6688a | ||
|
|
e29598f241 | ||
|
|
26c1e6d023 | ||
|
|
285c1ecdc7 | ||
|
|
92bd7a7a44 | ||
|
|
5a1610c5ee | ||
|
|
bc8aec8751 | ||
|
|
804aae36fb | ||
|
|
bb82481683 | ||
|
|
128e046038 | ||
|
|
8849568641 | ||
|
|
8fd1b10cda | ||
|
|
43aa8dc0c0 | ||
|
|
8366f81e6e | ||
|
|
4de3549733 | ||
|
|
9d4ee26ea9 | ||
|
|
74949c1b3f | ||
|
|
c7498c424d | ||
|
|
40601fda94 | ||
|
|
dec5b65a35 | ||
|
|
299de9017c | ||
|
|
137e3b76bc | ||
|
|
2190fa07e4 | ||
|
|
a08898ebe7 | ||
|
|
a6522c08fa | ||
|
|
cd3327dcab | ||
|
|
9e38649c04 | ||
|
|
c228395ca2 | ||
|
|
096e4220b5 | ||
|
|
e3bb80e737 | ||
|
|
46bdc43de8 | ||
|
|
e173fb6511 | ||
|
|
88dc687deb | ||
|
|
cc052028b5 | ||
|
|
6719dde129 | ||
|
|
ee0503272a | ||
|
|
280d4368f1 | ||
|
|
4f476e4d5a | ||
|
|
cb0e078684 | ||
|
|
0326eb80dd | ||
|
|
74f5baf12f | ||
|
|
e47ae4ec2f | ||
|
|
59bc04acfa | ||
|
|
f7f2557e73 | ||
|
|
84a0813cd4 | ||
|
|
342613c641 | ||
|
|
8590a615f3 | ||
|
|
eac3dce5fc | ||
|
|
83ac6a3dcc | ||
|
|
e27ee398e4 | ||
|
|
99107e3775 | ||
|
|
3868c99196 | ||
|
|
edf16f7c55 | ||
|
|
e645de2511 | ||
|
|
73c3d16911 | ||
|
|
b2262d8d71 | ||
|
|
a54e42c25e | ||
|
|
63f8d353c8 | ||
|
|
119385f04e | ||
|
|
9252c69847 | ||
|
|
8da67ce019 | ||
|
|
7ebaecf2e1 | ||
|
|
39bb012a64 | ||
|
|
30ced9962c | ||
|
|
27dcfda3fd | ||
|
|
0db9b3dc65 | ||
|
|
745a4ea21f | ||
|
|
45d429508d | ||
|
|
c89869ebe2 | ||
|
|
82301ff431 | ||
|
|
cb20d07ab8 | ||
|
|
dfb329185b | ||
|
|
58eb99d8c8 | ||
|
|
5a09a37f4c | ||
|
|
4d135d7b9b | ||
|
|
a014343caa | ||
|
|
867957680a | ||
|
|
08652ea14f | ||
|
|
9433b4d3fe | ||
|
|
f0455a28be | ||
|
|
cf529000b4 | ||
|
|
1fb6aae399 | ||
|
|
091db61993 | ||
|
|
ecb315a058 | ||
|
|
6dec57cc40 | ||
|
|
cc8202f123 | ||
|
|
56088bbd3c | ||
|
|
5e57f110f4 | ||
|
|
ffffa118ba | ||
|
|
65b18dd380 | ||
|
|
dffaaade2e | ||
|
|
8e747e4825 | ||
|
|
a4083ed36b | ||
|
|
8ee3e3b90f | ||
|
|
0e2c9fb47e | ||
|
|
0f1ccfb152 | ||
|
|
f63f53a314 | ||
|
|
ab1766e393 | ||
|
|
80ac1e74bd | ||
|
|
9d6c410b11 | ||
|
|
57d81850aa | ||
|
|
5be877f2d4 | ||
|
|
8b6f524f9d | ||
|
|
8acba62b90 | ||
|
|
1ebda7a0d2 | ||
|
|
6e50de9fe3 | ||
|
|
0b8f838199 | ||
|
|
67f8bc3ace | ||
|
|
dc12fa8aff | ||
|
|
30f1ba30c9 | ||
|
|
bb7de755f9 | ||
|
|
ad449c34e0 | ||
|
|
db9f7a2020 | ||
|
|
f4a5b96f33 | ||
|
|
20590dcc68 | ||
|
|
db650156c5 | ||
|
|
61f5de4022 | ||
|
|
ca608478f7 | ||
|
|
a76f7c9832 | ||
|
|
9422faf1cf | ||
|
|
c7242c0060 | ||
|
|
57c5eaeb0d | ||
|
|
dc38245c49 | ||
|
|
e7f418c618 | ||
|
|
b720991101 | ||
|
|
cb41e9c364 | ||
|
|
121bf8a09b | ||
|
|
48921c8911 | ||
|
|
0c3606cd66 | ||
|
|
ef4a8382c2 | ||
|
|
1e0ff22b84 | ||
|
|
07f9aaf479 | ||
|
|
269f63ff52 | ||
|
|
db557442e8 | ||
|
|
9e9465a447 | ||
|
|
b96821a2a8 | ||
|
|
7e504a3c7f | ||
|
|
dbf1a65b08 | ||
|
|
50ea7634dc | ||
|
|
0fd707f56a | ||
|
|
de47204d26 | ||
|
|
513f733351 | ||
|
|
8375518720 | ||
|
|
9107236078 | ||
|
|
d46daeab9b | ||
|
|
b0e4c9a9a1 | ||
|
|
723fcb91d6 | ||
|
|
c24b8e51cc | ||
|
|
09abea3ccc | ||
|
|
d2efb641d7 | ||
|
|
e8f845e6a5 | ||
|
|
eb2d7ed8af | ||
|
|
22b17f25a3 | ||
|
|
1e2ff3541f | ||
|
|
a38960c8b4 | ||
|
|
25502ad396 | ||
|
|
bf246b179c | ||
|
|
80394faf09 | ||
|
|
1cf75d9d93 | ||
|
|
e741ba59e2 | ||
|
|
49000ef072 | ||
|
|
f68919f405 | ||
|
|
e6ccf8ec15 | ||
|
|
2347dd46cf | ||
|
|
f0eee2f5b8 | ||
|
|
52d63759fb | ||
|
|
03c2f76643 | ||
|
|
7d044e2718 | ||
|
|
8931172cc4 | ||
|
|
7466c7e2ec | ||
|
|
640bb8ab65 | ||
|
|
ffecf7f104 | ||
|
|
a8d03c78ee | ||
|
|
2ab4074373 | ||
|
|
d0ee3a21c9 | ||
|
|
86697eb2dd | ||
|
|
cfbd749463 | ||
|
|
26f29f52f1 | ||
|
|
fb32d75884 | ||
|
|
8f250bac4f | ||
|
|
d3f8d4228b | ||
|
|
e9fd1da0be | ||
|
|
0ea30b3664 | ||
|
|
f80b4baaa6 | ||
|
|
afc882489e | ||
|
|
f666ebd03a | ||
|
|
1f58d5009f | ||
|
|
83055ee984 | ||
|
|
0b855e8083 | ||
|
|
394a60c60e | ||
|
|
6894dfce28 | ||
|
|
235e5bb5ba | ||
|
|
75a80a724e | ||
|
|
027545e75b | ||
|
|
b90145ef09 | ||
|
|
d9eff4d98e | ||
|
|
04b3517127 | ||
|
|
148b4dad29 | ||
|
|
7d4a1f9fee | ||
|
|
9c4cd6d4ff | ||
|
|
95350ecfce | ||
|
|
f70b76c8fe | ||
|
|
abccdb9fc1 | ||
|
|
99ebd21d9a | ||
|
|
4e6746e7d5 | ||
|
|
35a3a33c39 | ||
|
|
2bb3142e83 | ||
|
|
d8ec014001 | ||
|
|
1acc724b93 | ||
|
|
95b19cc420 | ||
|
|
af7553f54b | ||
|
|
8ab6c8954d | ||
|
|
93c2902cb0 | ||
|
|
c8f477088f | ||
|
|
0556848e64 | ||
|
|
e42ee63091 | ||
|
|
a9d7b04b1e | ||
|
|
e6452400a0 | ||
|
|
27aa25dce9 | ||
|
|
8b2fa72987 | ||
|
|
bbc692806c | ||
|
|
56ee4b3e12 | ||
|
|
f8e34ca396 | ||
|
|
935007ecaa | ||
|
|
d8e36399db | ||
|
|
815b675702 | ||
|
|
d025bb17d5 | ||
|
|
68f9dc5cd8 | ||
|
|
ec01351fa8 | ||
|
|
bc98de6be3 | ||
|
|
4017a0c26b | ||
|
|
2d2136cbf6 | ||
|
|
7221c00cf9 | ||
|
|
3e795945ae | ||
|
|
4568af87c6 | ||
|
|
b8c69467be | ||
|
|
2bd74e926a | ||
|
|
71cc044475 | ||
|
|
bdc0a5b51a | ||
|
|
57f2d0a530 | ||
|
|
76d191a076 | ||
|
|
530d5a669e | ||
|
|
afb0987891 | ||
|
|
cd39a843ee | ||
|
|
d59197d02a | ||
|
|
6d9d31210f | ||
|
|
37db922500 | ||
|
|
5a715dc708 | ||
|
|
33846715b3 | ||
|
|
a74295c7dd | ||
|
|
e5174f8169 | ||
|
|
efbebe51d0 | ||
|
|
d3d6cf815f | ||
|
|
76ef1c6503 | ||
|
|
675ad3d2ce | ||
|
|
1b612ca6aa | ||
|
|
133ae214a8 | ||
|
|
b15f0f5201 | ||
|
|
bce3b6a176 | ||
|
|
50781d61b7 | ||
|
|
70dbba7b56 | ||
|
|
dcbc2f387d | ||
|
|
6fab7741ca | ||
|
|
b77e33bd30 | ||
|
|
afa85c393a | ||
|
|
554c4ef86a | ||
|
|
40cd3fb27c | ||
|
|
0dc3512422 | ||
|
|
2eec8de598 | ||
|
|
6a04b88f7e | ||
|
|
e98fc4c70d | ||
|
|
0bd19dfe21 | ||
|
|
078cbd8f87 | ||
|
|
3cefd2851d | ||
|
|
b1c3df0cf1 | ||
|
|
76c31e4bbd | ||
|
|
ea989f3753 | ||
|
|
93b7e20a57 | ||
|
|
591f3fd688 | ||
|
|
39342b013d | ||
|
|
9fc10c94d3 | ||
|
|
51e0b71376 | ||
|
|
b6f1a4d404 | ||
|
|
3df2ef69fd | ||
|
|
891eda7906 | ||
|
|
366a135ebd | ||
|
|
bdc0f07de5 | ||
|
|
c603c01966 | ||
|
|
eb1307c4bd | ||
|
|
379dadb57c | ||
|
|
282e7b1f73 | ||
|
|
55b619707d | ||
|
|
3985e6a1d7 | ||
|
|
c31c87c869 | ||
|
|
682a21503d | ||
|
|
4092d9aecb | ||
|
|
2d396b05ac | ||
|
|
2ea3973e07 | ||
|
|
c5be0f4f32 | ||
|
|
f2c26ad672 | ||
|
|
ec13ac7506 | ||
|
|
f58b298f38 | ||
|
|
6415b17bef | ||
|
|
c3a6b2ba9d | ||
|
|
69ceec003e | ||
|
|
6a055b3707 | ||
|
|
fdf12c11be | ||
|
|
9f02a6e17e | ||
|
|
0fc32c612d | ||
|
|
a79c662939 | ||
|
|
78f1745c51 | ||
|
|
309aaa6f2b | ||
|
|
2a7a3c87e2 | ||
|
|
95fbad9556 | ||
|
|
d60b324714 | ||
|
|
8fd556f620 | ||
|
|
ae087f9b4c | ||
|
|
4153a38edf | ||
|
|
5baec0071b | ||
|
|
585de5a8a6 | ||
|
|
42bf577957 | ||
|
|
27d8716c57 | ||
|
|
897849a2c9 | ||
|
|
1ca5e99dd0 | ||
|
|
184587ade7 | ||
|
|
5fe5ac17ad | ||
|
|
af78480fde | ||
|
|
a2ecfff1f8 | ||
|
|
b148212c96 | ||
|
|
40c3bede63 | ||
|
|
6a157faf91 | ||
|
|
fb25e83cb8 | ||
|
|
bd68ffc1b2 | ||
|
|
d1ca5d58ef | ||
|
|
7c0f05c66a | ||
|
|
2ee0b2741d | ||
|
|
7b61b41c04 | ||
|
|
41512e7db8 | ||
|
|
9cd2662734 | ||
|
|
85b4b54d3b | ||
|
|
c5f235e3a0 | ||
|
|
c0db06bd51 | ||
|
|
2dc1647f57 | ||
|
|
303be3228e | ||
|
|
2a5982e23d | ||
|
|
0ba6b35b40 | ||
|
|
092ea531fa | ||
|
|
a10fb80645 | ||
|
|
7f12e199b8 | ||
|
|
13f1959927 | ||
|
|
b3697a262f | ||
|
|
f997ac8282 | ||
|
|
544b778d65 | ||
|
|
d2c549dcec | ||
|
|
9618fca643 | ||
|
|
05e67c1a55 | ||
|
|
f03a7d71ed | ||
|
|
216c17fb25 | ||
|
|
34a4f66b9b | ||
|
|
6a5685c90c | ||
|
|
065f41717e | ||
|
|
9d69384546 | ||
|
|
af3ba622f8 | ||
|
|
e153d1cd6c | ||
|
|
f28afa0a45 | ||
|
|
73e7836ead | ||
|
|
7423106514 | ||
|
|
91afe398dd | ||
|
|
2394f41311 | ||
|
|
6f93d64def | ||
|
|
0c1df9e9f5 | ||
|
|
b054da113d | ||
|
|
c25ad8803f | ||
|
|
e772d6b508 | ||
|
|
b5fc0f285e | ||
|
|
0764d35ae7 | ||
|
|
6fc7cbd714 | ||
|
|
8ab62326d6 | ||
|
|
be9b893e79 | ||
|
|
085da4328c | ||
|
|
7416000e86 | ||
|
|
46167ed75a | ||
|
|
0926fd18cc | ||
|
|
0a6e30c242 | ||
|
|
47c5aed731 | ||
|
|
4d8a5ad2c4 | ||
|
|
4da3176e22 | ||
|
|
f495fcbe23 | ||
|
|
738a9f3963 | ||
|
|
49904b6528 | ||
|
|
15acb56766 | ||
|
|
976682cd75 | ||
|
|
e868bbf596 | ||
|
|
916d323e21 | ||
|
|
b2440569bf | ||
|
|
861c094c94 | ||
|
|
dd43bcc3ce | ||
|
|
d69842f478 | ||
|
|
8872942681 | ||
|
|
c32f2286d8 | ||
|
|
6117863e13 | ||
|
|
3834a7790a | ||
|
|
5c9fea6043 | ||
|
|
2ceb928784 | ||
|
|
06f4cfd1d3 | ||
|
|
16465f5221 | ||
|
|
f3685307f8 | ||
|
|
920a4207ed | ||
|
|
fa020f757d | ||
|
|
583ec3e45c | ||
|
|
a3cbdee050 | ||
|
|
c2cd29e367 | ||
|
|
1da965c1f6 | ||
|
|
04a97fd3e2 | ||
|
|
5ff0923d4c | ||
|
|
07d1029089 | ||
|
|
e015e1f82d | ||
|
|
a6b20a9719 | ||
|
|
929edac5f1 | ||
|
|
26c11a40ff | ||
|
|
a1a6b8f97a | ||
|
|
5f330b97de | ||
|
|
7634aa9246 | ||
|
|
55a5796776 | ||
|
|
e6b62201c9 | ||
|
|
8fac3559db | ||
|
|
433c46abe4 | ||
|
|
6773197e51 | ||
|
|
00a70b9855 | ||
|
|
e0dcd8874f | ||
|
|
d17ccbdf54 | ||
|
|
7022c68c2c | ||
|
|
14aa915ee2 | ||
|
|
ce821c0cfb | ||
|
|
d9705139f2 | ||
|
|
4265df0559 | ||
|
|
faf6e2389b | ||
|
|
02836defb4 | ||
|
|
7e5f90f9e9 | ||
|
|
408ba7a40c | ||
|
|
1569da98b1 | ||
|
|
9cf73ec70e | ||
|
|
1b9ba42e78 | ||
|
|
ab58030ec3 | ||
|
|
34a98801ab | ||
|
|
65ffc39744 | ||
|
|
35a34cf0b2 | ||
|
|
702543d325 | ||
|
|
71c9e8cff5 | ||
|
|
09b7996aed | ||
|
|
4ef1cfdf50 | ||
|
|
ba3e75b758 | ||
|
|
42e21abf6f | ||
|
|
33992ef475 | ||
|
|
973ed77e6a | ||
|
|
3527b9968e | ||
|
|
482c07a5d2 | ||
|
|
5b4c6ac726 | ||
|
|
46d542dcc5 | ||
|
|
b82dbf0f7c | ||
|
|
d0d2d8922a | ||
|
|
5b4bf44091 | ||
|
|
950474cfd0 | ||
|
|
7d436c5b50 | ||
|
|
b92836badb | ||
|
|
69583b5d19 | ||
|
|
5aed530d4b | ||
|
|
61cfb7bedc | ||
|
|
4f933a9713 | ||
|
|
8a3ca9ae51 | ||
|
|
8fb3ebdd31 | ||
|
|
87d8f6db3b | ||
|
|
412b45015d | ||
|
|
3d41362944 | ||
|
|
3b43adac3d | ||
|
|
0becf7fc3f | ||
|
|
c09ff9312b | ||
|
|
000ad81e8f | ||
|
|
69a3764afb | ||
|
|
e1db58bee2 | ||
|
|
93152c8461 | ||
|
|
6f0059cab8 | ||
|
|
06ea465787 | ||
|
|
70118ca998 | ||
|
|
31cf9fbeb3 | ||
|
|
2b59ca520f | ||
|
|
fd9f46c728 | ||
|
|
94f945ff94 | ||
|
|
1d003deace | ||
|
|
0dc347971b | ||
|
|
795df4cada | ||
|
|
75c2f9acde | ||
|
|
d8baf36515 | ||
|
|
45202711e5 | ||
|
|
82d66c38b1 | ||
|
|
36ce2007fb | ||
|
|
2ff344f6da | ||
|
|
720f5c494b | ||
|
|
57b3ed8663 | ||
|
|
b9a95421d2 | ||
|
|
534b89774e | ||
|
|
65b198cffd | ||
|
|
bcd760ecc6 | ||
|
|
05dc1ac4bb | ||
|
|
12be03323e | ||
|
|
0d3b6c94cc | ||
|
|
db4d5e9e72 | ||
|
|
d6aa6839e7 | ||
|
|
84bf45c17f | ||
|
|
c33a4dabe3 | ||
|
|
c4c291a120 | ||
|
|
aa9b84f0e9 | ||
|
|
686d81fb26 | ||
|
|
d7d46c347b | ||
|
|
bab3530e7f | ||
|
|
f23d8010bb | ||
|
|
53031d8f57 | ||
|
|
528032c847 | ||
|
|
dfc55d137a | ||
|
|
a12f04ff44 | ||
|
|
96cd209587 | ||
|
|
6bdc28b0d8 | ||
|
|
101faf53fc | ||
|
|
bfcd9cb632 | ||
|
|
01eedb53a2 | ||
|
|
239378145b | ||
|
|
4e9d850b2f | ||
|
|
fd8b3f0b62 | ||
|
|
026441d1ea | ||
|
|
f05f35f548 | ||
|
|
6265d66757 |
43
mozilla/LEGAL
Normal file
43
mozilla/LEGAL
Normal file
@@ -0,0 +1,43 @@
|
||||
Please be apprised of the following Legal Notices:
|
||||
|
||||
A) The U.S. District Court for the Eastern District of Virginia has
|
||||
ruled that the Netscape Navigator code does not infringe Wang's U.S.
|
||||
Patent No. 4,751,669 ("the '669 Patent") because: 1) HTML is not
|
||||
Videotex as defined by the '669 patent; 2) web servers are not central
|
||||
suppliers; and 3) Navigator does not "connect," as defined by the '669
|
||||
Patent, to web servers on the Internet. Wang may appeal this decision to
|
||||
the Federal Circuit. Wang contended that its Patent disclosing a
|
||||
"Videotext" system, is infringed by the following functionality in the
|
||||
Netscape Navigator code: 1) the animated logo and status line indicators
|
||||
--See Claims 1,8 and 9; 2) the "File Save As" function --See Claims
|
||||
23-27; 3) Bookmarks and Rename Bookmarks in the Properties window --See
|
||||
Claims 20-22; 4) storing HTML, GIF, and JPEG files and adding filename
|
||||
extensions --See Claim 38
|
||||
|
||||
B) Intermind owns pending U.S. patent applications on communications
|
||||
systems which employ metadata ("channel objects") to define a control
|
||||
structure for information transfer. The Netscape code does not infringe
|
||||
as released; however, modifications which utilize channel objects as
|
||||
described by Intermind should be considered carefully. The following is
|
||||
a statement from Intermind: "Intermind's claims fundamentally involve
|
||||
the use of a control structure to automate communications. ...The
|
||||
essence of Intermind's top claim is that two devices sender and
|
||||
receiver have persistent storage, communicate over a network,
|
||||
and exchange a control structure including metadata which describes: 1)
|
||||
what information is to be updated, 2) when to update this information,
|
||||
and 3) how to transfer the updated information. In addition, at least
|
||||
the receiving device must be able to process the metadata in order to
|
||||
perform the update determination and transfer. Any digital
|
||||
communications system which incorporates all of these elements will be
|
||||
covered by Intermind's patents." See Intermind.com.
|
||||
|
||||
C) Stac, Inc., and its licensing agent Hi/fn, own several patents which
|
||||
disclose data compression methods implementing an LZS compression
|
||||
algorithm, including U.S. Patent Nos. 4,701,745 and 5,016, 009 ("the
|
||||
Stac Patents"). The Netscape Communicator code does not perform
|
||||
compression. If you modify the Netscape source code to perform
|
||||
compression, please take notice of the Stac Patents.
|
||||
|
||||
D) Netscape Communications Corporation ("Netscape") does not guarantee
|
||||
that any source code or executable code available from the mozilla.org
|
||||
domain is Year 2000 compliant.
|
||||
567
mozilla/LICENSE
Normal file
567
mozilla/LICENSE
Normal file
@@ -0,0 +1,567 @@
|
||||
MOZILLA PUBLIC LICENSE
|
||||
Version 1.1
|
||||
|
||||
---------------
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.0.1. "Commercial Use" means distribution or otherwise making the
|
||||
Covered Code available to a third party.
|
||||
|
||||
1.1. "Contributor" means each entity that creates or contributes to
|
||||
the creation of Modifications.
|
||||
|
||||
1.2. "Contributor Version" means the combination of the Original
|
||||
Code, prior Modifications used by a Contributor, and the Modifications
|
||||
made by that particular Contributor.
|
||||
|
||||
1.3. "Covered Code" means the Original Code or Modifications or the
|
||||
combination of the Original Code and Modifications, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.4. "Electronic Distribution Mechanism" means a mechanism generally
|
||||
accepted in the software development community for the electronic
|
||||
transfer of data.
|
||||
|
||||
1.5. "Executable" means Covered Code in any form other than Source
|
||||
Code.
|
||||
|
||||
1.6. "Initial Developer" means the individual or entity identified
|
||||
as the Initial Developer in the Source Code notice required by Exhibit
|
||||
A.
|
||||
|
||||
1.7. "Larger Work" means a work which combines Covered Code or
|
||||
portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. "License" means this document.
|
||||
|
||||
1.8.1. "Licensable" means having the right to grant, to the maximum
|
||||
extent possible, whether at the time of the initial grant or
|
||||
subsequently acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.9. "Modifications" means any addition to or deletion from the
|
||||
substance or structure of either the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files, a
|
||||
Modification is:
|
||||
A. Any addition to or deletion from the contents of a file
|
||||
containing Original Code or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.10. "Original Code" means Source Code of computer software code
|
||||
which is described in the Source Code notice required by Exhibit A as
|
||||
Original Code, and which, at the time of its release under this
|
||||
License is not already Covered Code governed by this License.
|
||||
|
||||
1.10.1. "Patent Claims" means any patent claim(s), now owned or
|
||||
hereafter acquired, including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by grantor.
|
||||
|
||||
1.11. "Source Code" means the preferred form of the Covered Code for
|
||||
making modifications to it, including all modules it contains, plus
|
||||
any associated interface definition files, scripts used to control
|
||||
compilation and installation of an Executable, or source code
|
||||
differential comparisons against either the Original Code or another
|
||||
well known, available Covered Code of the Contributor's choice. The
|
||||
Source Code can be in a compressed or archival form, provided the
|
||||
appropriate decompression or de-archiving software is widely available
|
||||
for no charge.
|
||||
|
||||
1.12. "You" (or "Your") means an individual or a legal entity
|
||||
exercising rights under, and complying with all of the terms of, this
|
||||
License or a future version of this License issued under Section 6.1.
|
||||
For legal entities, "You" includes any entity which controls, is
|
||||
controlled by, or is under common control with You. For purposes of
|
||||
this definition, "control" means (a) the power, direct or indirect,
|
||||
to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (b) ownership of more than fifty percent
|
||||
(50%) of the outstanding shares or beneficial ownership of such
|
||||
entity.
|
||||
|
||||
2. Source Code License.
|
||||
|
||||
2.1. The Initial Developer Grant.
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Initial Developer to use, reproduce,
|
||||
modify, display, perform, sublicense and distribute the Original
|
||||
Code (or portions thereof) with or without Modifications, and/or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patents Claims infringed by the making, using or
|
||||
selling of Original Code, to make, have made, use, practice,
|
||||
sell, and offer for sale, and/or otherwise dispose of the
|
||||
Original Code (or portions thereof).
|
||||
|
||||
(c) the licenses granted in this Section 2.1(a) and (b) are
|
||||
effective on the date Initial Developer first distributes
|
||||
Original Code under the terms of this License.
|
||||
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is
|
||||
granted: 1) for code that You delete from the Original Code; 2)
|
||||
separate from the Original Code; or 3) for infringements caused
|
||||
by: i) the modification of the Original Code or ii) the
|
||||
combination of the Original Code with other software or devices.
|
||||
|
||||
2.2. Contributor Grant.
|
||||
Subject to third party intellectual property claims, each Contributor
|
||||
hereby grants You a world-wide, royalty-free, non-exclusive license
|
||||
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Contributor, to use, reproduce, modify,
|
||||
display, perform, sublicense and distribute the Modifications
|
||||
created by such Contributor (or portions thereof) either on an
|
||||
unmodified basis, with other Modifications, as Covered Code
|
||||
and/or as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using, or
|
||||
selling of Modifications made by that Contributor either alone
|
||||
and/or in combination with its Contributor Version (or portions
|
||||
of such combination), to make, use, sell, offer for sale, have
|
||||
made, and/or otherwise dispose of: 1) Modifications made by that
|
||||
Contributor (or portions thereof); and 2) the combination of
|
||||
Modifications made by that Contributor with its Contributor
|
||||
Version (or portions of such combination).
|
||||
|
||||
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
|
||||
effective on the date Contributor first makes Commercial Use of
|
||||
the Covered Code.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
||||
granted: 1) for any code that Contributor has deleted from the
|
||||
Contributor Version; 2) separate from the Contributor Version;
|
||||
3) for infringements caused by: i) third party modifications of
|
||||
Contributor Version or ii) the combination of Modifications made
|
||||
by that Contributor with other software (except as part of the
|
||||
Contributor Version) or other devices; or 4) under Patent Claims
|
||||
infringed by Covered Code in the absence of Modifications made by
|
||||
that Contributor.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
The Modifications which You create or to which You contribute are
|
||||
governed by the terms of this License, including without limitation
|
||||
Section 2.2. The Source Code version of Covered Code may be
|
||||
distributed only under the terms of this License or a future version
|
||||
of this License released under Section 6.1, and You must include a
|
||||
copy of this License with every copy of the Source Code You
|
||||
distribute. You may not offer or impose any terms on any Source Code
|
||||
version that alters or restricts the applicable version of this
|
||||
License or the recipients' rights hereunder. However, You may include
|
||||
an additional document offering the additional rights described in
|
||||
Section 3.5.
|
||||
|
||||
3.2. Availability of Source Code.
|
||||
Any Modification which You create or to which You contribute must be
|
||||
made available in Source Code form under the terms of this License
|
||||
either on the same media as an Executable version or via an accepted
|
||||
Electronic Distribution Mechanism to anyone to whom you made an
|
||||
Executable version available; and if made available via Electronic
|
||||
Distribution Mechanism, must remain available for at least twelve (12)
|
||||
months after the date it initially became available, or at least six
|
||||
(6) months after a subsequent version of that particular Modification
|
||||
has been made available to such recipients. You are responsible for
|
||||
ensuring that the Source Code version remains available even if the
|
||||
Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
You must cause all Covered Code to which You contribute to contain a
|
||||
file documenting the changes You made to create that Covered Code and
|
||||
the date of any change. You must include a prominent statement that
|
||||
the Modification is derived, directly or indirectly, from Original
|
||||
Code provided by the Initial Developer and including the name of the
|
||||
Initial Developer in (a) the Source Code, and (b) in any notice in an
|
||||
Executable version or related documentation in which You describe the
|
||||
origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
(a) Third Party Claims.
|
||||
If Contributor has knowledge that a license under a third party's
|
||||
intellectual property rights is required to exercise the rights
|
||||
granted by such Contributor under Sections 2.1 or 2.2,
|
||||
Contributor must include a text file with the Source Code
|
||||
distribution titled "LEGAL" which describes the claim and the
|
||||
party making the claim in sufficient detail that a recipient will
|
||||
know whom to contact. If Contributor obtains such knowledge after
|
||||
the Modification is made available as described in Section 3.2,
|
||||
Contributor shall promptly modify the LEGAL file in all copies
|
||||
Contributor makes available thereafter and shall take other steps
|
||||
(such as notifying appropriate mailing lists or newsgroups)
|
||||
reasonably calculated to inform those who received the Covered
|
||||
Code that new knowledge has been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
If Contributor's Modifications include an application programming
|
||||
interface and Contributor has knowledge of patent licenses which
|
||||
are reasonably necessary to implement that API, Contributor must
|
||||
also include this information in the LEGAL file.
|
||||
|
||||
(c) Representations.
|
||||
Contributor represents that, except as disclosed pursuant to
|
||||
Section 3.4(a) above, Contributor believes that Contributor's
|
||||
Modifications are Contributor's original creation(s) and/or
|
||||
Contributor has sufficient rights to grant the rights conveyed by
|
||||
this License.
|
||||
|
||||
3.5. Required Notices.
|
||||
You must duplicate the notice in Exhibit A in each file of the Source
|
||||
Code. If it is not possible to put such notice in a particular Source
|
||||
Code file due to its structure, then You must include such notice in a
|
||||
location (such as a relevant directory) where a user would be likely
|
||||
to look for such a notice. If You created one or more Modification(s)
|
||||
You may add your name as a Contributor to the notice described in
|
||||
Exhibit A. You must also duplicate this License in any documentation
|
||||
for the Source Code where You describe recipients' rights or ownership
|
||||
rights relating to Covered Code. You may choose to offer, and to
|
||||
charge a fee for, warranty, support, indemnity or liability
|
||||
obligations to one or more recipients of Covered Code. However, You
|
||||
may do so only on Your own behalf, and not on behalf of the Initial
|
||||
Developer or any Contributor. You must make it absolutely clear than
|
||||
any such warranty, support, indemnity or liability obligation is
|
||||
offered by You alone, and You hereby agree to indemnify the Initial
|
||||
Developer and every Contributor for any liability incurred by the
|
||||
Initial Developer or such Contributor as a result of warranty,
|
||||
support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
You may distribute Covered Code in Executable form only if the
|
||||
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||
and if You include a notice stating that the Source Code version of
|
||||
the Covered Code is available under the terms of this License,
|
||||
including a description of how and where You have fulfilled the
|
||||
obligations of Section 3.2. The notice must be conspicuously included
|
||||
in any notice in an Executable version, related documentation or
|
||||
collateral in which You describe recipients' rights relating to the
|
||||
Covered Code. You may distribute the Executable version of Covered
|
||||
Code or ownership rights under a license of Your choice, which may
|
||||
contain terms different from this License, provided that You are in
|
||||
compliance with the terms of this License and that the license for the
|
||||
Executable version does not attempt to limit or alter the recipient's
|
||||
rights in the Source Code version from the rights set forth in this
|
||||
License. If You distribute the Executable version under a different
|
||||
license You must make it absolutely clear that any terms which differ
|
||||
from this License are offered by You alone, not by the Initial
|
||||
Developer or any Contributor. You hereby agree to indemnify the
|
||||
Initial Developer and every Contributor for any liability incurred by
|
||||
the Initial Developer or such Contributor as a result of any such
|
||||
terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
You may create a Larger Work by combining Covered Code with other code
|
||||
not governed by the terms of this License and distribute the Larger
|
||||
Work as a single product. In such a case, You must make sure the
|
||||
requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Code due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description
|
||||
must be included in the LEGAL file described in Section 3.4 and must
|
||||
be included with all distributions of the Source Code. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has
|
||||
attached the notice in Exhibit A and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1. New Versions.
|
||||
Netscape Communications Corporation ("Netscape") may publish revised
|
||||
and/or new versions of the License from time to time. Each version
|
||||
will be given a distinguishing version number.
|
||||
|
||||
6.2. Effect of New Versions.
|
||||
Once Covered Code has been published under a particular version of the
|
||||
License, You may always continue to use it under the terms of that
|
||||
version. You may also choose to use such Covered Code under the terms
|
||||
of any subsequent version of the License published by Netscape. No one
|
||||
other than Netscape has the right to modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
If You create or use a modified version of this License (which you may
|
||||
only do in order to apply it to code which is not already Covered Code
|
||||
governed by this License), You must (a) rename Your license so that
|
||||
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
|
||||
"MPL", "NPL" or any confusingly similar phrase do not appear in your
|
||||
license (except to note that your license differs from this License)
|
||||
and (b) otherwise make it clear that Your version of the license
|
||||
contains terms which differ from the Mozilla Public License and
|
||||
Netscape Public License. (Filling in the name of the Initial
|
||||
Developer, Original Code or Contributor in the notice described in
|
||||
Exhibit A shall not of themselves be deemed to be modifications of
|
||||
this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
||||
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
||||
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
||||
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
8.1. This License and the rights granted hereunder will terminate
|
||||
automatically if You fail to comply with terms herein and fail to cure
|
||||
such breach within 30 days of becoming aware of the breach. All
|
||||
sublicenses to the Covered Code which are properly granted shall
|
||||
survive any termination of this License. Provisions which, by their
|
||||
nature, must remain in effect beyond the termination of this License
|
||||
shall survive.
|
||||
|
||||
8.2. If You initiate litigation by asserting a patent infringement
|
||||
claim (excluding declatory judgment actions) against Initial Developer
|
||||
or a Contributor (the Initial Developer or Contributor against whom
|
||||
You file such action is referred to as "Participant") alleging that:
|
||||
|
||||
(a) such Participant's Contributor Version directly or indirectly
|
||||
infringes any patent, then any and all rights granted by such
|
||||
Participant to You under Sections 2.1 and/or 2.2 of this License
|
||||
shall, upon 60 days notice from Participant terminate prospectively,
|
||||
unless if within 60 days after receipt of notice You either: (i)
|
||||
agree in writing to pay Participant a mutually agreeable reasonable
|
||||
royalty for Your past and future use of Modifications made by such
|
||||
Participant, or (ii) withdraw Your litigation claim with respect to
|
||||
the Contributor Version against such Participant. If within 60 days
|
||||
of notice, a reasonable royalty and payment arrangement are not
|
||||
mutually agreed upon in writing by the parties or the litigation claim
|
||||
is not withdrawn, the rights granted by Participant to You under
|
||||
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
|
||||
the 60 day notice period specified above.
|
||||
|
||||
(b) any software, hardware, or device, other than such Participant's
|
||||
Contributor Version, directly or indirectly infringes any patent, then
|
||||
any rights granted to You by such Participant under Sections 2.1(b)
|
||||
and 2.2(b) are revoked effective as of the date You first made, used,
|
||||
sold, distributed, or had made, Modifications made by that
|
||||
Participant.
|
||||
|
||||
8.3. If You assert a patent infringement claim against Participant
|
||||
alleging that such Participant's Contributor Version directly or
|
||||
indirectly infringes any patent where such claim is resolved (such as
|
||||
by license or settlement) prior to the initiation of patent
|
||||
infringement litigation, then the reasonable value of the licenses
|
||||
granted by such Participant under Sections 2.1 or 2.2 shall be taken
|
||||
into account in determining the amount or value of any payment or
|
||||
license.
|
||||
|
||||
8.4. In the event of termination under Sections 8.1 or 8.2 above,
|
||||
all end user license agreements (excluding distributors and resellers)
|
||||
which have been validly granted by You or any distributor hereunder
|
||||
prior to termination shall survive termination.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
|
||||
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
||||
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
|
||||
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
||||
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
||||
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
||||
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a "commercial item," as that term is defined in
|
||||
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
|
||||
software" and "commercial computer software documentation," as such
|
||||
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||
all U.S. Government End Users acquire Covered Code with only those
|
||||
rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by
|
||||
California law provisions (except to the extent applicable law, if
|
||||
any, provides otherwise), excluding its conflict-of-law provisions.
|
||||
With respect to disputes in which at least one party is a citizen of,
|
||||
or an entity chartered or registered to do business in the United
|
||||
States of America, any litigation relating to this License shall be
|
||||
subject to the jurisdiction of the Federal Courts of the Northern
|
||||
District of California, with venue lying in Santa Clara County,
|
||||
California, with the losing party responsible for costs, including
|
||||
without limitation, court costs and reasonable attorneys' fees and
|
||||
expenses. The application of the United Nations Convention on
|
||||
Contracts for the International Sale of Goods is expressly excluded.
|
||||
Any law or regulation which provides that the language of a contract
|
||||
shall be construed against the drafter shall not apply to this
|
||||
License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
As between Initial Developer and the Contributors, each party is
|
||||
responsible for claims and damages arising, directly or indirectly,
|
||||
out of its utilization of rights under this License and You agree to
|
||||
work with Initial Developer and Contributors to distribute such
|
||||
responsibility on an equitable basis. Nothing herein is intended or
|
||||
shall be deemed to constitute any admission of liability.
|
||||
|
||||
13. MULTIPLE-LICENSED CODE.
|
||||
|
||||
Initial Developer may designate portions of the Covered Code as
|
||||
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
|
||||
Developer permits you to utilize portions of the Covered Code under
|
||||
Your choice of the NPL or the alternative licenses, if any, specified
|
||||
by the Initial Developer in the file described in Exhibit A.
|
||||
|
||||
EXHIBIT A -Mozilla Public License.
|
||||
|
||||
``The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Original Code is ______________________________________.
|
||||
|
||||
The Initial Developer of the Original Code is ________________________.
|
||||
Portions created by ______________________ are Copyright (C) ______
|
||||
_______________________. All Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms
|
||||
of the _____ license (the "[___] License"), in which case the
|
||||
provisions of [______] License are applicable instead of those
|
||||
above. If you wish to allow use of your version of this file only
|
||||
under the terms of the [____] License and not to allow others to use
|
||||
your version of this file under the MPL, indicate your decision by
|
||||
deleting the provisions above and replace them with the notice and
|
||||
other provisions required by the [___] License. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file
|
||||
under either the MPL or the [___] License."
|
||||
|
||||
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
||||
the notices in the Source Code files of the Original Code. You should
|
||||
use the text of this Exhibit A rather than the text found in the
|
||||
Original Code Source Code for Your Modifications.]
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AMENDMENTS
|
||||
|
||||
The Netscape Public License Version 1.1 ("NPL") consists of the
|
||||
Mozilla Public License Version 1.1 with the following Amendments,
|
||||
including Exhibit A-Netscape Public License. Files identified with
|
||||
"Exhibit A-Netscape Public License" are governed by the Netscape
|
||||
Public License Version 1.1.
|
||||
|
||||
Additional Terms applicable to the Netscape Public License.
|
||||
I. Effect.
|
||||
These additional terms described in this Netscape Public
|
||||
License -- Amendments shall apply to the Mozilla Communicator
|
||||
client code and to all Covered Code under this License.
|
||||
|
||||
II. "Netscape's Branded Code" means Covered Code that Netscape
|
||||
distributes and/or permits others to distribute under one or more
|
||||
trademark(s) which are controlled by Netscape but which are not
|
||||
licensed for use under this License.
|
||||
|
||||
III. Netscape and logo.
|
||||
This License does not grant any rights to use the trademarks
|
||||
"Netscape", the "Netscape N and horizon" logo or the "Netscape
|
||||
lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
|
||||
"Smart Browsing" even if such marks are included in the Original
|
||||
Code or Modifications.
|
||||
|
||||
IV. Inability to Comply Due to Contractual Obligation.
|
||||
Prior to licensing the Original Code under this License, Netscape
|
||||
has licensed third party code for use in Netscape's Branded Code.
|
||||
To the extent that Netscape is limited contractually from making
|
||||
such third party code available under this License, Netscape may
|
||||
choose to reintegrate such code into Covered Code without being
|
||||
required to distribute such code in Source Code form, even if
|
||||
such code would otherwise be considered "Modifications" under
|
||||
this License.
|
||||
|
||||
V. Use of Modifications and Covered Code by Initial Developer.
|
||||
V.1. In General.
|
||||
The obligations of Section 3 apply to Netscape, except to
|
||||
the extent specified in this Amendment, Section V.2 and V.3.
|
||||
|
||||
V.2. Other Products.
|
||||
Netscape may include Covered Code in products other than the
|
||||
Netscape's Branded Code which are released by Netscape
|
||||
during the two (2) years following the release date of the
|
||||
Original Code, without such additional products becoming
|
||||
subject to the terms of this License, and may license such
|
||||
additional products on different terms from those contained
|
||||
in this License.
|
||||
|
||||
V.3. Alternative Licensing.
|
||||
Netscape may license the Source Code of Netscape's Branded
|
||||
Code, including Modifications incorporated therein, without
|
||||
such Netscape Branded Code becoming subject to the terms of
|
||||
this License, and may license such Netscape Branded Code on
|
||||
different terms from those contained in this License.
|
||||
|
||||
VI. Litigation.
|
||||
Notwithstanding the limitations of Section 11 above, the
|
||||
provisions regarding litigation in Section 11(a), (b) and (c) of
|
||||
the License shall apply to all disputes relating to this License.
|
||||
|
||||
EXHIBIT A-Netscape Public License.
|
||||
|
||||
"The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.
|
||||
|
||||
Alternatively, the contents of this file may be used under the
|
||||
terms of the _____ license (the "[___] License"), in which case
|
||||
the provisions of [______] License are applicable instead of
|
||||
those above. If you wish to allow use of your version of this
|
||||
file only under the terms of the [____] License and not to allow
|
||||
others to use your version of this file under the NPL, indicate
|
||||
your decision by deleting the provisions above and replace them
|
||||
with the notice and other provisions required by the [___]
|
||||
License. If you do not delete the provisions above, a recipient
|
||||
may use your version of this file under either the NPL or the
|
||||
[___] License."
|
||||
383
mozilla/Makefile.in
Normal file
383
mozilla/Makefile.in
Normal file
@@ -0,0 +1,383 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations 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_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_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_EXTENSIONS
|
||||
tier_9_dirs += extensions
|
||||
endif
|
||||
|
||||
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_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/ldap
|
||||
|
||||
ifdef MOZ_PSM
|
||||
STATIC_MAKEFILES += security/nss
|
||||
endif
|
||||
|
||||
GARBAGE_DIRS += dist
|
||||
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
|
||||
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
|
||||
unallmakefiles \
|
||||
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
|
||||
|
||||
ifeq ($(BUILD_MODULES),all)
|
||||
# Build psuedo-external modules first when export is explicitly called
|
||||
export::
|
||||
$(MAKE) -C config export
|
||||
$(MAKE) nspr
|
||||
$(MAKE) ldap
|
||||
ifdef MOZ_ENABLE_XFT
|
||||
$(MAKE) freetype
|
||||
$(MAKE) expat
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq ($(BUILD_MODULES),all)
|
||||
# Clean up after psuedo-external modules
|
||||
clean clobber realclean clobber_all distclean::
|
||||
ifndef MOZ_NATIVE_NSPR
|
||||
$(MAKE) -C nsprpub $@
|
||||
endif
|
||||
ifdef MOZ_LDAP_XPCOM
|
||||
$(MAKE) -C directory/c-sdk/ldap $@
|
||||
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/ldap export
|
||||
$(MAKE) -C directory/c-sdk/ldap install
|
||||
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
|
||||
9
mozilla/README.txt
Normal file
9
mozilla/README.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
======================================================
|
||||
|
||||
Mozilla Read Me
|
||||
|
||||
======================================================
|
||||
|
||||
This is a placeholder file which should be replaced with readme information
|
||||
for each release.
|
||||
2
mozilla/README/IBMChangeLog
Normal file
2
mozilla/README/IBMChangeLog
Normal file
@@ -0,0 +1,2 @@
|
||||
Pursuant to section 3.3 of the MPL, this file will contain a list of the files
|
||||
that have been modified by IBM Corporation.
|
||||
3
mozilla/README/mozilla/README.build
Normal file
3
mozilla/README/mozilla/README.build
Normal file
@@ -0,0 +1,3 @@
|
||||
For mozilla-the-client build instructions, please read:
|
||||
http://www.mozilla.org/build/
|
||||
|
||||
32
mozilla/accessible/Makefile.in
Normal file
32
mozilla/accessible/Makefile.in
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = public src build
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
190
mozilla/accessible/accessible-docs.html
Normal file
190
mozilla/accessible/accessible-docs.html
Normal file
@@ -0,0 +1,190 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
How the Accessible Module works
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>How the Accessible module (accessibility.dll) works</h1>
|
||||
<ul>
|
||||
<p>
|
||||
See also:
|
||||
<a href="http://www.mozilla.org/projects/ui/accessibility/vendors-win.html">Gecko Info for Windows Accessibility Vendors</a>, a primer for vendors of 3rd party accessibility software, on how to use our MSAA and other relevant API's.
|
||||
</p>
|
||||
<p>
|
||||
The <a href="http://lxr.mozilla.org/seamonkey/source/accessible/">Accessible module</a> is where we implement support for the <a href="http://www.microsoft.com/enable/msaa/">Microsoft Active Accessibility (MSAA) API</a>
|
||||
(<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=12952">bug 12952</a>).
|
||||
Support for Sun's <a href="http://www.sun.com/access/gnome/">Gnome Accessibility API</a> is part of our future plans as well.
|
||||
</p>
|
||||
</ul>
|
||||
<h2>What is MSAA?</h2>
|
||||
<ul>
|
||||
<p>
|
||||
A 3rd part accessibility aid, such as a screen reader, wants to track what's happening inside Mozilla. It needs to know about
|
||||
focus changes and other events, and it needs to know whtat data nodes there are in the layout tree.
|
||||
Using this information,
|
||||
the screen reader will speak out loud important changes to the document or UI, and allow the user to track
|
||||
where they navigate. Some screen readers also magnify text and images in the currently focused area, and others
|
||||
show information on a <a href="http://www.audiodata.de/e/produkte/pc/lapbraille/">refreshable braille display</a>.
|
||||
</p>
|
||||
<p>
|
||||
In Windows, accesibility aids acquires the necessary information to do this using hacks and MSAA. MSAA is supposed
|
||||
to be the "right way" for accessibility aids to get information, but sometimes the hacks are more effective.
|
||||
For example, screen readers look for screen draws of a vertical blinking line, to determine the location of the caret.
|
||||
Without doing this, screen readers would not be able to let the user know where there caret has moved to in most programs,
|
||||
because so many applications do not use the system caret (ours is an example). This is so commonly done, that
|
||||
no one even bothers to support the MSAA caret, because the hack works.
|
||||
</p>
|
||||
<p>
|
||||
MSAA provides information in two different ways:
|
||||
<ol>
|
||||
<li>a COM interface (IAccessible) that allows applications to expose the tree of data nodes that make up
|
||||
each window in the user interface currently being interacted with and</li>
|
||||
<li> a set of system messages
|
||||
that confer accessibility-related events such as focus changes, changes to document content and alerts.</li>
|
||||
</ol>
|
||||
</p>
|
||||
<p>
|
||||
To really learn about MSAA, you need to download
|
||||
the entire <a href="http://www.microsoft.com/enable/msaa/download.htm">MSAA SDK</a>.
|
||||
Without downloading the SDK, you won't get the complete documentation.
|
||||
The SDK also contains some very useful tools, such as the Accessible Event Watcher, which shows what accessible
|
||||
events are being generated by a given piece of software. The Accessible Explorer and Inspect Object tools
|
||||
show the tree of data nodes the Accessible object is exposing through COM.
|
||||
</p>
|
||||
</ul>
|
||||
<h2>IAccessible Interface</h2>
|
||||
<ul>
|
||||
<p>
|
||||
The IAccessible interface is used in a tree of IAccessible's, each one representing a data node, similar to a DOM.
|
||||
</p>
|
||||
<p>
|
||||
Here are the methods supported in IAccessible:
|
||||
<ul>
|
||||
<li>get_accParent: Get the parent of an IAccessible.</li>
|
||||
<li>get_accChildCount: Get the number of children of an IAccesible.</li>
|
||||
<li>get_accChild: Get the child of an Iaccessible.</li>
|
||||
<li>get_accName: Get the "name" of the IAccessible, for example the name of a button, checkbox or menuitem.</li>
|
||||
<li>get_accValue: Get the "value" of the IAccessible, for example a number in a slider, a URL for a link, the text a user entered in a field.</li>
|
||||
<li>get_accDescription: Get a long description of the current IAccessible. This is not really too useful.</li>
|
||||
<li>get_accRole: Get an enumerated value representing what this IAccessible is used for, for example.</li>
|
||||
is it a link, static text, editable text, a checkbox, or a table cell, etc.</li>
|
||||
<li>get_accState: a 32 bit field representing possible on/off states, such as focused, fousable, selected, selectable, visible, protected (for passwords),
|
||||
checked, etc. </li>
|
||||
<li>get_accHelp: Get context sensitive help for the IAccessible.</li>
|
||||
<li>get_accHelpTopic: We don't use this, it's only if the Windows help system is used.</li>
|
||||
<li>get_accKeyboardShortcut: What is the keyboard shortcut for this IAccessible.</li>
|
||||
<li>get_accFocus: Which child is focused?</li>
|
||||
<li>get_accSelection: Which children of this item are selected?</li>
|
||||
<li>get_accDefaultAction: Get a description or name of the default action for this component, such as "jump" for links.</li>
|
||||
|
||||
<li>accSelect: Select the item associated with this IAccessible.</li>
|
||||
<li>accLocation: Get the x,y coordinates, and the height and width of this IAccessible node.</li>
|
||||
<li>accNavigate: Navigate up, down, left or right from this IAccessible.</li>
|
||||
<li>accHitTest: Find out what IAccessible exists and a specific coordinate.</li>
|
||||
<li>accDoDefaultAction: Perform the action described by get_accDefaultAction.</li>
|
||||
<li>put_accName: Change the name.</li>
|
||||
<li>put_accValue: Change the value.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</ul>
|
||||
<h2>The Basics</h2>
|
||||
<ul>
|
||||
<p>
|
||||
Rather than directly implement IAccessible with an Accessible class, we have chosen to proxy to our own cross-platform interface,
|
||||
called nsIAccessible, which is more robust. It has the capability of supporting other new accessibility API's such
|
||||
as Sun's Gnome Accessiblity API. The nsIAccessible interface is implemented by a variety of classes for each of the
|
||||
various objects in HTML. Each class is tailored to the specific abilities and properties of the HTML objects it applies to.
|
||||
</p>
|
||||
<p>
|
||||
The first thing that happens when an accessibility aid wants to watch our application is calls the Windows API function
|
||||
AccessibleObjectFromWindow(). This in turns sends the window in question
|
||||
a <a href="http://lxr.mozilla.org/seamonkey/search?string=WM_GETOBJECT">WM_GETOBJECT</a> message requesting an IAccessible for the window.
|
||||
In our case, this event is received in mozilla/widget/src/windows/nsWindow.cpp.
|
||||
We send back an IAccessible interface that represents that root window. The accessibility aid will use
|
||||
that first IAccessible to reach rest of the IAccessible hierarchy, by asking for it's children IAccessibles, asking the children for the
|
||||
grandchildren IAccessibles, and so on. Until this WM_GETOBJECT message is processed, the accessibility.dll is not loaded,
|
||||
so there is almost zero overhead for accessibility in Mozilla.
|
||||
</p>
|
||||
</ul>
|
||||
|
||||
<h2>How the IAccessible's are Created</h2>
|
||||
<ul>
|
||||
<p>
|
||||
To create the root IAccessible for a window the first time it gets the <a href="http://lxr.mozilla.org/seamonkey/search?string=WM_GETOBJECT">WM_GETOBJECT</a> message in,
|
||||
nsWindow.cpp first generates an internal event
|
||||
called <a href="http://lxr.mozilla.org/seamonkey/search?string=NS_GETACCESSIBLE">NS_GETACCESSIBLE</a>,
|
||||
which is handled in nsFrame.cpp via the creation of an nsRootAccessible implementation of the nsIAccessible interface.
|
||||
The first IAccessible is then created by instantiating a RootAccessible class. This RootAccessible is also cached by
|
||||
the nsWindow it's for, so that any additional WM_GETOBJECT messages use the same RootAccessible.
|
||||
The RootAccessible class used to implement IAccessible here is slightly different from the normal Accessible class
|
||||
that's used, in that it keeps track of event data.
|
||||
RootAccessible and Accessible are both implemented
|
||||
in <a href="http://lxr.mozilla.org/seamonkey/source/widget/source/windows/Accessible.cpp">
|
||||
mozilla/widget/src/windows/Accessible.cpp</a>).
|
||||
</P>
|
||||
</ul>
|
||||
<h2>The Real Power Behind IAccessible's</h2>
|
||||
<ul>
|
||||
<p>The implementations of IAccessible (Accessible and RootAccessible), don't know anything about Mozilla
|
||||
objects. They merely proxy to our cross platform accessibility classes, which all have an nsIAccessible interface.
|
||||
</h2>
|
||||
<p>
|
||||
The base implementation for nsIAccessible is called nsAccessible. It has default implementations for all the
|
||||
nsIAccessible methods. It also knows how
|
||||
to walk Mozilla's content DOM and frame tree, exposing only the objects that are needed for accessibility.
|
||||
Essentially, nsAccessible knows what it needs to expose by asking each DOM node's primary frame for
|
||||
an nsIAccessible, using the GetAccessible() method. If it gets one, it's considered an accessible object.
|
||||
A frame that wishes to return
|
||||
an nsIAccessible GetAccessible() is called, creates one of the correct type on the fly using
|
||||
nsIAccessibilityService methods built for that purpose.
|
||||
</p>
|
||||
<p>
|
||||
The specific implementations
|
||||
of nsIAccessible for each widget or content type inherit from nsAccessible.
|
||||
Each implementation then overrides those methods
|
||||
it wishes to implement, and does nothing for those methods it wants the default behavior for.
|
||||
For example, the default behavior for nsIAccessible::getAccFirstChild is to
|
||||
instantial a nsDOMTreeWalker, and ask it for the first child. However, nsImageAccessible overrides getAccFirstChild,
|
||||
returning the first area of an image map if there is one, otherwise nsnull.
|
||||
</p>
|
||||
|
||||
</ul>
|
||||
<h2>MSAA Events</h2>
|
||||
<ul>
|
||||
<p>
|
||||
When an accessibility-related event occurs within an application such as Mozilla, it must use NotifyWinEvent from
|
||||
the Win32 API. NotifyWinEvent is passed arguments for the window the event occured in, and the number of the child
|
||||
within that window. Accessibility aids use the Win32 call SetWinEventHook() to register as a listener for these events.
|
||||
</p>
|
||||
<p>
|
||||
The accessibility aid is choose which events it is interested in learning more about by using the Win32 API call
|
||||
AccessibleObjectFromEvent, requesting the IAccessible to the node corresponding to the
|
||||
child number that had been indicated from NotifyWinEvent(). This ends up asking our RootAccessible for the child
|
||||
IAccessible that matches the window handle and child id we indicated through NotofyWinEvent().
|
||||
</p>
|
||||
<p>
|
||||
In Mozilla, this creates a problem. We cannot
|
||||
keep track of a child number for every important accessible node in a document. We deal with this by generating fake
|
||||
child IDs for the most recent accessibile events that we have generated, in a circular array.
|
||||
</p>
|
||||
<p>
|
||||
Since there is a RootAccessible for each top level window that might generate MSAA events, that's where we do the bookkeeping
|
||||
for these events and their nsIAccessible's. Whenever NotifyWinEvent() is called, a new fake ID is generated (We use
|
||||
negative numbers for the fake IDs). When the callback comes to request the IAccessible for that child number,
|
||||
we check the circular array for that ID, and voila, we have the corresponding nsIAccessible to proxy.
|
||||
</p>
|
||||
<p>
|
||||
Every RootAccessible has an nsRootAccessible which is an nsIAccessibleEventReceiver. The RootAccessible
|
||||
uses this to register itself as an nsIAccessibleEventListener. In the end, nsRootAccessible registers itself as a listener
|
||||
of Mozilla's internal and DOM events. It's HandleEvent routine translates these events into MSAA events, and passes them along to
|
||||
with an nsIAccessible to the original RootAccessible::HandleEvent
|
||||
which turns that nsIAccessible into a NotifyWinEvent call, complete with a fake child ID.
|
||||
</p>
|
||||
<p>
|
||||
Most MSAA events aren't utilized by accessibility aids. Therefore we implement only the handful that matter.
|
||||
The most important event is the focus event, followed by name, state and value change events.
|
||||
</p>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
68
mozilla/accessible/build/Makefile.in
Normal file
68
mozilla/accessible/build/Makefile.in
Normal file
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility
|
||||
EXPORT_LIBRARY = 1
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
SHORT_LIBNAME = access
|
||||
endif
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsAccessibilityModule
|
||||
REQUIRES = \
|
||||
xpcom \
|
||||
string \
|
||||
dom \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = nsAccessibilityFactory.cpp
|
||||
|
||||
LOCAL_INCLUDES = -I$(srcdir)/../src
|
||||
|
||||
SHARED_LIBRARY_LIBS = \
|
||||
$(DIST)/lib/$(LIB_PREFIX)accessibility_base_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)accessibility_html_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_XUL
|
||||
SHARED_LIBRARY_LIBS += $(DIST)/lib/$(LIB_PREFIX)accessibility_xul_s.$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
EXTRA_DSO_LIBS = \
|
||||
gkconshared_s \
|
||||
gkgfx \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(LIBS_DIR) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
55
mozilla/accessible/build/makefile.win
Normal file
55
mozilla/accessible/build/makefile.win
Normal file
@@ -0,0 +1,55 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
|
||||
DEPTH=..\..
|
||||
MODULE=accessibility
|
||||
REQUIRES = \
|
||||
xpcom \
|
||||
string \
|
||||
dom \
|
||||
$(NULL)
|
||||
LIBRARY_NAME=accessibility
|
||||
MODULE_NAME=nsAccessibilityModule
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
CPP_OBJS=\
|
||||
.\$(OBJDIR)\nsAccessibilityFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
LINCS = $(LINCS) -I..\src # for implementation headers
|
||||
|
||||
SUB_LIBRARIES=\
|
||||
$(DIST)\lib\accessibility_base_s.lib \
|
||||
$(DIST)\lib\accessibility_html_s.lib \
|
||||
!ifdef MOZ_XUL
|
||||
$(DIST)\lib\accessibility_xul_s.lib \
|
||||
!endif
|
||||
$(NULL)
|
||||
|
||||
LLIBS=\
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\contentshared_s.lib \
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
76
mozilla/accessible/build/nsAccessibilityFactory.cpp
Normal file
76
mozilla/accessible/build/nsAccessibilityFactory.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIModule.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nscore.h"
|
||||
|
||||
static NS_IMETHODIMP
|
||||
NS_ConstructAccessibilityService(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
nsresult rv;
|
||||
NS_ASSERTION(aOuter == nsnull, "no aggregation");
|
||||
nsIAccessibilityService* accessibility;
|
||||
rv = NS_NewAccessibilityService(&accessibility);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("Unable to construct chrome registry");
|
||||
return rv;
|
||||
}
|
||||
rv = accessibility->QueryInterface(aIID, aResult);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
|
||||
NS_RELEASE(accessibility);
|
||||
return rv;
|
||||
}
|
||||
|
||||
// The list of components we register
|
||||
static const nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "AccessibilityService",
|
||||
NS_ACCESSIBILITY_SERVICE_CID,
|
||||
"@mozilla.org/accessibilityService;1",
|
||||
NS_ConstructAccessibilityService
|
||||
},
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(nsAccessibilityModule, components);
|
||||
|
||||
2754
mozilla/accessible/macbuild/accessible.xml
Normal file
2754
mozilla/accessible/macbuild/accessible.xml
Normal file
File diff suppressed because it is too large
Load Diff
1608
mozilla/accessible/macbuild/accessibleIDL.xml
Normal file
1608
mozilla/accessible/macbuild/accessibleIDL.xml
Normal file
File diff suppressed because it is too large
Load Diff
3982
mozilla/accessible/macbuild/accessible_xul.xml
Normal file
3982
mozilla/accessible/macbuild/accessible_xul.xml
Normal file
File diff suppressed because it is too large
Load Diff
26
mozilla/accessible/makefile.win
Normal file
26
mozilla/accessible/makefile.win
Normal file
@@ -0,0 +1,26 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..
|
||||
|
||||
DIRS= public src build
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
2
mozilla/accessible/public/MANIFEST
Normal file
2
mozilla/accessible/public/MANIFEST
Normal file
@@ -0,0 +1,2 @@
|
||||
nsIAccessibilityService.idl
|
||||
nsIAccessible.idl
|
||||
46
mozilla/accessible/public/Makefile.in
Normal file
46
mozilla/accessible/public/Makefile.in
Normal file
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = accessibility
|
||||
XPIDL_MODULE= accessibility
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIAccessibilityService.idl \
|
||||
nsIAccessible.idl \
|
||||
nsIAccessibleDocument.idl \
|
||||
nsIAccessibleEventReceiver.idl \
|
||||
nsIAccessibleEventListener.idl \
|
||||
nsIAccessibleSelectable.idl \
|
||||
nsIAccessibleProvider.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
39
mozilla/accessible/public/makefile.win
Normal file
39
mozilla/accessible/public/makefile.win
Normal file
@@ -0,0 +1,39 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..
|
||||
MODULE=accessibility
|
||||
XPIDL_MODULE=accessibility
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\nsIAccessibilityService.idl \
|
||||
.\nsIAccessible.idl \
|
||||
.\nsIAccessibleDocument.idl \
|
||||
.\nsIAccessibleEventReceiver.idl \
|
||||
.\nsIAccessibleEventListener.idl \
|
||||
.\nsIAccessibleSelectable.idl \
|
||||
.\nsIAccessibleProvider.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
99
mozilla/accessible/public/nsIAccessibilityService.idl
Normal file
99
mozilla/accessible/public/nsIAccessibilityService.idl
Normal file
@@ -0,0 +1,99 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "domstubs.idl"
|
||||
#include "nsIAtom.idl"
|
||||
#include "domstubs.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
|
||||
interface nsIWeakReference;
|
||||
|
||||
[scriptable, uuid(68D9720A-0984-42b6-A3F5-8237ED925727)]
|
||||
interface nsIAccessibilityService : nsISupports
|
||||
{
|
||||
nsIAccessible createAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
|
||||
nsIAccessible createIFrameAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createRootAccessible(in nsISupports aPresContext, in nsISupports aFrame);
|
||||
|
||||
nsIAccessible createHTML4ButtonAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLAreaAccessible(in nsIWeakReference aPresShell, in nsIDOMNode aDOMNode, in nsIAccessible aAccParent);
|
||||
nsIAccessible createHTMLBlockAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
|
||||
nsIAccessible createHTMLButtonAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLCheckboxAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLComboboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
|
||||
nsIAccessible createHTMLGroupboxAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLImageAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLListboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
|
||||
// new
|
||||
// nsIAccessible CreateHTMLObjectAccessible(in nsISupports aFrame);
|
||||
// end new
|
||||
nsIAccessible createHTMLRadioButtonAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsISupports aPresShell);
|
||||
nsIAccessible createHTMLTableAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLTableCellAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLTextAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLTextFieldAccessible(in nsISupports aFrame);
|
||||
|
||||
nsIAccessible createXULButtonAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULCheckboxAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULColorPickerAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULColorPickerTileAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULComboboxAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULDropmarkerAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULGroupboxAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULImageAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULListboxAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULListitemAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULMenubarAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULMenuitemAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULMenupopupAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULMenuSeparatorAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULProgressMeterAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULStatusBarAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULRadioButtonAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULRadioGroupAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULSelectOptionAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULSelectListAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTabAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTabBoxAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTabPanelsAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTabsAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTextAccessible(in nsIDOMNode aNode);
|
||||
|
||||
nsIAccessible getAccessibleFor(in nsIDOMNode aNode);
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
|
||||
// for component registration
|
||||
// {DE401C37-9A7F-4278-A6F8-3DE2833989EF}
|
||||
#define NS_ACCESSIBILITY_SERVICE_CID \
|
||||
{ 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } }
|
||||
|
||||
extern nsresult
|
||||
NS_NewAccessibilityService(nsIAccessibilityService** aResult);
|
||||
|
||||
%}
|
||||
193
mozilla/accessible/public/nsIAccessible.idl
Normal file
193
mozilla/accessible/public/nsIAccessible.idl
Normal file
@@ -0,0 +1,193 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Eric D Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
* Aaron Leventhal
|
||||
* John Gaunt
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIDOMNode.idl"
|
||||
#include "domstubs.idl"
|
||||
|
||||
[scriptable, uuid(B26FBE47-9A5F-42a1-822B-082461AE4D6D)]
|
||||
interface nsIAccessible : nsISupports
|
||||
{
|
||||
readonly attribute nsIAccessible accParent;
|
||||
readonly attribute nsIAccessible accNextSibling;
|
||||
readonly attribute nsIAccessible accPreviousSibling;
|
||||
readonly attribute nsIAccessible accFirstChild;
|
||||
readonly attribute nsIAccessible accLastChild;
|
||||
|
||||
readonly attribute long accChildCount;
|
||||
attribute DOMString accName;
|
||||
readonly attribute DOMString accValue;
|
||||
|
||||
readonly attribute DOMString accDescription;
|
||||
readonly attribute unsigned long accRole;
|
||||
readonly attribute unsigned long accState;
|
||||
readonly attribute unsigned long accExtState;
|
||||
|
||||
readonly attribute DOMString accHelp;
|
||||
readonly attribute nsIAccessible accFocused;
|
||||
|
||||
nsIAccessible accGetAt(in long x, in long y);
|
||||
|
||||
nsIAccessible accNavigateRight();
|
||||
nsIAccessible accNavigateLeft();
|
||||
nsIAccessible accNavigateUp();
|
||||
nsIAccessible accNavigateDown();
|
||||
|
||||
void accGetBounds(out long x,
|
||||
out long y,
|
||||
out long width,
|
||||
out long height);
|
||||
|
||||
void accAddSelection();
|
||||
void accRemoveSelection();
|
||||
void accExtendSelection();
|
||||
void accTakeSelection();
|
||||
void accTakeFocus();
|
||||
|
||||
readonly attribute PRUint8 accNumActions;
|
||||
DOMString getAccActionName(in PRUint8 index);
|
||||
void accDoAction(in PRUint8 index); // Action number 0 is the default action
|
||||
|
||||
nsIDOMNode accGetDOMNode();
|
||||
|
||||
// Used by Accessible implementation to save data and speed up accessibility tree walking
|
||||
[noscript] void CacheOptimizations(in nsIAccessible aParent, in PRInt32 aSiblingIndex, in nsIDOMNodeList aSiblingList);
|
||||
|
||||
// MSAA State flags - used for bitfield. More than 1 allowed.
|
||||
const unsigned long STATE_UNAVAILABLE = 0x00000001; // Disabled, maps to opposite of Java ENABLED, Gnome/ATK SENSITIVE?
|
||||
const unsigned long STATE_SELECTED = 0x00000002;
|
||||
const unsigned long STATE_FOCUSED = 0x00000004;
|
||||
const unsigned long STATE_PRESSED = 0x00000008;
|
||||
const unsigned long STATE_CHECKED = 0x00000010;
|
||||
const unsigned long STATE_MIXED = 0x00000020; // 3-state checkbox or toolbar button
|
||||
const unsigned long STATE_READONLY = 0x00000040; // Maps to opposite of Java/Gnome/ATK EDITABLE state
|
||||
const unsigned long STATE_HOTTRACKED = 0x00000080;
|
||||
const unsigned long STATE_DEFAULT = 0x00000100;
|
||||
const unsigned long STATE_EXPANDED = 0x00000200;
|
||||
const unsigned long STATE_COLLAPSED = 0x00000400;
|
||||
const unsigned long STATE_BUSY = 0x00000800;
|
||||
const unsigned long STATE_FLOATING = 0x00001000; // Children "owned" not "contained" by parent
|
||||
const unsigned long STATE_MARQUEED = 0x00002000;
|
||||
const unsigned long STATE_ANIMATED = 0x00004000;
|
||||
const unsigned long STATE_INVISIBLE = 0x00008000;
|
||||
const unsigned long STATE_OFFSCREEN = 0x00010000;
|
||||
const unsigned long STATE_SIZEABLE = 0x00020000;
|
||||
const unsigned long STATE_MOVEABLE = 0x00040000;
|
||||
const unsigned long STATE_SELFVOICING = 0x00080000;
|
||||
const unsigned long STATE_FOCUSABLE = 0x00100000;
|
||||
const unsigned long STATE_SELECTABLE = 0x00200000;
|
||||
const unsigned long STATE_LINKED = 0x00400000;
|
||||
const unsigned long STATE_TRAVERSED = 0x00800000;
|
||||
const unsigned long STATE_MULTISELECTABLE = 0x01000000; // Supports multiple selection
|
||||
const unsigned long STATE_EXTSELECTABLE = 0x02000000; // Supports extended selection
|
||||
const unsigned long STATE_ALERT_LOW = 0x04000000; // This information is of low priority
|
||||
const unsigned long STATE_ALERT_MEDIUM = 0x08000000; // This information is of medium priority
|
||||
const unsigned long STATE_ALERT_HIGH = 0x10000000; // This information is of high priority
|
||||
const unsigned long STATE_PROTECTED = 0x20000000; // Maps to Gnome's *Role* ATK_ROLE_PASSWD_TEXT, nothing for Java?
|
||||
const unsigned long STATE_HASPOPUP = 0x40000000; // New in MSAA 2.0
|
||||
|
||||
// Extended state flags (for now non-MSAA, for Java and Gnome/ATK support)
|
||||
// This is only the states that there isn't already a mapping for in MSAA
|
||||
// See www.accessmozilla.org/article.php?sid=11 for information on the mappings between accessibility API states
|
||||
const unsigned long STATE_INVALID = 0x00200000; // No explanation given
|
||||
const unsigned long STATE_ACTIVE = 0x00400000; // This window is currently the active window
|
||||
const unsigned long STATE_EXPANDABLE = 0x00800000; // An item that can be expanded, such as a tree item with children
|
||||
const unsigned long STATE_MODAL = 0x01000000; // Must do something with control before leaving it
|
||||
const unsigned long STATE_MULTI_LINE = 0x02000000; // Edit control that can take multiple lines
|
||||
const unsigned long STATE_SENSITIVE = 0x04000000; // No explanation given
|
||||
const unsigned long STATE_RESIZABLE = 0x08000000; // Object can be resized
|
||||
const unsigned long STATE_SHOWING = 0x10000000; // This object and all of it's ancestors are visible
|
||||
const unsigned long STATE_SINGLE_LINE = 0x20000000; // This text object can only contain 1 line of text
|
||||
const unsigned long STATE_TRANSIENT = 0x40000000; // Tells accessibility aid "Don't add event listener - this object doesn't generate any". For example, could be used with higher level containers.
|
||||
const unsigned long STATE_VERTICAL = 0x80000000; // Especially used for sliders and scrollbars
|
||||
|
||||
|
||||
// MSAA Roles - only one per nsIAccessible or IAccessible
|
||||
const unsigned long ROLE_TITLEBAR = 0x00000001;
|
||||
const unsigned long ROLE_MENUBAR = 0x00000002;
|
||||
const unsigned long ROLE_SCROLLBAR = 0x00000003;
|
||||
const unsigned long ROLE_GRIP = 0x00000004;
|
||||
const unsigned long ROLE_SOUND = 0x00000005;
|
||||
const unsigned long ROLE_CURSOR = 0x00000006;
|
||||
const unsigned long ROLE_CARET = 0x00000007;
|
||||
const unsigned long ROLE_ALERT = 0x00000008;
|
||||
const unsigned long ROLE_WINDOW = 0x00000009;
|
||||
const unsigned long ROLE_CLIENT = 0x0000000A;
|
||||
const unsigned long ROLE_MENUPOPUP = 0x0000000B;
|
||||
const unsigned long ROLE_MENUITEM = 0x0000000C;
|
||||
const unsigned long ROLE_TOOLTIP = 0x0000000D;
|
||||
const unsigned long ROLE_APPLICATION = 0x0000000E;
|
||||
const unsigned long ROLE_DOCUMENT = 0x0000000F;
|
||||
const unsigned long ROLE_PANE = 0x00000010;
|
||||
const unsigned long ROLE_CHART = 0x00000011;
|
||||
const unsigned long ROLE_DIALOG = 0x00000012;
|
||||
const unsigned long ROLE_BORDER = 0x00000013;
|
||||
const unsigned long ROLE_GROUPING = 0x00000014;
|
||||
const unsigned long ROLE_SEPARATOR = 0x00000015;
|
||||
const unsigned long ROLE_TOOLBAR = 0x00000016;
|
||||
const unsigned long ROLE_STATUSBAR = 0x00000017;
|
||||
const unsigned long ROLE_TABLE = 0x00000018;
|
||||
const unsigned long ROLE_COLUMNHEADER = 0x00000019;
|
||||
const unsigned long ROLE_ROWHEADER = 0x0000001A;
|
||||
const unsigned long ROLE_COLUMN = 0x0000001B;
|
||||
const unsigned long ROLE_ROW = 0x0000001C;
|
||||
const unsigned long ROLE_CELL = 0x0000001D;
|
||||
const unsigned long ROLE_LINK = 0x0000001E;
|
||||
const unsigned long ROLE_HELPBALLOON = 0x0000001F;
|
||||
const unsigned long ROLE_CHARACTER = 0x00000020;
|
||||
const unsigned long ROLE_LIST = 0x00000021;
|
||||
const unsigned long ROLE_LISTITEM = 0x00000022;
|
||||
const unsigned long ROLE_OUTLINE = 0x00000023;
|
||||
const unsigned long ROLE_OUTLINEITEM = 0x00000024;
|
||||
const unsigned long ROLE_PAGETAB = 0x00000025;
|
||||
const unsigned long ROLE_PROPERTYPAGE = 0x00000026;
|
||||
const unsigned long ROLE_INDICATOR = 0x00000027;
|
||||
const unsigned long ROLE_GRAPHIC = 0x00000028;
|
||||
const unsigned long ROLE_STATICTEXT = 0x00000029;
|
||||
const unsigned long ROLE_TEXT = 0x0000002A; // Editable, selectable, etc.
|
||||
const unsigned long ROLE_PUSHBUTTON = 0x0000002B;
|
||||
const unsigned long ROLE_CHECKBUTTON = 0x0000002C;
|
||||
const unsigned long ROLE_RADIOBUTTON = 0x0000002D;
|
||||
const unsigned long ROLE_COMBOBOX = 0x0000002E;
|
||||
const unsigned long ROLE_DROPLIST = 0x0000002F;
|
||||
const unsigned long ROLE_PROGRESSBAR = 0x00000030;
|
||||
const unsigned long ROLE_DIAL = 0x00000031;
|
||||
const unsigned long ROLE_HOTKEYFIELD = 0x00000032;
|
||||
const unsigned long ROLE_SLIDER = 0x00000033;
|
||||
const unsigned long ROLE_SPINBUTTON = 0x00000034;
|
||||
const unsigned long ROLE_DIAGRAM = 0x00000035;
|
||||
const unsigned long ROLE_ANIMATION = 0x00000036;
|
||||
const unsigned long ROLE_EQUATION = 0x00000037;
|
||||
const unsigned long ROLE_BUTTONDROPDOWN = 0x00000038;
|
||||
const unsigned long ROLE_BUTTONMENU = 0x00000039;
|
||||
const unsigned long ROLE_BUTTONDROPDOWNGRID = 0x0000003A;
|
||||
const unsigned long ROLE_WHITESPACE = 0x0000003B;
|
||||
const unsigned long ROLE_PAGETABLIST = 0x0000003C;
|
||||
const unsigned long ROLE_CLOCK = 0x0000003D;
|
||||
const unsigned long ROLE_SPLITBUTTON = 0x0000003E; // New in MSAA 2.0
|
||||
const unsigned long ROLE_IPADDRESS = 0x0000003F; // New in MSAA 2.0
|
||||
const unsigned long ROLE_NOTHING = 0xffffffff;
|
||||
};
|
||||
41
mozilla/accessible/public/nsIAccessibleDocument.idl
Normal file
41
mozilla/accessible/public/nsIAccessibleDocument.idl
Normal file
@@ -0,0 +1,41 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Aaron Leventhal
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
#include "domstubs.idl"
|
||||
interface nsIDocument;
|
||||
|
||||
[scriptable, uuid(8781FC88-355F-4439-881F-6504A0A1CEB6)]
|
||||
interface nsIAccessibleDocument : nsISupports
|
||||
{
|
||||
readonly attribute DOMString URL;
|
||||
readonly attribute DOMString title;
|
||||
readonly attribute DOMString mimeType;
|
||||
readonly attribute DOMString docType;
|
||||
DOMString getNameSpaceURIForID(in short nameSpaceID);
|
||||
[noscript] nsIDocument getDocument();
|
||||
|
||||
};
|
||||
45
mozilla/accessible/public/nsIAccessibleEventListener.idl
Normal file
45
mozilla/accessible/public/nsIAccessibleEventListener.idl
Normal file
@@ -0,0 +1,45 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Eric D Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
|
||||
[scriptable, uuid(BEE49E7D-9D06-49bf-8984-1694C697D74F)]
|
||||
interface nsIAccessibleEventListener : nsISupports
|
||||
{
|
||||
// these are set to the values given by MSAA
|
||||
const unsigned long EVENT_FOCUS = 0x8005;
|
||||
const unsigned long EVENT_STATE_CHANGE = 0x800A;
|
||||
const unsigned long EVENT_NAME_CHANGE = 0x800C;
|
||||
const unsigned long EVENT_SELECTION = 0x8006;
|
||||
const unsigned long EVENT_SELECTION_ADD = 0x8007;
|
||||
const unsigned long EVENT_SELECTION_REMOVE = 0x8008;
|
||||
const unsigned long EVENT_SELECTION_WITHIN = 0x8009;
|
||||
const unsigned long EVENT_MENUSTART = 0x0004;
|
||||
const unsigned long EVENT_MENUEND = 0x0005;
|
||||
const unsigned long EVENT_MENUPOPUPSTART = 0x0006;
|
||||
const unsigned long EVENT_MENUPOPUPEND = 0x0007;
|
||||
|
||||
void handleEvent(in unsigned long aEvent, in nsIAccessible aTarget);
|
||||
};
|
||||
32
mozilla/accessible/public/nsIAccessibleEventReceiver.idl
Normal file
32
mozilla/accessible/public/nsIAccessibleEventReceiver.idl
Normal file
@@ -0,0 +1,32 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Eric D Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsIAccessibleEventListener.idl"
|
||||
|
||||
[scriptable, uuid(AB331E47-4FAA-4a12-9480-9B480DD78B39)]
|
||||
interface nsIAccessibleEventReceiver : nsISupports
|
||||
{
|
||||
void addAccessibleEventListener(in nsIAccessibleEventListener aListener);
|
||||
void removeAccessibleEventListener();
|
||||
};
|
||||
33
mozilla/accessible/public/nsIAccessibleProvider.idl
Normal file
33
mozilla/accessible/public/nsIAccessibleProvider.idl
Normal file
@@ -0,0 +1,33 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
|
||||
[scriptable, uuid(3f0e3eb0-1dd2-11b2-9605-be5b8e76cf4b)]
|
||||
interface nsIAccessibleProvider : nsISupports
|
||||
{
|
||||
readonly attribute nsIAccessible accessible;
|
||||
};
|
||||
34
mozilla/accessible/public/nsIAccessibleSelectable.idl
Normal file
34
mozilla/accessible/public/nsIAccessibleSelectable.idl
Normal file
@@ -0,0 +1,34 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
#include "nsISupportsArray.idl"
|
||||
|
||||
[scriptable, uuid(34d268d6-1dd2-11b2-9d63-83a5e0ada290)]
|
||||
interface nsIAccessibleSelectable : nsISupports
|
||||
{
|
||||
nsISupportsArray GetSelectedChildren();
|
||||
};
|
||||
39
mozilla/accessible/src/Makefile.in
Normal file
39
mozilla/accessible/src/Makefile.in
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = \
|
||||
base \
|
||||
html \
|
||||
$(null)
|
||||
|
||||
ifdef MOZ_XUL
|
||||
DIRS += xul
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
1
mozilla/accessible/src/base/MANIFEST
Normal file
1
mozilla/accessible/src/base/MANIFEST
Normal file
@@ -0,0 +1 @@
|
||||
accessible.properties
|
||||
77
mozilla/accessible/src/base/Makefile.in
Normal file
77
mozilla/accessible/src/base/Makefile.in
Normal file
@@ -0,0 +1,77 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_base_s
|
||||
REQUIRES = \
|
||||
content \
|
||||
content_xul \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
imglib2 \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
xuldoc \
|
||||
webbrwsr \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
nsAccessibilityService.cpp \
|
||||
nsAccessible.cpp \
|
||||
nsBaseWidgetAccessible.cpp \
|
||||
nsFormControlAccessible.cpp \
|
||||
nsGenericAccessible.cpp \
|
||||
nsRootAccessible.cpp \
|
||||
nsSelectAccessible.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsRootAccessible.h \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir) \
|
||||
-I$(srcdir)/../html \
|
||||
-I$(srcdir)/../xul \
|
||||
$(NULL)
|
||||
8
mozilla/accessible/src/base/accessible.properties
Normal file
8
mozilla/accessible/src/base/accessible.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
jump = Jump
|
||||
press = Press
|
||||
check = Check
|
||||
uncheck = Uncheck
|
||||
select = Select
|
||||
open = Open
|
||||
close = Close
|
||||
switch = Switch
|
||||
3
mozilla/accessible/src/base/jar.mn
Normal file
3
mozilla/accessible/src/base/jar.mn
Normal file
@@ -0,0 +1,3 @@
|
||||
en-win.jar:
|
||||
locale/en-US/global-platform/accessible.properties
|
||||
|
||||
77
mozilla/accessible/src/base/makefile.win
Executable file
77
mozilla/accessible/src/base/makefile.win
Executable file
@@ -0,0 +1,77 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
|
||||
DEPTH = ..\..\..
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_base_s
|
||||
REQUIRES = \
|
||||
content \
|
||||
content_xul \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
|
||||
CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsAccessibilityService.obj \
|
||||
.\$(OBJDIR)\nsAccessible.obj \
|
||||
.\$(OBJDIR)\nsBaseWidgetAccessible.obj \
|
||||
.\$(OBJDIR)\nsFormControlAccessible.obj \
|
||||
.\$(OBJDIR)\nsGenericAccessible.obj \
|
||||
.\$(OBJDIR)\nsRootAccessible.obj \
|
||||
.\$(OBJDIR)\nsSelectAccessible.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
.\nsRootAccessible.h \
|
||||
$(NULL)
|
||||
|
||||
LINCS = \
|
||||
-I..\html \
|
||||
-I..\xul \
|
||||
-I..\..\..\layout\html\forms\public \
|
||||
-I..\..\..\layout\html\forms\src \
|
||||
-I..\..\..\layout\html\base\src \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
libs:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
||||
|
||||
|
||||
1286
mozilla/accessible/src/base/nsAccessibilityService.cpp
Normal file
1286
mozilla/accessible/src/base/nsAccessibilityService.cpp
Normal file
File diff suppressed because it is too large
Load Diff
69
mozilla/accessible/src/base/nsAccessibilityService.h
Normal file
69
mozilla/accessible/src/base/nsAccessibilityService.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
* Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef __nsAccessibilityService_h__
|
||||
#define __nsAccessibilityService_h__
|
||||
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
||||
class nsIFrame;
|
||||
class nsIWeakReference;
|
||||
class nsIDOMNode;
|
||||
|
||||
class nsAccessibilityService : public nsIAccessibilityService
|
||||
{
|
||||
public:
|
||||
nsAccessibilityService();
|
||||
virtual ~nsAccessibilityService();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIAccessibilityService methods:
|
||||
NS_DECL_NSIACCESSIBILITYSERVICE
|
||||
|
||||
private:
|
||||
nsresult GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIWeakReference** aShell, nsIDOMNode** aContent);
|
||||
nsresult GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **weakShell);
|
||||
void GetOwnerFor(nsIPresShell *aPresShell, nsIPresShell **aOwnerShell, nsIContent **aOwnerContent);
|
||||
nsIContent* FindContentForDocShell(nsIPresShell* aPresShell, nsIContent* aContent, nsIDocShell* aDocShell);
|
||||
};
|
||||
|
||||
#endif /* __nsIAccessibilityService_h__ */
|
||||
1457
mozilla/accessible/src/base/nsAccessible.cpp
Normal file
1457
mozilla/accessible/src/base/nsAccessible.cpp
Normal file
File diff suppressed because it is too large
Load Diff
168
mozilla/accessible/src/base/nsAccessible.h
Normal file
168
mozilla/accessible/src/base/nsAccessible.h
Normal file
@@ -0,0 +1,168 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsAccessible_H_
|
||||
#define _nsAccessible_H_
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsGenericAccessible.h"
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIFocusController.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsPoint.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIBindingManager.h"
|
||||
|
||||
#define ACCESSIBLE_BUNDLE_URL "chrome://global-platform/locale/accessible.properties"
|
||||
|
||||
class nsIContent;
|
||||
class nsIDocShell;
|
||||
class nsIFrame;
|
||||
class nsIWebShell;
|
||||
|
||||
enum { eSiblingsUninitialized = -1, eSiblingsWalkNormalDOM = -2}; // Used in sibling index field as flags
|
||||
|
||||
class nsAccessible : public nsGenericAccessible
|
||||
{
|
||||
public:
|
||||
// to eliminate the confusion of "magic numbers" -- if ( 0 ){ foo; }
|
||||
enum { eAction_Switch=0, eAction_Jump=0, eAction_Click=0 };
|
||||
// how many actions
|
||||
enum { eNo_Action=0, eSingle_Action=1 };
|
||||
|
||||
nsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
virtual ~nsAccessible();
|
||||
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _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, nsAWritableString& _retval);
|
||||
NS_IMETHOD AppendLabelFor(nsIContent *aLookNode, nsAReadableString *aId, nsAWritableString *aLabel);
|
||||
NS_IMETHOD GetHTMLAccName(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetXULAccName(nsAWritableString& _retval);
|
||||
NS_IMETHOD AppendFlatStringFromSubtree(nsIContent *aContent, nsAWritableString *aFlatString);
|
||||
NS_IMETHOD AppendFlatStringFromContentNode(nsIContent *aContent, nsAWritableString *aFlatString);
|
||||
NS_IMETHOD AppendStringWithSpaces(nsAWritableString *aFlatString, nsAReadableString& 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 nsAReadableString& aKey, nsAWritableString& 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
|
||||
425
mozilla/accessible/src/base/nsBaseWidgetAccessible.cpp
Normal file
425
mozilla/accessible/src/base/nsBaseWidgetAccessible.cpp
Normal file
@@ -0,0 +1,425 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsILink.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsISelection.h"
|
||||
#include "nsISelectionController.h"
|
||||
|
||||
// ------------
|
||||
// nsBlockAccessible
|
||||
// ------------
|
||||
|
||||
nsBlockAccessible::nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):nsAccessible(aNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/* nsIAccessible accGetAt (in long x, in long y); */
|
||||
NS_IMETHODIMP nsBlockAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_retval)
|
||||
{
|
||||
// We're going to find the child that contains coordinates (tx,ty)
|
||||
PRInt32 x,y,w,h;
|
||||
AccGetBounds(&x,&y,&w,&h); // Get bounds for this accessible
|
||||
if (tx >= x && tx < x + w && ty >= y && ty < y + h)
|
||||
{
|
||||
// It's within this nsIAccessible, let's drill down
|
||||
nsCOMPtr<nsIAccessible> child;
|
||||
nsCOMPtr<nsIAccessible> smallestChild;
|
||||
PRInt32 smallestArea = -1;
|
||||
nsCOMPtr<nsIAccessible> next;
|
||||
GetAccFirstChild(getter_AddRefs(child));
|
||||
PRInt32 cx,cy,cw,ch; // Child bounds
|
||||
|
||||
while(child) {
|
||||
child->AccGetBounds(&cx,&cy,&cw,&ch);
|
||||
|
||||
// ok if there are multiple frames the contain the point
|
||||
// and they overlap then pick the smallest. We need to do this
|
||||
// for text frames.
|
||||
|
||||
// For example, A point that's in block #2 is also in block #1, but we want to return #2:
|
||||
//
|
||||
// [[block #1 is long wrapped text that continues to
|
||||
// another line]] [[here is a shorter block #2]]
|
||||
|
||||
if (tx >= cx && tx < cx + cw && ty >= cy && ty < cy + ch)
|
||||
{
|
||||
if (smallestArea == -1 || cw*ch < smallestArea) {
|
||||
smallestArea = cw*ch;
|
||||
smallestChild = child;
|
||||
}
|
||||
}
|
||||
child->GetAccNextSibling(getter_AddRefs(next));
|
||||
child = next;
|
||||
}
|
||||
|
||||
if (smallestChild != nsnull)
|
||||
{
|
||||
*_retval = smallestChild;
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*_retval = this;
|
||||
NS_ADDREF(this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* nsContainerAccessible
|
||||
*/
|
||||
nsContainerAccessible::nsContainerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsAccessible(aNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/** no actions */
|
||||
NS_IMETHODIMP nsContainerAccessible::GetAccNumActions(PRUint8 *_retval)
|
||||
{
|
||||
*_retval = eNo_Action;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** no actions */
|
||||
NS_IMETHODIMP nsContainerAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _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(nsAWritableString& _retval)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** no name*/
|
||||
NS_IMETHODIMP nsContainerAccessible::GetAccName(nsAWritableString& _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(nsAWritableString& _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, nsAWritableString& _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;
|
||||
}
|
||||
}
|
||||
|
||||
148
mozilla/accessible/src/base/nsBaseWidgetAccessible.h
Normal file
148
mozilla/accessible/src/base/nsBaseWidgetAccessible.h
Normal file
@@ -0,0 +1,148 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsBaseWidgetAccessible_H_
|
||||
#define _nsBaseWidgetAccessible_H_
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMXULListener.h"
|
||||
|
||||
/**
|
||||
* This file contains a number of classes that are used as base
|
||||
* classes for the different accessibility implementations of
|
||||
* the HTML and XUL widget sets. --jgaunt
|
||||
*/
|
||||
|
||||
/**
|
||||
* Special Accessible that knows how to handle hit detection for flowing text
|
||||
*/
|
||||
class nsBlockAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval);
|
||||
};
|
||||
|
||||
/**
|
||||
* Special Accessible that just contains other accessible objects
|
||||
* no actions, no name, no state, no value
|
||||
*/
|
||||
class nsContainerAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsContainerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _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, nsAWritableString& _retval);
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& _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
|
||||
|
||||
226
mozilla/accessible/src/base/nsFormControlAccessible.cpp
Normal file
226
mozilla/accessible/src/base/nsFormControlAccessible.cpp
Normal file
@@ -0,0 +1,226 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
* Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsFormControlAccessible.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMHTMLFormElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLLabelElement.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMXULButtonElement.h"
|
||||
#include "nsIDOMXULCheckboxElement.h"
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMXULLabelElement.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsString.h"
|
||||
|
||||
/**
|
||||
* nsFormControlAccessible
|
||||
*/
|
||||
|
||||
nsFormControlAccessible::nsFormControlAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsAccessible(aNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* XUL states: focused, unavailable(disabled), focusable, ?protected?
|
||||
* HTML states: focused, unabailable(disabled), focusable, protected
|
||||
*/
|
||||
NS_IMETHODIMP nsFormControlAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// Get the focused state from the nsAccessible
|
||||
nsAccessible::GetAccState(_retval);
|
||||
|
||||
PRBool disabled = PR_FALSE;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> htmlFormElement(do_QueryInterface(mDOMNode, &rv));
|
||||
if (NS_SUCCEEDED(rv) && htmlFormElement) {
|
||||
htmlFormElement->GetDisabled(&disabled);
|
||||
nsAutoString typeString;
|
||||
htmlFormElement->GetType(typeString);
|
||||
if (typeString.EqualsIgnoreCase("password"))
|
||||
*_retval |= STATE_PROTECTED;
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsIDOMXULControlElement> xulFormElement(do_QueryInterface(mDOMNode, &rv));
|
||||
if (NS_SUCCEEDED(rv) && xulFormElement) {
|
||||
xulFormElement->GetDisabled(&disabled);
|
||||
/* XXX jgaunt do XUL elements support password fields? */
|
||||
}
|
||||
}
|
||||
if (disabled)
|
||||
*_retval |= STATE_UNAVAILABLE;
|
||||
else
|
||||
*_retval |= STATE_FOCUSABLE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will be called by both HTML and XUL elements, this method
|
||||
* merely checks who is calling and then calls the appropriate
|
||||
* protected method for the XUL or HTML element.
|
||||
*/
|
||||
NS_IMETHODIMP nsFormControlAccessible::GetAccName(nsAWritableString& _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, nsAWritableString& _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;
|
||||
}
|
||||
|
||||
93
mozilla/accessible/src/base/nsFormControlAccessible.h
Normal file
93
mozilla/accessible/src/base/nsFormControlAccessible.h
Normal file
@@ -0,0 +1,93 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Eric D Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsFormControlAccessible_H_
|
||||
#define _nsFormControlAccessible_H_
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
|
||||
/**
|
||||
* This supports name and state information for both XUL and HTML
|
||||
* widgets. Designed to be a base class for the impls of XUL
|
||||
* and HTML form widget Accessibles
|
||||
*/
|
||||
class nsFormControlAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsFormControlAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _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, nsAWritableString& _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
|
||||
|
||||
242
mozilla/accessible/src/base/nsGenericAccessible.cpp
Normal file
242
mozilla/accessible/src/base/nsGenericAccessible.cpp
Normal file
@@ -0,0 +1,242 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Eric Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsGenericAccessible.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIWeakReference.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
/* Implementation file */
|
||||
NS_IMPL_ISUPPORTS1(nsGenericAccessible, nsIAccessible)
|
||||
|
||||
nsGenericAccessible::nsGenericAccessible()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
}
|
||||
|
||||
nsGenericAccessible::~nsGenericAccessible()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccParent (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccParent(nsIAccessible **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccNextSibling (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccNextSibling(nsIAccessible **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccPreviousSibling (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccFirstChild (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccFirstChild(nsIAccessible **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccLastChild (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccLastChild(nsIAccessible **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* long getAccChildCount (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* wstring getAccName (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccName(nsAWritableString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* wstring getAccValue (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccValue(nsAWritableString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* void setAccName (in wstring name); */
|
||||
NS_IMETHODIMP nsGenericAccessible::SetAccName(const nsAReadableString& name)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* wstring getAccDescription (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccDescription(nsAWritableString& _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, nsAWritableString& _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(nsAWritableString& _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;
|
||||
}
|
||||
67
mozilla/accessible/src/base/nsGenericAccessible.h
Normal file
67
mozilla/accessible/src/base/nsGenericAccessible.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Eric D Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsGenericAccessible_H_
|
||||
#define _nsGenericAccessible_H_
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIWeakReference.h"
|
||||
|
||||
/**
|
||||
* Basic implementation
|
||||
* supports nothing
|
||||
*/
|
||||
class nsGenericAccessible : public nsIAccessible
|
||||
{
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIACCESSIBLE
|
||||
|
||||
public:
|
||||
nsGenericAccessible();
|
||||
virtual ~nsGenericAccessible();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
686
mozilla/accessible/src/base/nsRootAccessible.cpp
Normal file
686
mozilla/accessible/src/base/nsRootAccessible.cpp
Normal file
@@ -0,0 +1,686 @@
|
||||
/* -*- 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(nsAWritableString& 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(nsAWritableString& aAccValue)
|
||||
{
|
||||
return GetURL(aAccValue);
|
||||
}
|
||||
|
||||
void nsRootAccessible::Notify(nsITimer *timer)
|
||||
{
|
||||
// Short timer is finished
|
||||
if (mBusy != eBusyStateDone) {
|
||||
mBusy = eBusyStateDone;
|
||||
if (mListener)
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
|
||||
}
|
||||
}
|
||||
|
||||
void nsRootAccessible::StartDocReadyTimer()
|
||||
{
|
||||
if (!mTimer) {
|
||||
nsresult rv;
|
||||
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
const PRUint32 kUpdateTimerDelay = 1;
|
||||
mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this), kUpdateTimerDelay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* void addAccessibleEventListener (in nsIAccessibleEventListener aListener); */
|
||||
NS_IMETHODIMP nsRootAccessible::AddAccessibleEventListener(nsIAccessibleEventListener *aListener)
|
||||
{
|
||||
NS_ASSERTION(aListener, "Trying to add a null listener!");
|
||||
if (mListener)
|
||||
return NS_OK;
|
||||
|
||||
mListener = aListener;
|
||||
|
||||
// use AddEventListener from the nsIDOMEventTarget interface
|
||||
nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(mDocument));
|
||||
if (target) {
|
||||
// capture DOM focus events
|
||||
nsresult rv = target->AddEventListener(NS_LITERAL_STRING("focus"), NS_STATIC_CAST(nsIDOMFocusListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
// capture Form change events
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("change"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
// add ourself as a CheckboxStateChange listener (custom event fired in nsHTMLInputElement.cpp)
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("CheckboxStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
// add ourself as a RadioStateChange Listener ( custom event fired in in nsHTMLInputElement.cpp & radio.xml)
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("RadioStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("ListitemStateChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("popupshowing"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("popuphiding"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("DOMMenuItemActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
// Extremely short timer, after which we announce that page is finished loading
|
||||
// By waiting until after this short time, we know that the 3rd party accessibility software
|
||||
// has received it's accessible, and can handle events on it.
|
||||
StartDocReadyTimer();
|
||||
|
||||
// Set up web progress listener - we need to know when page loading is finished
|
||||
// That way we can send the STATE_CHANGE events for the MSAA root "pane" object (ROLE_PANE),
|
||||
// and change the STATE_BUSY bit flag
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mPresShell));
|
||||
if (presShell) {
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
presShell->GetPresContext(getter_AddRefs(context));
|
||||
if (context) {
|
||||
nsCOMPtr<nsISupports> container; context->GetContainer(getter_AddRefs(container));
|
||||
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
|
||||
if (docShell) {
|
||||
mWebProgress = do_GetInterface(docShell);
|
||||
mWebProgress->AddProgressListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
NS_ASSERTION(mWebProgress, "Could not get nsIWebProgress for nsRootAccessible");
|
||||
mWebProgress->AddProgressListener(this);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void removeAccessibleEventListener (); */
|
||||
NS_IMETHODIMP nsRootAccessible::RemoveAccessibleEventListener()
|
||||
{
|
||||
if (mListener) {
|
||||
nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(mDocument));
|
||||
if (target) {
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("focus"), NS_STATIC_CAST(nsIDOMFocusListener*, this), PR_TRUE);
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("change"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("CheckboxStateChange"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("popupshowing"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("popuphiding"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("DOMMenuItemActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("RadioStateChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("ListitemStateChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
}
|
||||
|
||||
if (mTimer) {
|
||||
mTimer->Cancel();
|
||||
mTimer = nsnull;
|
||||
}
|
||||
|
||||
if (mWebProgress) {
|
||||
mWebProgress->RemoveProgressListener(this);
|
||||
mWebProgress = nsnull;
|
||||
}
|
||||
mListener = nsnull;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *focusAccessible, nsIDOMNode *focusNode)
|
||||
{
|
||||
if (focusNode && gLastFocusedNode != focusNode) {
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, focusAccessible);
|
||||
NS_IF_RELEASE(gLastFocusedNode);
|
||||
gLastFocusedNode = focusNode;
|
||||
NS_ADDREF(gLastFocusedNode);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------- nsIDOMEventListener Methods (3) ------------------------
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
|
||||
{
|
||||
if (mListener) {
|
||||
// optionTargetNode is set to current option for HTML selects
|
||||
nsCOMPtr<nsIDOMNode> targetNode, optionTargetNode;
|
||||
nsresult rv = GetTargetNode(aEvent, targetNode);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
// Check to see if it's a select element. If so, need the currently focused option
|
||||
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement(do_QueryInterface(targetNode));
|
||||
if (selectElement) // ----- Target Node is an HTML <select> element ------
|
||||
nsHTMLSelectOptionAccessible::GetFocusedOptionNode(mPresShell, 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 (selectControl && optionTargetNode &&
|
||||
NS_SUCCEEDED(mAccService->GetAccessibleFor(optionTargetNode, getter_AddRefs(accessible)))) {
|
||||
FireAccessibleFocusEvent(accessible, optionTargetNode);
|
||||
}
|
||||
else
|
||||
FireAccessibleFocusEvent(accessible, targetNode);
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("change")) {
|
||||
if (optionTargetNode) { // Set to current option only for HTML selects
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_SELECTION, accessible);
|
||||
if (NS_SUCCEEDED(mAccService->GetAccessibleFor(optionTargetNode, getter_AddRefs(accessible))))
|
||||
FireAccessibleFocusEvent(accessible, optionTargetNode);
|
||||
}
|
||||
else
|
||||
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(nsAWritableString& aURL)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetURL(aURL);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetTitle(nsAWritableString& aTitle)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetTitle(aTitle);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetMimeType(nsAWritableString& aMimeType)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetMimeType(aMimeType);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetDocType(nsAWritableString& aDocType)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetDocType(aDocType);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAWritableString& aNameSpaceURI)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetNameSpaceURIForID(aNameSpaceID, aNameSpaceURI);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetDocument(nsIDocument **doc)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetDocument(doc);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::OnStateChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, PRInt32 aStateFlags, PRUint32 aStatus)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
|
||||
NS_IMETHODIMP nsRootAccessible::OnProgressChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
|
||||
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location); */
|
||||
NS_IMETHODIMP nsRootAccessible::OnLocationChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, nsIURI *location)
|
||||
{
|
||||
// Load has been verified, it will occur, about to commence
|
||||
if (mListener && mBusy != eBusyStateLoading) {
|
||||
mBusy = eBusyStateLoading;
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
|
||||
StartDocReadyTimer();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
|
||||
NS_IMETHODIMP nsRootAccessible::OnStatusChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long state); */
|
||||
NS_IMETHODIMP nsRootAccessible::OnSecurityChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, PRInt32 state)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsDocAccessibleMixin::nsDocAccessibleMixin(nsIDocument *aDoc):mDocument(aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
nsDocAccessibleMixin::nsDocAccessibleMixin(nsIWeakReference *aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(aPresShell));
|
||||
if (shell)
|
||||
shell->GetDocument(getter_AddRefs(mDocument));
|
||||
}
|
||||
|
||||
nsDocAccessibleMixin::~nsDocAccessibleMixin()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocAccessibleMixin::GetURL(nsAWritableString& 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(nsAWritableString& 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(nsAWritableString& aMimeType)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNSDocument> domnsDocument(do_QueryInterface(mDocument));
|
||||
if (domnsDocument) {
|
||||
return domnsDocument->GetContentType(aMimeType);
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocAccessibleMixin::GetDocType(nsAWritableString& 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, nsAWritableString& 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;
|
||||
}
|
||||
156
mozilla/accessible/src/base/nsRootAccessible.h
Normal file
156
mozilla/accessible/src/base/nsRootAccessible.h
Normal file
@@ -0,0 +1,156 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsRootAccessible_H_
|
||||
#define _nsRootAccessible_H_
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsIAccessibleEventReceiver.h"
|
||||
#include "nsIAccessibleEventListener.h"
|
||||
#include "nsIAccessibleDocument.h"
|
||||
#include "nsIDOMFormListener.h"
|
||||
#include "nsIDOMXULListener.h"
|
||||
#include "nsIDOMFocusListener.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
#include "nsIWeakReference.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsITimerCallback.h"
|
||||
#include "nsIWebProgress.h"
|
||||
|
||||
|
||||
class nsDocAccessibleMixin
|
||||
{
|
||||
public:
|
||||
nsDocAccessibleMixin(nsIDocument *doc);
|
||||
nsDocAccessibleMixin(nsIWeakReference *aShell);
|
||||
virtual ~nsDocAccessibleMixin();
|
||||
|
||||
NS_DECL_NSIACCESSIBLEDOCUMENT
|
||||
|
||||
protected:
|
||||
NS_IMETHOD GetDocShellFromPS(nsIPresShell* aPresShell, nsIDocShell** aDocShell);
|
||||
nsCOMPtr<nsIDocument> mDocument;
|
||||
};
|
||||
|
||||
class nsRootAccessible : public nsAccessible,
|
||||
public nsDocAccessibleMixin,
|
||||
public nsIAccessibleDocument,
|
||||
public nsIAccessibleEventReceiver,
|
||||
public nsIDOMFocusListener,
|
||||
public nsIDOMFormListener,
|
||||
public nsIDOMXULListener,
|
||||
public nsIWebProgressListener,
|
||||
public nsITimerCallback,
|
||||
public nsSupportsWeakReference
|
||||
|
||||
|
||||
{
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
public:
|
||||
enum EBusyState {eBusyStateUninitialized, eBusyStateLoading, eBusyStateDone};
|
||||
|
||||
nsRootAccessible(nsIWeakReference* aShell);
|
||||
virtual ~nsRootAccessible();
|
||||
|
||||
/* attribute wstring accName; */
|
||||
NS_IMETHOD GetAccName(nsAWritableString& aAccName);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& 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
|
||||
694
mozilla/accessible/src/base/nsSelectAccessible.cpp
Normal file
694
mozilla/accessible/src/base/nsSelectAccessible.cpp
Normal file
@@ -0,0 +1,694 @@
|
||||
/* -*- 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 "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIListControlFrame.h"
|
||||
#include "nsISelectControlFrame.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsSelectAccessible.h"
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** First, the common widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/** Constructor -- cache our parent */
|
||||
nsSelectListAccessible::nsSelectListAccessible(nsIAccessible* aParent,
|
||||
nsIDOMNode* aDOMNode,
|
||||
nsIWeakReference* aShell)
|
||||
:nsAccessible(aDOMNode, aShell)
|
||||
{
|
||||
mParent = aParent;
|
||||
}
|
||||
|
||||
/** Return our parents bounds */
|
||||
NS_IMETHODIMP nsSelectListAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
|
||||
{
|
||||
return mParent->AccGetBounds(x,y,width,height);
|
||||
}
|
||||
|
||||
/** Return our cached parent */
|
||||
NS_IMETHODIMP nsSelectListAccessible::GetAccParent(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = mParent;
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** We are a list */
|
||||
NS_IMETHODIMP nsSelectListAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_LIST;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** We are an only child */
|
||||
NS_IMETHODIMP nsSelectListAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** We are an only child */
|
||||
NS_IMETHODIMP nsSelectListAccessible::GetAccNextSibling(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* nsSelectOptionAccessible
|
||||
*/
|
||||
|
||||
/** Constructor -- cache our parent */
|
||||
nsSelectOptionAccessible::nsSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
nsLeafAccessible(aDOMNode, aShell)
|
||||
{
|
||||
mParent = aParent;
|
||||
}
|
||||
|
||||
/** click us! */
|
||||
NS_IMETHODIMP nsSelectOptionAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _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(nsAWritableString& _retval)
|
||||
{
|
||||
nsCOMPtr<nsIContent> content (do_QueryInterface(mDOMNode));
|
||||
if (!content) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsAutoString option;
|
||||
nsresult rv = AppendFlatStringFromSubtree(content, &option);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// Temp var needed until CompressWhitespace built for nsAWritableString
|
||||
option.CompressWhitespace();
|
||||
_retval.Assign(option);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** 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(nsAWritableString& _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(nsAWritableString& _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, nsAWritableString& _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);
|
||||
}
|
||||
|
||||
238
mozilla/accessible/src/base/nsSelectAccessible.h
Normal file
238
mozilla/accessible/src/base/nsSelectAccessible.h
Normal file
@@ -0,0 +1,238 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
* Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef __nsSelectAccessible_h__
|
||||
#define __nsSelectAccessible_h__
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsIAccessibleSelectable.h"
|
||||
#include "nsIDOMXULListener.h"
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** First, the common widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* The list that contains all the options in the select.
|
||||
*/
|
||||
class nsSelectListAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
|
||||
nsSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsSelectListAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
|
||||
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
|
||||
|
||||
protected:
|
||||
|
||||
nsCOMPtr<nsIAccessible> mParent;
|
||||
};
|
||||
|
||||
/**
|
||||
* Options inside the select, contained within the list
|
||||
*/
|
||||
class nsSelectOptionAccessible : public nsLeafAccessible
|
||||
{
|
||||
public:
|
||||
|
||||
nsSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsSelectOptionAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _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(nsAWritableString& _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(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _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
|
||||
71
mozilla/accessible/src/html/Makefile.in
Normal file
71
mozilla/accessible/src/html/Makefile.in
Normal file
@@ -0,0 +1,71 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_html_s
|
||||
REQUIRES = \
|
||||
content \
|
||||
content_xul \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
imglib2 \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
webbrwsr \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
nsHTMLAreaAccessible.cpp \
|
||||
nsHTMLFormControlAccessible.cpp \
|
||||
nsHTMLIFrameRootAccessible.cpp \
|
||||
nsHTMLImageAccessible.cpp \
|
||||
nsHTMLLinkAccessible.cpp \
|
||||
nsHTMLSelectAccessible.cpp \
|
||||
nsHTMLTableAccessible.cpp \
|
||||
nsHTMLTextAccessible.cpp \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../base \
|
||||
$(NULL)
|
||||
74
mozilla/accessible/src/html/makefile.win
Executable file
74
mozilla/accessible/src/html/makefile.win
Executable file
@@ -0,0 +1,74 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
|
||||
DEPTH = ..\..\..
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_html_s
|
||||
REQUIRES = \
|
||||
content \
|
||||
dom \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
imglib2 \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
string \
|
||||
uriloader \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsHTMLAreaAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLFormControlAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLIFrameRootAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLImageAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLLinkAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLSelectAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLTableAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLTextAccessible.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
$(NULL)
|
||||
|
||||
LINCS = \
|
||||
-I..\base \
|
||||
-I..\..\..\layout\html\forms\public \
|
||||
-I..\..\..\layout\html\forms\src \
|
||||
-I..\..\..\layout\html\base\src \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
libs:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
||||
|
||||
|
||||
169
mozilla/accessible/src/html/nsHTMLAreaAccessible.cpp
Normal file
169
mozilla/accessible/src/html/nsHTMLAreaAccessible.cpp
Normal file
@@ -0,0 +1,169 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsGenericAccessible.h"
|
||||
#include "nsHTMLAreaAccessible.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsString.h"
|
||||
#include "nsAccessible.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMHTMLAreaElement.h"
|
||||
|
||||
|
||||
// --- area -----
|
||||
|
||||
nsHTMLAreaAccessible::nsHTMLAreaAccessible(nsIDOMNode *aDomNode, nsIAccessible *aAccParent, nsIWeakReference* aShell):
|
||||
nsLinkableAccessible(aDomNode, aShell), mAccParent(aAccParent)
|
||||
{
|
||||
}
|
||||
|
||||
/* wstring getAccName (); */
|
||||
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccName(nsAWritableString & _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(nsAWritableString& _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(nsAWritableString& _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;
|
||||
}
|
||||
|
||||
71
mozilla/accessible/src/html/nsHTMLAreaAccessible.h
Normal file
71
mozilla/accessible/src/html/nsHTMLAreaAccessible.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsHTMLAreaAccessible_H_
|
||||
#define _nsHTMLAreaAccessible_H_
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsAccessible.h"
|
||||
|
||||
/* Accessible for image map areas - must be child of image
|
||||
*/
|
||||
|
||||
class nsHTMLAreaAccessible : public nsLinkableAccessible
|
||||
{
|
||||
|
||||
public:
|
||||
nsHTMLAreaAccessible(nsIDOMNode *domNode, nsIAccessible *accParent, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString & _retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& _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(nsAWritableString& _retval);
|
||||
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
|
||||
|
||||
protected:
|
||||
nsIAccessible *CreateAreaAccessible(nsIDOMNode *aDOMNode);
|
||||
nsCOMPtr<nsIAccessible> mAccParent;
|
||||
};
|
||||
|
||||
#endif
|
||||
445
mozilla/accessible/src/html/nsHTMLFormControlAccessible.cpp
Normal file
445
mozilla/accessible/src/html/nsHTMLFormControlAccessible.cpp
Normal file
@@ -0,0 +1,445 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* 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 "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, nsAWritableString& _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, nsAWritableString& _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 == 0) {
|
||||
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(nsAWritableString& _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, nsAWritableString& _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<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
|
||||
if ( inputElement )
|
||||
{
|
||||
inputElement->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(nsAWritableString& _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 nsAWritableString
|
||||
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(nsAWritableString& _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(nsAWritableString& _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;
|
||||
}
|
||||
113
mozilla/accessible/src/html/nsHTMLFormControlAccessible.h
Normal file
113
mozilla/accessible/src/html/nsHTMLFormControlAccessible.h
Normal file
@@ -0,0 +1,113 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Eric D Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsHTMLFormControlAccessible_H_
|
||||
#define _nsHTMLFormControlAccessible_H_
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsFormControlAccessible.h"
|
||||
|
||||
class nsICheckboxControlFrame;
|
||||
|
||||
class nsHTMLCheckboxAccessible : public nsFormControlAccessible
|
||||
{
|
||||
|
||||
public:
|
||||
nsHTMLCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _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(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
};
|
||||
|
||||
class nsHTML4ButtonAccessible : public nsLeafAccessible
|
||||
{
|
||||
|
||||
public:
|
||||
nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval);
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
};
|
||||
|
||||
class nsHTMLTextFieldAccessible : public nsFormControlAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& _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(nsAWritableString& _retval);
|
||||
};
|
||||
|
||||
#endif
|
||||
205
mozilla/accessible/src/html/nsHTMLIFrameRootAccessible.cpp
Normal file
205
mozilla/accessible/src/html/nsHTMLIFrameRootAccessible.cpp
Normal file
@@ -0,0 +1,205 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsHTMLIFrameRootAccessible.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsHTMLIFrameRootAccessible)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsRootAccessible)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
|
||||
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameAccessible, nsBlockAccessible);
|
||||
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameAccessible, nsBlockAccessible);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLIFrameAccessible::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
NS_ASSERTION(aInstancePtr, "QueryInterface requires a non-NULL destination!");
|
||||
if ( !aInstancePtr )
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
if (aIID.Equals(NS_GET_IID(nsIAccessibleDocument))) {
|
||||
*aInstancePtr = (void*)(nsIAccessibleDocument*) this;
|
||||
NS_IF_ADDREF(this);
|
||||
return NS_OK;
|
||||
}
|
||||
return nsBlockAccessible::QueryInterface(aIID, aInstancePtr);
|
||||
}
|
||||
|
||||
nsHTMLIFrameAccessible::nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *aDoc):
|
||||
nsBlockAccessible(aNode, aShell), mRootAccessible(aRoot), nsDocAccessibleMixin(aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
/* attribute wstring accName; */
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccName(nsAWritableString& aAccName)
|
||||
{
|
||||
return GetTitle(aAccName);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccValue(nsAWritableString& 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(nsAWritableString& aURL)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetURL(aURL);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetTitle(nsAWritableString& aTitle)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetTitle(aTitle);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetMimeType(nsAWritableString& aMimeType)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetMimeType(aMimeType);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetDocType(nsAWritableString& aDocType)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetDocType(aDocType);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAWritableString& 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);
|
||||
}
|
||||
101
mozilla/accessible/src/html/nsHTMLIFrameRootAccessible.h
Normal file
101
mozilla/accessible/src/html/nsHTMLIFrameRootAccessible.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsIFrameRootAccessible_H_
|
||||
#define _nsIFrameRootAccessible_H_
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsAccessible.h"
|
||||
#include "nsIAccessibleDocument.h"
|
||||
|
||||
class nsIWebShell;
|
||||
class nsIWeakReference;
|
||||
|
||||
class nsHTMLIFrameAccessible : public nsBlockAccessible,
|
||||
public nsIAccessibleDocument,
|
||||
public nsDocAccessibleMixin
|
||||
{
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLEDOCUMENT
|
||||
|
||||
public:
|
||||
nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *doc);
|
||||
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& aAccName);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& 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
|
||||
205
mozilla/accessible/src/html/nsHTMLImageAccessible.cpp
Normal file
205
mozilla/accessible/src/html/nsHTMLImageAccessible.cpp
Normal file
@@ -0,0 +1,205 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsGenericAccessible.h"
|
||||
#include "nsHTMLImageAccessible.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsAccessible.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "imgIRequest.h"
|
||||
#include "imgIContainer.h"
|
||||
#include "nsIImageFrame.h"
|
||||
|
||||
// --- image -----
|
||||
|
||||
nsHTMLImageAccessible::nsHTMLImageAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
nsLinkableAccessible(aDOMNode, aShell)
|
||||
{
|
||||
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(aDOMNode));
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
|
||||
if (!shell)
|
||||
return;
|
||||
|
||||
shell->GetDocument(getter_AddRefs(doc));
|
||||
nsAutoString mapElementName;
|
||||
|
||||
if (doc && element) {
|
||||
nsCOMPtr<nsIHTMLDocument> htmlDoc(do_QueryInterface(doc));
|
||||
element->GetAttribute(NS_LITERAL_STRING("usemap"),mapElementName);
|
||||
if (htmlDoc && !mapElementName.IsEmpty()) {
|
||||
if (mapElementName.CharAt(0) == '#')
|
||||
mapElementName.Cut(0,1);
|
||||
htmlDoc->GetImageMap(mapElementName, getter_AddRefs(mMapElement));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLImageAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// The state is a bitfield, get our inherited state, then logically OR it with STATE_ANIMATED if this
|
||||
// is an animated image.
|
||||
|
||||
nsLinkableAccessible::GetAccState(_retval);
|
||||
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
|
||||
nsIFrame *frame = nsnull;
|
||||
if (content && shell)
|
||||
shell->GetPrimaryFrameFor(content, &frame);
|
||||
|
||||
nsCOMPtr<nsIImageFrame> imageFrame(do_QueryInterface(frame));
|
||||
|
||||
nsCOMPtr<imgIRequest> imageRequest;
|
||||
if (imageFrame)
|
||||
imageFrame->GetImageRequest(getter_AddRefs(imageRequest));
|
||||
|
||||
nsCOMPtr<imgIContainer> imgContainer;
|
||||
if (imageRequest)
|
||||
imageRequest->GetImage(getter_AddRefs(imgContainer));
|
||||
|
||||
if (imgContainer) {
|
||||
PRUint32 numFrames;
|
||||
imgContainer->GetNumFrames(&numFrames);
|
||||
if (numFrames > 1)
|
||||
*_retval |= STATE_ANIMATED;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/* wstring getAccName (); */
|
||||
NS_IMETHODIMP nsHTMLImageAccessible::GetAccName(nsAWritableString& _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 nsAWritableString
|
||||
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;
|
||||
}
|
||||
|
||||
71
mozilla/accessible/src/html/nsHTMLImageAccessible.h
Normal file
71
mozilla/accessible/src/html/nsHTMLImageAccessible.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsHTMLImageAccessible_H_
|
||||
#define _nsHTMLImageAccessible_H_
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIImageFrame.h"
|
||||
#include "nsIDOMHTMLMapElement.h"
|
||||
|
||||
/* Accessible for supporting images
|
||||
* supports:
|
||||
* - gets name, role
|
||||
* - support basic state
|
||||
*/
|
||||
class nsHTMLImageAccessible : public nsLinkableAccessible
|
||||
{
|
||||
|
||||
public:
|
||||
nsHTMLImageAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _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
|
||||
79
mozilla/accessible/src/html/nsHTMLLinkAccessible.cpp
Normal file
79
mozilla/accessible/src/html/nsHTMLLinkAccessible.cpp
Normal file
@@ -0,0 +1,79 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsHTMLLinkAccessible.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsILink.h"
|
||||
#include "nsILinkHandler.h"
|
||||
#include "nsISelection.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
nsHTMLLinkAccessible::nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
|
||||
nsLinkableAccessible(aDomNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/* wstring getAccName (); */
|
||||
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccName(nsAWritableString& _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 nsAWritableString
|
||||
name.CompressWhitespace();
|
||||
_retval.Assign(name);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* unsigned long getAccRole (); */
|
||||
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_LINK;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
55
mozilla/accessible/src/html/nsHTMLLinkAccessible.h
Normal file
55
mozilla/accessible/src/html/nsHTMLLinkAccessible.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsHTMLLinkAccessible_H_
|
||||
#define _nsHTMLLinkAccessible_H_
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
|
||||
class nsHTMLLinkAccessible : public nsLinkableAccessible
|
||||
{
|
||||
|
||||
public:
|
||||
nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
};
|
||||
|
||||
#endif
|
||||
587
mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp
Normal file
587
mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp
Normal file
@@ -0,0 +1,587 @@
|
||||
/* -*- 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 "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIListControlFrame.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 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 First child of the DOM node and creates and returns
|
||||
* a nsHTMLSelectOptionAccessible.
|
||||
*/
|
||||
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccFirstChild(nsIAccessible **_retval)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> first;
|
||||
mDOMNode->GetFirstChild(getter_AddRefs(first));
|
||||
|
||||
*_retval = new nsHTMLSelectOptionAccessible(this, first, mPresShell);
|
||||
if ( ! *_retval )
|
||||
return NS_ERROR_FAILURE;
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** ----- nsHTMLSelectOptionAccessible ----- */
|
||||
|
||||
/** Default Constructor */
|
||||
nsHTMLSelectOptionAccessible::nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
nsSelectOptionAccessible(aParent, aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the next sibling of the DOM node and creates and returns
|
||||
* a nsHTMLSelectOptionAccessible.
|
||||
*/
|
||||
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> next;
|
||||
mDOMNode->GetNextSibling(getter_AddRefs(next));
|
||||
|
||||
if (next) {
|
||||
*_retval = new nsHTMLSelectOptionAccessible(mParent, next, mPresShell);
|
||||
if ( ! *_retval )
|
||||
return NS_ERROR_FAILURE;
|
||||
NS_ADDREF(*_retval);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the previous sibling of the DOM node and creates and returns
|
||||
* a nsHTMLSelectOptionAccessible.
|
||||
*/
|
||||
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> prev;
|
||||
mDOMNode->GetPreviousSibling(getter_AddRefs(prev));
|
||||
|
||||
if (prev) {
|
||||
*_retval = new nsHTMLSelectOptionAccessible(mParent, prev, mPresShell);
|
||||
if ( ! *_retval )
|
||||
return NS_ERROR_FAILURE;
|
||||
NS_ADDREF(*_retval);
|
||||
}
|
||||
|
||||
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;
|
||||
mParent->AccGetDOMNode(getter_AddRefs(parentNode));
|
||||
// find out if we are the focused node
|
||||
GetFocusedOptionNode(mPresShell, 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(nsIWeakReference *aPresShell,
|
||||
nsIDOMNode *aListNode,
|
||||
nsCOMPtr<nsIDOMNode>& aFocusedOptionNode)
|
||||
{
|
||||
NS_ASSERTION(aListNode, "Called GetFocusedOptionNode without a valid list node");
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(aPresShell));
|
||||
if (!shell)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsIFrame *frame = nsnull;
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(aListNode));
|
||||
shell->GetPrimaryFrameFor(content, &frame);
|
||||
|
||||
nsCOMPtr<nsIListControlFrame> listFrame(do_QueryInterface(frame));
|
||||
if (!listFrame)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Get what's focused by asking frame for "selected item".
|
||||
PRInt32 focusedOptionIndex = 0;
|
||||
nsresult rv = listFrame->GetSelectedIndex(&focusedOptionIndex);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLCollection> options;
|
||||
|
||||
// Get options
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement(do_QueryInterface(aListNode));
|
||||
NS_ASSERTION(selectElement, "No select element where it should be");
|
||||
rv = selectElement->GetOptions(getter_AddRefs(options));
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** 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(nsAWritableString& _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(nsAWritableString& _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;
|
||||
}
|
||||
|
||||
209
mozilla/accessible/src/html/nsHTMLSelectAccessible.h
Normal file
209
mozilla/accessible/src/html/nsHTMLSelectAccessible.h
Normal file
@@ -0,0 +1,209 @@
|
||||
/* -*- 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 GetAccFirstChild(nsIAccessible **_retval);
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* 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(nsIWeakReference *aPresShell, nsIDOMNode *aListNode, nsCOMPtr<nsIDOMNode>& aFocusedOptionNode);
|
||||
|
||||
};
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** 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(nsAWritableString& _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(nsAWritableString& _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
|
||||
101
mozilla/accessible/src/html/nsHTMLTableAccessible.cpp
Normal file
101
mozilla/accessible/src/html/nsHTMLTableAccessible.cpp
Normal file
@@ -0,0 +1,101 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsHTMLTableAccessible.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
nsHTMLTableCellAccessible::nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
|
||||
nsBlockAccessible(aDomNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/* unsigned long getAccRole (); */
|
||||
NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccRole(PRUint32 *aResult)
|
||||
{
|
||||
*aResult = ROLE_CELL;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccState(PRUint32 *aResult)
|
||||
{
|
||||
nsAccessible::GetAccState(aResult);
|
||||
*aResult &= ~STATE_FOCUSABLE; // Inherit all states except focusable state since table cells cannot be focused
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsHTMLTableAccessible::nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
|
||||
nsBlockAccessible(aDomNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/* unsigned long getAccRole (); */
|
||||
NS_IMETHODIMP nsHTMLTableAccessible::GetAccRole(PRUint32 *aResult)
|
||||
{
|
||||
*aResult = ROLE_TABLE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTableAccessible::GetAccState(PRUint32 *aResult)
|
||||
{
|
||||
nsAccessible::GetAccState(aResult);
|
||||
*aResult &= ~STATE_FOCUSABLE; // Inherit all states except focusable state since tables cannot be focused
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTableAccessible::GetAccName(nsAWritableString& 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;
|
||||
}
|
||||
64
mozilla/accessible/src/html/nsHTMLTableAccessible.h
Normal file
64
mozilla/accessible/src/html/nsHTMLTableAccessible.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsHTMLTableAccessible_H_
|
||||
#define _nsHTMLTableAccessible_H_
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
|
||||
class nsHTMLTableCellAccessible : public nsBlockAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *aResult);
|
||||
NS_IMETHOD GetAccState(PRUint32 *aResult);
|
||||
};
|
||||
|
||||
|
||||
class nsHTMLTableAccessible : public nsBlockAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *aResult);
|
||||
NS_IMETHOD GetAccState(PRUint32 *aResult);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& aResult);
|
||||
};
|
||||
|
||||
#endif
|
||||
51
mozilla/accessible/src/html/nsHTMLTextAccessible.cpp
Normal file
51
mozilla/accessible/src/html/nsHTMLTextAccessible.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Eric Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsHTMLTextAccessible.h"
|
||||
|
||||
nsHTMLTextAccessible::nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
|
||||
nsTextAccessible(aDomNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/* wstring getAccName (); */
|
||||
NS_IMETHODIMP nsHTMLTextAccessible::GetAccName(nsAWritableString& _retval)
|
||||
{
|
||||
return mDOMNode->GetNodeValue(_retval);
|
||||
}
|
||||
54
mozilla/accessible/src/html/nsHTMLTextAccessible.h
Normal file
54
mozilla/accessible/src/html/nsHTMLTextAccessible.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsHTMLTextAccessible_H_
|
||||
#define _nsHTMLTextAccessible_H_
|
||||
|
||||
#include "nsFormControlAccessible.h"
|
||||
|
||||
class nsIWeakReference;
|
||||
|
||||
class nsHTMLTextAccessible : public nsTextAccessible
|
||||
{
|
||||
|
||||
public:
|
||||
nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _retval);
|
||||
};
|
||||
|
||||
#endif
|
||||
34
mozilla/accessible/src/makefile.win
Normal file
34
mozilla/accessible/src/makefile.win
Normal file
@@ -0,0 +1,34 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
|
||||
DEPTH = ..\..
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
DIRS = \
|
||||
base \
|
||||
html \
|
||||
!ifdef MOZ_XUL
|
||||
xul \
|
||||
!endif
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
70
mozilla/accessible/src/xul/Makefile.in
Normal file
70
mozilla/accessible/src/xul/Makefile.in
Normal file
@@ -0,0 +1,70 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_xul_s
|
||||
REQUIRES = \
|
||||
content \
|
||||
content_xul \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
imglib2 \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
webbrwsr \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
nsXULColorPickerAccessible.cpp \
|
||||
nsXULFormControlAccessible.cpp \
|
||||
nsXULMenuAccessible.cpp \
|
||||
nsXULSelectAccessible.cpp \
|
||||
nsXULTabAccessible.cpp \
|
||||
nsXULTextAccessible.cpp \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../base \
|
||||
-I$(srcdir)/../html \
|
||||
$(NULL)
|
||||
67
mozilla/accessible/src/xul/makefile.win
Executable file
67
mozilla/accessible/src/xul/makefile.win
Executable file
@@ -0,0 +1,67 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
|
||||
DEPTH = ..\..\..
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_xul_s
|
||||
REQUIRES = \
|
||||
content \
|
||||
dom \
|
||||
gfx \
|
||||
layout \
|
||||
necko \
|
||||
string \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsXULColorPickerAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULFormControlAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULMenuAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULSelectAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULTabAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULTextAccessible.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
$(NULL)
|
||||
|
||||
LINCS = \
|
||||
-I..\base \
|
||||
-I..\html \
|
||||
-I..\..\..\layout\html\forms\public \
|
||||
-I..\..\..\layout\html\forms\src \
|
||||
-I..\..\..\layout\html\base\src \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
libs:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
||||
|
||||
|
||||
130
mozilla/accessible/src/xul/nsXULColorPickerAccessible.cpp
Normal file
130
mozilla/accessible/src/xul/nsXULColorPickerAccessible.cpp
Normal file
@@ -0,0 +1,130 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsXULColorPickerAccessible.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXULFormControlAccessible.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
|
||||
/**
|
||||
* XUL Color Picker Tile
|
||||
*/
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
*/
|
||||
nsXULColorPickerTileAccessible::nsXULColorPickerTileAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsFormControlAccessible(aNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* We are a pushbutton
|
||||
*/
|
||||
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_PUSHBUTTON;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Possible states: focused, focusable, selected
|
||||
*/
|
||||
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// get focus and disable status from base class
|
||||
nsFormControlAccessible::GetAccState(_retval);
|
||||
*_retval |= STATE_FOCUSABLE;
|
||||
|
||||
// Focused?
|
||||
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
|
||||
NS_ASSERTION(element, "No XUL Element for colorpicker");
|
||||
PRBool isFocused = PR_FALSE;
|
||||
element->HasAttribute(NS_LITERAL_STRING("hover"), &isFocused);
|
||||
if (isFocused)
|
||||
*_retval |= STATE_FOCUSED;
|
||||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
element->HasAttribute(NS_LITERAL_STRING("selected"), &isSelected);
|
||||
if (isFocused)
|
||||
*_retval |= STATE_SELECTED;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccName(nsAWritableString& _retval)
|
||||
{
|
||||
_retval.Assign(NS_LITERAL_STRING(""));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccValue(nsAWritableString& _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;
|
||||
}
|
||||
|
||||
63
mozilla/accessible/src/xul/nsXULColorPickerAccessible.h
Normal file
63
mozilla/accessible/src/xul/nsXULColorPickerAccessible.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsXULColorPickerAccessible_H_
|
||||
#define _nsXULColorPickerAccessible_H_
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsFormControlAccessible.h"
|
||||
|
||||
class nsXULColorPickerTileAccessible : public nsFormControlAccessible
|
||||
{
|
||||
public:
|
||||
nsXULColorPickerTileAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& _retval);
|
||||
};
|
||||
|
||||
class nsXULColorPickerAccessible : public nsXULColorPickerTileAccessible
|
||||
{
|
||||
public:
|
||||
nsXULColorPickerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
};
|
||||
|
||||
#endif
|
||||
566
mozilla/accessible/src/xul/nsXULFormControlAccessible.cpp
Normal file
566
mozilla/accessible/src/xul/nsXULFormControlAccessible.cpp
Normal file
@@ -0,0 +1,566 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMXULButtonElement.h"
|
||||
#include "nsIDOMXULCheckboxElement.h"
|
||||
#include "nsIDOMXULDescriptionElement.h"
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIDOMXULLabelElement.h"
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXULFormControlAccessible.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
/**
|
||||
* XUL Button: can contain arbitrary HTML content
|
||||
*/
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
*/
|
||||
|
||||
// Don't inherit from nsFormControlAccessible - it doesn't allow children and a button can have a dropmarker child
|
||||
nsXULButtonAccessible::nsXULButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsAccessible(aNode, aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1"))
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULButtonAccessible::GetAccName(nsAWritableString& 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, nsAWritableString& _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, nsAWritableString& 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, nsAWritableString& _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(nsAWritableString& _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(nsAWritableString& _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;
|
||||
}
|
||||
136
mozilla/accessible/src/xul/nsXULFormControlAccessible.h
Normal file
136
mozilla/accessible/src/xul/nsXULFormControlAccessible.h
Normal file
@@ -0,0 +1,136 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsXULFormControlAccessible_H_
|
||||
#define _nsXULFormControlAccessible_H_
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsFormControlAccessible.h"
|
||||
#include "nsHTMLFormControlAccessible.h"
|
||||
|
||||
class nsXULButtonAccessible : public nsAccessible
|
||||
// Don't inherit from nsFormControlAccessible - it doesn't allow children and a button can have a dropmarker child
|
||||
{
|
||||
public:
|
||||
nsXULButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& aResult);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _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, nsAWritableString& _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, nsAWritableString& _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(nsAWritableString& _retval);
|
||||
};
|
||||
|
||||
class nsXULProgressMeterAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsXULProgressMeterAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString &_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
|
||||
|
||||
277
mozilla/accessible/src/xul/nsXULMenuAccessible.cpp
Normal file
277
mozilla/accessible/src/xul/nsXULMenuAccessible.cpp
Normal file
@@ -0,0 +1,277 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* 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"
|
||||
#include "nsIDOMXULMenuBarElement.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!");
|
||||
nsCOMPtr<nsIDOMNode> parentNode;
|
||||
mDOMNode->GetParentNode(getter_AddRefs(parentNode));
|
||||
if (parentNode) {
|
||||
nsCOMPtr<nsIDOMElement> currentItem;
|
||||
nsCOMPtr<nsIDOMXULPopupElement> popupEl = do_QueryInterface(parentNode);
|
||||
if (popupEl)
|
||||
popupEl->GetActiveItem(getter_AddRefs(currentItem));
|
||||
else {
|
||||
nsCOMPtr<nsIDOMXULMenuBarElement> menubar = do_QueryInterface(parentNode);
|
||||
if (menubar)
|
||||
menubar->GetActiveMenu(getter_AddRefs(currentItem));
|
||||
}
|
||||
|
||||
if (currentItem == element)
|
||||
*_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(nsAWritableString& _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(nsAWritableString& _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(nsAWritableString& _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(nsAWritableString& _retval)
|
||||
{
|
||||
_retval = NS_LITERAL_STRING("menubar");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULMenubarAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_MENUBAR;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
87
mozilla/accessible/src/xul/nsXULMenuAccessible.h
Normal file
87
mozilla/accessible/src/xul/nsXULMenuAccessible.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsXULMenuAccessible_H_
|
||||
#define _nsXULMenuAccessible_H_
|
||||
|
||||
#include "nsAccessible.h"
|
||||
|
||||
/* Accessible for supporting XUL menus
|
||||
*/
|
||||
|
||||
class nsXULMenuitemAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsXULMenuitemAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _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(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
};
|
||||
|
||||
class nsXULMenupopupAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsXULMenupopupAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
};
|
||||
|
||||
class nsXULMenubarAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsXULMenubarAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
};
|
||||
|
||||
#endif
|
||||
360
mozilla/accessible/src/xul/nsXULSelectAccessible.cpp
Normal file
360
mozilla/accessible/src/xul/nsXULSelectAccessible.cpp
Normal file
@@ -0,0 +1,360 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXULSelectAccessible.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
|
||||
/**
|
||||
* Selects, Listboxes and Comboboxes, are made up of a number of different
|
||||
* widgets, some of which are shared between the two. This file contains
|
||||
* all of the widgets for both of the Selects, for XUL only. Some of them
|
||||
* extend classes from nsSelectAccessible.cpp, which contains base classes
|
||||
* that are also extended by the XUL Select Accessibility support.
|
||||
*
|
||||
* Listbox:
|
||||
* - nsXULListboxAccessible
|
||||
* - nsXULSelectListAccessible
|
||||
* - nsXULSelectOptionAccessible
|
||||
*
|
||||
* Comboboxes:
|
||||
* - nsXULComboboxAccessible
|
||||
* - nsHTMLTextFieldAccessible (editable) or nsTextAccessible (readonly)
|
||||
* - nsXULComboboxButtonAccessible
|
||||
* - nsXULSelectListAccessible
|
||||
* - nsXULSelectOptionAccessible
|
||||
*/
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** First, the common widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/** ----- nsXULSelectListAccessible ----- */
|
||||
|
||||
/** Default Constructor */
|
||||
nsXULSelectListAccessible::nsXULSelectListAccessible(nsIDOMNode* aDOMNode,
|
||||
nsIWeakReference* aShell)
|
||||
:nsAccessible(aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULSelectListAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_LIST;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* As a nsXULSelectListAccessible we can have the following states:
|
||||
* STATE_MULTISELECTABLE
|
||||
* STATE_EXTSELECTABLE
|
||||
*/
|
||||
NS_IMETHODIMP nsXULSelectListAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = 0;
|
||||
nsAutoString selectionTypeString;
|
||||
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
|
||||
NS_ASSERTION(element, "No nsIDOMElement for caption node!");
|
||||
element->GetAttribute(NS_LITERAL_STRING("seltype"), selectionTypeString) ;
|
||||
if (selectionTypeString.EqualsIgnoreCase("multiple"))
|
||||
*_retval |= STATE_MULTISELECTABLE | STATE_EXTSELECTABLE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** ----- nsXULSelectOptionAccessible ----- */
|
||||
|
||||
/** Default Constructor */
|
||||
nsXULSelectOptionAccessible::nsXULSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
nsXULMenuitemAccessible(aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULSelectOptionAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_LISTITEM;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* As a nsXULSelectOptionAccessible we can have the following states:
|
||||
* STATE_SELECTABLE
|
||||
* STATE_SELECTED
|
||||
* STATE_FOCUSED
|
||||
* STATE_FOCUSABLE
|
||||
*/
|
||||
NS_IMETHODIMP nsXULSelectOptionAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
nsXULMenuitemAccessible::GetAccState(_retval);
|
||||
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> item(do_QueryInterface(mDOMNode));
|
||||
PRBool isSelected = PR_FALSE;
|
||||
item->GetSelected(&isSelected);
|
||||
if (isSelected)
|
||||
*_retval |= STATE_SELECTED;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** Secondly, the Listbox widget */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/** ----- nsXULListboxAccessible ----- */
|
||||
|
||||
/** Constructor */
|
||||
nsXULListboxAccessible::nsXULListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
nsListboxAccessible(aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/** Inherit the ISupports impl from nsAccessible, we handle nsIAccessibleSelectable */
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXULListboxAccessible, nsListboxAccessible, nsIAccessibleSelectable)
|
||||
|
||||
/**
|
||||
* Let Accessible count them up
|
||||
*/
|
||||
NS_IMETHODIMP nsXULListboxAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
return nsAccessible::GetAccChildCount(_retval);
|
||||
}
|
||||
|
||||
/**
|
||||
* As a nsXULListboxAccessible we can have the following states:
|
||||
* STATE_FOCUSED
|
||||
* STATE_READONLY
|
||||
* STATE_FOCUSABLE
|
||||
*/
|
||||
NS_IMETHODIMP nsXULListboxAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// Get focus status from base class
|
||||
nsListboxAccessible::GetAccState(_retval);
|
||||
|
||||
// see if we are multiple select if so set ourselves as such
|
||||
nsCOMPtr<nsIDOMElement> element (do_QueryInterface(mDOMNode));
|
||||
if (element) {
|
||||
nsAutoString selType;
|
||||
element->GetAttribute(NS_LITERAL_STRING("seltype"), selType);
|
||||
if (!selType.IsEmpty() && selType.Equals(NS_LITERAL_STRING("multiple")))
|
||||
*_retval |= STATE_MULTISELECTABLE;
|
||||
}
|
||||
|
||||
*_retval |= STATE_FOCUSABLE ;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Our value is the value of our ( first ) selected child. nsIDOMXULSelectElement
|
||||
* returns this by default with GetValue().
|
||||
*/
|
||||
NS_IMETHODIMP nsXULListboxAccessible::GetAccValue(nsAWritableString& _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(nsAWritableString& _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(nsAWritableString& _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;
|
||||
}
|
||||
|
||||
|
||||
167
mozilla/accessible/src/xul/nsXULSelectAccessible.h
Normal file
167
mozilla/accessible/src/xul/nsXULSelectAccessible.h
Normal file
@@ -0,0 +1,167 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#ifndef __nsXULSelectAccessible_h__
|
||||
#define __nsXULSelectAccessible_h__
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIAccessibleSelectable.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIWeakReference.h"
|
||||
#include "nsSelectAccessible.h"
|
||||
#include "nsXULMenuAccessible.h"
|
||||
|
||||
/**
|
||||
* Selects, Listboxes and Comboboxes, are made up of a number of different
|
||||
* widgets, some of which are shared between the two. This file contains
|
||||
* all of the widgets for both of the Selects, for XUL only. Some of them
|
||||
* extend classes from nsSelectAccessible.cpp, which contains base classes
|
||||
* that are also extended by the XUL Select Accessibility support.
|
||||
*
|
||||
* Listbox:
|
||||
* - nsXULListboxAccessible
|
||||
* - nsXULSelectListAccessible
|
||||
* - nsXULSelectOptionAccessible
|
||||
*
|
||||
* Comboboxes:
|
||||
* - nsXULComboboxAccessible <menulist />
|
||||
* - nsHTMLTextFieldAccessible
|
||||
* - nsXULComboboxButtonAccessible
|
||||
* - nsXULSelectListAccessible <menupopup />
|
||||
* - nsXULSelectOptionAccessible(s) <menuitem />
|
||||
*/
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** First, the common widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* The list that contains all the options in the select.
|
||||
*/
|
||||
class nsXULSelectListAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
|
||||
nsXULSelectListAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsXULSelectListAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
};
|
||||
|
||||
/*
|
||||
* Options inside the select, contained within the list
|
||||
*/
|
||||
class nsXULSelectOptionAccessible : public nsXULMenuitemAccessible
|
||||
{
|
||||
public:
|
||||
|
||||
nsXULSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsXULSelectOptionAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
|
||||
static nsresult GetFocusedOptionNode(nsIWeakReference *aPresShell, nsIDOMNode *aListNode, nsCOMPtr<nsIDOMNode>& aFocusedOptionNode);
|
||||
};
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** Secondly, the Listbox widget */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* A class the represents the XUL Listbox widget.
|
||||
*/
|
||||
class nsXULListboxAccessible : public nsListboxAccessible,
|
||||
public nsIAccessibleSelectable
|
||||
{
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLESELECTABLE
|
||||
|
||||
nsXULListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsXULListboxAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& _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(nsAWritableString& _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(nsAWritableString& _retval);
|
||||
};
|
||||
|
||||
#endif
|
||||
211
mozilla/accessible/src/xul/nsXULTabAccessible.cpp
Normal file
211
mozilla/accessible/src/xul/nsXULTabAccessible.cpp
Normal file
@@ -0,0 +1,211 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsXULTabAccessible.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
|
||||
/**
|
||||
* XUL Tab
|
||||
*/
|
||||
|
||||
/** Constructor */
|
||||
nsXULTabAccessible::nsXULTabAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsLeafAccessible(aNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Might need to use the GetXULAccName method from nsFormControlAcc.cpp
|
||||
*/
|
||||
NS_IMETHODIMP nsXULTabAccessible::GetAccName(nsAWritableString& _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, nsAWritableString& _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(nsAWritableString& _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;
|
||||
}
|
||||
99
mozilla/accessible/src/xul/nsXULTabAccessible.h
Normal file
99
mozilla/accessible/src/xul/nsXULTabAccessible.h
Normal file
@@ -0,0 +1,99 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsXULTabAccessible_H_
|
||||
#define _nsXULTabAccessible_H_
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsFormControlAccessible.h"
|
||||
#include "nsHTMLFormControlAccessible.h"
|
||||
|
||||
/** An individual tab */
|
||||
class nsXULTabAccessible : public nsLeafAccessible
|
||||
{
|
||||
public:
|
||||
nsXULTabAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _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(nsAWritableString& _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
|
||||
62
mozilla/accessible/src/xul/nsXULTextAccessible.cpp
Normal file
62
mozilla/accessible/src/xul/nsXULTextAccessible.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsIDOMXULDescriptionElement.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsXULTextAccessible.h"
|
||||
|
||||
/**
|
||||
* For XUL descriptions and labels
|
||||
*/
|
||||
nsXULTextAccessible::nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
|
||||
nsTextAccessible(aDomNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/* wstring getAccName (); */
|
||||
NS_IMETHODIMP nsXULTextAccessible::GetAccName(nsAWritableString& _retval)
|
||||
{
|
||||
nsCOMPtr<nsIDOMXULDescriptionElement> descriptionElement(do_QueryInterface(mDOMNode));
|
||||
if (descriptionElement) {
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
return AppendFlatStringFromSubtree(content, &_retval);
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
55
mozilla/accessible/src/xul/nsXULTextAccessible.h
Normal file
55
mozilla/accessible/src/xul/nsXULTextAccessible.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsXULTextAccessible_H_
|
||||
#define _nsXULTextAccessible_H_
|
||||
|
||||
#include "nsFormControlAccessible.h"
|
||||
|
||||
class nsIWeakReference;
|
||||
|
||||
class nsXULTextAccessible : public nsTextAccessible
|
||||
{
|
||||
|
||||
public:
|
||||
nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAWritableString& _retval);
|
||||
};
|
||||
|
||||
#endif
|
||||
16
mozilla/aclocal.m4
vendored
Normal file
16
mozilla/aclocal.m4
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
dnl
|
||||
dnl Local autoconf macros used with mozilla
|
||||
dnl The contents of this file are under the Public Domain.
|
||||
dnl
|
||||
|
||||
builtin(include, build/autoconf/glib.m4)dnl
|
||||
builtin(include, build/autoconf/gtk.m4)dnl
|
||||
builtin(include, build/autoconf/libIDL.m4)dnl
|
||||
builtin(include, build/autoconf/nspr.m4)dnl
|
||||
builtin(include, build/autoconf/libart.m4)dnl
|
||||
builtin(include, build/autoconf/pkg.m4)dnl
|
||||
builtin(include, build/autoconf/freetype2.m4)dnl
|
||||
dnl
|
||||
define(MOZ_TOPSRCDIR,.)dnl MOZ_TOPSRCDIR is used in altoptions.m4
|
||||
builtin(include, build/autoconf/altoptions.m4)dnl
|
||||
|
||||
1230
mozilla/allmakefiles.sh
Executable file
1230
mozilla/allmakefiles.sh
Executable file
File diff suppressed because it is too large
Load Diff
39
mozilla/build/Makefile.in
Normal file
39
mozilla/build/Makefile.in
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code,
|
||||
# released March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape Communications
|
||||
# Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifeq (,$(filter WINNT OS2,$(OS_ARCH)))
|
||||
DIRS = unix
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# Install bloaturls.txt file for tinderbox Bloaty test.
|
||||
libs:: bloaturls.txt
|
||||
$(INSTALL) $< $(DIST)/bin
|
||||
|
||||
179
mozilla/build/autoconf/acoutput-fast.pl
Executable file
179
mozilla/build/autoconf/acoutput-fast.pl
Executable file
@@ -0,0 +1,179 @@
|
||||
#! /usr/bin/env perl
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
# acoutput-fast.pl - Quickly create makefiles that are in a common format.
|
||||
#
|
||||
# Most of the makefiles in mozilla only refer to two configure variables:
|
||||
# @srcdir@
|
||||
# @top_srcdir@
|
||||
# However, configure does not know any better and it runs sed on each file
|
||||
# with over 150 replacement rules (slow as molasses).
|
||||
#
|
||||
# This script takes a list of makefiles as input. For example,
|
||||
#
|
||||
# echo $MAKEFILES | acoutput-fast.pl
|
||||
#
|
||||
# The script creates each Makefile that only references @srcdir@ and
|
||||
# @top_srcdir@. For other files, it lists them in a shell command that is
|
||||
# printed to stdout:
|
||||
#
|
||||
# CONFIG_FILES="unhandled_files..."; export CONFIG_FILES
|
||||
#
|
||||
# This command can be used to have config.status create the unhandled
|
||||
# files. For example,
|
||||
#
|
||||
# eval "echo $MAKEFILES | acoutput-fast.pl"
|
||||
# AC_OUTPUT($MAKEFILES)
|
||||
#
|
||||
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
|
||||
|
||||
#use File::Basename;
|
||||
sub dirname {
|
||||
my $dir = $_[0];
|
||||
return '.' if not $dir =~ m%/%;
|
||||
$dir =~ s%/[^/][^/]*$%%;
|
||||
return $dir;
|
||||
}
|
||||
|
||||
# Create one directory. Assumes it doesn't already exist.
|
||||
# Will create parent(s) if needed.
|
||||
sub create_directory {
|
||||
my $dir = $_[0];
|
||||
my $parent = dirname($dir);
|
||||
create_directory($parent) if not -d $parent;
|
||||
mkdir "$dir",0777;
|
||||
}
|
||||
|
||||
# Create all the directories at once.
|
||||
# This can be much faster than calling mkdir() for each one.
|
||||
sub create_directories {
|
||||
my @makefiles = @_;
|
||||
my @dirs = ();
|
||||
my $ac_file;
|
||||
foreach $ac_file (@makefiles) {
|
||||
push @dirs, dirname($ac_file);
|
||||
}
|
||||
# Call mkdir with the directories sorted by subdir count (how many /'s)
|
||||
if (@dirs) {
|
||||
my $mkdir_command = "mkdir -p ". join(' ', @dirs);
|
||||
if (system($mkdir_command) != 0) {
|
||||
print STDERR "Creating dirs all at once failed; trying one at atime\n";
|
||||
foreach $dir (@dirs) {
|
||||
if (not -d $dir) {
|
||||
print STDERR "Creating directory $dir\n";
|
||||
create_directory($dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($ARGV[0] =~ /^--srcdir=/) {
|
||||
$ac_given_srcdir = (split /=/, shift @ARGV)[1];
|
||||
} else {
|
||||
$ac_given_srcdir = $0;
|
||||
$ac_given_srcdir =~ s|/?build/autoconf/.*$||;
|
||||
$ac_given_srcdir = '.' if $ac_given_srcdir eq '';
|
||||
}
|
||||
|
||||
# Read list of makefiles from the stdin or,
|
||||
# from files listed on the command-line.
|
||||
#
|
||||
@makefiles=();
|
||||
push @makefiles, split while (<STDIN>);
|
||||
|
||||
# Create all the directories at once.
|
||||
# This can be much faster than calling mkdir() for each one.
|
||||
create_directories(@makefiles);
|
||||
|
||||
# Output the makefiles.
|
||||
#
|
||||
@unhandled=();
|
||||
foreach $ac_file (@makefiles) {
|
||||
if (not $ac_file =~ /Makefile$/ or $ac_file =~ /:/) {
|
||||
push @unhandled, $ac_file;
|
||||
next;
|
||||
}
|
||||
$ac_file_in = "$ac_given_srcdir/$ac_file.in";
|
||||
$ac_dir = dirname($ac_file);
|
||||
if ($ac_dir eq '.') {
|
||||
$ac_dir_suffix = '';
|
||||
$ac_dots = '';
|
||||
} else {
|
||||
$ac_dir_suffix = "/$ac_dir";
|
||||
$ac_dir_suffix =~ s%^/\./%/%;
|
||||
$ac_dots = $ac_dir_suffix;
|
||||
$ac_dots =~ s%/[^/]*%../%g;
|
||||
}
|
||||
if ($ac_given_srcdir eq '.') {
|
||||
$srcdir = '.';
|
||||
if ($ac_dots eq '') {
|
||||
$top_srcdir = '.'
|
||||
} else {
|
||||
$top_srcdir = $ac_dots;
|
||||
$top_srcdir =~ s%/$%%;
|
||||
}
|
||||
} elsif ($ac_given_srcdir =~ m%^/% or $ac_given_srcdir =~ m%^.:/%) {
|
||||
$srcdir = "$ac_given_srcdir$ac_dir_suffix";
|
||||
$top_srcdir = "$ac_given_srcdir";
|
||||
} else {
|
||||
$srcdir = "$ac_dots$ac_given_srcdir$ac_dir_suffix";
|
||||
$top_srcdir = "$ac_dots$ac_given_srcdir";
|
||||
}
|
||||
|
||||
if (-e $ac_file) {
|
||||
next if -M _ < -M $ac_file_in;
|
||||
print STDERR "updating $ac_file\n";
|
||||
} else {
|
||||
print STDERR "creating $ac_file\n";
|
||||
}
|
||||
|
||||
open (INFILE, "<$ac_file_in")
|
||||
or ( warn "can't read $ac_file_in: No such file or directory\n" and next);
|
||||
open (OUTFILE, ">$ac_file")
|
||||
or ( warn "Unable to create $ac_file\n" and next);
|
||||
|
||||
while (<INFILE>) {
|
||||
#if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
|
||||
# warn "Two defines on a line:$ac_file:$.:$_";
|
||||
# push @unhandled, $ac_file;
|
||||
# last;
|
||||
#}
|
||||
|
||||
s/\@srcdir\@/$srcdir/g;
|
||||
s/\@top_srcdir\@/$top_srcdir/g;
|
||||
|
||||
if (/\@[_a-zA-Z]*\@/) {
|
||||
warn "Unknown variable:$ac_file:$.:$_";
|
||||
push @unhandled, $ac_file;
|
||||
last;
|
||||
}
|
||||
print OUTFILE;
|
||||
}
|
||||
close INFILE;
|
||||
close OUTFILE;
|
||||
}
|
||||
|
||||
# Print the shell command to be evaluated by configure.
|
||||
#
|
||||
print "CONFIG_FILES=\"".join(' ', @unhandled)."\"; export CONFIG_FILES\n";
|
||||
|
||||
140
mozilla/build/autoconf/altoptions.m4
Normal file
140
mozilla/build/autoconf/altoptions.m4
Normal file
@@ -0,0 +1,140 @@
|
||||
dnl The contents of this file are subject to the Netscape Public
|
||||
dnl License Version 1.1 (the "License"); you may not use this file
|
||||
dnl except in compliance with the License. You may obtain a copy of
|
||||
dnl the License at http://www.mozilla.org/NPL/
|
||||
dnl
|
||||
dnl Software distributed under the License is distributed on an "AS
|
||||
dnl IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
dnl implied. See the License for the specific language governing
|
||||
dnl rights and limitations under the License.
|
||||
dnl
|
||||
dnl The Original Code is mozilla.org code.
|
||||
dnl
|
||||
dnl The Initial Developer of the Original Code is Netscape
|
||||
dnl Communications Corporation. Portions created by Netscape are
|
||||
dnl Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
dnl Rights Reserved.
|
||||
dnl
|
||||
dnl Contributor(s):
|
||||
dnl
|
||||
|
||||
dnl altoptions.m4 - An alternative way of specifying command-line options.
|
||||
dnl These macros are needed to support a menu-based configurator.
|
||||
dnl This file also includes the macro, AM_READ_MYCONFIG, for reading
|
||||
dnl the 'myconfig.m4' file.
|
||||
|
||||
dnl Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
|
||||
|
||||
|
||||
dnl MOZ_ARG_ENABLE_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE]])
|
||||
dnl MOZ_ARG_DISABLE_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE]])
|
||||
dnl MOZ_ARG_ENABLE_STRING( NAME, HELP, IF-SET [, ELSE])
|
||||
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING( NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
|
||||
dnl MOZ_ARG_WITH_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE])
|
||||
dnl MOZ_ARG_WITHOUT_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE])
|
||||
dnl MOZ_ARG_WITH_STRING( NAME, HELP, IF-SET [, ELSE])
|
||||
dnl MOZ_ARG_HEADER(Comment)
|
||||
dnl MOZ_CHECK_PTHREADS( NAME, IF-YES [, ELSE ])
|
||||
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
|
||||
|
||||
|
||||
dnl MOZ_TWO_STRING_TEST(NAME, VAL, STR1, IF-STR1, STR2, IF-STR2 [, ELSE])
|
||||
AC_DEFUN(MOZ_TWO_STRING_TEST,
|
||||
[if test "[$2]" = "[$3]"; then
|
||||
ifelse([$4], , :, [$4])
|
||||
elif test "[$2]" = "[$5]"; then
|
||||
ifelse([$6], , :, [$6])
|
||||
else
|
||||
ifelse([$7], ,
|
||||
[AC_MSG_ERROR([Option, [$1], does not take an argument ([$2]).])],
|
||||
[$7])
|
||||
fi])
|
||||
|
||||
dnl MOZ_ARG_ENABLE_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE]])
|
||||
AC_DEFUN(MOZ_ARG_ENABLE_BOOL,
|
||||
[AC_ARG_ENABLE([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], [$enableval], yes, [$3], no, [$4])],
|
||||
[$5])])
|
||||
|
||||
dnl MOZ_ARG_DISABLE_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE]])
|
||||
AC_DEFUN(MOZ_ARG_DISABLE_BOOL,
|
||||
[AC_ARG_ENABLE([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], [$enableval], no, [$3], yes, [$4])],
|
||||
[$5])])
|
||||
|
||||
dnl MOZ_ARG_ENABLE_STRING(NAME, HELP, IF-SET [, ELSE])
|
||||
AC_DEFUN(MOZ_ARG_ENABLE_STRING,
|
||||
[AC_ARG_ENABLE([$1], [$2], [$3], [$4])])
|
||||
|
||||
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING(NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
|
||||
AC_DEFUN(MOZ_ARG_ENABLE_BOOL_OR_STRING,
|
||||
[ifelse([$5], ,
|
||||
[errprint([Option, $1, needs an "IF-SET" argument.
|
||||
])
|
||||
m4exit(1)],
|
||||
[AC_ARG_ENABLE([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], [$enableval], yes, [$3], no, [$4], [$5])],
|
||||
[$6])])])
|
||||
|
||||
dnl MOZ_ARG_WITH_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE])
|
||||
AC_DEFUN(MOZ_ARG_WITH_BOOL,
|
||||
[AC_ARG_WITH([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], [$withval], yes, [$3], no, [$4])],
|
||||
[$5])])
|
||||
|
||||
dnl MOZ_ARG_WITHOUT_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE])
|
||||
AC_DEFUN(MOZ_ARG_WITHOUT_BOOL,
|
||||
[AC_ARG_WITH([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], [$withval], no, [$3], yes, [$4])],
|
||||
[$5])])
|
||||
|
||||
dnl MOZ_ARG_WITH_STRING(NAME, HELP, IF-SET [, ELSE])
|
||||
AC_DEFUN(MOZ_ARG_WITH_STRING,
|
||||
[AC_ARG_WITH([$1], [$2], [$3], [$4])])
|
||||
|
||||
dnl MOZ_ARG_HEADER(Comment)
|
||||
dnl This is used by webconfig to group options
|
||||
define(MOZ_ARG_HEADER, [# $1])
|
||||
|
||||
dnl
|
||||
dnl Apparently, some systems cannot properly check for the pthread
|
||||
dnl library unless <pthread.h> is included so we need to test
|
||||
dnl using it
|
||||
dnl
|
||||
dnl MOZ_CHECK_PTHREADS(lib, success, failure)
|
||||
AC_DEFUN(MOZ_CHECK_PTHREADS,
|
||||
[
|
||||
AC_MSG_CHECKING([for pthread_create in -l$1])
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { int a = 1; }
|
||||
int main() {
|
||||
pthread_t t;
|
||||
if (!pthread_create(&t, 0, &foo, 0)) {
|
||||
pthread_join(t, 0);
|
||||
}
|
||||
exit(0);
|
||||
}" > dummy.c ;
|
||||
echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS" 1>&5;
|
||||
${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS 2>&5;
|
||||
_res=$? ;
|
||||
rm -f dummy.c dummy${ac_exeext} ;
|
||||
if test "$_res" = "0"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
[$2]
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
[$3]
|
||||
fi
|
||||
])
|
||||
|
||||
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
|
||||
AC_DEFUN(MOZ_READ_MOZCONFIG,
|
||||
[AC_REQUIRE([AC_INIT_BINSH])dnl
|
||||
# Read in '.mozconfig' script to set the initial options.
|
||||
# See the mozconfig2configure script for more details.
|
||||
_AUTOCONF_TOOLS_DIR=`dirname [$]0`/[$1]/build/autoconf
|
||||
. $_AUTOCONF_TOOLS_DIR/mozconfig2configure])
|
||||
|
||||
dnl This gets inserted at the top of the configure script
|
||||
MOZ_READ_MOZCONFIG(MOZ_TOPSRCDIR)
|
||||
54
mozilla/build/autoconf/clean-config.sh
Executable file
54
mozilla/build/autoconf/clean-config.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
# clean-config.sh - Removes all files generated by mozilla configure.
|
||||
# Only removes files from the topsrcdir. To clean up an objdir,
|
||||
# simply remove the directory and start over.
|
||||
#
|
||||
# Usage:
|
||||
# 1. cd <topsrcdir>
|
||||
# 2. build/autoconf/clean-config.sh
|
||||
#
|
||||
# Send comments, improvements, bugs to slamm@netscape.com
|
||||
|
||||
topsrcdir=`cd \`dirname $0\`/../..; pwd`
|
||||
|
||||
if [ ! -f configure.in ]; then
|
||||
echo "clean-config.sh only cleans the source tree. To run," 2>&1
|
||||
echo " cd $topsrcdir; build/autoconf/clean-config.sh" 2>&1
|
||||
echo " (To clean a separate objdir, simple remove the directory.)" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f mailnews/makefiles ]; then
|
||||
MOZ_MAIL_NEWS=1
|
||||
export MOZ_MAIL_NEWS
|
||||
fi
|
||||
|
||||
. allmakefiles.sh
|
||||
|
||||
rm -fr $MAKEFILES \
|
||||
config-defs.h \
|
||||
config.cache \
|
||||
config.log \
|
||||
config.status \
|
||||
$NULL
|
||||
1326
mozilla/build/autoconf/config.guess
vendored
Executable file
1326
mozilla/build/autoconf/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1424
mozilla/build/autoconf/config.sub
vendored
Executable file
1424
mozilla/build/autoconf/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
137
mozilla/build/autoconf/freetype2.m4
Normal file
137
mozilla/build/autoconf/freetype2.m4
Normal file
@@ -0,0 +1,137 @@
|
||||
# Configure paths for FreeType2
|
||||
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
|
||||
|
||||
dnl AM_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AC_CHECK_FT2,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the freetype-config script
|
||||
dnl
|
||||
AC_ARG_WITH(freetype-prefix,
|
||||
[ --with-ft-prefix=PFX Prefix where FreeType is installed (optional)],
|
||||
ft_config_prefix="$withval", ft_config_prefix="")
|
||||
AC_ARG_WITH(freetype-exec-prefix,
|
||||
[ --with-ft-exec-prefix=PFX
|
||||
Exec prefix where FreeType is installed (optional)],
|
||||
ft_config_exec_prefix="$withval", ft_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(freetypetest,
|
||||
[ --disable-freetypetest
|
||||
Do not try to compile and run a test FreeType program],
|
||||
[], enable_fttest=yes)
|
||||
|
||||
if test x$ft_config_exec_prefix != x ; then
|
||||
ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
|
||||
if test x${FT2_CONFIG+set} != xset ; then
|
||||
FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
|
||||
fi
|
||||
fi
|
||||
if test x$ft_config_prefix != x ; then
|
||||
ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
|
||||
if test x${FT2_CONFIG+set} != xset ; then
|
||||
FT2_CONFIG=$ft_config_prefix/bin/freetype-config
|
||||
fi
|
||||
fi
|
||||
AC_PATH_PROG(FT2_CONFIG, freetype-config, no)
|
||||
|
||||
min_ft_version=ifelse([$1], ,6.1.0,$1)
|
||||
AC_MSG_CHECKING(for FreeType - version >= $min_ft_version)
|
||||
no_ft=""
|
||||
if test "$FT2_CONFIG" = "no" ; then
|
||||
no_ft=yes
|
||||
else
|
||||
FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
|
||||
FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
|
||||
ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
ft_min_major_version=`echo $min_ft_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
ft_min_minor_version=`echo $min_ft_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
ft_min_micro_version=`echo $min_ft_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_fttest" = "xyes" ; then
|
||||
ft_config_is_lt=no
|
||||
if test $ft_config_major_version -lt $ft_min_major_version ; then
|
||||
ft_config_is_lt=yes
|
||||
else
|
||||
if test $ft_config_major_version -eq $ft_min_major_version ; then
|
||||
if test $ft_config_minor_version -lt $ft_min_minor_version ; then
|
||||
ft_config_is_lt=yes
|
||||
else
|
||||
if test $ft_config_minor_version -eq $ft_min_minor_version ; then
|
||||
if test $ft_config_micro_version -lt $ft_min_micro_version ; then
|
||||
ft_config_is_lt=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "x$ft_config_is_lt" = "xyes" ; then
|
||||
ifelse([$3], , :, [$3])
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $FT2_CFLAGS"
|
||||
LIBS="$FT2_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Sanity checks for the results of freetype-config to some extent
|
||||
dnl
|
||||
AC_TRY_RUN([
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
FT_Library library;
|
||||
FT_Error error;
|
||||
|
||||
error = FT_Init_FreeType(&library);
|
||||
|
||||
if (error)
|
||||
return 1;
|
||||
else
|
||||
{
|
||||
FT_Done_FreeType(library);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi # test $ft_config_version -lt $ft_min_version
|
||||
fi # test "x$enable_fttest" = "xyes"
|
||||
fi # test "$FT2_CONFIG" = "no"
|
||||
if test "x$ft_config_is_lt" != "xyes" ; then
|
||||
if test "x$no_ft" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$FT2_CONFIG" = "no" ; then
|
||||
echo "*** The freetype-config script installed by FreeType 2 could not be found."
|
||||
echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the FT2_CONFIG environment variable to the"
|
||||
echo "*** full path to freetype-config."
|
||||
else
|
||||
echo "*** The FreeType test program failed to run. If your system uses"
|
||||
echo "*** shared libraries and they are installed outside the normal"
|
||||
echo "*** system library path, make sure the variable LD_LIBRARY_PATH"
|
||||
echo "*** (or whatever is appropiate for your system) is correctly set."
|
||||
fi
|
||||
FT2_CFLAGS=""
|
||||
FT2_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(FT2_CFLAGS)
|
||||
AC_SUBST(FT2_LIBS)
|
||||
fi
|
||||
])
|
||||
200
mozilla/build/autoconf/glib.m4
Normal file
200
mozilla/build/autoconf/glib.m4
Normal file
@@ -0,0 +1,200 @@
|
||||
# Configure paths for GLIB
|
||||
# Owen Taylor 97-11-3
|
||||
|
||||
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
|
||||
dnl gthread is specified in MODULES, pass to glib-config
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_GLIB,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the glib-config script
|
||||
dnl
|
||||
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
|
||||
glib_config_prefix="$withval", glib_config_prefix="")
|
||||
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX
|
||||
Exec prefix where GLIB is installed (optional)],
|
||||
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
|
||||
, enable_glibtest=yes)
|
||||
|
||||
if test x$glib_config_exec_prefix != x ; then
|
||||
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
|
||||
if test x${GLIB_CONFIG+set} != xset ; then
|
||||
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
|
||||
fi
|
||||
fi
|
||||
if test x$glib_config_prefix != x ; then
|
||||
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
|
||||
if test x${GLIB_CONFIG+set} != xset ; then
|
||||
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
|
||||
fi
|
||||
fi
|
||||
|
||||
for module in . $4
|
||||
do
|
||||
case "$module" in
|
||||
gmodule)
|
||||
glib_config_args="$glib_config_args gmodule"
|
||||
;;
|
||||
gthread)
|
||||
glib_config_args="$glib_config_args gthread"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
|
||||
unset ac_cv_path_GLIB_CONFIG
|
||||
|
||||
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
|
||||
min_glib_version=ifelse([$1], ,0.99.7,$1)
|
||||
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
|
||||
no_glib=""
|
||||
if test "$GLIB_CONFIG" = "no" ; then
|
||||
no_glib=yes
|
||||
else
|
||||
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
|
||||
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
|
||||
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_glibtest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
||||
LIBS="$GLIB_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
|
||||
dnl checks the results of glib-config to some extent
|
||||
dnl
|
||||
rm -f conf.glibtest
|
||||
AC_TRY_RUN([
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.glibtest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_glib_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 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
|
||||
])
|
||||
191
mozilla/build/autoconf/gtk.m4
Normal file
191
mozilla/build/autoconf/gtk.m4
Normal file
@@ -0,0 +1,191 @@
|
||||
# Configure paths for GTK+
|
||||
# Owen Taylor 97-11-3
|
||||
# (copy of gtk.m4 (public domain))
|
||||
|
||||
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_GTK,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the gtk-config script
|
||||
dnl
|
||||
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
||||
gtk_config_prefix="$withval", gtk_config_prefix="")
|
||||
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX
|
||||
Exec prefix where GTK is installed (optional)],
|
||||
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
||||
, enable_gtktest=yes)
|
||||
|
||||
if test x$gtk_config_exec_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||
if test x${GTK_CONFIG+set} != xset ; then
|
||||
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
||||
fi
|
||||
fi
|
||||
if test x$gtk_config_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
||||
if test x${GTK_CONFIG+set} != xset ; then
|
||||
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
|
||||
unset ac_cv_path_GTK_CONFIG
|
||||
|
||||
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
||||
min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
||||
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
||||
no_gtk=""
|
||||
if test "$GTK_CONFIG" = "no" ; then
|
||||
no_gtk=yes
|
||||
else
|
||||
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
|
||||
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
|
||||
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_gtktest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
||||
dnl checks the results of gtk-config to some extent
|
||||
dnl
|
||||
rm -f conf.gtktest
|
||||
AC_TRY_RUN([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.gtktest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_gtk_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gtk_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((gtk_major_version != $gtk_config_major_version) ||
|
||||
(gtk_minor_version != $gtk_config_minor_version) ||
|
||||
(gtk_micro_version != $gtk_config_micro_version))
|
||||
{
|
||||
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
||||
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf ("*** was found! If gtk-config was correct, then it is best\n");
|
||||
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
|
||||
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
printf("*** required on your system.\n");
|
||||
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
|
||||
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
|
||||
printf("*** before re-running configure\n");
|
||||
}
|
||||
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||
{
|
||||
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
}
|
||||
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||
else
|
||||
{
|
||||
if ((gtk_major_version > major) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||
major, minor, micro);
|
||||
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||
printf("***\n");
|
||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
|
||||
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
|
||||
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** so that the correct libraries are found at run-time))\n");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_gtk" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$GTK_CONFIG" = "no" ; then
|
||||
echo "*** The gtk-config script installed by GTK could not be found."
|
||||
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the GTK_CONFIG environment variable to the"
|
||||
echo "*** full path to gtk-config."
|
||||
echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk"
|
||||
else
|
||||
if test -f conf.gtktest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run GTK test program, checking why..."
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
||||
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||
echo "***"
|
||||
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
||||
echo "*** came with the system with the command"
|
||||
echo "***"
|
||||
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
|
||||
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
GTK_CFLAGS=""
|
||||
GTK_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
rm -f conf.gtktest
|
||||
])
|
||||
119
mozilla/build/autoconf/install-sh
Executable file
119
mozilla/build/autoconf/install-sh
Executable file
@@ -0,0 +1,119 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5; it is not part of GNU.
|
||||
#
|
||||
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
#
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
|
||||
instcmd="$mvprog"
|
||||
chmodcmd=""
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dstdir=`dirname $dst`
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd $dst
|
||||
$doit $mvcmd $dsttmp $dst
|
||||
|
||||
|
||||
exit 0
|
||||
198
mozilla/build/autoconf/libIDL.m4
Normal file
198
mozilla/build/autoconf/libIDL.m4
Normal file
@@ -0,0 +1,198 @@
|
||||
# Configure paths for LIBIDL
|
||||
|
||||
dnl AM_PATH_LIBIDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for LIBIDL, and define LIBIDL_CFLAGS and LIBIDL_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_LIBIDL,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the libIDL-config script
|
||||
dnl
|
||||
AC_ARG_WITH(libIDL-prefix,[ --with-libIDL-prefix=PFX
|
||||
Prefix where libIDL is installed (optional)],
|
||||
libIDL_config_prefix="$withval", libIDL_config_prefix="")
|
||||
AC_ARG_WITH(libIDL-exec-prefix,[ --with-libIDL-exec-prefix=PFX
|
||||
Exec prefix where libIDL is installed (optional)],
|
||||
libIDL_config_exec_prefix="$withval", libIDL_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(libIDLtest, [ --disable-libIDLtest Do not try to compile and run a test libIDL program],
|
||||
, enable_libIDLtest=yes)
|
||||
|
||||
if test x$libIDL_config_exec_prefix != x ; then
|
||||
libIDL_config_args="$libIDL_config_args --exec-prefix=$libIDL_config_exec_prefix"
|
||||
if test x${LIBIDL_CONFIG+set} != xset ; then
|
||||
LIBIDL_CONFIG=$libIDL_config_exec_prefix/bin/libIDL-config
|
||||
fi
|
||||
fi
|
||||
if test x$libIDL_config_prefix != x ; then
|
||||
libIDL_config_args="$libIDL_config_args --prefix=$libIDL_config_prefix"
|
||||
if test x${LIBIDL_CONFIG+set} != xset ; then
|
||||
LIBIDL_CONFIG=$libIDL_config_prefix/bin/libIDL-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_PATH_GLIB(1.2.0)
|
||||
|
||||
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
|
||||
unset ac_cv_path_LIBIDL_CONFIG
|
||||
|
||||
AC_PATH_PROG(LIBIDL_CONFIG, libIDL-config, no)
|
||||
min_libIDL_version=ifelse([$1], ,0.6.0,$1)
|
||||
AC_MSG_CHECKING(for libIDL - version >= $min_libIDL_version)
|
||||
no_libIDL=""
|
||||
if test "$LIBIDL_CONFIG" = "no" ; then
|
||||
no_libIDL=yes
|
||||
else
|
||||
LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
|
||||
LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
|
||||
# hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
|
||||
# this after we start requiring libIDL 0.6.8 or anything higher
|
||||
LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
|
||||
LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
|
||||
libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
libIDL_config_minor_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_libIDLtest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
|
||||
LIBS="$LIBIDL_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed LIBIDL is sufficiently new.
|
||||
dnl
|
||||
rm -f conf.libIDLtest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libIDL/IDL.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
int libIDL_major_version;
|
||||
int libIDL_minor_version;
|
||||
int libIDL_micro_version;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.libIDLtest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup ("$min_libIDL_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 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
|
||||
])
|
||||
165
mozilla/build/autoconf/libart.m4
Normal file
165
mozilla/build/autoconf/libart.m4
Normal file
@@ -0,0 +1,165 @@
|
||||
# Configure paths for LIBART
|
||||
# Raph Levien 98-11-18
|
||||
# stolen from Manish Singh 98-9-30
|
||||
# stolen back from Frank Belew
|
||||
# stolen from Manish Singh
|
||||
# Shamelessly stolen from Owen Taylor
|
||||
|
||||
dnl AM_PATH_LIBART([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for LIBART, and define LIBART_CFLAGS and LIBART_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_LIBART,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the libart-config script
|
||||
dnl
|
||||
AC_ARG_WITH(libart-prefix,[ --with-libart-prefix=PFX Prefix where LIBART is installed (optional)],
|
||||
libart_prefix="$withval", libart_prefix="")
|
||||
AC_ARG_WITH(libart-exec-prefix,[ --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)],
|
||||
libart_exec_prefix="$withval", libart_exec_prefix="")
|
||||
AC_ARG_ENABLE(libarttest, [ --disable-libarttest Do not try to compile and run a test LIBART program],
|
||||
, enable_libarttest=yes)
|
||||
|
||||
if test x$libart_exec_prefix != x ; then
|
||||
libart_args="$libart_args --exec-prefix=$libart_exec_prefix"
|
||||
if test x${LIBART_CONFIG+set} != xset ; then
|
||||
LIBART_CONFIG=$libart_exec_prefix/bin/libart-config
|
||||
fi
|
||||
fi
|
||||
if test x$libart_prefix != x ; then
|
||||
libart_args="$libart_args --prefix=$libart_prefix"
|
||||
if test x${LIBART_CONFIG+set} != xset ; then
|
||||
LIBART_CONFIG=$libart_prefix/bin/libart-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(LIBART_CONFIG, libart-config, no)
|
||||
min_libart_version=ifelse([$1], ,0.2.5,$1)
|
||||
AC_MSG_CHECKING(for LIBART - version >= $min_libart_version)
|
||||
no_libart=""
|
||||
if test "$LIBART_CONFIG" = "no" ; then
|
||||
no_libart=yes
|
||||
else
|
||||
LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags`
|
||||
LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs`
|
||||
|
||||
libart_major_version=`$LIBART_CONFIG $libart_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
libart_minor_version=`$LIBART_CONFIG $libart_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_libarttest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $LIBART_CFLAGS"
|
||||
LIBS="$LIBS $LIBART_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed LIBART is sufficiently new. (Also sanity
|
||||
dnl checks the results of libart-config to some extent
|
||||
dnl
|
||||
rm -f conf.libarttest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libart_lgpl/libart.h>
|
||||
|
||||
char*
|
||||
my_strdup (char *str)
|
||||
{
|
||||
char *new_str;
|
||||
|
||||
if (str)
|
||||
{
|
||||
new_str = malloc ((strlen (str) + 1) * sizeof(char));
|
||||
strcpy (new_str, str);
|
||||
}
|
||||
else
|
||||
new_str = NULL;
|
||||
|
||||
return new_str;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.libarttest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = my_strdup("$min_libart_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 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
|
||||
])
|
||||
280
mozilla/build/autoconf/make-makefile
Executable file
280
mozilla/build/autoconf/make-makefile
Executable file
@@ -0,0 +1,280 @@
|
||||
#! /usr/bin/env perl
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
# make-makefiles - Quickly create Makefiles for subdirectories.
|
||||
# Also, creates any needed subdirectories.
|
||||
#
|
||||
# usage: make-makefiles [ -t <topsrcdir> -d <depth> ] [ <subdir> | <subdir>/Makefile ] ...
|
||||
|
||||
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
|
||||
|
||||
#$debug = 1;
|
||||
|
||||
# Determine various tree path variables
|
||||
#
|
||||
($topsrcdir, $depth, @makefiles) = parse_arguments(@ARGV);
|
||||
|
||||
$object_fullpath = `pwd`;
|
||||
chdir $depth;
|
||||
$object_root = `pwd`;
|
||||
chomp $object_fullpath;
|
||||
chomp $object_root;
|
||||
|
||||
# $source_subdir is the path from the object root to where
|
||||
# 'make-makefile' was called. For example, if make-makefile was
|
||||
# called from "mozilla/gfx/src", then $source_subdir would be
|
||||
# "gfx/src/".
|
||||
$source_subdir = "$object_fullpath/";
|
||||
my $quoted_object_root = quotemeta($object_root);
|
||||
$source_subdir =~ s|^$quoted_object_root/||;
|
||||
|
||||
# Prefix makefiles with $source_subdir so that paths
|
||||
# will be relative to the top of the object tree.
|
||||
#
|
||||
for $makefile (@makefiles) {
|
||||
$makefile = "$source_subdir$makefile";
|
||||
}
|
||||
|
||||
create_directories(@makefiles);
|
||||
|
||||
# Find the path to the source directory based on how 'make-makefile'
|
||||
# was invoked. The path is either relative to the object directory
|
||||
# or an absolute path.
|
||||
$given_srcdir = find_srcdir($topsrcdir, $depth);
|
||||
|
||||
if ($debug) {
|
||||
warn "object_fullpath = $object_fullpath\n";
|
||||
warn "object_root = $object_root\n";
|
||||
warn "source_subdir = $source_subdir\n";
|
||||
warn "makefiles = @makefiles\n";
|
||||
warn "given_srcdir = $given_srcdir\n";
|
||||
}
|
||||
|
||||
@unhandled = update_makefiles($given_srcdir, @makefiles);
|
||||
|
||||
run_config_status(@unhandled);
|
||||
|
||||
# end of Main
|
||||
############################################################
|
||||
|
||||
sub dirname {
|
||||
return $_[0] =~ /(.*)\/.*/ ? "$1" : '.';
|
||||
}
|
||||
|
||||
# find_depth: Pull the value of DEPTH out of a Makefile (or Makefile.in)
|
||||
sub find_depth {
|
||||
my $depth = '';
|
||||
open(MAKEFILE, "<$_[0]") || die "Unable to open $_[0]: $!\n";
|
||||
while (<MAKEFILE>) {
|
||||
next unless /^DEPTH\s*=\s*(\..*)/;
|
||||
$depth = $1;
|
||||
last;
|
||||
}
|
||||
close MAKEFILE;
|
||||
return $depth;
|
||||
}
|
||||
|
||||
sub parse_arguments {
|
||||
my @args = @_;
|
||||
my $depth = '';
|
||||
my $topsrcdir = '';
|
||||
my @makefiles = ();
|
||||
|
||||
while (1) {
|
||||
if ($args[0] eq '-d') {
|
||||
$depth = $args[1];
|
||||
shift @args;
|
||||
shift @args;
|
||||
} elsif ($args[0] eq '-t') {
|
||||
$topsrcdir = $args[1];
|
||||
shift @args;
|
||||
shift @args;
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
if ($topsrcdir eq '') {
|
||||
$topsrcdir = $0; # Figure out topsrcdir based on program name.
|
||||
$topsrcdir =~ s|/?build/autoconf/.*$||;
|
||||
}
|
||||
if ($depth eq '') {
|
||||
# Use $(DEPTH) in the Makefile or Makefile.in to determine the depth
|
||||
if (-e "Makefile.in") {
|
||||
$depth = find_depth("Makefile.in");
|
||||
} elsif (-e "Makefile") {
|
||||
$depth = find_depth("Makefile");
|
||||
} elsif (-e "../Makefile") {
|
||||
$depth = "../".find_depth("../Makefile");
|
||||
$depth =~ s/\/\.$//;
|
||||
} else {
|
||||
warn "Unable to determine depth (e.g. ../..) to root of objdir tree.\n";
|
||||
die "No Makefile(.in) present. Try running with '-d <depth>'\n";
|
||||
}
|
||||
}
|
||||
|
||||
# Build the list of makefiles to generate
|
||||
#
|
||||
@makefiles = ();
|
||||
my $makefile;
|
||||
foreach $makefile (@args) {
|
||||
$makefile =~ s/\.in$//;
|
||||
$makefile =~ s/\/$//;
|
||||
$makefile =~ /Makefile$/ or $makefile .= "/Makefile";
|
||||
push @makefiles, "$makefile";
|
||||
}
|
||||
@makefiles = "Makefile" unless @args;
|
||||
|
||||
return ($topsrcdir, $depth, @makefiles);
|
||||
}
|
||||
|
||||
|
||||
# Create all the directories at once.
|
||||
# This can be much faster than calling mkdir() for each one.
|
||||
sub create_directories {
|
||||
my @makefiles = @_;
|
||||
my @dirs = ();
|
||||
my $ac_file;
|
||||
foreach $ac_file (@makefiles) {
|
||||
push @dirs, dirname($ac_file);
|
||||
}
|
||||
# Call mkdir with the directories sorted by subdir count (how many /'s)
|
||||
system "mkdir -p ". join(' ', @dirs) if @dirs;
|
||||
}
|
||||
|
||||
# Find the top of the source directory
|
||||
# (Assuming that the executable is in $top_srcdir/build/autoconf)
|
||||
sub find_srcdir {
|
||||
my ($ac_given_srcdir, $depth) = @_;
|
||||
|
||||
if ($debug) {
|
||||
print "ac_given_srcdir = $ac_given_srcdir\n";
|
||||
print "depth = $depth\n";
|
||||
}
|
||||
if ($ac_given_srcdir =~ /^\./ and $depth ne '.') {
|
||||
my $quoted_depth = quotemeta($depth);
|
||||
$ac_given_srcdir =~ s|^$quoted_depth/?||;
|
||||
}
|
||||
if ($debug) {
|
||||
print "ac_given_srcdir = $ac_given_srcdir\n";
|
||||
}
|
||||
$ac_given_srcdir = '.' if $ac_given_srcdir eq '';
|
||||
return $ac_given_srcdir;
|
||||
}
|
||||
|
||||
# Output the makefiles.
|
||||
#
|
||||
sub update_makefiles {
|
||||
my ($ac_given_srcdir, @makefiles) = @_;
|
||||
my @unhandled=();
|
||||
|
||||
my $ac_file;
|
||||
foreach $ac_file (@makefiles) {
|
||||
my $ac_file_in = "$ac_given_srcdir/${ac_file}.in";
|
||||
my $ac_dir = dirname($ac_file);
|
||||
my $ac_dots = '';
|
||||
my $ac_dir_suffix = '';
|
||||
my $srcdir = '.';
|
||||
my $top_srcdir = '.';
|
||||
|
||||
# Determine $srcdir and $top_srcdir
|
||||
#
|
||||
if ($ac_dir ne '.') {
|
||||
$ac_dir_suffix = "/$ac_dir";
|
||||
$ac_dir_suffix =~ s%^/\./%/%;
|
||||
$ac_dots = $ac_dir_suffix;
|
||||
$ac_dots =~ s%/[^/]*%../%g;
|
||||
}
|
||||
if ($ac_given_srcdir eq '.') {
|
||||
if ($ac_dots ne '') {
|
||||
$top_srcdir = $ac_dots;
|
||||
$top_srcdir =~ s%/$%%;
|
||||
}
|
||||
} elsif ($ac_given_srcdir =~ m%^/% or $ac_given_srcdir =~ m%^.:/%) {
|
||||
$srcdir = "$ac_given_srcdir$ac_dir_suffix";
|
||||
$top_srcdir = "$ac_given_srcdir";
|
||||
} else {
|
||||
$srcdir = "$ac_dots$ac_given_srcdir$ac_dir_suffix";
|
||||
$top_srcdir = "$ac_dots$ac_given_srcdir";
|
||||
}
|
||||
|
||||
if ($debug) {
|
||||
print "ac_dir = $ac_dir\n";
|
||||
print "ac_file = $ac_file\n";
|
||||
print "ac_file_in = $ac_file_in\n";
|
||||
print "srcdir = $srcdir\n";
|
||||
print "top_srcdir = $top_srcdir\n";
|
||||
print "cwd = " . `pwd` . "\n";
|
||||
}
|
||||
|
||||
# Copy the file and make substitutions.
|
||||
# @srcdir@ -> value of $srcdir
|
||||
# @top_srcdir@ -> value of $top_srcdir
|
||||
#
|
||||
if (-e $ac_file) {
|
||||
next if -M _ < -M $ac_file_in; # Next if Makefile is up-to-date.
|
||||
warn "updating $ac_file\n";
|
||||
} else {
|
||||
warn "creating $ac_file\n";
|
||||
}
|
||||
|
||||
open INFILE, "<$ac_file_in" or do {
|
||||
warn "$0: Cannot read $ac_file_in: No such file or directory\n";
|
||||
next;
|
||||
};
|
||||
open OUTFILE, ">$ac_file" or do {
|
||||
warn "$0: Unable to create $ac_file\n";
|
||||
next;
|
||||
};
|
||||
|
||||
while (<INFILE>) {
|
||||
#if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
|
||||
# #warn "Two defines on a line:$ac_file:$.:$_";
|
||||
# push @unhandled, $ac_file;
|
||||
# last;
|
||||
#}
|
||||
|
||||
s/\@srcdir\@/$srcdir/g;
|
||||
s/\@top_srcdir\@/$top_srcdir/g;
|
||||
|
||||
if (/\@[_a-zA-Z]*\@/) {
|
||||
#warn "Unknown variable:$ac_file:$.:$_";
|
||||
push @unhandled, $ac_file;
|
||||
last;
|
||||
}
|
||||
print OUTFILE;
|
||||
}
|
||||
close INFILE;
|
||||
close OUTFILE;
|
||||
}
|
||||
return @unhandled;
|
||||
}
|
||||
|
||||
sub run_config_status {
|
||||
my @unhandled = @_;
|
||||
|
||||
# Run config.status with any unhandled files.
|
||||
#
|
||||
if (@unhandled) {
|
||||
$ENV{CONFIG_FILES}= join ' ', @unhandled;
|
||||
system "./config.status";
|
||||
}
|
||||
}
|
||||
85
mozilla/build/autoconf/match-dir.sh
Executable file
85
mozilla/build/autoconf/match-dir.sh
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
#
|
||||
# This script will match a dir with a set of dirs.
|
||||
#
|
||||
# Usage: match-dir.sh match [dir1 dir2 ... dirn]
|
||||
#
|
||||
# Send comments, improvements, bugs to ramiro@netscape.com
|
||||
#
|
||||
|
||||
if [ -f Makefile ]; then
|
||||
MAKEFILE="Makefile"
|
||||
else
|
||||
if [ -f Makefile.in ]; then
|
||||
MAKEFILE="Makefile.in"
|
||||
else
|
||||
echo
|
||||
echo "There ain't no 'Makefile' or 'Makefile.in' over here: $pwd, dude."
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use DEPTH in the Makefile.in to determine the depth
|
||||
depth=`grep -w DEPTH ${MAKEFILE} | grep "\.\." | awk -F"=" '{ print $2; }'`
|
||||
cwd=`pwd`
|
||||
|
||||
# Determine the depth count
|
||||
n=`echo $depth | tr '/' ' ' | wc -w`
|
||||
|
||||
cd $depth
|
||||
objdir=`pwd`
|
||||
|
||||
path=`echo $cwd | sed "s|^${objdir}/||"`
|
||||
|
||||
match=$path
|
||||
|
||||
for i in $*
|
||||
do
|
||||
# echo "Looking for $match in $i"
|
||||
|
||||
echo $i | grep -q -x $match
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "1"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# echo "Looking for $i in $match"
|
||||
|
||||
echo $match | grep -q $i
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "1"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
echo "0"
|
||||
|
||||
exit 0
|
||||
46
mozilla/build/autoconf/mozconfig-find
Executable file
46
mozilla/build/autoconf/mozconfig-find
Executable file
@@ -0,0 +1,46 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Stephen Lamm <slamm@netscape.com>
|
||||
#
|
||||
|
||||
# mozconfigfind - Loads options from .mozconfig onto configure's
|
||||
# command-line. The .mozconfig file is searched for in the
|
||||
# order:
|
||||
# if $MOZCONFIG is set, use that.
|
||||
# Otherwise, use $TOPSRCDIR/.mozconfig
|
||||
# Otherwise, use $HOME/.mozconfig
|
||||
#
|
||||
topsrcdir=$1
|
||||
|
||||
for _config in $MOZCONFIG \
|
||||
$MOZ_MYCONFIG \
|
||||
$topsrcdir/.mozconfig \
|
||||
$topsrcdir/mozconfig \
|
||||
$topsrcdir/mozconfig.sh \
|
||||
$topsrcdir/myconfig.sh \
|
||||
$HOME/.mozconfig \
|
||||
$HOME/.mozconfig.sh \
|
||||
$HOME/.mozmyconfig.sh
|
||||
do
|
||||
if test -f $_config; then
|
||||
echo $_config;
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
94
mozilla/build/autoconf/mozconfig2client-mk
Executable file
94
mozilla/build/autoconf/mozconfig2client-mk
Executable file
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Stephen Lamm <slamm@netscape.com>
|
||||
#
|
||||
|
||||
# mozconfig2client-mk - Translates .mozconfig into options for client.mk.
|
||||
# Prints defines to stdout.
|
||||
#
|
||||
# See mozconfig2configure for more details
|
||||
|
||||
print_header() {
|
||||
_mozconfig=${MOZCONFIG:-$HOME/.mozconfig}
|
||||
cat >> $tmp_file <<EOF
|
||||
# gmake
|
||||
# This file is automatically generated for client.mk.
|
||||
# Do not edit. Edit $_mozconfig instead.
|
||||
# To create a new .mozconfig file, you can visit,
|
||||
# http://webtools.mozilla.org/build/config.cgi
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
ac_add_options() {
|
||||
echo "# $* is used by configure (not client.mk)" >> $tmp_file
|
||||
}
|
||||
|
||||
mk_add_options() {
|
||||
for _opt
|
||||
do
|
||||
# Escape shell characters, space, tab, dollar, quote, backslash,
|
||||
# and substitute '@<word>@' with '$(<word>)'.
|
||||
_opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'`
|
||||
echo $_opt;
|
||||
opts="${opts:+$opts^}$_opt";
|
||||
done >> $tmp_file
|
||||
}
|
||||
|
||||
mk_echo_options() {
|
||||
echo "Adding client.mk options from $MOZCONFIG:"
|
||||
IFS=^
|
||||
for _opt in $opts; do
|
||||
echo " $_opt"
|
||||
done
|
||||
}
|
||||
|
||||
# Main
|
||||
#--------------------------------------------------
|
||||
|
||||
scriptdir=`dirname $0`
|
||||
topsrcdir=$1
|
||||
out_file=$2
|
||||
tmp_file="$out_file-tmp$$"
|
||||
opts=""
|
||||
|
||||
trap "rm -f $tmp_file; exit 1" 1 2 15
|
||||
|
||||
MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
|
||||
|
||||
print_header > $tmp_file
|
||||
|
||||
# If the path changes, configure should be rerun
|
||||
echo "# PATH=$PATH" >> $tmp_file
|
||||
|
||||
if [ "$MOZCONFIG" ]
|
||||
then
|
||||
. $MOZCONFIG
|
||||
fi
|
||||
|
||||
if [ "$opts" ]; then
|
||||
mk_echo_options
|
||||
fi
|
||||
|
||||
if test -f $out_file && cmp -s $tmp_file $out_file; then
|
||||
rm $tmp_file
|
||||
else
|
||||
mv -f $tmp_file $out_file
|
||||
fi
|
||||
70
mozilla/build/autoconf/mozconfig2configurator
Executable file
70
mozilla/build/autoconf/mozconfig2configurator
Executable file
@@ -0,0 +1,70 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Stephen Lamm (slamm@netscape.com)
|
||||
#
|
||||
|
||||
# mozconfig2configurator - Translates .mozconfig into options for
|
||||
# the online configurator,
|
||||
#
|
||||
# http://webtools.mozilla.org/build/config.cgi
|
||||
#
|
||||
# This is called by the 'webconfig' target of mozilla/client.mk
|
||||
#
|
||||
|
||||
ac_add_options() {
|
||||
for _opt
|
||||
do
|
||||
# Escape special url characters
|
||||
_opt=`echo $_opt | sed -e 's/%/%25/g;s/ /%20/g;s/&/%26/g;'`
|
||||
case "$_opt" in
|
||||
--*-*= ) url="$url$_opt&" ;;
|
||||
--*-* ) url="$url$_opt=yes&" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
mk_add_options() {
|
||||
for _opt
|
||||
do
|
||||
# Escape special url characters
|
||||
# Escape special url characters
|
||||
_opt=`echo $_opt | sed -e 's/%/%25/g;s/ /%20/g;s/&/%26/g;'`
|
||||
url="$url$_opt&"
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# main
|
||||
#
|
||||
|
||||
# find-mozconfig.sh
|
||||
# In params: $MOZCONFIG $HOME ($MOZ_MYCONFIG)
|
||||
scriptdir=`dirname $0`
|
||||
MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
|
||||
|
||||
if [ "$MOZCONFIG" ]
|
||||
then
|
||||
url="http://webtools.mozilla.org/build/config.cgi?"
|
||||
. $MOZCONFIG
|
||||
|
||||
# Drop the last character of $url
|
||||
echo `expr "$url" : "\(.*\)."`
|
||||
fi
|
||||
|
||||
99
mozilla/build/autoconf/mozconfig2configure
Executable file
99
mozilla/build/autoconf/mozconfig2configure
Executable file
@@ -0,0 +1,99 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Stephen Lamm <slamm@netscape.com>
|
||||
#
|
||||
|
||||
# mozconfig2configure - Loads options from .mozconfig onto configure's
|
||||
# command-line. See find-mozconfig.sh for how the config file is
|
||||
# found
|
||||
#
|
||||
# The options from .mozconfig are inserted into the command-line
|
||||
# before the real command-line options. This way the real options
|
||||
# will override any .mozconfig options.
|
||||
#
|
||||
# .mozconfig is a shell script. To add an option to configure's
|
||||
# command-line use the pre-defined function, ac_add_options,
|
||||
#
|
||||
# ac_add_options <configure-option> [<configure-option> ... ]
|
||||
#
|
||||
# For example,
|
||||
#
|
||||
# ac_add_options --with-pthreads --enable-debug
|
||||
#
|
||||
# ac_add_options can be called multiple times in .mozconfig.
|
||||
# Each call adds more options to configure's command-line.
|
||||
|
||||
# Note: $_AUTOCONF_TOOLS_DIR must be defined in the script that includes this.
|
||||
|
||||
ac_add_options() {
|
||||
for _opt
|
||||
do
|
||||
# Escape shell characters, space, tab, dollar, quote, backslash.
|
||||
_opt=`echo $_opt | sed -e 's/\([\ \ \$\"\\]\)/\\\\\1/g;s/@\([^@]*\)@/\$\1/g;'`
|
||||
_opt=`echo $_opt | sed -e 's/@\([^@]*\)@/\$(\1)/g'`
|
||||
|
||||
# Avoid adding duplicates
|
||||
case "$ac_options" in
|
||||
*"$_opt"* ) ;;
|
||||
* ) mozconfig_ac_options="$mozconfig_ac_options $_opt" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
mk_add_options() {
|
||||
# These options are for client.mk
|
||||
# configure can safely ignore them.
|
||||
:
|
||||
}
|
||||
|
||||
ac_echo_options() {
|
||||
echo "Adding configure options from $MOZCONFIG:"
|
||||
eval "set -- $mozconfig_ac_options"
|
||||
for _opt
|
||||
do
|
||||
echo " $_opt"
|
||||
done
|
||||
}
|
||||
|
||||
# Main
|
||||
#--------------------------------------------------
|
||||
_topsrcdir=`dirname $0`
|
||||
ac_options=
|
||||
mozconfig_ac_options=
|
||||
|
||||
# Save the real command-line options
|
||||
for _opt
|
||||
do
|
||||
# Escape shell characters, space, tab, dollar, quote, backslash.
|
||||
_opt=`echo $_opt | sed -e 's/\([\ \ \$\"\\]\)/\\\\\1/g;'`
|
||||
ac_options="$ac_options \"$_opt\""
|
||||
done
|
||||
|
||||
MOZCONFIG=`$_AUTOCONF_TOOLS_DIR/mozconfig-find $_topsrcdir`
|
||||
if [ "$MOZCONFIG" ]; then
|
||||
. $MOZCONFIG
|
||||
fi
|
||||
|
||||
if [ "$mozconfig_ac_options" ]; then
|
||||
ac_echo_options 1>&2
|
||||
fi
|
||||
|
||||
eval "set -- $mozconfig_ac_options $ac_options"
|
||||
|
||||
67
mozilla/build/autoconf/nspr.m4
Normal file
67
mozilla/build/autoconf/nspr.m4
Normal file
@@ -0,0 +1,67 @@
|
||||
# -*- tab-width: 4; -*-
|
||||
# Configure paths for NSPR
|
||||
# Public domain - Chris Seawood <cls@seawood.org> 2001-04-05
|
||||
# Based upon gtk.m4 (also PD) by Owen Taylor
|
||||
|
||||
dnl AM_PATH_NSPR([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for NSPR, and define NSPR_CFLAGS and NSPR_LIBS
|
||||
AC_DEFUN(AM_PATH_NSPR,
|
||||
[dnl
|
||||
|
||||
AC_ARG_WITH(nspr-prefix,
|
||||
[ --with-nspr-prefix=PFX Prefix where NSPR is installed],
|
||||
nspr_config_prefix="$withval",
|
||||
nspr_config_prefix="")
|
||||
|
||||
AC_ARG_WITH(nspr-exec-prefix,
|
||||
[ --with-nspr-exec-prefix=PFX
|
||||
Exec prefix where NSPR is installed],
|
||||
nspr_config_exec_prefix="$withval",
|
||||
nspr_config_exec_prefix="")
|
||||
|
||||
if test -n "$nspr_config_exec_prefix"; then
|
||||
nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
|
||||
if test -z "$NSPR_CONFIG"; then
|
||||
NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
|
||||
fi
|
||||
fi
|
||||
if test -n "$nspr_config_prefix"; then
|
||||
nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
|
||||
if test -z "$NSPR_CONFIG"; then
|
||||
NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
|
||||
fi
|
||||
fi
|
||||
|
||||
unset ac_cv_path_NSPR_CONFIG
|
||||
AC_PATH_PROG(NSPR_CONFIG, nspr-config, no)
|
||||
min_nspr_version=ifelse([$1], ,4.0.0,$1)
|
||||
AC_MSG_CHECKING(for NSPR - version >= $min_nspr_version (skipping))
|
||||
|
||||
no_nspr=""
|
||||
if test "$NSPR_CONFIG" = "no"; then
|
||||
no_nspr="yes"
|
||||
else
|
||||
NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
|
||||
NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
|
||||
|
||||
dnl Skip version check for now
|
||||
nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
nspr_config_micro_version=`$NSPR_CONFIG $nspr_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
fi
|
||||
|
||||
if test -z "$no_nspr"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
AC_SUBST(NSPR_CFLAGS)
|
||||
AC_SUBST(NSPR_LIBS)
|
||||
|
||||
])
|
||||
57
mozilla/build/autoconf/pkg.m4
Normal file
57
mozilla/build/autoconf/pkg.m4
Normal file
@@ -0,0 +1,57 @@
|
||||
dnl This file is Copyright 2001 Red Hat, Inc.
|
||||
dnl This file is in the public domain.
|
||||
dnl
|
||||
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
|
||||
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
|
||||
dnl also defines GSTUFF_PKG_ERRORS on error
|
||||
AC_DEFUN(PKG_CHECK_MODULES, [
|
||||
succeeded=no
|
||||
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
|
||||
if test "$PKG_CONFIG" = "no" ; then
|
||||
echo "*** The pkg-config script could not be found. Make sure it is"
|
||||
echo "*** in your path, or set the PKG_CONFIG environment variable"
|
||||
echo "*** to the full path to pkg-config."
|
||||
else
|
||||
if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7.0; then
|
||||
echo "*** Your version of pkg-config is too old. You need version 0.7.0 or newer."
|
||||
echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
||||
else
|
||||
AC_MSG_CHECKING(for $2)
|
||||
|
||||
if $PKG_CONFIG --exists "$2" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
|
||||
AC_MSG_CHECKING($1_CFLAGS)
|
||||
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
|
||||
AC_MSG_RESULT($$1_CFLAGS)
|
||||
|
||||
AC_MSG_CHECKING($1_LIBS)
|
||||
$1_LIBS=`$PKG_CONFIG --libs "$2"`
|
||||
AC_MSG_RESULT($$1_LIBS)
|
||||
else
|
||||
$1_CFLAGS=""
|
||||
$1_LIBS=""
|
||||
## If we have a custom action on failure, don't print errors, but
|
||||
## do set a variable so people can do so.
|
||||
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
ifelse([$4], ,echo $1_PKG_ERRORS,)
|
||||
fi
|
||||
|
||||
AC_SUBST($1_CFLAGS)
|
||||
AC_SUBST($1_LIBS)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $succeeded = yes; then
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user