Compare commits
511 Commits
MAILIM_BRA
...
NETSCAPE_7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ef1ad9fbc | ||
|
|
10b01c369c | ||
|
|
104c8fe8d7 | ||
|
|
34f7e107ff | ||
|
|
a3bebc6b0f | ||
|
|
9c8991cc44 | ||
|
|
21b640baee | ||
|
|
aa9bee63fc | ||
|
|
35b56c75c2 | ||
|
|
6991439448 | ||
|
|
7bee723d56 | ||
|
|
df2a5275d4 | ||
|
|
aff4e0bb2f | ||
|
|
b81d803390 | ||
|
|
ab6ac0a31d | ||
|
|
472d6e0cfb | ||
|
|
d0c0a6a921 | ||
|
|
72900e0edb | ||
|
|
cbe2249b39 | ||
|
|
ab0aa7118c | ||
|
|
a4c3785f50 | ||
|
|
28fea7fe7d | ||
|
|
ba98c54594 | ||
|
|
2250ff40dc | ||
|
|
e2b8fd356a | ||
|
|
a33ccabd1e | ||
|
|
3c96562702 | ||
|
|
80bafa48f9 | ||
|
|
ef779b7b11 | ||
|
|
b1ac5dd228 | ||
|
|
db876e378d | ||
|
|
ea4c27d979 | ||
|
|
9bed9c8290 | ||
|
|
6d752f5d9b | ||
|
|
8fc073e52b | ||
|
|
5a31496eb0 | ||
|
|
3519bd22cf | ||
|
|
cb38baf4c8 | ||
|
|
dd53284abb | ||
|
|
0b3df0b317 | ||
|
|
fd5e4b32c1 | ||
|
|
b8ed7d5184 | ||
|
|
6c88206d50 | ||
|
|
6300150636 | ||
|
|
fa48dfcca2 | ||
|
|
8ae38475b0 | ||
|
|
d8b7e7f848 | ||
|
|
89fbc40586 | ||
|
|
3fca8a4975 | ||
|
|
e9031b6800 | ||
|
|
efbd75a0b3 | ||
|
|
cb74781241 | ||
|
|
62ca5a2c59 | ||
|
|
bb399b0937 | ||
|
|
1bff3d0f84 | ||
|
|
a672bca9fe | ||
|
|
8b85480c73 | ||
|
|
c22abfef1a | ||
|
|
a65215f7d3 | ||
|
|
4c2e366f9b | ||
|
|
fcc1b296a8 | ||
|
|
954a04b866 | ||
|
|
2b62bd490c | ||
|
|
969733934b | ||
|
|
92504d633b | ||
|
|
6345f05f54 | ||
|
|
aaef08a0d4 | ||
|
|
bc513f36aa | ||
|
|
344a2a950f | ||
|
|
afd9deff38 | ||
|
|
21c1975abf | ||
|
|
f01bb5c354 | ||
|
|
5738f2de70 | ||
|
|
b1bcc03db3 | ||
|
|
f57bfe8089 | ||
|
|
9696b2257b | ||
|
|
6308211d36 | ||
|
|
087b513af8 | ||
|
|
55781765c2 | ||
|
|
0b880c3f33 | ||
|
|
07c3528f53 | ||
|
|
433f63c85f | ||
|
|
2c9d5ffb80 | ||
|
|
57359a5752 | ||
|
|
dd0a7ce7ea | ||
|
|
0d02bd205a | ||
|
|
8cf733bbc1 | ||
|
|
b5cb98b819 | ||
|
|
90402b9a8c | ||
|
|
6423619c8f | ||
|
|
9209ff62fe | ||
|
|
a0d1145f8e | ||
|
|
74e73e10f3 | ||
|
|
238feddbd6 | ||
|
|
a978be0193 | ||
|
|
cb5b4b1b01 | ||
|
|
3ec439a1fd | ||
|
|
c16ff0faf0 | ||
|
|
506b99572b | ||
|
|
4679a340c1 | ||
|
|
9bc7ddddf4 | ||
|
|
a9d5b91669 | ||
|
|
64a4b4e041 | ||
|
|
bb57de0d36 | ||
|
|
ade3fc802f | ||
|
|
c478573816 | ||
|
|
6d80075884 | ||
|
|
3eb34b884b | ||
|
|
4353adcf44 | ||
|
|
8ce8efd86e | ||
|
|
22af3d19b0 | ||
|
|
3e667aeba3 | ||
|
|
9717ee655a | ||
|
|
8bf0331753 | ||
|
|
131bb3f6bb | ||
|
|
b0533dc7a4 | ||
|
|
2464767a0e | ||
|
|
b3ff479e57 | ||
|
|
8edc1bfe80 | ||
|
|
9151441b62 | ||
|
|
e90f36f1ba | ||
|
|
b085bafb64 | ||
|
|
ab66163d40 | ||
|
|
f72164b69a | ||
|
|
0a3fb441b8 | ||
|
|
ace6774c42 | ||
|
|
90cc2ae2ad | ||
|
|
486c6118e2 | ||
|
|
84438fad56 | ||
|
|
c9db4ed2fd | ||
|
|
0dd4d12051 | ||
|
|
584cad73f4 | ||
|
|
e851fcf629 | ||
|
|
c8cd4c0142 | ||
|
|
eed8ea112d | ||
|
|
0cdefef72b | ||
|
|
7bc93da4c9 | ||
|
|
6505f6ae3f | ||
|
|
327e48530d | ||
|
|
ecc5bf01f7 | ||
|
|
56e1aee489 | ||
|
|
01f4d66b6b | ||
|
|
e5e4f0b26c | ||
|
|
a792c0ba44 | ||
|
|
9f7c157dc0 | ||
|
|
a1c5d620cf | ||
|
|
647489f91d | ||
|
|
79017aee7c | ||
|
|
7093aeefa2 | ||
|
|
9187ea31c1 | ||
|
|
959b0bd890 | ||
|
|
e9b4d1c37e | ||
|
|
4de9db38fa | ||
|
|
95537ada6b | ||
|
|
c7287e9c01 | ||
|
|
d096ea5ef8 | ||
|
|
5cff0b49e8 | ||
|
|
1986167e81 | ||
|
|
16c69a134c | ||
|
|
1baf46f180 | ||
|
|
9e403beae8 | ||
|
|
888df6e957 | ||
|
|
05920ee992 | ||
|
|
0194225d8b | ||
|
|
97c9c1ece8 | ||
|
|
50d2799bf8 | ||
|
|
509866e746 | ||
|
|
11f00a6636 | ||
|
|
00c4fb82f8 | ||
|
|
b73ef7a9df | ||
|
|
484eac2e03 | ||
|
|
edc01d68be | ||
|
|
c863d44ace | ||
|
|
e418971eda | ||
|
|
dd7b6b45f5 | ||
|
|
a1721de603 | ||
|
|
a696f04d4d | ||
|
|
c3af0047a7 | ||
|
|
f4637ef0de | ||
|
|
cb3a2e0996 | ||
|
|
a5212f8062 | ||
|
|
9c851a6d41 | ||
|
|
9ff0d77979 | ||
|
|
72108100e8 | ||
|
|
e3a4480ddc | ||
|
|
4a76d52d77 | ||
|
|
256c0c9094 | ||
|
|
02d880cb36 | ||
|
|
1b3fa859b9 | ||
|
|
a6bb24d4c8 | ||
|
|
7c9a240e91 | ||
|
|
5cee5838bf | ||
|
|
0726835c64 | ||
|
|
320ca6ca28 | ||
|
|
4072445f12 | ||
|
|
3f8bb42c7e | ||
|
|
44eccf3e99 | ||
|
|
bca9d10196 | ||
|
|
5d265597f7 | ||
|
|
533e58886e | ||
|
|
afd1e054ec | ||
|
|
42f8892aeb | ||
|
|
c6b05ab2a7 | ||
|
|
8d79ab9138 | ||
|
|
8a331877f7 | ||
|
|
bf5f91136e | ||
|
|
92dc132e55 | ||
|
|
6320031aac | ||
|
|
324d0ddc3b | ||
|
|
95cb3a686d | ||
|
|
51fa48e028 | ||
|
|
030dc46ba9 | ||
|
|
a3ae03ad37 | ||
|
|
514f134015 | ||
|
|
8a410b6fe1 | ||
|
|
509d393ae1 | ||
|
|
1f51267cb5 | ||
|
|
2e507a2491 | ||
|
|
17d4973104 | ||
|
|
8da15e1c80 | ||
|
|
19e0851b35 | ||
|
|
3106d5e24d | ||
|
|
ff9eb3391c | ||
|
|
ee124649b2 | ||
|
|
902cd5e269 | ||
|
|
40e5a9d113 | ||
|
|
8df34cd68e | ||
|
|
8e808c44ee | ||
|
|
cfcaa9c909 | ||
|
|
4023b25ccc | ||
|
|
168b044abc | ||
|
|
01a5f01e3f | ||
|
|
93cb40a1c2 | ||
|
|
e33240dbef | ||
|
|
5c8009f90e | ||
|
|
812bb1716c | ||
|
|
dd51cc7727 | ||
|
|
9b5a6028f2 | ||
|
|
83f74adbed | ||
|
|
6d7ba532c9 | ||
|
|
719f6148dd | ||
|
|
5d62c3cc6a | ||
|
|
aae80b929a | ||
|
|
c3c7fa242d | ||
|
|
8d102035fa | ||
|
|
aa91314590 | ||
|
|
f1d171d635 | ||
|
|
b3068b50ef | ||
|
|
7579ba6446 | ||
|
|
eaa65c0868 | ||
|
|
09e6ecc483 | ||
|
|
cbe5acd88b | ||
|
|
44309b6b69 | ||
|
|
e232ba020c | ||
|
|
aaf2e134b8 | ||
|
|
29c0a861b1 | ||
|
|
699a315d5e | ||
|
|
6e2c371544 | ||
|
|
6c1e42594e | ||
|
|
45b43ac004 | ||
|
|
b502b8efc1 | ||
|
|
52bc62de79 | ||
|
|
7beecd0046 | ||
|
|
959f48bb82 | ||
|
|
9392bde1e3 | ||
|
|
d4bc26bd24 | ||
|
|
aa4c21982b | ||
|
|
9820819552 | ||
|
|
880f61a67c | ||
|
|
521e7835df | ||
|
|
c5bd386711 | ||
|
|
e85e0624e7 | ||
|
|
9821e88608 | ||
|
|
b4b60272e8 | ||
|
|
fc89f1262e | ||
|
|
3e5989752f | ||
|
|
a40574c03f | ||
|
|
f6cf35ca4e | ||
|
|
33244035e4 | ||
|
|
1071f10c04 | ||
|
|
e6328bd509 | ||
|
|
d86149a289 | ||
|
|
14eda85230 | ||
|
|
57e6b9c547 | ||
|
|
82d1070192 | ||
|
|
c0392aee23 | ||
|
|
02822617db | ||
|
|
172fc515a3 | ||
|
|
eac3008773 | ||
|
|
52cca6ed36 | ||
|
|
02f579ce4a | ||
|
|
9ed956dcca | ||
|
|
96d8a8ece0 | ||
|
|
bf9337f3d8 | ||
|
|
4ce66d0295 | ||
|
|
5b7d330067 | ||
|
|
9c4bd18276 | ||
|
|
36ca27b46a | ||
|
|
998811395f | ||
|
|
e7acea9915 | ||
|
|
65d1906f81 | ||
|
|
fce95b6677 | ||
|
|
2ec240eb5c | ||
|
|
21202829f3 | ||
|
|
df8ed489af | ||
|
|
759cc84ac4 | ||
|
|
5e7aa6a1c8 | ||
|
|
943efc9e9f | ||
|
|
b7b3e572b6 | ||
|
|
2b12789fbf | ||
|
|
aaa9ecf79b | ||
|
|
9ac4527500 | ||
|
|
d9d21ee90f | ||
|
|
0068546bf3 | ||
|
|
0d8ecd0d21 | ||
|
|
a41a9d2a9e | ||
|
|
39b506ab01 | ||
|
|
bd004663da | ||
|
|
6ee8dd438a | ||
|
|
a8674b4e10 | ||
|
|
31f63c43ed | ||
|
|
4eb038a1c4 | ||
|
|
094f94cb44 | ||
|
|
82b127ba0b | ||
|
|
93d7608437 | ||
|
|
efe7a90161 | ||
|
|
3c852822ad | ||
|
|
195ec35e03 | ||
|
|
ffc3fedbde | ||
|
|
70903d0a21 | ||
|
|
ce8692fe97 | ||
|
|
a41718dcc7 | ||
|
|
133c46acb5 | ||
|
|
a7ee21f18d | ||
|
|
ea39f306d9 | ||
|
|
c71efb01ce | ||
|
|
e0a60c50f5 | ||
|
|
efec05ce41 | ||
|
|
b5d53cbfd1 | ||
|
|
07e496302c | ||
|
|
329777865b | ||
|
|
bde5680d10 | ||
|
|
60f04d9ed1 | ||
|
|
a44296e6f4 | ||
|
|
4fd072f9b3 | ||
|
|
02d6beada3 | ||
|
|
cf4ae53af2 | ||
|
|
c5bcf9cb2d | ||
|
|
31012ea782 | ||
|
|
3045303bda | ||
|
|
664f7b6ba9 | ||
|
|
ae1c53e386 | ||
|
|
0b3bab9d61 | ||
|
|
7234c2c8d4 | ||
|
|
a86b530963 | ||
|
|
7798a03d15 | ||
|
|
bc50d32b62 | ||
|
|
8fa83f72eb | ||
|
|
c27c3fcdcc | ||
|
|
735a2536da | ||
|
|
f24f902979 | ||
|
|
64dd27f57c | ||
|
|
33ecf1d294 | ||
|
|
918dad7488 | ||
|
|
0d3b70b536 | ||
|
|
6ebf49f699 | ||
|
|
b1df11336d | ||
|
|
6497384abd | ||
|
|
af6d4e6058 | ||
|
|
d0ddeb0ea7 | ||
|
|
177c560d03 | ||
|
|
b5137cca5b | ||
|
|
5b4d8f10d0 | ||
|
|
15861e0899 | ||
|
|
459491e786 | ||
|
|
a25e0f514e | ||
|
|
c5eb29c591 | ||
|
|
5551933833 | ||
|
|
6f7df30dbe | ||
|
|
c7bae18605 | ||
|
|
cbac461555 | ||
|
|
e7af3755e5 | ||
|
|
cf1554a393 | ||
|
|
45fcc528e6 | ||
|
|
6fb703b7e6 | ||
|
|
c90c704127 | ||
|
|
bc2f5778ac | ||
|
|
5820b9d970 | ||
|
|
26432dcb35 | ||
|
|
a060ea6240 | ||
|
|
fdfe478178 | ||
|
|
cea9c992fa | ||
|
|
e510dfda65 | ||
|
|
3349bf4f6c | ||
|
|
50de85c1f1 | ||
|
|
f5acf31b44 | ||
|
|
9a5c5ad50c | ||
|
|
bd887d65a7 | ||
|
|
dfc2a9baa4 | ||
|
|
785b3a8b97 | ||
|
|
e089b55ded | ||
|
|
56eaff5f89 | ||
|
|
b1b0b5e26f | ||
|
|
5f9959cb6a | ||
|
|
d0d165e336 | ||
|
|
673fac74ae | ||
|
|
849a03fcf4 | ||
|
|
43b89a87c3 | ||
|
|
2b462d89ac | ||
|
|
7f02e46de6 | ||
|
|
6ea3a5d455 | ||
|
|
6fd3021383 | ||
|
|
75ffa9f160 | ||
|
|
ae776da105 | ||
|
|
add60686df | ||
|
|
318c4d4e32 | ||
|
|
e93a97fc87 | ||
|
|
758b75177d | ||
|
|
045bea67fd | ||
|
|
d78f3e282e | ||
|
|
f6400c0959 | ||
|
|
9507ed70ae | ||
|
|
358d670381 | ||
|
|
76ee3df50c | ||
|
|
d37950ff50 | ||
|
|
a31ba917d3 | ||
|
|
72cf8919f4 | ||
|
|
a533e6f79e | ||
|
|
e8755c4945 | ||
|
|
e661aff94e | ||
|
|
11af650b54 | ||
|
|
7bdf727629 | ||
|
|
804d8b6a74 | ||
|
|
4699ab09d6 | ||
|
|
a7ec286d93 | ||
|
|
10b1eb2d72 | ||
|
|
f9b23c4cbf | ||
|
|
8a360f6c9d | ||
|
|
b3f041a340 | ||
|
|
f1ccc4dde2 | ||
|
|
42d216f822 | ||
|
|
9e65ef69a5 | ||
|
|
36cdd5f3ff | ||
|
|
d0f31fb261 | ||
|
|
f8e3cddf0a | ||
|
|
4604325dfc | ||
|
|
34ed215e04 | ||
|
|
fa5c5eeb7d | ||
|
|
3317bd174a | ||
|
|
04958e3f9b | ||
|
|
92ff2b7272 | ||
|
|
58150531b4 | ||
|
|
0869043d48 | ||
|
|
c8e259b919 | ||
|
|
c74d723da4 | ||
|
|
d3fb5163a2 | ||
|
|
4ce3a9d36f | ||
|
|
e629278774 | ||
|
|
22d56d374f | ||
|
|
587635d6b6 | ||
|
|
551965e5db | ||
|
|
1e111acc39 | ||
|
|
c461ca32b7 | ||
|
|
a0bac4e516 | ||
|
|
8e4140b79c | ||
|
|
7f3448f68f | ||
|
|
0ee3a71577 | ||
|
|
b1e2b1e3bf | ||
|
|
2ade79cfe2 | ||
|
|
f57fa35533 | ||
|
|
c89366eb3e | ||
|
|
204c694be1 | ||
|
|
b148ba5407 | ||
|
|
9090496ade | ||
|
|
1d66a32348 | ||
|
|
d8a4df2f50 | ||
|
|
daca085785 | ||
|
|
992e77fb04 | ||
|
|
fbe8d4409c | ||
|
|
4743655549 | ||
|
|
08b55a8c92 | ||
|
|
358a7fceee | ||
|
|
6f907b6f81 | ||
|
|
be52de925f | ||
|
|
d7072a40f3 | ||
|
|
7d36c6511d | ||
|
|
9d9d6d8619 | ||
|
|
239695399c | ||
|
|
c1b3007458 | ||
|
|
731717a2fe | ||
|
|
c92d888b06 | ||
|
|
3722e59eaa | ||
|
|
7341a8a72f | ||
|
|
d87745cb1f | ||
|
|
26fe20452e | ||
|
|
fa18c05f79 | ||
|
|
a48dbb8e4c | ||
|
|
e317dd137f | ||
|
|
8946cfe8c2 | ||
|
|
4a01af29d0 | ||
|
|
c14766db45 | ||
|
|
e885f1dd15 | ||
|
|
bab75062ce | ||
|
|
49443b5f2c | ||
|
|
895a74da95 | ||
|
|
446b07e818 | ||
|
|
7fbc9919c2 | ||
|
|
6320f9759f | ||
|
|
72b6ef5cdc | ||
|
|
024577fbad | ||
|
|
6e8bb30a03 |
@@ -49,7 +49,6 @@ ifdef MOZ_ENABLE_XFT
|
||||
$(MAKE) expat
|
||||
endif
|
||||
$(MAKE) tier_1
|
||||
$(MAKE) tier_2
|
||||
$(MAKE) tier_9
|
||||
ifdef MOZ_EXTENSIONS
|
||||
$(MAKE) tier_94
|
||||
@@ -69,7 +68,6 @@ endif
|
||||
DIRS = \
|
||||
$(tier_0_dirs) \
|
||||
$(tier_1_dirs) \
|
||||
$(tier_2_dirs) \
|
||||
$(tier_9_dirs) \
|
||||
$(NULL)
|
||||
|
||||
@@ -102,52 +100,40 @@ tier_0_dirs = \
|
||||
$(NULL)
|
||||
|
||||
#
|
||||
# tier 1 - 3rd party individual libraries
|
||||
#
|
||||
tier_1_dirs += dbm
|
||||
|
||||
ifndef MOZ_NATIVE_JPEG
|
||||
tier_1_dirs += jpeg
|
||||
endif
|
||||
|
||||
ifndef MOZ_NATIVE_ZLIB
|
||||
tier_1_dirs += modules/zlib
|
||||
endif
|
||||
|
||||
# Installer needs standalone libjar, hence standalone zlib
|
||||
ifdef MOZ_INSTALLER
|
||||
tier_1_dirs += modules/zlib/standalone
|
||||
endif
|
||||
|
||||
ifdef MOZ_INTERNAL_LIBART_LGPL
|
||||
tier_1_dirs += other-licenses/libart_lgpl
|
||||
endif
|
||||
|
||||
#
|
||||
# tier 2 - base libraries
|
||||
# tier 1 - base libraries
|
||||
#
|
||||
tier_2_dirs = js
|
||||
tier_1_dirs = js
|
||||
|
||||
# MacOSX needs to build lib for MoreFiles before xpcom
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
tier_2_dirs += lib/mac/MoreFiles
|
||||
tier_1_dirs += lib/mac/MoreFiles
|
||||
endif
|
||||
|
||||
tier_2_dirs += \
|
||||
modules/libreg \
|
||||
string \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
#
|
||||
# tier 9 - core components (necko,gecko)
|
||||
# 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 += \
|
||||
js/src/xpconnect \
|
||||
intl \
|
||||
modules/libjar \
|
||||
$(NULL)
|
||||
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 += \
|
||||
@@ -156,6 +142,12 @@ tier_9_dirs += \
|
||||
$(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
|
||||
@@ -176,6 +168,10 @@ 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 \
|
||||
@@ -226,6 +222,10 @@ 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
|
||||
@@ -290,17 +290,6 @@ ifdef MOZ_ENABLE_XFT
|
||||
$(MAKE) freetype
|
||||
$(MAKE) expat
|
||||
endif
|
||||
|
||||
install::
|
||||
ifndef MOZ_NATIVE_NSPR
|
||||
$(MAKE) -C nsprpub real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/nspr
|
||||
$(RM) -f $(addprefix $(DESTDIR)$(mozappdir)/$(LIB_PREFIX), $(addsuffix .$(LIB_SUFFIX), nspr4 plds4 plc4))
|
||||
$(RM) -f $(addprefix $(DESTDIR)$(bindir)/,nspr-config compile-et.pl prerr.properties)
|
||||
endif
|
||||
ifdef MOZ_LDAP_XPCOM
|
||||
$(MAKE) -C directory/c-sdk real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/ldap
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@@ -52,5 +52,4 @@ LLIBS=\
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
@@ -95,16 +95,6 @@
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::layout:html:base:src:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>::build:</VALUE></SETTING>
|
||||
@@ -1154,13 +1144,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsCaretAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSelectAccessible.cpp</PATH>
|
||||
@@ -1168,13 +1151,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTextAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAccessibilityFactory.cpp</PATH>
|
||||
@@ -1189,13 +1165,6 @@
|
||||
<FILEKIND>Library</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLPluginAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
@@ -1308,21 +1277,11 @@
|
||||
<PATH>nsRootAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsCaretAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSelectAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTextAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAccessibilityFactory.cpp</PATH>
|
||||
@@ -1333,11 +1292,6 @@
|
||||
<PATH>accessible_xul.o</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLPluginAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
<TARGET>
|
||||
@@ -1382,16 +1336,6 @@
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::layout:html:base:src:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>::build:</VALUE></SETTING>
|
||||
@@ -2441,13 +2385,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsCaretAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSelectAccessible.cpp</PATH>
|
||||
@@ -2455,13 +2392,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTextAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAccessibilityFactory.cpp</PATH>
|
||||
@@ -2476,13 +2406,6 @@
|
||||
<FILEKIND>Library</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLPluginAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
@@ -2595,21 +2518,11 @@
|
||||
<PATH>nsRootAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsCaretAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSelectAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTextAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsAccessibilityFactory.cpp</PATH>
|
||||
@@ -2620,11 +2533,6 @@
|
||||
<PATH>accessible_xulDebug.o</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLPluginAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
</TARGETLIST>
|
||||
@@ -2695,12 +2603,6 @@
|
||||
<PATH>nsHTMLLinkAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>accessible.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLPluginAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>accessible.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
@@ -2725,24 +2627,12 @@
|
||||
<PATH>nsRootAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>accessible.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsCaretAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>accessible.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSelectAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>accessible.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTextAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>accessible.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
|
||||
@@ -745,13 +745,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleCaret.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleSelectable.idl</PATH>
|
||||
@@ -766,55 +759,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperLink.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleAction.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleValue.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleTable.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleEditableText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
@@ -842,11 +786,6 @@
|
||||
<PATH>nsIAccessibleDocument.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleCaret.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleSelectable.idl</PATH>
|
||||
@@ -857,41 +796,6 @@
|
||||
<PATH>nsIAccessibleProvider.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperLink.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleAction.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleValue.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleTable.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleEditableText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
<TARGET>
|
||||
@@ -1596,13 +1500,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleCaret.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleSelectable.idl</PATH>
|
||||
@@ -1617,55 +1514,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperLink.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleAction.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleValue.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleTable.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleEditableText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
@@ -1693,11 +1541,6 @@
|
||||
<PATH>nsIAccessibleDocument.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleCaret.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleSelectable.idl</PATH>
|
||||
@@ -1708,41 +1551,6 @@
|
||||
<PATH>nsIAccessibleProvider.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperLink.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleAction.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleValue.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleTable.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleEditableText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
</TARGETLIST>
|
||||
@@ -1783,12 +1591,6 @@
|
||||
<PATH>nsIAccessibleDocument.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleCaret.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
@@ -1801,48 +1603,6 @@
|
||||
<PATH>nsIAccessibleProvider.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleHyperLink.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleAction.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleValue.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleTable.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsIAccessibleEditableText.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</GROUPLIST>
|
||||
|
||||
</PROJECT>
|
||||
|
||||
@@ -95,26 +95,6 @@
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::layout:html:base:src:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::modules:plugin:base:src:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>::build:</VALUE></SETTING>
|
||||
@@ -1042,13 +1022,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsXULTreeAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
@@ -1081,11 +1054,6 @@
|
||||
<PATH>nsXULTabAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsXULTreeAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
<TARGET>
|
||||
@@ -1130,26 +1098,6 @@
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::layout:html:base:src:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::modules:plugin:base:src:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>::build:</VALUE></SETTING>
|
||||
@@ -2077,13 +2025,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsXULTreeAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
@@ -2116,11 +2057,6 @@
|
||||
<PATH>nsXULTabAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsXULTreeAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
<TARGET>
|
||||
@@ -4031,12 +3967,6 @@
|
||||
<PATH>nsXULTextAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>accessible_xul.o</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsXULTreeAccessible.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</GROUPLIST>
|
||||
|
||||
</PROJECT>
|
||||
|
||||
@@ -32,21 +32,15 @@ XPIDL_MODULE= accessibility
|
||||
XPIDLSRCS = \
|
||||
nsIAccessibilityService.idl \
|
||||
nsIAccessible.idl \
|
||||
nsIAccessibleAction.idl \
|
||||
nsIAccessibleCaret.idl \
|
||||
nsIAccessibleDocument.idl \
|
||||
nsIAccessibleEditableText.idl \
|
||||
nsIAccessibleEventReceiver.idl \
|
||||
nsIAccessibleEventListener.idl \
|
||||
nsIAccessibleHyperLink.idl \
|
||||
nsIAccessibleHyperText.idl \
|
||||
nsIAccessibleSelectable.idl \
|
||||
nsIAccessibleProvider.idl \
|
||||
nsIAccessibleSelectable.idl \
|
||||
nsIAccessibleTable.idl \
|
||||
nsIAccessibleText.idl \
|
||||
nsIAccessibleValue.idl \
|
||||
nsIAccessibleWin32Object.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
@@ -26,20 +26,11 @@ XPIDL_MODULE=accessibility
|
||||
XPIDLSRCS = \
|
||||
.\nsIAccessibilityService.idl \
|
||||
.\nsIAccessible.idl \
|
||||
.\nsIAccessibleAction.idl \
|
||||
.\nsIAccessibleCaret.idl \
|
||||
.\nsIAccessibleDocument.idl \
|
||||
.\nsIAccessibleEditableText.idl \
|
||||
.\nsIAccessibleEventReceiver.idl \
|
||||
.\nsIAccessibleEventListener.idl \
|
||||
.\nsIAccessibleHyperLink.idl \
|
||||
.\nsIAccessibleHyperText.idl \
|
||||
.\nsIAccessibleProvider.idl \
|
||||
.\nsIAccessibleSelectable.idl \
|
||||
.\nsIAccessibleTable.idl \
|
||||
.\nsIAccessibleText.idl \
|
||||
.\nsIAccessibleValue.idl \
|
||||
.\nsIAccessibleWin32Object.idl \
|
||||
.\nsIAccessibleProvider.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
|
||||
@@ -27,10 +27,8 @@
|
||||
#include "nsIAtom.idl"
|
||||
#include "domstubs.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
#include "nsIAccessibleCaret.idl"
|
||||
|
||||
interface nsIWeakReference;
|
||||
interface nsIAccessibleEventListener;
|
||||
|
||||
[scriptable, uuid(68D9720A-0984-42b6-A3F5-8237ED925727)]
|
||||
interface nsIAccessibilityService : nsISupports
|
||||
@@ -38,28 +36,23 @@ interface nsIAccessibilityService : nsISupports
|
||||
nsIAccessible createAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
|
||||
nsIAccessible createIFrameAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createRootAccessible(in nsISupports aPresContext, in nsISupports aFrame);
|
||||
nsIAccessibleCaret createCaretAccessible(in nsIDOMNode aNode, in nsIAccessibleEventListener aListener);
|
||||
|
||||
nsIAccessible createHTML4ButtonAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLAreaAccessible(in nsIWeakReference aPresShell, in nsIDOMNode aDOMNode, in nsIAccessible aAccParent);
|
||||
nsIAccessible createHTMLBlockAccessible(in nsIDOMNode aNode, in nsISupports aDocument);
|
||||
nsIAccessible createHTMLButtonAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLButtonAccessibleXBL(in nsIDOMNode aNode);
|
||||
nsIAccessible createHTMLCheckboxAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLCheckboxAccessibleXBL(in nsIDOMNode aNode);
|
||||
nsIAccessible createHTMLComboboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
|
||||
nsIAccessible createHTMLGroupboxAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLImageAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLListboxAccessible(in nsIDOMNode aNode, in nsISupports aPresShell);
|
||||
nsIAccessible createHTMLNativeWindowAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell, in PRInt32 aHWnd);
|
||||
nsIAccessible createHTMLPluginAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell);
|
||||
// new
|
||||
// nsIAccessible CreateHTMLObjectAccessible(in nsISupports aFrame);
|
||||
// end new
|
||||
nsIAccessible createHTMLRadioButtonAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLRadioButtonAccessibleXBL(in nsIDOMNode aNode);
|
||||
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsISupports aPresShell);
|
||||
nsIAccessible createHTMLTableAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLTableCellAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLTableCaptionAccessible(in nsIDOMNode aDOMNode);
|
||||
nsIAccessible createHTMLTableHeadAccessible(in nsIDOMNode aDOMNode);
|
||||
nsIAccessible createHTMLTextAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLTextFieldAccessible(in nsISupports aFrame);
|
||||
|
||||
@@ -88,9 +81,6 @@ interface nsIAccessibilityService : nsISupports
|
||||
nsIAccessible createXULTabPanelsAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTabsAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTextAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTreeAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTreeColumnsAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createXULTreeColumnitemAccessible(in nsIDOMNode aNode);
|
||||
|
||||
nsIAccessible getAccessibleFor(in nsIDOMNode aNode);
|
||||
};
|
||||
|
||||
@@ -38,18 +38,15 @@ interface nsIAccessible : nsISupports
|
||||
readonly attribute nsIAccessible accLastChild;
|
||||
|
||||
readonly attribute long accChildCount;
|
||||
attribute AString accName;
|
||||
readonly attribute AString accValue;
|
||||
readonly attribute long accId;
|
||||
|
||||
readonly attribute AString accDescription;
|
||||
readonly attribute AString accKeyboardShortcut;
|
||||
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 AString accHelp;
|
||||
readonly attribute DOMString accHelp;
|
||||
readonly attribute nsIAccessible accFocused;
|
||||
|
||||
nsIAccessible accGetAt(in long x, in long y);
|
||||
@@ -71,7 +68,7 @@ interface nsIAccessible : nsISupports
|
||||
void accTakeFocus();
|
||||
|
||||
readonly attribute PRUint8 accNumActions;
|
||||
AString getAccActionName(in PRUint8 index);
|
||||
DOMString getAccActionName(in PRUint8 index);
|
||||
void accDoAction(in PRUint8 index); // Action number 0 is the default action
|
||||
|
||||
nsIDOMNode accGetDOMNode();
|
||||
@@ -128,204 +125,69 @@ interface nsIAccessible : nsISupports
|
||||
const unsigned long STATE_VERTICAL = 0x80000000; // Especially used for sliders and scrollbars
|
||||
|
||||
|
||||
%{C++
|
||||
#ifdef MOZ_ACCESSIBILITY_ATK
|
||||
|
||||
/*******************************************************************************
|
||||
The following nsIAccessible roles are traslated to ATK_ROLE_UNKNOWN
|
||||
|
||||
ROLE_TITLEBAR, ROLE_SOUND, ROLE_CURSOR, ROLE_CARET, ROLE_BORDER,
|
||||
ROLE_GROUPING, ROLE_EQUATION, ROLE_COLUMN, ROLE_ROW, ROLE_LINK,
|
||||
ROLE_WHITESPACE, ROLE_CLOCK,
|
||||
ROLE_IPADDRESS
|
||||
|
||||
ROLE_GRIP
|
||||
The object represents a special mouse pointer, which allows a user to
|
||||
manipulate user interface elements such as windows.
|
||||
|
||||
ROLE_HELPBALLOON
|
||||
The object displays a Help topic in the form of a ToolTip or Help balloon.
|
||||
|
||||
ROLE_PROPERTYPAGE
|
||||
The object represents a property sheet.
|
||||
|
||||
ROLE_INDICATOR
|
||||
The object represents an indicator, such as a pointer graphic pointing to
|
||||
the currrent item.
|
||||
|
||||
ROLE_HOTKEYFIELD
|
||||
The object represents a hot-key field that allow the user to enter a
|
||||
sequence of keystroke.
|
||||
|
||||
|
||||
The following ATK roles have no corresponding nsIAccessible roles. Perhaps
|
||||
there are not these types of widget/control in Mozilla, so don't need these
|
||||
ATK roles? Or need add some of them?
|
||||
|
||||
ATK_ROLE_ARROW
|
||||
An arrow in one of the four cardinal directions.
|
||||
|
||||
ATK_ROLE_INTERNAL_FRAME
|
||||
A frame-like object that is clipped by a desktop pane.
|
||||
|
||||
ATK_ROLE_ACCEL_LABEL, ATK_ROLE_CANVAS, ATK_ROLE_CHECK_MENU_ITEM,
|
||||
ATK_ROLE_COLOR_CHOOSER, ATK_ROLE_DATE_EDITOR, ATK_ROLE_DESKTOP_ICON,
|
||||
ATK_ROLE_DESKTOP_FRAME, ATK_ROLE_DIRECTORY_PANE, ATK_ROLE_FILE_CHOOSER,
|
||||
ATK_ROLE_FILLER, ATK_ROLE_FONT_CHOOSER, ATK_ROLE_GLASS_PANE,
|
||||
ATK_ROLE_HTML_CONTAINER, ATK_ROLE_ICON, ATK_ROLE_LAYERED_PANE,
|
||||
ATK_ROLE_POPUP_MENU, ATK_ROLE_OPTION_PANE, ATK_ROLE_PASSWORD_TEXT,
|
||||
ATK_ROLE_RADIO_MENU_ITEM, ATK_ROLE_ROOT_PANE, ATK_ROLE_SCROLL_PANE,
|
||||
ATK_ROLE_SPLIT_PANE, ATK_ROLE_TEAR_OFF_MENU_ITEM, ATK_ROLE_TERMINAL,
|
||||
ATK_ROLE_TOGGLE_BUTTON, ATK_ROLE_TREE_TABLE, ATK_ROLE_VIEWPORT, ATK_ROLE_LABEL
|
||||
|
||||
Important:
|
||||
Following value should keep synchronization with the definitions in atk.h
|
||||
*******************************************************************************/
|
||||
enum { ROLE_TITLEBAR = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_MENUBAR = 33U }; // ATK_ROLE_MENU_BAR
|
||||
enum { ROLE_SCROLLBAR = 47U }; // ATK_ROLE_SCROLL_BAR
|
||||
enum { ROLE_GRIP = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_SOUND = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_CURSOR = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_CARET = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_ALERT = 2U }; // ATK_ROLE_ALERT
|
||||
enum { ROLE_WINDOW = 68U }; // ATK_ROLE_WINDOW
|
||||
// An object used for drawing custom user interface elements
|
||||
enum { ROLE_CLIENT = 18U }; // ATK_ROLE_DRAWING_AREA
|
||||
enum { ROLE_MENUPOPUP = 32U }; // ATK_ROLE_MENU
|
||||
enum { ROLE_MENUITEM = 34U }; // ATK_ROLE_MENU_ITEM
|
||||
enum { ROLE_TOOLTIP = 63U }; // ATK_ROLE_TOOL_TIP
|
||||
// The object represents a main window for a application
|
||||
enum { ROLE_APPLICATION = 22U }; // ATK_ROLE_FRAME
|
||||
// The object represents a document window, only for MDI windows
|
||||
enum { ROLE_DOCUMENT = 68U }; // ATK_ROLE_WINDOW
|
||||
enum { ROLE_PANE = 38U }; // ATK_ROLE_PANEL
|
||||
enum { ROLE_CHART = 26U }; // ATK_ROLE_IMAGE
|
||||
enum { ROLE_DIALOG = 16U }; // ATK_ROLE_DIALOG
|
||||
enum { ROLE_BORDER = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_GROUPING = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_SEPARATOR = 49U }; // ATK_ROLE_SEPARATOR
|
||||
enum { ROLE_TOOLBAR = 62U }; // ATK_ROLE_TOOL_BAR
|
||||
enum { ROLE_STATUSBAR = 53U }; // ATK_ROLE_STATUSBAR
|
||||
enum { ROLE_TABLE = 54U }; // ATK_ROLE_TABLE
|
||||
// Or ATK_ROLE_TABLE_COLUMN_HEADER?
|
||||
enum { ROLE_COLUMNHEADER = 10U };// ATK_ROLE_COLUMN_HEADER
|
||||
// Or ATK_ROLE_TABLE_ROW_HEADER ?
|
||||
enum { ROLE_ROWHEADER = 46U }; // ATK_ROLE_ROW_HEADER
|
||||
enum { ROLE_COLUMN = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_ROW = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_CELL = 55U }; // ATK_ROLE_TABLE_CELL
|
||||
enum { ROLE_LINK = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_HELPBALLOON = 66U }; // ATK_ROLE_UNKNOWN
|
||||
// The object represents a cartoon-like graphic object
|
||||
enum { ROLE_CHARACTER = 26U }; // ATK_ROLE_IMAGE
|
||||
enum { ROLE_LIST = 30U }; // ATK_ROLE_LIST
|
||||
enum { ROLE_LISTITEM = 31U }; // ATK_ROLE_LIST_ITEM
|
||||
// The object represents an outline or tree structure
|
||||
enum { ROLE_OUTLINE = 64U }; // ATK_ROLE_TREE
|
||||
// The object represents an item in an outline or tree structure
|
||||
enum { ROLE_OUTLINEITEM = 31U }; // ATK_ROLE_LIST_ITEM
|
||||
enum { ROLE_PAGETAB = 36U }; // ATK_ROLE_PAGE_TAB
|
||||
enum { ROLE_PROPERTYPAGE = 66U };// ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_INDICATOR = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_GRAPHIC = 26U }; // ATK_ROLE_IMAGE
|
||||
// Read-only text, can't be modified or selected
|
||||
enum { ROLE_STATICTEXT = 60U }; // ATK_ROLE_TEXT
|
||||
enum { ROLE_TEXT = 60U }; // ATK_ROLE_TEXT
|
||||
enum { ROLE_PUSHBUTTON = 42U }; // ATK_ROLE_PUSH_BUTTON
|
||||
enum { ROLE_CHECKBUTTON = 7U }; // ATK_ROLE_CHECK_BOX
|
||||
enum { ROLE_RADIOBUTTON = 43U }; // ATK_ROLE_RADIO_BUTTON
|
||||
enum { ROLE_COMBOBOX = 11U }; // ATK_ROLE_COMBO_BOX
|
||||
// Just represents the calender control
|
||||
enum { ROLE_DROPLIST = 5U }; // ATK_ROLE_CALENDAR
|
||||
enum { ROLE_PROGRESSBAR = 41U }; // ATK_ROLE_PROGRESS_BAR
|
||||
enum { ROLE_DIAL = 15U }; // ATK_ROLE_DIAL
|
||||
enum { ROLE_HOTKEYFIELD = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_SLIDER = 50U }; // ATK_ROLE_SLIDER
|
||||
enum { ROLE_SPINBUTTON = 52U }; // ATK_ROLE_SPIN_BUTTON
|
||||
enum { ROLE_DIAGRAM = 26U }; // ATK_ROLE_IMAGE
|
||||
enum { ROLE_ANIMATION = 3U }; // ATK_ROLE_ANIMATION
|
||||
enum { ROLE_EQUATION = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_BUTTONDROPDOWN = 42U }; // ATK_ROLE_PUSH_BUTTON
|
||||
enum { ROLE_BUTTONMENU = 42U }; // ATK_ROLE_PUSH_BUTTON
|
||||
// Represents a button that drops down a grid
|
||||
enum { ROLE_BUTTONDROPDOWNGRID = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_WHITESPACE = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_PAGETABLIST = 37U }; // ATK_ROLE_PAGE_TAB_LIST
|
||||
enum { ROLE_CLOCK = 66U }; // ATK_ROLE_UNKNOWN
|
||||
// Represents a button on the toolbar that has a drop-down list icon
|
||||
// directly adjacent to the button
|
||||
enum { ROLE_SPLITBUTTON = 42U }; // ATK_ROLE_PUSH_BUTTON
|
||||
enum { ROLE_IPADDRESS = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_NOTHING = 0U }; // ATK_ROLE_INVALID
|
||||
|
||||
#else
|
||||
// MSAA Roles - only one per nsIAccessible or IAccessible
|
||||
enum { ROLE_TITLEBAR = 1U };
|
||||
enum { ROLE_MENUBAR = 2U };
|
||||
enum { ROLE_SCROLLBAR = 3U };
|
||||
enum { ROLE_GRIP = 4U };
|
||||
enum { ROLE_SOUND = 5U };
|
||||
enum { ROLE_CURSOR = 6U };
|
||||
enum { ROLE_CARET = 7U };
|
||||
enum { ROLE_ALERT = 8U };
|
||||
enum { ROLE_WINDOW = 9U };
|
||||
enum { ROLE_CLIENT = 10U };
|
||||
enum { ROLE_MENUPOPUP = 11U };
|
||||
enum { ROLE_MENUITEM = 12U };
|
||||
enum { ROLE_TOOLTIP = 13U };
|
||||
enum { ROLE_APPLICATION = 14U };
|
||||
enum { ROLE_DOCUMENT = 15U };
|
||||
enum { ROLE_PANE = 16U };
|
||||
enum { ROLE_CHART = 17U };
|
||||
enum { ROLE_DIALOG = 18U };
|
||||
enum { ROLE_BORDER = 19U };
|
||||
enum { ROLE_GROUPING = 20U };
|
||||
enum { ROLE_SEPARATOR = 21U };
|
||||
enum { ROLE_TOOLBAR = 22U };
|
||||
enum { ROLE_STATUSBAR = 23U };
|
||||
enum { ROLE_TABLE = 24U };
|
||||
enum { ROLE_COLUMNHEADER = 25U };
|
||||
enum { ROLE_ROWHEADER = 26U };
|
||||
enum { ROLE_COLUMN = 27U };
|
||||
enum { ROLE_ROW = 28U };
|
||||
enum { ROLE_CELL = 29U };
|
||||
enum { ROLE_LINK = 30U };
|
||||
enum { ROLE_HELPBALLOON = 31U };
|
||||
enum { ROLE_CHARACTER = 32U };
|
||||
enum { ROLE_LIST = 33U };
|
||||
enum { ROLE_LISTITEM = 34U };
|
||||
enum { ROLE_OUTLINE = 35U };
|
||||
enum { ROLE_OUTLINEITEM = 36U };
|
||||
enum { ROLE_PAGETAB = 37U };
|
||||
enum { ROLE_PROPERTYPAGE = 38U };
|
||||
enum { ROLE_INDICATOR = 39U };
|
||||
enum { ROLE_GRAPHIC = 40U };
|
||||
enum { ROLE_STATICTEXT = 41U };
|
||||
enum { ROLE_TEXT = 42U };
|
||||
enum { ROLE_PUSHBUTTON = 43U };
|
||||
enum { ROLE_CHECKBUTTON = 44U };
|
||||
enum { ROLE_RADIOBUTTON = 45U };
|
||||
enum { ROLE_COMBOBOX = 46U };
|
||||
enum { ROLE_DROPLIST = 47U };
|
||||
enum { ROLE_PROGRESSBAR = 48U };
|
||||
enum { ROLE_DIAL = 49U };
|
||||
enum { ROLE_HOTKEYFIELD = 50U };
|
||||
enum { ROLE_SLIDER = 51U };
|
||||
enum { ROLE_SPINBUTTON = 52U };
|
||||
enum { ROLE_DIAGRAM = 53U };
|
||||
enum { ROLE_ANIMATION = 54U };
|
||||
enum { ROLE_EQUATION = 55U };
|
||||
enum { ROLE_BUTTONDROPDOWN = 56U };
|
||||
enum { ROLE_BUTTONMENU = 57U };
|
||||
enum { ROLE_BUTTONDROPDOWNGRID = 58U };
|
||||
enum { ROLE_WHITESPACE = 59U };
|
||||
enum { ROLE_PAGETABLIST = 60U };
|
||||
enum { ROLE_CLOCK = 61U };
|
||||
enum { ROLE_SPLITBUTTON = 62U };
|
||||
enum { ROLE_IPADDRESS = 63U };
|
||||
enum { ROLE_NOTHING = 4294967295U };
|
||||
|
||||
#endif
|
||||
%}
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
|
||||
* Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(829B36D4-125A-4279-ABC4-87D834664F82)]
|
||||
interface nsIAccessibleAction : nsISupports
|
||||
{
|
||||
readonly attribute long actions;
|
||||
|
||||
boolean doAction (in long index);
|
||||
|
||||
AString getDescription (in long index);
|
||||
void getDescriptionConst (in long index,
|
||||
[shared, retval] out string description);
|
||||
|
||||
AString getKeyBinding (in long index);
|
||||
void getKeyBindingConst (in long index,
|
||||
[shared, retval] out string keyBinding);
|
||||
};
|
||||
|
||||
/*
|
||||
Assumptions:
|
||||
|
||||
string is a UTF-8 or most likely ASCII
|
||||
encoding.
|
||||
|
||||
*/
|
||||
@@ -1,32 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
|
||||
[scriptable, uuid(9124c666-6133-4be6-b3ed-dd0ec35f1e64)]
|
||||
interface nsIAccessibleCaret : nsISupports
|
||||
{
|
||||
void attachNewSelectionListener(in nsIDOMNode aFocusedNode);
|
||||
void removeSelectionListener();
|
||||
};
|
||||
@@ -26,17 +26,16 @@
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
#include "domstubs.idl"
|
||||
#include "nsIAccessibleCaret.idl"
|
||||
interface nsIDocument;
|
||||
|
||||
[scriptable, uuid(8781FC88-355F-4439-881F-6504A0A1CEB6)]
|
||||
interface nsIAccessibleDocument : nsISupports
|
||||
{
|
||||
readonly attribute AString URL;
|
||||
readonly attribute AString title;
|
||||
readonly attribute AString mimeType;
|
||||
readonly attribute AString docType;
|
||||
AString getNameSpaceURIForID(in short nameSpaceID);
|
||||
readonly attribute DOMString URL;
|
||||
readonly attribute DOMString title;
|
||||
readonly attribute DOMString mimeType;
|
||||
readonly attribute DOMString docType;
|
||||
DOMString getNameSpaceURIForID(in short nameSpaceID);
|
||||
[noscript] nsIDocument getDocument();
|
||||
readonly attribute nsIAccessibleCaret caretAccessible;
|
||||
|
||||
};
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
|
||||
* Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(91F0A56C-11BE-47C7-8D02-7C15E00C05F5)]
|
||||
interface nsIAccessibleEditableText : nsISupports
|
||||
{
|
||||
/**
|
||||
* Set font styles, such as italic, bold...
|
||||
*/
|
||||
void setAttributes (in long startPos, in long endPos,
|
||||
in nsISupports attributes);
|
||||
void setTextContents (in AString text);
|
||||
void insertText (in AString text, in long position);
|
||||
void copyText (in long startPos, in long endPos);
|
||||
void cutText (in long startPos, in long endPos);
|
||||
void deleteText (in long startPos, in long endPos);
|
||||
void pasteText (in long position);
|
||||
};
|
||||
|
||||
/*
|
||||
Assumptions:
|
||||
|
||||
selectAttributes method takes an nsISupports parameter.
|
||||
'set' methods throw exception on failure.
|
||||
'wstring' inputs are potentially multibyte (UTF-16 for
|
||||
instance); 'string' and UTF-8 may be a better choice.
|
||||
|
||||
*/
|
||||
@@ -25,75 +25,21 @@
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
|
||||
%{ C++
|
||||
// extra event data (currently used by ATK)
|
||||
struct AccessibleEventData {
|
||||
PRUint32 aUnused;
|
||||
};
|
||||
%}
|
||||
|
||||
[ptr] native AccessibleEventData(AccessibleEventData);
|
||||
|
||||
[scriptable, uuid(BEE49E7D-9D06-49bf-8984-1694C697D74F)]
|
||||
interface nsIAccessibleEventListener : nsISupports
|
||||
{
|
||||
// these are set to the values given by MSAA
|
||||
const unsigned long EVENT_CREATE = 0x8000;
|
||||
const unsigned long EVENT_DESTROY = 0x8001;
|
||||
const unsigned long EVENT_SHOW = 0x8002;
|
||||
const unsigned long EVENT_HIDE = 0x8003;
|
||||
const unsigned long EVENT_REORDER = 0x8004;
|
||||
const unsigned long EVENT_FOCUS = 0x8005;
|
||||
const unsigned long EVENT_STATE_CHANGE = 0x800A;
|
||||
const unsigned long EVENT_LOCATION_CHANGE = 0x800B;
|
||||
const unsigned long EVENT_NAME_CHANGE = 0x800C;
|
||||
const unsigned long EVENT_DESCRIPTIONCHANGE = 0x800D;
|
||||
const unsigned long EVENT_VALUE_CHANGE = 0x800E;
|
||||
const unsigned long EVENT_PARENTCHANGE = 0x800F;
|
||||
const unsigned long EVENT_HELPCHANGE = 0x8010;
|
||||
const unsigned long EVENT_DEFACTIONCHANGE = 0x8011;
|
||||
const unsigned long EVENT_ACCELERATORCHANGE = 0x8012;
|
||||
const unsigned long EVENT_SELECTION = 0x8006;
|
||||
const unsigned long EVENT_SELECTION_ADD = 0x8007;
|
||||
const unsigned long EVENT_SELECTION_REMOVE = 0x8008;
|
||||
const unsigned long EVENT_SELECTION_WITHIN = 0x8009;
|
||||
const unsigned long EVENT_ALERT = 0x0002;
|
||||
const unsigned long EVENT_FOREGROUND = 0x0003;
|
||||
const unsigned long EVENT_MENUSTART = 0x0004;
|
||||
const unsigned long EVENT_MENUEND = 0x0005;
|
||||
const unsigned long EVENT_MENUPOPUPSTART = 0x0006;
|
||||
const unsigned long EVENT_MENUPOPUPEND = 0x0007;
|
||||
const unsigned long EVENT_CAPTURESTART = 0x0008;
|
||||
const unsigned long EVENT_CAPTUREEND = 0x0009;
|
||||
const unsigned long EVENT_MOVESIZESTART = 0x000A;
|
||||
const unsigned long EVENT_MOVESIZEEND = 0x000B;
|
||||
const unsigned long EVENT_CONTEXTHELPSTART = 0x000C;
|
||||
const unsigned long EVENT_CONTEXTHELPEND = 0x000D;
|
||||
const unsigned long EVENT_DRAGDROPSTART = 0x000E;
|
||||
const unsigned long EVENT_DRAGDROPEND = 0x000F;
|
||||
const unsigned long EVENT_DIALOGSTART = 0x0010;
|
||||
const unsigned long EVENT_DIALOGEND = 0x0011;
|
||||
const unsigned long EVENT_SCROLLINGSTART = 0x0012;
|
||||
const unsigned long EVENT_SCROLLINGEND = 0x0013;
|
||||
const unsigned long EVENT_MINIMIZESTART = 0x0016;
|
||||
const unsigned long EVENT_MINIMIZEEND = 0x0017;
|
||||
|
||||
// the additional events for ATK
|
||||
const unsigned long EVENT_ATK_PROPERTY_CHANGE = 0x0100;
|
||||
const unsigned long EVENT_ATK_SELECTION_CHANGE = 0x0101;
|
||||
const unsigned long EVENT_ATK_TEXT_CHANGE = 0x0102;
|
||||
const unsigned long EVENT_ATK_TEXT_SELECTION_CHANGE = 0x0103;
|
||||
const unsigned long EVENT_ATK_TEXT_CARET_MOVE = 0x0104;
|
||||
const unsigned long EVENT_ATK_VISIBLE_DATA_CHANGE = 0x0105;
|
||||
const unsigned long EVENT_ATK_TABLE_MODEL_CHANGE = 0x0110;
|
||||
const unsigned long EVENT_ATK_TABLE_ROW_INSERT = 0x0111;
|
||||
const unsigned long EVENT_ATK_TABLE_ROW_DELETE = 0x0112;
|
||||
const unsigned long EVENT_ATK_TABLE_ROW_REORDER = 0x0113;
|
||||
const unsigned long EVENT_ATK_TABLE_COLUMN_INSERT = 0x0114;
|
||||
const unsigned long EVENT_ATK_TABLE_COLUMN_DELETE = 0x0115;
|
||||
const unsigned long EVENT_ATK_TABLE_COLUMN_REORDER = 0x0116;
|
||||
|
||||
[noscript]
|
||||
void handleEvent(in unsigned long aEvent, in nsIAccessible aTarget, in AccessibleEventData aData);
|
||||
void handleEvent(in unsigned long aEvent, in nsIAccessible aTarget);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
|
||||
interface nsIURI;
|
||||
|
||||
[scriptable, uuid(a492c7d6-1dd1-11b2-9bc0-80614884799a)]
|
||||
interface nsIAccessibleHyperLink : nsISupports
|
||||
{
|
||||
readonly attribute long anchors;
|
||||
readonly attribute long startIndex;
|
||||
readonly attribute long endIndex;
|
||||
|
||||
nsIURI getURI (in long i);
|
||||
|
||||
nsIAccessible getObject (in long i);
|
||||
|
||||
boolean isValid ();
|
||||
};
|
||||
|
||||
/*
|
||||
Assumptions:
|
||||
|
||||
The object associated with object or anchor index
|
||||
is an nsIAccessible.
|
||||
A URI can be represented by the nsIURI interface
|
||||
(or nsIURL interface).
|
||||
|
||||
Note that an object which supports nsIAccessibleHyperlink
|
||||
does *not* generally implement nsIAccessible, unlike the
|
||||
case of the other nsiAccessible* interfaces in this directory.
|
||||
|
||||
Aaron: would the nsISupports return from
|
||||
getObject be queryable for nsIURI and nsIURL directly?
|
||||
|
||||
*/
|
||||
@@ -1,38 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Bill Haneman (bill.haneman@sun.com)
|
||||
* Paul Sandoz (paul.sandoz@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessibleHyperLink.idl"
|
||||
|
||||
[scriptable, uuid(8f18d922-1dd2-11b2-82ea-829b78a44413)]
|
||||
interface nsIAccessibleHyperText : nsISupports
|
||||
{
|
||||
readonly attribute long links;
|
||||
|
||||
nsIAccessibleHyperLink getLink (in long index);
|
||||
|
||||
long getLinkIndex (in long charIndex);
|
||||
};
|
||||
@@ -21,11 +21,7 @@
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt
|
||||
* Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
* Paul Sandoz (paul.sandoz@sun.com)
|
||||
* Bill Haneman (bill.haneman@sun.com)
|
||||
* Kyle Yuan (kyle.yuan@sun.com)
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
@@ -34,43 +30,5 @@
|
||||
[scriptable, uuid(34d268d6-1dd2-11b2-9d63-83a5e0ada290)]
|
||||
interface nsIAccessibleSelectable : nsISupports
|
||||
{
|
||||
nsISupportsArray GetSelectedChildren();
|
||||
|
||||
/**
|
||||
* Returns the number of accessible children currently selected.
|
||||
*/
|
||||
readonly attribute long selectionCount;
|
||||
|
||||
/**
|
||||
* Adds the specified accessible child of the object to the
|
||||
* object's selection.
|
||||
*/
|
||||
void addSelection(in long index);
|
||||
|
||||
/**
|
||||
* Removes the specified child of the object from the object's selection.
|
||||
*/
|
||||
void removeSelection(in long index);
|
||||
|
||||
/**
|
||||
* Clears the selection in the object so that no children in the object
|
||||
* are selected.
|
||||
*/
|
||||
void clearSelection();
|
||||
|
||||
/**
|
||||
* Returns a reference to the accessible object representing the specified
|
||||
* selected child of the object.
|
||||
*/
|
||||
nsIAccessible refSelection(in long index);
|
||||
|
||||
/**
|
||||
* Determines if the current child of this object is selected
|
||||
*/
|
||||
boolean isChildSelected(in long index);
|
||||
|
||||
/**
|
||||
* If the object does not accept multiple selection, return false.
|
||||
*/
|
||||
boolean selectAllSelection();
|
||||
nsISupportsArray GetSelectedChildren();
|
||||
};
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
|
||||
* Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
|
||||
[scriptable, uuid(0A7E98A9-CA7D-42F0-BFE1-2CFC35256038)]
|
||||
interface nsIAccessibleTable : nsISupports
|
||||
{
|
||||
attribute nsIAccessible caption;
|
||||
attribute AString summary;
|
||||
readonly attribute long columns;
|
||||
readonly attribute nsIAccessibleTable columnHeader;
|
||||
readonly attribute long rows;
|
||||
readonly attribute nsIAccessibleTable rowHeader;
|
||||
|
||||
void getSelectedColumns (out unsigned long columnsSize,
|
||||
[retval, array, size_is(columnsSize)] out long columns);
|
||||
|
||||
void getSelectedRows (out unsigned long rowsSize,
|
||||
[retval, array, size_is(rowsSize)] out long rows);
|
||||
|
||||
/**
|
||||
* gets a cell
|
||||
*/
|
||||
nsIAccessible cellRefAt (in long row, in long column);
|
||||
|
||||
/**
|
||||
* get an index
|
||||
*/
|
||||
long getIndexAt (in long row, in long column);
|
||||
long getColumnAtIndex (in long index);
|
||||
long getRowAtIndex (in long index);
|
||||
long getColumnExtentAt (in long row, in long column);
|
||||
long getRowExtentAt (in long row, in long column);
|
||||
|
||||
AString getColumnDescription (in long column);
|
||||
AString getRowDescription (in long row);
|
||||
|
||||
boolean isColumnSelected (in long column);
|
||||
boolean isRowSelected (in long row);
|
||||
boolean isCellSelected (in long row, in long column);
|
||||
};
|
||||
@@ -1,131 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
|
||||
* Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
typedef long nsAccessibleTextBoundary;
|
||||
typedef long nsAccessibleCoordType;
|
||||
|
||||
[scriptable, uuid(E44D3FA6-9CB2-432A-8BDB-69D72B6ADA00)]
|
||||
interface nsIAccessibleText : nsISupports
|
||||
{
|
||||
const nsAccessibleTextBoundary BOUNDARY_CHAR = 0;
|
||||
const nsAccessibleTextBoundary BOUNDARY_WORD_START = 1;
|
||||
const nsAccessibleTextBoundary BOUNDARY_WORD_END = 2;
|
||||
const nsAccessibleTextBoundary BOUNDARY_SENTENCE_START = 3;
|
||||
const nsAccessibleTextBoundary BOUNDARY_SENTENCE_END = 4;
|
||||
const nsAccessibleTextBoundary BOUNDARY_LINE_START = 5;
|
||||
const nsAccessibleTextBoundary BOUNDARY_LINE_END = 6;
|
||||
const nsAccessibleTextBoundary BOUNDARY_ATTRIBUTE_RANGE = 7;
|
||||
|
||||
const nsAccessibleCoordType COORD_TYPE_SCREEN = 0;
|
||||
const nsAccessibleCoordType COORD_TYPE_WINDOW = 1;
|
||||
|
||||
attribute long caretOffset;
|
||||
|
||||
readonly attribute long characterCount;
|
||||
readonly attribute long selectionCount;
|
||||
|
||||
/**
|
||||
* String methods may need to return multibyte-encoded strings,
|
||||
* since some locales can't be encoded using 16-bit chars.
|
||||
* So the methods below might return UTF-16 strings, or they could
|
||||
* return "string" values which are UTF-8.
|
||||
*/
|
||||
AString getText (in long startOffset, in long endOffset);
|
||||
|
||||
AString getTextAfterOffset (in long offset,
|
||||
in nsAccessibleTextBoundary boundaryType,
|
||||
out long startOffset,
|
||||
out long endOffset);
|
||||
|
||||
AString getTextAtOffset (in long offset,
|
||||
in nsAccessibleTextBoundary boundaryType,
|
||||
out long startOffset,
|
||||
out long endOffset);
|
||||
|
||||
/**
|
||||
* It would be better to return an unsigned long here,
|
||||
* to allow unicode chars > 16 bits
|
||||
*/
|
||||
wchar getCharacterAtOffset (in long offset);
|
||||
|
||||
nsISupports getAttributeRange (in long offset,
|
||||
out long rangeStartOffset,
|
||||
out long rangeEndOffset);
|
||||
|
||||
AString getTextBeforeOffset (in long offset,
|
||||
in nsAccessibleTextBoundary boundaryType,
|
||||
out long startOffset,
|
||||
out long endOffset);
|
||||
|
||||
void getCharacterExtents (in long offset,
|
||||
out long x,
|
||||
out long y,
|
||||
out long length,
|
||||
out long width,
|
||||
in nsAccessibleCoordType coordType);
|
||||
|
||||
long getOffsetAtPoint (in long x, in long y,
|
||||
in nsAccessibleCoordType coordType);
|
||||
|
||||
void getSelectionBounds (in long selectionNum,
|
||||
out long startOffset,
|
||||
out long endOffset);
|
||||
|
||||
void setSelectionBounds (in long selectionNum,
|
||||
in long startOffset,
|
||||
in long endOffset);
|
||||
|
||||
void addSelection (in long startOffset, in long endOffset);
|
||||
|
||||
void removeSelection (in long selectionNum);
|
||||
};
|
||||
|
||||
/*
|
||||
Assumptions:
|
||||
|
||||
Using wstring (UCS2) instead of string encoded in UTF-8.
|
||||
Multibyte encodings (or at least potentially multi-byte
|
||||
encodings) would be preferred for the reasons cited above.
|
||||
|
||||
The following methods will throw an exception
|
||||
on failure (since not every text component will allow
|
||||
every operation):
|
||||
setSelectionBounds, addSelection, removeSelection,
|
||||
setCaretOffset.
|
||||
|
||||
getRangeAttributes defined to return an nsISupports
|
||||
interface instead of a pango specific data structure.
|
||||
It may be that some other return type is more appropriate
|
||||
for mozilla text attributes.
|
||||
|
||||
we assume that all text components support the idea of
|
||||
a caret offset, whether visible or "virtual". If this
|
||||
isn't the case, caretOffset can be made readonly and
|
||||
a setCaretOffset method provided which throws an exception
|
||||
on failure (as with *selection methods above).
|
||||
*/
|
||||
@@ -1,60 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(F4ABBC2F-0F28-47DC-A9E9-F7A1719AB2BE)]
|
||||
interface nsIAccessibleValue : nsISupports
|
||||
{
|
||||
readonly attribute double maximumValue;
|
||||
readonly attribute double minimumValue;
|
||||
readonly attribute double currentValue;
|
||||
|
||||
/**
|
||||
* We want to be able to return a success condition of the value
|
||||
* getting set. ie if the value is not within the interval of
|
||||
* minimumValue-maximumValue
|
||||
*/
|
||||
boolean setCurrentValue (in double value);
|
||||
};
|
||||
|
||||
/*
|
||||
Assumptions:
|
||||
|
||||
The attribute currentValue will throw an exception
|
||||
if it cannot be set i.e. if the value is not a
|
||||
member of the interval.
|
||||
This may not be the 'desired' behaviour given gObject
|
||||
equivalent. Thus it could be changed to be:
|
||||
|
||||
readonly attribute double currentValue;
|
||||
boolean setCurrentValue (double long value);
|
||||
|
||||
GValue can represent many basic types.
|
||||
Since this interface is designed to represent
|
||||
an interval and a member of double should
|
||||
cover the cases of char int and float.
|
||||
|
||||
*/
|
||||
@@ -1,34 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(ca7a3a93-822f-4cdf-8cb4-c52d16b9afc7)]
|
||||
interface nsIAccessibleWin32Object : nsISupports
|
||||
{
|
||||
/** handle to the external window implementing IAccessible */
|
||||
readonly attribute long hwnd;
|
||||
};
|
||||
@@ -28,25 +28,28 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_base_s
|
||||
REQUIRES = content \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
htmlparser \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
pref \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
xuldoc \
|
||||
$(NULL)
|
||||
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 \
|
||||
@@ -55,14 +58,11 @@ CPPSRCS = \
|
||||
nsFormControlAccessible.cpp \
|
||||
nsGenericAccessible.cpp \
|
||||
nsRootAccessible.cpp \
|
||||
nsCaretAccessible.cpp \
|
||||
nsSelectAccessible.cpp \
|
||||
nsTextAccessible.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsRootAccessible.h \
|
||||
nsAccessibleEventData.h \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
@@ -74,5 +74,4 @@ LOCAL_INCLUDES += \
|
||||
-I$(srcdir) \
|
||||
-I$(srcdir)/../html \
|
||||
-I$(srcdir)/../xul \
|
||||
-I$(srcdir)/../../../layout/html/base/src \
|
||||
$(NULL)
|
||||
|
||||
@@ -6,6 +6,3 @@ select = Select
|
||||
open = Open
|
||||
close = Close
|
||||
switch = Switch
|
||||
click = Click
|
||||
collapse= Collapse
|
||||
expand = Expand
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
en-win.jar:
|
||||
locale/en-US/global-platform/accessible.properties
|
||||
|
||||
en-unix.jar:
|
||||
locale/en-US/global-platform/accessible.properties
|
||||
|
||||
en-mac.jar:
|
||||
locale/en-US/global-platform/accessible.properties
|
||||
|
||||
|
||||
@@ -30,11 +30,8 @@ REQUIRES = \
|
||||
gfx \
|
||||
intl \
|
||||
layout \
|
||||
layout_xul \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
pref \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
@@ -43,6 +40,7 @@ REQUIRES = \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
|
||||
CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsAccessibilityService.obj \
|
||||
.\$(OBJDIR)\nsAccessible.obj \
|
||||
@@ -50,14 +48,11 @@ CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsFormControlAccessible.obj \
|
||||
.\$(OBJDIR)\nsGenericAccessible.obj \
|
||||
.\$(OBJDIR)\nsRootAccessible.obj \
|
||||
.\$(OBJDIR)\nsCaretAccessible.obj \
|
||||
.\$(OBJDIR)\nsSelectAccessible.obj \
|
||||
.\$(OBJDIR)\nsTextAccessible.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
.\nsRootAccessible.h \
|
||||
.\nsAccessibleEventData.h \
|
||||
$(NULL)
|
||||
|
||||
LINCS = \
|
||||
@@ -66,7 +61,6 @@ LINCS = \
|
||||
-I..\..\..\layout\html\forms\public \
|
||||
-I..\..\..\layout\html\forms\src \
|
||||
-I..\..\..\layout\html\base\src \
|
||||
-I..\..\..\widget\src\windows \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "nsHTMLFormControlAccessible.h"
|
||||
#include "nsHTMLImageAccessible.h"
|
||||
#include "nsHTMLLinkAccessible.h"
|
||||
#include "nsHTMLPluginAccessible.h"
|
||||
//#include "nsHTMLObjectAccessible.h" -- this comes with a later checkin DOH! - jgaunt
|
||||
#include "nsHTMLSelectAccessible.h"
|
||||
#include "nsHTMLTableAccessible.h"
|
||||
#include "nsHTMLTextAccessible.h"
|
||||
@@ -57,23 +57,18 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMHTMLAreaElement.h"
|
||||
#include "nsIDOMHTMLObjectElement.h"
|
||||
#include "nsIDOMHTMLOptionElement.h"
|
||||
#include "nsIDOMHTMLOptGroupElement.h"
|
||||
#include "nsIDOMHTMLLegendElement.h"
|
||||
#include "nsIDOMHTMLTableElement.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMXULCheckboxElement.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsILink.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIObjectFrame.h"
|
||||
#include "nsIPluginInstance.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsITextContent.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsObjectFrame.h"
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTextFragment.h"
|
||||
@@ -83,15 +78,7 @@
|
||||
#include "nsXULSelectAccessible.h"
|
||||
#include "nsXULTabAccessible.h"
|
||||
#include "nsXULTextAccessible.h"
|
||||
#include "nsXULTreeAccessible.h"
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsCaretAccessible.h"
|
||||
#include "nsIAccessibleCaret.h"
|
||||
|
||||
// For native window support for object/embed/applet tags
|
||||
#ifdef XP_WIN
|
||||
#include "nsHTMLWin32ObjectAccessible.h"
|
||||
#endif
|
||||
|
||||
// IFrame
|
||||
#include "nsIDocShell.h"
|
||||
@@ -104,12 +91,10 @@
|
||||
nsAccessibilityService::nsAccessibilityService()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
nsLayoutAtoms::AddRefAtoms();
|
||||
}
|
||||
|
||||
nsAccessibilityService::~nsAccessibilityService()
|
||||
{
|
||||
nsLayoutAtoms::ReleaseAtoms();
|
||||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsAccessibilityService, nsIAccessibilityService);
|
||||
@@ -147,28 +132,17 @@ nsAccessibilityService::GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIW
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsAccessibilityService::GetOwnerFor(nsIPresShell *aPresShell,
|
||||
nsIPresShell **aOwnerShell,
|
||||
nsIContent **aOwnerContent)
|
||||
void nsAccessibilityService::GetOwnerFor(nsIPresShell *aPresShell, nsIPresShell **aOwnerShell, nsIContent **aOwnerContent)
|
||||
{
|
||||
*aOwnerShell = nsnull;
|
||||
*aOwnerContent = nsnull;
|
||||
|
||||
nsCOMPtr<nsIPresContext> presContext;
|
||||
aPresShell->GetPresContext(getter_AddRefs(presContext));
|
||||
if (!presContext)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
aPresShell->GetDocument(getter_AddRefs(doc));
|
||||
|
||||
if (!doc)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsISupports> pcContainer;
|
||||
presContext->GetContainer(getter_AddRefs(pcContainer));
|
||||
if (!pcContainer)
|
||||
return;
|
||||
nsCOMPtr<nsISupports> docShellSupports(do_QueryInterface(pcContainer));
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(pcContainer));
|
||||
if (!treeItem)
|
||||
@@ -194,14 +168,17 @@ void nsAccessibilityService::GetOwnerFor(nsIPresShell *aPresShell,
|
||||
if (!parentDoc)
|
||||
return;
|
||||
|
||||
parentDoc->FindContentForSubDocument(doc, aOwnerContent);
|
||||
nsCOMPtr<nsIContent> rootContent;
|
||||
parentDoc->GetRootContent(getter_AddRefs(rootContent));
|
||||
|
||||
if (*aOwnerContent) {
|
||||
nsCOMPtr<nsIContent> tempContent;
|
||||
parentPresShell->FindContentForShell(docShellSupports, getter_AddRefs(tempContent));
|
||||
|
||||
if (tempContent) {
|
||||
*aOwnerContent = tempContent;
|
||||
*aOwnerShell = parentPresShell;
|
||||
NS_ADDREF(*aOwnerShell);
|
||||
}
|
||||
else {
|
||||
NS_WARNING("Cannot find content for sub document");
|
||||
NS_ADDREF(*aOwnerContent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,65 +252,54 @@ nsAccessibilityService::CreateIFrameAccessible(nsIDOMNode* aDOMNode, nsIAccessib
|
||||
NS_WARNING("No outer pres shell in CreateHTMLIFrameAccessible!");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
nsCOMPtr<nsIPresContext> outerPresContext;
|
||||
outerPresShell->GetPresContext(getter_AddRefs(outerPresContext));
|
||||
if (!outerPresContext) {
|
||||
NS_WARNING("No outer pres context in CreateHTMLIFrameAccessible!");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
if (NS_SUCCEEDED(content->GetDocument(*getter_AddRefs(doc))) && doc) {
|
||||
nsCOMPtr<nsIDocument> sub_doc;
|
||||
doc->GetSubDocumentFor(content, getter_AddRefs(sub_doc));
|
||||
|
||||
if (sub_doc) {
|
||||
nsCOMPtr<nsIPresShell> innerPresShell;
|
||||
sub_doc->GetShellAt(0, getter_AddRefs(innerPresShell));
|
||||
|
||||
if (innerPresShell) {
|
||||
nsCOMPtr<nsIWeakReference> innerWeakShell =
|
||||
do_GetWeakReference(innerPresShell);
|
||||
|
||||
nsHTMLIFrameRootAccessible *innerRootAccessible =
|
||||
new nsHTMLIFrameRootAccessible(aDOMNode, innerWeakShell);
|
||||
|
||||
if (innerRootAccessible) {
|
||||
nsHTMLIFrameAccessible *outerRootAccessible =
|
||||
new nsHTMLIFrameAccessible(aDOMNode, innerRootAccessible,
|
||||
outerWeakShell, sub_doc);
|
||||
|
||||
if (outerRootAccessible) {
|
||||
innerRootAccessible->Init(outerRootAccessible);
|
||||
*_retval = outerRootAccessible;
|
||||
if (*_retval) {
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
if (outerPresShell) {
|
||||
nsCOMPtr<nsISupports> supps;
|
||||
outerPresShell->GetSubShellFor(content, getter_AddRefs(supps));
|
||||
if (supps) {
|
||||
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(supps));
|
||||
if (docShell) {
|
||||
nsCOMPtr<nsIPresShell> innerPresShell;
|
||||
docShell->GetPresShell(getter_AddRefs(innerPresShell));
|
||||
if (innerPresShell) {
|
||||
nsCOMPtr<nsIWeakReference> innerWeakShell(do_GetWeakReference(innerPresShell));
|
||||
nsCOMPtr<nsIDocument> innerDoc;
|
||||
innerPresShell->GetDocument(getter_AddRefs(innerDoc));
|
||||
if (innerDoc) {
|
||||
nsCOMPtr<nsIAccessible> innerRootAccessible(new nsHTMLIFrameRootAccessible(aDOMNode, innerWeakShell));
|
||||
if (innerRootAccessible) {
|
||||
nsHTMLIFrameAccessible* outerRootAccessible = new nsHTMLIFrameAccessible(aDOMNode, innerRootAccessible, outerWeakShell, innerDoc);
|
||||
if (outerRootAccessible) {
|
||||
*_retval = NS_STATIC_CAST(nsIAccessible*, outerRootAccessible);
|
||||
if (*_retval) {
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else // don't leak the innerRoot
|
||||
delete innerRootAccessible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateRootAccessible(nsISupports* aPresContext, nsISupports* aFrame, nsIAccessible **_retval)
|
||||
{
|
||||
static PRBool alreadyHere = PR_FALSE;
|
||||
|
||||
*_retval = nsnull;
|
||||
|
||||
if (alreadyHere) {
|
||||
NS_WARNING("Infinite loop headed off in CreateRootAccessible");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
|
||||
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
|
||||
|
||||
@@ -356,11 +322,8 @@ nsAccessibilityService::CreateRootAccessible(nsISupports* aPresContext, nsISuppo
|
||||
nsCOMPtr<nsIContent> rootContent;
|
||||
presShell->GetDocument(getter_AddRefs(document));
|
||||
nsCOMPtr<nsIDOMNode> rootNode(do_QueryInterface(document));
|
||||
if (rootNode) {
|
||||
alreadyHere = PR_TRUE;
|
||||
if (rootNode)
|
||||
GetAccessibleFor(rootNode, _retval);
|
||||
alreadyHere = PR_FALSE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(presShell));
|
||||
@@ -374,21 +337,6 @@ nsAccessibilityService::CreateRootAccessible(nsISupports* aPresContext, nsISuppo
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateCaretAccessible(nsIDOMNode *aNode, nsIAccessibleEventListener *aListener,
|
||||
nsIAccessibleCaret **_retval)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
GetShellFromNode(aNode, getter_AddRefs(weakShell));
|
||||
|
||||
*_retval = new nsCaretAccessible(aNode, weakShell, aListener);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTML widget creation
|
||||
*/
|
||||
@@ -465,25 +413,6 @@ nsAccessibilityService::CreateHTMLButtonAccessible(nsISupports *aFrame, nsIAcces
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLButtonAccessibleXBL(nsIDOMNode *aNode, nsIAccessible **_retval)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
GetShellFromNode(aNode, getter_AddRefs(weakShell));
|
||||
|
||||
// reusing the HTML accessible widget and enhancing for XUL
|
||||
*_retval = new nsHTML4ButtonAccessible(aNode, weakShell);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif // MOZ_XUL
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLCheckboxAccessible(nsISupports *aFrame, nsIAccessible **_retval)
|
||||
{
|
||||
@@ -502,25 +431,6 @@ nsAccessibilityService::CreateHTMLCheckboxAccessible(nsISupports *aFrame, nsIAcc
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLCheckboxAccessibleXBL(nsIDOMNode *aNode, nsIAccessible **_retval)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
GetShellFromNode(aNode, getter_AddRefs(weakShell));
|
||||
|
||||
// reusing the HTML accessible widget and enhancing for XUL
|
||||
*_retval = new nsHTMLCheckboxAccessible(aNode, weakShell);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif // MOZ_XUL
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsISupports* aPresContext, nsIAccessible **_retval)
|
||||
{
|
||||
@@ -550,19 +460,7 @@ nsAccessibilityService::CreateHTMLImageAccessible(nsISupports *aFrame, nsIAccess
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
*_retval = nsnull;
|
||||
nsCOMPtr<nsIDOMElement> domElement(do_QueryInterface(node));
|
||||
if (domElement) {
|
||||
PRBool hasAttribute;
|
||||
rv = domElement->HasAttribute(NS_LITERAL_STRING("usemap"), &hasAttribute);
|
||||
if (NS_SUCCEEDED(rv) && hasAttribute) {
|
||||
//There is a "use map"
|
||||
*_retval = new nsHTMLImageMapAccessible(node, weakShell);
|
||||
}
|
||||
}
|
||||
else
|
||||
*_retval = new nsHTMLImageAccessible(node, weakShell);
|
||||
|
||||
*_retval = new nsHTMLImageAccessible(node, weakShell);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
@@ -607,35 +505,25 @@ nsAccessibilityService::CreateHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsISup
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* -- coming in a later patch
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLPluginAccessible(nsIDOMNode *aDOMNode, nsIWeakReference *aShell,
|
||||
nsIAccessible **_retval)
|
||||
nsAccessibilityService::CreateHTMLObjectAccessible(nsISupports *aFrame, nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = new nsHTMLPluginAccessible(aDOMNode, aShell);
|
||||
nsIFrame* frame;
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
*_retval = new nsHTMLObjectAccessible(node, weakShell);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLNativeWindowAccessible(nsIDOMNode *aDOMNode, nsIWeakReference *aShell,
|
||||
PRInt32 aHwnd, nsIAccessible **_retval)
|
||||
{
|
||||
#ifdef XP_WIN
|
||||
*_retval = new nsHTMLWin32ObjectAccessible(aDOMNode, aShell, aHwnd);
|
||||
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsISupports *aFrame, nsIAccessible **_retval)
|
||||
@@ -655,25 +543,6 @@ nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsISupports *aFrame, nsI
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLRadioButtonAccessibleXBL(nsIDOMNode *aNode, nsIAccessible **_retval)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
GetShellFromNode(aNode, getter_AddRefs(weakShell));
|
||||
|
||||
// reusing the HTML accessible widget and enhancing for XUL
|
||||
*_retval = new nsHTMLRadioButtonAccessible(aNode, weakShell);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif // MOZ_XUL
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIAccessible *aAccParent, nsISupports* aPresContext, nsIAccessible **_retval)
|
||||
{
|
||||
@@ -711,50 +580,6 @@ nsAccessibilityService::CreateHTMLTableAccessible(nsISupports *aFrame, nsIAccess
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLTableCaptionAccessible(nsIDOMNode *aDOMNode, nsIAccessible **_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aDOMNode);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
rv = GetShellFromNode(aDOMNode, getter_AddRefs(weakShell));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsHTMLTableCaptionAccessible* accTableCaption =
|
||||
new nsHTMLTableCaptionAccessible(aDOMNode, weakShell);
|
||||
|
||||
NS_ENSURE_TRUE(accTableCaption, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
*_retval = NS_STATIC_CAST(nsIAccessible *, accTableCaption);
|
||||
NS_IF_ADDREF(*_retval);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLTableHeadAccessible(nsIDOMNode *aDOMNode, nsIAccessible **_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aDOMNode);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
rv = GetShellFromNode(aDOMNode, getter_AddRefs(weakShell));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsHTMLTableHeadAccessible* accTableHead =
|
||||
new nsHTMLTableHeadAccessible(aDOMNode, weakShell);
|
||||
|
||||
NS_ENSURE_TRUE(accTableHead, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
*_retval = NS_STATIC_CAST(nsIAccessible *, accTableHead);
|
||||
NS_IF_ADDREF(*_retval);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLTableCellAccessible(nsISupports *aFrame, nsIAccessible **_retval)
|
||||
{
|
||||
@@ -1305,104 +1130,6 @@ NS_IMETHODIMP nsAccessibilityService::CreateXULTabsAccessible(nsIDOMNode *aNode,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* We can have several cases here.
|
||||
* 1) a text or html embedded document where the contentDocument
|
||||
* variable in the object element holds the content
|
||||
* 2) web content that uses a plugin, which means we will
|
||||
* have to go to the plugin to get the accessible content
|
||||
* 3) An image or imagemap, where the image frame points back to
|
||||
* the object element DOMNode
|
||||
*/
|
||||
nsresult
|
||||
nsAccessibilityService::GetHTMLObjectAccessibleFor(nsIDOMNode *aNode,
|
||||
nsIPresShell *aShell,
|
||||
nsObjectFrame *aFrame,
|
||||
nsIAccessible **_retval)
|
||||
{
|
||||
// 1) for object elements containing either HTML or TXT documents
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
nsCOMPtr<nsIDOMHTMLObjectElement> obj(do_QueryInterface(aNode));
|
||||
if (obj)
|
||||
obj->GetContentDocument(getter_AddRefs(domDoc));
|
||||
else
|
||||
domDoc = do_QueryInterface(aNode);
|
||||
if (domDoc)
|
||||
return CreateIFrameAccessible(aNode, _retval);
|
||||
|
||||
// 2) for plugins
|
||||
nsCOMPtr<nsIPluginInstance> pluginInstance ;
|
||||
aFrame->GetPluginInstance(*getter_AddRefs(pluginInstance));
|
||||
if (pluginInstance) {
|
||||
nsCOMPtr<nsIWeakReference> weakShell (do_GetWeakReference(aShell));
|
||||
CreateHTMLPluginAccessible(aNode, weakShell, _retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// 3) for images and imagemaps
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
aShell->GetPresContext(getter_AddRefs(context));
|
||||
if (!context)
|
||||
return NS_ERROR_FAILURE;
|
||||
// we have the object frame, get the image frame
|
||||
nsIFrame *frame;
|
||||
aFrame->FirstChild(context, nsnull, &frame);
|
||||
CreateHTMLImageAccessible(frame, _retval);
|
||||
if (*_retval)
|
||||
return NS_OK;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessibilityService::CreateXULTreeAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
GetShellFromNode(aNode, getter_AddRefs(weakShell));
|
||||
|
||||
*_retval = new nsXULTreeAccessible(aNode, weakShell);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif // MOZ_XUL
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessibilityService::CreateXULTreeColumnsAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
GetShellFromNode(aNode, getter_AddRefs(weakShell));
|
||||
|
||||
*_retval = new nsXULTreeColumnsAccessible(aNode, weakShell);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif // MOZ_XUL
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessibilityService::CreateXULTreeColumnitemAccessible(nsIDOMNode *aNode, nsIAccessible **_retval)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
GetShellFromNode(aNode, getter_AddRefs(weakShell));
|
||||
|
||||
*_retval = new nsXULTreeColumnitemAccessible(aNode, weakShell);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif // MOZ_XUL
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* GetAccessibleFor - get an nsIAccessible from a DOM node
|
||||
@@ -1416,33 +1143,29 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessibleFor(nsIDOMNode *aNode,
|
||||
|
||||
nsCOMPtr<nsIAccessible> newAcc;
|
||||
|
||||
#ifdef DEBUG_aaronl
|
||||
// Please leave this in for now, it's a convenient debugging method
|
||||
nsAutoString name;
|
||||
aNode->GetLocalName(name);
|
||||
if (name.Equals(NS_LITERAL_STRING("INPUT")))
|
||||
printf("## aaronl debugging tag name\n");
|
||||
|
||||
nsAutoString attrib;
|
||||
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(aNode));
|
||||
if (element) {
|
||||
element->GetAttribute(NS_LITERAL_STRING("type"), attrib);
|
||||
if (attrib.Equals(NS_LITERAL_STRING("checkbox")))
|
||||
printf("## aaronl debugging attribute\n");
|
||||
}
|
||||
#endif
|
||||
nsCOMPtr<nsIAccessibleProvider> accProv(do_QueryInterface(aNode));
|
||||
if (accProv) {
|
||||
accProv->GetAccessible(_retval);
|
||||
if (*_retval)
|
||||
return NS_OK;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(aNode));
|
||||
if (xulElement)
|
||||
if (xulElement) {
|
||||
#ifdef DEBUG_aaronl
|
||||
// Please leave this in for now, it's a convenient debugging method
|
||||
nsAutoString name;
|
||||
aNode->GetLocalName(name);
|
||||
if (name.Equals(NS_LITERAL_STRING("dropmarker")))
|
||||
printf("## aaronl debugging tag name\n");
|
||||
|
||||
nsAutoString className;
|
||||
xulElement->GetAttribute(NS_LITERAL_STRING("class"), className);
|
||||
if (className.Equals(NS_LITERAL_STRING("toolbarbutton-menubutton-dropmarker")))
|
||||
printf("## aaronl debugging attribute\n");
|
||||
#endif
|
||||
nsCOMPtr<nsIAccessibleProvider> accProv(do_QueryInterface(aNode));
|
||||
if (accProv) {
|
||||
accProv->GetAccessible(_retval);
|
||||
if (*_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
#endif // MOZ_XUL
|
||||
|
||||
// ---- Get the document for this node ----
|
||||
@@ -1505,14 +1228,6 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessibleFor(nsIDOMNode *aNode,
|
||||
if (!frame)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// ---- object/embed/applet tags all use nsObjectFrames ----
|
||||
nsCOMPtr<nsIAtom> frameType;
|
||||
frame->GetFrameType(getter_AddRefs(frameType));
|
||||
if (frameType.get() == nsLayoutAtoms::objectFrame) {
|
||||
nsObjectFrame* objectFrame = NS_STATIC_CAST(nsObjectFrame*, frame);
|
||||
return GetHTMLObjectAccessibleFor(aNode, shell, objectFrame, _retval);
|
||||
}
|
||||
|
||||
frame->GetAccessible(getter_AddRefs(newAcc));
|
||||
|
||||
// ---- If link, create link accessible ----
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "nsIContent.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsObjectFrame.h"
|
||||
|
||||
class nsIFrame;
|
||||
class nsIWeakReference;
|
||||
@@ -60,11 +59,9 @@ public:
|
||||
// nsIAccessibilityService methods:
|
||||
NS_DECL_NSIACCESSIBILITYSERVICE
|
||||
|
||||
static nsresult GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **weakShell);
|
||||
|
||||
private:
|
||||
nsresult GetHTMLObjectAccessibleFor(nsIDOMNode *aNode, nsIPresShell *aShell, nsObjectFrame *aFrame, nsIAccessible **_retval);
|
||||
nsresult GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIWeakReference** aShell, nsIDOMNode** aContent);
|
||||
nsresult GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **weakShell);
|
||||
void GetOwnerFor(nsIPresShell *aPresShell, nsIPresShell **aOwnerShell, nsIContent **aOwnerContent);
|
||||
nsIContent* FindContentForDocShell(nsIPresShell* aPresShell, nsIContent* aContent, nsIDocShell* aDocShell);
|
||||
};
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "nsISelection.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
#include "nsIDOMComment.h"
|
||||
@@ -87,7 +88,6 @@
|
||||
#include "nsIDOMHTMLFormElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLLabelElement.h"
|
||||
#include "nsIDOMHTMLObjectElement.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMXULButtonElement.h"
|
||||
#include "nsIDOMXULCheckboxElement.h"
|
||||
@@ -97,7 +97,6 @@
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIPref.h"
|
||||
|
||||
// IFrame Helpers
|
||||
#include "nsIDocShell.h"
|
||||
@@ -112,13 +111,11 @@
|
||||
#include "nsIDOMCharacterData.h"
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
//#define DEBUG_LEAKS
|
||||
|
||||
PRUint32 nsAccessible::gInstanceCount = 0;
|
||||
nsIStringBundle *nsAccessible::gStringBundle = 0;
|
||||
nsIStringBundle *nsAccessible::gKeyStringBundle = 0;
|
||||
#ifdef DEBUG_LEAKS
|
||||
static gnsAccessibles = 0;
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
@@ -426,7 +423,7 @@ PRBool nsAccessibleTreeWalker::GetAccessible()
|
||||
* Class nsAccessible
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------
|
||||
//-------------------------`----------------------------
|
||||
// construction
|
||||
//-----------------------------------------------------
|
||||
nsAccessible::nsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell): mDOMNode(aNode), mPresShell(aShell), mSiblingIndex(eSiblingsUninitialized)
|
||||
@@ -451,21 +448,9 @@ nsAccessible::nsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell): mDOMNod
|
||||
}
|
||||
#endif
|
||||
|
||||
++gInstanceCount;
|
||||
#ifdef DEBUG_LEAKS
|
||||
printf("nsAccessibles=%d\n", gInstanceCount);
|
||||
printf("nsAccessibles=%d\n", ++gnsAccessibles);
|
||||
#endif
|
||||
|
||||
if (gInstanceCount == 1) {
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIStringBundleService> stringBundleService(do_GetService(kStringBundleServiceCID, &rv));
|
||||
if (stringBundleService) {
|
||||
stringBundleService->CreateBundle(ACCESSIBLE_BUNDLE_URL, &gStringBundle);
|
||||
NS_IF_ADDREF(gStringBundle);
|
||||
stringBundleService->CreateBundle(PLATFORM_KEYS_BUNDLE_URL, &gKeyStringBundle);
|
||||
NS_IF_ADDREF(gKeyStringBundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
@@ -473,13 +458,8 @@ nsAccessible::nsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell): mDOMNod
|
||||
//-----------------------------------------------------
|
||||
nsAccessible::~nsAccessible()
|
||||
{
|
||||
if (--gInstanceCount == 0) {
|
||||
NS_IF_RELEASE(gStringBundle);
|
||||
NS_IF_RELEASE(gKeyStringBundle);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_LEAKS
|
||||
printf("nsAccessibles=%d\n", gInstanceCount);
|
||||
printf("nsAccessibles=%d\n", --gnsAccessibles);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -492,45 +472,6 @@ NS_IMETHODIMP nsAccessible::GetAccName(nsAString& _retval)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::GetAccKeyboardShortcut(nsAString& _retval)
|
||||
{
|
||||
static PRInt32 gGeneralAccesskeyModifier = -1; // magic value of -1 indicates unitialized state
|
||||
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
|
||||
if (elt) {
|
||||
nsAutoString accesskey;
|
||||
elt->GetAttribute(NS_LITERAL_STRING("accesskey"), accesskey);
|
||||
if (accesskey.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
if (gGeneralAccesskeyModifier == -1) { // Need to initialize cached global accesskey pref
|
||||
gGeneralAccesskeyModifier = 0;
|
||||
nsresult result;
|
||||
nsCOMPtr<nsIPref> prefService(do_GetService(kPrefCID, &result));
|
||||
if (NS_SUCCEEDED(result) && prefService)
|
||||
prefService->GetIntPref("ui.key.generalAccessKey", &gGeneralAccesskeyModifier);
|
||||
}
|
||||
nsAutoString propertyKey;
|
||||
switch (gGeneralAccesskeyModifier) {
|
||||
case nsIDOMKeyEvent::DOM_VK_CONTROL: propertyKey = NS_LITERAL_STRING("VK_CONTROL"); break;
|
||||
case nsIDOMKeyEvent::DOM_VK_ALT: propertyKey = NS_LITERAL_STRING("VK_ALT"); break;
|
||||
case nsIDOMKeyEvent::DOM_VK_META: propertyKey = NS_LITERAL_STRING("VK_META"); break;
|
||||
}
|
||||
if (!propertyKey.IsEmpty())
|
||||
nsAccessible::GetFullKeyName(propertyKey, accesskey, _retval);
|
||||
else
|
||||
_retval= accesskey;
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::GetAccId(PRInt32 *aAccId)
|
||||
{
|
||||
*aAccId = - NS_REINTERPRET_CAST(PRInt32, (mDOMNode.get()));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::CacheOptimizations(nsIAccessible *aParent, PRInt32 aSiblingIndex, nsIDOMNodeList *aSiblingList)
|
||||
{
|
||||
if (aParent)
|
||||
@@ -636,32 +577,30 @@ NS_IMETHODIMP nsAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
|
||||
|
||||
nsresult nsAccessible::GetTranslatedString(const nsAString& aKey, nsAString& aStringOut)
|
||||
{
|
||||
nsXPIDLString xsValue;
|
||||
static nsCOMPtr<nsIStringBundle> stringBundle;
|
||||
static PRBool firstTime = PR_TRUE;
|
||||
|
||||
if (!gStringBundle ||
|
||||
NS_FAILED(gStringBundle->GetStringFromName(PromiseFlatString(aKey).get(), getter_Copies(xsValue))))
|
||||
if (firstTime) {
|
||||
firstTime = PR_FALSE;
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIStringBundleService> stringBundleService =
|
||||
do_GetService(kStringBundleServiceCID, &rv);
|
||||
if (!stringBundleService) {
|
||||
NS_WARNING("ERROR: Failed to get StringBundle Service instance.\n");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
stringBundleService->CreateBundle(ACCESSIBLE_BUNDLE_URL, getter_AddRefs(stringBundle));
|
||||
}
|
||||
|
||||
nsXPIDLString xsValue;
|
||||
if (!stringBundle ||
|
||||
NS_FAILED(stringBundle->GetStringFromName(PromiseFlatString(aKey).get(), getter_Copies(xsValue))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
aStringOut.Assign(xsValue);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsAccessible::GetFullKeyName(const nsAString& aModifierName, const nsAString& aKeyName, nsAString& aStringOut)
|
||||
{
|
||||
nsXPIDLString modifierName, separator;
|
||||
|
||||
if (!gKeyStringBundle ||
|
||||
NS_FAILED(gKeyStringBundle->GetStringFromName(PromiseFlatString(aModifierName).get(),
|
||||
getter_Copies(modifierName))) ||
|
||||
NS_FAILED(gKeyStringBundle->GetStringFromName(PromiseFlatString(NS_LITERAL_STRING("MODIFIER_SEPARATOR")).get(),
|
||||
getter_Copies(separator)))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
aStringOut = modifierName + separator + aKeyName;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PRBool nsAccessible::IsPartiallyVisible()
|
||||
{
|
||||
// We need to know if at least a kMinPixels around the object is visible
|
||||
@@ -717,7 +656,7 @@ PRBool nsAccessible::IsPartiallyVisible()
|
||||
return isVisible;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::GetFocusedNode(nsIDOMNode **aFocusedNode)
|
||||
NS_IMETHODIMP nsAccessible::GetFocusedElement(nsIDOMElement **aFocusedElement)
|
||||
{
|
||||
nsCOMPtr<nsIFocusController> focusController;
|
||||
nsCOMPtr<nsIDocument> document;
|
||||
@@ -725,8 +664,6 @@ NS_IMETHODIMP nsAccessible::GetFocusedNode(nsIDOMNode **aFocusedNode)
|
||||
if (content)
|
||||
content->GetDocument(*getter_AddRefs(document));
|
||||
|
||||
if (!document)
|
||||
document = do_QueryInterface(mDOMNode);
|
||||
if (document) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> ourGlobal;
|
||||
document->GetScriptGlobalObject(getter_AddRefs(ourGlobal));
|
||||
@@ -736,24 +673,11 @@ NS_IMETHODIMP nsAccessible::GetFocusedNode(nsIDOMNode **aFocusedNode)
|
||||
}
|
||||
|
||||
if (focusController) {
|
||||
nsCOMPtr<nsIDOMNode> focusedNode;
|
||||
nsCOMPtr<nsIDOMElement> focusedElement;
|
||||
focusController->GetFocusedElement(getter_AddRefs(focusedElement));
|
||||
if (!focusedElement) {
|
||||
nsCOMPtr<nsIDOMWindowInternal> windowInternal;
|
||||
focusController->GetFocusedWindow(getter_AddRefs(windowInternal));
|
||||
nsCOMPtr<nsIDOMWindow> window(do_QueryInterface(windowInternal));
|
||||
if (window) {
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
window->GetDocument(getter_AddRefs(domDoc));
|
||||
focusedNode = do_QueryInterface(domDoc);
|
||||
}
|
||||
}
|
||||
else
|
||||
focusedNode = do_QueryInterface(focusedElement);
|
||||
if (focusedNode) {
|
||||
*aFocusedNode = focusedNode;
|
||||
NS_ADDREF(*aFocusedNode);
|
||||
*aFocusedElement = focusedElement;
|
||||
if (focusedElement) {
|
||||
NS_ADDREF(*aFocusedElement);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
@@ -778,8 +702,8 @@ NS_IMETHODIMP nsAccessible::GetAccState(PRUint32 *aAccState)
|
||||
*aAccState |= STATE_UNAVAILABLE;
|
||||
else {
|
||||
*aAccState |= STATE_FOCUSABLE;
|
||||
nsCOMPtr<nsIDOMNode> focusedNode;
|
||||
if (NS_SUCCEEDED(GetFocusedNode(getter_AddRefs(focusedNode))) && focusedNode == mDOMNode)
|
||||
nsCOMPtr<nsIDOMElement> focusedElement;
|
||||
if (NS_SUCCEEDED(GetFocusedElement(getter_AddRefs(focusedElement))) && focusedElement == currElement)
|
||||
*aAccState |= STATE_FOCUSED;
|
||||
}
|
||||
}
|
||||
@@ -792,14 +716,15 @@ NS_IMETHODIMP nsAccessible::GetAccState(PRUint32 *aAccState)
|
||||
}
|
||||
|
||||
/* readonly attribute boolean accFocused; */
|
||||
NS_IMETHODIMP nsAccessible::GetAccFocused(nsIAccessible **aAccFocused)
|
||||
NS_IMETHODIMP nsAccessible::GetAccFocused(nsIAccessible * *aAccFocused)
|
||||
{
|
||||
*aAccFocused = nsnull;
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
|
||||
|
||||
nsCOMPtr<nsIDOMNode> focusedNode;
|
||||
if (accService && NS_SUCCEEDED(GetFocusedNode(getter_AddRefs(focusedNode)))) {
|
||||
nsCOMPtr<nsIDOMElement> focusedElement;
|
||||
if (accService && NS_SUCCEEDED(GetFocusedElement(getter_AddRefs(focusedElement)))) {
|
||||
nsCOMPtr<nsIDOMNode> focusedNode(do_QueryInterface(focusedElement));
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
if (NS_SUCCEEDED(accService->GetAccessibleFor(focusedNode, getter_AddRefs(accessible)))) {
|
||||
*aAccFocused = accessible;
|
||||
@@ -1155,9 +1080,10 @@ NS_IMETHODIMP nsAccessible::AccRemoveSelection()
|
||||
NS_IMETHODIMP nsAccessible::AccTakeSelection()
|
||||
{
|
||||
nsCOMPtr<nsISelectionController> control(do_QueryReferent(mPresShell));
|
||||
if (!control)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (!control) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISelection> selection;
|
||||
nsresult rv = control->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(selection));
|
||||
if (NS_FAILED(rv))
|
||||
@@ -1202,8 +1128,9 @@ NS_IMETHODIMP nsAccessible::AccTakeSelection()
|
||||
NS_IMETHODIMP nsAccessible::AccTakeFocus()
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
|
||||
if (!shell)
|
||||
return NS_ERROR_FAILURE;
|
||||
if (!shell) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
shell->GetPresContext(getter_AddRefs(context));
|
||||
@@ -1293,24 +1220,20 @@ NS_IMETHODIMP nsAccessible::AppendFlatStringFromContentNode(nsIContent *aContent
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputContent;
|
||||
nsCOMPtr<nsIDOMHTMLObjectElement> objectContent;
|
||||
nsCOMPtr<nsIDOMHTMLImageElement> imageContent(do_QueryInterface(aContent));
|
||||
if (!imageContent) {
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputContent;
|
||||
if (!imageContent)
|
||||
inputContent = do_QueryInterface(aContent);
|
||||
if (!inputContent)
|
||||
objectContent = do_QueryInterface(aContent);
|
||||
}
|
||||
if (imageContent || inputContent || objectContent) {
|
||||
if (imageContent || inputContent) {
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(aContent));
|
||||
NS_ASSERTION(elt, "No DOM element for content node!");
|
||||
elt->GetAttribute(NS_LITERAL_STRING("alt"), textEquivalent);
|
||||
if (textEquivalent.IsEmpty())
|
||||
elt->GetAttribute(NS_LITERAL_STRING("title"), textEquivalent);
|
||||
if (textEquivalent.IsEmpty())
|
||||
elt->GetAttribute(NS_LITERAL_STRING("src"), textEquivalent);
|
||||
elt->GetAttribute(NS_LITERAL_STRING("name"), textEquivalent);
|
||||
if (textEquivalent.IsEmpty())
|
||||
elt->GetAttribute(NS_LITERAL_STRING("data"), textEquivalent); // for <object>s with images
|
||||
elt->GetAttribute(NS_LITERAL_STRING("src"), textEquivalent);
|
||||
return AppendStringWithSpaces(aFlatString, textEquivalent);
|
||||
}
|
||||
|
||||
@@ -1499,21 +1422,20 @@ NS_IMETHODIMP nsAccessible::GetXULAccName(nsAString& _retval)
|
||||
//
|
||||
// This should keep search times down and still get the relevant
|
||||
// labels.
|
||||
nsAutoString controlID;
|
||||
domElement->GetAttribute(NS_LITERAL_STRING("id"), controlID);
|
||||
nsCOMPtr<nsIDOMNode> parent;
|
||||
if (!controlID.IsEmpty() && NS_SUCCEEDED(rv = mDOMNode->GetParentNode(getter_AddRefs(parent)))) {
|
||||
if (NS_SUCCEEDED(rv = mDOMNode->GetParentNode(getter_AddRefs(parent)))) {
|
||||
nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(parent));
|
||||
NS_ASSERTION(xulElement, "No xulElement for parent DOM Node!");
|
||||
if (xulElement) {
|
||||
nsCOMPtr<nsIDOMNodeList> labelList;
|
||||
nsAutoString controlID;
|
||||
nsCOMPtr<nsIDOMNodeList>labelList;
|
||||
if (NS_SUCCEEDED(rv = xulElement->GetElementsByAttribute(NS_LITERAL_STRING("control"), controlID, getter_AddRefs(labelList))))
|
||||
{
|
||||
PRUint32 length = 0;
|
||||
if (NS_SUCCEEDED(rv = labelList->GetLength(&length)) && length > 0) {
|
||||
for (PRUint32 index = 0; index < length; ++index) {
|
||||
for (PRUint32 i = 0; i < length; ++i) {
|
||||
nsCOMPtr<nsIDOMNode> child;
|
||||
if (NS_SUCCEEDED(rv = labelList->Item(index, getter_AddRefs(child) ))) {
|
||||
if (NS_SUCCEEDED(rv = labelList->Item(i, getter_AddRefs(child) ))) {
|
||||
rv = AppendLabelText(child, label);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,10 +53,8 @@
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIBindingManager.h"
|
||||
#include "nsIStringBundle.h"
|
||||
|
||||
#define ACCESSIBLE_BUNDLE_URL "chrome://global-platform/locale/accessible.properties"
|
||||
#define PLATFORM_KEYS_BUNDLE_URL "chrome://global-platform/locale/platformKeys.properties"
|
||||
|
||||
class nsIContent;
|
||||
class nsIDocShell;
|
||||
@@ -69,7 +67,7 @@ class nsAccessible : public nsGenericAccessible
|
||||
{
|
||||
public:
|
||||
// to eliminate the confusion of "magic numbers" -- if ( 0 ){ foo; }
|
||||
enum { eAction_Switch=0, eAction_Jump=0, eAction_Click=0, eAction_Select=0 };
|
||||
enum { eAction_Switch=0, eAction_Jump=0, eAction_Click=0 };
|
||||
// how many actions
|
||||
enum { eNo_Action=0, eSingle_Action=1 };
|
||||
|
||||
@@ -77,8 +75,6 @@ public:
|
||||
virtual ~nsAccessible();
|
||||
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
NS_IMETHOD GetAccId(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccKeyboardShortcut(nsAString& _retval);
|
||||
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
|
||||
@@ -107,12 +103,10 @@ protected:
|
||||
NS_IMETHOD AppendFlatStringFromSubtree(nsIContent *aContent, nsAString *aFlatString);
|
||||
NS_IMETHOD AppendFlatStringFromContentNode(nsIContent *aContent, nsAString *aFlatString);
|
||||
NS_IMETHOD AppendStringWithSpaces(nsAString *aFlatString, const nsAString& textEquivalent);
|
||||
NS_IMETHOD GetFocusedNode(nsIDOMNode **aFocusedNode);
|
||||
NS_IMETHOD 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 InitStringBundleService();
|
||||
static nsresult GetFullKeyName(const nsAString& aModifierName, const nsAString& aKeyName, nsAString& aStringOut);
|
||||
static nsresult GetTranslatedString(const nsAString& aKey, nsAString& aStringOut);
|
||||
void GetScrollOffset(nsRect *aRect);
|
||||
void GetScreenOrigin(nsIPresContext *aPresContext, nsIFrame *aFrame, nsRect *aRect);
|
||||
@@ -123,10 +117,6 @@ protected:
|
||||
nsCOMPtr<nsIAccessible> mParent;
|
||||
nsCOMPtr<nsIDOMNodeList> mSiblingList; // If some of our computed siblings are anonymous content nodes, cache node list
|
||||
PRInt32 mSiblingIndex; // Cache where we are in list of kids that we got from nsIBindingManager::GetContentList(parentContent)
|
||||
|
||||
static PRUint32 gInstanceCount;
|
||||
static nsIStringBundle *gStringBundle;
|
||||
static nsIStringBundle *gKeyStringBundle;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Kyle Yuan (kyle.yuan@sun.com)
|
||||
* John Sun (john.sun@sun.com)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsAccessibleEventData_H_
|
||||
#define _nsAccessibleEventData_H_
|
||||
|
||||
#ifdef MOZ_ACCESSIBILITY_ATK
|
||||
|
||||
struct AtkStateChange {
|
||||
PRUint32 state;
|
||||
PRBool enable;
|
||||
};
|
||||
|
||||
enum AtkProperty {
|
||||
PROP_0, // gobject convention
|
||||
PROP_NAME,
|
||||
PROP_DESCRIPTION,
|
||||
PROP_PARENT, // ancestry has changed
|
||||
PROP_VALUE,
|
||||
PROP_ROLE,
|
||||
PROP_LAYER,
|
||||
PROP_MDI_ZORDER,
|
||||
PROP_TABLE_CAPTION,
|
||||
PROP_TABLE_COLUMN_DESCRIPTION,
|
||||
PROP_TABLE_COLUMN_HEADER,
|
||||
PROP_TABLE_ROW_DESCRIPTION,
|
||||
PROP_TABLE_ROW_HEADER,
|
||||
PROP_TABLE_SUMMARY,
|
||||
PROP_LAST // gobject convention
|
||||
};
|
||||
|
||||
struct AtkPropertyChange {
|
||||
PRInt32 type; // property type as listed above
|
||||
void *oldvalue;
|
||||
void *newvalue;
|
||||
};
|
||||
|
||||
struct AtkChildrenChange {
|
||||
PRUint32 index; // index of child in parent
|
||||
nsIAccessible *child;
|
||||
PRBool add; // true for add, false for delete
|
||||
};
|
||||
|
||||
struct AtkTextChange {
|
||||
PRUint32 start;
|
||||
PRUint32 length;
|
||||
PRBool add; // true for add, false for delete
|
||||
};
|
||||
|
||||
struct AtkTableChange {
|
||||
PRUint32 index; // the start row/column after which the rows are inserted/deleted.
|
||||
PRUint32 count; // the number of inserted/deleted rows/columns
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -201,20 +201,6 @@ nsAccessible(aNode, aShell), mIsALinkCached(PR_FALSE), mLinkContent(nsnull), mIs
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsLinkableAccessible::AccTakeFocus()
|
||||
{
|
||||
if (IsALink()) {
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
|
||||
if (!shell)
|
||||
return NS_ERROR_FAILURE;
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
shell->GetPresContext(getter_AddRefs(context));
|
||||
mLinkContent->SetFocus(context);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* long GetAccState (); */
|
||||
NS_IMETHODIMP nsLinkableAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
@@ -307,11 +293,12 @@ NS_IMETHODIMP nsLinkableAccessible::GetAccActionName(PRUint8 index, nsAString& _
|
||||
NS_IMETHODIMP nsLinkableAccessible::AccDoAction(PRUint8 index)
|
||||
{
|
||||
// Action 0 (default action): Jump to link
|
||||
if (index == eAction_Jump) {
|
||||
if (index == 0) {
|
||||
if (IsALink()) {
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
|
||||
if (!shell)
|
||||
if (!shell) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresContext> presContext;
|
||||
shell->GetPresContext(getter_AddRefs(presContext));
|
||||
|
||||
@@ -104,7 +104,6 @@ public:
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccValue(nsAString& _retval);
|
||||
NS_IMETHOD AccTakeFocus();
|
||||
|
||||
protected:
|
||||
PRBool IsALink();
|
||||
|
||||
@@ -1,227 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Original Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCaretAccessible.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsICaret.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsISelectionPrivate.h"
|
||||
#include "nsIAccessibleEventListener.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIPresShell.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(nsCaretAccessible, nsLeafAccessible, nsIAccessibleCaret, nsISelectionListener)
|
||||
|
||||
nsCaretAccessible::nsCaretAccessible(nsIDOMNode* aDocumentNode, nsIWeakReference* aShell, nsIAccessibleEventListener *aListener):
|
||||
nsLeafAccessible(aDocumentNode, aShell), mVisible(PR_TRUE), mListener(aListener)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaretAccessible::RemoveSelectionListener()
|
||||
{
|
||||
nsCOMPtr<nsISelection> prevDomSel(do_QueryReferent(mDomSelectionWeak));
|
||||
nsCOMPtr<nsISelectionPrivate> selPrivate(do_QueryInterface(prevDomSel));
|
||||
if (selPrivate) {
|
||||
mDomSelectionWeak = nsnull;
|
||||
return selPrivate->RemoveSelectionListener(this);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaretAccessible::AttachNewSelectionListener(nsIDOMNode *aCurrentNode)
|
||||
{
|
||||
// When focus moves such that the caret is part of a new frame selection
|
||||
// this removes the old selection listener and attaches a new one for the current focus
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
aCurrentNode->GetOwnerDocument(getter_AddRefs(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
|
||||
if (!doc) // we also should try to QI to document instead (necessary to do when node is a document)
|
||||
doc = do_QueryInterface(aCurrentNode);
|
||||
if (!doc)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
doc->GetShellAt(0, getter_AddRefs(presShell));
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(aCurrentNode));
|
||||
if (!content)
|
||||
doc->GetRootContent(getter_AddRefs(content)); // If node is not content, use root content
|
||||
if (!presShell || !content)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsIFrame *frame = nsnull;
|
||||
presShell->GetPrimaryFrameFor(content, &frame);
|
||||
nsCOMPtr<nsIPresContext> presContext;
|
||||
presShell->GetPresContext(getter_AddRefs(presContext));
|
||||
if (!frame || !presContext)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
frame->GetSelectionController(presContext, getter_AddRefs(selCon));
|
||||
if (!selCon)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsISelection> domSel, prevDomSel(do_QueryReferent(mDomSelectionWeak));
|
||||
selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
|
||||
if (domSel == prevDomSel)
|
||||
return NS_OK; // This is already the selection we're listening to
|
||||
RemoveSelectionListener();
|
||||
nsCOMPtr<nsISelectionPrivate> selPrivate(do_QueryInterface(domSel));
|
||||
|
||||
if (!selPrivate)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
mDomSelectionWeak = do_GetWeakReference(domSel);
|
||||
return selPrivate->AddSelectionListener(this);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaretAccessible::NotifySelectionChanged(nsIDOMDocument *aDoc, nsISelection *aSel, short aReason)
|
||||
{
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(aDoc));
|
||||
if (!doc)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
doc->GetShellAt(0, getter_AddRefs(presShell));
|
||||
nsCOMPtr<nsISelection> domSel(do_QueryReferent(mDomSelectionWeak));
|
||||
if (!presShell || domSel != aSel)
|
||||
return NS_OK; // Only listening to selection changes in currently focused frame
|
||||
|
||||
nsCOMPtr<nsICaret> caret;
|
||||
presShell->GetCaret(getter_AddRefs(caret));
|
||||
if (!caret)
|
||||
return NS_OK;
|
||||
|
||||
nsRect caretRect;
|
||||
PRBool isCollapsed;
|
||||
caret->GetCaretCoordinates(nsICaret::eTopLevelWindowCoordinates, domSel, &caretRect, &isCollapsed);
|
||||
PRBool visible = (caretRect.x >= 0 && caretRect.y >= 0 && caretRect.width >= 0 && caretRect.height >= 0);
|
||||
if (visible) // Make sure it's visible both by looking at coordinates and visible flag
|
||||
caret->GetCaretVisible(&visible);
|
||||
if (visible != mVisible) {
|
||||
mVisible = visible;
|
||||
mListener->HandleEvent(mVisible? nsIAccessibleEventListener::EVENT_SHOW: nsIAccessibleEventListener::EVENT_HIDE, this, nsnull);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresContext> presContext;
|
||||
presShell->GetPresContext(getter_AddRefs(presContext));
|
||||
nsCOMPtr<nsIViewManager> viewManager;
|
||||
presShell->GetViewManager(getter_AddRefs(viewManager));
|
||||
if (!presContext || !viewManager)
|
||||
return NS_OK;
|
||||
nsIView *view = nsnull;
|
||||
viewManager->GetRootView(view);
|
||||
if (!view)
|
||||
return NS_OK;
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
view->GetWidget(*getter_AddRefs(widget));
|
||||
if (!widget)
|
||||
return NS_OK;
|
||||
|
||||
float t2p;
|
||||
presContext->GetTwipsToPixels(&t2p);
|
||||
// Convert to pixels using that scale
|
||||
caretRect.x = NSTwipsToIntPixels(caretRect.x, t2p);
|
||||
caretRect.y = NSTwipsToIntPixels(caretRect.y, t2p);
|
||||
|
||||
caretRect.width = NSTwipsToIntPixels(caretRect.width, t2p);
|
||||
caretRect.height = NSTwipsToIntPixels(caretRect.height, t2p);
|
||||
|
||||
nsRect caretScreenRect;
|
||||
widget->WidgetToScreen(caretRect, mCaretRect);
|
||||
|
||||
#ifndef MOZ_ACCESSIBILITY_ATK
|
||||
if (visible)
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_LOCATION_CHANGE, this, nsnull);
|
||||
#else
|
||||
if (isCollapsed) {
|
||||
PRInt32 caretOffset;
|
||||
domSel->GetFocusOffset(&caretOffset);
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_ATK_TEXT_CARET_MOVE, this, (AccessibleEventData*)&caretOffset);
|
||||
}
|
||||
else
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_ATK_TEXT_SELECTION_CHANGE, this, nsnull);
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** Return the caret's bounds */
|
||||
NS_IMETHODIMP nsCaretAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
|
||||
{
|
||||
if (!mVisible)
|
||||
return NS_ERROR_FAILURE; // When root accessible hasn't yet called SetCaretBounds()
|
||||
*x = mCaretRect.x;
|
||||
*y = mCaretRect.y;
|
||||
*width = mCaretRect.width;
|
||||
*height = mCaretRect.height;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaretAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_CARET;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaretAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = mVisible? 0: STATE_INVISIBLE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaretAccessible::GetAccParent(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaretAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaretAccessible::GetAccNextSibling(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Original Author: Aaron Leventhal (aaronl@netscape.com)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef __nsCaretAccessible_h__
|
||||
#define __nsCaretAccessible_h__
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsIWeakReference.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIAccessibleCaret.h"
|
||||
#include "nsISelectionListener.h"
|
||||
/*
|
||||
* This special accessibility class is for the caret, which is really the currently focused selection.
|
||||
* There is only 1 visible caret per top level window (nsRootAccessible)
|
||||
* The caret accesible does not exist within the normal accessible tree; it lives in a different world.
|
||||
* In MSAA, it is retrieved with via the WM_GETOBJECT message with lParam = OBJID_CARET,
|
||||
* (as opposed to the root accessible tree for a window which is retrieved with OBJID_CLIENT)
|
||||
* The caret accessible is owned by the nsRootAccessible for the top level window that it's in.
|
||||
*/
|
||||
|
||||
class nsCaretAccessible : public nsLeafAccessible, public nsIAccessibleCaret, public nsISelectionListener
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
nsCaretAccessible(nsIDOMNode* aDocumentNode, nsIWeakReference* aShell, nsIAccessibleEventListener *aListener);
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
|
||||
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
|
||||
|
||||
/* ----- nsIAccessibleCaret ------ */
|
||||
NS_IMETHOD AttachNewSelectionListener(nsIDOMNode *aFocusedNode);
|
||||
NS_IMETHOD RemoveSelectionListener();
|
||||
|
||||
/* ----- nsISelectionListener ---- */
|
||||
NS_IMETHOD NotifySelectionChanged(nsIDOMDocument *aDoc, nsISelection *aSel, short aReason);
|
||||
|
||||
private:
|
||||
nsRect mCaretRect;
|
||||
PRBool mVisible;
|
||||
// mListener is not a com pointer. It's a copy of the listener in the nsRootAccessible owner.
|
||||
//See nsRootAccessible.h for details of the lifetime if this listener
|
||||
nsIAccessibleEventListener *mListener;
|
||||
nsCOMPtr<nsIWeakReference> mDomSelectionWeak;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -178,3 +178,49 @@ NS_IMETHODIMP nsRadioButtonAccessible::GetAccRole(PRUint32 *_retval)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +72,22 @@ public:
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
|
||||
};
|
||||
|
||||
/**
|
||||
* Text nodes have no children, but since double inheritance
|
||||
* no-worky we have to re-impl the LeafAccessiblity blocks
|
||||
* this way.
|
||||
*/
|
||||
class nsTextAccessible : public nsLinkableAccessible
|
||||
{
|
||||
|
||||
public:
|
||||
nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -93,49 +93,37 @@ NS_IMETHODIMP nsGenericAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* DOMString getAccName (); */
|
||||
/* wstring getAccName (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccName(nsAString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* DOMString getAccValue (); */
|
||||
/* wstring getAccValue (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccValue(nsAString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* readonly attribute long accId; */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccId(PRInt32 *aAccId)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* void setAccName (in DOMString name); */
|
||||
/* void setAccName (in wstring name); */
|
||||
NS_IMETHODIMP nsGenericAccessible::SetAccName(const nsAString& name)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* DOMString getAccDescription (); */
|
||||
/* wstring getAccDescription (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccDescription(nsAString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* DOMString getAccKeyboardShortcut (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccKeyboardShortcut(nsAString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* unsigned long getAccRole (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* DOMString getAccState (); */
|
||||
/* wstring getAccState (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
@@ -147,7 +135,7 @@ NS_IMETHODIMP nsGenericAccessible::GetAccNumActions(PRUint8 *_retval)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* DOMString getAccActionName (in PRUint8 index); */
|
||||
/* wstring getAccActionName (in PRUint8 index); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
@@ -165,7 +153,7 @@ NS_IMETHODIMP nsGenericAccessible::GetAccFocused(nsIAccessible **_retval)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* DOMString getAccHelp (); */
|
||||
/* wstring getAccHelp (); */
|
||||
NS_IMETHODIMP nsGenericAccessible::GetAccHelp(nsAString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
@@ -63,6 +63,8 @@
|
||||
#include "nsIDOMDocumentType.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIDOMNSHTMLSelectElement.h"
|
||||
#include "nsIAccessibleSelectable.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
@@ -72,20 +74,8 @@
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIScrollableView.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsXULTreeAccessible.h"
|
||||
#include "nsITreeSelection.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsISelectionPrivate.h"
|
||||
#include "nsICaret.h"
|
||||
#include "nsIAccessibleCaret.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsAccessibleEventData.h"
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsRootAccessible)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIAccessibleDocument)
|
||||
@@ -95,7 +85,6 @@ NS_INTERFACE_MAP_BEGIN(nsRootAccessible)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIScrollPositionListener)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMFormListener)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMFormListener)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsAccessible)
|
||||
@@ -115,15 +104,16 @@ PRUint32 nsRootAccessible::gInstanceCount = 0;
|
||||
// construction
|
||||
//-----------------------------------------------------
|
||||
nsRootAccessible::nsRootAccessible(nsIWeakReference* aShell):nsAccessible(nsnull,aShell),
|
||||
nsDocAccessibleMixin(aShell), mListener(nsnull),
|
||||
mAccService(do_GetService("@mozilla.org/accessibilityService;1")),
|
||||
mBusy(eBusyStateUninitialized), mScrollPositionChangedTicks(0), mScrollablePresShells(nsnull)
|
||||
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);
|
||||
@@ -141,9 +131,8 @@ nsRootAccessible::~nsRootAccessible()
|
||||
printf("======> %d nsRootAccessible's %x\n", gInstanceCount, (PRUint32)this);
|
||||
#endif
|
||||
|
||||
nsLayoutAtoms::ReleaseAtoms();
|
||||
RemoveAccessibleEventListener();
|
||||
if (mScrollablePresShells)
|
||||
delete mScrollablePresShells;
|
||||
}
|
||||
|
||||
/* attribute wstring accName; */
|
||||
@@ -248,146 +237,8 @@ void nsRootAccessible::Notify(nsITimer *timer)
|
||||
if (mBusy != eBusyStateDone) {
|
||||
mBusy = eBusyStateDone;
|
||||
if (mListener)
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this, nsnull);
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
|
||||
}
|
||||
|
||||
if (mScrollPositionChangedTicks) {
|
||||
if (++mScrollPositionChangedTicks > 2) {
|
||||
// Whenever scroll position changes, mScrollPositionChangeTicks gets reset to 1
|
||||
// We only want to fire accessibilty scroll event when scrolling stops or pauses
|
||||
// Therefore, we wait for no scroll events to occur between 2 ticks of this timer
|
||||
// That indicates a pause in scrolling, so we fire the accessibilty scroll event
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mLastScrolledPresShell));
|
||||
if (mListener && presShell) {
|
||||
nsCOMPtr<nsIAccessible> docAccessible;
|
||||
if (mPresShell == mLastScrolledPresShell)
|
||||
docAccessible = this; // Fast way, don't need to create new accessible to fire event on the root
|
||||
else {
|
||||
// Need to create accessible for document that had scrolling occur in it
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
presShell->GetDocument(getter_AddRefs(doc));
|
||||
nsCOMPtr<nsIDOMNode> docNode(do_QueryInterface(doc));
|
||||
mAccService->GetAccessibleFor(docNode, getter_AddRefs(docAccessible));
|
||||
}
|
||||
|
||||
if (docAccessible)
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_SCROLLINGEND, docAccessible, nsnull);
|
||||
}
|
||||
mScrollPositionChangedTicks = 0;
|
||||
mLastScrolledPresShell = nsnull;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nsRootAccessible::AddScrollListener(nsIPresShell *aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIViewManager> vm;
|
||||
|
||||
if (aPresShell)
|
||||
aPresShell->GetViewManager(getter_AddRefs(vm));
|
||||
|
||||
nsIScrollableView* scrollableView = nsnull;
|
||||
if (vm)
|
||||
vm->GetRootScrollableView(&scrollableView);
|
||||
|
||||
if (!scrollableView)
|
||||
return;
|
||||
|
||||
if (!mScrollablePresShells)
|
||||
mScrollablePresShells = new nsSupportsHashtable(SCROLL_HASH_START_SIZE, PR_TRUE); // PR_TRUE = thread safe hash table
|
||||
|
||||
if (mScrollablePresShells) {
|
||||
nsISupportsKey key(scrollableView);
|
||||
nsCOMPtr<nsISupports> supports(dont_AddRef(NS_STATIC_CAST(nsISupports*, mScrollablePresShells->Get(&key))));
|
||||
if (supports) // This scroll view is already being listened to, remove it. We will re-add it w/ current pres shell
|
||||
RemoveScrollListener(aPresShell);
|
||||
|
||||
// Add to hash table, so we can retrieve correct pres shell later
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
weakShell = do_GetWeakReference(aPresShell);
|
||||
mScrollablePresShells->Put(&key, weakShell);
|
||||
|
||||
// Add listener
|
||||
scrollableView->AddScrollPositionListener(NS_STATIC_CAST(nsIScrollPositionListener *, this));
|
||||
}
|
||||
}
|
||||
|
||||
void nsRootAccessible::RemoveScrollListener(nsIPresShell *aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIViewManager> vm;
|
||||
|
||||
if (aPresShell)
|
||||
aPresShell->GetViewManager(getter_AddRefs(vm));
|
||||
|
||||
nsIScrollableView* scrollableView = nsnull;
|
||||
if (vm)
|
||||
vm->GetRootScrollableView(&scrollableView);
|
||||
|
||||
if (scrollableView)
|
||||
scrollableView->RemoveScrollPositionListener(NS_STATIC_CAST(nsIScrollPositionListener *, this));
|
||||
|
||||
if (mScrollablePresShells) {
|
||||
nsISupportsKey key(scrollableView);
|
||||
nsCOMPtr<nsISupports> supp;
|
||||
mScrollablePresShells->Remove(&key, getter_AddRefs(supp));
|
||||
}
|
||||
}
|
||||
|
||||
PRBool PR_CALLBACK
|
||||
RemoveScrollListenerEnum(nsHashKey *aKey, void *aData, void* aClosure)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(NS_STATIC_CAST(nsIWeakReference*, aData)));
|
||||
|
||||
// If presShell gone, then our nsIScrollPositionListener will also already be gone
|
||||
if (presShell) {
|
||||
nsCOMPtr<nsIViewManager> vm;
|
||||
if (presShell)
|
||||
presShell->GetViewManager(getter_AddRefs(vm));
|
||||
|
||||
nsIScrollableView* scrollableView = nsnull;
|
||||
if (vm)
|
||||
vm->GetRootScrollableView(&scrollableView);
|
||||
|
||||
if (scrollableView)
|
||||
scrollableView->RemoveScrollPositionListener(NS_STATIC_CAST(nsIScrollPositionListener *, aClosure));
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::ScrollPositionWillChange(nsIScrollableView *aView, nscoord aX, nscoord aY)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::ScrollPositionDidChange(nsIScrollableView *aScrollableView, nscoord aX, nscoord aY)
|
||||
{
|
||||
if (mListener) {
|
||||
if (!mScrollablePresShells)
|
||||
return NS_OK;
|
||||
nsISupportsKey key(aScrollableView);
|
||||
nsCOMPtr<nsIWeakReference> weakShell(dont_AddRef(NS_STATIC_CAST(nsIWeakReference*, mScrollablePresShells->Get(&key))));
|
||||
if (!weakShell)
|
||||
return NS_OK;
|
||||
if (mTimer && (mBusy != eBusyStateDone || (mScrollPositionChangedTicks && mLastScrolledPresShell != weakShell))) {
|
||||
// We need to say finish up our current time work and start a new timer
|
||||
// either because we haven't yet fired our finished loading event, or
|
||||
// a scroll event from another pres shell is still waiting to be fired
|
||||
Notify(mTimer);
|
||||
mTimer->Cancel();
|
||||
}
|
||||
// Start new timer, if the timer cycles at least 1 full cycle without more scroll position changes,
|
||||
// then the ::Notify() method will fire the accessibility event for scroll position changes
|
||||
nsresult rv;
|
||||
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
const PRUint32 kScrollPosCheckWait = 50;
|
||||
mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this), kScrollPosCheckWait, PR_TRUE, NS_TYPE_REPEATING_SLACK);
|
||||
}
|
||||
mScrollPositionChangedTicks = 1;
|
||||
mLastScrolledPresShell = weakShell;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsRootAccessible::StartDocReadyTimer()
|
||||
@@ -442,12 +293,6 @@ NS_IMETHODIMP nsRootAccessible::AddAccessibleEventListener(nsIAccessibleEventLis
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("DOMMenuItemActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("DOMMenuBarActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to register listener");
|
||||
|
||||
rv = target->AddEventListener(NS_LITERAL_STRING("DOMMenuBarInactive"), 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.
|
||||
@@ -465,17 +310,14 @@ NS_IMETHODIMP nsRootAccessible::AddAccessibleEventListener(nsIAccessibleEventLis
|
||||
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
|
||||
if (docShell) {
|
||||
mWebProgress = do_GetInterface(docShell);
|
||||
mWebProgress->AddProgressListener(this, nsIWebProgress::NOTIFY_LOCATION |
|
||||
nsIWebProgress::NOTIFY_STATE_DOCUMENT);
|
||||
mWebProgress->AddProgressListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
NS_ASSERTION(mWebProgress, "Could not get nsIWebProgress for nsRootAccessible");
|
||||
mWebProgress->AddProgressListener(this);
|
||||
}
|
||||
|
||||
if (!mCaretAccessible && mListener)
|
||||
mAccService->CreateCaretAccessible(mDOMNode, mListener, getter_AddRefs(mCaretAccessible));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -491,8 +333,6 @@ NS_IMETHODIMP nsRootAccessible::RemoveAccessibleEventListener()
|
||||
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("DOMMenuBarActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
|
||||
target->RemoveEventListener(NS_LITERAL_STRING("DOMMenuBarInactive"), 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);
|
||||
}
|
||||
@@ -506,36 +346,19 @@ NS_IMETHODIMP nsRootAccessible::RemoveAccessibleEventListener()
|
||||
mWebProgress->RemoveProgressListener(this);
|
||||
mWebProgress = nsnull;
|
||||
}
|
||||
|
||||
if (mScrollablePresShells)
|
||||
mScrollablePresShells->Enumerate(RemoveScrollListenerEnum, NS_STATIC_CAST(nsIScrollPositionListener*, this));
|
||||
|
||||
mListener = nsnull;
|
||||
}
|
||||
|
||||
if (mCaretAccessible) {
|
||||
mCaretAccessible->RemoveSelectionListener();
|
||||
mCaretAccessible = nsnull;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetCaretAccessible(nsIAccessibleCaret **aCaretAccessible)
|
||||
{
|
||||
*aCaretAccessible = mCaretAccessible;
|
||||
NS_IF_ADDREF(*aCaretAccessible);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *focusAccessible, nsIDOMNode *focusNode)
|
||||
{
|
||||
if (focusAccessible && focusNode && gLastFocusedNode != focusNode) {
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, focusAccessible, nsnull);
|
||||
if (focusNode && gLastFocusedNode != focusNode) {
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, focusAccessible);
|
||||
NS_IF_RELEASE(gLastFocusedNode);
|
||||
gLastFocusedNode = focusNode;
|
||||
NS_ADDREF(gLastFocusedNode);
|
||||
if (mCaretAccessible)
|
||||
mCaretAccessible->AttachNewSelectionListener(focusNode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,36 +386,12 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
|
||||
optionTargetNode = do_QueryInterface(selectItem);
|
||||
}
|
||||
|
||||
// If it's a tree element, need the currently selected item
|
||||
PRInt32 treeIndex = -1;
|
||||
nsCOMPtr<nsITreeBoxObject> treeBox;
|
||||
nsXULTreeAccessible::GetTreeBoxObject(targetNode, getter_AddRefs(treeBox));
|
||||
if (treeBox) {
|
||||
nsCOMPtr<nsITreeSelection> selection;
|
||||
treeBox->GetSelection(getter_AddRefs(selection));
|
||||
if (selection)
|
||||
selection->GetCurrentIndex(&treeIndex);
|
||||
}
|
||||
|
||||
nsAutoString eventType;
|
||||
aEvent->GetType(eventType);
|
||||
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
|
||||
if (NS_SUCCEEDED(mAccService->GetAccessibleFor(targetNode, getter_AddRefs(accessible)))) {
|
||||
#ifndef MOZ_ACCESSIBILITY_ATK
|
||||
// tree event
|
||||
if (treeBox && treeIndex >= 0 &&
|
||||
(eventType.EqualsIgnoreCase("DOMMenuItemActive") || eventType.EqualsIgnoreCase("select"))) {
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
nsAccessibilityService::GetShellFromNode(targetNode, getter_AddRefs(weakShell));
|
||||
accessible = new nsXULTreeitemAccessible(accessible, targetNode, weakShell, treeIndex);
|
||||
if (!accessible)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, accessible, nsnull);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (eventType.EqualsIgnoreCase("focus") || eventType.EqualsIgnoreCase("DOMMenuItemActive")) {
|
||||
if (optionTargetNode &&
|
||||
NS_SUCCEEDED(mAccService->GetAccessibleFor(optionTargetNode, getter_AddRefs(accessible)))) {
|
||||
@@ -603,94 +402,30 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("change")) {
|
||||
if (!selectControl) // Don't use onchange to fire EVENT_STATE_CHANGE events for selects
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible, nsnull);
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("ListitemStateChange")) {
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible, nsnull);
|
||||
FireAccessibleFocusEvent(accessible, optionTargetNode);
|
||||
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, nsnull);
|
||||
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, nsnull);
|
||||
FireAccessibleFocusEvent(accessible, targetNode);
|
||||
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, nsnull);
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible);
|
||||
}
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("popupshowing"))
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPSTART, accessible, nsnull);
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPSTART, accessible);
|
||||
else if (eventType.EqualsIgnoreCase("popuphiding"))
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPEND, accessible, nsnull);
|
||||
else if (eventType.EqualsIgnoreCase("DOMMenuBarActive"))
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUSTART, accessible, nsnull);
|
||||
else if (eventType.EqualsIgnoreCase("DOMMenuBarInactive")) {
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUEND, accessible, nsnull);
|
||||
GetAccFocused(getter_AddRefs(accessible));
|
||||
if (accessible) {
|
||||
accessible->AccGetDOMNode(getter_AddRefs(targetNode));
|
||||
FireAccessibleFocusEvent(accessible, targetNode);
|
||||
}
|
||||
}
|
||||
#else
|
||||
AtkStateChange stateData;
|
||||
if (eventType.EqualsIgnoreCase("focus") || eventType.EqualsIgnoreCase("DOMMenuItemActive")) {
|
||||
if (treeBox && treeIndex >= 0) { // use focused treeitem
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
nsAccessibilityService::GetShellFromNode(targetNode, getter_AddRefs(weakShell));
|
||||
accessible = new nsXULTreeitemAccessible(accessible, targetNode, weakShell, treeIndex);
|
||||
if (!accessible)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, accessible, nsnull);
|
||||
return NS_OK;
|
||||
}
|
||||
else if (optionTargetNode && // use focused option
|
||||
NS_SUCCEEDED(mAccService->GetAccessibleFor(optionTargetNode, getter_AddRefs(accessible)))) {
|
||||
FireAccessibleFocusEvent(accessible, optionTargetNode);
|
||||
}
|
||||
else
|
||||
FireAccessibleFocusEvent(accessible, targetNode);
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("change")) {
|
||||
if (selectElement) // it's a HTML <select>
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_ATK_SELECTION_CHANGE, accessible, nsnull);
|
||||
else {
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(targetNode));
|
||||
if (inputElement) { // it's a HTML <input>
|
||||
accessible->GetAccState(&stateData.state);
|
||||
stateData.enable = stateData.state & STATE_CHECKED;
|
||||
stateData.state = STATE_CHECKED;
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible, nsnull);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("select")) {
|
||||
if (selectControl) // it's a XUL <listbox>
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_ATK_SELECTION_CHANGE, accessible, nsnull);
|
||||
else if (treeBox && treeIndex >= 0) // it's a XUL <tree>
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_ATK_SELECTION_CHANGE, accessible, nsnull);
|
||||
// XUL <menulist> doesn't send FORM_SELECT event yet :(
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("input")) {
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_ATK_TEXT_CHANGE, accessible, nsnull);
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("CheckboxStateChange") || // it's a XUL <checkbox>
|
||||
eventType.EqualsIgnoreCase("RadioStateChange")) { // it's a XUL <radio>
|
||||
accessible->GetAccState(&stateData.state);
|
||||
stateData.enable = stateData.state & STATE_CHECKED;
|
||||
stateData.state = STATE_CHECKED;
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, accessible, nsnull);
|
||||
}
|
||||
else if (eventType.EqualsIgnoreCase("popupshowing"))
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPSTART, accessible, nsnull);
|
||||
else if (eventType.EqualsIgnoreCase("popuphiding"))
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPEND, accessible, nsnull);
|
||||
#endif
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_MENUPOPUPEND, accessible);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
@@ -718,22 +453,13 @@ NS_IMETHODIMP nsRootAccessible::Focus(nsIDOMEvent* aEvent)
|
||||
return HandleEvent(aEvent);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::Blur(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP nsRootAccessible::Blur(nsIDOMEvent* aEvent) { return NS_OK; }
|
||||
|
||||
// ------- nsIDOMFormListener Methods (5) -------------
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::Submit(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP nsRootAccessible::Submit(nsIDOMEvent* aEvent) { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::Reset(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP nsRootAccessible::Reset(nsIDOMEvent* aEvent) { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::Change(nsIDOMEvent* aEvent)
|
||||
{
|
||||
@@ -746,20 +472,10 @@ NS_IMETHODIMP nsRootAccessible::Change(nsIDOMEvent* aEvent)
|
||||
}
|
||||
|
||||
// gets Select events when text is selected in a textarea or input
|
||||
NS_IMETHODIMP nsRootAccessible::Select(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return HandleEvent(aEvent);
|
||||
}
|
||||
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)
|
||||
{
|
||||
#ifndef MOZ_ACCESSIBILITY_ATK
|
||||
return NS_OK;
|
||||
#else
|
||||
return HandleEvent(aEvent);
|
||||
#endif
|
||||
}
|
||||
NS_IMETHODIMP nsRootAccessible::Input(nsIDOMEvent* aEvent) { return NS_OK; }
|
||||
|
||||
// ------- nsIDOMXULListener Methods (8) ---------------
|
||||
|
||||
@@ -812,24 +528,8 @@ NS_IMETHODIMP nsRootAccessible::GetDocument(nsIDocument **doc)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::OnStateChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, PRUint32 aStateFlags, nsresult aStatus)
|
||||
nsIRequest *aRequest, PRInt32 aStateFlags, PRUint32 aStatus)
|
||||
{
|
||||
if ((aStateFlags & STATE_IS_DOCUMENT) && (aStateFlags & STATE_STOP)) {
|
||||
// Set up scroll position listener
|
||||
nsCOMPtr<nsIDOMWindow> domWin;
|
||||
aWebProgress->GetDOMWindow(getter_AddRefs(domWin));
|
||||
if (domWin) {
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
domWin->GetDocument(getter_AddRefs(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
doc->GetShellAt(0, getter_AddRefs(presShell));
|
||||
AddScrollListener(presShell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -838,7 +538,6 @@ NS_IMETHODIMP nsRootAccessible::OnProgressChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
|
||||
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
|
||||
{
|
||||
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -847,24 +546,10 @@ NS_IMETHODIMP nsRootAccessible::OnLocationChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, nsIURI *location)
|
||||
{
|
||||
// Load has been verified, it will occur, about to commence
|
||||
if (mBusy != eBusyStateLoading) {
|
||||
if (mListener && mBusy != eBusyStateLoading) {
|
||||
mBusy = eBusyStateLoading;
|
||||
if (mListener)
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this, nsnull);
|
||||
|
||||
// Document is going away, remove its scroll position listener
|
||||
nsCOMPtr<nsIDOMWindow> domWin;
|
||||
aWebProgress->GetDOMWindow(getter_AddRefs(domWin));
|
||||
if (domWin) {
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
domWin->GetDocument(getter_AddRefs(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
doc->GetShellAt(0, getter_AddRefs(presShell));
|
||||
RemoveScrollListener(presShell);
|
||||
}
|
||||
}
|
||||
mListener->HandleEvent(nsIAccessibleEventListener::EVENT_STATE_CHANGE, this);
|
||||
StartDocReadyTimer();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@@ -874,15 +559,13 @@ NS_IMETHODIMP nsRootAccessible::OnLocationChange(nsIWebProgress *aWebProgress,
|
||||
NS_IMETHODIMP nsRootAccessible::OnStatusChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage)
|
||||
{
|
||||
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */
|
||||
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long state); */
|
||||
NS_IMETHODIMP nsRootAccessible::OnSecurityChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest, PRUint32 state)
|
||||
nsIRequest *aRequest, PRInt32 state)
|
||||
{
|
||||
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -996,11 +679,3 @@ NS_IMETHODIMP nsDocAccessibleMixin::GetDocShellFromPS(nsIPresShell* aPresShell,
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocAccessibleMixin::GetCaretAccessible(nsIAccessibleCaret **aCaretAccessible)
|
||||
{
|
||||
// Caret only owned by top level window's document
|
||||
*aCaretAccessible = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,11 +53,7 @@
|
||||
#include "nsITimer.h"
|
||||
#include "nsITimerCallback.h"
|
||||
#include "nsIWebProgress.h"
|
||||
#include "nsIScrollPositionListener.h"
|
||||
#include "nsIScrollableView.h"
|
||||
#include "nsHashtable.h"
|
||||
|
||||
const PRInt32 SCROLL_HASH_START_SIZE = 6;
|
||||
|
||||
class nsDocAccessibleMixin
|
||||
{
|
||||
@@ -82,9 +78,9 @@ class nsRootAccessible : public nsAccessible,
|
||||
public nsIDOMXULListener,
|
||||
public nsIWebProgressListener,
|
||||
public nsITimerCallback,
|
||||
public nsIScrollPositionListener,
|
||||
public nsSupportsWeakReference
|
||||
|
||||
|
||||
{
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
@@ -128,11 +124,6 @@ class nsRootAccessible : public nsAccessible,
|
||||
NS_IMETHOD Broadcast(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent);
|
||||
|
||||
// ----- nsIScrollPositionListener ---------------------------
|
||||
NS_IMETHOD ScrollPositionWillChange(nsIScrollableView *aView, nscoord aX, nscoord aY);
|
||||
NS_IMETHOD ScrollPositionDidChange(nsIScrollableView *aView, nscoord aX, nscoord aY);
|
||||
|
||||
// ----- nsITimerCallback ------------------------------------
|
||||
NS_IMETHOD_(void) Notify(nsITimer *timer);
|
||||
|
||||
NS_DECL_NSIACCESSIBLEDOCUMENT
|
||||
@@ -144,9 +135,6 @@ class nsRootAccessible : public nsAccessible,
|
||||
virtual nsIFrame* GetFrame();
|
||||
void FireAccessibleFocusEvent(nsIAccessible *focusAccessible, nsIDOMNode *focusNode);
|
||||
void StartDocReadyTimer();
|
||||
void AddScrollListener(nsIPresShell *aPresShell);
|
||||
void RemoveScrollListener(nsIPresShell *aPresShell);
|
||||
friend PRBool PR_CALLBACK RemoveScrollListenerEnum(nsHashKey *aKey, void *aData, void* aClosure);
|
||||
|
||||
static PRUint32 gInstanceCount;
|
||||
|
||||
@@ -162,12 +150,7 @@ class nsRootAccessible : public nsAccessible,
|
||||
nsCOMPtr<nsIWebProgress> mWebProgress;
|
||||
nsCOMPtr<nsIAccessibilityService> mAccService;
|
||||
EBusyState mBusy;
|
||||
|
||||
// Used for tracking scroll events
|
||||
PRUint32 mScrollPositionChangedTicks;
|
||||
nsSupportsHashtable *mScrollablePresShells;
|
||||
nsCOMPtr<nsIWeakReference> mLastScrolledPresShell;
|
||||
nsCOMPtr<nsIAccessibleCaret> mCaretAccessible;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* Contributor(s):
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
* Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
* Kyle Yuan (kyle.yuan@sun.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@@ -42,20 +42,19 @@
|
||||
#include "nsFormControlAccessible.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsIComboboxControlFrame.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIDOMHTMLOptionElement.h"
|
||||
#include "nsIDOMHTMLOptGroupElement.h"
|
||||
#include "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIListControlFrame.h"
|
||||
#include "nsISelectControlFrame.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsSelectAccessible.h"
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** First, the common widgets */
|
||||
@@ -141,6 +140,16 @@ nsLeafAccessible(aDOMNode, aShell)
|
||||
}
|
||||
}
|
||||
|
||||
/** click us! */
|
||||
NS_IMETHODIMP nsSelectOptionAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
|
||||
{
|
||||
if (index == eAction_Click) {
|
||||
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("select"), _retval);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/** We are a ListItem */
|
||||
NS_IMETHODIMP nsSelectOptionAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
@@ -197,6 +206,195 @@ NS_IMETHODIMP nsSelectOptionAccessible::GetAccName(nsAString& _retval)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** Secondly, the Listbox widget */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/** ----- nsListboxAccessible ----- */
|
||||
|
||||
/** Constructor */
|
||||
nsListboxAccessible::nsListboxAccessible(nsIDOMNode* aDOMNode,
|
||||
nsIWeakReference* aShell):
|
||||
nsAccessible(aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/** We are a window, as far as MSAA is concerned */
|
||||
NS_IMETHODIMP nsListboxAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_WINDOW;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* We always have 1 child: a subclass of nsSelectListAccessible.
|
||||
*/
|
||||
NS_IMETHODIMP nsListboxAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
*_retval = 1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* As a nsHTMLListboxAccessible we can have the following states:
|
||||
* STATE_FOCUSED
|
||||
* STATE_READONLY
|
||||
* STATE_FOCUSABLE
|
||||
*/
|
||||
NS_IMETHODIMP nsListboxAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// Get focus status from base class
|
||||
nsAccessible::GetAccState(_retval);
|
||||
|
||||
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** Finally, the Combobox widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/** ----- nsComboboxAccessible ----- */
|
||||
|
||||
/**
|
||||
* Constructor -- set initial state - closed, register ourself
|
||||
*/
|
||||
nsComboboxAccessible::nsComboboxAccessible(nsIDOMNode* aDOMNode,
|
||||
nsIWeakReference* aShell):
|
||||
nsAccessible(aDOMNode, aShell)
|
||||
{
|
||||
mRegistered = PR_FALSE;
|
||||
mOpen = PR_FALSE;
|
||||
SetupMenuListener();
|
||||
}
|
||||
|
||||
/**
|
||||
* Destructor -- If we are registered, remove ourselves as a listener.
|
||||
*/
|
||||
nsComboboxAccessible::~nsComboboxAccessible()
|
||||
{
|
||||
if (mRegistered) {
|
||||
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
|
||||
if (eventReceiver)
|
||||
eventReceiver->RemoveEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inherit the ISupports impl from nsAccessible,
|
||||
* handle nsIDOMXULListener and nsIAccessibleSelectable ourself
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(nsComboboxAccessible, nsAccessible, nsIDOMXULListener, nsIAccessibleSelectable)
|
||||
|
||||
/**
|
||||
* If we aren't already registered, register ourselves as a
|
||||
* listener to "popupshowing" events on our DOM node. Set our
|
||||
* state to registered, but don't notify MSAA as they
|
||||
* don't need to know about this state.
|
||||
*/
|
||||
void
|
||||
nsComboboxAccessible::SetupMenuListener()
|
||||
{
|
||||
// if not already registered as a popup listener, register ourself
|
||||
if (!mRegistered) {
|
||||
nsCOMPtr<nsIDOMEventReceiver> eventReceiver(do_QueryInterface(mDOMNode));
|
||||
if (eventReceiver && NS_SUCCEEDED(eventReceiver->AddEventListener(NS_LITERAL_STRING("popupshowing"), this, PR_TRUE)))
|
||||
mRegistered = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/** We are a combobox */
|
||||
NS_IMETHODIMP nsComboboxAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_COMBOBOX;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* We always have 3 children: TextField, Button, Window. In that order
|
||||
*/
|
||||
NS_IMETHODIMP nsComboboxAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
*_retval = 3;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* nsIAccessibleSelectable method. No-op because our selection is returned through
|
||||
* GetValue(). This _may_ change just to provide additional info for the vendors
|
||||
* and another option for them to get at stuff. Despite the fact that we are
|
||||
* single selection only.
|
||||
*/
|
||||
NS_IMETHODIMP nsComboboxAccessible::GetSelectedChildren(nsISupportsArray **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* As a nsComboboxAccessible we can have the following states:
|
||||
* STATE_FOCUSED
|
||||
* STATE_READONLY
|
||||
* STATE_FOCUSABLE
|
||||
* STATE_HASPOPUP
|
||||
* STATE_EXPANDED
|
||||
* STATE_COLLAPSED
|
||||
*/
|
||||
NS_IMETHODIMP nsComboboxAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// Get focus status from base class
|
||||
nsAccessible::GetAccState(_retval);
|
||||
|
||||
if (mOpen)
|
||||
*_retval |= STATE_EXPANDED;
|
||||
else
|
||||
*_retval |= STATE_COLLAPSED;
|
||||
|
||||
*_retval |= STATE_HASPOPUP | STATE_READONLY | STATE_FOCUSABLE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set our state to open and (TBD) fire an event to MSAA saying our state
|
||||
* has changed.
|
||||
*/
|
||||
NS_IMETHODIMP nsComboboxAccessible::PopupShowing(nsIDOMEvent* aEvent)
|
||||
{
|
||||
mOpen = PR_TRUE;
|
||||
|
||||
/* TBD send state change event */
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set our state to not open and (TDB) fire an event to MSAA saying
|
||||
* our state has changed.
|
||||
*/
|
||||
NS_IMETHODIMP nsComboboxAccessible::PopupHiding(nsIDOMEvent* aEvent)
|
||||
{
|
||||
mOpen = PR_FALSE;
|
||||
|
||||
/* TBD send state change event */
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set our state to not open and (TDB) fire an event to MSAA saying
|
||||
* our state has changed.
|
||||
*/
|
||||
NS_IMETHODIMP nsComboboxAccessible::Close(nsIDOMEvent* aEvent)
|
||||
{
|
||||
mOpen = PR_FALSE;
|
||||
|
||||
/* TBD send state change event */
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** ----- nsComboboxTextFieldAccessible ----- */
|
||||
|
||||
/** Constructor */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* Contributor(s):
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
* Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
* Kyle Yuan (kyle.yuan@sun.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@@ -43,15 +43,12 @@
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsIAccessibleSelectable.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIDOMXULListener.h"
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** First, the common widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
enum { eSelection_Add=0, eSelection_Remove=1, eSelection_GetState=2 };
|
||||
|
||||
/**
|
||||
* The list that contains all the options in the select.
|
||||
*/
|
||||
@@ -85,6 +82,7 @@ public:
|
||||
virtual ~nsSelectOptionAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
@@ -94,6 +92,72 @@ 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
|
||||
|
||||
@@ -1,488 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
* Aaron Leventhal (aaronl@netscape.com)
|
||||
* Kyle Yuan (kyle.yuan@sun.com)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsContentCID.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsITextContent.h"
|
||||
#include "nsTextAccessible.h"
|
||||
#include "nsTextFragment.h"
|
||||
|
||||
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsAccessibleText, nsIAccessibleText)
|
||||
|
||||
nsAccessibleText::nsAccessibleText()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsAccessibleText::~nsAccessibleText()
|
||||
{
|
||||
}
|
||||
|
||||
void nsAccessibleText::SetTextNode(nsIDOMNode *aNode)
|
||||
{
|
||||
mTextNode = aNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* nsIAccessibleText impl.
|
||||
*/
|
||||
nsresult nsAccessibleText::GetSelections(nsISelectionController **aSelCon, nsISelection **aDomSel)
|
||||
{
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
mTextNode->GetOwnerDocument(getter_AddRefs(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
|
||||
if (!doc)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
doc->GetShellAt(0, getter_AddRefs(shell));
|
||||
if (!shell)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
shell->GetPresContext(getter_AddRefs(context));
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mTextNode));
|
||||
nsIFrame *frame = nsnull;
|
||||
if (content && NS_SUCCEEDED(shell->GetPrimaryFrameFor(content, &frame)) && frame) {
|
||||
frame->GetSelectionController(context, aSelCon);
|
||||
if (*aSelCon)
|
||||
(*aSelCon)->GetSelection(nsISelectionController::SELECTION_NORMAL, aDomSel);
|
||||
}
|
||||
|
||||
if (*aSelCon && *aDomSel)
|
||||
return NS_OK;
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the specified text.
|
||||
|
||||
aBoundaryType means:
|
||||
|
||||
ATK_TEXT_BOUNDARY_CHAR
|
||||
The character before/at/after the offset is returned.
|
||||
|
||||
ATK_TEXT_BOUNDARY_WORD_START
|
||||
The returned string is from the word start before/at/after the offset to the next word start.
|
||||
|
||||
ATK_TEXT_BOUNDARY_WORD_END
|
||||
The returned string is from the word end before/at/after the offset to the next work end.
|
||||
|
||||
ATK_TEXT_BOUNDARY_SENTENCE_START
|
||||
The returned string is from the sentence start before/at/after the offset to the next sentence start.
|
||||
|
||||
ATK_TEXT_BOUNDARY_SENTENCE_END
|
||||
The returned string is from the sentence end before/at/after the offset to the next sentence end.
|
||||
|
||||
ATK_TEXT_BOUNDARY_LINE_START
|
||||
The returned string is from the line start before/at/after the offset to the next line start.
|
||||
|
||||
ATK_TEXT_BOUNDARY_LINE_END
|
||||
The returned string is from the line end before/at/after the offset to the next line start.
|
||||
*/
|
||||
nsresult nsAccessibleText::GetTextHelper(EGetTextType aType, nsAccessibleTextBoundary aBoundaryType,
|
||||
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval)
|
||||
{
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
nsCOMPtr<nsISelection> domSel;
|
||||
|
||||
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMRange> range(do_CreateInstance(kRangeCID));
|
||||
if (!range)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
*aStartOffset = *aEndOffset = aOffset;
|
||||
|
||||
// Move caret position to offset
|
||||
range->SetStart(mTextNode, aOffset);
|
||||
range->SetEnd(mTextNode, aOffset);
|
||||
domSel->RemoveAllRanges();
|
||||
domSel->AddRange(range);
|
||||
|
||||
// Step1: move caret to an appropriate start position
|
||||
// Step2: move caret to end postion and select the text
|
||||
PRBool isStep1Forward, isStep2Forward; // Moving directions for two steps
|
||||
switch (aType)
|
||||
{
|
||||
case eGetBefore:
|
||||
isStep1Forward = PR_FALSE;
|
||||
isStep2Forward = PR_FALSE;
|
||||
break;
|
||||
case eGetAt:
|
||||
isStep1Forward = PR_FALSE;
|
||||
isStep2Forward = PR_TRUE;
|
||||
break;
|
||||
case eGetAfter:
|
||||
isStep1Forward = PR_TRUE;
|
||||
isStep2Forward = PR_TRUE;
|
||||
break;
|
||||
default:
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
switch (aBoundaryType)
|
||||
{
|
||||
case BOUNDARY_CHAR:
|
||||
if (aType == eGetAfter) { // We need the character next to current position
|
||||
selCon->CharacterMove(isStep1Forward, PR_FALSE);
|
||||
domSel->GetFocusOffset(aStartOffset);
|
||||
}
|
||||
selCon->CharacterMove(isStep2Forward, PR_TRUE);
|
||||
domSel->GetFocusOffset(aEndOffset);
|
||||
break;
|
||||
case BOUNDARY_WORD_START:
|
||||
selCon->WordMove(isStep1Forward, PR_FALSE); // Move caret to previous/next word start boundary
|
||||
domSel->GetFocusOffset(aStartOffset);
|
||||
selCon->WordMove(isStep2Forward, PR_TRUE); // Select previous/next word
|
||||
domSel->GetFocusOffset(aEndOffset);
|
||||
break;
|
||||
case BOUNDARY_LINE_START:
|
||||
if (aType != eGetAt) { // We need adjust the caret position to previous/next line
|
||||
selCon->LineMove(isStep1Forward, PR_TRUE);
|
||||
domSel->GetFocusOffset(aEndOffset);
|
||||
}
|
||||
selCon->IntraLineMove(PR_FALSE, PR_FALSE); // Move caret to the line start
|
||||
domSel->GetFocusOffset(aStartOffset);
|
||||
selCon->IntraLineMove(PR_TRUE, PR_TRUE); // Move caret to the line end and select the whole line
|
||||
domSel->GetFocusOffset(aEndOffset);
|
||||
break;
|
||||
case BOUNDARY_WORD_END:
|
||||
case BOUNDARY_LINE_END:
|
||||
case BOUNDARY_SENTENCE_START:
|
||||
case BOUNDARY_SENTENCE_END:
|
||||
case BOUNDARY_ATTRIBUTE_RANGE:
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
default:
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
nsXPIDLString text;
|
||||
// Get text from selection
|
||||
domSel->ToString(getter_Copies(text));
|
||||
domSel->RemoveAllRanges();
|
||||
_retval = text;
|
||||
|
||||
// Ensure aStartOffset <= aEndOffset
|
||||
if (*aStartOffset > *aEndOffset) {
|
||||
PRInt32 tmp = *aStartOffset;
|
||||
*aStartOffset = *aEndOffset;
|
||||
*aEndOffset = tmp;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the offset position of the caret (cursor).
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::GetCaretOffset(PRInt32 *aCaretOffset)
|
||||
{
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
nsCOMPtr<nsISelection> domSel;
|
||||
|
||||
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return domSel->GetFocusOffset(aCaretOffset);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the caret (cursor) position to the specified offset.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::SetCaretOffset(PRInt32 aCaretOffset)
|
||||
{
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
nsCOMPtr<nsISelection> domSel;
|
||||
|
||||
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMRange> range(do_CreateInstance(kRangeCID));
|
||||
if (! range)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
range->SetStart(mTextNode, aCaretOffset);
|
||||
range->SetEnd(mTextNode, aCaretOffset);
|
||||
return domSel->AddRange(range);
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the character count.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::GetCharacterCount(PRInt32 *aCharacterCount)
|
||||
{
|
||||
nsCOMPtr<nsITextContent> textContent(do_QueryInterface(mTextNode));
|
||||
if (!textContent)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return textContent->GetTextLength(aCharacterCount);
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the number of selected regions.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::GetSelectionCount(PRInt32 *aSelectionCount)
|
||||
{
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
nsCOMPtr<nsISelection> domSel;
|
||||
|
||||
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return domSel->GetRangeCount(aSelectionCount);
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the specified text.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString & _retval)
|
||||
{
|
||||
nsAutoString text;
|
||||
mTextNode->GetNodeValue(text);
|
||||
_retval = Substring(text, aStartOffset, aEndOffset - aStartOffset);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessibleText::GetTextBeforeOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
|
||||
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval)
|
||||
{
|
||||
return GetTextHelper(eGetBefore, aBoundaryType, aOffset, aStartOffset, aEndOffset, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessibleText::GetTextAtOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
|
||||
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval)
|
||||
{
|
||||
return GetTextHelper(eGetAt, aBoundaryType, aOffset, aStartOffset, aEndOffset, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessibleText::GetTextAfterOffset(PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType,
|
||||
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval)
|
||||
{
|
||||
return GetTextHelper(eGetAfter, aBoundaryType, aOffset, aStartOffset, aEndOffset, _retval);
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the specified text.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::GetCharacterAtOffset(PRInt32 aOffset, PRUnichar *_retval)
|
||||
{
|
||||
nsCOMPtr<nsITextContent> textContent(do_QueryInterface(mTextNode));
|
||||
if (!textContent)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
const nsTextFragment *textFrag;
|
||||
textContent->GetText(&textFrag);
|
||||
*_retval = textFrag->CharAt(aOffset);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessibleText::GetAttributeRange(PRInt32 aOffset, PRInt32 *aRangeStartOffset, PRInt32 *aRangeEndOffset, nsISupports **_retval)
|
||||
{
|
||||
// will do better job later
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/*
|
||||
* Given an offset, the x, y, width, and height values are filled appropriately.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::GetCharacterExtents(PRInt32 aOffset, PRInt32 *aX, PRInt32 *aY, PRInt32 *aLength, PRInt32 *aWidth, nsAccessibleCoordType aCoordType)
|
||||
{
|
||||
// will do better job later
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the offset of the character located at coordinates x and y. x and y are interpreted as being relative to
|
||||
* the screen or this widget's window depending on coords.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY, nsAccessibleCoordType aCoordType, PRInt32 *_retval)
|
||||
{
|
||||
// will do better job later
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the start and end offset of the specified selection.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::GetSelectionBounds(PRInt32 aSelectionNum, PRInt32 *aStartOffset, PRInt32 *aEndOffset)
|
||||
{
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
nsCOMPtr<nsISelection> domSel;
|
||||
|
||||
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRInt32 rangeCount;
|
||||
domSel->GetRangeCount(&rangeCount);
|
||||
if (aSelectionNum < 0 || aSelectionNum >= rangeCount)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsCOMPtr<nsIDOMRange> range;
|
||||
domSel->GetRangeAt(aSelectionNum, getter_AddRefs(range));
|
||||
range->GetStartOffset(aStartOffset);
|
||||
range->GetEndOffset(aEndOffset);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Changes the start and end offset of the specified selection.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::SetSelectionBounds(PRInt32 aSelectionNum, PRInt32 aStartOffset, PRInt32 aEndOffset)
|
||||
{
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
nsCOMPtr<nsISelection> domSel;
|
||||
|
||||
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRInt32 rangeCount;
|
||||
domSel->GetRangeCount(&rangeCount);
|
||||
if (aSelectionNum < 0 || aSelectionNum >= rangeCount)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsCOMPtr<nsIDOMRange> range;
|
||||
domSel->GetRangeAt(aSelectionNum, getter_AddRefs(range));
|
||||
|
||||
nsCOMPtr<nsIDOMNode> startParent;
|
||||
nsCOMPtr<nsIDOMNode> endParent;
|
||||
range->GetStartContainer(getter_AddRefs(startParent));
|
||||
range->GetEndContainer(getter_AddRefs(endParent));
|
||||
range->SetStart(startParent, aStartOffset);
|
||||
range->SetEnd(endParent, aEndOffset);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a selection bounded by the specified offsets.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::AddSelection(PRInt32 aStartOffset, PRInt32 aEndOffset)
|
||||
{
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
nsCOMPtr<nsISelection> domSel;
|
||||
|
||||
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMRange> range(do_CreateInstance(kRangeCID));
|
||||
if (! range)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
range->SetStart(mTextNode, aStartOffset);
|
||||
range->SetEnd(mTextNode, aEndOffset);
|
||||
return domSel->AddRange(range);
|
||||
}
|
||||
|
||||
/*
|
||||
* Removes the specified selection.
|
||||
*/
|
||||
NS_IMETHODIMP nsAccessibleText::RemoveSelection(PRInt32 aSelectionNum)
|
||||
{
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
nsCOMPtr<nsISelection> domSel;
|
||||
|
||||
if (NS_FAILED(GetSelections(getter_AddRefs(selCon), getter_AddRefs(domSel))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRInt32 rangeCount;
|
||||
domSel->GetRangeCount(&rangeCount);
|
||||
if (aSelectionNum < 0 || aSelectionNum >= rangeCount)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsCOMPtr<nsIDOMRange> range;
|
||||
domSel->GetRangeAt(aSelectionNum, getter_AddRefs(range));
|
||||
return domSel->RemoveRange(range);
|
||||
}
|
||||
|
||||
// ------------
|
||||
// Text Accessibles
|
||||
// ------------
|
||||
|
||||
nsTextAccessible::nsTextAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
nsLinkableAccessible(aDOMNode, aShell)
|
||||
{
|
||||
SetTextNode(aDOMNode);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsTextAccessible, nsLinkableAccessible, nsAccessibleText)
|
||||
|
||||
/**
|
||||
* We are text
|
||||
*/
|
||||
NS_IMETHODIMP nsTextAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_TEXT;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* No Children
|
||||
*/
|
||||
NS_IMETHODIMP nsTextAccessible::GetAccFirstChild(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* No Children
|
||||
*/
|
||||
NS_IMETHODIMP nsTextAccessible::GetAccLastChild(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* No Children
|
||||
*/
|
||||
NS_IMETHODIMP nsTextAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
*_retval = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Eric D Vaughan (evaughan@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsTextAccessible_H_
|
||||
#define _nsTextAccessible_H_
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsIAccessibleText.h"
|
||||
#include "nsISelectionController.h"
|
||||
|
||||
class nsAccessibleText : public nsIAccessibleText
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIACCESSIBLETEXT
|
||||
|
||||
nsAccessibleText();
|
||||
virtual ~nsAccessibleText();
|
||||
|
||||
void SetTextNode(nsIDOMNode *aNode);
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIDOMNode> mTextNode;
|
||||
|
||||
enum EGetTextType { eGetBefore=-1, eGetAt=0, eGetAfter=1 };
|
||||
|
||||
nsresult GetSelections(nsISelectionController **aSelCon, nsISelection **aDomSel);
|
||||
nsresult GetTextHelper(EGetTextType aType, nsAccessibleTextBoundary aBoundaryType,
|
||||
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & _retval);
|
||||
};
|
||||
|
||||
/**
|
||||
* Text nodes have no children, but since double inheritance
|
||||
* no-worky we have to re-impl the LeafAccessiblity blocks
|
||||
* this way.
|
||||
*/
|
||||
class nsTextAccessible : public nsLinkableAccessible,
|
||||
public nsAccessibleText
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,11 +29,10 @@ include $(DEPTH)/config/autoconf.mk
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_html_s
|
||||
REQUIRES = \
|
||||
appshell \
|
||||
content \
|
||||
content_xul \
|
||||
docshell \
|
||||
dom \
|
||||
editor \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
@@ -42,13 +41,13 @@ REQUIRES = \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
webbrwsr \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
@@ -57,11 +56,9 @@ CPPSRCS = \
|
||||
nsHTMLIFrameRootAccessible.cpp \
|
||||
nsHTMLImageAccessible.cpp \
|
||||
nsHTMLLinkAccessible.cpp \
|
||||
nsHTMLPluginAccessible.cpp \
|
||||
nsHTMLSelectAccessible.cpp \
|
||||
nsHTMLTableAccessible.cpp \
|
||||
nsHTMLTextAccessible.cpp \
|
||||
nsHTMLWin32ObjectAccessible.cpp \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
@@ -71,5 +68,4 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../base \
|
||||
-I$(srcdir)/../../../layout/html/base/src \
|
||||
$(NULL)
|
||||
|
||||
@@ -23,24 +23,17 @@ DEPTH = ..\..\..
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_html_s
|
||||
REQUIRES = \
|
||||
appshell \
|
||||
content \
|
||||
docshell \
|
||||
dom \
|
||||
editor \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
imglib2 \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webBrowser_core \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
@@ -52,15 +45,12 @@ CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsHTMLIFrameRootAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLImageAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLLinkAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLPluginAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLSelectAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLTableAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLTextAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLWin32ObjectAccessible.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
.\nsHTMLWin32ObjectAccessible.h \
|
||||
$(NULL)
|
||||
|
||||
LINCS = \
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#include "nsFormControlAccessible.h"
|
||||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLFormControlAccessible.h"
|
||||
#include "nsIClipboard.h"
|
||||
#include "nsIDOMHTMLButtonElement.h"
|
||||
#include "nsIDOMHTMLFormElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
@@ -53,12 +52,8 @@
|
||||
#include "nsIDOMXULButtonElement.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIEditor.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsITextControlFrame.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIPlaintextEditor.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsWeakReference.h"
|
||||
@@ -313,37 +308,8 @@ NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccName(nsAString& _retval)
|
||||
nsHTMLTextFieldAccessible::nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsFormControlAccessible(aNode, aShell)
|
||||
{
|
||||
// In nsHTMLTextFieldAccessible, mDOMNode is a nsHTMLInputElement. But we need
|
||||
// a *true* text node(nsTextNode) for the text operation. It's the first child
|
||||
// of our editor's root element
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
|
||||
if (!shell)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
nsIFrame *frame = nsnull;
|
||||
shell->GetPrimaryFrameFor(content, &frame);
|
||||
nsCOMPtr<nsITextControlFrame> tframe(do_QueryInterface(frame));
|
||||
if (!tframe)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
tframe->GetEditor(getter_AddRefs(editor));
|
||||
if (!editor)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIDOMElement> rootElement;
|
||||
editor->GetRootElement(getter_AddRefs(rootElement));
|
||||
nsCOMPtr<nsIDOMNode> rootNode(do_QueryInterface(rootElement));
|
||||
if (rootNode) {
|
||||
nsCOMPtr<nsIDOMNode> domNode;
|
||||
rootNode->GetFirstChild(getter_AddRefs(domNode));
|
||||
SetTextNode(domNode);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(nsHTMLTextFieldAccessible, nsFormControlAccessible, nsIAccessibleEditableText, nsAccessibleText)
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_TEXT;
|
||||
@@ -434,106 +400,6 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccState(PRUint32 *_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::SetAttributes(PRInt32 aStartPos, PRInt32 aEndPos, nsISupports *aAttributes)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::SetTextContents(const nsAString &aText)
|
||||
{
|
||||
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mDOMNode));
|
||||
if (textArea)
|
||||
return textArea->SetValue(aText);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mDOMNode));
|
||||
if (inputElement)
|
||||
return inputElement->SetValue(aText);
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::MakeSelection(PRInt32 aStartPos, PRInt32 aEndPos, nsIEditor **aEditor)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
|
||||
if (!shell)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
AccTakeFocus();
|
||||
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
nsIFrame *frame = nsnull;
|
||||
shell->GetPrimaryFrameFor(content, &frame);
|
||||
nsCOMPtr<nsITextControlFrame> tframe(do_QueryInterface(frame));
|
||||
if (!tframe)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
tframe->SetSelectionRange(aStartPos, aEndPos);
|
||||
tframe->GetEditor(getter_AddRefs(editor));
|
||||
if (!editor)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aEditor = editor;
|
||||
NS_ADDREF(*aEditor);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::InsertText(const nsAString &aText, PRInt32 aPosition)
|
||||
{
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
if (NS_SUCCEEDED(MakeSelection(aPosition, aPosition, getter_AddRefs(editor)))) {
|
||||
nsCOMPtr<nsIPlaintextEditor> peditor(do_QueryInterface(editor));
|
||||
peditor->InsertText(aText);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos)
|
||||
{
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
if (NS_SUCCEEDED(MakeSelection(aStartPos, aEndPos, getter_AddRefs(editor)))) {
|
||||
editor->Copy();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos)
|
||||
{
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
if (NS_SUCCEEDED(MakeSelection(aStartPos, aEndPos, getter_AddRefs(editor)))) {
|
||||
editor->Cut();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos)
|
||||
{
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
if (NS_SUCCEEDED(MakeSelection(aStartPos, aEndPos, getter_AddRefs(editor)))) {
|
||||
editor->DeleteSelection(nsIEditor::eNone);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::PasteText(PRInt32 aPosition)
|
||||
{
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
if (NS_SUCCEEDED(MakeSelection(aPosition, aPosition, getter_AddRefs(editor)))) {
|
||||
editor->Paste(nsIClipboard::kGlobalClipboard);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// --- groupbox -----
|
||||
|
||||
|
||||
@@ -42,8 +42,6 @@
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsFormControlAccessible.h"
|
||||
#include "nsIAccessibleEditableText.h"
|
||||
#include "nsTextAccessible.h"
|
||||
|
||||
class nsICheckboxControlFrame;
|
||||
|
||||
@@ -94,23 +92,13 @@ public:
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
};
|
||||
|
||||
class nsIEditor;
|
||||
|
||||
class nsHTMLTextFieldAccessible : public nsFormControlAccessible,
|
||||
public nsIAccessibleEditableText,
|
||||
public nsAccessibleText
|
||||
class nsHTMLTextFieldAccessible : public nsFormControlAccessible
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLEEDITABLETEXT
|
||||
|
||||
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccValue(nsAString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
|
||||
protected:
|
||||
NS_IMETHOD MakeSelection(PRInt32 aStartPos, PRInt32 aEndPos, nsIEditor **aEditor);
|
||||
};
|
||||
|
||||
class nsHTMLGroupboxAccessible : public nsAccessible
|
||||
|
||||
@@ -51,10 +51,25 @@ NS_INTERFACE_MAP_END_INHERITING(nsRootAccessible)
|
||||
NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
|
||||
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameRootAccessible, nsRootAccessible);
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(nsHTMLIFrameAccessible, nsBlockAccessible, nsIAccessibleDocument, nsIAccessibleHyperText)
|
||||
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), nsDocAccessibleMixin(aDoc), mRootAccessible(aRoot)
|
||||
nsBlockAccessible(aNode, aShell), mRootAccessible(aRoot), nsDocAccessibleMixin(aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -129,200 +144,6 @@ NS_IMETHODIMP nsHTMLIFrameAccessible::GetDocument(nsIDocument **doc)
|
||||
return nsDocAccessibleMixin::GetDocument(doc);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetCaretAccessible(nsIAccessibleCaret **aCaretAccessible)
|
||||
{
|
||||
// Caret only owned by top level window's document
|
||||
*aCaretAccessible = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// ------- nsIAccessibleHyperText ---------------
|
||||
/* readonly attribute long links; */
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetLinks(PRInt32 *aLinks)
|
||||
{
|
||||
*aLinks = GetLinksFromAccNode(this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* nsIAccessibleHyperLink getLink (in long index); */
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetLink(PRInt32 aIndex,
|
||||
nsIAccessibleHyperLink **_retval)
|
||||
{
|
||||
return GetLinkFromAccNode(aIndex, this, _retval);
|
||||
}
|
||||
|
||||
/* long getLinkIndex (in long charIndex); */
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetLinkIndex(PRInt32 aCharIndex,
|
||||
PRInt32 *_retval)
|
||||
{
|
||||
return GetLinkIndexFromAccNode(this, aCharIndex, _retval);
|
||||
}
|
||||
|
||||
//helper function for nsIAccessibleHyperText
|
||||
PRBool nsHTMLIFrameAccessible::IsHyperLink(nsIAccessible *aAccNode)
|
||||
{
|
||||
nsCOMPtr<nsIAccessibleHyperLink> hyperlink(do_QueryInterface(aAccNode));
|
||||
return hyperlink? PR_TRUE: PR_FALSE;
|
||||
}
|
||||
|
||||
PRInt32 nsHTMLIFrameAccessible::GetLinksFromAccNode(nsIAccessible *aAccNode)
|
||||
{
|
||||
PRInt32 rv = IsHyperLink(aAccNode) ? 1 : 0;
|
||||
|
||||
// Here, all the links of accChild should be summed up
|
||||
nsCOMPtr<nsIAccessible> childa;
|
||||
nsCOMPtr<nsIAccessible> child;
|
||||
|
||||
aAccNode->GetAccFirstChild(getter_AddRefs(child));
|
||||
while (child) {
|
||||
rv += GetLinksFromAccNode(child);
|
||||
child->GetAccNextSibling(getter_AddRefs(childa));
|
||||
child = childa;
|
||||
}
|
||||
//end for summing up accChildren's links
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsHTMLIFrameAccessible::GetLinkFromAccNode(PRInt32 aIndex,
|
||||
nsIAccessible *aAccNode,
|
||||
nsIAccessibleHyperLink **_retval)
|
||||
{
|
||||
PRInt32 links;
|
||||
|
||||
//firstly, to see whether beginning node is a hyperlink
|
||||
links = 0;
|
||||
if (aIndex < 0) {
|
||||
//of course, the aIndex is not right.
|
||||
*_retval = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
if (IsHyperLink(aAccNode)) {
|
||||
links = 1;
|
||||
if (0 == aIndex) {
|
||||
return CallQueryInterface(aAccNode, _retval);
|
||||
}
|
||||
}
|
||||
|
||||
//navigate all accChildren to getLink for the aIndex
|
||||
nsCOMPtr<nsIAccessible> child;
|
||||
nsCOMPtr<nsIAccessible> childa;
|
||||
|
||||
aIndex = aIndex - links;
|
||||
aAccNode->GetAccFirstChild(getter_AddRefs(child));
|
||||
while (child) {
|
||||
links = GetLinksFromAccNode(child);
|
||||
if (aIndex < links) {
|
||||
return GetLinkFromAccNode(aIndex, child, _retval);
|
||||
}
|
||||
aIndex -= links;
|
||||
child->GetAccNextSibling(getter_AddRefs(childa));
|
||||
child = childa;
|
||||
}
|
||||
//end of navigate accChild
|
||||
|
||||
*_retval = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
PRInt32 nsHTMLIFrameAccessible::GetAccNodeCharLength(nsIAccessible *aAccNode)
|
||||
{
|
||||
PRUint32 role;
|
||||
PRInt32 childCharLength;
|
||||
nsAutoString tempAccName;
|
||||
|
||||
PRInt32 rv = 0;
|
||||
role = ROLE_NOTHING;
|
||||
aAccNode->GetAccRole(&role);
|
||||
|
||||
//ROLE_TEXT
|
||||
if (ROLE_TEXT == role) {
|
||||
aAccNode->GetAccName(tempAccName);
|
||||
rv = tempAccName.Length();
|
||||
}
|
||||
|
||||
//sum up the number all accChildren's characters
|
||||
nsCOMPtr<nsIAccessible> childa;
|
||||
nsCOMPtr<nsIAccessible> child;
|
||||
|
||||
aAccNode->GetAccFirstChild(getter_AddRefs(child));
|
||||
while (child) {
|
||||
childCharLength = GetAccNodeCharLength(child);
|
||||
rv += childCharLength;
|
||||
child->GetAccNextSibling(getter_AddRefs(childa));
|
||||
child = childa;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
// *_retval is zero-based index, so -1 for no index.
|
||||
// be careful, charIndex is zero-index, but length is not.
|
||||
nsresult nsHTMLIFrameAccessible::GetLinkIndexFromAccNode(nsIAccessible *aAccNode,
|
||||
PRInt32 aCharIndex,
|
||||
PRInt32 *_retval)
|
||||
{
|
||||
nsresult rv;
|
||||
PRUint32 role;
|
||||
nsAutoString tempAccName;
|
||||
PRInt32 charLength;
|
||||
PRInt32 links;
|
||||
|
||||
*_retval = -1;
|
||||
links = 0;
|
||||
charLength = 0;
|
||||
role = ROLE_NOTHING;
|
||||
aAccNode->GetAccRole(&role);
|
||||
|
||||
// if the beginning node is hyperlink
|
||||
if (IsHyperLink(aAccNode)) {
|
||||
charLength = GetAccNodeCharLength(aAccNode);
|
||||
if (aCharIndex < charLength) {
|
||||
*_retval = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
*_retval = -1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//begin to count char length
|
||||
if (ROLE_TEXT == role) {
|
||||
aAccNode->GetAccName(tempAccName);
|
||||
charLength = tempAccName.Length();
|
||||
if (aCharIndex < charLength) {
|
||||
*_retval = -1;
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
if (IsHyperLink(aAccNode)) {
|
||||
links = 1;
|
||||
}
|
||||
//exam the beginning node end
|
||||
|
||||
//getLinkIndex from accChildren
|
||||
nsCOMPtr<nsIAccessible> childa;
|
||||
nsCOMPtr<nsIAccessible> child;
|
||||
PRInt32 childCharLength;
|
||||
PRInt32 childLinks;
|
||||
|
||||
aAccNode->GetAccFirstChild(getter_AddRefs(child));
|
||||
while (child) {
|
||||
childCharLength = GetAccNodeCharLength(child);
|
||||
if (aCharIndex < charLength + childCharLength) {
|
||||
rv = GetLinkIndexFromAccNode(child, aCharIndex - charLength, _retval);
|
||||
*_retval += links;
|
||||
return rv;
|
||||
}
|
||||
charLength += childCharLength;
|
||||
childLinks = GetLinksFromAccNode(child);
|
||||
links += childLinks;
|
||||
child->GetAccNextSibling(getter_AddRefs(childa));
|
||||
child = childa;
|
||||
}
|
||||
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
//=============================//
|
||||
// nsHTMLIFrameRootAccessible //
|
||||
//=============================//
|
||||
@@ -332,7 +153,7 @@ nsresult nsHTMLIFrameAccessible::GetLinkIndexFromAccNode(nsIAccessible *aAccNode
|
||||
// construction
|
||||
//-----------------------------------------------------
|
||||
nsHTMLIFrameRootAccessible::nsHTMLIFrameRootAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsRootAccessible(aShell), mOuterNode(aNode)
|
||||
mOuterNode(aNode), nsRootAccessible(aShell)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -345,51 +166,40 @@ nsHTMLIFrameRootAccessible::~nsHTMLIFrameRootAccessible()
|
||||
|
||||
void nsHTMLIFrameRootAccessible::Init()
|
||||
{
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
mOuterNode->GetOwnerDocument(getter_AddRefs(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIPresShell> parentShell;
|
||||
doc->GetShellAt(0, getter_AddRefs(parentShell));
|
||||
if (parentShell) {
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mOuterNode));
|
||||
nsIFrame* frame = nsnull;
|
||||
parentShell->GetPrimaryFrameFor(content, &frame);
|
||||
NS_ASSERTION(frame, "No outer frame.");
|
||||
if (!frame)
|
||||
return;
|
||||
frame->GetAccessible(getter_AddRefs(mOuterAccessible));
|
||||
NS_ASSERTION(mOuterAccessible, "Something's wrong - there's no accessible for the outer parent of this frame.");
|
||||
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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nsHTMLIFrameRootAccessible::Init(nsIAccessible *aOuterAccessible)
|
||||
{
|
||||
if (aOuterAccessible) {
|
||||
mOuterAccessible = aOuterAccessible;
|
||||
}
|
||||
}
|
||||
|
||||
/* readonly attribute nsIAccessible accParent; */
|
||||
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccParent(nsIAccessible **_retval)
|
||||
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccParent(nsIAccessible * *_retval)
|
||||
{
|
||||
if (!mOuterAccessible)
|
||||
Init();
|
||||
Init();
|
||||
return mOuterAccessible->GetAccParent(_retval);
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccNextSibling (); */
|
||||
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccNextSibling(nsIAccessible **_retval)
|
||||
{
|
||||
if (!mOuterAccessible)
|
||||
Init();
|
||||
Init();
|
||||
return mOuterAccessible->GetAccNextSibling(_retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameRootAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
|
||||
{
|
||||
if (!mOuterAccessible)
|
||||
Init();
|
||||
Init();
|
||||
return mOuterAccessible->GetAccPreviousSibling(_retval);
|
||||
}
|
||||
|
||||
@@ -43,19 +43,16 @@
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsAccessible.h"
|
||||
#include "nsIAccessibleDocument.h"
|
||||
#include "nsIAccessibleHyperText.h"
|
||||
|
||||
class nsIWebShell;
|
||||
class nsIWeakReference;
|
||||
|
||||
class nsHTMLIFrameAccessible : public nsBlockAccessible,
|
||||
public nsIAccessibleDocument,
|
||||
public nsIAccessibleHyperText,
|
||||
public nsDocAccessibleMixin
|
||||
{
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLEDOCUMENT
|
||||
NS_DECL_NSIACCESSIBLEHYPERTEXT
|
||||
|
||||
public:
|
||||
nsHTMLIFrameAccessible(nsIDOMNode* aNode, nsIAccessible* aRoot, nsIWeakReference* aShell, nsIDocument *doc);
|
||||
@@ -70,16 +67,6 @@ class nsHTMLIFrameAccessible : public nsBlockAccessible,
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIAccessible> mRootAccessible;
|
||||
|
||||
//helper function for nsIAccessibleHyperText
|
||||
PRBool IsHyperLink(nsIAccessible *aAccNode);
|
||||
PRInt32 GetLinksFromAccNode(nsIAccessible *aAccNode);
|
||||
nsresult GetLinkFromAccNode(PRInt32 aIndex, nsIAccessible *aAccNode,
|
||||
nsIAccessibleHyperLink **_retval);
|
||||
PRInt32 GetAccNodeCharLength(nsIAccessible *aAccNode);
|
||||
nsresult GetLinkIndexFromAccNode(nsIAccessible *aAccNode,
|
||||
PRInt32 aCharIndex, PRInt32 *_retval);
|
||||
|
||||
};
|
||||
|
||||
class nsHTMLIFrameRootAccessible : public nsRootAccessible
|
||||
@@ -102,9 +89,6 @@ class nsHTMLIFrameRootAccessible : public nsRootAccessible
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
public:
|
||||
void Init(nsIAccessible *aOuterAccessible);
|
||||
|
||||
// In these variable names, "outer" relates to the nsHTMLIFrameAccessible, as opposed to the
|
||||
// nsHTMLIFrameRootAccessible which is "inner".
|
||||
// The outer node is a <browser> or <iframe> tag, whereas the inner node corresponds to the inner document root.
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
#include "imgIRequest.h"
|
||||
#include "imgIContainer.h"
|
||||
#include "nsIImageFrame.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
||||
// --- image -----
|
||||
|
||||
@@ -149,13 +148,13 @@ nsIAccessible *nsHTMLImageAccessible::CreateAreaAccessible(PRUint32 areaNum)
|
||||
areaNum = NS_STATIC_CAST(PRUint32,numAreaMaps-1);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLCollection> mapAreas;
|
||||
mMapElement->GetAreas(getter_AddRefs(mapAreas));
|
||||
nsIDOMHTMLCollection *mapAreas;
|
||||
mMapElement->GetAreas(&mapAreas);
|
||||
if (!mapAreas)
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> domNode;
|
||||
mapAreas->Item(areaNum,getter_AddRefs(domNode));
|
||||
nsIDOMNode *domNode = nsnull;
|
||||
mapAreas->Item(areaNum,&domNode);
|
||||
if (!domNode)
|
||||
return nsnull;
|
||||
|
||||
@@ -204,73 +203,3 @@ NS_IMETHODIMP nsHTMLImageAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Image map hyperlink
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLImageMapAccessible, nsHTMLImageAccessible, nsIAccessibleHyperLink)
|
||||
|
||||
/* readonly attribute long anchors; */
|
||||
NS_IMETHODIMP nsHTMLImageMapAccessible::GetAnchors(PRInt32 *aAnchors)
|
||||
{
|
||||
return GetAccChildCount(aAnchors);
|
||||
}
|
||||
|
||||
/* readonly attribute long startIndex; */
|
||||
NS_IMETHODIMP nsHTMLImageMapAccessible::GetStartIndex(PRInt32 *aStartIndex)
|
||||
{
|
||||
//should not be supported in image map hyperlink
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* readonly attribute long endIndex; */
|
||||
NS_IMETHODIMP nsHTMLImageMapAccessible::GetEndIndex(PRInt32 *aEndIndex)
|
||||
{
|
||||
//should not be supported in image map hyperlink
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIURI getURI (in long i); */
|
||||
NS_IMETHODIMP nsHTMLImageMapAccessible::GetURI(PRInt32 aIndex, nsIURI **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLCollection> mapAreas;
|
||||
mMapElement->GetAreas(getter_AddRefs(mapAreas));
|
||||
if (!mapAreas)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> domNode;
|
||||
mapAreas->Item(aIndex,getter_AddRefs(domNode));
|
||||
if (!domNode)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
if (content) {
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
if (NS_SUCCEEDED(content->GetDocument(*getter_AddRefs(doc)))) {
|
||||
nsCOMPtr<nsIURI> baseURI;
|
||||
if (NS_SUCCEEDED(doc->GetBaseURL(*getter_AddRefs(baseURI)))) {
|
||||
nsCOMPtr<nsIDOMElement> area(do_QueryInterface(domNode));
|
||||
nsAutoString hrefValue;
|
||||
if (NS_SUCCEEDED(area->GetAttribute(NS_LITERAL_STRING("href"), hrefValue))) {
|
||||
return NS_NewURI(_retval, hrefValue, nsnull, baseURI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* nsIAccessible getObject (in long i); */
|
||||
NS_IMETHODIMP nsHTMLImageMapAccessible::GetObject(PRInt32 aIndex,
|
||||
nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = CreateAreaAccessible(aIndex);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* boolean isValid (); */
|
||||
NS_IMETHODIMP nsHTMLImageMapAccessible::IsValid(PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsIAccessibleHyperLink.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIImageFrame.h"
|
||||
#include "nsIDOMHTMLMapElement.h"
|
||||
@@ -69,19 +68,4 @@ protected:
|
||||
nsCOMPtr<nsIDOMHTMLMapElement> mMapElement;
|
||||
};
|
||||
|
||||
/* Accessible for support images with "use=#map".
|
||||
* only this kind of images will support nsIAccessibleHyperLink
|
||||
*/
|
||||
class nsHTMLImageMapAccessible : public nsHTMLImageAccessible,
|
||||
public nsIAccessibleHyperLink
|
||||
{
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLEHYPERLINK
|
||||
|
||||
public:
|
||||
nsHTMLImageMapAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell)
|
||||
: nsHTMLImageAccessible(aDomNode, aShell)
|
||||
{
|
||||
}//constructor end
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -45,13 +45,9 @@
|
||||
#include "nsISelection.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLLinkAccessible, nsLinkableAccessible, nsIAccessibleHyperLink)
|
||||
|
||||
nsHTMLLinkAccessible::nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
|
||||
nsLinkableAccessible(aDomNode, aShell)
|
||||
{
|
||||
@@ -81,63 +77,3 @@ NS_IMETHODIMP nsHTMLLinkAccessible::GetAccRole(PRUint32 *_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute long anchors; */
|
||||
NS_IMETHODIMP nsHTMLLinkAccessible::GetAnchors(PRInt32 *aAnchors)
|
||||
{
|
||||
if (!IsALink())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aAnchors = 1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute long startIndex; */
|
||||
NS_IMETHODIMP nsHTMLLinkAccessible::GetStartIndex(PRInt32 *aStartIndex)
|
||||
{
|
||||
//not see the value to implement this attributes
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* readonly attribute long endIndex; */
|
||||
NS_IMETHODIMP nsHTMLLinkAccessible::GetEndIndex(PRInt32 *aEndIndex)
|
||||
{
|
||||
//not see the value to implement this attributes
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIURI getURI (in long i); */
|
||||
NS_IMETHODIMP nsHTMLLinkAccessible::GetURI(PRInt32 i, nsIURI **_retval)
|
||||
{
|
||||
//I do not know why we have to retrun a nsIURI instead of
|
||||
//nsILink or just a string of url. Anyway, maybe nsIURI is
|
||||
//more powerful for the future.
|
||||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsILink> link(do_QueryInterface(mLinkContent));
|
||||
if (link) {
|
||||
nsXPIDLCString hrefValue;
|
||||
if (NS_SUCCEEDED(link->GetHrefCString(*getter_Copies(hrefValue)))) {
|
||||
return NS_NewURI(_retval, hrefValue, nsnull, nsnull);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* nsIAccessible getObject (in long i); */
|
||||
NS_IMETHODIMP nsHTMLLinkAccessible::GetObject(PRInt32 aIndex,
|
||||
nsIAccessible **_retval)
|
||||
{
|
||||
if (0 != aIndex)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return QueryInterface(NS_GET_IID(nsIAccessible), (void **)_retval);
|
||||
}
|
||||
|
||||
/* boolean isValid (); */
|
||||
NS_IMETHODIMP nsHTMLLinkAccessible::IsValid(PRBool *_retval)
|
||||
{
|
||||
// I have not found the cause which makes this attribute false.
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -42,13 +42,9 @@
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsIAccessibleHyperLink.h"
|
||||
|
||||
class nsHTMLLinkAccessible : public nsLinkableAccessible,
|
||||
public nsIAccessibleHyperLink
|
||||
class nsHTMLLinkAccessible : public nsLinkableAccessible
|
||||
{
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLEHYPERLINK
|
||||
|
||||
public:
|
||||
nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsHTMLPluginAccessible.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsObjectFrame.h"
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
|
||||
nsHTMLPluginAccessible::nsHTMLPluginAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsAccessible(aNode, aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1"))
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLPluginAccessible::GetAccFirstChild(nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
nsIFrame* frame = nsnull;
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mPresShell));
|
||||
shell->GetPrimaryFrameFor(content, &frame);
|
||||
if (!frame)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsObjectFrame* objectFrame = NS_STATIC_CAST(nsObjectFrame*, frame);
|
||||
#ifdef XP_WIN
|
||||
HWND pluginPort = nsnull;
|
||||
objectFrame->GetPluginPort(&pluginPort);
|
||||
if (pluginPort) {
|
||||
if (mAccService)
|
||||
mAccService->CreateHTMLNativeWindowAccessible(mDOMNode, mPresShell, (PRInt32)pluginPort, _retval);
|
||||
}
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif
|
||||
NS_IF_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLPluginAccessible::GetAccLastChild(nsIAccessible **_retval)
|
||||
{
|
||||
return GetAccFirstChild(_retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLPluginAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
*_retval = 1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLPluginAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_WINDOW;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsAccessible.h"
|
||||
|
||||
/**
|
||||
* This class is used to wrap the window for the plugin. It's only child
|
||||
* is a shim class that will allow the platform specific layer of our
|
||||
* accessibility support to get the IAccessible from the plugin itself
|
||||
* (via the windows call to get he accessible by window).
|
||||
*/
|
||||
class nsHTMLPluginAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLPluginAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIAccessibilityService> mAccService;
|
||||
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
* Contributor(s): Kyle Yuan (kyle.yuan@sun.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@@ -38,13 +38,10 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsHTMLSelectAccessible.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIComboboxControlFrame.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocumentEvent.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
@@ -53,11 +50,9 @@
|
||||
#include "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIDOMHTMLOListElement.h"
|
||||
#include "nsIListControlFrame.h"
|
||||
#include "nsIOptionElement.h"
|
||||
#include "nsISelectControlFrame.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsIDocument.h"
|
||||
|
||||
/**
|
||||
* Selects, Listboxes and Comboboxes, are made up of a number of different
|
||||
@@ -80,242 +75,6 @@
|
||||
* - nsHTMLSelectOptionAccessible
|
||||
*/
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** Impl. of nsHTMLSelectableAccessible */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
// Helper class
|
||||
nsHTMLSelectableAccessible::iterator::iterator(nsHTMLSelectableAccessible *aParent) : mParent(aParent)
|
||||
{
|
||||
mLength = mIndex = 0;
|
||||
mSelCount = 0;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLSelectElement> htmlSelect(do_QueryInterface(mParent->mDOMNode));
|
||||
if (htmlSelect) {
|
||||
htmlSelect->GetOptions(getter_AddRefs(mOptions));
|
||||
if (mOptions)
|
||||
mOptions->GetLength(&mLength);
|
||||
}
|
||||
}
|
||||
|
||||
PRBool nsHTMLSelectableAccessible::iterator::Advance()
|
||||
{
|
||||
if (mIndex < mLength) {
|
||||
nsCOMPtr<nsIDOMNode> tempNode;
|
||||
if (mOptions) {
|
||||
mOptions->Item(mIndex, getter_AddRefs(tempNode));
|
||||
mOption = do_QueryInterface(tempNode);
|
||||
}
|
||||
mIndex++;
|
||||
return PR_TRUE;
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
void nsHTMLSelectableAccessible::iterator::CalcSelectionCount(PRInt32 *aSelectionCount)
|
||||
{
|
||||
PRBool isSelected = PR_FALSE;
|
||||
|
||||
if (mOption)
|
||||
mOption->GetSelected(&isSelected);
|
||||
|
||||
if (isSelected)
|
||||
(*aSelectionCount)++;
|
||||
}
|
||||
|
||||
void nsHTMLSelectableAccessible::iterator::AddAccessibleIfSelected(nsIAccessibilityService *aAccService,
|
||||
nsISupportsArray *aSelectedAccessibles,
|
||||
nsIPresContext *aContext)
|
||||
{
|
||||
PRBool isSelected = PR_FALSE;
|
||||
nsCOMPtr<nsIAccessible> tempAccess;
|
||||
|
||||
if (mOption) {
|
||||
mOption->GetSelected(&isSelected);
|
||||
if (isSelected)
|
||||
aAccService->CreateHTMLSelectOptionAccessible(mOption, mParent, aContext, getter_AddRefs(tempAccess));
|
||||
}
|
||||
|
||||
if (tempAccess)
|
||||
aSelectedAccessibles->AppendElement(tempAccess);
|
||||
}
|
||||
|
||||
PRBool nsHTMLSelectableAccessible::iterator::GetAccessibleIfSelected(PRInt32 aIndex,
|
||||
nsIAccessibilityService *aAccService,
|
||||
nsIPresContext *aContext,
|
||||
nsIAccessible **_retval)
|
||||
{
|
||||
PRBool isSelected = PR_FALSE;
|
||||
nsCOMPtr<nsIAccessible> tempAccess;
|
||||
|
||||
*_retval = nsnull;
|
||||
|
||||
if (mOption) {
|
||||
mOption->GetSelected(&isSelected);
|
||||
if (isSelected) {
|
||||
if (mSelCount == aIndex) {
|
||||
aAccService->CreateHTMLSelectOptionAccessible(mOption, mParent, aContext, getter_AddRefs(tempAccess));
|
||||
*_retval = tempAccess;
|
||||
NS_IF_ADDREF(*_retval);
|
||||
return PR_TRUE;
|
||||
}
|
||||
mSelCount++;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
void nsHTMLSelectableAccessible::iterator::Select(PRBool aSelect)
|
||||
{
|
||||
if (mOption)
|
||||
mOption->SetSelected(aSelect);
|
||||
}
|
||||
|
||||
nsHTMLSelectableAccessible::nsHTMLSelectableAccessible(nsIDOMNode* aDOMNode,
|
||||
nsIWeakReference* aShell):
|
||||
nsAccessible(aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLSelectableAccessible, nsAccessible, nsIAccessibleSelectable)
|
||||
|
||||
// Helper methods
|
||||
NS_IMETHODIMP nsHTMLSelectableAccessible::ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState)
|
||||
{
|
||||
*aSelState = PR_FALSE;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLSelectElement> htmlSelect(do_QueryInterface(mDOMNode));
|
||||
if (!htmlSelect)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLCollection> options;
|
||||
htmlSelect->GetOptions(getter_AddRefs(options));
|
||||
if (!options)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> tempNode;
|
||||
options->Item(aIndex, getter_AddRefs(tempNode));
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> tempOption(do_QueryInterface(tempNode));
|
||||
if (!tempOption)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
tempOption->GetSelected(aSelState);
|
||||
if (eSelection_Add == aMethod && !(*aSelState))
|
||||
tempOption->SetSelected(PR_TRUE);
|
||||
else if (eSelection_Remove == aMethod && (*aSelState))
|
||||
tempOption->SetSelected(PR_FALSE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Interface methods
|
||||
NS_IMETHODIMP nsHTMLSelectableAccessible::GetSelectedChildren(nsISupportsArray **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
|
||||
if (!accService)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsISupportsArray> selectedAccessibles;
|
||||
NS_NewISupportsArray(getter_AddRefs(selectedAccessibles));
|
||||
if (!selectedAccessibles)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
GetPresContext(context);
|
||||
if (!context)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsHTMLSelectableAccessible::iterator iter(this);
|
||||
while (iter.Advance())
|
||||
iter.AddAccessibleIfSelected(accService, selectedAccessibles, context);
|
||||
|
||||
PRUint32 uLength = 0;
|
||||
selectedAccessibles->Count(&uLength);
|
||||
if (uLength != 0) { // length of nsISupportsArray containing selected options
|
||||
*_retval = selectedAccessibles;
|
||||
NS_ADDREF(*_retval);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// return the nth selected child's nsIAccessible object
|
||||
NS_IMETHODIMP nsHTMLSelectableAccessible::RefSelection(PRInt32 aIndex, nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
|
||||
if (!accService)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
GetPresContext(context);
|
||||
if (!context)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsHTMLSelectableAccessible::iterator iter(this);
|
||||
while (iter.Advance())
|
||||
if (iter.GetAccessibleIfSelected(aIndex, accService, context, _retval))
|
||||
return NS_OK;
|
||||
|
||||
// No matched item found
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectableAccessible::GetSelectionCount(PRInt32 *aSelectionCount)
|
||||
{
|
||||
*aSelectionCount = 0;
|
||||
|
||||
nsHTMLSelectableAccessible::iterator iter(this);
|
||||
while (iter.Advance())
|
||||
iter.CalcSelectionCount(aSelectionCount);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectableAccessible::AddSelection(PRInt32 aIndex)
|
||||
{
|
||||
PRBool isSelected;
|
||||
return ChangeSelection(aIndex, eSelection_Add, &isSelected);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectableAccessible::RemoveSelection(PRInt32 aIndex)
|
||||
{
|
||||
PRBool isSelected;
|
||||
return ChangeSelection(aIndex, eSelection_Remove, &isSelected);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectableAccessible::IsChildSelected(PRInt32 aIndex, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_FALSE;
|
||||
return ChangeSelection(aIndex, eSelection_GetState, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectableAccessible::ClearSelection()
|
||||
{
|
||||
nsHTMLSelectableAccessible::iterator iter(this);
|
||||
while (iter.Advance())
|
||||
iter.Select(PR_FALSE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectableAccessible::SelectAllSelection(PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_FALSE;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLSelectElement> htmlSelect(do_QueryInterface(mDOMNode));
|
||||
if (!htmlSelect)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
htmlSelect->GetMultiple(_retval);
|
||||
if (*_retval) {
|
||||
nsHTMLSelectableAccessible::iterator iter(this);
|
||||
while (iter.Advance())
|
||||
iter.Select(PR_TRUE);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** First, the common widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
@@ -548,81 +307,6 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccState(PRUint32 *_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** select us! close combo box if necessary*/
|
||||
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
|
||||
{
|
||||
if (index == eAction_Select) {
|
||||
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("select"), _retval);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNumActions(PRUint8 *_retval)
|
||||
{
|
||||
*_retval = eSingle_Action;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectOptionAccessible::AccDoAction(PRUint8 index)
|
||||
{
|
||||
if (index == eAction_Select) { // default action
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> newHTMLOption(do_QueryInterface(mDOMNode));
|
||||
if (!newHTMLOption)
|
||||
return NS_ERROR_FAILURE;
|
||||
// Clear old selection
|
||||
nsCOMPtr<nsIDOMNode> oldHTMLOptionNode, selectNode;
|
||||
mParent->AccGetDOMNode(getter_AddRefs(selectNode));
|
||||
nsHTMLSelectOptionAccessible::GetFocusedOptionNode(selectNode, oldHTMLOptionNode);
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> oldHTMLOption(do_QueryInterface(oldHTMLOptionNode));
|
||||
if (oldHTMLOption)
|
||||
oldHTMLOption->SetSelected(PR_FALSE);
|
||||
// Set new selection
|
||||
newHTMLOption->SetSelected(PR_TRUE);
|
||||
|
||||
// If combo box, and open, close it
|
||||
// First, get the <select> widgets list control frame
|
||||
nsCOMPtr<nsIDOMNode> testSelectNode;
|
||||
nsCOMPtr<nsIDOMNode> thisNode(do_QueryInterface(mDOMNode));
|
||||
do {
|
||||
thisNode->GetParentNode(getter_AddRefs(testSelectNode));
|
||||
nsCOMPtr<nsIDOMHTMLSelectElement> selectControl(do_QueryInterface(testSelectNode));
|
||||
if (selectControl)
|
||||
break;
|
||||
thisNode = testSelectNode;
|
||||
} while (testSelectNode);
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mPresShell));
|
||||
nsCOMPtr<nsIContent> selectContent(do_QueryInterface(testSelectNode));
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> option(do_QueryInterface(mDOMNode));
|
||||
|
||||
if (!testSelectNode || !selectContent || !presShell || !option)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsIFrame *selectFrame = nsnull;
|
||||
presShell->GetPrimaryFrameFor(selectContent, &selectFrame);
|
||||
nsCOMPtr<nsIComboboxControlFrame> comboBoxFrame(do_QueryInterface(selectFrame));
|
||||
if (comboBoxFrame) {
|
||||
nsIFrame *listFrame = nsnull;
|
||||
comboBoxFrame->GetDropDown(&listFrame);
|
||||
PRBool isDroppedDown;
|
||||
comboBoxFrame->IsDroppedDown(&isDroppedDown);
|
||||
if (isDroppedDown && listFrame) {
|
||||
// use this list control frame to roll up the list
|
||||
nsCOMPtr<nsIListControlFrame> listControlFrame(do_QueryInterface(listFrame));
|
||||
if (listControlFrame) {
|
||||
PRInt32 newIndex = 0;
|
||||
option->GetIndex(&newIndex);
|
||||
listControlFrame->ComboboxFinish(newIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -699,21 +383,6 @@ NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetAccState(PRUint32 *_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::AccDoAction(PRUint8 index)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetAccNumActions(PRUint8 *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** Secondly, the Listbox widget */
|
||||
/** ------------------------------------------------------ */
|
||||
@@ -722,41 +391,12 @@ NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetAccNumActions(PRUint8 *_retval)
|
||||
|
||||
/** Constructor */
|
||||
nsHTMLListboxAccessible::nsHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
nsHTMLSelectableAccessible(aDOMNode, aShell)
|
||||
nsListboxAccessible(aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/** We are a window, as far as MSAA is concerned */
|
||||
NS_IMETHODIMP nsHTMLListboxAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_WINDOW;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* We always have 1 child: a subclass of nsSelectListAccessible.
|
||||
*/
|
||||
NS_IMETHODIMP nsHTMLListboxAccessible::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 nsHTMLListboxAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// Get focus status from base class
|
||||
nsAccessible::GetAccState(_retval);
|
||||
|
||||
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
/** 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
|
||||
@@ -796,59 +436,79 @@ NS_IMETHODIMP nsHTMLListboxAccessible::GetAccValue(nsAString& _retval)
|
||||
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):
|
||||
nsHTMLSelectableAccessible(aDOMNode, aShell)
|
||||
nsComboboxAccessible(aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/** We are a combobox */
|
||||
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_COMBOBOX;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* We always have 3 children: TextField, Button, Window. In that order
|
||||
*/
|
||||
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
*_retval = 3;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* As a nsComboboxAccessible we can have the following states:
|
||||
* STATE_FOCUSED
|
||||
* STATE_READONLY
|
||||
* STATE_FOCUSABLE
|
||||
* STATE_HASPOPUP
|
||||
* STATE_EXPANDED
|
||||
* STATE_COLLAPSED
|
||||
*/
|
||||
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// Get focus status from base class
|
||||
nsAccessible::GetAccState(_retval);
|
||||
|
||||
// we are open or closed
|
||||
PRBool isOpen = PR_FALSE;
|
||||
nsCOMPtr<nsIComboboxControlFrame> comboFrame(do_QueryInterface(GetBoundsFrame()));
|
||||
if (comboFrame)
|
||||
comboFrame->IsDroppedDown(&isOpen);
|
||||
|
||||
*_retval |= isOpen ? STATE_EXPANDED : STATE_COLLAPSED;
|
||||
*_retval |= STATE_HASPOPUP | STATE_READONLY | STATE_FOCUSABLE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Our last child is an nsHTMLComboboxWindowAccessible object
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
* Contributor(s): Kyle Yuan (kyle.yuan@sun.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@@ -41,15 +41,14 @@
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIAccessibleSelectable.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIDOMHTMLOptionElement.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIWeakReference.h"
|
||||
#include "nsSelectAccessible.h"
|
||||
|
||||
/**
|
||||
* Selects, Listboxes and Comboboxes, are made up of a number of different
|
||||
* widgets, some of which are shared between the two. This file contains * all of the widgets for both of the Selects, for HTML only. Some of them
|
||||
* 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.
|
||||
*
|
||||
@@ -71,48 +70,6 @@
|
||||
/** First, the common widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* The basic implemetation of nsIAccessibleSelectable.
|
||||
*/
|
||||
class nsHTMLSelectableAccessible : public nsAccessible,
|
||||
public nsIAccessibleSelectable
|
||||
{
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLESELECTABLE
|
||||
|
||||
nsHTMLSelectableAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsHTMLSelectableAccessible() {}
|
||||
|
||||
protected:
|
||||
|
||||
NS_IMETHOD ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState);
|
||||
|
||||
class iterator
|
||||
{
|
||||
protected:
|
||||
PRUint32 mLength;
|
||||
PRUint32 mIndex;
|
||||
PRInt32 mSelCount;
|
||||
nsHTMLSelectableAccessible *mParent;
|
||||
nsCOMPtr<nsIDOMHTMLCollection> mOptions;
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> mOption;
|
||||
|
||||
public:
|
||||
iterator(nsHTMLSelectableAccessible *aParent);
|
||||
|
||||
void CalcSelectionCount(PRInt32 *aSelectionCount);
|
||||
void Select(PRBool aSelect);
|
||||
void AddAccessibleIfSelected(nsIAccessibilityService *aAccService, nsISupportsArray *aSelectedAccessibles, nsIPresContext *aContext);
|
||||
PRBool GetAccessibleIfSelected(PRInt32 aIndex, nsIAccessibilityService *aAccService, nsIPresContext *aContext, nsIAccessible **_retval);
|
||||
|
||||
PRBool Advance();
|
||||
};
|
||||
|
||||
friend class iterator;
|
||||
};
|
||||
|
||||
/*
|
||||
* The list that contains all the options in the select.
|
||||
*/
|
||||
@@ -141,12 +98,10 @@ public:
|
||||
virtual ~nsHTMLSelectOptionAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
|
||||
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
|
||||
|
||||
static nsresult GetFocusedOptionNode(nsIDOMNode *aListNode, nsCOMPtr<nsIDOMNode>& aFocusedOptionNode);
|
||||
|
||||
};
|
||||
@@ -163,9 +118,6 @@ public:
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
|
||||
};
|
||||
|
||||
@@ -176,18 +128,18 @@ public:
|
||||
/*
|
||||
* A class the represents the HTML Listbox widget.
|
||||
*/
|
||||
class nsHTMLListboxAccessible : public nsHTMLSelectableAccessible
|
||||
class nsHTMLListboxAccessible : public nsListboxAccessible,
|
||||
public nsIAccessibleSelectable
|
||||
{
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLESELECTABLE
|
||||
|
||||
nsHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsHTMLListboxAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccValue(nsAString& _retval);
|
||||
@@ -201,7 +153,7 @@ public:
|
||||
/*
|
||||
* A class the represents the HTML Combobox widget.
|
||||
*/
|
||||
class nsHTMLComboboxAccessible : public nsHTMLSelectableAccessible
|
||||
class nsHTMLComboboxAccessible : public nsComboboxAccessible
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -209,10 +161,6 @@ public:
|
||||
virtual ~nsHTMLComboboxAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccValue(nsAString& _retval);
|
||||
@@ -250,6 +198,7 @@ public:
|
||||
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "nsHTMLTableAccessible.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
nsHTMLTableCellAccessible::nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
|
||||
nsBlockAccessible(aDomNode, aShell)
|
||||
@@ -60,36 +61,6 @@ NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccState(PRUint32 *aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsHTMLTableCaptionAccessible::nsHTMLTableCaptionAccessible
|
||||
(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
|
||||
nsAccessible(aDomNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableCaptionAccessible::GetAccState(PRUint32 *aResult)
|
||||
{
|
||||
nsAccessible::GetAccState(aResult);
|
||||
*aResult &= ~STATE_FOCUSABLE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableCaptionAccessible::GetAccValue(nsAString& aResult)
|
||||
{
|
||||
aResult.Assign(NS_LITERAL_STRING("")); // Default name is blank
|
||||
|
||||
nsCOMPtr<nsIContent> captionContent(do_QueryInterface(mDOMNode));
|
||||
AppendFlatStringFromSubtree(captionContent, &aResult);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(nsHTMLTableAccessible,
|
||||
nsBlockAccessible,
|
||||
nsIAccessible,
|
||||
nsIAccessibleTable)
|
||||
|
||||
nsHTMLTableAccessible::nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell):
|
||||
nsBlockAccessible(aDomNode, aShell)
|
||||
{
|
||||
@@ -128,519 +99,3 @@ NS_IMETHODIMP nsHTMLTableAccessible::GetAccName(nsAString& aResult)
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* Implementation of nsIAccessibleTable */
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetCaption(nsIAccessible **aCaption)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
|
||||
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableCaptionElement> caption;
|
||||
rv = table->GetCaption(getter_AddRefs(caption));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDOMNode> captionNode(do_QueryInterface(caption));
|
||||
NS_ENSURE_TRUE(captionNode, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService>
|
||||
accService(do_GetService("@mozilla.org/accessibilityService;1"));
|
||||
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
||||
|
||||
return accService->CreateHTMLTableCaptionAccessible(captionNode, aCaption);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::SetCaption(nsIAccessible *aCaption)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
|
||||
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIDOMNode> domNode;
|
||||
rv = aCaption->AccGetDOMNode(getter_AddRefs(domNode));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDOMNode> newDOMNode;
|
||||
rv = domNode->CloneNode(PR_TRUE, getter_AddRefs(newDOMNode));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableCaptionElement>
|
||||
captionElement(do_QueryInterface(newDOMNode));
|
||||
NS_ENSURE_TRUE(captionElement, NS_ERROR_FAILURE);
|
||||
|
||||
return table->SetCaption(captionElement);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetSummary(nsAString &aSummary)
|
||||
{
|
||||
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
|
||||
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
|
||||
|
||||
return table->GetSummary(aSummary);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::SetSummary(const nsAString &aSummary)
|
||||
{
|
||||
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
|
||||
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
|
||||
|
||||
return table->SetSummary(aSummary);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetColumns(PRInt32 *aColumns)
|
||||
{
|
||||
nsITableLayout *tableLayout = nsnull;
|
||||
nsresult rv = GetTableLayout(&tableLayout);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 rows;
|
||||
return tableLayout->GetTableSize(rows, *aColumns);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetColumnHeader(nsIAccessibleTable **aColumnHeader)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
|
||||
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableSectionElement> section;
|
||||
rv = table->GetTHead(getter_AddRefs(section));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService>
|
||||
accService(do_GetService("@mozilla.org/accessibilityService;1"));
|
||||
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIAccessible> accHead;
|
||||
rv = accService->CreateHTMLTableHeadAccessible(section,
|
||||
getter_AddRefs(accHead));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> accTableHead(do_QueryInterface(accHead));
|
||||
NS_ENSURE_TRUE(accTableHead, NS_ERROR_FAILURE);
|
||||
|
||||
*aColumnHeader = accTableHead;
|
||||
NS_IF_ADDREF(*aColumnHeader);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetRows(PRInt32 *aRows)
|
||||
{
|
||||
nsITableLayout *tableLayout = nsnull;
|
||||
nsresult rv = GetTableLayout(&tableLayout);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 columns;
|
||||
return tableLayout->GetTableSize(*aRows, columns);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetRowHeader(nsIAccessibleTable **aRowHeader)
|
||||
{
|
||||
// Can not implement because there is no row header in html table
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetSelectedColumns(PRUint32 *aNumColumns,
|
||||
PRInt32 **aColumns)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRInt32 columnCount;
|
||||
rv = GetColumns(&columnCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool *states = new PRBool[columnCount];
|
||||
NS_ENSURE_TRUE(states, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
*aNumColumns = 0;
|
||||
PRInt32 index;
|
||||
for (index = 0; index < columnCount; index++) {
|
||||
rv = IsColumnSelected(index, &states[index]);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (states[index]) {
|
||||
(*aNumColumns)++;
|
||||
}
|
||||
}
|
||||
|
||||
PRInt32 *outArray = (PRInt32 *)nsMemory::Alloc((*aNumColumns) * sizeof(PRInt32));
|
||||
if (!outArray) {
|
||||
delete []states;
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
PRInt32 curr = 0;
|
||||
for (index = 0; index < columnCount; index++) {
|
||||
if (states[index]) {
|
||||
outArray[curr++] = index;
|
||||
}
|
||||
}
|
||||
|
||||
delete []states;
|
||||
*aColumns = outArray;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetSelectedRows(PRUint32 *aNumRows, PRInt32 **aRows)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRInt32 rowCount;
|
||||
rv = GetRows(&rowCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool *states = new PRBool[rowCount];
|
||||
NS_ENSURE_TRUE(states, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
*aNumRows = 0;
|
||||
PRInt32 index;
|
||||
for (index = 0; index < rowCount; index++) {
|
||||
rv = IsRowSelected(index, &states[index]);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (states[index]) {
|
||||
(*aNumRows)++;
|
||||
}
|
||||
}
|
||||
|
||||
PRInt32 *outArray = (PRInt32 *)nsMemory::Alloc((*aNumRows) * sizeof(PRInt32));
|
||||
if (!outArray) {
|
||||
delete []states;
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
PRInt32 curr = 0;
|
||||
for (index = 0; index < rowCount; index++) {
|
||||
if (states[index]) {
|
||||
outArray[curr++] = index;
|
||||
}
|
||||
}
|
||||
|
||||
delete []states;
|
||||
*aRows = outArray;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::CellRefAt(PRInt32 aRow, PRInt32 aColumn,
|
||||
nsIAccessible **_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMElement> cellElement;
|
||||
rv = GetCellAt(aRow, aColumn, *getter_AddRefs(cellElement));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService>
|
||||
accService(do_GetService("@mozilla.org/accessibilityService;1"));
|
||||
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
||||
|
||||
return accService->GetAccessibleFor(cellElement, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetIndexAt(PRInt32 aRow, PRInt32 aColumn,
|
||||
PRInt32 *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRInt32 columns;
|
||||
rv = GetColumns(&columns);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*_retval = aRow * columns + aColumn;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetColumnAtIndex(PRInt32 aIndex, PRInt32 *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRInt32 columns;
|
||||
rv = GetColumns(&columns);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*_retval = aIndex % columns;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetRowAtIndex(PRInt32 aIndex, PRInt32 *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRInt32 columns;
|
||||
rv = GetColumns(&columns);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*_retval = aIndex / columns;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetColumnExtentAt(PRInt32 aRow, PRInt32 aColumn,
|
||||
PRInt32 *_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMElement> domElement;
|
||||
rv = GetCellAt(aRow, aColumn, *getter_AddRefs(domElement));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableCellElement> cell(do_QueryInterface(domElement));
|
||||
NS_ENSURE_TRUE(cell, NS_ERROR_FAILURE);
|
||||
|
||||
return cell->GetColSpan(_retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetRowExtentAt(PRInt32 aRow, PRInt32 aColumn,
|
||||
PRInt32 *_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMElement> domElement;
|
||||
rv = GetCellAt(aRow, aColumn, *getter_AddRefs(domElement));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableCellElement> cell(do_QueryInterface(domElement));
|
||||
NS_ENSURE_TRUE(cell, NS_ERROR_FAILURE);
|
||||
|
||||
return cell->GetRowSpan(_retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetColumnDescription(PRInt32 aColumn, nsAString &_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetRowDescription(PRInt32 aRow, nsAString &_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRInt32 rows;
|
||||
rv = GetRows(&rows);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
for (PRInt32 index = 0; index < rows; index++) {
|
||||
rv = IsCellSelected(index, aColumn, _retval);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (!*_retval) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::IsRowSelected(PRInt32 aRow, PRBool *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRInt32 columns;
|
||||
rv = GetColumns(&columns);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
for (PRInt32 index = 0; index < columns; index++) {
|
||||
rv = IsCellSelected(aRow, index, _retval);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (!*_retval) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::IsCellSelected(PRInt32 aRow, PRInt32 aColumn,
|
||||
PRBool *_retval)
|
||||
{
|
||||
nsITableLayout *tableLayout = nsnull;
|
||||
nsresult rv = GetTableLayout(&tableLayout);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDOMElement> domElement;
|
||||
PRInt32 startRowIndex = 0, startColIndex = 0,
|
||||
rowSpan, colSpan, actualRowSpan, actualColSpan;
|
||||
|
||||
return tableLayout->GetCellDataAt(aRow, aColumn,
|
||||
*getter_AddRefs(domElement),
|
||||
startRowIndex, startColIndex, rowSpan,
|
||||
colSpan, actualRowSpan, actualColSpan,
|
||||
*_retval);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLTableAccessible::GetTableNode(nsIDOMNode **_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mDOMNode));
|
||||
if (table) {
|
||||
*_retval = table;
|
||||
NS_IF_ADDREF(*_retval);
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableSectionElement> section(do_QueryInterface(mDOMNode));
|
||||
if (section) {
|
||||
nsCOMPtr<nsIDOMNode> parent;
|
||||
rv = section->GetParentNode(getter_AddRefs(parent));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*_retval = parent;
|
||||
NS_IF_ADDREF(*_retval);
|
||||
return rv;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLTableAccessible::GetTableLayout(nsITableLayout **aLayoutObject)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> tableNode;
|
||||
rv = GetTableNode(getter_AddRefs(tableNode));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(tableNode));
|
||||
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIDocument> document;
|
||||
rv = content->GetDocument(*getter_AddRefs(document));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
rv = document->GetShellAt(0, getter_AddRefs(presShell));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsISupports *layoutObject = nsnull;
|
||||
rv = presShell->GetLayoutObjectFor(content, &layoutObject);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*aLayoutObject = nsnull;
|
||||
return layoutObject->QueryInterface(NS_GET_IID(nsITableLayout),
|
||||
(void **)aLayoutObject);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLTableAccessible::GetCellAt(PRInt32 aRowIndex,
|
||||
PRInt32 aColIndex,
|
||||
nsIDOMElement* &aCell)
|
||||
{
|
||||
PRInt32 startRowIndex = 0, startColIndex = 0,
|
||||
rowSpan, colSpan, actualRowSpan, actualColSpan;
|
||||
PRBool isSelected;
|
||||
|
||||
nsITableLayout *tableLayout = nsnull;
|
||||
nsresult rv = GetTableLayout(&tableLayout);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return tableLayout->GetCellDataAt(aRowIndex, aColIndex, aCell,
|
||||
startRowIndex, startColIndex,
|
||||
rowSpan, colSpan,
|
||||
actualRowSpan, actualColSpan,
|
||||
isSelected);
|
||||
}
|
||||
|
||||
//Class nsHTMLTableHeadAccessible
|
||||
nsHTMLTableHeadAccessible::nsHTMLTableHeadAccessible(nsIDOMNode *aDomNode,
|
||||
nsIWeakReference *aShell):
|
||||
nsHTMLTableAccessible(aDomNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableHeadAccessible::GetAccRole(PRUint32 *aResult)
|
||||
{
|
||||
*aResult = ROLE_COLUMNHEADER;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableHeadAccessible::GetCaption(nsIAccessible **aCaption)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableHeadAccessible::SetCaption(nsIAccessible *aCaption)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableHeadAccessible::GetSummary(nsAString &aSummary)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableHeadAccessible::SetSummary(const nsAString &aSummary)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableHeadAccessible::GetColumnHeader(nsIAccessibleTable **aColumnHeader)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableHeadAccessible::GetRows(PRInt32 *aRows)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLTableSectionElement> head(do_QueryInterface(mDOMNode));
|
||||
NS_ENSURE_TRUE(head, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLCollection> rows;
|
||||
rv = head->GetRows(getter_AddRefs(rows));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return rows->GetLength((PRUint32 *)aRows);
|
||||
}
|
||||
|
||||
/* End of Implementation of nsIAccessibleTable */
|
||||
|
||||
@@ -42,17 +42,6 @@
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsIAccessibleTable.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMHTMLTableElement.h"
|
||||
#include "nsIDOMHTMLTableCaptionElem.h"
|
||||
#include "nsIDOMHTMLTableRowElement.h"
|
||||
#include "nsIDOMHTMLTableCellElement.h"
|
||||
#include "nsIDOMHTMLTableSectionElem.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsITableLayout.h"
|
||||
|
||||
class nsHTMLTableCellAccessible : public nsBlockAccessible
|
||||
{
|
||||
@@ -62,53 +51,14 @@ public:
|
||||
NS_IMETHOD GetAccState(PRUint32 *aResult);
|
||||
};
|
||||
|
||||
class nsHTMLTableCaptionAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLTableCaptionAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccState(PRUint32 *aResult);
|
||||
NS_IMETHOD GetAccValue(nsAString& aResult);
|
||||
};
|
||||
|
||||
class nsHTMLTableAccessible : public nsBlockAccessible,
|
||||
public nsIAccessibleTable
|
||||
class nsHTMLTableAccessible : public nsBlockAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
|
||||
/* nsIAccessible */
|
||||
NS_IMETHOD GetAccRole(PRUint32 *aResult);
|
||||
NS_IMETHOD GetAccState(PRUint32 *aResult);
|
||||
NS_IMETHOD GetAccName(nsAString& aResult);
|
||||
|
||||
/* nsIAccessibleTable */
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIACCESSIBLETABLE
|
||||
|
||||
protected:
|
||||
|
||||
nsresult GetTableNode(nsIDOMNode **_retval);
|
||||
nsresult GetTableLayout(nsITableLayout **aLayoutObject);
|
||||
nsresult GetCellAt(PRInt32 aRowIndex,
|
||||
PRInt32 aColIndex,
|
||||
nsIDOMElement* &aCell);
|
||||
};
|
||||
|
||||
class nsHTMLTableHeadAccessible : public nsHTMLTableAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLTableHeadAccessible(nsIDOMNode *aDomNode, nsIWeakReference *aShell);
|
||||
|
||||
/* nsIAccessible */
|
||||
NS_IMETHOD GetAccRole(PRUint32 *aResult);
|
||||
|
||||
/* nsIAccessibleTable */
|
||||
NS_IMETHOD GetCaption(nsIAccessible **aCaption);
|
||||
NS_IMETHOD SetCaption(nsIAccessible *aCaption);
|
||||
NS_IMETHOD GetSummary(nsAString &aSummary);
|
||||
NS_IMETHOD SetSummary(const nsAString &aSummary);
|
||||
NS_IMETHOD GetColumnHeader(nsIAccessibleTable **aColumnHeader);
|
||||
NS_IMETHOD GetRows(PRInt32 *aRows);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#ifndef _nsHTMLTextAccessible_H_
|
||||
#define _nsHTMLTextAccessible_H_
|
||||
|
||||
#include "nsTextAccessible.h"
|
||||
#include "nsFormControlAccessible.h"
|
||||
|
||||
class nsIWeakReference;
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com) (original author)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsHTMLWin32ObjectAccessible.h"
|
||||
#include "nsAccessible.h"
|
||||
|
||||
nsHTMLWin32ObjectAccessible::nsHTMLWin32ObjectAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell, PRInt32 aHwnd):
|
||||
nsAccessible(aNode, aShell)
|
||||
{
|
||||
if (aHwnd) {
|
||||
// XXX - when we get accessible plugins we may have to check here
|
||||
// for the proper window handle using Win32 APIs so we check
|
||||
// the proper IAccessible for the information we need.
|
||||
mHwnd = aHwnd;
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLWin32ObjectAccessible, nsAccessible, nsIAccessibleWin32Object)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLWin32ObjectAccessible::GetHwnd(PRInt32 *aHwnd) {
|
||||
*aHwnd = mHwnd;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* John Gaunt (jgaunt@netscape.com) (original author)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _nsHTMLWin32ObjectAccessible_H_
|
||||
#define _nsHTMLWin32ObjectAccessible_H_
|
||||
|
||||
#include "nsIAccessibleWin32Object.h"
|
||||
#include "nsAccessible.h"
|
||||
|
||||
struct IAccessible;
|
||||
|
||||
/**
|
||||
* This class is used only internally, we never! send out an IAccessible linked
|
||||
* back to this object. This class is used to represent a plugin object when
|
||||
* referenced as a child or sibling of another nsAccessible node. We need only
|
||||
* a limited portion of the nsIAccessible interface implemented here. The
|
||||
* in depth accessible information will be returned by the actual IAccessible
|
||||
* object returned by us in Accessible::NewAccessible() that gets the IAccessible
|
||||
* from the windows system from the window handle.
|
||||
*/
|
||||
class nsHTMLWin32ObjectAccessible : public nsAccessible,
|
||||
public nsIAccessibleWin32Object
|
||||
{
|
||||
public:
|
||||
|
||||
nsHTMLWin32ObjectAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell, PRInt32 aHwnd);
|
||||
virtual ~nsHTMLWin32ObjectAccessible() {}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// ---- nsIAccessibleWin32Object ----
|
||||
NS_IMETHOD GetHwnd(PRInt32 *aHwnd);
|
||||
|
||||
protected:
|
||||
// ---- Data Members ----
|
||||
/**
|
||||
* A handle to the native plugin window (hopefully), given to
|
||||
* Accessible::NewAccessible() so the actual IAccessible can be retrieved.
|
||||
*/
|
||||
PRInt32 mHwnd;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -29,24 +29,25 @@ include $(DEPTH)/config/autoconf.mk
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_xul_s
|
||||
REQUIRES = \
|
||||
appshell \
|
||||
content \
|
||||
content_xul \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
imglib2 \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
pref \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webbrwsr \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
webbrwsr \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
@@ -56,7 +57,6 @@ CPPSRCS = \
|
||||
nsXULSelectAccessible.cpp \
|
||||
nsXULTabAccessible.cpp \
|
||||
nsXULTextAccessible.cpp \
|
||||
nsXULTreeAccessible.cpp \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
@@ -67,7 +67,4 @@ include $(topsrcdir)/config/rules.mk
|
||||
LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../base \
|
||||
-I$(srcdir)/../html \
|
||||
-I$(srcdir)/../../../layout/html/base/src \
|
||||
-I$(srcdir)/../../../layout/html/forms/src \
|
||||
-I$(srcdir)/../../../layout/html/forms/public \
|
||||
$(NULL)
|
||||
|
||||
@@ -23,21 +23,12 @@ DEPTH = ..\..\..
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_xul_s
|
||||
REQUIRES = \
|
||||
appshell \
|
||||
content \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
intl \
|
||||
layout \
|
||||
layout_xul \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
pref \
|
||||
string \
|
||||
webBrowser_core \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
@@ -49,7 +40,6 @@ CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsXULSelectAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULTabAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULTextAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULTreeAccessible.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
@@ -61,9 +51,9 @@ LINCS = \
|
||||
-I..\..\..\layout\html\forms\public \
|
||||
-I..\..\..\layout\html\forms\src \
|
||||
-I..\..\..\layout\html\base\src \
|
||||
-I..\..\..\widget\src\windows \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
libs:: $(LIBRARY)
|
||||
|
||||
@@ -128,9 +128,3 @@ NS_IMETHODIMP nsXULColorPickerAccessible::GetAccState(PRUint32 *_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULColorPickerAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_BUTTONDROPDOWNGRID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ class nsXULColorPickerAccessible : public nsXULColorPickerTileAccessible
|
||||
public:
|
||||
nsXULColorPickerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMXULButtonElement.h"
|
||||
#include "nsIDOMXULCheckboxElement.h"
|
||||
#include "nsIDOMXULDescriptionElement.h"
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIDOMXULLabelElement.h"
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
@@ -63,7 +64,7 @@
|
||||
|
||||
// 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)
|
||||
nsAccessible(aNode, aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -102,7 +103,7 @@ NS_IMETHODIMP nsXULButtonAccessible::AccDoAction(PRUint8 index)
|
||||
nsCOMPtr<nsIDOMXULButtonElement> buttonElement(do_QueryInterface(mDOMNode));
|
||||
if ( buttonElement )
|
||||
{
|
||||
buttonElement->Click();
|
||||
buttonElement->DoCommand();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
@@ -354,7 +355,8 @@ NS_IMETHODIMP nsXULCheckboxAccessible::AccDoAction(PRUint8 index)
|
||||
PRBool checked = PR_FALSE;
|
||||
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
|
||||
if (xulCheckboxElement) {
|
||||
xulCheckboxElement->Click();
|
||||
xulCheckboxElement->GetChecked(&checked);
|
||||
xulCheckboxElement->SetChecked(!checked);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
@@ -434,10 +436,9 @@ NS_IMETHODIMP nsXULGroupboxAccessible::GetAccName(nsAString& _retval)
|
||||
/**
|
||||
* progressmeter
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXULProgressMeterAccessible, nsFormControlAccessible, nsIAccessibleValue)
|
||||
|
||||
nsXULProgressMeterAccessible::nsXULProgressMeterAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsFormControlAccessible(aNode, aShell)
|
||||
nsAccessible(aNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -461,60 +462,10 @@ NS_IMETHODIMP nsXULProgressMeterAccessible::GetAccValue(nsAString& _retval)
|
||||
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
|
||||
NS_ASSERTION(element, "No element for DOM node!");
|
||||
element->GetAttribute(NS_LITERAL_STRING("value"), _retval);
|
||||
if (!_retval.IsEmpty() && _retval.Last() != '%')
|
||||
_retval.Append(NS_LITERAL_STRING("%"));
|
||||
_retval.Append(NS_LITERAL_STRING("%"));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute double maximumValue; */
|
||||
NS_IMETHODIMP nsXULProgressMeterAccessible::GetMaximumValue(double *aMaximumValue)
|
||||
{
|
||||
*aMaximumValue = 1; // 100% = 1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute double minimumValue; */
|
||||
NS_IMETHODIMP nsXULProgressMeterAccessible::GetMinimumValue(double *aMinimumValue)
|
||||
{
|
||||
*aMinimumValue = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute double currentValue; */
|
||||
NS_IMETHODIMP nsXULProgressMeterAccessible::GetCurrentValue(double *aCurrentValue)
|
||||
{
|
||||
nsAutoString currentValue;
|
||||
GetAccValue(currentValue);
|
||||
PRInt32 error;
|
||||
*aCurrentValue = currentValue.ToFloat(&error) / 100;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* boolean setCurrentValue (in double value); */
|
||||
NS_IMETHODIMP nsXULProgressMeterAccessible::SetCurrentValue(double aValue, PRBool *_retval)
|
||||
{
|
||||
//Here I do not suppose the min/max are 0/1.00 because I want
|
||||
// these part of code to be more extensible.
|
||||
*_retval = PR_FALSE;
|
||||
double min, max;
|
||||
GetMinimumValue(&min);
|
||||
GetMaximumValue(&max);
|
||||
if (aValue > max || aValue < min)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
|
||||
NS_ASSERTION(element, "No element for DOM node!");
|
||||
PRUint32 value = PRUint32(aValue * 100.0 + 0.5);
|
||||
nsAutoString valueString;
|
||||
valueString.AppendInt(value);
|
||||
valueString.Append(NS_LITERAL_STRING("%"));
|
||||
if (NS_SUCCEEDED(element->SetAttribute(NS_LITERAL_STRING("value"), valueString))) {
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/**
|
||||
* XUL Radio Button
|
||||
*/
|
||||
@@ -531,8 +482,8 @@ NS_IMETHODIMP nsXULRadioButtonAccessible::AccDoAction(PRUint8 index)
|
||||
if (index == eAction_Click) {
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> radioButton(do_QueryInterface(mDOMNode));
|
||||
if (radioButton) {
|
||||
radioButton->Click();
|
||||
return NS_OK;
|
||||
radioButton->DoCommand();
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
@@ -548,18 +499,8 @@ NS_IMETHODIMP nsXULRadioButtonAccessible::GetAccState(PRUint32 *_retval)
|
||||
if (radioButton)
|
||||
radioButton->GetSelected(&selected);
|
||||
|
||||
if (selected) {
|
||||
if (selected)
|
||||
*_retval |= STATE_CHECKED;
|
||||
// If our parent radio group is focused, then consider this radio button focused
|
||||
nsCOMPtr<nsIDOMNode> parentNode;
|
||||
mDOMNode->GetParentNode(getter_AddRefs(parentNode));
|
||||
if (parentNode) {
|
||||
nsCOMPtr<nsIDOMNode> focusedNode;
|
||||
GetFocusedNode(getter_AddRefs(focusedNode));
|
||||
if (focusedNode == parentNode)
|
||||
*_retval |= STATE_FOCUSED;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -597,21 +538,6 @@ nsAccessible(aNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULRadioGroupAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_GROUPING;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULRadioGroupAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// The radio group is not focusable.
|
||||
// Sometimes the focus controller will report that it is focused.
|
||||
// That means that the actual selected radio button should be considered focused
|
||||
nsAccessible::GetAccState(_retval);
|
||||
*_retval &= ~(STATE_FOCUSABLE | STATE_FOCUSED);
|
||||
return NS_OK;
|
||||
}
|
||||
/**
|
||||
* XUL StatusBar: can contain arbitrary HTML content
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsFormControlAccessible.h"
|
||||
#include "nsHTMLFormControlAccessible.h"
|
||||
#include "nsIAccessibleValue.h"
|
||||
|
||||
class nsXULButtonAccessible : public nsAccessible
|
||||
// Don't inherit from nsFormControlAccessible - it doesn't allow children and a button can have a dropmarker child
|
||||
@@ -60,6 +59,10 @@ public:
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIAccessibilityService> mAccService;
|
||||
|
||||
};
|
||||
|
||||
class nsXULCheckboxAccessible : public nsFormControlAccessible
|
||||
@@ -96,12 +99,8 @@ public:
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
};
|
||||
|
||||
class nsXULProgressMeterAccessible : public nsFormControlAccessible,
|
||||
public nsIAccessibleValue
|
||||
class nsXULProgressMeterAccessible : public nsAccessible
|
||||
{
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLEVALUE
|
||||
|
||||
public:
|
||||
nsXULProgressMeterAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
@@ -123,8 +122,6 @@ class nsXULRadioGroupAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsXULRadioGroupAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
};
|
||||
|
||||
class nsXULStatusBarAccessible : public nsAccessible
|
||||
|
||||
@@ -41,13 +41,7 @@
|
||||
#include "nsAccessible.h"
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMKeyEvent.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
#include "nsIDOMXULPopupElement.h"
|
||||
|
||||
// ------------------------ Menu Item -----------------------------
|
||||
|
||||
@@ -115,48 +109,6 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetAccName(nsAString& _retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccKeyboardShortcut(nsAString& _retval)
|
||||
{
|
||||
static PRInt32 gMenuAccesskeyModifier = -1; // magic value of -1 indicates unitialized state
|
||||
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
|
||||
if (elt) {
|
||||
nsAutoString accesskey;
|
||||
elt->GetAttribute(NS_LITERAL_STRING("accesskey"), accesskey);
|
||||
if (accesskey.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIAccessible> parentAccessible;
|
||||
GetAccParent(getter_AddRefs(parentAccessible));
|
||||
if (parentAccessible) {
|
||||
PRUint32 role;
|
||||
parentAccessible->GetAccRole(&role);
|
||||
if (role == ROLE_MENUBAR) {
|
||||
// If top level menu item, add Alt+ or whatever modifier text to string
|
||||
// No need to cache pref service, this happens rarely
|
||||
if (gMenuAccesskeyModifier == -1) { // Need to initialize cached global accesskey pref
|
||||
gMenuAccesskeyModifier = 0;
|
||||
nsresult result;
|
||||
nsCOMPtr<nsIPref> prefService(do_GetService(kPrefCID, &result));
|
||||
if (NS_SUCCEEDED(result) && prefService)
|
||||
prefService->GetIntPref("ui.key.menuAccessKey", &gMenuAccesskeyModifier);
|
||||
}
|
||||
nsAutoString propertyKey;
|
||||
switch (gMenuAccesskeyModifier) {
|
||||
case nsIDOMKeyEvent::DOM_VK_CONTROL: propertyKey = NS_LITERAL_STRING("VK_CONTROL"); break;
|
||||
case nsIDOMKeyEvent::DOM_VK_ALT: propertyKey = NS_LITERAL_STRING("VK_ALT"); break;
|
||||
case nsIDOMKeyEvent::DOM_VK_META: propertyKey = NS_LITERAL_STRING("VK_META"); break;
|
||||
}
|
||||
if (!propertyKey.IsEmpty())
|
||||
nsAccessible::GetFullKeyName(propertyKey, accesskey, _retval);
|
||||
}
|
||||
}
|
||||
if (_retval.IsEmpty())
|
||||
_retval = accesskey;
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
@@ -201,56 +153,6 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULMenuitemAccessible::AccDoAction(PRUint8 index)
|
||||
{
|
||||
if (index == eAction_Select) { // default action
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectItem(do_QueryInterface(mDOMNode));
|
||||
if (selectItem)
|
||||
selectItem->DoCommand();
|
||||
else {
|
||||
nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(mDOMNode));
|
||||
if (xulElement) {
|
||||
xulElement->Click();
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAccessible> parentAccessible;
|
||||
GetAccParent(getter_AddRefs(parentAccessible));
|
||||
if (parentAccessible) {
|
||||
PRUint32 role;
|
||||
parentAccessible->GetAccRole(&role);
|
||||
if (role == ROLE_LIST) {
|
||||
nsCOMPtr<nsIAccessible> buttonAccessible;
|
||||
parentAccessible->GetAccPreviousSibling(getter_AddRefs(buttonAccessible));
|
||||
PRUint32 state;
|
||||
buttonAccessible->GetAccState(&state);
|
||||
if (state & STATE_PRESSED)
|
||||
buttonAccessible->AccDoAction(eAction_Click);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/** select us! close combo box if necessary*/
|
||||
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
|
||||
{
|
||||
if (index == eAction_Select) {
|
||||
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("select"), _retval);
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccNumActions(PRUint8 *_retval)
|
||||
{
|
||||
*_retval = eSingle_Action;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------ Menu Separator ----------------------------
|
||||
|
||||
nsXULMenuSeparatorAccessible::nsXULMenuSeparatorAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
@@ -279,20 +181,6 @@ NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccRole(PRUint32 *_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULMenuSeparatorAccessible::AccDoAction(PRUint8 index)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccNumActions(PRUint8 *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
// ------------------------ Menu Popup -----------------------------
|
||||
|
||||
nsXULMenupopupAccessible::nsXULMenupopupAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell): nsAccessible(aDOMNode, aShell)
|
||||
@@ -357,9 +245,7 @@ nsXULMenubarAccessible::nsXULMenubarAccessible(nsIDOMNode* aDOMNode, nsIWeakRefe
|
||||
|
||||
NS_IMETHODIMP nsXULMenubarAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
nsresult rv = nsAccessible::GetAccState(_retval);
|
||||
*_retval &= ~STATE_FOCUSABLE; // Menu bar iteself is not actually focusable
|
||||
return rv;
|
||||
return nsAccessible::GetAccState(_retval);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,15 +50,11 @@ class nsXULMenuitemAccessible : public nsAccessible
|
||||
public:
|
||||
nsXULMenuitemAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
NS_IMETHOD GetAccKeyboardShortcut(nsAString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **aAccFirstChild);
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **aAccLastChild);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *aAccChildCount);
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
};
|
||||
|
||||
class nsXULMenuSeparatorAccessible : public nsXULMenuitemAccessible
|
||||
@@ -68,9 +64,6 @@ public:
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
};
|
||||
|
||||
class nsXULMenupopupAccessible : public nsAccessible
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
* Kyle Yuan (kyle.yuan@sun.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@@ -42,7 +42,6 @@
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
@@ -69,192 +68,6 @@
|
||||
* - nsXULSelectOptionAccessible
|
||||
*/
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** Impl. of nsXULSelectableAccessible */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
// Helper methos
|
||||
nsXULSelectableAccessible::nsXULSelectableAccessible(nsIDOMNode* aDOMNode,
|
||||
nsIWeakReference* aShell):
|
||||
nsAccessible(aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXULSelectableAccessible, nsAccessible, nsIAccessibleSelectable)
|
||||
|
||||
NS_IMETHODIMP nsXULSelectableAccessible::ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState)
|
||||
{
|
||||
*aSelState = PR_FALSE;
|
||||
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulMultiSelect) {
|
||||
nsCOMPtr<nsIDOMNodeList> nodeList;
|
||||
xulMultiSelect->GetChildNodes(getter_AddRefs(nodeList));
|
||||
if (nodeList) {
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
nodeList->Item(aIndex, getter_AddRefs(node));
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> item(do_QueryInterface(node));
|
||||
item->GetSelected(aSelState);
|
||||
if (eSelection_Add == aMethod && !(*aSelState))
|
||||
xulMultiSelect->AddItemToSelection(item);
|
||||
else if (eSelection_Remove == aMethod && (*aSelState))
|
||||
xulMultiSelect->RemoveItemFromSelection(item);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> xulSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulSelect) {
|
||||
PRInt32 selIndex;
|
||||
xulSelect->GetSelectedIndex(&selIndex);
|
||||
if (selIndex == aIndex)
|
||||
*aSelState = PR_TRUE;
|
||||
if (eSelection_Add == aMethod && !(*aSelState))
|
||||
xulSelect->SetSelectedIndex(aIndex);
|
||||
else if (eSelection_Remove == aMethod && (*aSelState)) {
|
||||
xulSelect->SetSelectedIndex(-1);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// Interface methods
|
||||
NS_IMETHODIMP nsXULSelectableAccessible::GetSelectedChildren(nsISupportsArray **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
|
||||
if (!accService)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsISupportsArray> selectedAccessibles;
|
||||
NS_NewISupportsArray(getter_AddRefs(selectedAccessibles));
|
||||
if (!selectedAccessibles)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
// For XUL multi-select control
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulMultiSelect) {
|
||||
PRInt32 length = 0;
|
||||
xulMultiSelect->GetSelectedCount(&length);
|
||||
for (PRInt32 index = 0; index < length; index++) {
|
||||
nsCOMPtr<nsIAccessible> tempAccessible;
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> tempNode;
|
||||
xulMultiSelect->GetSelectedItem(index, getter_AddRefs(tempNode));
|
||||
nsCOMPtr<nsIDOMNode> tempDOMNode (do_QueryInterface(tempNode));
|
||||
accService->CreateXULListitemAccessible(tempDOMNode, getter_AddRefs(tempAccessible));
|
||||
if (tempAccessible)
|
||||
selectedAccessibles->AppendElement(tempAccessible);
|
||||
}
|
||||
}
|
||||
|
||||
PRUint32 uLength = 0;
|
||||
selectedAccessibles->Count(&uLength);
|
||||
if (uLength != 0) { // length of nsISupportsArray containing selected options
|
||||
*_retval = selectedAccessibles;
|
||||
NS_ADDREF(*_retval);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// return the nth selected child's nsIAccessible object
|
||||
NS_IMETHODIMP nsXULSelectableAccessible::RefSelection(PRInt32 aIndex, nsIAccessible **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
|
||||
if (!accService)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> tempDOMNode;
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulMultiSelect)
|
||||
xulMultiSelect->GetSelectedItem(aIndex, getter_AddRefs(tempDOMNode));
|
||||
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> xulSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulSelect && aIndex == 0)
|
||||
xulSelect->GetSelectedItem(getter_AddRefs(tempDOMNode));
|
||||
|
||||
if (tempDOMNode) {
|
||||
nsCOMPtr<nsIAccessible> tempAccess;
|
||||
accService->CreateXULListitemAccessible(tempDOMNode, getter_AddRefs(tempAccess));
|
||||
*_retval = tempAccess;
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULSelectableAccessible::GetSelectionCount(PRInt32 *aSelectionCount)
|
||||
{
|
||||
*aSelectionCount = 0;
|
||||
|
||||
// For XUL multi-select control
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulMultiSelect)
|
||||
return xulMultiSelect->GetSelectedCount(aSelectionCount);
|
||||
|
||||
// For XUL single-select control/menulist
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> xulSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulSelect) {
|
||||
PRInt32 index;
|
||||
xulSelect->GetSelectedIndex(&index);
|
||||
if (index >= 0)
|
||||
*aSelectionCount = 1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULSelectableAccessible::AddSelection(PRInt32 aIndex)
|
||||
{
|
||||
PRBool isSelected;
|
||||
return ChangeSelection(aIndex, eSelection_Add, &isSelected);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULSelectableAccessible::RemoveSelection(PRInt32 aIndex)
|
||||
{
|
||||
PRBool isSelected;
|
||||
return ChangeSelection(aIndex, eSelection_Remove, &isSelected);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULSelectableAccessible::IsChildSelected(PRInt32 aIndex, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_FALSE;
|
||||
return ChangeSelection(aIndex, eSelection_GetState, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULSelectableAccessible::ClearSelection()
|
||||
{
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulMultiSelect)
|
||||
return xulMultiSelect->ClearSelection();
|
||||
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> xulSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulSelect)
|
||||
return xulSelect->SetSelectedIndex(-1);
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULSelectableAccessible::SelectAllSelection(PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_TRUE;
|
||||
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> xulMultiSelect(do_QueryInterface(mDOMNode));
|
||||
if (xulMultiSelect)
|
||||
return xulMultiSelect->SelectAll();
|
||||
|
||||
// otherwise, don't support this method
|
||||
*_retval = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** First, the common widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
@@ -334,10 +147,13 @@ NS_IMETHODIMP nsXULSelectOptionAccessible::GetAccState(PRUint32 *_retval)
|
||||
|
||||
/** Constructor */
|
||||
nsXULListboxAccessible::nsXULListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
nsXULSelectableAccessible(aDOMNode, 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
|
||||
*/
|
||||
@@ -355,9 +171,7 @@ NS_IMETHODIMP nsXULListboxAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
NS_IMETHODIMP nsXULListboxAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// Get focus status from base class
|
||||
nsAccessible::GetAccState(_retval);
|
||||
|
||||
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
|
||||
nsListboxAccessible::GetAccState(_retval);
|
||||
|
||||
// see if we are multiple select if so set ourselves as such
|
||||
nsCOMPtr<nsIDOMElement> element (do_QueryInterface(mDOMNode));
|
||||
@@ -379,13 +193,11 @@ NS_IMETHODIMP nsXULListboxAccessible::GetAccState(PRUint32 *_retval)
|
||||
*/
|
||||
NS_IMETHODIMP nsXULListboxAccessible::GetAccValue(nsAString& _retval)
|
||||
{
|
||||
_retval.Truncate();
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> select(do_QueryInterface(mDOMNode));
|
||||
if (select) {
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectedItem;
|
||||
select->GetSelectedItem(getter_AddRefs(selectedItem));
|
||||
if (selectedItem)
|
||||
return selectedItem->GetLabel(_retval);
|
||||
return selectedItem->GetValue(_retval);
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@@ -396,6 +208,55 @@ NS_IMETHODIMP nsXULListboxAccessible::GetAccRole(PRUint32 *_retval)
|
||||
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 */
|
||||
@@ -477,64 +338,23 @@ NS_IMETHODIMP nsXULListitemAccessible::GetAccState(PRUint32 *_retval)
|
||||
|
||||
/** Constructor */
|
||||
nsXULComboboxAccessible::nsXULComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell):
|
||||
nsXULSelectableAccessible(aDOMNode, aShell)
|
||||
nsComboboxAccessible(aDOMNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
/** We are a combobox */
|
||||
NS_IMETHODIMP nsXULComboboxAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_COMBOBOX;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* We always have 3 children: TextField, Button, Window. In that order
|
||||
*/
|
||||
NS_IMETHODIMP nsXULComboboxAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
*_retval = 3;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* As a nsComboboxAccessible we can have the following states:
|
||||
* STATE_FOCUSED
|
||||
* STATE_READONLY
|
||||
* STATE_FOCUSABLE
|
||||
* STATE_HASPOPUP
|
||||
* STATE_EXPANDED
|
||||
* STATE_COLLAPSED
|
||||
*/
|
||||
NS_IMETHODIMP nsXULComboboxAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// Get focus status from base class
|
||||
nsAccessible::GetAccState(_retval);
|
||||
|
||||
nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mDOMNode));
|
||||
if (menuList) {
|
||||
PRBool isOpen;
|
||||
menuList->GetOpen(&isOpen);
|
||||
if (isOpen)
|
||||
*_retval |= STATE_EXPANDED;
|
||||
else
|
||||
*_retval |= STATE_COLLAPSED;
|
||||
}
|
||||
|
||||
*_retval |= STATE_HASPOPUP | STATE_READONLY | STATE_FOCUSABLE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Our value is the name of our ( first ) selected child. nsIDOMXULSelectElement
|
||||
* Our value is the value of our ( first ) selected child. nsIDOMXULSelectElement
|
||||
* returns this by default with GetValue().
|
||||
*/
|
||||
NS_IMETHODIMP nsXULComboboxAccessible::GetAccValue(nsAString& _retval)
|
||||
{
|
||||
// The first accessible child is the text accessible that contains the name of the selected element.
|
||||
// This is our value
|
||||
nsCOMPtr<nsIAccessible> firstChild;
|
||||
GetAccFirstChild(getter_AddRefs(firstChild));
|
||||
return firstChild->GetAccName(_retval);
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> select(do_QueryInterface(mDOMNode));
|
||||
if (select) {
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectedItem;
|
||||
select->GetSelectedItem(getter_AddRefs(selectedItem));
|
||||
return selectedItem->GetValue(_retval);
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: Eric Vaughan (evaughan@netscape.com)
|
||||
* Contributor(s): Kyle Yuan (kyle.yuan@sun.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@@ -62,31 +62,14 @@
|
||||
* - nsXULComboboxAccessible <menulist />
|
||||
* - nsHTMLTextFieldAccessible
|
||||
* - nsXULComboboxButtonAccessible
|
||||
* - nsXULSelectListAccessible <menupopup />
|
||||
* - nsXULSelectOptionAccessible(s) <menuitem />
|
||||
* - nsXULSelectListAccessible <menupopup />
|
||||
* - nsXULSelectOptionAccessible(s) <menuitem />
|
||||
*/
|
||||
|
||||
/** ------------------------------------------------------ */
|
||||
/** First, the common widgets */
|
||||
/** ------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* The basic implemetation of nsIAccessibleSelectable.
|
||||
*/
|
||||
class nsXULSelectableAccessible : public nsAccessible,
|
||||
public nsIAccessibleSelectable
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLESELECTABLE
|
||||
|
||||
nsXULSelectableAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsXULSelectableAccessible() {}
|
||||
|
||||
protected:
|
||||
NS_IMETHOD ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState);
|
||||
};
|
||||
|
||||
/*
|
||||
* The list that contains all the options in the select.
|
||||
*/
|
||||
@@ -126,10 +109,14 @@ public:
|
||||
/*
|
||||
* A class the represents the XUL Listbox widget.
|
||||
*/
|
||||
class nsXULListboxAccessible : public nsXULSelectableAccessible
|
||||
class nsXULListboxAccessible : public nsListboxAccessible,
|
||||
public nsIAccessibleSelectable
|
||||
{
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLESELECTABLE
|
||||
|
||||
nsXULListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsXULListboxAccessible() {}
|
||||
|
||||
@@ -166,7 +153,7 @@ public:
|
||||
/*
|
||||
* A class the represents the XUL Combobox widget.
|
||||
*/
|
||||
class nsXULComboboxAccessible : public nsXULSelectableAccessible
|
||||
class nsXULComboboxAccessible : public nsComboboxAccessible
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -174,10 +161,6 @@ public:
|
||||
virtual ~nsXULComboboxAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
|
||||
NS_IMETHOD GetAccValue(nsAString& _retval);
|
||||
};
|
||||
|
||||
|
||||
@@ -38,22 +38,9 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsXULTabAccessible.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIPluginViewer.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsIWebShellWindow.h"
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsPluginViewer.h"
|
||||
|
||||
/**
|
||||
* XUL Tab
|
||||
@@ -100,7 +87,7 @@ NS_IMETHODIMP nsXULTabAccessible::AccDoAction(PRUint8 index)
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> tab(do_QueryInterface(mDOMNode));
|
||||
if ( tab )
|
||||
{
|
||||
tab->Click();
|
||||
tab->DoCommand();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
@@ -122,23 +109,7 @@ NS_IMETHODIMP nsXULTabAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// get focus and disable status from base class
|
||||
nsLeafAccessible::GetAccState(_retval);
|
||||
|
||||
// In the past, tabs have been focusable in classic theme
|
||||
// They may be again in the future
|
||||
// Check style for -moz-user-focus: normal to see if it's focusable
|
||||
*_retval &= ~STATE_FOCUSABLE;
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mPresShell));
|
||||
if (presShell && content) {
|
||||
nsIFrame *frame = nsnull;
|
||||
const nsStyleUserInterface* ui;
|
||||
presShell->GetPrimaryFrameFor(content, &frame);
|
||||
if (frame) {
|
||||
frame->GetStyleData(eStyleStruct_UserInterface, ((const nsStyleStruct*&)ui));
|
||||
if (ui->mUserFocus == NS_STYLE_USER_FOCUS_NORMAL)
|
||||
*_retval |= STATE_FOCUSABLE;
|
||||
}
|
||||
}
|
||||
*_retval |= STATE_FOCUSABLE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -190,7 +161,7 @@ NS_IMETHODIMP nsXULTabBoxAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
|
||||
/** Constructor */
|
||||
nsXULTabPanelsAccessible::nsXULTabPanelsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsAccessible(aNode, aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1"))
|
||||
nsAccessible(aNode, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -202,13 +173,13 @@ NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccRole(PRUint32 *_retval)
|
||||
}
|
||||
|
||||
/**
|
||||
* Possible values: unavailable
|
||||
* 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;
|
||||
*_retval |= STATE_FOCUSABLE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -222,87 +193,6 @@ NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccName(nsAString& _retval)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccFirstChild(nsIAccessible **_retval)
|
||||
{
|
||||
nsAccessible::GetAccFirstChild(_retval);
|
||||
if (*_retval == nsnull)
|
||||
GetAccPluginChild(_retval);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccLastChild(nsIAccessible **_retval)
|
||||
{
|
||||
nsAccessible::GetAccLastChild(_retval);
|
||||
if (*_retval == nsnull)
|
||||
GetAccPluginChild(_retval);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
nsAccessible::GetAccChildCount(_retval);
|
||||
if (*_retval == 0) {
|
||||
*_retval = 1;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsXULTabPanelsAccessible::GetAccPluginChild(nsIAccessible **_retval)
|
||||
{
|
||||
// this big mess eventually gets the HWND for the full
|
||||
// page plugin, and creates the shim class so we can
|
||||
// get the IAccessible from the system in the widget/src code
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
mDOMNode->GetOwnerDocument(getter_AddRefs(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObj;
|
||||
doc->GetScriptGlobalObject(getter_AddRefs(globalObj));
|
||||
if (globalObj) {
|
||||
nsCOMPtr<nsIDocShell> docShell;
|
||||
globalObj->GetDocShell(getter_AddRefs(docShell));
|
||||
nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(docShell));
|
||||
if (webShell) {
|
||||
nsCOMPtr<nsIWebShellContainer> container;
|
||||
webShell->GetContainer(*getter_AddRefs(container));
|
||||
nsCOMPtr<nsIWebShellWindow> wsWin(do_QueryInterface(container));
|
||||
if (wsWin) {
|
||||
nsCOMPtr<nsIWebShell> contentShell;
|
||||
wsWin->GetContentWebShell(getter_AddRefs(contentShell));
|
||||
nsCOMPtr<nsIDocShell> contentDocShell(do_QueryInterface(contentShell));
|
||||
if (contentDocShell) {
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
contentDocShell->GetContentViewer(getter_AddRefs(contentViewer));
|
||||
nsCOMPtr<nsIPluginViewer> pluginViewer (do_QueryInterface(contentViewer));
|
||||
if (pluginViewer) {
|
||||
nsIPluginViewer *pViewer = pluginViewer.get();
|
||||
PluginViewerImpl *viewer = (PluginViewerImpl*)pViewer;
|
||||
#ifdef XP_WIN
|
||||
// Plugin code tends to be very platform specific, need to rev this
|
||||
// when linux/mac plugins come into the picture HWND == windows
|
||||
HWND pluginPort = nsnull;
|
||||
viewer->GetPluginPort(&pluginPort);
|
||||
if (pluginPort != 0) {
|
||||
if (mAccService) {
|
||||
mAccService->CreateHTMLNativeWindowAccessible(mDOMNode, mPresShell, (PRInt32)pluginPort, _retval);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/**
|
||||
* XUL Tabs - the s really stands for strip. this is a collection of tab objects
|
||||
*/
|
||||
|
||||
@@ -80,20 +80,12 @@ class nsXULTabPanelsAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsXULTabPanelsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
|
||||
protected:
|
||||
nsresult GetAccPluginChild(nsIAccessible **_retval);
|
||||
|
||||
// data members
|
||||
nsCOMPtr<nsIDOMNode> mGParentDOMNode;
|
||||
nsCOMPtr<nsIDOMNode> mParentDOMNode;
|
||||
nsCOMPtr<nsIAccessibilityService> mAccService;
|
||||
};
|
||||
|
||||
/** merely a container of tab obejcts */
|
||||
|
||||
@@ -60,11 +60,3 @@ NS_IMETHODIMP nsXULTextAccessible::GetAccName(nsAString& _retval)
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULTextAccessible::GetAccState(PRUint32 *_retval)
|
||||
{
|
||||
// Labels and description can only have read only state
|
||||
// They are not focusable or selectable
|
||||
*_retval = STATE_READONLY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#ifndef _nsXULTextAccessible_H_
|
||||
#define _nsXULTextAccessible_H_
|
||||
|
||||
#include "nsTextAccessible.h"
|
||||
#include "nsFormControlAccessible.h"
|
||||
|
||||
class nsIWeakReference;
|
||||
|
||||
@@ -50,7 +50,6 @@ class nsXULTextAccessible : public nsTextAccessible
|
||||
public:
|
||||
nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,167 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Author: Kyle Yuan (kyle.yuan@sun.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#ifndef __nsXULTreeAccessible_h__
|
||||
#define __nsXULTreeAccessible_h__
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIWeakReference.h"
|
||||
#include "nsITreeBoxObject.h"
|
||||
#include "nsITreeView.h"
|
||||
#include "nsXULSelectAccessible.h"
|
||||
#include "nsIAccessibleTable.h"
|
||||
|
||||
/*
|
||||
* A class the represents the XUL Tree widget.
|
||||
*/
|
||||
class nsXULTreeAccessible : public nsXULSelectableAccessible,
|
||||
public nsIAccessibleTable
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLESELECTABLE
|
||||
NS_DECL_NSIACCESSIBLETABLE
|
||||
|
||||
nsXULTreeAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsXULTreeAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccValue(nsAString& _retval);
|
||||
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
|
||||
static void GetTreeBoxObject(nsIDOMNode* aDOMNode, nsITreeBoxObject** aBoxObject);
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsITreeBoxObject> mTree;
|
||||
nsCOMPtr<nsITreeView> mTreeView;
|
||||
nsCOMPtr<nsIAccessible> mCaption;
|
||||
nsString mSummary;
|
||||
|
||||
NS_IMETHOD ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState);
|
||||
};
|
||||
|
||||
/**
|
||||
* Treeitems -- used in Trees
|
||||
*/
|
||||
class nsXULTreeitemAccessible : public nsLeafAccessible
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
nsXULTreeitemAccessible(nsIAccessible *aParent, nsIDOMNode *aDOMNode, nsIWeakReference *aShell, PRInt32 aRow, PRInt32 aColumn = -1);
|
||||
virtual ~nsXULTreeitemAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
NS_IMETHOD GetAccValue(nsAString& _retval);
|
||||
NS_IMETHOD GetAccId(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
|
||||
|
||||
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
|
||||
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
|
||||
NS_IMETHOD AccRemoveSelection(void);
|
||||
NS_IMETHOD AccTakeSelection(void);
|
||||
NS_IMETHOD AccTakeFocus(void);
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsITreeBoxObject> mTree;
|
||||
nsCOMPtr<nsITreeView> mTreeView;
|
||||
PRInt32 mRow, mColumnIndex;
|
||||
nsString mColumn;
|
||||
};
|
||||
|
||||
class nsXULTreeColumnsAccessible : public nsAccessible,
|
||||
public nsIAccessibleTable
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLETABLE
|
||||
|
||||
nsXULTreeColumnsAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsXULTreeColumnsAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
|
||||
|
||||
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
|
||||
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIAccessible> mCaption;
|
||||
nsString mSummary;
|
||||
};
|
||||
|
||||
class nsXULTreeColumnitemAccessible : public nsLeafAccessible
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
nsXULTreeColumnitemAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
|
||||
virtual ~nsXULTreeColumnitemAccessible() {}
|
||||
|
||||
/* ----- nsIAccessible ----- */
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
|
||||
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
|
||||
|
||||
NS_IMETHOD AccDoAction(PRUint8 index);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -47,6 +47,7 @@ add_makefiles "
|
||||
Makefile
|
||||
build/Makefile
|
||||
build/unix/Makefile
|
||||
build/unix/mozilla-config
|
||||
config/Makefile
|
||||
config/autoconf.mk
|
||||
config/mkdepend/Makefile
|
||||
@@ -150,7 +151,6 @@ htmlparser/src/Makefile
|
||||
htmlparser/tests/Makefile
|
||||
htmlparser/tests/grabpage/Makefile
|
||||
htmlparser/tests/logparse/Makefile
|
||||
htmlparser/tests/html/Makefile
|
||||
htmlparser/tests/outsinks/Makefile
|
||||
"
|
||||
|
||||
@@ -516,7 +516,6 @@ widget/src/Makefile
|
||||
widget/src/beos/Makefile
|
||||
widget/src/build/Makefile
|
||||
widget/src/gtk/Makefile
|
||||
widget/src/gtk2/mai/Makefile
|
||||
widget/src/gtksuperwin/Makefile
|
||||
widget/src/gtkxtbin/Makefile
|
||||
widget/src/photon/Makefile
|
||||
@@ -667,8 +666,16 @@ xpfe/components/search/src/Makefile
|
||||
xpfe/components/sidebar/Makefile
|
||||
xpfe/components/sidebar/public/Makefile
|
||||
xpfe/components/sidebar/src/Makefile
|
||||
xpfe/components/xfer/Makefile
|
||||
xpfe/components/xfer/public/Makefile
|
||||
xpfe/components/xfer/src/Makefile
|
||||
xpfe/components/ucth/Makefile
|
||||
xpfe/components/ucth/public/Makefile
|
||||
xpfe/components/ucth/src/Makefile
|
||||
xpfe/components/autocomplete/Makefile
|
||||
xpfe/components/autocomplete/public/Makefile
|
||||
xpfe/components/autocomplete/resources/Makefile
|
||||
xpfe/components/autocomplete/resources/content/Makefile
|
||||
xpfe/components/autocomplete/src/Makefile
|
||||
xpfe/components/urlbarhistory/Makefile
|
||||
xpfe/components/urlbarhistory/public/Makefile
|
||||
@@ -680,7 +687,6 @@ xpfe/components/alerts/public/Makefile
|
||||
xpfe/components/alerts/src/Makefile
|
||||
xpfe/components/console/Makefile
|
||||
xpfe/components/resetPref/Makefile
|
||||
xpfe/components/killAll/Makefile
|
||||
xpfe/components/build/Makefile
|
||||
xpfe/appshell/Makefile
|
||||
xpfe/appshell/src/Makefile
|
||||
@@ -796,6 +802,7 @@ extensions/inspector/resources/Makefile
|
||||
MAKEFILES_transformiix="
|
||||
extensions/transformiix/source/base/Makefile
|
||||
extensions/transformiix/source/main/Makefile
|
||||
extensions/transformiix/source/net/Makefile
|
||||
extensions/transformiix/source/xml/dom/standalone/Makefile
|
||||
extensions/transformiix/source/xml/dom/Makefile
|
||||
extensions/transformiix/source/xml/dom/mozImpl/Makefile
|
||||
@@ -835,7 +842,6 @@ fi
|
||||
modules/libpr0n/decoders/mng/Makefile
|
||||
modules/libpr0n/decoders/icon/Makefile
|
||||
modules/libpr0n/decoders/icon/win/Makefile
|
||||
modules/libpr0n/decoders/xbm/Makefile
|
||||
"
|
||||
|
||||
MAKEFILES_gfx2="
|
||||
@@ -1059,7 +1065,6 @@ for extension in $MOZ_EXTENSIONS; do
|
||||
extensions/pref/autoconfig/Makefile
|
||||
extensions/pref/autoconfig/public/Makefile
|
||||
extensions/pref/autoconfig/src/Makefile
|
||||
extensions/pref/autoconfig/resources/Makefile
|
||||
" ;;
|
||||
transformiix ) MAKEFILES_extensions="$MAKEFILES_extensions
|
||||
$MAKEFILES_transformiix"
|
||||
|
||||
139
mozilla/build/autoconf/config.guess
vendored
139
mozilla/build/autoconf/config.guess
vendored
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2002-03-20'
|
||||
timestamp='2001-10-05'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -24,7 +24,7 @@ timestamp='2002-03-20'
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Per Bothner <per@bothner.com>.
|
||||
# Originally written by Per Bothner <bothner@cygnus.com>.
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
@@ -98,7 +98,7 @@ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
|
||||
|
||||
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int dummy(){}" > $dummy.c ;
|
||||
for c in cc gcc c89 c99 ; do
|
||||
for c in cc gcc c89 ; do
|
||||
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
|
||||
if test $? = 0 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
@@ -135,22 +135,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# object file format. This provides both forward
|
||||
# compatibility and a consistent mechanism for selecting the
|
||||
# object file format.
|
||||
#
|
||||
# Note: NetBSD doesn't particularly care about the vendor
|
||||
# portion of the name. We always set it to "unknown".
|
||||
sysctl="sysctl -n hw.machine_arch"
|
||||
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-unknown ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
mac68k) machine=m68k-apple ;;
|
||||
macppc) machine=powerpc-apple ;;
|
||||
hp3[0-9][05]) machine=m68k-hp ;;
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
sparc*) machine=`uname -p`-unknown ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
case "${UNAME_MACHINE}" in
|
||||
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
@@ -290,9 +291,6 @@ EOF
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
*:[Mm]orph[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-morphos
|
||||
exit 0 ;;
|
||||
*:OS/390:*:*)
|
||||
echo i370-ibm-openedition
|
||||
exit 0 ;;
|
||||
@@ -341,7 +339,7 @@ EOF
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
@@ -510,7 +508,7 @@ EOF
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:[45])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
@@ -684,6 +682,9 @@ EOF
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
@@ -705,6 +706,9 @@ EOF
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
@@ -742,9 +746,6 @@ EOF
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:3*)
|
||||
echo i386-pc-interix3
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
@@ -770,30 +771,16 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux
|
||||
exit 0 ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
mips:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mipsel
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
rm -f $dummy.c
|
||||
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
|
||||
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
|
||||
big) echo mips-unknown-linux-gnu && exit 0 ;;
|
||||
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
@@ -842,8 +829,7 @@ EOF
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
# Set LC_ALL=C to ensure ld outputs messages in English.
|
||||
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
|
||||
ld_supported_targets=`cd /; ld --help 2>&1 \
|
||||
| sed -ne '/supported targets:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported targets: *//
|
||||
@@ -867,29 +853,32 @@ EOF
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <features.h>
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
LIBC=gnu
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#ifdef __INTEL_COMPILER
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
#endif
|
||||
#endif
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-pc-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-pc-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
rm -f $dummy.c
|
||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
@@ -968,7 +957,7 @@ EOF
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
@@ -1079,17 +1068,15 @@ EOF
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
if test "$UNAME_PROCESSOR" = "x86"; then
|
||||
UNAME_PROCESSOR=i386
|
||||
if test "${UNAME_MACHINE}" = "x86pc"; then
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
|
||||
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
|
||||
NSR-[KW]:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:NonStop-UX:*:*)
|
||||
@@ -1113,8 +1100,6 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
*:TOPS-10:*:*)
|
||||
|
||||
153
mozilla/build/autoconf/config.sub
vendored
153
mozilla/build/autoconf/config.sub
vendored
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2002-04-26'
|
||||
timestamp='2001-10-05'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -118,7 +118,7 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -224,13 +224,9 @@ esac
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
#### MozillaHack
|
||||
# mips*el
|
||||
#### End MozillaHack
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dsp16xx \
|
||||
@@ -238,24 +234,25 @@ case $basic_machine in
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| m32r | m68000 | m68k | m88k | mcore \
|
||||
| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
||||
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
||||
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
|
||||
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
|
||||
| mipsbe | mipseb | mips*el | mipsle | mipstx39 | mipstx39el \
|
||||
| mipsisa32 | mipsisa64 \
|
||||
| mipsisa32 \
|
||||
| mn10200 | mn10300 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc | or32 \
|
||||
| openrisc \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| s390 | s390x \
|
||||
| sh | sh[34] | sh[34]eb | shbe | shle \
|
||||
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| stormy16 | strongarm \
|
||||
| tahoe | thumb | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| v850 \
|
||||
| we32k \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
| x86 | xscale \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
@@ -279,19 +276,15 @@ case $basic_machine in
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
#### MozillaHack
|
||||
# mips*el
|
||||
#### End MozillaHack
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| alphapca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armv*-* \
|
||||
| avr-* \
|
||||
| bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c54x-* \
|
||||
| clipper-* | cydra-* \
|
||||
| clipper-* | cray2-* | cydra-* \
|
||||
| d10v-* | d30v-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | fx80-* \
|
||||
@@ -299,7 +292,7 @@ case $basic_machine in
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| m32r-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | mcore-* \
|
||||
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
|
||||
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
|
||||
@@ -311,14 +304,14 @@ case $basic_machine in
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
|
||||
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
||||
| v850-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
||||
| xtensa-* \
|
||||
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
@@ -383,10 +376,6 @@ case $basic_machine in
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
@@ -407,8 +396,16 @@ case $basic_machine in
|
||||
basic_machine=c38-convex
|
||||
os=-bsd
|
||||
;;
|
||||
cray | j90)
|
||||
basic_machine=j90-cray
|
||||
cray | ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[cjt]90)
|
||||
basic_machine=${basic_machine}-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
@@ -423,14 +420,6 @@ case $basic_machine in
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
decsystem10* | dec10*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops10
|
||||
;;
|
||||
decsystem20* | dec20*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops20
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
@@ -621,6 +610,14 @@ case $basic_machine in
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
@@ -635,10 +632,6 @@ case $basic_machine in
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
morphos)
|
||||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
@@ -718,10 +711,6 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
or32 | or32-*)
|
||||
basic_machine=or32-unknown
|
||||
os=-coff
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
os=-ose
|
||||
@@ -807,12 +796,6 @@ case $basic_machine in
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
s390 | s390-*)
|
||||
basic_machine=s390-ibm
|
||||
;;
|
||||
s390x | s390x-*)
|
||||
basic_machine=s390x-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
@@ -882,7 +865,7 @@ case $basic_machine in
|
||||
sun386 | sun386i | roadrunner)
|
||||
basic_machine=i386-sun
|
||||
;;
|
||||
sv1)
|
||||
sv1)
|
||||
basic_machine=sv1-cray
|
||||
os=-unicos
|
||||
;;
|
||||
@@ -890,16 +873,8 @@ case $basic_machine in
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
t3d)
|
||||
basic_machine=alpha-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=alphaev5-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t90)
|
||||
basic_machine=t90-cray
|
||||
basic_machine=t3e-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
@@ -912,10 +887,6 @@ case $basic_machine in
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
toad1)
|
||||
basic_machine=pdp10-xkl
|
||||
os=-tops20
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
@@ -966,13 +937,13 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-windows32-msvcrt
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
z8k-*-coff)
|
||||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
@@ -993,6 +964,13 @@ case $basic_machine in
|
||||
op60c)
|
||||
basic_machine=hppa1.1-oki
|
||||
;;
|
||||
mips)
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
else
|
||||
basic_machine=mips-mips
|
||||
fi
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
@@ -1015,9 +993,6 @@ case $basic_machine in
|
||||
sh3 | sh4 | sh3eb | sh4eb)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
@@ -1088,9 +1063,6 @@ case $os in
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
#### MozillaHack
|
||||
# msvc | mksnt
|
||||
#### End MozillaHack
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
@@ -1106,11 +1078,10 @@ case $os in
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -msvc* | -mksnt* \
|
||||
| -msvc* | -mksnt* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* )
|
||||
| -os2* | -vos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1162,18 +1133,12 @@ case $os in
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-atheos*)
|
||||
os=-atheos
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-nova*)
|
||||
os=-rtmk-nova
|
||||
;;
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
@@ -1248,7 +1213,6 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
;;
|
||||
@@ -1279,9 +1243,6 @@ case $basic_machine in
|
||||
mips*-*)
|
||||
os=-elf
|
||||
;;
|
||||
or32-*)
|
||||
os=-coff
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
@@ -1429,7 +1390,7 @@ case $basic_machine in
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-vxsim* | -vxworks* | -windiss*)
|
||||
-vxsim* | -vxworks*)
|
||||
vendor=wrs
|
||||
;;
|
||||
-aux*)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
http://www.mozilla.org
|
||||
ftp://ftp.mozilla.org/Welcome
|
||||
ftp://ftp.netscape.com/Welcome
|
||||
http://www.mozilla.org
|
||||
resource:///res/samples/test2.html
|
||||
resource:///res/samples/test8.html
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Stupid wrapper to avoid win32 dospath/cygdrive issues
|
||||
#
|
||||
prog=$1
|
||||
shift
|
||||
if test -z "$prog"; then
|
||||
exit 0
|
||||
fi
|
||||
if test "$prog" = "-up"; then
|
||||
prog=$1
|
||||
shift
|
||||
args=`echo $* | sed -e 's|-I\(.\):|-I/cygdrive/\1|g;'`
|
||||
else
|
||||
args=`echo $* | sed -e 's|/cygdrive/\(.\)/|\1:/|g;'`
|
||||
fi
|
||||
exec $prog $args
|
||||
@@ -92,7 +92,7 @@
|
||||
#if TARGET_CARBON
|
||||
#pragma traceback on /* should always be ON for Carbon builds */
|
||||
#else
|
||||
#pragma traceback on /* leave on until the final release, so MacsBug logs are interpretable */
|
||||
#pragma traceback off /* leave on until the final release, so MacsBug logs are interpretable */
|
||||
#endif
|
||||
|
||||
#pragma global_optimizer on
|
||||
|
||||
@@ -84,12 +84,6 @@ sub SanityCheckBuildOptions()
|
||||
$bad_options = 1;
|
||||
}
|
||||
|
||||
if ($main::options{wsp} && !$main::options{iiextras})
|
||||
{
|
||||
print "Warning: \$options{wsp} is on but \$options{iiextras} is off. wsp will be built but won't be useable.\n";
|
||||
$bad_options = 1;
|
||||
}
|
||||
|
||||
if ($bad_options) {
|
||||
print "Build will start in 5 seconds. Press command-. to stop\n";
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ chrome_jars 1
|
||||
chrome_files 0
|
||||
use_jars 1
|
||||
transformiix 1
|
||||
mathml 1 MOZ_MATHML
|
||||
mathml 0 MOZ_MATHML
|
||||
svg 0 MOZ_SVG
|
||||
# svg requires libart, which is an lgpl library. You need to pull it
|
||||
# explicitly.
|
||||
@@ -51,7 +51,6 @@ ldap 1 MOZ_LDAP_XPCOM
|
||||
ldap_experimental 0 MOZ_LDAP_XPCOM_EXPERIMENTAL
|
||||
xmlextras 1
|
||||
wsp 0 MOZ_WSP
|
||||
iiextras 0
|
||||
inspector 1
|
||||
mailextras 1
|
||||
xptlink 0
|
||||
|
||||
@@ -12,7 +12,6 @@ use Mac::Processes;
|
||||
use Mac::Events;
|
||||
use Mac::Files;
|
||||
use Cwd;
|
||||
use Mac::MoreFiles;
|
||||
use FileHandle;
|
||||
use File::Path;
|
||||
use File::Copy;
|
||||
@@ -71,30 +70,11 @@ sub SetDefaultSkin($)
|
||||
|
||||
print "Setting default skin to $skin\n";
|
||||
|
||||
local(*CHROMEFILE);
|
||||
open(CHROMEFILE, ">>${chrome_subdir}:installed-chrome.txt") || die "Failed to open installed_chrome.txt\n";
|
||||
print(CHROMEFILE "skin,install,select,$skin\n");
|
||||
close(CHROMEFILE);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Select a default locale
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub SetDefaultLocale($$)
|
||||
{
|
||||
my($locale, $chrome_dir) = @_;
|
||||
|
||||
print "Setting default locale to $locale\n";
|
||||
|
||||
local(*CHROMEFILE);
|
||||
open(CHROMEFILE, ">>${chrome_dir}:installed-chrome.txt") || die "Failed to open installed_chrome.txt\n";
|
||||
print(CHROMEFILE "locale,install,select,$locale\n");
|
||||
close(CHROMEFILE);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// InstallDefaultsFiles
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
@@ -150,6 +130,10 @@ sub InstallDefaultsFiles()
|
||||
my($default_pref_dir) = "$defaults_dir"."Pref:";
|
||||
mkdir($default_pref_dir, 0);
|
||||
InstallResources(":mozilla:xpinstall:public:MANIFEST_PREFS", "$default_pref_dir", 0);
|
||||
InstallResources(":mozilla:modules:libpref:src:MANIFEST_PREFS", "$default_pref_dir", 0);
|
||||
if ($main::DEBUG) {
|
||||
InstallResources(":mozilla:modules:libpref:src:MANIFEST_DEBUG_PREFS", "$default_pref_dir", 0);
|
||||
}
|
||||
InstallResources(":mozilla:modules:libpref:src:init:MANIFEST", "$default_pref_dir", 0);
|
||||
InstallResources(":mozilla:modules:libpref:src:mac:MANIFEST", "$default_pref_dir", 0);
|
||||
InstallResources(":mozilla:netwerk:base:public:MANIFEST_PREFS", "$default_pref_dir", 0);
|
||||
@@ -168,7 +152,6 @@ sub InstallDefaultsFiles()
|
||||
my($default_autoconfig_dir) = "$defaults_dir"."autoconfig:";
|
||||
mkdir($default_autoconfig_dir, 0);
|
||||
InstallResources(":mozilla:extensions:pref:autoconfig:src:MANIFEST", "$default_autoconfig_dir");
|
||||
InstallResources(":mozilla:extensions:pref:autoconfig:src:mac:MANIFEST", "$default_autoconfig_dir");
|
||||
}
|
||||
|
||||
print("--- Defaults copying complete ----\n");
|
||||
@@ -211,7 +194,6 @@ sub InstallNonChromeResources()
|
||||
{
|
||||
MakeAlias(":mozilla:layout:mathml:content:src:mathml.dtd", "$resource_dir"."dtd:");
|
||||
MakeAlias(":mozilla:layout:mathml:content:src:mathml.css", "$resource_dir");
|
||||
InstallResources(":mozilla:layout:mathml:base:src:MANIFEST", "$resource_dir"."fonts:");
|
||||
}
|
||||
|
||||
MakeAlias(":mozilla:layout:html:document:src:ua.css", "$resource_dir");
|
||||
@@ -480,9 +462,6 @@ sub PackageEmbeddingChrome($$)
|
||||
unlink($temp_manifest);
|
||||
}
|
||||
|
||||
# we have to select a default locale, otherwise we won't know about a bunch
|
||||
# of files in embed.jar if the app doesn't call the code to auto-detect the locale.
|
||||
SetDefaultLocale("en-US", $embed_dir);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
@@ -571,20 +550,16 @@ sub ProcessJarManifests()
|
||||
|
||||
CreateJarFromManifest(":mozilla:accessible:src:base:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:caps:src:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:content:html:style:src:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:docshell:resources:content:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:docshell:resources:locale:en-US:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:docshell:base:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:editor:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:embedding:browser:chrome:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:embedding:browser:chrome:locale:en-US:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:extensions:cookie:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:extensions:pref:autoconfig:resources:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:extensions:irc:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:extensions:wallet:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:intl:uconv:src:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:htmlparser:src:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:layout:html:forms:resources:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:layout:html:document:src:xbl-marquee:resources:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:layout:html:forms:src:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:layout:html:base:src:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:mailnews:jar.mn", $chrome_dir, \%jars);
|
||||
@@ -624,7 +599,6 @@ sub ProcessJarManifests()
|
||||
CreateJarFromManifest(":mozilla:xpfe:components:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:xpfe:components:bookmarks:resources:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:xpfe:components:download-manager:resources:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:xpfe:components:download-manager:resources:mac:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:xpfe:components:prefwindow:resources:content:mac:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:xpfe:components:prefwindow:resources:locale:en-US:unix:jar.mn", $chrome_dir, \%jars);
|
||||
CreateJarFromManifest(":mozilla:xpfe:components:prefwindow:resources:locale:en-US:win:jar.mn", $chrome_dir, \%jars);
|
||||
@@ -679,24 +653,6 @@ sub BuildResources()
|
||||
|
||||
StartBuildModule("resources");
|
||||
|
||||
#just copy this plugin to this directory.. temporary solution until the plug in is part of the build
|
||||
my($dist_dir) = GetBinDirectory();
|
||||
my($essentials_dir) = "$dist_dir" . "Essential Files:";
|
||||
my($existing_plugin) = $essentials_dir."PrintDialogPDE.plugin";
|
||||
|
||||
if (-e $existing_plugin)
|
||||
{
|
||||
my $deadPlugin = full_path_to($existing_plugin);
|
||||
my $ascript = <<EOS;
|
||||
tell application "Finder"
|
||||
delete alias "$deadPlugin"
|
||||
end tell
|
||||
EOS
|
||||
MacPerl::DoAppleScript($ascript) or die($^E);
|
||||
}
|
||||
|
||||
FSpDirectoryCopy(":mozilla:gfx:src:mac:printerplugin:PrintDialogPDE.plugin:","$essentials_dir", 0);
|
||||
|
||||
ActivateApplication('McPL');
|
||||
|
||||
MakeNonChromeAliases(); # Defaults, JS components etc.
|
||||
@@ -729,7 +685,6 @@ sub BuildRuntimeDist()
|
||||
InstallFromManifest(":mozilla:lib:mac:NSRuntime:include:MANIFEST", "$distdirectory:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:NSStdLib:include:MANIFEST", "$distdirectory:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:MoreFiles:MANIFEST", "$distdirectory:mac:common:morefiles:");
|
||||
InstallFromManifest(":mozilla:lib:mac:NSStartup:MANIFEST", "$distdirectory:mac:common:");
|
||||
|
||||
#GC_LEAK_DETECTOR
|
||||
InstallFromManifest(":mozilla:gc:boehm:MANIFEST", "$distdirectory:gc:");
|
||||
@@ -959,8 +914,7 @@ sub BuildClientDist()
|
||||
InstallFromManifest(":mozilla:content:xbl:public:MANIFEST", "$distdirectory:content:");
|
||||
InstallFromManifest(":mozilla:content:xml:content:public:MANIFEST", "$distdirectory:content:");
|
||||
InstallFromManifest(":mozilla:content:xml:document:public:MANIFEST", "$distdirectory:content:");
|
||||
InstallFromManifest(":mozilla:content:xsl:document:public:MANIFEST", "$distdirectory:content:");
|
||||
InstallFromManifest(":mozilla:content:xsl:document:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
InstallFromManifest(":mozilla:content:xsl:document:src:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
InstallFromManifest(":mozilla:content:xul:content:public:MANIFEST", "$distdirectory:content:");
|
||||
InstallFromManifest(":mozilla:content:xul:document:public:MANIFEST", "$distdirectory:content:");
|
||||
InstallFromManifest(":mozilla:content:xul:document:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
@@ -1064,6 +1018,7 @@ sub BuildClientDist()
|
||||
InstallFromManifest(":mozilla:editor:txmgr:idl:MANIFEST", "$distdirectory:idl:");
|
||||
InstallFromManifest(":mozilla:editor:public:MANIFEST", "$distdirectory:editor:");
|
||||
InstallFromManifest(":mozilla:editor:txmgr:public:MANIFEST", "$distdirectory:editor:txmgr");
|
||||
InstallFromManifest(":mozilla:editor:txtsvc:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
InstallFromManifest(":mozilla:editor:txtsvc:public:MANIFEST", "$distdirectory:editor:txtsvc");
|
||||
|
||||
#SILENTDL
|
||||
@@ -1074,7 +1029,7 @@ sub BuildClientDist()
|
||||
InstallFromManifest(":mozilla:xpinstall:cleanup:MANIFEST", "$distdirectory:xpinstall:");
|
||||
|
||||
my $dir = '';
|
||||
for $dir (qw(autocomplete bookmarks download-manager find history related search shistory sidebar urlbarhistory))
|
||||
for $dir (qw(autocomplete bookmarks download-manager find history related search shistory sidebar urlbarhistory xfer))
|
||||
{
|
||||
InstallFromManifest(":mozilla:xpfe:components:$dir:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
}
|
||||
@@ -1173,12 +1128,6 @@ sub BuildClientDist()
|
||||
InstallFromManifest(":mozilla:extensions:transformiix:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
}
|
||||
|
||||
#IIEXTRAS
|
||||
if ($main::options{iiextras})
|
||||
{
|
||||
InstallFromManifest(":mozilla:extensions:interfaceinfo:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
}
|
||||
|
||||
#XMLEXTRAS
|
||||
if ($main::options{xmlextras})
|
||||
{
|
||||
@@ -1422,6 +1371,7 @@ sub BuildIDLProjects()
|
||||
BuildIDLProject(":mozilla:widget:macbuild:widgetIDL.xml", "widget");
|
||||
BuildIDLProject(":mozilla:editor:macbuild:EditorIDL.xml", "editor");
|
||||
BuildIDLProject(":mozilla:editor:txmgr:macbuild:txmgrIDL.xml", "txmgr");
|
||||
BuildIDLProject(":mozilla:editor:txtsvc:macbuild:txtsvcIDL.xml", "txtsvc");
|
||||
BuildIDLProject(":mozilla:profile:macbuild:ProfileServicesIDL.xml", "profileservices");
|
||||
BuildIDLProject(":mozilla:profile:pref-migrator:macbuild:prefmigratorIDL.xml", "prefm");
|
||||
|
||||
@@ -1503,11 +1453,6 @@ sub BuildIDLProjects()
|
||||
BuildIDLProject(":mozilla:extensions:transformiix:macbuild:transformiixIDL.xml", "transformiix");
|
||||
}
|
||||
|
||||
if ($main::options{iiextras})
|
||||
{
|
||||
BuildIDLProject(":mozilla:extensions:interfaceinfo:macbuild:iiextrasIDL.xml", "iiextras");
|
||||
}
|
||||
|
||||
if ($main::options{xmlextras})
|
||||
{
|
||||
BuildIDLProject(":mozilla:extensions:xmlextras:macbuild:xmlextrasIDL.xml", "xmlextras");
|
||||
@@ -1558,6 +1503,7 @@ sub BuildRuntimeProjects()
|
||||
# $C becomes a component of target names for selecting either the Carbon or non-Carbon target of a project
|
||||
my($C) = $main::options{carbon} ? "Carbon" : "";
|
||||
my($P) = $main::PROFILE ? "Profil" : "";
|
||||
my($EssentialFiles) = $main::DEBUG ? ":mozilla:dist:viewer_debug:Essential Files:" : ":mozilla:dist:viewer:Essential Files:";
|
||||
|
||||
#//
|
||||
#// Shared libraries
|
||||
@@ -1576,7 +1522,7 @@ sub BuildRuntimeProjects()
|
||||
#// Build all of the startup libraries, for Application, Component, and Shared Libraries. These are
|
||||
#// required for all subsequent libraries in the system.
|
||||
BuildProject(":mozilla:lib:mac:NSStartup:NSStartup.xml", "NSStartup.all");
|
||||
|
||||
|
||||
BuildOneProjectWithOutput(":mozilla:lib:mac:NSRuntime:NSRuntime.xml", "NSRuntime$C$P$D.shlb", "NSRuntime$D.shlb", 1, $main::ALIAS_SYM_FILES, 0);
|
||||
|
||||
BuildProject(":mozilla:lib:mac:MoreFiles:build:MoreFilesPPC.xml", "MoreFiles$D.o");
|
||||
@@ -1718,7 +1664,6 @@ sub BuildImglib2Projects()
|
||||
BuildOneProject(":mozilla:modules:libpr0n:macbuild:jpegdecoder2.xml", "jpegdecoder2$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:modules:libpr0n:macbuild:icondecoder.xml", "icondecoder$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:modules:libpr0n:macbuild:bmpdecoder.xml", "bmpdecoder$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:modules:libpr0n:macbuild:xbmdecoder.xml", "xbmdecoder$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
|
||||
# MNG
|
||||
if ($main::options{mng})
|
||||
@@ -2030,7 +1975,7 @@ sub BuildLayoutProjects()
|
||||
|
||||
BuildOneProject(":mozilla:xpinstall:macbuild:xpinstall.xml", "xpinstall$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProjectWithOutput(":mozilla:xpinstall:cleanup:macbuild:XPICleanup.xml", "XPICleanup$D$C", "XPICleanup$D", 1, $main::ALIAS_SYM_FILES, 0);
|
||||
InstallFromManifest(":mozilla:xpinstall:cleanup:MANIFEST_CMESSAGE", "$resource_dir");
|
||||
InstallFromManifest(":mozilla:xpinstall:cleanup:MANIFEST_CMESSAGE", "$resource_dir");
|
||||
|
||||
BuildOneProject(":mozilla:xpinstall:macbuild:xpistub.xml", "xpistub$D.$S", 1, $main::ALIAS_SYM_FILES, 0);
|
||||
BuildOneProject(":mozilla:xpinstall:wizard:libxpnet:macbuild:xpnet.xml", "xpnet$D.Lib", 0, 0, 0);
|
||||
@@ -2149,11 +2094,6 @@ sub BuildEmbeddingProjects()
|
||||
|
||||
StartBuildModule("embedding");
|
||||
|
||||
# Since there are separate Carbon targets, but the name is the same.
|
||||
unlink ":mozilla:embedding:components:printingui:macbuild:printingUI$D.o";
|
||||
BuildProject(":mozilla:embedding:components:printingui:macbuild:printingUI.xml", "printingUI$C$D.o");
|
||||
MakeAlias(":mozilla:embedding:components:printingui:macbuild:printingUI$D.o", ":mozilla:dist:embedding:components:");
|
||||
|
||||
BuildOneProject(":mozilla:embedding:components:build:macbuild:EmbedComponents.xml", "EmbedComponents$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:embedding:browser:macbuild:webBrowser.xml", "webBrowser$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
|
||||
@@ -2204,6 +2144,7 @@ sub BuildXPAppProjects()
|
||||
|
||||
# Components
|
||||
BuildOneProject(":mozilla:xpfe:components:find:macbuild:FindComponent.xml", "FindComponent$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:xpfe:components:xfer:macbuild:xfer.xml", "xfer$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:xpfe:components:regviewer:RegViewer.xml", "RegViewer$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:xpfe:components:shistory:macbuild:shistory.xml", "shistory$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:xpfe:components:macbuild:appcomps.xml", "appcomps$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
@@ -2278,14 +2219,7 @@ sub BuildExtensionsProjects()
|
||||
# to link against. This is really only needed for the static build, but there is no harm in building it anyway.
|
||||
BuildOneProject(":mozilla:directory:xpcom:macbuild:LDAPClientDummyLib.xml", "LDAPClient$D.shlb", 1, 0, 0);
|
||||
}
|
||||
|
||||
# InterfaceInfo Extras
|
||||
if ($main::options{iiextras})
|
||||
{
|
||||
BuildOneProject(":mozilla:extensions:interfaceinfo:macbuild:iiextras.xml", "iiextras$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
InstallResources(":mozilla:extensions:interfaceinfo:src:MANIFEST_COMPONENTS", "$components_dir");
|
||||
}
|
||||
|
||||
|
||||
# XML Extras
|
||||
if ($main::options{xmlextras})
|
||||
{
|
||||
@@ -2339,26 +2273,22 @@ sub BuildPluginsProjects()
|
||||
|
||||
# as a temporary measure, make sure that the folder "MacOS Support:JNIHeaders" exists,
|
||||
# before we attempt to build the MRJ plugin. This will allow a gradual transition.
|
||||
if ($main::options{carbon} || -e GetCodeWarriorRelativePath("Java_Support:VM_Support:MRJ_Support"))
|
||||
if (!$main::options{carbon} && -e GetCodeWarriorRelativePath("Java_Support:VM_Support:MRJ_Support"))
|
||||
{
|
||||
my($plugin_path) = ":mozilla:plugin:oji:MRJ$C:plugin:";
|
||||
my($plugin_path) = ":mozilla:plugin:oji:MRJ:plugin:";
|
||||
|
||||
# Build MRJPlugin
|
||||
BuildProject($plugin_path . "MRJPlugin$C.xml", "MRJPlugin$C");
|
||||
BuildProject($plugin_path . "MRJPlugin.xml", "MRJPlugin");
|
||||
# Build MRJPlugin.jar (if Java tools exist)
|
||||
my($linker_path) = GetCodeWarriorRelativePath("CodeWarrior Plugins:Linkers:Java Linker");
|
||||
if (-e $linker_path) {
|
||||
print("CodeWarrior Java tools detected, building MRJPlugin.jar.\n");
|
||||
BuildProject($plugin_path . "MRJPlugin$C.xml", "MRJPlugin.jar");
|
||||
BuildProject($plugin_path . "MRJPlugin.xml", "MRJPlugin.jar");
|
||||
}
|
||||
# Copy MRJPlugin, MRJPlugin.jar to appropriate plugins folder.
|
||||
my($plugin_dist) = GetBinDirectory() . "Plug-ins:";
|
||||
MakeAlias($plugin_path . "MRJPlugin$C", $plugin_dist);
|
||||
MakeAlias($plugin_path . "MRJPlugin.jar", $plugin_dist);
|
||||
if ($main::options{carbon}) {
|
||||
MakeAlias($plugin_path . "MRJPlugin.policy", $plugin_dist);
|
||||
MakeAlias($plugin_path . "MRJPlugin.properties", $plugin_dist);
|
||||
}
|
||||
MakeAlias($plugin_path . "MRJPlugin", $plugin_dist);
|
||||
MakeAlias($plugin_path . "MRJPlugin.jar", $plugin_dist);
|
||||
}
|
||||
|
||||
# Build the Default Plug-in and place an alias in the appropriate plugins folder.
|
||||
|
||||
@@ -7,15 +7,16 @@
|
||||
# mozilla/gc, , 10/25/2000 12:00:00
|
||||
#
|
||||
|
||||
mozilla/nsprpub, MAILIM_BRANCH
|
||||
mozilla/security/nss, MAILIM_BRANCH
|
||||
mozilla/security/manager, MAILIM_BRANCH
|
||||
mozilla/accessible, MAILIM_BRANCH
|
||||
mozilla/directory/c-sdk, MAILIM_BRANCH
|
||||
mozilla/lib/mac/Instrumentation, MAILIM_BRANCH
|
||||
mozilla/gfx2, MAILIM_BRANCH
|
||||
mozilla/modules/libpr0n, MAILIM_BRANCH
|
||||
SeaMonkeyAll, MAILIM_BRANCH
|
||||
mozilla/nsprpub, NETSCAPE_7_0_PR1_BRANCH
|
||||
mozilla/security/nss, NETSCAPE_7_0_PR1_BRANCH
|
||||
mozilla/security/manager, NETSCAPE_7_0_PR1_BRANCH
|
||||
mozilla/accessible, NETSCAPE_7_0_PR1_BRANCH
|
||||
mozilla/directory/c-sdk, NETSCAPE_7_0_PR1_BRANCH
|
||||
mozilla/lib/mac/Instrumentation, NETSCAPE_7_0_PR1_BRANCH
|
||||
mozilla/gfx2, NETSCAPE_7_0_PR1_BRANCH
|
||||
mozilla/modules/libpr0n, NETSCAPE_7_0_PR1_BRANCH
|
||||
SeaMonkeyAll, NETSCAPE_7_0_PR1_BRANCH
|
||||
|
||||
## You need this if you want to be able to use SVG
|
||||
## Note that this library is under the LGPL, not the MPL
|
||||
#mozilla/other-licenses/libart_lgpl
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
#!/bin/sh
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the make-diskimage script.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2002
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Brian Ryner <bryner@netscape.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Create a read-only disk image of the contents of a folder
|
||||
#
|
||||
# Usage: make-diskimage <image file> <folder> <volume name>
|
||||
#
|
||||
|
||||
DISKIMAGE_DIRNAME=`dirname $1`
|
||||
DISKIMAGE_DIR=`cd $DISKIMAGE_DIRNAME; pwd`
|
||||
DISKIMAGE=`basename $1`
|
||||
FOLDER_DIRNAME=`dirname $2`
|
||||
FOLDER=`cd $FOLDER_DIRNAME; pwd`/`basename $2`
|
||||
VOLUME_NAME=$3
|
||||
|
||||
# Find the size of the folder contents
|
||||
FOLDER_SIZE=`du -s $FOLDER|sed s/[^0-9].*//`
|
||||
|
||||
# Allow for partition table and other overhead (3%)
|
||||
IMAGE_SIZE=$(($FOLDER_SIZE + ($FOLDER_SIZE * 3 / 100) + 1))
|
||||
echo FOLDER_SIZE=$FOLDER_SIZE
|
||||
echo IMAGE_SIZE=$IMAGE_SIZE
|
||||
|
||||
# Create the image
|
||||
cd $DISKIMAGE_DIR
|
||||
hdiutil create -sectors $IMAGE_SIZE rw.$DISKIMAGE
|
||||
|
||||
# Determine a mount point
|
||||
IMAGE_DEV=`hdid -nomount rw.$DISKIMAGE | grep "^/dev/disk.s2" | sed -e "s?^/dev/??" -e "s/[^0-9a-z].*//"`
|
||||
|
||||
# Initialize the volume
|
||||
/sbin/newfs_hfs -v $VOLUME_NAME /dev/r$IMAGE_DEV
|
||||
hdiutil eject $IMAGE_DEV
|
||||
|
||||
# Mount it, copy the folder, then unmount it
|
||||
hdid rw.$DISKIMAGE
|
||||
ditto -rsrcFork $FOLDER /Volumes/$VOLUME_NAME
|
||||
hdiutil eject $IMAGE_DEV
|
||||
|
||||
# Convert to a read-only image
|
||||
hdiutil convert rw.$DISKIMAGE -format UDRO -o $DISKIMAGE
|
||||
rm -f rw.$DISKIMAGE
|
||||
@@ -29,58 +29,9 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# Hack to make sure that mozilla-config has the proper nspr dependencies
|
||||
ifdef MOZ_NATIVE_NSPR
|
||||
FULL_NSPR_CFLAGS=$(shell $(NSPR_CONFIG) --cflags)
|
||||
FULL_NSPR_LIBS=$(shell $(NSPR_CONFIG) --libs)
|
||||
else
|
||||
FULL_NSPR_CFLAGS=-I$(includedir)/nspr
|
||||
FULL_NSPR_LIBS=$(subst -L$(libdir),-L$(mozappdir),$(shell $(DEPTH)/nsprpub/config/nspr-config --libs))
|
||||
endif
|
||||
export::
|
||||
chmod 755 mozilla-config
|
||||
$(INSTALL) -m 755 mozilla-config $(DIST)/bin
|
||||
|
||||
_DEFS = $(subst \,\\\\\,$(ACDEFINES))
|
||||
|
||||
pkg_config_files=mozilla-nspr.pc mozilla-xpcom.pc mozilla-js.pc \
|
||||
mozilla-gtkmozembed.pc mozilla-nss.pc
|
||||
|
||||
GARBAGE = $(pkg_config_files) mozilla-config
|
||||
|
||||
mozilla-config:: mozilla-config.in Makefile.in Makefile
|
||||
cat $< | sed \
|
||||
-e "s|%prefix%|$(prefix)|" \
|
||||
-e "s|%exec_prefix%|$(exec_prefix)|" \
|
||||
-e "s|%includedir%|$(includedir)|" \
|
||||
-e "s|%libdir%|$(mozappdir)|" \
|
||||
-e "s|%MOZILLA_VERSION%|$(MOZILLA_VERSION)|" \
|
||||
-e "s|%DEFS%|$(_DEFS)|" \
|
||||
-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
|
||||
-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
|
||||
|
||||
%.pc : %.pc.in Makefile.in Makefile
|
||||
cat $< | sed \
|
||||
-e "s|%prefix%|$(prefix)|" \
|
||||
-e "s|%exec_prefix%|$(exec_prefix)|" \
|
||||
-e "s|%includedir%|$(includedir)|" \
|
||||
-e "s|%libdir%|$(mozappdir)|" \
|
||||
-e "s|%MOZILLA_VERSION%|$(MOZILLA_VERSION)|" \
|
||||
-e "s|%DEFS%|$(_DEFS)|" \
|
||||
-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
|
||||
-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
|
||||
|
||||
libs:: mozilla-config
|
||||
chmod 755 $<
|
||||
$(INSTALL) -m 755 $< $(DIST)/bin
|
||||
|
||||
libs:: $(srcdir)/run-mozilla.sh $(pkg_config_files)
|
||||
libs:: $(srcdir)/run-mozilla.sh
|
||||
$(INSTALL) $< $(DIST)/bin
|
||||
|
||||
install:: run-mozilla.sh
|
||||
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir)
|
||||
|
||||
install:: mozilla-config
|
||||
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(bindir)
|
||||
|
||||
install:: $(pkg_config_files)
|
||||
chmod 644 $<
|
||||
$(SYSINSTALL) $(IFLAGS1) $(pkg_config_files) \
|
||||
$(DESTDIR)$(libdir)/pkgconfig
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
global:
|
||||
NSGetFactory;
|
||||
NSGetModule;
|
||||
NSRegisterSelf;
|
||||
NSUnregisterSelf;
|
||||
local: *;
|
||||
};
|
||||
~
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
@@ -66,8 +66,10 @@ BM_CVS_NS_xpidl = xpcom/typelib xpcom/typelib/xpidl
|
||||
|
||||
# xpcom
|
||||
#
|
||||
BM_DIRS_xpcom = $(NSPRPUB_DIR) modules/libreg string xpcom
|
||||
BM_CVS_xpcom = $(NSPRPUB_DIR) modules/libreg string xpcom
|
||||
BM_DIRS_xpcom = $(BM_DIRS_xpidl) modules/libreg string xpcom
|
||||
BM_DEP_DIRS_xpcom = intl/unicharutil/public intl/uconv/public modules/libjar
|
||||
BM_CVS_NS_xpcom = $(BM_CVS_NS_xpidl) xpcom intl/uconv/public
|
||||
BM_CVS_xpcom = $(BM_CVS_xpidl) modules/libreg xpcom/glue xpcom/base xpcom/ds xpcom/io xpcom/components xpcom/threads xpcom/reflect xpcom/proxy xpcom/build xpcom/tools xpcom/sample xpcom/windbgdlg string modules/libjar intl/unicharutil/public
|
||||
|
||||
#
|
||||
# xpconnect
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
exec_prefix_set=no
|
||||
|
||||
usage()
|
||||
@@ -59,8 +59,8 @@ while test $# -gt 0; do
|
||||
exit 0
|
||||
;;
|
||||
--cflags)
|
||||
if test "%includedir%" != /usr/include ; then
|
||||
includes="-I%includedir%"
|
||||
if test "@includedir@" != /usr/include ; then
|
||||
includes="-I@includedir@"
|
||||
fi
|
||||
echo_cflags=yes
|
||||
;;
|
||||
@@ -95,18 +95,20 @@ if test "$echo_exec_prefix" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$echo_defines" = "yes"; then
|
||||
echo %DEFS%
|
||||
defines="@DEFS@"
|
||||
echo $defines
|
||||
fi
|
||||
|
||||
if test "$echo_cflags" = "yes"; then
|
||||
nspr_cflags="%FULL_NSPR_CFLAGS%"
|
||||
cflags="@DEFS@"
|
||||
nspr_cflags="@FULL_NSPR_CFLAGS@"
|
||||
for n in $echo_components; do
|
||||
component_includes="$component_includes -I%includedir%/$n"
|
||||
component_includes="$component_includes -I@includedir@/$n"
|
||||
done
|
||||
echo $component_includes $includes $nspr_cflags
|
||||
fi
|
||||
|
||||
_nspr_libs="%FULL_NSPR_LIBS%"
|
||||
_nspr_libs="@FULL_NSPR_LIBS@"
|
||||
_xpcom_libs="-lxpcom $_nspr_libs"
|
||||
_js_libs="-ljs"
|
||||
|
||||
@@ -114,21 +116,21 @@ if test "$echo_libs" = "yes"; then
|
||||
for l in $echo_libraries; do
|
||||
case "$l" in
|
||||
gfx)
|
||||
libs="$libs -lgkgfx $_xpcom_libs"
|
||||
libs="-lgkgfx $_xpcom_libs"
|
||||
;;
|
||||
xpcom)
|
||||
libs="$libs $_xpcom_libs"
|
||||
libs="$_xpcom_libs"
|
||||
;;
|
||||
nspr)
|
||||
libs="$libs $_nspr_libs"
|
||||
libs="$_nspr_libs"
|
||||
;;
|
||||
js)
|
||||
libs="$libs $_js_libs"
|
||||
libs="$_js_libs"
|
||||
;;
|
||||
jsj)
|
||||
libs="$libs -ljsj $_js_libs $_xpcom_libs"
|
||||
libs="-ljsj $_js_libs $_xpcom_libs"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo -L%libdir% $libs
|
||||
echo -L@libdir@ $libs
|
||||
fi
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
|
||||
Name: Mozilla Gtk Embedding Widget
|
||||
Description: Mozilla Embedding Widget for Gtk+
|
||||
Version: %MOZILLA_VERSION%
|
||||
Requires: mozilla-xpcom = %MOZILLA_VERSION%
|
||||
Libs: -L${libdir} -lgtkembedmoz -lgtksuperwin
|
||||
Cflags: -I${includedir}/gtkembedmoz
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
|
||||
Name: JavaScript
|
||||
Description: The Mozilla JavaScript Library
|
||||
Version: %MOZILLA_VERSION%
|
||||
Requires: mozilla-nspr = %MOZILLA_VERSION%
|
||||
Libs: -L${libdir} -js
|
||||
Cflags: -I${includedir}/js
|
||||
@@ -1,12 +0,0 @@
|
||||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
|
||||
Name: NSPR
|
||||
Description: The Netscape Portable Runtime
|
||||
Version: %MOZILLA_VERSION%
|
||||
Libs: %FULL_NSPR_LIBS%
|
||||
Cflags: -I${includedir}/nspr
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
|
||||
Name: NSS
|
||||
Description: Mozilla Network Security Services
|
||||
Version: %MOZILLA_VERSION%
|
||||
Requires: mozilla-nspr = %MOZILLA_VERSION%
|
||||
Libs: -L${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3
|
||||
Cflags: -I${includedir}/nss
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
|
||||
Name: XPCOM
|
||||
Description: The Mozilla Cross Platform Component Library
|
||||
Version: %MOZILLA_VERSION%
|
||||
Requires: mozilla-nspr = %MOZILLA_VERSION%
|
||||
Libs: -L${libdir} -lxpcom
|
||||
Cflags: -I${includedir}/xpcom -I${includedir}/string
|
||||
@@ -349,37 +349,34 @@ fi
|
||||
## Set MOZILLA_FIVE_HOME
|
||||
##
|
||||
MOZILLA_FIVE_HOME=$MOZ_DIST_BIN
|
||||
|
||||
if [ -z "$MRE_HOME" ]; then
|
||||
MRE_HOME=$MOZILLA_FIVE_HOME
|
||||
fi
|
||||
#
|
||||
##
|
||||
## Set LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
|
||||
LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
|
||||
if [ -n "$LD_LIBRARYN32_PATH" ]
|
||||
then
|
||||
LD_LIBRARYN32_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN32_PATH+":$LD_LIBRARYN32_PATH"}
|
||||
LD_LIBRARYN32_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins${LD_LIBRARYN32_PATH+":$LD_LIBRARYN32_PATH"}
|
||||
fi
|
||||
if [ -n "$LD_LIBRARYN64_PATH" ]
|
||||
then
|
||||
LD_LIBRARYN64_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN64_PATH+":$LD_LIBRARYN64_PATH"}
|
||||
LD_LIBRARYN64_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins${LD_LIBRARYN64_PATH+":$LD_LIBRARYN64_PATH"}
|
||||
fi
|
||||
if [ -n "$LD_LIBRARY_PATH_64" ]; then
|
||||
LD_LIBRARY_PATH_64=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH_64+":$LD_LIBRARY_PATH_64"}
|
||||
LD_LIBRARY_PATH_64=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins${LD_LIBRARY_PATH_64+":$LD_LIBRARY_PATH_64"}
|
||||
fi
|
||||
#
|
||||
#
|
||||
## Set SHLIB_PATH for HPUX
|
||||
SHLIB_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${SHLIB_PATH+":$SHLIB_PATH"}
|
||||
SHLIB_PATH=${MOZ_DIST_BIN}${SHLIB_PATH+":$SHLIB_PATH"}
|
||||
#
|
||||
## Set LIBPATH for AIX
|
||||
LIBPATH=${MOZ_DIST_BIN}:${MRE_HOME}${LIBPATH+":$LIBPATH"}
|
||||
LIBPATH=${MOZ_DIST_BIN}${LIBPATH+":$LIBPATH"}
|
||||
#
|
||||
## Set DYLD_LIBRARY_PATH for Mac OS X (Darwin)
|
||||
DYLD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${DYLD_LIBRARY_PATH+":$DYLD_LIBRARY_PATH"}
|
||||
DYLD_LIBRARY_PATH=${MOZ_DIST_BIN}${DYLD_LIBRARY_PATH+":$DYLD_LIBRARY_PATH"}
|
||||
#
|
||||
## Set LIBRARY_PATH for BeOS
|
||||
LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/components:${MRE_HOME}${LIBRARY_PATH+":$LIBRARY_PATH"}
|
||||
LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/components${LIBRARY_PATH+":$LIBRARY_PATH"}
|
||||
#
|
||||
## Set ADDON_PATH for BeOS
|
||||
ADDON_PATH=${MOZ_DIST_BIN}${ADDON_PATH+":$ADDON_PATH"}
|
||||
@@ -388,7 +385,7 @@ ADDON_PATH=${MOZ_DIST_BIN}${ADDON_PATH+":$ADDON_PATH"}
|
||||
if [ "$XSUNTRANSPORT" = "" ]
|
||||
then
|
||||
XSUNTRANSPORT="shmem"
|
||||
XSUNSMESIZE="512"
|
||||
XSUNSMESIZE="64"
|
||||
export XSUNTRANSPORT XSUNSMESIZE
|
||||
fi
|
||||
# Font path for Xft
|
||||
@@ -410,18 +407,9 @@ then
|
||||
if [ -n "$LD_LIBRARY_PATH_64" ]; then
|
||||
echo "LD_LIBRARY_PATH_64=$LD_LIBRARY_PATH_64"
|
||||
fi
|
||||
if [ -n "$DISPLAY" ]; then
|
||||
echo "DISPLAY=$DISPLAY"
|
||||
fi
|
||||
if [ -n "$FONTCONFIG_PATH" ]; then
|
||||
echo "FONTCONFIG_PATH=$FONTCONFIG_PATH"
|
||||
fi
|
||||
if [ -n "$XPSERVERLIST" ]; then
|
||||
echo "XPSERVERLIST=$XPSERVERLIST"
|
||||
fi
|
||||
if [ -n "$MOZILLA_POSTSCRIPT_PRINTER_LIST" ]; then
|
||||
echo "MOZILLA_POSTSCRIPT_PRINTER_LIST=$MOZILLA_POSTSCRIPT_PRINTER_LIST"
|
||||
fi
|
||||
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH"
|
||||
echo " LIBRARY_PATH=$LIBRARY_PATH"
|
||||
echo " SHLIB_PATH=$SHLIB_PATH"
|
||||
|
||||
@@ -50,9 +50,7 @@ interface nsIAggregatePrincipal : nsISupports {
|
||||
|
||||
attribute nsIPrincipal certificate;
|
||||
attribute nsIPrincipal codebase;
|
||||
readonly attribute nsIPrincipal originalCodebase;
|
||||
readonly attribute nsIPrincipal primaryChild;
|
||||
|
||||
void intersect(in nsIPrincipal other);
|
||||
boolean wasCodebaseChanged();
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user