Compare commits
564
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54b991ea4d | ||
|
|
262ffece56 | ||
|
|
7f93d25967 | ||
|
|
0f007a16d5 | ||
|
|
eacd48cccb | ||
|
|
fc1fe7d0c5 | ||
|
|
92873ead3e | ||
|
|
9fede4a3ba | ||
|
|
dbd5dc9554 | ||
|
|
3f538909ab | ||
|
|
8e4ce9b800 | ||
|
|
edf4210e12 | ||
|
|
5a64fd9657 | ||
|
|
12e9db2481 | ||
|
|
0af6123536 | ||
|
|
e2c94125cc | ||
|
|
723ca48613 | ||
|
|
15514da406 | ||
|
|
04d1e3e53a | ||
|
|
c654c1820f | ||
|
|
39dd9d560a | ||
|
|
032357c053 | ||
|
|
ecacd4a4d9 | ||
|
|
a6bc5962c4 | ||
|
|
12e93be21a | ||
|
|
0aeac02b89 | ||
|
|
1402d8eee6 | ||
|
|
42b3e18a4a | ||
|
|
cabe9ea2d5 | ||
|
|
c57a1eee66 | ||
|
|
a8fbc1dfbe | ||
|
|
1f457514b0 | ||
|
|
acd339fcf7 | ||
|
|
07bb7f379b | ||
|
|
8cabf0bf72 | ||
|
|
178f72365d | ||
|
|
f819937a31 | ||
|
|
114b5265d6 | ||
|
|
8595dc550f | ||
|
|
5b8d28ba4d | ||
|
|
8146ba5a07 | ||
|
|
727b9c9adf | ||
|
|
7056301965 | ||
|
|
dc3c2f3da8 | ||
|
|
baf4c5b6bb | ||
|
|
3575bc580f | ||
|
|
21e49b0a92 | ||
|
|
9d9534cc71 | ||
|
|
993681b010 | ||
|
|
3d29257050 | ||
|
|
7dd9438137 | ||
|
|
44c611aeaf | ||
|
|
7c4cbfd49e | ||
|
|
64bc57fa85 | ||
|
|
c6a82aa32c | ||
|
|
334fe4be6c | ||
|
|
d76e865563 | ||
|
|
ed862e5777 | ||
|
|
719bed3ead | ||
|
|
e1c28ba852 | ||
|
|
ba54621f01 | ||
|
|
9babba6c44 | ||
|
|
5ff9b81126 | ||
|
|
70c32d67f9 | ||
|
|
09a4832168 | ||
|
|
1fd02db477 | ||
|
|
810a054eb5 | ||
|
|
3104055d42 | ||
|
|
0d3d33623f | ||
|
|
3c46251443 | ||
|
|
186c58897b | ||
|
|
bb3405c8b6 | ||
|
|
b82596eb98 | ||
|
|
cf7b3e3a09 | ||
|
|
c9cd25abc5 | ||
|
|
73e0e8bbbe | ||
|
|
0bdb90ab40 | ||
|
|
c0d87ea595 | ||
|
|
11c9b60eba | ||
|
|
f9d1e87756 | ||
|
|
15ad259ac7 | ||
|
|
819c3c990b | ||
|
|
c4d4c9d6de | ||
|
|
903dea4285 | ||
|
|
620a3336eb | ||
|
|
6d20a50b09 | ||
|
|
dc4316132b | ||
|
|
9b375ff678 | ||
|
|
7a0c651c5d | ||
|
|
a653cb9b83 | ||
|
|
4875759e78 | ||
|
|
126b981629 | ||
|
|
103cf524ec | ||
|
|
ea96fed795 | ||
|
|
8c46320564 | ||
|
|
23b2a53d4c | ||
|
|
4616af0c7c | ||
|
|
a873824668 | ||
|
|
e5cec10a4e | ||
|
|
917cac9674 | ||
|
|
be4699e54c | ||
|
|
caaf54a046 | ||
|
|
d3812c1a0e | ||
|
|
729b32a2f0 | ||
|
|
79c8e2e86c | ||
|
|
93b4e6566d | ||
|
|
42a3dffe69 | ||
|
|
b21dd824a2 | ||
|
|
ccd9e8e106 | ||
|
|
eebb25dda0 | ||
|
|
27ce4ea0fa | ||
|
|
fb4ede7d2e | ||
|
|
a09c6b6ce0 | ||
|
|
a8f376aa3b | ||
|
|
e9868fcb47 | ||
|
|
7e49aebcc8 | ||
|
|
1c04829dca | ||
|
|
2379bb29be | ||
|
|
2b2475905e | ||
|
|
f25c809ff0 | ||
|
|
ff9f024589 | ||
|
|
add1037bb8 | ||
|
|
962ca150bd | ||
|
|
b693f60fc7 | ||
|
|
a4cd652b6f | ||
|
|
689cbd7509 | ||
|
|
a3f4272093 | ||
|
|
927173b648 | ||
|
|
c62cc61613 | ||
|
|
b4a50f830c | ||
|
|
5cadc0eee2 | ||
|
|
59431e104c | ||
|
|
47de3819f6 | ||
|
|
037f0ac647 | ||
|
|
b97f03f0c6 | ||
|
|
e3443de36e | ||
|
|
4b1bf3620d | ||
|
|
5d221d0cb2 | ||
|
|
9cca2f22c5 | ||
|
|
8a9955f181 | ||
|
|
90a67a4825 | ||
|
|
4381067d04 | ||
|
|
5457c3711b | ||
|
|
b0f872c919 | ||
|
|
738c6a740a | ||
|
|
b970fc412a | ||
|
|
0886ccfa95 | ||
|
|
f3786e036c | ||
|
|
d8091d3958 | ||
|
|
726452fc88 | ||
|
|
361b76beb2 | ||
|
|
6ca3eb7c98 | ||
|
|
42a208e60c | ||
|
|
c2de359372 | ||
|
|
40016a1bf9 | ||
|
|
e593872f19 | ||
|
|
e6199f8a32 | ||
|
|
ae87e5c8ca | ||
|
|
130720d927 | ||
|
|
0f0d36de2d | ||
|
|
2879b5abf6 | ||
|
|
84a29728aa | ||
|
|
38e63a2457 | ||
|
|
809bb089c1 | ||
|
|
7dbc24a739 | ||
|
|
7cc6e4f072 | ||
|
|
9605315718 | ||
|
|
c2362f7f61 | ||
|
|
27bb48deaf | ||
|
|
6e2a713c37 | ||
|
|
c617548958 | ||
|
|
d8acf27de1 | ||
|
|
de2bd6aa57 | ||
|
|
666b1f2db8 | ||
|
|
17e3f40c2e | ||
|
|
be0dc5dd26 | ||
|
|
43862ee764 | ||
|
|
fe6af19126 | ||
|
|
f982245af3 | ||
|
|
1fe46b057e | ||
|
|
197e21f6de | ||
|
|
58a3105a0e | ||
|
|
c1703a6928 | ||
|
|
786c16fd45 | ||
|
|
49b7816286 | ||
|
|
3aec8d2838 | ||
|
|
e4829019cd | ||
|
|
acb34c35db | ||
|
|
e484c9d311 | ||
|
|
6cbb2c372b | ||
|
|
5470407781 | ||
|
|
f9eaedbe2d | ||
|
|
5152b9b64a | ||
|
|
46feb81dd3 | ||
|
|
59796f3e9d | ||
|
|
83b16ecc7f | ||
|
|
2baeb2083b | ||
|
|
3ac7635150 | ||
|
|
a7e19fc7ae | ||
|
|
229517f9cd | ||
|
|
d90a4ea28c | ||
|
|
70b1711085 | ||
|
|
49aa1346da | ||
|
|
aba23a13a3 | ||
|
|
e4254a9555 | ||
|
|
cafaac1939 | ||
|
|
803f821d5b | ||
|
|
f3fb26a44f | ||
|
|
27f64dc348 | ||
|
|
ac36221d70 | ||
|
|
0f8e267fd1 | ||
|
|
c4665f5f6c | ||
|
|
983be16f8a | ||
|
|
6ebd47222a | ||
|
|
68a4b8e3d4 | ||
|
|
3d76969fa8 | ||
|
|
791fd0300e | ||
|
|
0635ffcca3 | ||
|
|
b96a2237e0 | ||
|
|
59c863a900 | ||
|
|
8bfe1f3a7d | ||
|
|
878709cd23 | ||
|
|
ea87895dd9 | ||
|
|
6b25fb2b3a | ||
|
|
02a1efa9fa | ||
|
|
d65a4c0628 | ||
|
|
c991295c93 | ||
|
|
763bcea405 | ||
|
|
c87d9f3cff | ||
|
|
8bc18ff5d4 | ||
|
|
f9508fa3cc | ||
|
|
28836a35ed | ||
|
|
a7d460c060 | ||
|
|
3434ea57c1 | ||
|
|
631e3a73e3 | ||
|
|
b4a3d59128 | ||
|
|
cd8b0b38e8 | ||
|
|
35311d664a | ||
|
|
9a5fe6f542 | ||
|
|
28ba2fb374 | ||
|
|
d423c54d9c | ||
|
|
b3a016ac20 | ||
|
|
536af00ab2 | ||
|
|
041f0bd4f4 | ||
|
|
dc6a8eea09 | ||
|
|
ea4c79e18d | ||
|
|
f8861235ed | ||
|
|
55bee27c30 | ||
|
|
d5add46c05 | ||
|
|
13cfa63316 | ||
|
|
bbb66a5500 | ||
|
|
90b015560d | ||
|
|
e38b57caa7 | ||
|
|
d003a2fba9 | ||
|
|
b22e7e4350 | ||
|
|
1c8d691c2a | ||
|
|
5f39ff87a0 | ||
|
|
3ec13cbb4e | ||
|
|
8dd55ce170 | ||
|
|
1ed0fa9f83 | ||
|
|
9eb661a899 | ||
|
|
b3bde74dce | ||
|
|
b4224e3aff | ||
|
|
dbeb9a8d4f | ||
|
|
0555400605 | ||
|
|
fb88b2cc90 | ||
|
|
7f48de6549 | ||
|
|
f16c8418aa | ||
|
|
4d90060dd8 | ||
|
|
c0c6b38c18 | ||
|
|
fb6a751759 | ||
|
|
e8e43b846c | ||
|
|
3e33eda290 | ||
|
|
2e8852cbf0 | ||
|
|
df9a143414 | ||
|
|
9dbaf7f6f8 | ||
|
|
c3fa38f0d7 | ||
|
|
da4399a912 | ||
|
|
425dc7f02b | ||
|
|
456e1a5860 | ||
|
|
f82f5aaf29 | ||
|
|
e18de3ac2b | ||
|
|
1ecde083b1 | ||
|
|
71101dc40c | ||
|
|
a00ca6d871 | ||
|
|
182b567fa8 | ||
|
|
7d330b89c8 | ||
|
|
21c13fc9cd | ||
|
|
889e3e3805 | ||
|
|
7ad5cc471d | ||
|
|
7ef3048c5e | ||
|
|
999640b68c | ||
|
|
1abfd0f004 | ||
|
|
37a033304d | ||
|
|
8df70dabe6 | ||
|
|
2c50617e64 | ||
|
|
87d7489bc3 | ||
|
|
a79400a939 | ||
|
|
4b51e3ecc9 | ||
|
|
9dbe31a41e | ||
|
|
a5366670aa | ||
|
|
abb1298631 | ||
|
|
56f255859c | ||
|
|
7a1e01c0f3 | ||
|
|
83857453b1 | ||
|
|
046c7e92a4 | ||
|
|
3e7fbd39df | ||
|
|
56d1a62f5d | ||
|
|
8e609c4594 | ||
|
|
238226ce46 | ||
|
|
0d2e285caa | ||
|
|
91309c6d9d | ||
|
|
268c95d95f | ||
|
|
f0cce53b37 | ||
|
|
8f11d64255 | ||
|
|
7c32e33769 | ||
|
|
99f208ad22 | ||
|
|
06eca091f7 | ||
|
|
8fc5e4bd24 | ||
|
|
110e4f1ca2 | ||
|
|
73e94dd628 | ||
|
|
783b48a083 | ||
|
|
9279b01433 | ||
|
|
afc9a8cafa | ||
|
|
476fc70de9 | ||
|
|
ea7435c05e | ||
|
|
01d0962f62 | ||
|
|
16aeb39791 | ||
|
|
ba97710cdf | ||
|
|
56157c149a | ||
|
|
02c4302711 | ||
|
|
0616807ac3 | ||
|
|
2d7a4f2655 | ||
|
|
7182490961 | ||
|
|
a054bcc23b | ||
|
|
2fdc4c71ce | ||
|
|
6689328efe | ||
|
|
c757d71379 | ||
|
|
690127c618 | ||
|
|
038774e52b | ||
|
|
c38a8256f3 | ||
|
|
c6a60994b7 | ||
|
|
38411ba78a | ||
|
|
c03d2c2cc5 | ||
|
|
3c46488a8c | ||
|
|
60f1eab6c2 | ||
|
|
9851eee94a | ||
|
|
09b3e1deeb | ||
|
|
993e1b50e2 | ||
|
|
cf06215a9d | ||
|
|
252c4bdc74 | ||
|
|
b2319aff7f | ||
|
|
a9f263c081 | ||
|
|
9db0c6779a | ||
|
|
16d0e3694c | ||
|
|
fc170a373c | ||
|
|
6cd9f36c28 | ||
|
|
d4070c7554 | ||
|
|
ac32a184f1 | ||
|
|
6bb1b66457 | ||
|
|
be728322e0 | ||
|
|
70f567950b | ||
|
|
cc697eb106 | ||
|
|
e2e50d065f | ||
|
|
133ec26f5e | ||
|
|
a66c8a088f | ||
|
|
2354011d48 | ||
|
|
722eaab39a | ||
|
|
05cebf17e0 | ||
|
|
9ea951fa6a | ||
|
|
174b2b76df | ||
|
|
9af4b97fbe | ||
|
|
bbf374ad17 | ||
|
|
ba58438b41 | ||
|
|
0bf5eaaa2b | ||
|
|
2f65157f25 | ||
|
|
ff713f133e | ||
|
|
b787af5702 | ||
|
|
82395acfa6 | ||
|
|
994792bdc8 | ||
|
|
d36fa8bfce | ||
|
|
9dac9de154 | ||
|
|
391e17626b | ||
|
|
2150fb7fa9 | ||
|
|
3dd8bc0ddb | ||
|
|
0fe8ac9349 | ||
|
|
a35ee1a6a5 | ||
|
|
d20b1f2fb6 | ||
|
|
a86b4c35f1 | ||
|
|
6b00d13010 | ||
|
|
830a634cec | ||
|
|
80207d6d3f | ||
|
|
f4a49d6063 | ||
|
|
86d22c2135 | ||
|
|
2b14856b57 | ||
|
|
dfbf2aef81 | ||
|
|
db049fa0cd | ||
|
|
27f416684f | ||
|
|
6ad6336fc9 | ||
|
|
0044a85a07 | ||
|
|
ec5d6d9b5d | ||
|
|
d9bd92c926 | ||
|
|
afeab7fe26 | ||
|
|
ba183ce002 | ||
|
|
e3520a9118 | ||
|
|
ae667c9a36 | ||
|
|
14826c037b | ||
|
|
6bc2cfe6c1 | ||
|
|
ca2f56cd5c | ||
|
|
0dde96ba82 | ||
|
|
980956063f | ||
|
|
babe1377c6 | ||
|
|
5e53809bb7 | ||
|
|
c92b079235 | ||
|
|
9e3d5c38e8 | ||
|
|
13476d771e | ||
|
|
1c298ec2a6 | ||
|
|
bf94026f51 | ||
|
|
06714827ac | ||
|
|
be7d317f21 | ||
|
|
bfe71e3271 | ||
|
|
c4354d3775 | ||
|
|
22def28c94 | ||
|
|
d79038b500 | ||
|
|
9a3ac861de | ||
|
|
6929ce1f87 | ||
|
|
eaaa7ec3ab | ||
|
|
66b07ce699 | ||
|
|
dda1cf6f26 | ||
|
|
779fc8abf3 | ||
|
|
87b346631f | ||
|
|
b6121d3525 | ||
|
|
49a6a85969 | ||
|
|
ce717e2633 | ||
|
|
b2399c9b76 | ||
|
|
dd2f013047 | ||
|
|
bc6de3eb9d | ||
|
|
27c8f022f1 | ||
|
|
7ee0259133 | ||
|
|
c84c6189cf | ||
|
|
1f7023294a | ||
|
|
041e7e7e47 | ||
|
|
4b1b9cac33 | ||
|
|
f9898e24e9 | ||
|
|
b6bb2995b1 | ||
|
|
37e49bec28 | ||
|
|
0c392684fa | ||
|
|
244c1e9ad1 | ||
|
|
f85cb8d2f7 | ||
|
|
c29be84c26 | ||
|
|
425914e43d | ||
|
|
6bfef39da0 | ||
|
|
a7d9607b7a | ||
|
|
5dfa048f04 | ||
|
|
3f497c7991 | ||
|
|
44b5594756 | ||
|
|
d7baf6fc35 | ||
|
|
907ff19190 | ||
|
|
2aee4a7692 | ||
|
|
65d318f307 | ||
|
|
9a99a6ce3c | ||
|
|
58ddf7abf4 | ||
|
|
a803a6c13b | ||
|
|
77c99edbd8 | ||
|
|
8efcea0172 | ||
|
|
9c121d2651 | ||
|
|
06d4d4f9c5 | ||
|
|
bcbfdfa370 | ||
|
|
cf26dcd241 | ||
|
|
891b4cf513 | ||
|
|
23dc95f80a | ||
|
|
85fc119179 | ||
|
|
169518553e | ||
|
|
6cd8c381b5 | ||
|
|
74266b6c30 | ||
|
|
231a8f6989 | ||
|
|
6180288a7a | ||
|
|
9ed96de5a6 | ||
|
|
a81085e7b7 | ||
|
|
88a656ec70 | ||
|
|
e953529b5d | ||
|
|
7ffbfde627 | ||
|
|
9dfc190714 | ||
|
|
af52fd45f1 | ||
|
|
4f010e9218 | ||
|
|
8cffdc299f | ||
|
|
02e572c000 | ||
|
|
3a092d3ae6 | ||
|
|
15d1f659a4 | ||
|
|
272b8e43ac | ||
|
|
1ea0595e59 | ||
|
|
a14d588673 | ||
|
|
fd81fe325f | ||
|
|
baa57dd092 | ||
|
|
465ae3c5e5 | ||
|
|
fad42bb2d7 | ||
|
|
d8bc8410b0 | ||
|
|
0b2e876d7d | ||
|
|
8f80ba860d | ||
|
|
cb509b2318 | ||
|
|
c1e972f199 | ||
|
|
d8e44207ed | ||
|
|
acb1d52fe4 | ||
|
|
2fa3a6935e | ||
|
|
8d9c0d1209 | ||
|
|
1d709ef0af | ||
|
|
f1f7466a72 | ||
|
|
a36a691826 | ||
|
|
9816215ea7 | ||
|
|
294698153c | ||
|
|
db4ddc5f68 | ||
|
|
9c75c8235e | ||
|
|
d854696ec9 | ||
|
|
98f59fb96c | ||
|
|
734f0957fb | ||
|
|
c789882a29 | ||
|
|
f9ad625822 | ||
|
|
c43a68113f | ||
|
|
e869b44d0f | ||
|
|
93eee35e84 | ||
|
|
ad134c48d6 | ||
|
|
e4643f5bed | ||
|
|
bcc531f53b | ||
|
|
007b998b23 | ||
|
|
2637007c78 | ||
|
|
3dfad03649 | ||
|
|
190e7bd30a | ||
|
|
292ece5fde | ||
|
|
ccc8c3b988 | ||
|
|
d53992cc12 | ||
|
|
6f7a751520 | ||
|
|
037fb1d123 | ||
|
|
706d07b3d5 | ||
|
|
eb7be8c637 | ||
|
|
080c8cc134 | ||
|
|
8e81d25f5d | ||
|
|
0cfefdfd42 | ||
|
|
ad321f50d9 | ||
|
|
cd8c5dae0c | ||
|
|
7f99af4101 | ||
|
|
e6f9b29951 | ||
|
|
7181c37a39 | ||
|
|
6e0ec4b5bc | ||
|
|
ab51260232 | ||
|
|
34cadf6068 | ||
|
|
087aa28bc7 | ||
|
|
d0d212143a | ||
|
|
05abfd8200 | ||
|
|
a8a9d2cbd4 | ||
|
|
c87116b332 | ||
|
|
e29ae4e08c | ||
|
|
865d49bdc1 | ||
|
|
9074b8d943 | ||
|
|
01c37ba21f | ||
|
|
b886cfadff | ||
|
|
73169b6863 | ||
|
|
7a9e29d580 | ||
|
|
98cb21f1bd | ||
|
|
8a11926150 | ||
|
|
6652764751 | ||
|
|
d16bc65a16 | ||
|
|
dc93e309e2 | ||
|
|
fc1697622c | ||
|
|
ecb8ae6aba |
No files matched your search
@@ -22,4 +22,4 @@
|
||||
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
||||
# don't change CLOBBER for WebIDL changes any more.
|
||||
|
||||
Removal of SIMD.js and associated scalar types requires CLOBBER. (Issue #2307)
|
||||
Clobber for NSS update
|
||||
@@ -19,6 +19,13 @@ If you are interested in the development and building side of things, some
|
||||
information will be available on the [Pale Moon developer site](http://developer.palemoon.org).
|
||||
You are also always welcome to get in touch with our community on the [Pale Moon forum](https://forum.palemoon.org/).
|
||||
|
||||
### Code search
|
||||
|
||||
While our repo has basic code searching capabilities (via `git grep`), you are strongly
|
||||
encouraged to instead use the dedicated code search and cross-referencing site:
|
||||
[https://xref.palemoon.org/](https://xref.palemoon.org/)
|
||||
This repo and a copy of the front-end are amalgamated in the `goanna-central` index.
|
||||
|
||||
### A note about trademarks and branding
|
||||
|
||||
Although this repository is primarily licensed under Mozilla Public License v2.0, the
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
* ROLE(geckoRole, stringRole, atkRole, macRole, msaaRole, ia2Role, nameRule)
|
||||
*/
|
||||
|
||||
#ifndef NSAccessibilityCellRole
|
||||
#define NSAccessibilityCellRole NSAccessibilityUnknownRole
|
||||
#endif
|
||||
|
||||
ROLE(NOTHING,
|
||||
"nothing",
|
||||
ATK_ROLE_UNKNOWN,
|
||||
|
||||
@@ -80,7 +80,7 @@ StyleInfo::TextIndent(nsAString& aValue)
|
||||
}
|
||||
|
||||
void
|
||||
StyleInfo::Margin(css::Side aSide, nsAString& aValue)
|
||||
StyleInfo::Margin(Side aSide, nsAString& aValue)
|
||||
{
|
||||
MOZ_ASSERT(mElement->GetPrimaryFrame(), " mElement->GetPrimaryFrame() needs to be valid pointer");
|
||||
aValue.Truncate();
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
#ifdef XP_WIN
|
||||
#include "mozilla/a11y/Compatibility.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
#include "HTMLWin32ObjectAccessible.h"
|
||||
#endif
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#endif
|
||||
|
||||
@@ -55,7 +57,9 @@
|
||||
#include "nsImageFrame.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
#include "nsPluginFrame.h"
|
||||
#endif
|
||||
#include "nsSVGPathGeometryFrame.h"
|
||||
#include "nsTreeBodyFrame.h"
|
||||
#include "nsTreeColumns.h"
|
||||
@@ -79,7 +83,7 @@
|
||||
#include "XULTabAccessible.h"
|
||||
#include "XULTreeGridAccessibleWrap.h"
|
||||
|
||||
#if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
|
||||
#if (defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)) && defined(MOZ_ENABLE_NPAPI)
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#endif
|
||||
|
||||
@@ -431,6 +435,7 @@ private:
|
||||
NS_IMPL_ISUPPORTS(PluginTimerCallBack, nsITimerCallback)
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
already_AddRefed<Accessible>
|
||||
nsAccessibilityService::CreatePluginAccessible(nsPluginFrame* aFrame,
|
||||
nsIContent* aContent,
|
||||
@@ -493,6 +498,7 @@ nsAccessibilityService::CreatePluginAccessible(nsPluginFrame* aFrame,
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
#endif // MOZ_ENABLE_NPAPI
|
||||
|
||||
void
|
||||
nsAccessibilityService::DeckPanelSwitched(nsIPresShell* aPresShell,
|
||||
@@ -1638,11 +1644,13 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
||||
case eOuterDocType:
|
||||
newAcc = new OuterDocAccessible(aContent, document);
|
||||
break;
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
case ePluginType: {
|
||||
nsPluginFrame* pluginFrame = do_QueryFrame(aFrame);
|
||||
newAcc = CreatePluginAccessible(pluginFrame, aContent, aContext);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case eTextLeafType:
|
||||
newAcc = new TextLeafAccessibleWrap(aContent, document);
|
||||
break;
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
class nsImageFrame;
|
||||
class nsIArray;
|
||||
class nsIPersistentProperties;
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
class nsPluginFrame;
|
||||
#endif
|
||||
class nsITreeView;
|
||||
|
||||
namespace mozilla {
|
||||
@@ -87,9 +89,11 @@ public:
|
||||
|
||||
Accessible* GetRootDocumentAccessible(nsIPresShell* aPresShell,
|
||||
bool aCanCreate);
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
already_AddRefed<Accessible>
|
||||
CreatePluginAccessible(nsPluginFrame* aFrame, nsIContent* aContent,
|
||||
Accessible* aContext);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Adds/remove ATK root accessible for gtk+ native window to/from children
|
||||
|
||||
@@ -486,13 +486,14 @@ DocAccessibleParent::SetCOMProxy(const RefPtr<IAccessible>& aCOMProxy)
|
||||
IAccessibleHolder holder(Move(ptr));
|
||||
Unused << SendParentCOMProxy(holder);
|
||||
}
|
||||
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
bool
|
||||
DocAccessibleParent::RecvGetWindowedPluginIAccessible(
|
||||
const WindowsHandle& aHwnd, IAccessibleHolder* aPluginCOMProxy)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // defined(XP_WIN)
|
||||
|
||||
|
||||
@@ -143,10 +143,11 @@ public:
|
||||
|
||||
#if defined(XP_WIN)
|
||||
void SetCOMProxy(const RefPtr<IAccessible>& aCOMProxy);
|
||||
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
virtual bool RecvGetWindowedPluginIAccessible(
|
||||
const WindowsHandle& aHwnd, IAccessibleHolder* aPluginCOMProxy) override;
|
||||
#endif
|
||||
#endif // MOZ_ENABLE_NPAPI
|
||||
#endif // XP_WIN
|
||||
|
||||
private:
|
||||
|
||||
@@ -176,7 +177,7 @@ private:
|
||||
uint32_t AddSubtree(ProxyAccessible* aParent,
|
||||
const nsTArray<AccessibleData>& aNewTree, uint32_t aIdx,
|
||||
uint32_t aIdxInParent);
|
||||
MOZ_MUST_USE bool CheckDocTree() const;
|
||||
[[nodiscard]] bool CheckDocTree() const;
|
||||
xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy);
|
||||
|
||||
nsTArray<DocAccessibleParent*> mChildDocs;
|
||||
|
||||
@@ -61,8 +61,10 @@ parent:
|
||||
*/
|
||||
async BindChildDoc(PDocAccessible aChildDoc, uint64_t aID);
|
||||
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
sync GetWindowedPluginIAccessible(WindowsHandle aHwnd)
|
||||
returns (IAccessibleHolder aPluginCOMProxy);
|
||||
#endif
|
||||
|
||||
child:
|
||||
async ParentCOMProxy(IAccessibleHolder aParentCOMProxy);
|
||||
|
||||
@@ -8,7 +8,7 @@ if CONFIG['COMPILE_ENVIRONMENT']:
|
||||
|
||||
# With --disable-accessibility, we need to compile PDocAccessible.ipdl (which
|
||||
# also depends on COMPtrTypes.h), but not the C++.
|
||||
IPDL_SOURCES += ['PDocAccessible.ipdl']
|
||||
PREPROCESSED_IPDL_SOURCES += ['PDocAccessible.ipdl']
|
||||
EXPORTS.mozilla.a11y += ['COMPtrTypes.h']
|
||||
|
||||
if CONFIG['ACCESSIBILITY']:
|
||||
|
||||
@@ -295,6 +295,7 @@ enum CheckboxValue {
|
||||
|
||||
@implementation mozPaneAccessible
|
||||
|
||||
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
|
||||
- (NSUInteger)accessibilityArrayAttributeCount:(NSString*)attribute
|
||||
{
|
||||
AccessibleWrap* accWrap = [self getGeckoAccessible];
|
||||
@@ -313,6 +314,7 @@ enum CheckboxValue {
|
||||
|
||||
return [super accessibilityArrayAttributeCount:attribute];
|
||||
}
|
||||
#endif
|
||||
|
||||
- (NSArray*)children
|
||||
{
|
||||
|
||||
@@ -47,6 +47,24 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
|
||||
return nativeArray;
|
||||
}
|
||||
|
||||
// Convert to an object without @ syntax
|
||||
static inline id
|
||||
ConvertToId(NSInteger val)
|
||||
{
|
||||
return [NSString stringWithFormat:@"%i", val];
|
||||
}
|
||||
|
||||
// Missing from SDK 10.5
|
||||
#if !defined(MAC_OS_X_VERSION_10_6) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6)
|
||||
#define __IntToNSString(x) ([NSString stringWithFormat:@"%i", x])
|
||||
#define NSAccessibilityRowIndexRangeAttribute @"AXRowIndexRange"
|
||||
#define NSAccessibilityColumnIndexRangeAttribute @"AXColumnIndexRange"
|
||||
#define NSAccessibilityRowHeaderUIElementsAttribute @"AXRowHeaderUIElements"
|
||||
#define NSAccessibilityColumnHeaderUIElementsAttribute @"AXColumnHeaderUIElements"
|
||||
#define NSAccessibilityRowCountAttribute @"AXRowCount"
|
||||
#define NSAccessibilityColumnCountAttribute @"AXColumnCount"
|
||||
#endif
|
||||
|
||||
@implementation mozTablePartAccessible
|
||||
- (BOOL)isLayoutTablePart;
|
||||
{
|
||||
@@ -83,10 +101,14 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
|
||||
|
||||
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
|
||||
NSArray* additionalAttributes = [super additionalAccessibilityAttributeNames];
|
||||
if ([self isLayoutTablePart]) {
|
||||
return additionalAttributes;
|
||||
}
|
||||
#else
|
||||
NSArray* additionalAttributes = [[NSArray alloc] init];
|
||||
#endif
|
||||
|
||||
static NSArray* tableAttrs = nil;
|
||||
if (!tableAttrs) {
|
||||
@@ -108,9 +130,9 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
|
||||
if (AccessibleWrap* accWrap = [self getGeckoAccessible]) {
|
||||
TableAccessible* table = accWrap->AsTable();
|
||||
if ([attribute isEqualToString:NSAccessibilityRowCountAttribute])
|
||||
return @(table->RowCount());
|
||||
return ConvertToId(table->RowCount());
|
||||
if ([attribute isEqualToString:NSAccessibilityColumnCountAttribute])
|
||||
return @(table->ColCount());
|
||||
return ConvertToId(table->ColCount());
|
||||
if ([attribute isEqualToString:NSAccessibilityRowsAttribute]) {
|
||||
// Create a new array with the list of table rows.
|
||||
NSMutableArray* nativeArray = [[NSMutableArray alloc] init];
|
||||
@@ -127,9 +149,9 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
|
||||
}
|
||||
} else if (ProxyAccessible* proxy = [self getProxyAccessible]) {
|
||||
if ([attribute isEqualToString:NSAccessibilityRowCountAttribute])
|
||||
return @(proxy->TableRowCount());
|
||||
return ConvertToId(proxy->TableRowCount());
|
||||
if ([attribute isEqualToString:NSAccessibilityColumnCountAttribute])
|
||||
return @(proxy->TableColumnCount());
|
||||
return ConvertToId(proxy->TableColumnCount());
|
||||
if ([attribute isEqualToString:NSAccessibilityRowsAttribute]) {
|
||||
// Create a new array with the list of table rows.
|
||||
NSMutableArray* nativeArray = [[NSMutableArray alloc] init];
|
||||
@@ -155,10 +177,14 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
|
||||
|
||||
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
|
||||
NSArray* additionalAttributes = [super additionalAccessibilityAttributeNames];
|
||||
if ([self isLayoutTablePart]) {
|
||||
return additionalAttributes;
|
||||
}
|
||||
#else
|
||||
NSArray* additionalAttributes = [[NSArray alloc] init];
|
||||
#endif
|
||||
|
||||
static NSArray* tableRowAttrs = nil;
|
||||
if (!tableRowAttrs) {
|
||||
@@ -214,10 +240,14 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
|
||||
|
||||
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
|
||||
NSArray* additionalAttributes = [super additionalAccessibilityAttributeNames];
|
||||
if ([self isLayoutTablePart]) {
|
||||
return additionalAttributes;
|
||||
}
|
||||
#else
|
||||
NSArray* additionalAttributes = [[NSArray alloc] init];
|
||||
#endif
|
||||
|
||||
static NSArray* tableCellAttrs = nil;
|
||||
if (!tableCellAttrs) {
|
||||
|
||||
@@ -173,7 +173,7 @@ public: // construction, destruction
|
||||
/**
|
||||
* Find an accessible by the given child ID in cached documents.
|
||||
*/
|
||||
MOZ_MUST_USE already_AddRefed<IAccessible>
|
||||
[[nodiscard]] already_AddRefed<IAccessible>
|
||||
GetIAccessibleFor(const VARIANT& aVarChild, bool* aIsDefunct);
|
||||
|
||||
virtual void GetNativeInterface(void **aOutAccessible) override;
|
||||
@@ -198,7 +198,7 @@ protected:
|
||||
/**
|
||||
* Find a remote accessible by the given child ID.
|
||||
*/
|
||||
MOZ_MUST_USE already_AddRefed<IAccessible>
|
||||
[[nodiscard]] already_AddRefed<IAccessible>
|
||||
GetRemoteIAccessibleFor(const VARIANT& aVarChild);
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,6 +38,13 @@ SOURCES += [
|
||||
'XULTreeGridAccessibleWrap.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_ENABLE_NPAPI']:
|
||||
SOURCES += [
|
||||
'HTMLWin32ObjectAccessible.cpp',
|
||||
]
|
||||
|
||||
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/accessible/base',
|
||||
'/accessible/generic',
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,80 @@
|
||||
dnl Map old names of Autoconf macros to new regularized names.
|
||||
dnl This file is part of Autoconf.
|
||||
dnl Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2, or (at your option)
|
||||
dnl any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
dnl 02111-1307, USA.
|
||||
dnl
|
||||
dnl General macros.
|
||||
dnl
|
||||
define(AC_WARN, [indir([AC_MSG_WARN], $@)])dnl
|
||||
define(AC_ERROR, [indir([AC_MSG_ERROR], $@)])dnl
|
||||
AC_DEFUN(AC_PROGRAM_CHECK, [indir([AC_CHECK_PROG], $@)])dnl
|
||||
AC_DEFUN(AC_PROGRAM_PATH, [indir([AC_PATH_PROG], $@)])dnl
|
||||
AC_DEFUN(AC_PROGRAMS_CHECK, [indir([AC_CHECK_PROGS], $@)])dnl
|
||||
AC_DEFUN(AC_PROGRAMS_PATH, [indir([AC_PATH_PROGS], $@)])dnl
|
||||
AC_DEFUN(AC_PREFIX, [indir([AC_PREFIX_PROGRAM], $@)])dnl
|
||||
AC_DEFUN(AC_HEADER_EGREP, [indir([AC_EGREP_HEADER], $@)])dnl
|
||||
AC_DEFUN(AC_PROGRAM_EGREP, [indir([AC_EGREP_CPP], $@)])dnl
|
||||
AC_DEFUN(AC_TEST_PROGRAM, [indir([AC_TRY_RUN], $@)])dnl
|
||||
AC_DEFUN(AC_TEST_CPP, [indir([AC_TRY_CPP], $@)])dnl
|
||||
AC_DEFUN(AC_HEADER_CHECK, [indir([AC_CHECK_HEADER], $@)])dnl
|
||||
AC_DEFUN(AC_FUNC_CHECK, [indir([AC_CHECK_FUNC], $@)])dnl
|
||||
AC_DEFUN(AC_HAVE_FUNCS, [indir([AC_CHECK_FUNCS], $@)])dnl
|
||||
AC_DEFUN(AC_HAVE_HEADERS, [indir([AC_CHECK_HEADERS], $@)])dnl
|
||||
AC_DEFUN(AC_SIZEOF_TYPE, [indir([AC_CHECK_SIZEOF], $@)])dnl
|
||||
dnl
|
||||
dnl Specific macros.
|
||||
dnl
|
||||
AC_DEFUN(AC_GCC_TRADITIONAL, [indir([AC_PROG_GCC_TRADITIONAL])])dnl
|
||||
AC_DEFUN(AC_MINUS_C_MINUS_O, [indir([AC_PROG_CC_C_O])])dnl
|
||||
AC_DEFUN(AC_SET_MAKE, [indir([AC_PROG_MAKE_SET])])dnl
|
||||
AC_DEFUN(AC_YYTEXT_POINTER, [indir([AC_DECL_YYTEXT])])dnl
|
||||
AC_DEFUN(AC_LN_S, [indir([AC_PROG_LN_S])])dnl
|
||||
AC_DEFUN(AC_STDC_HEADERS, [indir([AC_HEADER_STDC])])dnl
|
||||
AC_DEFUN(AC_MAJOR_HEADER, [indir([AC_HEADER_MAJOR])])dnl
|
||||
AC_DEFUN(AC_STAT_MACROS_BROKEN, [indir([AC_HEADER_STAT])])dnl
|
||||
AC_DEFUN(AC_SYS_SIGLIST_DECLARED, [indir([AC_DECL_SYS_SIGLIST])])dnl
|
||||
AC_DEFUN(AC_GETGROUPS_T, [indir([AC_TYPE_GETGROUPS])])dnl
|
||||
AC_DEFUN(AC_UID_T, [indir([AC_TYPE_UID_T])])dnl
|
||||
AC_DEFUN(AC_SIZE_T, [indir([AC_TYPE_SIZE_T])])dnl
|
||||
AC_DEFUN(AC_PID_T, [indir([AC_TYPE_PID_T])])dnl
|
||||
AC_DEFUN(AC_OFF_T, [indir([AC_TYPE_OFF_T])])dnl
|
||||
AC_DEFUN(AC_MODE_T, [indir([AC_TYPE_MODE_T])])dnl
|
||||
AC_DEFUN(AC_RETSIGTYPE, [indir([AC_TYPE_SIGNAL])])dnl
|
||||
AC_DEFUN(AC_MMAP, [indir([AC_FUNC_MMAP])])dnl
|
||||
AC_DEFUN(AC_VPRINTF, [indir([AC_FUNC_VPRINTF])])dnl
|
||||
AC_DEFUN(AC_VFORK, [indir([AC_FUNC_VFORK])])dnl
|
||||
AC_DEFUN(AC_WAIT3, [indir([AC_FUNC_WAIT3])])dnl
|
||||
AC_DEFUN(AC_ALLOCA, [indir([AC_FUNC_ALLOCA])])dnl
|
||||
AC_DEFUN(AC_GETLOADAVG, [indir([AC_FUNC_GETLOADAVG])])dnl
|
||||
AC_DEFUN(AC_UTIME_NULL, [indir([AC_FUNC_UTIME_NULL])])dnl
|
||||
AC_DEFUN(AC_STRCOLL, [indir([AC_FUNC_STRCOLL])])dnl
|
||||
AC_DEFUN(AC_SETVBUF_REVERSED, [indir([AC_FUNC_SETVBUF_REVERSED])])dnl
|
||||
AC_DEFUN(AC_TIME_WITH_SYS_TIME, [indir([AC_HEADER_TIME])])dnl
|
||||
AC_DEFUN(AC_TIMEZONE, [indir([AC_STRUCT_TIMEZONE])])dnl
|
||||
AC_DEFUN(AC_ST_BLOCKS, [indir([AC_STRUCT_ST_BLOCKS])])dnl
|
||||
AC_DEFUN(AC_ST_BLKSIZE, [indir([AC_STRUCT_ST_BLKSIZE])])dnl
|
||||
AC_DEFUN(AC_ST_RDEV, [indir([AC_STRUCT_ST_RDEV])])dnl
|
||||
AC_DEFUN(AC_CROSS_CHECK, [indir([AC_C_CROSS])])dnl
|
||||
AC_DEFUN(AC_CHAR_UNSIGNED, [indir([AC_C_CHAR_UNSIGNED])])dnl
|
||||
AC_DEFUN(AC_LONG_DOUBLE, [indir([AC_C_LONG_DOUBLE])])dnl
|
||||
AC_DEFUN(AC_WORDS_BIGENDIAN, [indir([AC_C_BIGENDIAN])])dnl
|
||||
AC_DEFUN(AC_INLINE, [indir([AC_C_INLINE])])dnl
|
||||
AC_DEFUN(AC_CONST, [indir([AC_C_CONST])])dnl
|
||||
AC_DEFUN(AC_LONG_FILE_NAMES, [indir([AC_SYS_LONG_FILE_NAMES])])dnl
|
||||
AC_DEFUN(AC_RESTARTABLE_SYSCALLS, [indir([AC_SYS_RESTARTABLE_SYSCALLS])])dnl
|
||||
AC_DEFUN(AC_FIND_X, [indir([AC_PATH_X])])dnl
|
||||
AC_DEFUN(AC_FIND_XTRA, [indir([AC_PATH_XTRA])])dnl
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,28 @@
|
||||
dnl Driver that loads the Autoconf macro files.
|
||||
dnl Requires GNU m4.
|
||||
dnl This file is part of Autoconf.
|
||||
dnl Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2, or (at your option)
|
||||
dnl any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
dnl 02111-1307, USA.
|
||||
dnl
|
||||
dnl Written by David MacKenzie.
|
||||
dnl
|
||||
include(acgeneral.m4)dnl
|
||||
builtin(include, acspecific.m4)dnl
|
||||
builtin(include, acoldnames.m4)dnl
|
||||
dnl Do not sinclude acsite.m4 here, because it may not be installed
|
||||
dnl yet when Autoconf is frozen.
|
||||
dnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
|
||||
Executable
+159
@@ -0,0 +1,159 @@
|
||||
#! @SHELL@
|
||||
# autoconf -- create `configure' using m4 macros
|
||||
# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# If given no args, create `configure' from template file `configure.in'.
|
||||
# With one arg, create a configure script on standard output from
|
||||
# the given template file.
|
||||
|
||||
usage="\
|
||||
Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
|
||||
[-l dir] [--localdir=dir] [--version] [template-file]"
|
||||
|
||||
# NLS nuisances.
|
||||
# Only set these to C if already set. These must not be set unconditionally
|
||||
# because not all systems understand e.g. LANG=C (notably SCO).
|
||||
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
|
||||
# Non-C LC_CTYPE values break the ctype check.
|
||||
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
|
||||
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
|
||||
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
|
||||
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
|
||||
|
||||
: ${AC_MACRODIR=@datadir@}
|
||||
: ${M4=@M4@}
|
||||
: ${AWK=@AWK@}
|
||||
case "${M4}" in
|
||||
/*) # Handle the case that m4 has moved since we were configured.
|
||||
# It may have been found originally in a build directory.
|
||||
test -f "${M4}" || M4=m4 ;;
|
||||
esac
|
||||
|
||||
: ${TMPDIR=/tmp}
|
||||
tmpout=${TMPDIR}/acout.$$
|
||||
localdir=
|
||||
show_version=no
|
||||
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* )
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
--localdir=* | --l*=* )
|
||||
localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
|
||||
shift ;;
|
||||
-l | --localdir | --l*)
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
localdir="${1}"
|
||||
shift ;;
|
||||
--macrodir=* | --m*=* )
|
||||
AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
|
||||
shift ;;
|
||||
-m | --macrodir | --m* )
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
AC_MACRODIR="${1}"
|
||||
shift ;;
|
||||
--version | --v* )
|
||||
show_version=yes; shift ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
break ;;
|
||||
-* )
|
||||
echo "${usage}" 1>&2; exit 1 ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test $show_version = yes; then
|
||||
version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
|
||||
$AC_MACRODIR/acgeneral.m4`
|
||||
echo "Autoconf version $version"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case $# in
|
||||
0) infile=configure.in ;;
|
||||
1) infile="$1" ;;
|
||||
*) echo "$usage" >&2; exit 1 ;;
|
||||
esac
|
||||
|
||||
trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
|
||||
|
||||
tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
|
||||
if test z$infile = z-; then
|
||||
infile=$tmpin
|
||||
cat > $infile
|
||||
elif test ! -r "$infile"; then
|
||||
echo "autoconf: ${infile}: No such file or directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -n "$localdir"; then
|
||||
use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
|
||||
else
|
||||
use_localdir=
|
||||
fi
|
||||
|
||||
# Use the frozen version of Autoconf if available.
|
||||
r= f=
|
||||
# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
|
||||
case `$M4 --help < /dev/null 2>&1` in
|
||||
*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
|
||||
*traditional*) ;;
|
||||
*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
|
||||
esac
|
||||
|
||||
$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
|
||||
{ rm -f $tmpin $tmpout; exit 2; }
|
||||
|
||||
# You could add your own prefixes to pattern if you wanted to check for
|
||||
# them too, e.g. pattern='\(AC_\|ILT_\)', except that UNIX sed doesn't do
|
||||
# alternation.
|
||||
pattern="AC_"
|
||||
|
||||
status=0
|
||||
if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
|
||||
echo "autoconf: Undefined macros:" >&2
|
||||
sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
|
||||
while read macro; do
|
||||
grep -n "^[^#]*$macro" $infile /dev/null
|
||||
test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
|
||||
done | sort -u >&2
|
||||
status=1
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
exec 4> configure; chmod +x configure
|
||||
else
|
||||
exec 4>&1
|
||||
fi
|
||||
|
||||
# Put the real line numbers into configure to make config.log more helpful.
|
||||
$AWK '
|
||||
/__oline__/ { printf "%d:", NR + 1 }
|
||||
{ print }
|
||||
' $tmpout | sed '
|
||||
/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
|
||||
' >&4
|
||||
|
||||
rm -f $tmpout
|
||||
|
||||
exit $status
|
||||
@@ -179,10 +179,12 @@ if test "$GNU_CC"; then
|
||||
CFLAGS="$CFLAGS -fno-math-errno -pipe"
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno -pipe"
|
||||
|
||||
if test "$CPU_ARCH" = "x86" -o "$CPU_ARCH" = "x86_64"; then
|
||||
CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
|
||||
CXXFLAGS="$CXXFLAGS -msse2 -mfpmath=sse"
|
||||
fi
|
||||
case "${host_cpu}" in
|
||||
i*86)
|
||||
CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
|
||||
CXXFLAGS="$CXXFLAGS -msse2 -mfpmath=sse"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$CLANG_CC"; then
|
||||
case "$CC_VERSION" in
|
||||
@@ -190,9 +192,9 @@ if test "$GNU_CC"; then
|
||||
AC_MSG_ERROR([Unsupported GCC version.])
|
||||
;;
|
||||
*)
|
||||
# Lifetime Dead Store Elimination level 2 (default in GCC6+) breaks Gecko.
|
||||
# Instead of completely disabling this optimization on newer GCC's,
|
||||
# we'll force them to use level 1 optimization with -flifetime-dse=1.
|
||||
# Lifetime Dead Store Elimination level 2 (default in GCC) breaks Goanna.
|
||||
# Instead of completely disabling this optimization, we force level 1
|
||||
# optimization instead with -flifetime-dse=1.
|
||||
# Add it first so that a mozconfig can override by setting CFLAGS/CXXFLAGS.
|
||||
CFLAGS="-flifetime-dse=1 $CFLAGS"
|
||||
CXXFLAGS="-flifetime-dse=1 $CXXFLAGS"
|
||||
|
||||
@@ -28,9 +28,7 @@ if test -n "$USE_ICU"; then
|
||||
fi
|
||||
MOZ_ICU_VERSION="$version"
|
||||
|
||||
# TODO: the l is actually endian-dependent
|
||||
# We could make this set as 'l' or 'b' for little or big, respectively,
|
||||
# but we'd need to check in a big-endian version of the file.
|
||||
ICU_DATA_FILE_BIG="icudt${version}b.dat"
|
||||
ICU_DATA_FILE="icudt${version}l.dat"
|
||||
|
||||
dnl We won't build ICU data as a separate file when building
|
||||
@@ -46,6 +44,7 @@ fi
|
||||
|
||||
AC_SUBST(MOZ_ICU_VERSION)
|
||||
AC_SUBST(USE_ICU)
|
||||
AC_SUBST(ICU_DATA_FILE_BIG)
|
||||
AC_SUBST(ICU_DATA_FILE)
|
||||
AC_SUBST(MOZ_ICU_DATA_ARCHIVE)
|
||||
AC_SUBST(MOZ_SHARED_ICU)
|
||||
|
||||
@@ -33,10 +33,3 @@ endif
|
||||
# correctly. Note that the binary produced here is a host tool and doesn't need
|
||||
# to be distributed.
|
||||
MACOSX_DEPLOYMENT_TARGET :=
|
||||
|
||||
# Temporarily relax the requirements for libstdc++ symbol versions on static
|
||||
# analysis plugin in order to use a recent clang by accepting libstdc++ from
|
||||
# gcc 4.4.0 (GLIBCXX_3.4.11).
|
||||
ifdef CHECK_STDCXX
|
||||
CHECK_STDCXX = $(call CHECK_SYMBOLS,$(1),GLIBCXX,libstdc++,v[1] > 3 || (v[1] == 3 && v[2] == 4 && v[3] > 11))
|
||||
endif
|
||||
@@ -499,6 +499,14 @@ set_config('INTEL_ARCHITECTURE', delayed_getattr(target_variables,
|
||||
'INTEL_ARCHITECTURE'))
|
||||
set_config('TARGET_CPU', delayed_getattr(target, 'raw_cpu'))
|
||||
set_config('TARGET_OS', delayed_getattr(target, 'raw_os'))
|
||||
set_config('TARGET_ENDIANNESS', delayed_getattr(target, 'endianness'))
|
||||
|
||||
@depends(target)
|
||||
def target_is_big_endian(target):
|
||||
if target.endianness == 'big':
|
||||
return True
|
||||
|
||||
set_define('TARGET_ENDIAN_BIG', target_is_big_endian)
|
||||
|
||||
|
||||
@depends(host)
|
||||
@@ -591,7 +599,9 @@ imply_option('--enable-project', application)
|
||||
|
||||
@depends(check_build_environment, '--help')
|
||||
def default_project(build_env, help):
|
||||
return 'js'
|
||||
if build_env.topobjdir.endswith('/js/src'):
|
||||
return 'js'
|
||||
return 'xulrunner'
|
||||
|
||||
option('--enable-project', nargs=1, default=default_project,
|
||||
help='Project to build')
|
||||
@@ -638,7 +648,7 @@ def build_project(noncomm_build, project, external_source_dir, build_env, help):
|
||||
|
||||
build_app = project[0]
|
||||
|
||||
if not external_source_dir and build_app not in ('js'):
|
||||
if not external_source_dir and build_app not in ('xulrunner', 'js'):
|
||||
if noncomm_build:
|
||||
log.info("=====WARNING WARNING WARNING=====")
|
||||
log.info("UNSUPPORTED NONCOMM-BUILD: Application code SHOULD NOT be put inside the platform tree, and doing so may have unforseen consequences if/when platform code is changed.")
|
||||
|
||||
@@ -10,66 +10,28 @@ def encoded_open(path, mode):
|
||||
return codecs.open(path, mode, encoding)
|
||||
|
||||
|
||||
option(env='AUTOCONF', nargs=1, help='Path to autoconf 2.13')
|
||||
m4 = check_prog(
|
||||
"M4",
|
||||
(
|
||||
"gm4",
|
||||
"m4",
|
||||
),
|
||||
)
|
||||
|
||||
@depends(mozconfig, 'AUTOCONF')
|
||||
@checking('for autoconf')
|
||||
@imports(_from='os.path', _import='exists')
|
||||
@imports('re')
|
||||
def autoconf(mozconfig, autoconf):
|
||||
mozconfig_autoconf = None
|
||||
if mozconfig['path']:
|
||||
make_extra = mozconfig['make_extra']
|
||||
if make_extra:
|
||||
for assignment in make_extra:
|
||||
m = re.match('(?:export\s+)?AUTOCONF\s*:?=\s*(.+)$',
|
||||
assignment)
|
||||
if m:
|
||||
mozconfig_autoconf = m.group(1)
|
||||
|
||||
autoconf = autoconf[0] if autoconf else None
|
||||
|
||||
for ac in (mozconfig_autoconf, autoconf, 'autoconf-2.13', 'autoconf2.13',
|
||||
'autoconf213'):
|
||||
if ac:
|
||||
autoconf = find_program(ac)
|
||||
if autoconf:
|
||||
break
|
||||
else:
|
||||
fink = find_program('fink')
|
||||
if fink:
|
||||
autoconf = os.path.normpath(os.path.join(
|
||||
fink, '..', '..', 'lib', 'autoconf2.13', 'bin', 'autoconf'))
|
||||
else:
|
||||
brew = find_program('brew')
|
||||
if brew:
|
||||
autoconf = os.path.normpath(os.path.join(
|
||||
brew, '..', '..', 'Cellar', 'autoconf213', '2.13', 'bin',
|
||||
'autoconf213'))
|
||||
|
||||
if not autoconf:
|
||||
die('Could not find autoconf 2.13')
|
||||
|
||||
if not exists(autoconf):
|
||||
die('Could not find autoconf 2.13 at %s', autoconf)
|
||||
|
||||
return autoconf
|
||||
|
||||
set_config('AUTOCONF', autoconf)
|
||||
|
||||
|
||||
@depends('OLD_CONFIGURE', mozconfig, autoconf, check_build_environment, shell,
|
||||
@depends('OLD_CONFIGURE', mozconfig, awk, m4, check_build_environment, shell,
|
||||
old_configure_assignments, build_project)
|
||||
@imports(_from='__builtin__', _import='open')
|
||||
@imports(_from='__builtin__', _import='print')
|
||||
@imports('glob')
|
||||
@imports('sys')
|
||||
@imports('itertools')
|
||||
@imports('subprocess')
|
||||
# Import getmtime without overwriting the sandbox os.path.
|
||||
@imports(_from='os.path', _import='getmtime')
|
||||
@imports(_from='os.path', _import='exists')
|
||||
@imports(_from='mozbuild.shellutil', _import='quote')
|
||||
def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
|
||||
@imports(_from='os', _import='environ')
|
||||
def prepare_configure(old_configure, mozconfig, awk, m4, build_env, shell,
|
||||
old_configure_assignments, build_project):
|
||||
# os.path.abspath in the sandbox will ensure forward slashes on Windows,
|
||||
# which is actually necessary because this path actually ends up literally
|
||||
@@ -98,11 +60,22 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
|
||||
refresh = False
|
||||
|
||||
if refresh:
|
||||
autoconf = os.path.join(build_env.topsrcdir, 'build', 'autoconf', 'autoconf.sh')
|
||||
log.info('Refreshing %s with %s', old_configure, autoconf)
|
||||
env = dict(environ)
|
||||
env['M4'] = m4
|
||||
env['AWK'] = awk
|
||||
env['AC_MACRODIR'] = os.path.join(build_env.topsrcdir, 'build', 'autoconf')
|
||||
my_env = env
|
||||
# Handle Python 2.7 not allowing unicode in the environment on Windows
|
||||
if sys.platform == 'win32':
|
||||
my_env = dict()
|
||||
for e in env:
|
||||
my_env[e.encode('ascii','ignore')] = env[e].encode('ascii','ignore')
|
||||
script = subprocess.check_output([
|
||||
shell, autoconf,
|
||||
'--localdir=%s' % os.path.dirname(old_configure),
|
||||
old_configure + '.in'])
|
||||
old_configure + '.in'], env=my_env)
|
||||
|
||||
# Make old-configure append to config.log, where we put our own log.
|
||||
# This could be done with a m4 macro, but it's way easier this way
|
||||
@@ -127,10 +100,6 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
|
||||
for key in mozconfig[t]['removed'].keys():
|
||||
inject("unset %s" % key)
|
||||
|
||||
# Autoconf is special, because it might be passed from
|
||||
# mozconfig['make_extra'], which we don't pass automatically above.
|
||||
inject('export AUTOCONF=%s' % quote(autoconf))
|
||||
|
||||
for assignment in old_configure_assignments:
|
||||
inject(assignment)
|
||||
|
||||
@@ -207,6 +176,7 @@ def old_configure_options(*options):
|
||||
'--enable-necko-wifi',
|
||||
'--enable-negotiateauth',
|
||||
'--enable-nfc',
|
||||
'--enable-npapi',
|
||||
'--enable-nspr-build',
|
||||
'--enable-official-branding',
|
||||
'--enable-official-vendor',
|
||||
@@ -235,7 +205,6 @@ def old_configure_options(*options):
|
||||
'--enable-small-chunk-size',
|
||||
'--enable-startup-notification',
|
||||
'--enable-startupcache',
|
||||
'--enable-stdcxx-compat',
|
||||
'--enable-strip',
|
||||
'--enable-synth-pico',
|
||||
'--enable-system-cairo',
|
||||
@@ -299,6 +268,7 @@ def old_configure_options(*options):
|
||||
'--with-thumb-interwork',
|
||||
'--with-unify-dist',
|
||||
'--with-user-appdir',
|
||||
'--with-xulrunner-stub-name',
|
||||
'--x-includes',
|
||||
'--x-libraries',
|
||||
|
||||
@@ -311,6 +281,7 @@ def old_configure_options(*options):
|
||||
'--enable-incomplete-external-linkage',
|
||||
'--enable-mailnews',
|
||||
'--enable-mailnews-oauth2',
|
||||
'--enable-classic-account-wizard',
|
||||
|
||||
# Below are configure flags used by Pale Moon
|
||||
'--disable-browser-statusbar',
|
||||
|
||||
@@ -340,17 +340,16 @@ def check_compiler(compiler, language, target):
|
||||
if info.type in ('clang-cl', 'clang', 'gcc'):
|
||||
append_flag('-std=gnu99')
|
||||
|
||||
# Note: this is a strict version check because we used to always add
|
||||
# -std=gnu++14.
|
||||
cxx14_version = 201402
|
||||
cxx17_version = 201703
|
||||
if info.language == 'C++':
|
||||
if info.type in ('clang', 'gcc') and info.language_version != cxx14_version:
|
||||
append_flag('-std=gnu++14')
|
||||
# MSVC 2015 headers include C++14 features, but don't guard them
|
||||
# with appropriate checks.
|
||||
if info.type == 'clang-cl' and info.language_version != cxx14_version:
|
||||
append_flag('-std=c++14')
|
||||
# MSVC from 2015 on defaults to C++14.
|
||||
if info.language_version != cxx17_version:
|
||||
# Compiler doesn't default to C++17, so add the appropriate flag.
|
||||
if info.type in ('clang', 'gcc'):
|
||||
# We're on Clang or GCC, enable C++17 and add GNU extensions.
|
||||
append_flag('-std=gnu++17')
|
||||
else:
|
||||
# We're on MSVC; enable C++17 language mode.
|
||||
append_flag('-std:c++17')
|
||||
|
||||
# We force clang-cl to emulate Visual C++ 2015 Update 3 with fallback to
|
||||
# cl.exe.
|
||||
|
||||
@@ -52,7 +52,7 @@ check_and_add_gcc_warning('-Wclass-varargs')
|
||||
check_and_add_gcc_warning('-Wloop-analysis')
|
||||
|
||||
# catches C++ version forward-compat issues
|
||||
check_and_add_gcc_warning('-Wc++1z-compat', cxx_compiler)
|
||||
# check_and_add_gcc_warning('-Wc++2a-compat', cxx_compiler)
|
||||
|
||||
# catches unintentional switch case fallthroughs
|
||||
check_and_add_gcc_warning('-Wimplicit-fallthrough', cxx_compiler)
|
||||
|
||||
@@ -8,9 +8,6 @@ def Binary():
|
||||
'''Generic template for target binaries. Meant to be used by other
|
||||
templates.'''
|
||||
|
||||
if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION']:
|
||||
USE_LIBS += ['stdc++compat']
|
||||
|
||||
# Ideally, we'd support not adding this to the LIB_IS_C_ONLY case,
|
||||
# but that variable is actually only set in db/sqlite/src, which
|
||||
# doesn't build a shared library on the relevant platforms anyways.
|
||||
@@ -77,27 +74,11 @@ def Framework(name):
|
||||
IS_FRAMEWORK = True
|
||||
|
||||
|
||||
@template
|
||||
def HostStdCppCompat():
|
||||
'''Template for libstdc++ compatibility for host binaries.'''
|
||||
|
||||
if CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
|
||||
HOST_USE_LIBS += ['host_stdc++compat']
|
||||
|
||||
|
||||
@template
|
||||
def HostProgram(name, c_only=False):
|
||||
'''Template for build tools executables.'''
|
||||
HOST_PROGRAM = name
|
||||
|
||||
# With context-based templates, this won't be needed anymore, and will
|
||||
# work better than relying on the caller setting it, but at the moment,
|
||||
# this is the best we have. And it doesn't matter /that/ much, so there's
|
||||
# really only one place using this, where it does matter to avoid the
|
||||
# extra dependency (because it creates a circular one).
|
||||
if not c_only:
|
||||
HostStdCppCompat()
|
||||
|
||||
|
||||
@template
|
||||
def HostSimplePrograms(names, ext='.cpp'):
|
||||
@@ -109,8 +90,6 @@ def HostSimplePrograms(names, ext='.cpp'):
|
||||
HOST_SOURCES += ['%s%s' % (name.replace('host_', ''), ext)
|
||||
for name in names]
|
||||
|
||||
HostStdCppCompat()
|
||||
|
||||
|
||||
@template
|
||||
def HostLibrary(name):
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION'] or CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
|
||||
DIRS += ['stdc++compat']
|
||||
|
||||
if CONFIG['USE_ELF_HACK']:
|
||||
DIRS += ['elfhack']
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
# Avoid dependency on libstdc++ 4.7
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
|
||||
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
|
||||
|
||||
if [ -f "$TOOLTOOL_DIR/clang/lib/libstdc++.so" ]; then
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/clang/lib
|
||||
elif [ -f "$TOOLTOOL_DIR/gcc/lib/libstdc++.so" ]; then
|
||||
# We put both 32-bits and 64-bits library path in LD_LIBRARY_PATH: ld.so
|
||||
# will prefer the files in the 32-bits path when loading 32-bits executables,
|
||||
# and the files in the 64-bits path when loading 64-bits executables.
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/gcc/lib64:$TOOLTOOL_DIR/gcc/lib
|
||||
fi
|
||||
|
||||
mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
||||
@@ -30,5 +30,3 @@ ac_add_options --enable-pie
|
||||
ac_add_options --disable-install-strip
|
||||
# -gline-tables-only results in significantly smaller binaries.
|
||||
ac_add_options --enable-debug-symbols="-gline-tables-only"
|
||||
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
@@ -1,7 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
ENABLE_CLANG_PLUGIN :=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
@@ -1,23 +0,0 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION']:
|
||||
Library('stdc++compat')
|
||||
SOURCES += ['stdc++compat.cpp']
|
||||
|
||||
if CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
|
||||
HostLibrary('host_stdc++compat')
|
||||
HOST_SOURCES += [
|
||||
'stdc++compat.cpp',
|
||||
]
|
||||
|
||||
FORCE_STATIC_LIB = True
|
||||
|
||||
NO_PGO = True
|
||||
|
||||
DISABLE_STL_WRAPPING = True
|
||||
|
||||
DEFINES['MOZ_LIBSTDCXX_VERSION'] = CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION']
|
||||
HOST_DEFINES['MOZ_LIBSTDCXX_VERSION'] = CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']
|
||||
@@ -1,78 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
#include <string>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <mozilla/Assertions.h>
|
||||
|
||||
/* GLIBCXX_3.4.8 is from gcc 4.1.1 (111691)
|
||||
GLIBCXX_3.4.9 is from gcc 4.2.0 (111690)
|
||||
GLIBCXX_3.4.10 is from gcc 4.3.0 (126287)
|
||||
GLIBCXX_3.4.11 is from gcc 4.4.0 (133006)
|
||||
GLIBCXX_3.4.12 is from gcc 4.4.1 (147138)
|
||||
GLIBCXX_3.4.13 is from gcc 4.4.2 (151127)
|
||||
GLIBCXX_3.4.14 is from gcc 4.5.0 (151126)
|
||||
GLIBCXX_3.4.15 is from gcc 4.6.0 (160071)
|
||||
GLIBCXX_3.4.16 is from gcc 4.6.1 (172240)
|
||||
GLIBCXX_3.4.17 is from gcc 4.7.0 (174383)
|
||||
GLIBCXX_3.4.18 is from gcc 4.8.0 (190787)
|
||||
GLIBCXX_3.4.19 is from gcc 4.8.1 (199309)
|
||||
GLIBCXX_3.4.20 is from gcc 4.9.0 (199307)
|
||||
GLIBCXX_3.4.21 is from gcc 5.0 (210290)
|
||||
|
||||
This file adds the necessary compatibility tricks to avoid symbols with
|
||||
version GLIBCXX_3.4.16 and bigger, keeping binary compatibility with
|
||||
libstdc++ 4.6.1.
|
||||
|
||||
*/
|
||||
|
||||
#define GLIBCXX_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c))
|
||||
|
||||
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 20)
|
||||
namespace std {
|
||||
|
||||
/* We shouldn't be throwing exceptions at all, but it sadly turns out
|
||||
we call STL (inline) functions that do. */
|
||||
void __throw_out_of_range_fmt(char const* fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char buf[1024]; // That should be big enough.
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
va_end(ap);
|
||||
|
||||
__throw_range_error(buf);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 20)
|
||||
/* Technically, this symbol is not in GLIBCXX_3.4.20, but in CXXABI_1.3.8,
|
||||
but that's equivalent, version-wise. Those calls are added by the compiler
|
||||
itself on `new Class[n]` calls. */
|
||||
extern "C" void
|
||||
__cxa_throw_bad_array_new_length()
|
||||
{
|
||||
MOZ_CRASH();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21)
|
||||
/* While we generally don't build with exceptions, we have some host tools
|
||||
* that do use them. libstdc++ from GCC 5.0 added exception constructors with
|
||||
* char const* argument. Older versions only have a constructor with
|
||||
* std::string. */
|
||||
namespace std {
|
||||
runtime_error::runtime_error(char const* s)
|
||||
: runtime_error(std::string(s))
|
||||
{
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -560,6 +560,23 @@ BasePrincipal::GetCspJSON(nsAString& outCSPinJSON)
|
||||
return mCSP->ToJSON(outCSPinJSON);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BasePrincipal::IsSameOrigin(nsIURI* aURI, bool aIsPrivateWin, bool* aRes) {
|
||||
*aRes = false;
|
||||
nsCOMPtr<nsIURI> prinURI;
|
||||
nsresult rv = GetURI(getter_AddRefs(prinURI));
|
||||
if (NS_FAILED(rv) || !prinURI) {
|
||||
return NS_OK;
|
||||
}
|
||||
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
|
||||
if (!ssm) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
;
|
||||
}
|
||||
*aRes = NS_SUCCEEDED(ssm->CheckSameOriginURI(prinURI, aURI, aIsPrivateWin));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BasePrincipal::GetIsNullPrincipal(bool* aResult)
|
||||
{
|
||||
|
||||
@@ -51,12 +51,12 @@ public:
|
||||
// Don't use this method for anything else than debugging!
|
||||
void CreateAnonymizedSuffix(nsACString& aStr) const;
|
||||
|
||||
MOZ_MUST_USE bool PopulateFromSuffix(const nsACString& aStr);
|
||||
[[nodiscard]] bool PopulateFromSuffix(const nsACString& aStr);
|
||||
|
||||
// Populates the attributes from a string like
|
||||
// |uri!key1=value1&key2=value2| and returns the uri without the suffix.
|
||||
MOZ_MUST_USE bool PopulateFromOrigin(const nsACString& aOrigin,
|
||||
nsACString& aOriginNoSuffix);
|
||||
[[nodiscard]] bool PopulateFromOrigin(const nsACString& aOrigin,
|
||||
nsACString& aOriginNoSuffix);
|
||||
|
||||
// Helper function to match mIsPrivateBrowsing to existing private browsing
|
||||
// flags. Once all other flags are removed, this can be removed too.
|
||||
@@ -282,6 +282,7 @@ public:
|
||||
NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId) final;
|
||||
NS_IMETHOD GetUserContextId(uint32_t* aUserContextId) final;
|
||||
NS_IMETHOD GetPrivateBrowsingId(uint32_t* aPrivateBrowsingId) final;
|
||||
NS_IMETHOD IsSameOrigin(nsIURI* aURI, bool aIsPrivateWin, bool* aRes) override;
|
||||
|
||||
bool EqualsIgnoringAddonId(nsIPrincipal *aOther);
|
||||
|
||||
|
||||
@@ -223,6 +223,12 @@ interface nsIPrincipal : nsISerializable
|
||||
*/
|
||||
readonly attribute AUTF8String originSuffix;
|
||||
|
||||
/**
|
||||
* Uses NS_Security Compare to determine if the
|
||||
* other URI is same-origin as the uri of the Principal
|
||||
*/
|
||||
bool IsSameOrigin(in nsIURI otherURI, in bool aIsPrivateWin);
|
||||
|
||||
/**
|
||||
* The base domain of the codebase URI to which this principal pertains
|
||||
* (generally the document URI), handling null principals and
|
||||
|
||||
@@ -76,6 +76,7 @@ nsIIOService *nsScriptSecurityManager::sIOService = nullptr;
|
||||
nsIStringBundle *nsScriptSecurityManager::sStrBundle = nullptr;
|
||||
JSContext *nsScriptSecurityManager::sContext = nullptr;
|
||||
bool nsScriptSecurityManager::sStrictFileOriginPolicy = true;
|
||||
bool nsScriptSecurityManager::sSameOriginPolicy = true;
|
||||
|
||||
///////////////////////////
|
||||
// Convenience Functions //
|
||||
@@ -535,7 +536,8 @@ NS_IMPL_ISUPPORTS(nsScriptSecurityManager,
|
||||
///////////////// Security Checks /////////////////
|
||||
|
||||
bool
|
||||
nsScriptSecurityManager::ContentSecurityPolicyPermitsJSAction(JSContext *cx)
|
||||
nsScriptSecurityManager::ContentSecurityPolicyPermitsJSAction(JSContext *cx,
|
||||
JS::HandleValue aValue)
|
||||
{
|
||||
MOZ_ASSERT(cx == nsContentUtils::GetCurrentJSContext());
|
||||
nsCOMPtr<nsIPrincipal> subjectPrincipal = nsContentUtils::SubjectPrincipal();
|
||||
@@ -558,12 +560,23 @@ nsScriptSecurityManager::ContentSecurityPolicyPermitsJSAction(JSContext *cx)
|
||||
}
|
||||
|
||||
if (reportViolation) {
|
||||
nsAutoString fileName;
|
||||
unsigned lineNum = 0;
|
||||
NS_NAMED_LITERAL_STRING(scriptSample, "call to eval() or related function blocked by CSP");
|
||||
JS::Rooted<JSString*> jsString(cx, JS::ToString(cx, aValue));
|
||||
if (NS_WARN_IF(!jsString)) {
|
||||
JS_ClearPendingException(cx);
|
||||
return false;
|
||||
}
|
||||
|
||||
nsAutoJSString scriptSample;
|
||||
if (NS_WARN_IF(!scriptSample.init(cx, jsString))) {
|
||||
JS_ClearPendingException(cx);
|
||||
return false;
|
||||
}
|
||||
|
||||
JS::AutoFilename scriptFilename;
|
||||
if (JS::DescribeScriptedCaller(cx, &scriptFilename, &lineNum)) {
|
||||
nsAutoString fileName;
|
||||
unsigned lineNum = 0;
|
||||
unsigned columnNum = 0;
|
||||
if (JS::DescribeScriptedCaller(cx, &scriptFilename, &lineNum, &columnNum)) {
|
||||
if (const char *file = scriptFilename.get()) {
|
||||
CopyUTF8toUTF16(nsDependentCString(file), fileName);
|
||||
}
|
||||
@@ -574,6 +587,7 @@ nsScriptSecurityManager::ContentSecurityPolicyPermitsJSAction(JSContext *cx)
|
||||
fileName,
|
||||
scriptSample,
|
||||
lineNum,
|
||||
columnNum,
|
||||
EmptyString(),
|
||||
EmptyString());
|
||||
}
|
||||
@@ -594,7 +608,7 @@ nsScriptSecurityManager::CheckSameOriginURI(nsIURI* aSourceURI,
|
||||
nsIURI* aTargetURI,
|
||||
bool reportError)
|
||||
{
|
||||
if (!SecurityCompareURIs(aSourceURI, aTargetURI))
|
||||
if (sSameOriginPolicy && !SecurityCompareURIs(aSourceURI, aTargetURI))
|
||||
{
|
||||
if (reportError) {
|
||||
ReportError(nullptr, NS_LITERAL_STRING("CheckSameOriginError"),
|
||||
@@ -1421,10 +1435,13 @@ nsScriptSecurityManager::CanGetService(JSContext *cx,
|
||||
const char sJSEnabledPrefName[] = "javascript.enabled";
|
||||
const char sFileOriginPolicyPrefName[] =
|
||||
"security.fileuri.strict_origin_policy";
|
||||
const char sSameOriginPolicyPrefName[] =
|
||||
"security.same_origin_policy.enabled";
|
||||
|
||||
static const char* kObservedPrefs[] = {
|
||||
sJSEnabledPrefName,
|
||||
sFileOriginPolicyPrefName,
|
||||
sSameOriginPolicyPrefName,
|
||||
"capability.policy.",
|
||||
nullptr
|
||||
};
|
||||
@@ -1580,6 +1597,8 @@ nsScriptSecurityManager::ScriptSecurityPrefChanged()
|
||||
Preferences::GetBool(sJSEnabledPrefName, mIsJavaScriptEnabled);
|
||||
sStrictFileOriginPolicy =
|
||||
Preferences::GetBool(sFileOriginPolicyPrefName, false);
|
||||
sSameOriginPolicy =
|
||||
Preferences::GetBool(sSameOriginPolicyPrefName, true);
|
||||
mFileURIWhitelist.reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ private:
|
||||
|
||||
// Decides, based on CSP, whether or not eval() and stuff can be executed.
|
||||
static bool
|
||||
ContentSecurityPolicyPermitsJSAction(JSContext *cx);
|
||||
ContentSecurityPolicyPermitsJSAction(JSContext *cx, JS::HandleValue aValue);
|
||||
|
||||
static bool
|
||||
JSPrincipalsSubsume(JSPrincipals *first, JSPrincipals *second);
|
||||
@@ -152,6 +152,7 @@ private:
|
||||
}
|
||||
|
||||
static bool sStrictFileOriginPolicy;
|
||||
static bool sSameOriginPolicy;
|
||||
|
||||
static nsIIOService *sIOService;
|
||||
static nsIStringBundle *sStrBundle;
|
||||
|
||||
+5
-33
@@ -526,45 +526,17 @@ EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
|
||||
endif
|
||||
EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB)
|
||||
|
||||
# $(call CHECK_SYMBOLS,lib,PREFIX,dep_name,test)
|
||||
# Checks that the given `lib` doesn't contain dependency on symbols with a
|
||||
# version starting with `PREFIX`_ and matching the `test`. `dep_name` is only
|
||||
# used for the error message.
|
||||
# `test` is an awk expression using the information in the variable `v` which
|
||||
# contains a list of version items ([major, minor, ...]).
|
||||
define CHECK_SYMBOLS
|
||||
@$(TOOLCHAIN_PREFIX)readelf -sW $(1) | \
|
||||
awk '$$8 ~ /@$(2)_/ { \
|
||||
split($$8,a,"@"); \
|
||||
split(a[2],b,"_"); \
|
||||
split(b[2],v,"."); \
|
||||
if ($(4)) { \
|
||||
if (!found) { \
|
||||
print "TEST-UNEXPECTED-FAIL | check_stdcxx | We do not want these $(3) symbol versions to be used:" \
|
||||
} \
|
||||
print " ",$$8; \
|
||||
found=1 \
|
||||
} \
|
||||
} \
|
||||
END { \
|
||||
if (found) { \
|
||||
exit(1) \
|
||||
} \
|
||||
}'
|
||||
endef
|
||||
|
||||
ifneq (,$(MOZ_LIBSTDCXX_TARGET_VERSION)$(MOZ_LIBSTDCXX_HOST_VERSION))
|
||||
CHECK_STDCXX = $(call CHECK_SYMBOLS,$(1),GLIBCXX,libstdc++,v[1] > 3 || (v[1] == 3 && v[2] == 4 && v[3] > 16))
|
||||
CHECK_GLIBC = $(call CHECK_SYMBOLS,$(1),GLIBC,libc,v[1] > 2 || (v[1] == 2 && v[2] > 12))
|
||||
ifeq ($(OS_ARCH),SunOS)
|
||||
ELF_TEST = elfdump -N .dynamic $(1)
|
||||
else
|
||||
ELF_TEST = $(TOOLCHAIN_PREFIX)readelf -d $(1)
|
||||
endif
|
||||
|
||||
ifeq (,$(filter $(OS_TARGET),WINNT Darwin))
|
||||
CHECK_TEXTREL = @$(TOOLCHAIN_PREFIX)readelf -d $(1) | grep TEXTREL > /dev/null && echo 'TEST-UNEXPECTED-FAIL | check_textrel | We do not want text relocations in libraries and programs' || true
|
||||
CHECK_TEXTREL = @$(ELF_TEST) | grep TEXTREL > /dev/null && echo 'TEST-UNEXPECTED-FAIL | check_textrel | We do not want text relocations in libraries and programs' || true
|
||||
endif
|
||||
|
||||
define CHECK_BINARY
|
||||
$(call CHECK_GLIBC,$(1))
|
||||
$(call CHECK_STDCXX,$(1))
|
||||
$(call CHECK_TEXTREL,$(1))
|
||||
$(call LOCAL_CHECKS,$(1))
|
||||
$(call CHECK_MOZGLUE_ORDER,$(1))
|
||||
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Library('freetype')
|
||||
|
||||
if CONFIG['MOZ_TREE_FREETYPE']:
|
||||
USE_LIBS += [
|
||||
'static:/modules/freetype2/.libs/freetype',
|
||||
]
|
||||
else:
|
||||
OS_LIBS += CONFIG['FT2_LIBS']
|
||||
Vendored
+2
@@ -15,3 +15,5 @@ LOCAL_INCLUDES += ['/intl/icu/source/i18n']
|
||||
|
||||
include('../defs.mozbuild')
|
||||
include('sources.mozbuild')
|
||||
|
||||
SOURCES += sources
|
||||
+30
-29
@@ -1,5 +1,5 @@
|
||||
# THIS FILE IS GENERATED BY /intl/icu_sources_data.py DO NOT EDIT
|
||||
SOURCES += [
|
||||
sources = [
|
||||
'/intl/icu/source/common/appendable.cpp',
|
||||
'/intl/icu/source/common/bmpset.cpp',
|
||||
'/intl/icu/source/common/brkeng.cpp',
|
||||
@@ -8,15 +8,12 @@ SOURCES += [
|
||||
'/intl/icu/source/common/bytestream.cpp',
|
||||
'/intl/icu/source/common/bytestrie.cpp',
|
||||
'/intl/icu/source/common/bytestriebuilder.cpp',
|
||||
'/intl/icu/source/common/bytestrieiterator.cpp',
|
||||
'/intl/icu/source/common/caniter.cpp',
|
||||
'/intl/icu/source/common/characterproperties.cpp',
|
||||
'/intl/icu/source/common/chariter.cpp',
|
||||
'/intl/icu/source/common/charstr.cpp',
|
||||
'/intl/icu/source/common/cmemory.cpp',
|
||||
'/intl/icu/source/common/cstr.cpp',
|
||||
'/intl/icu/source/common/cstring.cpp',
|
||||
'/intl/icu/source/common/cwchar.cpp',
|
||||
'/intl/icu/source/common/dictbe.cpp',
|
||||
'/intl/icu/source/common/dictionarydata.cpp',
|
||||
'/intl/icu/source/common/dtintrv.cpp',
|
||||
@@ -24,8 +21,6 @@ SOURCES += [
|
||||
'/intl/icu/source/common/errorcode.cpp',
|
||||
'/intl/icu/source/common/filteredbrk.cpp',
|
||||
'/intl/icu/source/common/filterednormalizer2.cpp',
|
||||
'/intl/icu/source/common/icudataver.cpp',
|
||||
'/intl/icu/source/common/icuplug.cpp',
|
||||
'/intl/icu/source/common/loadednormalizer2impl.cpp',
|
||||
'/intl/icu/source/common/locavailable.cpp',
|
||||
'/intl/icu/source/common/locbased.cpp',
|
||||
@@ -42,9 +37,7 @@ SOURCES += [
|
||||
'/intl/icu/source/common/normlzr.cpp',
|
||||
'/intl/icu/source/common/parsepos.cpp',
|
||||
'/intl/icu/source/common/patternprops.cpp',
|
||||
'/intl/icu/source/common/pluralmap.cpp',
|
||||
'/intl/icu/source/common/propname.cpp',
|
||||
'/intl/icu/source/common/propsvec.cpp',
|
||||
'/intl/icu/source/common/punycode.cpp',
|
||||
'/intl/icu/source/common/putil.cpp',
|
||||
'/intl/icu/source/common/rbbi.cpp',
|
||||
@@ -57,7 +50,6 @@ SOURCES += [
|
||||
'/intl/icu/source/common/rbbistbl.cpp',
|
||||
'/intl/icu/source/common/rbbitblb.cpp',
|
||||
'/intl/icu/source/common/resbund.cpp',
|
||||
'/intl/icu/source/common/resbund_cnv.cpp',
|
||||
'/intl/icu/source/common/resource.cpp',
|
||||
'/intl/icu/source/common/ruleiter.cpp',
|
||||
'/intl/icu/source/common/schriter.cpp',
|
||||
@@ -77,13 +69,11 @@ SOURCES += [
|
||||
'/intl/icu/source/common/ubidi.cpp',
|
||||
'/intl/icu/source/common/ubidi_props.cpp',
|
||||
'/intl/icu/source/common/ubidiln.cpp',
|
||||
'/intl/icu/source/common/ubiditransform.cpp',
|
||||
'/intl/icu/source/common/ubidiwrt.cpp',
|
||||
'/intl/icu/source/common/ubrk.cpp',
|
||||
'/intl/icu/source/common/ucase.cpp',
|
||||
'/intl/icu/source/common/ucasemap.cpp',
|
||||
'/intl/icu/source/common/ucasemap_titlecase_brkiter.cpp',
|
||||
'/intl/icu/source/common/ucat.cpp',
|
||||
'/intl/icu/source/common/uchar.cpp',
|
||||
'/intl/icu/source/common/ucharstrie.cpp',
|
||||
'/intl/icu/source/common/ucharstriebuilder.cpp',
|
||||
@@ -92,28 +82,18 @@ SOURCES += [
|
||||
'/intl/icu/source/common/ucln_cmn.cpp',
|
||||
'/intl/icu/source/common/ucmndata.cpp',
|
||||
'/intl/icu/source/common/ucnv.cpp',
|
||||
'/intl/icu/source/common/ucnv2022.cpp',
|
||||
'/intl/icu/source/common/ucnv_bld.cpp',
|
||||
'/intl/icu/source/common/ucnv_cb.cpp',
|
||||
'/intl/icu/source/common/ucnv_cnv.cpp',
|
||||
'/intl/icu/source/common/ucnv_ct.cpp',
|
||||
'/intl/icu/source/common/ucnv_err.cpp',
|
||||
'/intl/icu/source/common/ucnv_ext.cpp',
|
||||
'/intl/icu/source/common/ucnv_io.cpp',
|
||||
'/intl/icu/source/common/ucnv_lmb.cpp',
|
||||
'/intl/icu/source/common/ucnv_set.cpp',
|
||||
'/intl/icu/source/common/ucnv_u16.cpp',
|
||||
'/intl/icu/source/common/ucnv_u32.cpp',
|
||||
'/intl/icu/source/common/ucnv_u7.cpp',
|
||||
'/intl/icu/source/common/ucnv_u8.cpp',
|
||||
'/intl/icu/source/common/ucnvbocu.cpp',
|
||||
'/intl/icu/source/common/ucnvdisp.cpp',
|
||||
'/intl/icu/source/common/ucnvhz.cpp',
|
||||
'/intl/icu/source/common/ucnvisci.cpp',
|
||||
'/intl/icu/source/common/ucnvlat1.cpp',
|
||||
'/intl/icu/source/common/ucnvmbcs.cpp',
|
||||
'/intl/icu/source/common/ucnvscsu.cpp',
|
||||
'/intl/icu/source/common/ucnvsel.cpp',
|
||||
'/intl/icu/source/common/ucol_swp.cpp',
|
||||
'/intl/icu/source/common/ucptrie.cpp',
|
||||
'/intl/icu/source/common/ucurr.cpp',
|
||||
@@ -123,7 +103,6 @@ SOURCES += [
|
||||
'/intl/icu/source/common/uenum.cpp',
|
||||
'/intl/icu/source/common/uhash.cpp',
|
||||
'/intl/icu/source/common/uhash_us.cpp',
|
||||
'/intl/icu/source/common/uidna.cpp',
|
||||
'/intl/icu/source/common/uinit.cpp',
|
||||
'/intl/icu/source/common/uinvchar.cpp',
|
||||
'/intl/icu/source/common/uiter.cpp',
|
||||
@@ -149,25 +128,20 @@ SOURCES += [
|
||||
'/intl/icu/source/common/unistr_cnv.cpp',
|
||||
'/intl/icu/source/common/unistr_props.cpp',
|
||||
'/intl/icu/source/common/unistr_titlecase_brkiter.cpp',
|
||||
'/intl/icu/source/common/unorm.cpp',
|
||||
'/intl/icu/source/common/unormcmp.cpp',
|
||||
'/intl/icu/source/common/uobject.cpp',
|
||||
'/intl/icu/source/common/uprops.cpp',
|
||||
'/intl/icu/source/common/ures_cnv.cpp',
|
||||
'/intl/icu/source/common/uresbund.cpp',
|
||||
'/intl/icu/source/common/uresdata.cpp',
|
||||
'/intl/icu/source/common/usc_impl.cpp',
|
||||
'/intl/icu/source/common/uscript.cpp',
|
||||
'/intl/icu/source/common/uscript_props.cpp',
|
||||
'/intl/icu/source/common/uset.cpp',
|
||||
'/intl/icu/source/common/uset_props.cpp',
|
||||
'/intl/icu/source/common/usetiter.cpp',
|
||||
'/intl/icu/source/common/ushape.cpp',
|
||||
'/intl/icu/source/common/usprep.cpp',
|
||||
'/intl/icu/source/common/ustack.cpp',
|
||||
'/intl/icu/source/common/ustr_cnv.cpp',
|
||||
'/intl/icu/source/common/ustr_titlecase_brkiter.cpp',
|
||||
'/intl/icu/source/common/ustr_wcs.cpp',
|
||||
'/intl/icu/source/common/ustrcase.cpp',
|
||||
'/intl/icu/source/common/ustrcase_locale.cpp',
|
||||
'/intl/icu/source/common/ustrenum.cpp',
|
||||
@@ -177,7 +151,6 @@ SOURCES += [
|
||||
'/intl/icu/source/common/utext.cpp',
|
||||
'/intl/icu/source/common/utf_impl.cpp',
|
||||
'/intl/icu/source/common/util.cpp',
|
||||
'/intl/icu/source/common/util_props.cpp',
|
||||
'/intl/icu/source/common/utrace.cpp',
|
||||
'/intl/icu/source/common/utrie.cpp',
|
||||
'/intl/icu/source/common/utrie2.cpp',
|
||||
@@ -190,7 +163,35 @@ SOURCES += [
|
||||
'/intl/icu/source/common/uvectr64.cpp',
|
||||
'/intl/icu/source/common/wintz.cpp',
|
||||
]
|
||||
|
||||
other_sources = [
|
||||
'/intl/icu/source/common/bytestrieiterator.cpp',
|
||||
'/intl/icu/source/common/cstr.cpp',
|
||||
'/intl/icu/source/common/cwchar.cpp',
|
||||
'/intl/icu/source/common/icudataver.cpp',
|
||||
'/intl/icu/source/common/icuplug.cpp',
|
||||
'/intl/icu/source/common/pluralmap.cpp',
|
||||
'/intl/icu/source/common/propsvec.cpp',
|
||||
'/intl/icu/source/common/resbund_cnv.cpp',
|
||||
'/intl/icu/source/common/ubiditransform.cpp',
|
||||
'/intl/icu/source/common/ucat.cpp',
|
||||
'/intl/icu/source/common/ucnv2022.cpp',
|
||||
'/intl/icu/source/common/ucnv_ct.cpp',
|
||||
'/intl/icu/source/common/ucnv_ext.cpp',
|
||||
'/intl/icu/source/common/ucnv_lmb.cpp',
|
||||
'/intl/icu/source/common/ucnv_set.cpp',
|
||||
'/intl/icu/source/common/ucnvdisp.cpp',
|
||||
'/intl/icu/source/common/ucnvhz.cpp',
|
||||
'/intl/icu/source/common/ucnvisci.cpp',
|
||||
'/intl/icu/source/common/ucnvmbcs.cpp',
|
||||
'/intl/icu/source/common/ucnvsel.cpp',
|
||||
'/intl/icu/source/common/uidna.cpp',
|
||||
'/intl/icu/source/common/unorm.cpp',
|
||||
'/intl/icu/source/common/ures_cnv.cpp',
|
||||
'/intl/icu/source/common/usc_impl.cpp',
|
||||
'/intl/icu/source/common/ushape.cpp',
|
||||
'/intl/icu/source/common/ustr_wcs.cpp',
|
||||
'/intl/icu/source/common/util_props.cpp',
|
||||
]
|
||||
EXPORTS.unicode += [
|
||||
'/intl/icu/source/common/unicode/appendable.h',
|
||||
'/intl/icu/source/common/unicode/brkiter.h',
|
||||
|
||||
BIN
Binary file not shown.
Vendored
+14
-5
@@ -3,10 +3,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
# Copy the pre-built ICU data file to dist/bin.
|
||||
FINAL_TARGET_FILES += [CONFIG['ICU_DATA_FILE']]
|
||||
|
||||
# Build a library containing the ICU data for use in the JS shell, so that
|
||||
# JSAPI consumers don't have to deal with setting ICU's data path.
|
||||
Library('icudata')
|
||||
@@ -17,8 +13,13 @@ if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
elif CONFIG['OS_ARCH'] == 'Darwin':
|
||||
ASFLAGS += ['-DPREFIX']
|
||||
|
||||
data_file = {
|
||||
'little': 'icudt%sl.dat' % CONFIG['MOZ_ICU_VERSION'],
|
||||
'big': 'icudt%sb.dat' % CONFIG['MOZ_ICU_VERSION'],
|
||||
}
|
||||
|
||||
ASFLAGS += [
|
||||
'-DICU_DATA_FILE="%s"' % CONFIG['ICU_DATA_FILE'],
|
||||
'-DICU_DATA_FILE="%s"' % data_file[CONFIG['TARGET_ENDIANNESS']],
|
||||
'-DICU_DATA_SYMBOL=icudt%s_dat' % CONFIG['MOZ_ICU_VERSION'],
|
||||
]
|
||||
LOCAL_INCLUDES += ['.']
|
||||
@@ -26,5 +27,13 @@ LOCAL_INCLUDES += ['.']
|
||||
if CONFIG['HAVE_YASM']:
|
||||
USE_YASM = True
|
||||
SOURCES += ['icudata.s']
|
||||
elif CONFIG['OS_ARCH'] == 'Darwin':
|
||||
if CONFIG['CPU_ARCH'] != 'ppc':
|
||||
SOURCES += ['icudata_gas.S']
|
||||
elif CONFIG['GNU_AS']:
|
||||
SOURCES += ['icudata_gas.S']
|
||||
|
||||
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
# Copy the pre-built ICU data file to dist/bin.
|
||||
FINAL_TARGET_FILES += [data_file[CONFIG['TARGET_ENDIANNESS']]]
|
||||
|
||||
Vendored
+3
@@ -12,3 +12,6 @@ LOCAL_INCLUDES += ['/intl/icu/source/common']
|
||||
|
||||
include('../defs.mozbuild')
|
||||
include('sources.mozbuild')
|
||||
|
||||
SOURCES += sources
|
||||
|
||||
+58
-57
@@ -1,14 +1,10 @@
|
||||
# THIS FILE IS GENERATED BY /intl/icu_sources_data.py DO NOT EDIT
|
||||
SOURCES += [
|
||||
'/intl/icu/source/i18n/alphaindex.cpp',
|
||||
'/intl/icu/source/i18n/anytrans.cpp',
|
||||
sources = [
|
||||
'/intl/icu/source/i18n/astro.cpp',
|
||||
'/intl/icu/source/i18n/basictz.cpp',
|
||||
'/intl/icu/source/i18n/bocsu.cpp',
|
||||
'/intl/icu/source/i18n/brktrans.cpp',
|
||||
'/intl/icu/source/i18n/buddhcal.cpp',
|
||||
'/intl/icu/source/i18n/calendar.cpp',
|
||||
'/intl/icu/source/i18n/casetrn.cpp',
|
||||
'/intl/icu/source/i18n/cecal.cpp',
|
||||
'/intl/icu/source/i18n/chnsecal.cpp',
|
||||
'/intl/icu/source/i18n/choicfmt.cpp',
|
||||
@@ -35,15 +31,6 @@ SOURCES += [
|
||||
'/intl/icu/source/i18n/collationweights.cpp',
|
||||
'/intl/icu/source/i18n/compactdecimalformat.cpp',
|
||||
'/intl/icu/source/i18n/coptccal.cpp',
|
||||
'/intl/icu/source/i18n/cpdtrans.cpp',
|
||||
'/intl/icu/source/i18n/csdetect.cpp',
|
||||
'/intl/icu/source/i18n/csmatch.cpp',
|
||||
'/intl/icu/source/i18n/csr2022.cpp',
|
||||
'/intl/icu/source/i18n/csrecog.cpp',
|
||||
'/intl/icu/source/i18n/csrmbcs.cpp',
|
||||
'/intl/icu/source/i18n/csrsbcs.cpp',
|
||||
'/intl/icu/source/i18n/csrucode.cpp',
|
||||
'/intl/icu/source/i18n/csrutf8.cpp',
|
||||
'/intl/icu/source/i18n/curramt.cpp',
|
||||
'/intl/icu/source/i18n/currfmt.cpp',
|
||||
'/intl/icu/source/i18n/currpinf.cpp',
|
||||
@@ -68,20 +55,15 @@ SOURCES += [
|
||||
'/intl/icu/source/i18n/dtptngen.cpp',
|
||||
'/intl/icu/source/i18n/dtrule.cpp',
|
||||
'/intl/icu/source/i18n/erarules.cpp',
|
||||
'/intl/icu/source/i18n/esctrn.cpp',
|
||||
'/intl/icu/source/i18n/ethpccal.cpp',
|
||||
'/intl/icu/source/i18n/fmtable.cpp',
|
||||
'/intl/icu/source/i18n/fmtable_cnv.cpp',
|
||||
'/intl/icu/source/i18n/format.cpp',
|
||||
'/intl/icu/source/i18n/fphdlimp.cpp',
|
||||
'/intl/icu/source/i18n/fpositer.cpp',
|
||||
'/intl/icu/source/i18n/funcrepl.cpp',
|
||||
'/intl/icu/source/i18n/gender.cpp',
|
||||
'/intl/icu/source/i18n/gregocal.cpp',
|
||||
'/intl/icu/source/i18n/gregoimp.cpp',
|
||||
'/intl/icu/source/i18n/hebrwcal.cpp',
|
||||
'/intl/icu/source/i18n/indiancal.cpp',
|
||||
'/intl/icu/source/i18n/inputext.cpp',
|
||||
'/intl/icu/source/i18n/islamcal.cpp',
|
||||
'/intl/icu/source/i18n/japancal.cpp',
|
||||
'/intl/icu/source/i18n/listformatter.cpp',
|
||||
@@ -89,13 +71,10 @@ SOURCES += [
|
||||
'/intl/icu/source/i18n/measunit.cpp',
|
||||
'/intl/icu/source/i18n/measure.cpp',
|
||||
'/intl/icu/source/i18n/msgfmt.cpp',
|
||||
'/intl/icu/source/i18n/name2uni.cpp',
|
||||
'/intl/icu/source/i18n/nfrs.cpp',
|
||||
'/intl/icu/source/i18n/nfrule.cpp',
|
||||
'/intl/icu/source/i18n/nfsubs.cpp',
|
||||
'/intl/icu/source/i18n/nortrans.cpp',
|
||||
'/intl/icu/source/i18n/nounit.cpp',
|
||||
'/intl/icu/source/i18n/nultrans.cpp',
|
||||
'/intl/icu/source/i18n/number_affixutils.cpp',
|
||||
'/intl/icu/source/i18n/number_asformat.cpp',
|
||||
'/intl/icu/source/i18n/number_capi.cpp',
|
||||
@@ -138,27 +117,13 @@ SOURCES += [
|
||||
'/intl/icu/source/i18n/persncal.cpp',
|
||||
'/intl/icu/source/i18n/plurfmt.cpp',
|
||||
'/intl/icu/source/i18n/plurrule.cpp',
|
||||
'/intl/icu/source/i18n/quant.cpp',
|
||||
'/intl/icu/source/i18n/quantityformatter.cpp',
|
||||
'/intl/icu/source/i18n/rbnf.cpp',
|
||||
'/intl/icu/source/i18n/rbt.cpp',
|
||||
'/intl/icu/source/i18n/rbt_data.cpp',
|
||||
'/intl/icu/source/i18n/rbt_pars.cpp',
|
||||
'/intl/icu/source/i18n/rbt_rule.cpp',
|
||||
'/intl/icu/source/i18n/rbt_set.cpp',
|
||||
'/intl/icu/source/i18n/rbtz.cpp',
|
||||
'/intl/icu/source/i18n/regexcmp.cpp',
|
||||
'/intl/icu/source/i18n/regeximp.cpp',
|
||||
'/intl/icu/source/i18n/regexst.cpp',
|
||||
'/intl/icu/source/i18n/regextxt.cpp',
|
||||
'/intl/icu/source/i18n/region.cpp',
|
||||
'/intl/icu/source/i18n/reldatefmt.cpp',
|
||||
'/intl/icu/source/i18n/reldtfmt.cpp',
|
||||
'/intl/icu/source/i18n/rematch.cpp',
|
||||
'/intl/icu/source/i18n/remtrans.cpp',
|
||||
'/intl/icu/source/i18n/repattrn.cpp',
|
||||
'/intl/icu/source/i18n/rulebasedcollator.cpp',
|
||||
'/intl/icu/source/i18n/scientificnumberformatter.cpp',
|
||||
'/intl/icu/source/i18n/scriptset.cpp',
|
||||
'/intl/icu/source/i18n/search.cpp',
|
||||
'/intl/icu/source/i18n/selfmt.cpp',
|
||||
@@ -168,20 +133,12 @@ SOURCES += [
|
||||
'/intl/icu/source/i18n/smpdtfst.cpp',
|
||||
'/intl/icu/source/i18n/sortkey.cpp',
|
||||
'/intl/icu/source/i18n/standardplural.cpp',
|
||||
'/intl/icu/source/i18n/strmatch.cpp',
|
||||
'/intl/icu/source/i18n/strrepl.cpp',
|
||||
'/intl/icu/source/i18n/stsearch.cpp',
|
||||
'/intl/icu/source/i18n/taiwncal.cpp',
|
||||
'/intl/icu/source/i18n/timezone.cpp',
|
||||
'/intl/icu/source/i18n/titletrn.cpp',
|
||||
'/intl/icu/source/i18n/tmunit.cpp',
|
||||
'/intl/icu/source/i18n/tmutamt.cpp',
|
||||
'/intl/icu/source/i18n/tmutfmt.cpp',
|
||||
'/intl/icu/source/i18n/tolowtrn.cpp',
|
||||
'/intl/icu/source/i18n/toupptrn.cpp',
|
||||
'/intl/icu/source/i18n/translit.cpp',
|
||||
'/intl/icu/source/i18n/transreg.cpp',
|
||||
'/intl/icu/source/i18n/tridpars.cpp',
|
||||
'/intl/icu/source/i18n/tzfmt.cpp',
|
||||
'/intl/icu/source/i18n/tzgnames.cpp',
|
||||
'/intl/icu/source/i18n/tznames.cpp',
|
||||
@@ -194,42 +151,86 @@ SOURCES += [
|
||||
'/intl/icu/source/i18n/ucol_res.cpp',
|
||||
'/intl/icu/source/i18n/ucol_sit.cpp',
|
||||
'/intl/icu/source/i18n/ucoleitr.cpp',
|
||||
'/intl/icu/source/i18n/ucsdet.cpp',
|
||||
'/intl/icu/source/i18n/udat.cpp',
|
||||
'/intl/icu/source/i18n/udateintervalformat.cpp',
|
||||
'/intl/icu/source/i18n/udatpg.cpp',
|
||||
'/intl/icu/source/i18n/ufieldpositer.cpp',
|
||||
'/intl/icu/source/i18n/uitercollationiterator.cpp',
|
||||
'/intl/icu/source/i18n/ulistformatter.cpp',
|
||||
'/intl/icu/source/i18n/ulocdata.cpp',
|
||||
'/intl/icu/source/i18n/umsg.cpp',
|
||||
'/intl/icu/source/i18n/unesctrn.cpp',
|
||||
'/intl/icu/source/i18n/uni2name.cpp',
|
||||
'/intl/icu/source/i18n/unum.cpp',
|
||||
'/intl/icu/source/i18n/unumsys.cpp',
|
||||
'/intl/icu/source/i18n/upluralrules.cpp',
|
||||
'/intl/icu/source/i18n/uregex.cpp',
|
||||
'/intl/icu/source/i18n/uregexc.cpp',
|
||||
'/intl/icu/source/i18n/uregion.cpp',
|
||||
'/intl/icu/source/i18n/usearch.cpp',
|
||||
'/intl/icu/source/i18n/uspoof.cpp',
|
||||
'/intl/icu/source/i18n/uspoof_build.cpp',
|
||||
'/intl/icu/source/i18n/uspoof_conf.cpp',
|
||||
'/intl/icu/source/i18n/uspoof_impl.cpp',
|
||||
'/intl/icu/source/i18n/utf16collationiterator.cpp',
|
||||
'/intl/icu/source/i18n/utf8collationiterator.cpp',
|
||||
'/intl/icu/source/i18n/utmscale.cpp',
|
||||
'/intl/icu/source/i18n/utrans.cpp',
|
||||
'/intl/icu/source/i18n/vtzone.cpp',
|
||||
'/intl/icu/source/i18n/vzone.cpp',
|
||||
'/intl/icu/source/i18n/windtfmt.cpp',
|
||||
'/intl/icu/source/i18n/winnmfmt.cpp',
|
||||
'/intl/icu/source/i18n/wintzimpl.cpp',
|
||||
'/intl/icu/source/i18n/zonemeta.cpp',
|
||||
]
|
||||
other_sources = [
|
||||
'/intl/icu/source/i18n/alphaindex.cpp',
|
||||
'/intl/icu/source/i18n/anytrans.cpp',
|
||||
'/intl/icu/source/i18n/brktrans.cpp',
|
||||
'/intl/icu/source/i18n/casetrn.cpp',
|
||||
'/intl/icu/source/i18n/cpdtrans.cpp',
|
||||
'/intl/icu/source/i18n/csdetect.cpp',
|
||||
'/intl/icu/source/i18n/csmatch.cpp',
|
||||
'/intl/icu/source/i18n/csr2022.cpp',
|
||||
'/intl/icu/source/i18n/csrecog.cpp',
|
||||
'/intl/icu/source/i18n/csrmbcs.cpp',
|
||||
'/intl/icu/source/i18n/csrsbcs.cpp',
|
||||
'/intl/icu/source/i18n/csrucode.cpp',
|
||||
'/intl/icu/source/i18n/csrutf8.cpp',
|
||||
'/intl/icu/source/i18n/esctrn.cpp',
|
||||
'/intl/icu/source/i18n/fmtable_cnv.cpp',
|
||||
'/intl/icu/source/i18n/funcrepl.cpp',
|
||||
'/intl/icu/source/i18n/gender.cpp',
|
||||
'/intl/icu/source/i18n/inputext.cpp',
|
||||
'/intl/icu/source/i18n/name2uni.cpp',
|
||||
'/intl/icu/source/i18n/nortrans.cpp',
|
||||
'/intl/icu/source/i18n/nultrans.cpp',
|
||||
'/intl/icu/source/i18n/quant.cpp',
|
||||
'/intl/icu/source/i18n/rbt.cpp',
|
||||
'/intl/icu/source/i18n/rbt_data.cpp',
|
||||
'/intl/icu/source/i18n/rbt_pars.cpp',
|
||||
'/intl/icu/source/i18n/rbt_rule.cpp',
|
||||
'/intl/icu/source/i18n/rbt_set.cpp',
|
||||
'/intl/icu/source/i18n/regexcmp.cpp',
|
||||
'/intl/icu/source/i18n/regeximp.cpp',
|
||||
'/intl/icu/source/i18n/regexst.cpp',
|
||||
'/intl/icu/source/i18n/regextxt.cpp',
|
||||
'/intl/icu/source/i18n/rematch.cpp',
|
||||
'/intl/icu/source/i18n/remtrans.cpp',
|
||||
'/intl/icu/source/i18n/repattrn.cpp',
|
||||
'/intl/icu/source/i18n/scientificnumberformatter.cpp',
|
||||
'/intl/icu/source/i18n/strmatch.cpp',
|
||||
'/intl/icu/source/i18n/strrepl.cpp',
|
||||
'/intl/icu/source/i18n/titletrn.cpp',
|
||||
'/intl/icu/source/i18n/tolowtrn.cpp',
|
||||
'/intl/icu/source/i18n/toupptrn.cpp',
|
||||
'/intl/icu/source/i18n/translit.cpp',
|
||||
'/intl/icu/source/i18n/transreg.cpp',
|
||||
'/intl/icu/source/i18n/tridpars.cpp',
|
||||
'/intl/icu/source/i18n/ucsdet.cpp',
|
||||
'/intl/icu/source/i18n/udateintervalformat.cpp',
|
||||
'/intl/icu/source/i18n/ulocdata.cpp',
|
||||
'/intl/icu/source/i18n/unesctrn.cpp',
|
||||
'/intl/icu/source/i18n/uni2name.cpp',
|
||||
'/intl/icu/source/i18n/uregex.cpp',
|
||||
'/intl/icu/source/i18n/uregexc.cpp',
|
||||
'/intl/icu/source/i18n/uregion.cpp',
|
||||
'/intl/icu/source/i18n/uspoof_build.cpp',
|
||||
'/intl/icu/source/i18n/uspoof_conf.cpp',
|
||||
'/intl/icu/source/i18n/utrans.cpp',
|
||||
'/intl/icu/source/i18n/vzone.cpp',
|
||||
'/intl/icu/source/i18n/zrule.cpp',
|
||||
'/intl/icu/source/i18n/ztrans.cpp',
|
||||
]
|
||||
|
||||
EXPORTS.unicode += [
|
||||
'/intl/icu/source/i18n/unicode/alphaindex.h',
|
||||
'/intl/icu/source/i18n/unicode/basictz.h',
|
||||
|
||||
Vendored
+2
-2
@@ -46,7 +46,7 @@ elif CONFIG['OS_TARGET'] == 'Darwin':
|
||||
)
|
||||
SOURCES += [
|
||||
'/nsprpub/pr/src/md/unix/darwin.c',
|
||||
'/nsprpub/pr/src/md/unix/os_Darwin.s',
|
||||
'/nsprpub/pr/src/md/unix/os_Darwin.S',
|
||||
]
|
||||
if not CONFIG['MOZ_IOS']:
|
||||
DEFINES['HAVE_CRT_EXTERNS_H'] = True
|
||||
@@ -85,7 +85,7 @@ elif CONFIG['OS_TARGET'] == 'WINNT':
|
||||
else:
|
||||
DEFINES['_X86_'] = True
|
||||
else:
|
||||
error('Not a supported OS_TARGET for NSPR in moz.build: "%s". Use --with-system-nspr' % CONFIG['OS_TARGET'])
|
||||
error('Not a supported OS_TARGET for NSPR in moz.build: "%s". Cannot build.' % CONFIG['OS_TARGET'])
|
||||
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
# Referenced by milestone.py.
|
||||
#--------------------------------------------------------
|
||||
|
||||
6.5.0
|
||||
6.7.0
|
||||
@@ -155,8 +155,10 @@ endif
|
||||
# Interdependencies that moz.build world don't know about yet for compilation.
|
||||
# Note some others are hardcoded or "guessed" in recursivemake.py and emitter.py
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk3)
|
||||
ifdef MOZ_ENABLE_NPAPI
|
||||
toolkit/library/target: widget/gtk/mozgtk/gtk3/target
|
||||
endif
|
||||
endif
|
||||
ifdef MOZ_LDAP_XPCOM
|
||||
ldap/target: security/target mozglue/build/target
|
||||
toolkit/library/target: ldap/target
|
||||
|
||||
+4
-6
@@ -411,6 +411,10 @@ EXTRA_DSO_LDOPTS += -Wl,--version-script,$(SYMBOLS_FILE)
|
||||
else
|
||||
ifeq ($(OS_TARGET),Darwin)
|
||||
EXTRA_DSO_LDOPTS += -Wl,-exported_symbols_list,$(SYMBOLS_FILE)
|
||||
else
|
||||
ifeq ($(OS_TARGET),SunOS)
|
||||
EXTRA_DSO_LDOPTS += -Wl,-M,$(SYMBOLS_FILE)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -667,9 +671,6 @@ else
|
||||
$(EXPAND_LIBS_EXEC) -- $(HOST_CC) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
endif # HOST_CPP_PROG_LINK
|
||||
endif
|
||||
ifndef CROSS_COMPILE
|
||||
$(call CHECK_STDCXX,$@)
|
||||
endif
|
||||
|
||||
#
|
||||
# This is an attempt to support generation of multiple binaries
|
||||
@@ -712,9 +713,6 @@ else
|
||||
$(EXPAND_LIBS_EXEC) -- $(HOST_CC) $(HOST_OUTOPTION)$@ $(HOST_CFLAGS) $(INCLUDES) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
endif
|
||||
endif
|
||||
ifndef CROSS_COMPILE
|
||||
$(call CHECK_STDCXX,$@)
|
||||
endif
|
||||
|
||||
ifdef DTRACE_PROBE_OBJ
|
||||
EXTRA_DEPS += $(DTRACE_PROBE_OBJ)
|
||||
|
||||
+9
-34
@@ -1,39 +1,14 @@
|
||||
This directory contains source code to
|
||||
This is the SQLite amalgamation.
|
||||
Check sqlite3.h for the version number and source id.
|
||||
|
||||
SQLite: An Embeddable SQL Database Engine
|
||||
See http://www.sqlite.org/ for more info.
|
||||
|
||||
To compile the project, first create a directory in which to place
|
||||
the build products. It is recommended, but not required, that the
|
||||
build directory be separate from the source directory. Cd into the
|
||||
build directory and then from the build directory run the configure
|
||||
script found at the root of the source tree. Then run "make".
|
||||
We have a UXP-specific moz.build in src/ (normally not there) that we
|
||||
use to build. Adfditionally, src/ contains sqlite.symbols which lists
|
||||
all explicitly exported symbols from the library to expose.
|
||||
|
||||
For example:
|
||||
To move to a new version:
|
||||
|
||||
tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite"
|
||||
mkdir bld ;# Build will occur in a sibling directory
|
||||
cd bld ;# Change to the build directory
|
||||
../sqlite/configure ;# Run the configure script
|
||||
make ;# Run the makefile.
|
||||
make install ;# (Optional) Install the build products
|
||||
Copy the sqlite3.h and sqlite3.c files from the amalgamation of sqlite.
|
||||
|
||||
The configure script uses autoconf 2.61 and libtool. If the configure
|
||||
script does not work out for you, there is a generic makefile named
|
||||
"Makefile.linux-gcc" in the top directory of the source tree that you
|
||||
can copy and edit to suit your needs. Comments on the generic makefile
|
||||
show what changes are needed.
|
||||
|
||||
The linux binaries on the website are created using the generic makefile,
|
||||
not the configure script. The windows binaries on the website are created
|
||||
using MinGW32 configured as a cross-compiler running under Linux. For
|
||||
details, see the ./publish.sh script at the top-level of the source tree.
|
||||
The developers do not use teh configure script.
|
||||
|
||||
SQLite does not require TCL to run, but a TCL installation is required
|
||||
by the makefiles. SQLite contains a lot of generated code and TCL is
|
||||
used to do much of that code generation. The makefile also requires
|
||||
AWK.
|
||||
|
||||
Contacts:
|
||||
|
||||
http://www.sqlite.org/
|
||||
Be sure to update SQLITE_VERSION accordingly in $(topsrcdir)/old-configure.in.
|
||||
@@ -1,13 +0,0 @@
|
||||
This is the SQLite amalgamation.
|
||||
Check sqlite3.h for the version number and source id.
|
||||
|
||||
See http://www.sqlite.org/ for more info.
|
||||
|
||||
We have a mozilla-specific Makefile.in in src/ (normally no
|
||||
Makefile.in there) that we use to build.
|
||||
|
||||
To move to a new version:
|
||||
|
||||
Copy the sqlite3.h and sqlite3.c files from the amalgamation of sqlite.
|
||||
|
||||
Be sure to update SQLITE_VERSION accordingly in $(topsrcdir)/configure.in.
|
||||
+18003
-7959
File diff suppressed because it is too large.
Load diff
+450
-93
@@ -146,9 +146,9 @@ extern "C" {
|
||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.42.0"
|
||||
#define SQLITE_VERSION_NUMBER 3042000
|
||||
#define SQLITE_SOURCE_ID "2023-05-16 12:36:15 831d0fb2836b71c9bc51067c49fee4b8f18047814f2ff22d817d25195cf350b0"
|
||||
#define SQLITE_VERSION "3.46.0"
|
||||
#define SQLITE_VERSION_NUMBER 3046000
|
||||
#define SQLITE_SOURCE_ID "2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
@@ -420,6 +420,8 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**);
|
||||
** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
|
||||
** <li> The application must not modify the SQL statement text passed into
|
||||
** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
|
||||
** <li> The application must not dereference the arrays or string pointers
|
||||
** passed as the 3rd and 4th callback parameters after it returns.
|
||||
** </ul>
|
||||
*/
|
||||
SQLITE_API int sqlite3_exec(
|
||||
@@ -528,6 +530,7 @@ SQLITE_API int sqlite3_exec(
|
||||
#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
|
||||
#define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8))
|
||||
#define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8))
|
||||
#define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34<<8))
|
||||
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
|
||||
#define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8))
|
||||
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
|
||||
@@ -761,11 +764,11 @@ struct sqlite3_file {
|
||||
** </ul>
|
||||
** xLock() upgrades the database file lock. In other words, xLock() moves the
|
||||
** database file lock in the direction NONE toward EXCLUSIVE. The argument to
|
||||
** xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never
|
||||
** xLock() is always one of SHARED, RESERVED, PENDING, or EXCLUSIVE, never
|
||||
** SQLITE_LOCK_NONE. If the database file lock is already at or above the
|
||||
** requested lock, then the call to xLock() is a no-op.
|
||||
** xUnlock() downgrades the database file lock to either SHARED or NONE.
|
||||
* If the lock is already at or below the requested lock state, then the call
|
||||
** If the lock is already at or below the requested lock state, then the call
|
||||
** to xUnlock() is a no-op.
|
||||
** The xCheckReservedLock() method checks whether any database connection,
|
||||
** either in this process or in some other process, is holding a RESERVED,
|
||||
@@ -1190,7 +1193,7 @@ struct sqlite3_io_methods {
|
||||
** by clients within the current process, only within other processes.
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_CKSM_FILE]]
|
||||
** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use interally by the
|
||||
** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use internally by the
|
||||
** [checksum VFS shim] only.
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_RESET_CACHE]]
|
||||
@@ -2126,7 +2129,7 @@ struct sqlite3_mem_methods {
|
||||
** is stored in each sorted record and the required column values loaded
|
||||
** from the database as records are returned in sorted order. The default
|
||||
** value for this option is to never use this optimization. Specifying a
|
||||
** negative value for this option restores the default behaviour.
|
||||
** negative value for this option restores the default behavior.
|
||||
** This option is only available if SQLite is compiled with the
|
||||
** [SQLITE_ENABLE_SORTER_REFERENCES] compile-time option.
|
||||
**
|
||||
@@ -2140,6 +2143,22 @@ struct sqlite3_mem_methods {
|
||||
** configuration setting is never used, then the default maximum is determined
|
||||
** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option. If that
|
||||
** compile-time option is not set, then the default maximum is 1073741824.
|
||||
**
|
||||
** [[SQLITE_CONFIG_ROWID_IN_VIEW]]
|
||||
** <dt>SQLITE_CONFIG_ROWID_IN_VIEW
|
||||
** <dd>The SQLITE_CONFIG_ROWID_IN_VIEW option enables or disables the ability
|
||||
** for VIEWs to have a ROWID. The capability can only be enabled if SQLite is
|
||||
** compiled with -DSQLITE_ALLOW_ROWID_IN_VIEW, in which case the capability
|
||||
** defaults to on. This configuration option queries the current setting or
|
||||
** changes the setting to off or on. The argument is a pointer to an integer.
|
||||
** If that integer initially holds a value of 1, then the ability for VIEWs to
|
||||
** have ROWIDs is activated. If the integer initially holds zero, then the
|
||||
** ability is deactivated. Any other initial value for the integer leaves the
|
||||
** setting unchanged. After changes, if any, the integer is written with
|
||||
** a 1 or 0, if the ability for VIEWs to have ROWIDs is on or off. If SQLite
|
||||
** is compiled without -DSQLITE_ALLOW_ROWID_IN_VIEW (which is the usual and
|
||||
** recommended case) then the integer is always filled with zero, regardless
|
||||
** if its initial value.
|
||||
** </dl>
|
||||
*/
|
||||
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
|
||||
@@ -2171,6 +2190,7 @@ struct sqlite3_mem_methods {
|
||||
#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
|
||||
#define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */
|
||||
#define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */
|
||||
#define SQLITE_CONFIG_ROWID_IN_VIEW 30 /* int* */
|
||||
|
||||
/*
|
||||
** CAPI3REF: Database Connection Configuration Options
|
||||
@@ -2301,7 +2321,7 @@ struct sqlite3_mem_methods {
|
||||
** database handle, SQLite checks if this will mean that there are now no
|
||||
** connections at all to the database. If so, it performs a checkpoint
|
||||
** operation before closing the connection. This option may be used to
|
||||
** override this behaviour. The first parameter passed to this operation
|
||||
** override this behavior. The first parameter passed to this operation
|
||||
** is an integer - positive to disable checkpoints-on-close, or zero (the
|
||||
** default) to enable them, and negative to leave the setting unchanged.
|
||||
** The second parameter is a pointer to an integer
|
||||
@@ -2454,7 +2474,7 @@ struct sqlite3_mem_methods {
|
||||
** the [VACUUM] command will fail with an obscure error when attempting to
|
||||
** process a table with generated columns and a descending index. This is
|
||||
** not considered a bug since SQLite versions 3.3.0 and earlier do not support
|
||||
** either generated columns or decending indexes.
|
||||
** either generated columns or descending indexes.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]]
|
||||
@@ -2735,6 +2755,7 @@ SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);
|
||||
**
|
||||
** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether
|
||||
** or not an interrupt is currently in effect for [database connection] D.
|
||||
** It returns 1 if an interrupt is currently in effect, or 0 otherwise.
|
||||
*/
|
||||
SQLITE_API void sqlite3_interrupt(sqlite3*);
|
||||
SQLITE_API int sqlite3_is_interrupted(sqlite3*);
|
||||
@@ -3284,8 +3305,8 @@ SQLITE_API int sqlite3_set_authorizer(
|
||||
#define SQLITE_RECURSIVE 33 /* NULL NULL */
|
||||
|
||||
/*
|
||||
** CAPI3REF: Tracing And Profiling Functions
|
||||
** METHOD: sqlite3
|
||||
** CAPI3REF: Deprecated Tracing And Profiling Functions
|
||||
** DEPRECATED
|
||||
**
|
||||
** These routines are deprecated. Use the [sqlite3_trace_v2()] interface
|
||||
** instead of the routines described here.
|
||||
@@ -3388,8 +3409,10 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
|
||||
** M argument should be the bitwise OR-ed combination of
|
||||
** zero or more [SQLITE_TRACE] constants.
|
||||
**
|
||||
** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides
|
||||
** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2().
|
||||
** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P)
|
||||
** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or
|
||||
** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each
|
||||
** database connection may have at most one trace callback.
|
||||
**
|
||||
** ^The X callback is invoked whenever any of the events identified by
|
||||
** mask M occur. ^The integer return value from the callback is currently
|
||||
@@ -3758,7 +3781,7 @@ SQLITE_API int sqlite3_open_v2(
|
||||
** as F) must be one of:
|
||||
** <ul>
|
||||
** <li> A database filename pointer created by the SQLite core and
|
||||
** passed into the xOpen() method of a VFS implemention, or
|
||||
** passed into the xOpen() method of a VFS implementation, or
|
||||
** <li> A filename obtained from [sqlite3_db_filename()], or
|
||||
** <li> A new filename constructed using [sqlite3_create_filename()].
|
||||
** </ul>
|
||||
@@ -3871,7 +3894,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
|
||||
/*
|
||||
** CAPI3REF: Create and Destroy VFS Filenames
|
||||
**
|
||||
** These interfces are provided for use by [VFS shim] implementations and
|
||||
** These interfaces are provided for use by [VFS shim] implementations and
|
||||
** are not useful outside of that context.
|
||||
**
|
||||
** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
|
||||
@@ -3950,14 +3973,17 @@ SQLITE_API void sqlite3_free_filename(sqlite3_filename);
|
||||
** </ul>
|
||||
**
|
||||
** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
|
||||
** text that describes the error, as either UTF-8 or UTF-16 respectively.
|
||||
** text that describes the error, as either UTF-8 or UTF-16 respectively,
|
||||
** or NULL if no error message is available.
|
||||
** (See how SQLite handles [invalid UTF] for exceptions to this rule.)
|
||||
** ^(Memory to hold the error message string is managed internally.
|
||||
** The application does not need to worry about freeing the result.
|
||||
** However, the error string might be overwritten or deallocated by
|
||||
** subsequent calls to other SQLite interface functions.)^
|
||||
**
|
||||
** ^The sqlite3_errstr() interface returns the English-language text
|
||||
** that describes the [result code], as UTF-8.
|
||||
** ^The sqlite3_errstr(E) interface returns the English-language text
|
||||
** that describes the [result code] E, as UTF-8, or NULL if E is not an
|
||||
** result code for which a text error message is available.
|
||||
** ^(Memory to hold the error message string is managed internally
|
||||
** and must not be freed by the application)^.
|
||||
**
|
||||
@@ -4418,6 +4444,41 @@ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
|
||||
*/
|
||||
SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement
|
||||
** METHOD: sqlite3_stmt
|
||||
**
|
||||
** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN
|
||||
** setting for [prepared statement] S. If E is zero, then S becomes
|
||||
** a normal prepared statement. If E is 1, then S behaves as if
|
||||
** its SQL text began with "[EXPLAIN]". If E is 2, then S behaves as if
|
||||
** its SQL text began with "[EXPLAIN QUERY PLAN]".
|
||||
**
|
||||
** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared.
|
||||
** SQLite tries to avoid a reprepare, but a reprepare might be necessary
|
||||
** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode.
|
||||
**
|
||||
** Because of the potential need to reprepare, a call to
|
||||
** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be
|
||||
** reprepared because it was created using [sqlite3_prepare()] instead of
|
||||
** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and
|
||||
** hence has no saved SQL text with which to reprepare.
|
||||
**
|
||||
** Changing the explain setting for a prepared statement does not change
|
||||
** the original SQL text for the statement. Hence, if the SQL text originally
|
||||
** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0)
|
||||
** is called to convert the statement into an ordinary statement, the EXPLAIN
|
||||
** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S)
|
||||
** output, even though the statement now acts like a normal SQL statement.
|
||||
**
|
||||
** This routine returns SQLITE_OK if the explain mode is successfully
|
||||
** changed, or an error code if the explain mode could not be changed.
|
||||
** The explain mode cannot be changed while a statement is active.
|
||||
** Hence, it is good practice to call [sqlite3_reset(S)]
|
||||
** immediately prior to calling sqlite3_stmt_explain(S,E).
|
||||
*/
|
||||
SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
|
||||
** METHOD: sqlite3_stmt
|
||||
@@ -4581,7 +4642,7 @@ typedef struct sqlite3_context sqlite3_context;
|
||||
** with it may be passed. ^It is called to dispose of the BLOB or string even
|
||||
** if the call to the bind API fails, except the destructor is not called if
|
||||
** the third parameter is a NULL pointer or the fourth parameter is negative.
|
||||
** ^ (2) The special constant, [SQLITE_STATIC], may be passsed to indicate that
|
||||
** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that
|
||||
** the application remains responsible for disposing of the object. ^In this
|
||||
** case, the object and the provided pointer to it must remain valid until
|
||||
** either the prepared statement is finalized or the same SQL parameter is
|
||||
@@ -5260,20 +5321,33 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
|
||||
** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S
|
||||
** back to the beginning of its program.
|
||||
**
|
||||
** ^If the most recent call to [sqlite3_step(S)] for the
|
||||
** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE],
|
||||
** or if [sqlite3_step(S)] has never before been called on S,
|
||||
** then [sqlite3_reset(S)] returns [SQLITE_OK].
|
||||
** ^The return code from [sqlite3_reset(S)] indicates whether or not
|
||||
** the previous evaluation of prepared statement S completed successfully.
|
||||
** ^If [sqlite3_step(S)] has never before been called on S or if
|
||||
** [sqlite3_step(S)] has not been called since the previous call
|
||||
** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return
|
||||
** [SQLITE_OK].
|
||||
**
|
||||
** ^If the most recent call to [sqlite3_step(S)] for the
|
||||
** [prepared statement] S indicated an error, then
|
||||
** [sqlite3_reset(S)] returns an appropriate [error code].
|
||||
** ^The [sqlite3_reset(S)] interface might also return an [error code]
|
||||
** if there were no prior errors but the process of resetting
|
||||
** the prepared statement caused a new error. ^For example, if an
|
||||
** [INSERT] statement with a [RETURNING] clause is only stepped one time,
|
||||
** that one call to [sqlite3_step(S)] might return SQLITE_ROW but
|
||||
** the overall statement might still fail and the [sqlite3_reset(S)] call
|
||||
** might return SQLITE_BUSY if locking constraints prevent the
|
||||
** database change from committing. Therefore, it is important that
|
||||
** applications check the return code from [sqlite3_reset(S)] even if
|
||||
** no prior call to [sqlite3_step(S)] indicated a problem.
|
||||
**
|
||||
** ^The [sqlite3_reset(S)] interface does not change the values
|
||||
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
|
||||
*/
|
||||
SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
||||
|
||||
|
||||
/*
|
||||
** CAPI3REF: Create Or Redefine SQL Functions
|
||||
** KEYWORDS: {function creation routines}
|
||||
@@ -5484,7 +5558,7 @@ SQLITE_API int sqlite3_create_window_function(
|
||||
** [application-defined SQL function]
|
||||
** that has side-effects or that could potentially leak sensitive information.
|
||||
** This will prevent attacks in which an application is tricked
|
||||
** into using a database file that has had its schema surreptiously
|
||||
** into using a database file that has had its schema surreptitiously
|
||||
** modified to invoke the application-defined function in ways that are
|
||||
** harmful.
|
||||
** <p>
|
||||
@@ -5520,13 +5594,27 @@ SQLITE_API int sqlite3_create_window_function(
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_SUBTYPE]] <dt>SQLITE_SUBTYPE</dt><dd>
|
||||
** The SQLITE_SUBTYPE flag indicates to SQLite that a function may call
|
||||
** The SQLITE_SUBTYPE flag indicates to SQLite that a function might call
|
||||
** [sqlite3_value_subtype()] to inspect the sub-types of its arguments.
|
||||
** Specifying this flag makes no difference for scalar or aggregate user
|
||||
** functions. However, if it is not specified for a user-defined window
|
||||
** function, then any sub-types belonging to arguments passed to the window
|
||||
** function may be discarded before the window function is called (i.e.
|
||||
** sqlite3_value_subtype() will always return 0).
|
||||
** This flag instructs SQLite to omit some corner-case optimizations that
|
||||
** might disrupt the operation of the [sqlite3_value_subtype()] function,
|
||||
** causing it to return zero rather than the correct subtype().
|
||||
** SQL functions that invokes [sqlite3_value_subtype()] should have this
|
||||
** property. If the SQLITE_SUBTYPE property is omitted, then the return
|
||||
** value from [sqlite3_value_subtype()] might sometimes be zero even though
|
||||
** a non-zero subtype was specified by the function argument expression.
|
||||
**
|
||||
** [[SQLITE_RESULT_SUBTYPE]] <dt>SQLITE_RESULT_SUBTYPE</dt><dd>
|
||||
** The SQLITE_RESULT_SUBTYPE flag indicates to SQLite that a function might call
|
||||
** [sqlite3_result_subtype()] to cause a sub-type to be associated with its
|
||||
** result.
|
||||
** Every function that invokes [sqlite3_result_subtype()] should have this
|
||||
** property. If it does not, then the call to [sqlite3_result_subtype()]
|
||||
** might become a no-op if the function is used as term in an
|
||||
** [expression index]. On the other hand, SQL functions that never invoke
|
||||
** [sqlite3_result_subtype()] should avoid setting this property, as the
|
||||
** purpose of this property is to disable certain optimizations that are
|
||||
** incompatible with subtypes.
|
||||
** </dd>
|
||||
** </dl>
|
||||
*/
|
||||
@@ -5534,6 +5622,7 @@ SQLITE_API int sqlite3_create_window_function(
|
||||
#define SQLITE_DIRECTONLY 0x000080000
|
||||
#define SQLITE_SUBTYPE 0x000100000
|
||||
#define SQLITE_INNOCUOUS 0x000200000
|
||||
#define SQLITE_RESULT_SUBTYPE 0x001000000
|
||||
|
||||
/*
|
||||
** CAPI3REF: Deprecated Functions
|
||||
@@ -5730,6 +5819,12 @@ SQLITE_API int sqlite3_value_encoding(sqlite3_value*);
|
||||
** information can be used to pass a limited amount of context from
|
||||
** one SQL function to another. Use the [sqlite3_result_subtype()]
|
||||
** routine to set the subtype for the return value of an SQL function.
|
||||
**
|
||||
** Every [application-defined SQL function] that invoke this interface
|
||||
** should include the [SQLITE_SUBTYPE] property in the text
|
||||
** encoding argument when the function is [sqlite3_create_function|registered].
|
||||
** If the [SQLITE_SUBTYPE] property is omitted, then sqlite3_value_subtype()
|
||||
** might return zero instead of the upstream subtype in some corner cases.
|
||||
*/
|
||||
SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
|
||||
|
||||
@@ -5828,48 +5923,56 @@ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
|
||||
** METHOD: sqlite3_context
|
||||
**
|
||||
** These functions may be used by (non-aggregate) SQL functions to
|
||||
** associate metadata with argument values. If the same value is passed to
|
||||
** multiple invocations of the same SQL function during query execution, under
|
||||
** some circumstances the associated metadata may be preserved. An example
|
||||
** of where this might be useful is in a regular-expression matching
|
||||
** function. The compiled version of the regular expression can be stored as
|
||||
** metadata associated with the pattern string.
|
||||
** associate auxiliary data with argument values. If the same argument
|
||||
** value is passed to multiple invocations of the same SQL function during
|
||||
** query execution, under some circumstances the associated auxiliary data
|
||||
** might be preserved. An example of where this might be useful is in a
|
||||
** regular-expression matching function. The compiled version of the regular
|
||||
** expression can be stored as auxiliary data associated with the pattern string.
|
||||
** Then as long as the pattern string remains the same,
|
||||
** the compiled regular expression can be reused on multiple
|
||||
** invocations of the same function.
|
||||
**
|
||||
** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the metadata
|
||||
** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary data
|
||||
** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument
|
||||
** value to the application-defined function. ^N is zero for the left-most
|
||||
** function argument. ^If there is no metadata
|
||||
** function argument. ^If there is no auxiliary data
|
||||
** associated with the function argument, the sqlite3_get_auxdata(C,N) interface
|
||||
** returns a NULL pointer.
|
||||
**
|
||||
** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th
|
||||
** argument of the application-defined function. ^Subsequent
|
||||
** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as auxiliary data for the
|
||||
** N-th argument of the application-defined function. ^Subsequent
|
||||
** calls to sqlite3_get_auxdata(C,N) return P from the most recent
|
||||
** sqlite3_set_auxdata(C,N,P,X) call if the metadata is still valid or
|
||||
** NULL if the metadata has been discarded.
|
||||
** sqlite3_set_auxdata(C,N,P,X) call if the auxiliary data is still valid or
|
||||
** NULL if the auxiliary data has been discarded.
|
||||
** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL,
|
||||
** SQLite will invoke the destructor function X with parameter P exactly
|
||||
** once, when the metadata is discarded.
|
||||
** SQLite is free to discard the metadata at any time, including: <ul>
|
||||
** once, when the auxiliary data is discarded.
|
||||
** SQLite is free to discard the auxiliary data at any time, including: <ul>
|
||||
** <li> ^(when the corresponding function parameter changes)^, or
|
||||
** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
|
||||
** SQL statement)^, or
|
||||
** <li> ^(when sqlite3_set_auxdata() is invoked again on the same
|
||||
** parameter)^, or
|
||||
** <li> ^(during the original sqlite3_set_auxdata() call when a memory
|
||||
** allocation error occurs.)^ </ul>
|
||||
** allocation error occurs.)^
|
||||
** <li> ^(during the original sqlite3_set_auxdata() call if the function
|
||||
** is evaluated during query planning instead of during query execution,
|
||||
** as sometimes happens with [SQLITE_ENABLE_STAT4].)^ </ul>
|
||||
**
|
||||
** Note the last bullet in particular. The destructor X in
|
||||
** Note the last two bullets in particular. The destructor X in
|
||||
** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the
|
||||
** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata()
|
||||
** should be called near the end of the function implementation and the
|
||||
** function implementation should not make any use of P after
|
||||
** sqlite3_set_auxdata() has been called.
|
||||
** sqlite3_set_auxdata() has been called. Furthermore, a call to
|
||||
** sqlite3_get_auxdata() that occurs immediately after a corresponding call
|
||||
** to sqlite3_set_auxdata() might still return NULL if an out-of-memory
|
||||
** condition occurred during the sqlite3_set_auxdata() call or if the
|
||||
** function is being evaluated during query planning rather than during
|
||||
** query execution.
|
||||
**
|
||||
** ^(In practice, metadata is preserved between function calls for
|
||||
** ^(In practice, auxiliary data is preserved between function calls for
|
||||
** function parameters that are compile-time constants, including literal
|
||||
** values and [parameters] and expressions composed from the same.)^
|
||||
**
|
||||
@@ -5879,10 +5982,67 @@ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
|
||||
**
|
||||
** These routines must be called from the same thread in which
|
||||
** the SQL function is running.
|
||||
**
|
||||
** See also: [sqlite3_get_clientdata()] and [sqlite3_set_clientdata()].
|
||||
*/
|
||||
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
|
||||
SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
|
||||
|
||||
/*
|
||||
** CAPI3REF: Database Connection Client Data
|
||||
** METHOD: sqlite3
|
||||
**
|
||||
** These functions are used to associate one or more named pointers
|
||||
** with a [database connection].
|
||||
** A call to sqlite3_set_clientdata(D,N,P,X) causes the pointer P
|
||||
** to be attached to [database connection] D using name N. Subsequent
|
||||
** calls to sqlite3_get_clientdata(D,N) will return a copy of pointer P
|
||||
** or a NULL pointer if there were no prior calls to
|
||||
** sqlite3_set_clientdata() with the same values of D and N.
|
||||
** Names are compared using strcmp() and are thus case sensitive.
|
||||
**
|
||||
** If P and X are both non-NULL, then the destructor X is invoked with
|
||||
** argument P on the first of the following occurrences:
|
||||
** <ul>
|
||||
** <li> An out-of-memory error occurs during the call to
|
||||
** sqlite3_set_clientdata() which attempts to register pointer P.
|
||||
** <li> A subsequent call to sqlite3_set_clientdata(D,N,P,X) is made
|
||||
** with the same D and N parameters.
|
||||
** <li> The database connection closes. SQLite does not make any guarantees
|
||||
** about the order in which destructors are called, only that all
|
||||
** destructors will be called exactly once at some point during the
|
||||
** database connection closing process.
|
||||
** </ul>
|
||||
**
|
||||
** SQLite does not do anything with client data other than invoke
|
||||
** destructors on the client data at the appropriate time. The intended
|
||||
** use for client data is to provide a mechanism for wrapper libraries
|
||||
** to store additional information about an SQLite database connection.
|
||||
**
|
||||
** There is no limit (other than available memory) on the number of different
|
||||
** client data pointers (with different names) that can be attached to a
|
||||
** single database connection. However, the implementation is optimized
|
||||
** for the case of having only one or two different client data names.
|
||||
** Applications and wrapper libraries are discouraged from using more than
|
||||
** one client data name each.
|
||||
**
|
||||
** There is no way to enumerate the client data pointers
|
||||
** associated with a database connection. The N parameter can be thought
|
||||
** of as a secret key such that only code that knows the secret key is able
|
||||
** to access the associated data.
|
||||
**
|
||||
** Security Warning: These interfaces should not be exposed in scripting
|
||||
** languages or in other circumstances where it might be possible for an
|
||||
** an attacker to invoke them. Any agent that can invoke these interfaces
|
||||
** can probably also take control of the process.
|
||||
**
|
||||
** Database connection client data is only available for SQLite
|
||||
** version 3.44.0 ([dateof:3.44.0]) and later.
|
||||
**
|
||||
** See also: [sqlite3_set_auxdata()] and [sqlite3_get_auxdata()].
|
||||
*/
|
||||
SQLITE_API void *sqlite3_get_clientdata(sqlite3*,const char*);
|
||||
SQLITE_API int sqlite3_set_clientdata(sqlite3*, const char*, void*, void(*)(void*));
|
||||
|
||||
/*
|
||||
** CAPI3REF: Constants Defining Special Destructor Behavior
|
||||
@@ -6084,6 +6244,20 @@ SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
|
||||
** higher order bits are discarded.
|
||||
** The number of subtype bytes preserved by SQLite might increase
|
||||
** in future releases of SQLite.
|
||||
**
|
||||
** Every [application-defined SQL function] that invokes this interface
|
||||
** should include the [SQLITE_RESULT_SUBTYPE] property in its
|
||||
** text encoding argument when the SQL function is
|
||||
** [sqlite3_create_function|registered]. If the [SQLITE_RESULT_SUBTYPE]
|
||||
** property is omitted from the function that invokes sqlite3_result_subtype(),
|
||||
** then in some cases the sqlite3_result_subtype() might fail to set
|
||||
** the result subtype.
|
||||
**
|
||||
** If SQLite is compiled with -DSQLITE_STRICT_SUBTYPE=1, then any
|
||||
** SQL function that invokes the sqlite3_result_subtype() interface
|
||||
** and that does not have the SQLITE_RESULT_SUBTYPE property will raise
|
||||
** an error. Future versions of SQLite might enable -DSQLITE_STRICT_SUBTYPE=1
|
||||
** by default.
|
||||
*/
|
||||
SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
|
||||
|
||||
@@ -6515,7 +6689,7 @@ SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
|
||||
SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Allowed return values from [sqlite3_txn_state()]
|
||||
** CAPI3REF: Allowed return values from sqlite3_txn_state()
|
||||
** KEYWORDS: {transaction state}
|
||||
**
|
||||
** These constants define the current transaction state of a database file.
|
||||
@@ -6647,7 +6821,7 @@ SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
|
||||
** ^Each call to the sqlite3_autovacuum_pages() interface overrides all
|
||||
** previous invocations for that database connection. ^If the callback
|
||||
** argument (C) to sqlite3_autovacuum_pages(D,C,P,X) is a NULL pointer,
|
||||
** then the autovacuum steps callback is cancelled. The return value
|
||||
** then the autovacuum steps callback is canceled. The return value
|
||||
** from sqlite3_autovacuum_pages() is normally SQLITE_OK, but might
|
||||
** be some other error code if something goes wrong. The current
|
||||
** implementation will only return SQLITE_OK or SQLITE_MISUSE, but other
|
||||
@@ -6713,6 +6887,12 @@ SQLITE_API int sqlite3_autovacuum_pages(
|
||||
** The exceptions defined in this paragraph might change in a future
|
||||
** release of SQLite.
|
||||
**
|
||||
** Whether the update hook is invoked before or after the
|
||||
** corresponding change is currently unspecified and may differ
|
||||
** depending on the type of change. Do not rely on the order of the
|
||||
** hook call with regards to the final result of the operation which
|
||||
** triggers the hook.
|
||||
**
|
||||
** The update hook implementation must not do anything that will modify
|
||||
** the database connection that invoked the update hook. Any actions
|
||||
** to modify the database connection must be deferred until after the
|
||||
@@ -7166,6 +7346,10 @@ struct sqlite3_module {
|
||||
/* The methods above are in versions 1 and 2 of the sqlite_module object.
|
||||
** Those below are for version 3 and greater. */
|
||||
int (*xShadowName)(const char*);
|
||||
/* The methods above are in versions 1 through 3 of the sqlite_module object.
|
||||
** Those below are for version 4 and greater. */
|
||||
int (*xIntegrity)(sqlite3_vtab *pVTab, const char *zSchema,
|
||||
const char *zTabName, int mFlags, char **pzErr);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -7653,7 +7837,7 @@ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
|
||||
** code is returned and the transaction rolled back.
|
||||
**
|
||||
** Calling this function with an argument that is not a NULL pointer or an
|
||||
** open blob handle results in undefined behaviour. ^Calling this routine
|
||||
** open blob handle results in undefined behavior. ^Calling this routine
|
||||
** with a null pointer (such as would be returned by a failed call to
|
||||
** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
|
||||
** is passed a valid open blob handle, the values returned by the
|
||||
@@ -7880,9 +8064,11 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
||||
**
|
||||
** ^(Some systems (for example, Windows 95) do not support the operation
|
||||
** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try()
|
||||
** will always return SQLITE_BUSY. The SQLite core only ever uses
|
||||
** sqlite3_mutex_try() as an optimization so this is acceptable
|
||||
** behavior.)^
|
||||
** will always return SQLITE_BUSY. In most cases the SQLite core only uses
|
||||
** sqlite3_mutex_try() as an optimization, so this is acceptable
|
||||
** behavior. The exceptions are unix builds that set the
|
||||
** SQLITE_ENABLE_SETLK_TIMEOUT build option. In that case a working
|
||||
** sqlite3_mutex_try() is required.)^
|
||||
**
|
||||
** ^The sqlite3_mutex_leave() routine exits a mutex that was
|
||||
** previously entered by the same thread. The behavior
|
||||
@@ -8133,6 +8319,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
||||
#define SQLITE_TESTCTRL_PRNG_SAVE 5
|
||||
#define SQLITE_TESTCTRL_PRNG_RESTORE 6
|
||||
#define SQLITE_TESTCTRL_PRNG_RESET 7 /* NOT USED */
|
||||
#define SQLITE_TESTCTRL_FK_NO_ACTION 7
|
||||
#define SQLITE_TESTCTRL_BITVEC_TEST 8
|
||||
#define SQLITE_TESTCTRL_FAULT_INSTALL 9
|
||||
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
|
||||
@@ -8140,6 +8327,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
||||
#define SQLITE_TESTCTRL_ASSERT 12
|
||||
#define SQLITE_TESTCTRL_ALWAYS 13
|
||||
#define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
|
||||
#define SQLITE_TESTCTRL_JSON_SELFCHECK 14
|
||||
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
|
||||
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
|
||||
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
|
||||
@@ -8161,7 +8349,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
||||
#define SQLITE_TESTCTRL_TRACEFLAGS 31
|
||||
#define SQLITE_TESTCTRL_TUNE 32
|
||||
#define SQLITE_TESTCTRL_LOGEST 33
|
||||
#define SQLITE_TESTCTRL_LAST 33 /* Largest TESTCTRL */
|
||||
#define SQLITE_TESTCTRL_USELONGDOUBLE 34
|
||||
#define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */
|
||||
|
||||
/*
|
||||
** CAPI3REF: SQL Keyword Checking
|
||||
@@ -8174,7 +8363,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
||||
** The sqlite3_keyword_count() interface returns the number of distinct
|
||||
** keywords understood by SQLite.
|
||||
**
|
||||
** The sqlite3_keyword_name(N,Z,L) interface finds the N-th keyword and
|
||||
** The sqlite3_keyword_name(N,Z,L) interface finds the 0-based N-th keyword and
|
||||
** makes *Z point to that keyword expressed as UTF8 and writes the number
|
||||
** of bytes in the keyword into *L. The string that *Z points to is not
|
||||
** zero-terminated. The sqlite3_keyword_name(N,Z,L) routine returns
|
||||
@@ -9617,7 +9806,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
||||
** [[SQLITE_VTAB_DIRECTONLY]]<dt>SQLITE_VTAB_DIRECTONLY</dt>
|
||||
** <dd>Calls of the form
|
||||
** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the
|
||||
** the [xConnect] or [xCreate] methods of a [virtual table] implmentation
|
||||
** the [xConnect] or [xCreate] methods of a [virtual table] implementation
|
||||
** prohibits that virtual table from being used from within triggers and
|
||||
** views.
|
||||
** </dd>
|
||||
@@ -9753,24 +9942,45 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
|
||||
** <li value="2"><p>
|
||||
** ^(If the sqlite3_vtab_distinct() interface returns 2, that means
|
||||
** that the query planner does not need the rows returned in any particular
|
||||
** order, as long as rows with the same values in all "aOrderBy" columns
|
||||
** are adjacent.)^ ^(Furthermore, only a single row for each particular
|
||||
** combination of values in the columns identified by the "aOrderBy" field
|
||||
** needs to be returned.)^ ^It is always ok for two or more rows with the same
|
||||
** values in all "aOrderBy" columns to be returned, as long as all such rows
|
||||
** are adjacent. ^The virtual table may, if it chooses, omit extra rows
|
||||
** that have the same value for all columns identified by "aOrderBy".
|
||||
** ^However omitting the extra rows is optional.
|
||||
** order, as long as rows with the same values in all columns identified
|
||||
** by "aOrderBy" are adjacent.)^ ^(Furthermore, when two or more rows
|
||||
** contain the same values for all columns identified by "colUsed", all but
|
||||
** one such row may optionally be omitted from the result.)^
|
||||
** The virtual table is not required to omit rows that are duplicates
|
||||
** over the "colUsed" columns, but if the virtual table can do that without
|
||||
** too much extra effort, it could potentially help the query to run faster.
|
||||
** This mode is used for a DISTINCT query.
|
||||
** <li value="3"><p>
|
||||
** ^(If the sqlite3_vtab_distinct() interface returns 3, that means
|
||||
** that the query planner needs only distinct rows but it does need the
|
||||
** rows to be sorted.)^ ^The virtual table implementation is free to omit
|
||||
** rows that are identical in all aOrderBy columns, if it wants to, but
|
||||
** it is not required to omit any rows. This mode is used for queries
|
||||
** ^(If the sqlite3_vtab_distinct() interface returns 3, that means the
|
||||
** virtual table must return rows in the order defined by "aOrderBy" as
|
||||
** if the sqlite3_vtab_distinct() interface had returned 0. However if
|
||||
** two or more rows in the result have the same values for all columns
|
||||
** identified by "colUsed", then all but one such row may optionally be
|
||||
** omitted.)^ Like when the return value is 2, the virtual table
|
||||
** is not required to omit rows that are duplicates over the "colUsed"
|
||||
** columns, but if the virtual table can do that without
|
||||
** too much extra effort, it could potentially help the query to run faster.
|
||||
** This mode is used for queries
|
||||
** that have both DISTINCT and ORDER BY clauses.
|
||||
** </ol>
|
||||
**
|
||||
** <p>The following table summarizes the conditions under which the
|
||||
** virtual table is allowed to set the "orderByConsumed" flag based on
|
||||
** the value returned by sqlite3_vtab_distinct(). This table is a
|
||||
** restatement of the previous four paragraphs:
|
||||
**
|
||||
** <table border=1 cellspacing=0 cellpadding=10 width="90%">
|
||||
** <tr>
|
||||
** <td valign="top">sqlite3_vtab_distinct() return value
|
||||
** <td valign="top">Rows are returned in aOrderBy order
|
||||
** <td valign="top">Rows with the same value in all aOrderBy columns are adjacent
|
||||
** <td valign="top">Duplicates over all colUsed columns may be omitted
|
||||
** <tr><td>0<td>yes<td>yes<td>no
|
||||
** <tr><td>1<td>no<td>yes<td>no
|
||||
** <tr><td>2<td>no<td>yes<td>yes
|
||||
** <tr><td>3<td>yes<td>yes<td>yes
|
||||
** </table>
|
||||
**
|
||||
** ^For the purposes of comparing virtual table output values to see if the
|
||||
** values are same value for sorting purposes, two NULL values are considered
|
||||
** to be the same. In other words, the comparison operator is "IS"
|
||||
@@ -9807,7 +10017,7 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*);
|
||||
** communicated to the xBestIndex method as a
|
||||
** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^ If xBestIndex wants to use
|
||||
** this constraint, it must set the corresponding
|
||||
** aConstraintUsage[].argvIndex to a postive integer. ^(Then, under
|
||||
** aConstraintUsage[].argvIndex to a positive integer. ^(Then, under
|
||||
** the usual mode of handling IN operators, SQLite generates [bytecode]
|
||||
** that invokes the [xFilter|xFilter() method] once for each value
|
||||
** on the right-hand side of the IN operator.)^ Thus the virtual table
|
||||
@@ -10236,7 +10446,7 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
||||
** When the [sqlite3_blob_write()] API is used to update a blob column,
|
||||
** the pre-update hook is invoked with SQLITE_DELETE. This is because the
|
||||
** in this case the new values are not available. In this case, when a
|
||||
** callback made with op==SQLITE_DELETE is actuall a write using the
|
||||
** callback made with op==SQLITE_DELETE is actually a write using the
|
||||
** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
|
||||
** the index of the column being written. In other cases, where the
|
||||
** pre-update hook is being invoked for some other reason, including a
|
||||
@@ -10497,6 +10707,13 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
|
||||
** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
|
||||
** of the database exists.
|
||||
**
|
||||
** After the call, if the SQLITE_SERIALIZE_NOCOPY bit had been set,
|
||||
** the returned buffer content will remain accessible and unchanged
|
||||
** until either the next write operation on the connection or when
|
||||
** the connection is closed, and applications must not modify the
|
||||
** buffer. If the bit had been clear, the returned buffer will not
|
||||
** be accessed by SQLite after the call.
|
||||
**
|
||||
** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
|
||||
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
|
||||
** allocation error occurs.
|
||||
@@ -10545,6 +10762,9 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
||||
** SQLite will try to increase the buffer size using sqlite3_realloc64()
|
||||
** if writes on the database cause it to grow larger than M bytes.
|
||||
**
|
||||
** Applications must not modify the buffer P or invalidate it before
|
||||
** the database connection D is closed.
|
||||
**
|
||||
** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the
|
||||
** database is currently in a read transaction or is involved in a backup
|
||||
** operation.
|
||||
@@ -10553,6 +10773,13 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
||||
** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
|
||||
** function returns SQLITE_ERROR.
|
||||
**
|
||||
** The deserialized database should not be in [WAL mode]. If the database
|
||||
** is in WAL mode, then any attempt to use the database file will result
|
||||
** in an [SQLITE_CANTOPEN] error. The application can set the
|
||||
** [file format version numbers] (bytes 18 and 19) of the input database P
|
||||
** to 0x01 prior to invoking sqlite3_deserialize(D,S,P,N,M,F) to force the
|
||||
** database file into rollback mode and work around this limitation.
|
||||
**
|
||||
** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
|
||||
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then
|
||||
** [sqlite3_free()] is invoked on argument P prior to returning.
|
||||
@@ -11625,6 +11852,18 @@ SQLITE_API int sqlite3changeset_concat(
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
|
||||
*/
|
||||
SQLITE_API int sqlite3changeset_upgrade(
|
||||
sqlite3 *db,
|
||||
const char *zDb,
|
||||
int nIn, const void *pIn, /* Input changeset */
|
||||
int *pnOut, void **ppOut /* OUT: Inverse of input */
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** CAPI3REF: Changegroup Handle
|
||||
**
|
||||
@@ -11671,6 +11910,38 @@ typedef struct sqlite3_changegroup sqlite3_changegroup;
|
||||
*/
|
||||
SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Add a Schema to a Changegroup
|
||||
** METHOD: sqlite3_changegroup_schema
|
||||
**
|
||||
** This method may be used to optionally enforce the rule that the changesets
|
||||
** added to the changegroup handle must match the schema of database zDb
|
||||
** ("main", "temp", or the name of an attached database). If
|
||||
** sqlite3changegroup_add() is called to add a changeset that is not compatible
|
||||
** with the configured schema, SQLITE_SCHEMA is returned and the changegroup
|
||||
** object is left in an undefined state.
|
||||
**
|
||||
** A changeset schema is considered compatible with the database schema in
|
||||
** the same way as for sqlite3changeset_apply(). Specifically, for each
|
||||
** table in the changeset, there exists a database table with:
|
||||
**
|
||||
** <ul>
|
||||
** <li> The name identified by the changeset, and
|
||||
** <li> at least as many columns as recorded in the changeset, and
|
||||
** <li> the primary key columns in the same position as recorded in
|
||||
** the changeset.
|
||||
** </ul>
|
||||
**
|
||||
** The output of the changegroup object always has the same schema as the
|
||||
** database nominated using this function. In cases where changesets passed
|
||||
** to sqlite3changegroup_add() have fewer columns than the corresponding table
|
||||
** in the database schema, these are filled in using the default column
|
||||
** values from the database schema. This makes it possible to combined
|
||||
** changesets that have different numbers of columns for a single table
|
||||
** within a changegroup, provided that they are otherwise compatible.
|
||||
*/
|
||||
SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*, const char *zDb);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Add A Changeset To A Changegroup
|
||||
** METHOD: sqlite3_changegroup
|
||||
@@ -11739,16 +12010,45 @@ SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
||||
** If the new changeset contains changes to a table that is already present
|
||||
** in the changegroup, then the number of columns and the position of the
|
||||
** primary key columns for the table must be consistent. If this is not the
|
||||
** case, this function fails with SQLITE_SCHEMA. If the input changeset
|
||||
** appears to be corrupt and the corruption is detected, SQLITE_CORRUPT is
|
||||
** returned. Or, if an out-of-memory condition occurs during processing, this
|
||||
** function returns SQLITE_NOMEM. In all cases, if an error occurs the state
|
||||
** of the final contents of the changegroup is undefined.
|
||||
** case, this function fails with SQLITE_SCHEMA. Except, if the changegroup
|
||||
** object has been configured with a database schema using the
|
||||
** sqlite3changegroup_schema() API, then it is possible to combine changesets
|
||||
** with different numbers of columns for a single table, provided that
|
||||
** they are otherwise compatible.
|
||||
**
|
||||
** If no error occurs, SQLITE_OK is returned.
|
||||
** If the input changeset appears to be corrupt and the corruption is
|
||||
** detected, SQLITE_CORRUPT is returned. Or, if an out-of-memory condition
|
||||
** occurs during processing, this function returns SQLITE_NOMEM.
|
||||
**
|
||||
** In all cases, if an error occurs the state of the final contents of the
|
||||
** changegroup is undefined. If no error occurs, SQLITE_OK is returned.
|
||||
*/
|
||||
SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Add A Single Change To A Changegroup
|
||||
** METHOD: sqlite3_changegroup
|
||||
**
|
||||
** This function adds the single change currently indicated by the iterator
|
||||
** passed as the second argument to the changegroup object. The rules for
|
||||
** adding the change are just as described for [sqlite3changegroup_add()].
|
||||
**
|
||||
** If the change is successfully added to the changegroup, SQLITE_OK is
|
||||
** returned. Otherwise, an SQLite error code is returned.
|
||||
**
|
||||
** The iterator must point to a valid entry when this function is called.
|
||||
** If it does not, SQLITE_ERROR is returned and no change is added to the
|
||||
** changegroup. Additionally, the iterator must not have been opened with
|
||||
** the SQLITE_CHANGESETAPPLY_INVERT flag. In this case SQLITE_ERROR is also
|
||||
** returned.
|
||||
*/
|
||||
SQLITE_API int sqlite3changegroup_add_change(
|
||||
sqlite3_changegroup*,
|
||||
sqlite3_changeset_iter*
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** CAPI3REF: Obtain A Composite Changeset From A Changegroup
|
||||
** METHOD: sqlite3_changegroup
|
||||
@@ -12010,10 +12310,17 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
||||
** <li>an insert change if all fields of the conflicting row match
|
||||
** the row being inserted.
|
||||
** </ul>
|
||||
**
|
||||
** <dt>SQLITE_CHANGESETAPPLY_FKNOACTION <dd>
|
||||
** If this flag it set, then all foreign key constraints in the target
|
||||
** database behave as if they were declared with "ON UPDATE NO ACTION ON
|
||||
** DELETE NO ACTION", even if they are actually CASCADE, RESTRICT, SET NULL
|
||||
** or SET DEFAULT.
|
||||
*/
|
||||
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001
|
||||
#define SQLITE_CHANGESETAPPLY_INVERT 0x0002
|
||||
#define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004
|
||||
#define SQLITE_CHANGESETAPPLY_FKNOACTION 0x0008
|
||||
|
||||
/*
|
||||
** CAPI3REF: Constants Passed To The Conflict Handler
|
||||
@@ -12546,8 +12853,8 @@ struct Fts5PhraseIter {
|
||||
** EXTENSION API FUNCTIONS
|
||||
**
|
||||
** xUserData(pFts):
|
||||
** Return a copy of the context pointer the extension function was
|
||||
** registered with.
|
||||
** Return a copy of the pUserData pointer passed to the xCreateFunction()
|
||||
** API when the extension function was registered.
|
||||
**
|
||||
** xColumnTotalSize(pFts, iCol, pnToken):
|
||||
** If parameter iCol is less than zero, set output variable *pnToken
|
||||
@@ -12579,8 +12886,11 @@ struct Fts5PhraseIter {
|
||||
** created with the "columnsize=0" option.
|
||||
**
|
||||
** xColumnText:
|
||||
** This function attempts to retrieve the text of column iCol of the
|
||||
** current document. If successful, (*pz) is set to point to a buffer
|
||||
** If parameter iCol is less than zero, or greater than or equal to the
|
||||
** number of columns in the table, SQLITE_RANGE is returned.
|
||||
**
|
||||
** Otherwise, this function attempts to retrieve the text of column iCol of
|
||||
** the current document. If successful, (*pz) is set to point to a buffer
|
||||
** containing the text in utf-8 encoding, (*pn) is set to the size in bytes
|
||||
** (not characters) of the buffer and SQLITE_OK is returned. Otherwise,
|
||||
** if an error occurs, an SQLite error code is returned and the final values
|
||||
@@ -12590,8 +12900,10 @@ struct Fts5PhraseIter {
|
||||
** Returns the number of phrases in the current query expression.
|
||||
**
|
||||
** xPhraseSize:
|
||||
** Returns the number of tokens in phrase iPhrase of the query. Phrases
|
||||
** are numbered starting from zero.
|
||||
** If parameter iCol is less than zero, or greater than or equal to the
|
||||
** number of phrases in the current query, as returned by xPhraseCount,
|
||||
** 0 is returned. Otherwise, this function returns the number of tokens in
|
||||
** phrase iPhrase of the query. Phrases are numbered starting from zero.
|
||||
**
|
||||
** xInstCount:
|
||||
** Set *pnInst to the total number of occurrences of all phrases within
|
||||
@@ -12607,12 +12919,13 @@ struct Fts5PhraseIter {
|
||||
** Query for the details of phrase match iIdx within the current row.
|
||||
** Phrase matches are numbered starting from zero, so the iIdx argument
|
||||
** should be greater than or equal to zero and smaller than the value
|
||||
** output by xInstCount().
|
||||
** output by xInstCount(). If iIdx is less than zero or greater than
|
||||
** or equal to the value returned by xInstCount(), SQLITE_RANGE is returned.
|
||||
**
|
||||
** Usually, output parameter *piPhrase is set to the phrase number, *piCol
|
||||
** Otherwise, output parameter *piPhrase is set to the phrase number, *piCol
|
||||
** to the column in which it occurs and *piOff the token offset of the
|
||||
** first token of the phrase. Returns SQLITE_OK if successful, or an error
|
||||
** code (i.e. SQLITE_NOMEM) if an error occurs.
|
||||
** first token of the phrase. SQLITE_OK is returned if successful, or an
|
||||
** error code (i.e. SQLITE_NOMEM) if an error occurs.
|
||||
**
|
||||
** This API can be quite slow if used with an FTS5 table created with the
|
||||
** "detail=none" or "detail=column" option.
|
||||
@@ -12638,6 +12951,10 @@ struct Fts5PhraseIter {
|
||||
** Invoking Api.xUserData() returns a copy of the pointer passed as
|
||||
** the third argument to pUserData.
|
||||
**
|
||||
** If parameter iPhrase is less than zero, or greater than or equal to
|
||||
** the number of phrases in the query, as returned by xPhraseCount(),
|
||||
** this function returns SQLITE_RANGE.
|
||||
**
|
||||
** If the callback function returns any value other than SQLITE_OK, the
|
||||
** query is abandoned and the xQueryPhrase function returns immediately.
|
||||
** If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK.
|
||||
@@ -12752,6 +13069,39 @@ struct Fts5PhraseIter {
|
||||
**
|
||||
** xPhraseNextColumn()
|
||||
** See xPhraseFirstColumn above.
|
||||
**
|
||||
** xQueryToken(pFts5, iPhrase, iToken, ppToken, pnToken)
|
||||
** This is used to access token iToken of phrase iPhrase of the current
|
||||
** query. Before returning, output parameter *ppToken is set to point
|
||||
** to a buffer containing the requested token, and *pnToken to the
|
||||
** size of this buffer in bytes.
|
||||
**
|
||||
** If iPhrase or iToken are less than zero, or if iPhrase is greater than
|
||||
** or equal to the number of phrases in the query as reported by
|
||||
** xPhraseCount(), or if iToken is equal to or greater than the number of
|
||||
** tokens in the phrase, SQLITE_RANGE is returned and *ppToken and *pnToken
|
||||
are both zeroed.
|
||||
**
|
||||
** The output text is not a copy of the query text that specified the
|
||||
** token. It is the output of the tokenizer module. For tokendata=1
|
||||
** tables, this includes any embedded 0x00 and trailing data.
|
||||
**
|
||||
** xInstToken(pFts5, iIdx, iToken, ppToken, pnToken)
|
||||
** This is used to access token iToken of phrase hit iIdx within the
|
||||
** current row. If iIdx is less than zero or greater than or equal to the
|
||||
** value returned by xInstCount(), SQLITE_RANGE is returned. Otherwise,
|
||||
** output variable (*ppToken) is set to point to a buffer containing the
|
||||
** matching document token, and (*pnToken) to the size of that buffer in
|
||||
** bytes. This API is not available if the specified token matches a
|
||||
** prefix query term. In that case both output variables are always set
|
||||
** to 0.
|
||||
**
|
||||
** The output text is not a copy of the document text that was tokenized.
|
||||
** It is the output of the tokenizer module. For tokendata=1 tables, this
|
||||
** includes any embedded 0x00 and trailing data.
|
||||
**
|
||||
** This API can be quite slow if used with an FTS5 table created with the
|
||||
** "detail=none" or "detail=column" option.
|
||||
*/
|
||||
struct Fts5ExtensionApi {
|
||||
int iVersion; /* Currently always set to 3 */
|
||||
@@ -12789,6 +13139,13 @@ struct Fts5ExtensionApi {
|
||||
|
||||
int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*);
|
||||
void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol);
|
||||
|
||||
/* Below this point are iVersion>=3 only */
|
||||
int (*xQueryToken)(Fts5Context*,
|
||||
int iPhrase, int iToken,
|
||||
const char **ppToken, int *pnToken
|
||||
);
|
||||
int (*xInstToken)(Fts5Context*, int iIdx, int iToken, const char**, int*);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -12983,8 +13340,8 @@ struct Fts5ExtensionApi {
|
||||
** as separate queries of the FTS index are required for each synonym.
|
||||
**
|
||||
** When using methods (2) or (3), it is important that the tokenizer only
|
||||
** provide synonyms when tokenizing document text (method (2)) or query
|
||||
** text (method (3)), not both. Doing so will not cause any errors, but is
|
||||
** provide synonyms when tokenizing document text (method (3)) or query
|
||||
** text (method (2)), not both. Doing so will not cause any errors, but is
|
||||
** inefficient.
|
||||
*/
|
||||
typedef struct Fts5Tokenizer Fts5Tokenizer;
|
||||
@@ -13032,7 +13389,7 @@ struct fts5_api {
|
||||
int (*xCreateTokenizer)(
|
||||
fts5_api *pApi,
|
||||
const char *zName,
|
||||
void *pContext,
|
||||
void *pUserData,
|
||||
fts5_tokenizer *pTokenizer,
|
||||
void (*xDestroy)(void*)
|
||||
);
|
||||
@@ -13041,7 +13398,7 @@ struct fts5_api {
|
||||
int (*xFindTokenizer)(
|
||||
fts5_api *pApi,
|
||||
const char *zName,
|
||||
void **ppContext,
|
||||
void **ppUserData,
|
||||
fts5_tokenizer *pTokenizer
|
||||
);
|
||||
|
||||
@@ -13049,7 +13406,7 @@ struct fts5_api {
|
||||
int (*xCreateFunction)(
|
||||
fts5_api *pApi,
|
||||
const char *zName,
|
||||
void *pContext,
|
||||
void *pUserData,
|
||||
fts5_extension_function xFunction,
|
||||
void (*xDestroy)(void*)
|
||||
);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.6 KiB |
@@ -1,94 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
window {
|
||||
-moz-appearance: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#doorhanger-container {
|
||||
width: 450px;
|
||||
}
|
||||
|
||||
#top-panel {
|
||||
padding: 20px;
|
||||
background: #343c45; /* toolbars */
|
||||
color: #8fa1b2; /* body text */
|
||||
/*
|
||||
* Sloppy preprocessing since UNIX_BUT_NOT_MAC is only defined
|
||||
* in `browser/app/profile/firefox.js`, which this file cannot
|
||||
* depend on. Must style font-size to target linux.
|
||||
*/
|
||||
%ifdef XP_UNIX
|
||||
%ifndef XP_MACOSX
|
||||
font-size: 13px;
|
||||
%else
|
||||
font-size: 15px;
|
||||
%endif
|
||||
%else
|
||||
font-size: 15px;
|
||||
%endif
|
||||
line-height: 19px;
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
#top-panel h1 {
|
||||
font-weight: bold;
|
||||
font-family: Open Sans, sans-serif;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#top-panel p {
|
||||
font-family: Open Sans, sans-serif;
|
||||
font-size: 0.9em;
|
||||
width: 300px;
|
||||
display: block;
|
||||
margin: 5px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#icon {
|
||||
background-image: url("chrome://devtools/content/framework/dev-edition-promo/dev-edition-logo.png");
|
||||
background-size: 64px 64px;
|
||||
background-repeat: no-repeat;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
#lower-panel {
|
||||
padding: 20px;
|
||||
background-color: #252c33; /* tab toolbars */
|
||||
min-height: 75px;
|
||||
border-top: 1px solid #292e33; /* text high contrast (light) */
|
||||
}
|
||||
|
||||
#button-container {
|
||||
margin: auto 20px;
|
||||
}
|
||||
|
||||
#button-container button {
|
||||
font: message-box !important;
|
||||
font-size: 16px !important;
|
||||
cursor: pointer;
|
||||
width: 125px;
|
||||
opacity: 1;
|
||||
position: static;
|
||||
-moz-appearance: none;
|
||||
border-radius: 5px;
|
||||
height: 30px;
|
||||
width: 450px;
|
||||
/* Override embossed borders on Windows/Linux */
|
||||
border: none;
|
||||
}
|
||||
|
||||
#close {
|
||||
background-color: transparent;
|
||||
color: #8fa1b2; /* body text */
|
||||
}
|
||||
|
||||
#go {
|
||||
margin-left: 100px;
|
||||
background-color: #70bf53; /* green */
|
||||
color: #f5f7fa; /* selection text color */
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % toolboxDTD SYSTEM "chrome://devtools/locale/toolbox.dtd" >
|
||||
%toolboxDTD;
|
||||
]>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet rel="stylesheet" href="chrome://devtools/content/framework/dev-edition-promo/dev-edition-promo.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="dev-edition-promo">
|
||||
<vbox id="doorhanger-container">
|
||||
<hbox flex="1" id="top-panel">
|
||||
<image id="icon" />
|
||||
<vbox id="info">
|
||||
<h1>Using Developer Tools in your browser?</h1>
|
||||
<p>Download Firefox Developer Edition, our first browser made just for you.</p>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<hbox id="lower-panel" flex="1">
|
||||
<hbox id="button-container" flex="1">
|
||||
<button id="close"
|
||||
flex="1"
|
||||
standalone="true"
|
||||
label="No thanks">
|
||||
</button>
|
||||
<button id="go"
|
||||
flex="1"
|
||||
standalone="true"
|
||||
label="Learn more »">
|
||||
</button>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</window>
|
||||
@@ -46,8 +46,6 @@ loader.lazyRequireGetter(this, "InspectorFront",
|
||||
"devtools/shared/fronts/inspector", true);
|
||||
loader.lazyRequireGetter(this, "flags",
|
||||
"devtools/shared/flags");
|
||||
loader.lazyRequireGetter(this, "showDoorhanger",
|
||||
"devtools/client/shared/doorhanger", true);
|
||||
loader.lazyRequireGetter(this, "createPerformanceFront",
|
||||
"devtools/shared/fronts/performance", true);
|
||||
loader.lazyRequireGetter(this, "system",
|
||||
@@ -117,7 +115,6 @@ function Toolbox(target, selectedTool, hostType, contentWindow, frameId) {
|
||||
this._saveSplitConsoleHeight = this._saveSplitConsoleHeight.bind(this);
|
||||
this._onFocus = this._onFocus.bind(this);
|
||||
this._onBrowserMessage = this._onBrowserMessage.bind(this);
|
||||
this._showDevEditionPromo = this._showDevEditionPromo.bind(this);
|
||||
this._updateTextBoxMenuItems = this._updateTextBoxMenuItems.bind(this);
|
||||
this._onBottomHostMinimized = this._onBottomHostMinimized.bind(this);
|
||||
this._onBottomHostMaximized = this._onBottomHostMaximized.bind(this);
|
||||
@@ -149,8 +146,6 @@ function Toolbox(target, selectedTool, hostType, contentWindow, frameId) {
|
||||
this.on("host-changed", this._refreshHostTitle);
|
||||
this.on("select", this._refreshHostTitle);
|
||||
|
||||
this.on("ready", this._showDevEditionPromo);
|
||||
|
||||
gDevTools.on("tool-registered", this._toolRegistered);
|
||||
gDevTools.on("tool-unregistered", this._toolUnregistered);
|
||||
|
||||
@@ -2095,7 +2090,6 @@ Toolbox.prototype = {
|
||||
this._target.off("frame-update", this._updateFrames);
|
||||
this.off("select", this._refreshHostTitle);
|
||||
this.off("host-changed", this._refreshHostTitle);
|
||||
this.off("ready", this._showDevEditionPromo);
|
||||
|
||||
gDevTools.off("tool-registered", this._toolRegistered);
|
||||
gDevTools.off("tool-unregistered", this._toolUnregistered);
|
||||
@@ -2188,14 +2182,16 @@ Toolbox.prototype = {
|
||||
.then(() => {
|
||||
this._removeHostListeners();
|
||||
|
||||
// `location` may already be null if the toolbox document is already
|
||||
// in process of destruction. Otherwise if it is still around, ensure
|
||||
// releasing toolbox document and triggering cleanup thanks to unload
|
||||
// event. We do that precisely here, before nullifying the target as
|
||||
// various cleanup code depends on the target attribute to be still
|
||||
// defined.
|
||||
if (win.location) {
|
||||
// `location` may already be invalid if the toolbox document is
|
||||
// already in process of destruction. Otherwise if it is still
|
||||
// around, ensure releasing toolbox document and triggering cleanup
|
||||
// thanks to unload event. We do that precisely here, before
|
||||
// nullifying the target as various cleanup code depends on the
|
||||
// target attribute to be still defined.
|
||||
try {
|
||||
win.location.replace("about:blank");
|
||||
} catch (e) {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
// Targets need to be notified that the toolbox is being torn down.
|
||||
@@ -2251,18 +2247,6 @@ Toolbox.prototype = {
|
||||
this.emit("highlighter-hide");
|
||||
},
|
||||
|
||||
/**
|
||||
* For displaying the promotional Doorhanger on first opening of
|
||||
* the developer tools, promoting the Developer Edition.
|
||||
*/
|
||||
_showDevEditionPromo: function () {
|
||||
// Do not display in browser toolbox
|
||||
if (this.target.chrome) {
|
||||
return;
|
||||
}
|
||||
showDoorhanger({ window: this.win, type: "deveditionpromo" });
|
||||
},
|
||||
|
||||
/**
|
||||
* Enable / disable necessary textbox menu items using globalOverlay.js.
|
||||
*/
|
||||
|
||||
@@ -111,9 +111,6 @@ devtools.jar:
|
||||
content/framework/options-panel.css (framework/options-panel.css)
|
||||
content/framework/toolbox-process-window.xul (framework/toolbox-process-window.xul)
|
||||
* content/framework/toolbox-process-window.js (framework/toolbox-process-window.js)
|
||||
content/framework/dev-edition-promo/dev-edition-promo.xul (framework/dev-edition-promo/dev-edition-promo.xul)
|
||||
* content/framework/dev-edition-promo/dev-edition-promo.css (framework/dev-edition-promo/dev-edition-promo.css)
|
||||
content/framework/dev-edition-promo/dev-edition-logo.png (framework/dev-edition-promo/dev-edition-logo.png)
|
||||
content/inspector/inspector.xhtml (inspector/inspector.xhtml)
|
||||
content/framework/connect/connect.xhtml (framework/connect/connect.xhtml)
|
||||
content/framework/connect/connect.css (framework/connect/connect.css)
|
||||
|
||||
@@ -39,9 +39,8 @@ function ConverterObserver() {
|
||||
|
||||
ConverterObserver.prototype = {
|
||||
initialize: function () {
|
||||
// Only the DevEdition has this feature available by default.
|
||||
// Users need to manually flip 'devtools.jsonview.enabled' preference
|
||||
// to have it available in other distributions.
|
||||
// to have it available.
|
||||
if (this.isEnabled()) {
|
||||
this.register();
|
||||
}
|
||||
|
||||
@@ -3,17 +3,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
// Developer edition promo preferences
|
||||
pref("devtools.devedition.promo.shown", false);
|
||||
pref("devtools.devedition.promo.url", "https://www.mozilla.org/firefox/developer/?utm_source=firefox-dev-tools&utm_medium=firefox-browser&utm_content=betadoorhanger");
|
||||
|
||||
// Only potentially show in beta release
|
||||
#if MOZ_UPDATE_CHANNEL == beta
|
||||
pref("devtools.devedition.promo.enabled", true);
|
||||
#else
|
||||
pref("devtools.devedition.promo.enabled", false);
|
||||
#endif
|
||||
|
||||
// DevTools development workflow
|
||||
pref("devtools.loader.hotreload", false);
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ const Cu = Components.utils;
|
||||
|
||||
var {loader, require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var Telemetry = require("devtools/client/shared/telemetry");
|
||||
var {showDoorhanger} = require("devtools/client/shared/doorhanger");
|
||||
var {TouchEventSimulator} = require("devtools/shared/touch/simulator");
|
||||
var {Task} = require("devtools/shared/task");
|
||||
var promise = require("promise");
|
||||
@@ -255,14 +254,6 @@ ResponsiveUI.prototype = {
|
||||
yield this.connectToServer();
|
||||
this.userAgentInput.hidden = false;
|
||||
|
||||
// Hook to display promotional Developer Edition doorhanger.
|
||||
// Only displayed once.
|
||||
showDoorhanger({
|
||||
window: this.mainWindow,
|
||||
type: "deveditionpromo",
|
||||
anchor: this.chromeDoc.querySelector("#content")
|
||||
});
|
||||
|
||||
// Notify that responsive mode is on.
|
||||
this._telemetry.toolOpened("responsive");
|
||||
ResponsiveUIManager.emit("on", { tab: this.tab });
|
||||
|
||||
@@ -209,6 +209,9 @@ SplitView.prototype = {
|
||||
this._nav.appendChild(aSummary);
|
||||
|
||||
aSummary.addEventListener("click", (aEvent) => {
|
||||
if (aEvent.button != 0) {
|
||||
return;
|
||||
}
|
||||
aEvent.stopPropagation();
|
||||
this.activeSummary = aSummary;
|
||||
}, false);
|
||||
|
||||
@@ -97,6 +97,9 @@ AutocompletePopup.prototype = {
|
||||
},
|
||||
|
||||
onClick: function (e) {
|
||||
if (e.button != 0) {
|
||||
return;
|
||||
}
|
||||
let item = e.target.closest(".autocomplete-item");
|
||||
if (item && typeof item.dataset.index !== "undefined") {
|
||||
this.selectedIndex = parseInt(item.dataset.index, 10);
|
||||
|
||||
@@ -1,164 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { Ci, Cc } = require("chrome");
|
||||
const Services = require("Services");
|
||||
const { DOMHelpers } = require("resource://devtools/client/shared/DOMHelpers.jsm");
|
||||
const { Task } = require("devtools/shared/task");
|
||||
const defer = require("devtools/shared/defer");
|
||||
const { getMostRecentBrowserWindow } = require("sdk/window/utils");
|
||||
|
||||
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
const DEV_EDITION_PROMO_URL = "chrome://devtools/content/framework/dev-edition-promo/dev-edition-promo.xul";
|
||||
const DEV_EDITION_PROMO_ENABLED_PREF = "devtools.devedition.promo.enabled";
|
||||
const DEV_EDITION_PROMO_SHOWN_PREF = "devtools.devedition.promo.shown";
|
||||
const DEV_EDITION_PROMO_URL_PREF = "devtools.devedition.promo.url";
|
||||
const LOCALE = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Ci.nsIXULChromeRegistry)
|
||||
.getSelectedLocale("global");
|
||||
|
||||
/**
|
||||
* Only show Dev Edition promo if it's enabled (beta channel),
|
||||
* if it has not been shown before, and it's a locale build
|
||||
* for `en-US`
|
||||
*/
|
||||
function shouldDevEditionPromoShow() {
|
||||
return Services.prefs.getBoolPref(DEV_EDITION_PROMO_ENABLED_PREF) &&
|
||||
!Services.prefs.getBoolPref(DEV_EDITION_PROMO_SHOWN_PREF) &&
|
||||
LOCALE === "en-US";
|
||||
}
|
||||
|
||||
var TYPES = {
|
||||
// The Developer Edition promo doorhanger, called by
|
||||
// opening the toolbox, browser console, WebIDE, or responsive design mode
|
||||
// in Beta releases. Only displayed once per profile.
|
||||
deveditionpromo: {
|
||||
predicate: shouldDevEditionPromoShow,
|
||||
success: () => {
|
||||
return Services.prefs.setBoolPref(DEV_EDITION_PROMO_SHOWN_PREF, true);
|
||||
},
|
||||
action: () => {
|
||||
let url = Services.prefs.getCharPref(DEV_EDITION_PROMO_URL_PREF);
|
||||
getGBrowser().selectedTab = getGBrowser().addTab(url);
|
||||
},
|
||||
url: DEV_EDITION_PROMO_URL
|
||||
}
|
||||
};
|
||||
|
||||
var panelAttrs = {
|
||||
orient: "vertical",
|
||||
hidden: "false",
|
||||
consumeoutsideclicks: "true",
|
||||
noautofocus: "true",
|
||||
align: "start",
|
||||
role: "alert"
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper to call a doorhanger, defined in `TYPES`, with defined conditions,
|
||||
* success handlers and loads its own XUL in a frame. Takes an object with
|
||||
* several properties:
|
||||
*
|
||||
* @param {XULWindow} window
|
||||
* The window that should house the doorhanger.
|
||||
* @param {String} type
|
||||
* The type of doorhanger to be displayed is, using the `TYPES`
|
||||
* definition.
|
||||
* @param {String} selector
|
||||
* The selector that the doorhanger should be appended to within
|
||||
* `window`. Defaults to a XUL Document's `window` element.
|
||||
*/
|
||||
exports.showDoorhanger = Task.async(function* ({ window, type, anchor }) {
|
||||
let { predicate, success, url, action } = TYPES[type];
|
||||
// Abort if predicate fails
|
||||
if (!predicate()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Call success function to set preferences/cleanup immediately,
|
||||
// so if triggered multiple times, only happens once (Windows/Linux)
|
||||
success();
|
||||
|
||||
// Wait 200ms to prevent flickering where the popup is displayed
|
||||
// before the underlying window (Windows 7, 64bit)
|
||||
yield wait(200);
|
||||
|
||||
let document = window.document;
|
||||
|
||||
let panel = document.createElementNS(XULNS, "panel");
|
||||
let frame = document.createElementNS(XULNS, "iframe");
|
||||
let parentEl = document.querySelector("window");
|
||||
|
||||
frame.setAttribute("src", url);
|
||||
let close = () => parentEl.removeChild(panel);
|
||||
|
||||
setDoorhangerStyle(panel, frame);
|
||||
|
||||
panel.appendChild(frame);
|
||||
parentEl.appendChild(panel);
|
||||
|
||||
yield onFrameLoad(frame);
|
||||
|
||||
panel.openPopup(anchor);
|
||||
|
||||
let closeBtn = frame.contentDocument.querySelector("#close");
|
||||
if (closeBtn) {
|
||||
closeBtn.addEventListener("click", close);
|
||||
}
|
||||
|
||||
let goBtn = frame.contentDocument.querySelector("#go");
|
||||
if (goBtn) {
|
||||
goBtn.addEventListener("click", () => {
|
||||
if (action) {
|
||||
action();
|
||||
}
|
||||
close();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function setDoorhangerStyle(panel, frame) {
|
||||
Object.keys(panelAttrs).forEach(prop => {
|
||||
return panel.setAttribute(prop, panelAttrs[prop]);
|
||||
});
|
||||
panel.style.margin = "20px";
|
||||
panel.style.borderRadius = "5px";
|
||||
panel.style.border = "none";
|
||||
panel.style.MozAppearance = "none";
|
||||
panel.style.backgroundColor = "transparent";
|
||||
|
||||
frame.style.borderRadius = "5px";
|
||||
frame.setAttribute("flex", "1");
|
||||
frame.setAttribute("width", "450");
|
||||
frame.setAttribute("height", "179");
|
||||
}
|
||||
|
||||
function onFrameLoad(frame) {
|
||||
let { resolve, promise } = defer();
|
||||
|
||||
if (frame.contentWindow) {
|
||||
let domHelper = new DOMHelpers(frame.contentWindow);
|
||||
domHelper.onceDOMReady(resolve);
|
||||
} else {
|
||||
let callback = () => {
|
||||
frame.removeEventListener("DOMContentLoaded", callback);
|
||||
resolve();
|
||||
};
|
||||
frame.addEventListener("DOMContentLoaded", callback);
|
||||
}
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
function getGBrowser() {
|
||||
return getMostRecentBrowserWindow().gBrowser;
|
||||
}
|
||||
|
||||
function wait(n) {
|
||||
let { resolve, promise } = defer();
|
||||
setTimeout(resolve, n);
|
||||
return promise;
|
||||
}
|
||||
@@ -26,7 +26,6 @@ DevToolsModules(
|
||||
'devices.js',
|
||||
'devtools-file-watcher.js',
|
||||
'DOMHelpers.jsm',
|
||||
'doorhanger.js',
|
||||
'file-watcher-worker.js',
|
||||
'file-watcher.js',
|
||||
'getjson.js',
|
||||
|
||||
@@ -240,6 +240,9 @@ Spectrum.prototype = {
|
||||
},
|
||||
|
||||
onElementClick: function (e) {
|
||||
if (e.button != 0) {
|
||||
return;
|
||||
}
|
||||
e.stopPropagation();
|
||||
},
|
||||
|
||||
|
||||
@@ -1480,6 +1480,9 @@ Column.prototype = {
|
||||
* for sorting.
|
||||
*/
|
||||
onClick: function (event) {
|
||||
if (event.button != 0) {
|
||||
return;
|
||||
}
|
||||
let target = event.originalTarget;
|
||||
|
||||
if (target.nodeType !== target.ELEMENT_NODE || target == this.column) {
|
||||
|
||||
@@ -908,6 +908,10 @@ VariablesView.prototype = {
|
||||
// Copy current selection to clipboard.
|
||||
if (e.ctrlKey || e.metaKey) {
|
||||
let item = this.getFocusedItem();
|
||||
if (!item) {
|
||||
// No item is selected; do nothing.
|
||||
return;
|
||||
}
|
||||
clipboardHelper.copyString(
|
||||
item._nameString + item.separatorStr + item._valueString
|
||||
);
|
||||
|
||||
@@ -174,7 +174,10 @@ StyleEditorUI.prototype = {
|
||||
|
||||
this._view = new SplitView(viewRoot);
|
||||
|
||||
wire(this._view.rootElement, ".style-editor-newButton", () =>{
|
||||
wire(this._view.rootElement, ".style-editor-newButton", (e) =>{
|
||||
if (e.button != 0) {
|
||||
return;
|
||||
}
|
||||
this._debuggee.addStyleSheet(null);
|
||||
});
|
||||
|
||||
|
||||
@@ -249,6 +249,39 @@ ConsoleOutput.prototype = {
|
||||
return message.render().element;
|
||||
},
|
||||
|
||||
/**
|
||||
* Clear the netRequests Map in this.owner.window.
|
||||
* Items of NetRequest() in chrome/devtools/modules/devtools/client/webconsole/net/net-request.js
|
||||
* netRequest.file holds response
|
||||
* netRequest.parentNode holds div above bodyWrapper here in console-output.js
|
||||
*/
|
||||
onConsoleClear: function() {
|
||||
let netRequests = this.owner.?window.?netRequests;
|
||||
let toClear = [];
|
||||
if(netRequests && netRequests.forEach){
|
||||
// Build list of items to clear
|
||||
netRequests.forEach(
|
||||
function(netReq,key){
|
||||
if (netReq.parentNode && !netReq.parentNode.parentNode) {
|
||||
// DOM node was removed from the browser console output, but still referenced...
|
||||
toClear.push({netReq:netReq,
|
||||
key:key});
|
||||
}
|
||||
});
|
||||
// ... and clean them up
|
||||
toClear.forEach(
|
||||
function(item){
|
||||
let netReq = item.netReq, key = item.key;
|
||||
let file = netReq.file || {};
|
||||
netReq.parentNode = file.node = null;
|
||||
file.request = file.response = file.cause = file.updates = null;
|
||||
netReq.client = netReq.owner = netReq.file = null;
|
||||
item.netReq = null;
|
||||
netRequests.delete(key);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get an array of selected messages. This list is based on the text selection
|
||||
* start and end points.
|
||||
|
||||
@@ -19,7 +19,6 @@ loader.lazyRequireGetter(this, "WebConsoleFrame", "devtools/client/webconsole/we
|
||||
loader.lazyRequireGetter(this, "gDevTools", "devtools/client/framework/devtools", true);
|
||||
loader.lazyRequireGetter(this, "DebuggerServer", "devtools/server/main", true);
|
||||
loader.lazyRequireGetter(this, "DebuggerClient", "devtools/shared/client/main", true);
|
||||
loader.lazyRequireGetter(this, "showDoorhanger", "devtools/client/shared/doorhanger", true);
|
||||
loader.lazyRequireGetter(this, "viewSource", "devtools/client/shared/view-source");
|
||||
|
||||
const STRINGS_URI = "devtools/client/locales/webconsole.properties";
|
||||
@@ -675,19 +674,12 @@ BrowserConsole.prototype = extend(WebConsole.prototype, {
|
||||
// instance.
|
||||
let onClose = () => {
|
||||
window.removeEventListener("unload", onClose);
|
||||
window.removeEventListener("focus", onFocus);
|
||||
this.destroy();
|
||||
};
|
||||
window.addEventListener("unload", onClose);
|
||||
|
||||
this._telemetry.toolOpened("browserconsole");
|
||||
|
||||
// Create an onFocus handler just to display the dev edition promo.
|
||||
// This is to prevent race conditions in some environments.
|
||||
// Hook to display promotional Developer Edition doorhanger. Only displayed once.
|
||||
let onFocus = () => showDoorhanger({ window, type: "deveditionpromo" });
|
||||
window.addEventListener("focus", onFocus);
|
||||
|
||||
this._bc_init = this.$init();
|
||||
return this._bc_init;
|
||||
},
|
||||
|
||||
@@ -960,6 +960,10 @@ JSTerm.prototype = {
|
||||
hud.newConsoleOutput.dispatchMessagesClear();
|
||||
}
|
||||
|
||||
if(hud.output && hud.output.onConsoleClear) {
|
||||
hud.output.onConsoleClear();
|
||||
}
|
||||
|
||||
this.emit("messages-cleared");
|
||||
},
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ WebConsoleActor.prototype =
|
||||
actorPrefix: "console",
|
||||
|
||||
get globalDebugObject() {
|
||||
return this.parentActor.threadActor.globalDebugObject;
|
||||
return this.parentActor?.threadActor?.globalDebugObject;
|
||||
},
|
||||
|
||||
grip: function WCA_grip()
|
||||
@@ -1071,6 +1071,42 @@ WebConsoleActor.prototype =
|
||||
ConsoleAPIStorage.clearEvents(aId);
|
||||
});
|
||||
|
||||
if (this._actorPool && this.networkMonitor) {
|
||||
// Clear NetworkEventActor items from its NetworkMonitor
|
||||
let actor, aid, n;
|
||||
let allActors = this._actorPool._actors;
|
||||
let voidActor = {actorID:0,
|
||||
release:function(){},
|
||||
stub:true};
|
||||
|
||||
// Build list of NetworkEventActors
|
||||
let netActors = [];
|
||||
for (n in allActors) {
|
||||
if (n.indexOf('netEvent')>=0) {
|
||||
netActors.push(allActors[n]);
|
||||
}
|
||||
}
|
||||
// ... and release them.
|
||||
for (actor of netActors) {
|
||||
if(actor) {
|
||||
if (actor.release) {
|
||||
actor.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
// XXX: Sometimes the actors are not removed upon calling release() (async?)
|
||||
// Force the issue by unlinking the actor from active scripting and deleting.
|
||||
for (actor of netActors) {
|
||||
if(actor) {
|
||||
aid = actor.actorID;
|
||||
if (aid && allActors[aid]) {
|
||||
allActors[aid] = voidActor;
|
||||
delete allActors[aid];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.parentActor.isRootActor) {
|
||||
Services.console.logStringMessage(null); // for the Error Console
|
||||
Services.console.reset();
|
||||
|
||||
@@ -537,6 +537,7 @@ function newChannelForURL(url, { policy, window, principal }) {
|
||||
// scheme to see if it helps.
|
||||
uri = Services.io.newURI("file://" + url, null, null);
|
||||
}
|
||||
|
||||
let channelOptions = {
|
||||
contentPolicyType: policy,
|
||||
securityFlags: securityFlags,
|
||||
@@ -557,15 +558,7 @@ function newChannelForURL(url, { policy, window, principal }) {
|
||||
}
|
||||
channelOptions.loadingPrincipal = prin;
|
||||
|
||||
try {
|
||||
return NetUtil.newChannel(channelOptions);
|
||||
} catch (e) {
|
||||
// In xpcshell tests on Windows, nsExternalProtocolHandler::NewChannel()
|
||||
// can throw NS_ERROR_UNKNOWN_PROTOCOL if the external protocol isn't
|
||||
// supported by Windows, so we also need to handle the exception here if
|
||||
// parsing the URL above doesn't throw.
|
||||
return newChannelForURL("file://" + url, { policy, window, principal });
|
||||
}
|
||||
return NetUtil.newChannel(channelOptions);
|
||||
}
|
||||
|
||||
// Fetch is defined differently depending on whether we are on the main thread
|
||||
|
||||
@@ -2208,10 +2208,10 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"content",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -2231,10 +2231,10 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"content",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -3282,7 +3282,6 @@ exports.CSS_PROPERTIES = {
|
||||
"-moz-crisp-edges",
|
||||
"-moz-deck",
|
||||
"-moz-element",
|
||||
"-moz-fit-content",
|
||||
"-moz-grid",
|
||||
"-moz-grid-group",
|
||||
"-moz-grid-line",
|
||||
@@ -3424,6 +3423,7 @@ exports.CSS_PROPERTIES = {
|
||||
"extra-expanded",
|
||||
"fill",
|
||||
"fill-box",
|
||||
"fit-content",
|
||||
"fixed",
|
||||
"flat",
|
||||
"flex",
|
||||
@@ -6000,10 +6000,10 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"content",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -6023,10 +6023,10 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"content",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -6816,9 +6816,9 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -6903,9 +6903,9 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -7257,6 +7257,25 @@ exports.CSS_PROPERTIES = {
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"margin-block": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
"margin-block-start",
|
||||
"margin-block-end"
|
||||
],
|
||||
"supports": [
|
||||
6,
|
||||
8
|
||||
],
|
||||
"values": [
|
||||
"-moz-calc",
|
||||
"auto",
|
||||
"calc",
|
||||
"inherit",
|
||||
"initial",
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"margin-block-end": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
@@ -7311,6 +7330,25 @@ exports.CSS_PROPERTIES = {
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"margin-inline": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
"margin-inline-start",
|
||||
"margin-inline-end"
|
||||
],
|
||||
"supports": [
|
||||
6,
|
||||
8
|
||||
],
|
||||
"values": [
|
||||
"-moz-calc",
|
||||
"auto",
|
||||
"calc",
|
||||
"inherit",
|
||||
"initial",
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"margin-inline-end": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
@@ -7744,8 +7782,8 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"calc",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -7766,8 +7804,8 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"calc",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -7788,8 +7826,8 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"calc",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -7828,9 +7866,9 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -7850,9 +7888,9 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -7872,9 +7910,9 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -8246,6 +8284,24 @@ exports.CSS_PROPERTIES = {
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"padding-block": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
"padding-block-start",
|
||||
"padding-block-end"
|
||||
],
|
||||
"supports": [
|
||||
6,
|
||||
8
|
||||
],
|
||||
"values": [
|
||||
"-moz-calc",
|
||||
"calc",
|
||||
"inherit",
|
||||
"initial",
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"padding-block-end": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
@@ -8297,6 +8353,24 @@ exports.CSS_PROPERTIES = {
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"padding-inline": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
"padding-inline-start",
|
||||
"padding-inline-end"
|
||||
],
|
||||
"supports": [
|
||||
6,
|
||||
8
|
||||
],
|
||||
"values": [
|
||||
"-moz-calc",
|
||||
"calc",
|
||||
"inherit",
|
||||
"initial",
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"padding-inline-end": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
@@ -9636,9 +9710,9 @@ exports.CSS_PROPERTIES = {
|
||||
"values": [
|
||||
"-moz-available",
|
||||
"-moz-calc",
|
||||
"-moz-fit-content",
|
||||
"auto",
|
||||
"calc",
|
||||
"fit-content",
|
||||
"inherit",
|
||||
"initial",
|
||||
"max-content",
|
||||
@@ -9752,6 +9826,7 @@ exports.CSS_PROPERTIES = {
|
||||
exports.PSEUDO_ELEMENTS = [
|
||||
":after",
|
||||
":before",
|
||||
":slotted",
|
||||
":backdrop",
|
||||
":first-letter",
|
||||
":first-line",
|
||||
|
||||
@@ -136,7 +136,7 @@ nsDSURIContentListener::DoContent(const nsACString& aContentType,
|
||||
mExistingJPEGRequest = baseChannel;
|
||||
}
|
||||
|
||||
if (rv == NS_ERROR_REMOTE_XUL) {
|
||||
if (rv == NS_ERROR_REMOTE_XUL || rv == NS_ERROR_DOCSHELL_DYING) {
|
||||
aRequest->Cancel(rv);
|
||||
*aAbortProcess = true;
|
||||
return NS_OK;
|
||||
|
||||
@@ -892,6 +892,8 @@ nsDocShell::~nsDocShell()
|
||||
nsresult
|
||||
nsDocShell::Init()
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
nsresult rv = nsDocLoader::Init();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
@@ -1916,6 +1918,8 @@ bool
|
||||
nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
|
||||
bool aFireOnLocationChange, uint32_t aLocationFlags)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, LogLevel::Debug)) {
|
||||
PR_LogPrint("DOCSHELL %p SetCurrentURI %s\n",
|
||||
this, aURI ? aURI->GetSpecOrDefault().get() : "");
|
||||
@@ -2176,6 +2180,8 @@ nsDocShell::SetUsePrivateBrowsing(bool aUsePrivateBrowsing)
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetPrivateBrowsing(bool aUsePrivateBrowsing)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
bool changed = aUsePrivateBrowsing != (mPrivateBrowsingId > 0);
|
||||
if (changed) {
|
||||
mPrivateBrowsingId = aUsePrivateBrowsing ? 1 : 0;
|
||||
@@ -2246,6 +2252,8 @@ nsDocShell::SetRemoteTabs(bool aUseRemoteTabs)
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetAffectPrivateSessionLifetime(bool aAffectLifetime)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
bool change = aAffectLifetime != mAffectPrivateSessionLifetime;
|
||||
if (change && UsePrivateBrowsing()) {
|
||||
AssertOriginAttributesMatchPrivateBrowsing();
|
||||
@@ -2748,6 +2756,8 @@ nsDocShell::GetSecurityUI(nsISecureBrowserUI** aSecurityUI)
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetSecurityUI(nsISecureBrowserUI* aSecurityUI)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
mSecurityUI = aSecurityUI;
|
||||
mSecurityUI->SetDocShell(this);
|
||||
return NS_OK;
|
||||
@@ -3930,6 +3940,10 @@ PrintDocTree(nsIDocShellTreeItem* aParentNode)
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetTreeOwner(nsIDocShellTreeOwner* aTreeOwner)
|
||||
{
|
||||
if (mIsBeingDestroyed && aTreeOwner) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_DOCSHELL_FOCUS
|
||||
nsCOMPtr<nsIDocShellTreeItem> item(do_QueryInterface(aTreeOwner));
|
||||
if (item) {
|
||||
@@ -5186,6 +5200,8 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
|
||||
const char* aCSSClass,
|
||||
nsIChannel* aFailedChannel)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
#if defined(DEBUG)
|
||||
if (MOZ_LOG_TEST(gDocShellLog, LogLevel::Debug)) {
|
||||
nsAutoCString chanName;
|
||||
@@ -5539,6 +5555,8 @@ nsDocShell::SetSessionHistory(nsISHistory* aSessionHistory)
|
||||
// make sure that we are the root docshell and
|
||||
// set a handle to root docshell in SH.
|
||||
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> root;
|
||||
/* Get the root docshell. If *this* is the root docshell
|
||||
* then save a handle to *this* in SH. SH needs it to do
|
||||
@@ -5719,16 +5737,22 @@ nsDocShell::Create()
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::Destroy()
|
||||
{
|
||||
// XXX: We allow this function to be called just once. If you are going to
|
||||
// reset new variables in this function, please make sure the variables will
|
||||
// never be re-initialized. Adding assertions to check |mIsBeingDestroyed|
|
||||
// in the setter functions for the variables would be enough.
|
||||
if (mIsBeingDestroyed) {
|
||||
return NS_ERROR_DOCSHELL_DYING;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mItemType == typeContent || mItemType == typeChrome,
|
||||
"Unexpected item type in docshell");
|
||||
|
||||
if (!mIsBeingDestroyed) {
|
||||
nsCOMPtr<nsIObserverService> serv = services::GetObserverService();
|
||||
if (serv) {
|
||||
const char* msg = mItemType == typeContent ?
|
||||
NS_WEBNAVIGATION_DESTROY : NS_CHROME_WEBNAVIGATION_DESTROY;
|
||||
serv->NotifyObservers(GetAsSupports(this), msg, nullptr);
|
||||
}
|
||||
nsCOMPtr<nsIObserverService> serv = services::GetObserverService();
|
||||
if (serv) {
|
||||
const char* msg = mItemType == typeContent ?
|
||||
NS_WEBNAVIGATION_DESTROY : NS_CHROME_WEBNAVIGATION_DESTROY;
|
||||
serv->NotifyObservers(GetAsSupports(this), msg, nullptr);
|
||||
}
|
||||
|
||||
mIsBeingDestroyed = true;
|
||||
@@ -6011,6 +6035,7 @@ nsDocShell::GetParentWidget(nsIWidget** aParentWidget)
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetParentWidget(nsIWidget* aParentWidget)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
mParentWidget = aParentWidget;
|
||||
|
||||
return NS_OK;
|
||||
@@ -6281,6 +6306,8 @@ nsDocShell::SetOnePermittedSandboxedNavigator(nsIDocShell* aSandboxedNavigator)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
mOnePermittedSandboxedNavigator = do_GetWeakReference(aSandboxedNavigator);
|
||||
NS_ASSERTION(mOnePermittedSandboxedNavigator,
|
||||
"One Permitted Sandboxed Navigator must support weak references.");
|
||||
@@ -6641,6 +6668,8 @@ nsDocShell::RefreshURI(nsIURI* aURI,
|
||||
bool aMetaRefresh,
|
||||
nsIPrincipal* aPrincipal)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
NS_ENSURE_ARG(aURI);
|
||||
|
||||
/* Check if Meta refresh/redirects are permitted. Some
|
||||
@@ -7985,6 +8014,10 @@ nsDocShell::CreateAboutBlankContentViewer(nsIPrincipal* aPrincipal,
|
||||
// wrong information :-(
|
||||
//
|
||||
(void)FirePageHideNotification(!mSavingOldViewer);
|
||||
// pagehide notification might destroy this docshell.
|
||||
if (mIsBeingDestroyed) {
|
||||
return NS_ERROR_DOCSHELL_DYING;
|
||||
}
|
||||
}
|
||||
|
||||
// Now make sure we don't think we're in the middle of firing unload after
|
||||
@@ -8128,6 +8161,8 @@ nsDocShell::CanSavePresentation(uint32_t aLoadType,
|
||||
void
|
||||
nsDocShell::ReattachEditorToWindow(nsISHEntry* aSHEntry)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
NS_ASSERTION(!mEditorData,
|
||||
"Why reattach an editor when we already have one?");
|
||||
NS_ASSERTION(aSHEntry && aSHEntry->HasDetachedEditor(),
|
||||
@@ -8165,6 +8200,9 @@ nsDocShell::DetachEditorFromWindow()
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
// Make mOSHE hold the owning ref to the editor data.
|
||||
if (mOSHE) {
|
||||
MOZ_ASSERT(!mIsBeingDestroyed || !mOSHE->HasDetachedEditor(),
|
||||
"We should not set the editor data again once after we "
|
||||
"detached the editor data during destroying this docshell");
|
||||
mOSHE->SetEditorData(mEditorData.forget());
|
||||
} else {
|
||||
mEditorData = nullptr;
|
||||
@@ -8351,6 +8389,8 @@ nsDocShell::GetRestoringDocument(bool* aRestoring)
|
||||
nsresult
|
||||
nsDocShell::RestorePresentation(nsISHEntry* aSHEntry, bool* aRestoring)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
NS_ASSERTION(mLoadType & LOAD_CMD_HISTORY,
|
||||
"RestorePresentation should only be called for history loads");
|
||||
|
||||
@@ -8512,6 +8552,10 @@ nsDocShell::RestoreFromHistory()
|
||||
|
||||
// Notify the old content viewer that it's being hidden.
|
||||
FirePageHideNotification(!mSavingOldViewer);
|
||||
// pagehide notification might destroy this docshell.
|
||||
if (mIsBeingDestroyed) {
|
||||
return NS_ERROR_DOCSHELL_DYING;
|
||||
}
|
||||
|
||||
// If mLSHE was changed as a result of the pagehide event, then
|
||||
// something else was loaded. Don't finish restoring.
|
||||
@@ -8969,6 +9013,12 @@ nsDocShell::CreateContentViewer(const nsACString& aContentType,
|
||||
{
|
||||
*aContentHandler = nullptr;
|
||||
|
||||
if (!mTreeOwner || mIsBeingDestroyed) {
|
||||
// If we don't have a tree owner, then we're in the process of being
|
||||
// destroyed. Rather than continue trying to load something, just give up.
|
||||
return NS_ERROR_DOCSHELL_DYING;
|
||||
}
|
||||
|
||||
// Can we check the content type of the current content viewer
|
||||
// and reuse it without destroying it and re-creating it?
|
||||
|
||||
@@ -9008,6 +9058,11 @@ nsDocShell::CreateContentViewer(const nsACString& aContentType,
|
||||
aOpenedChannel->GetURI(getter_AddRefs(mLoadingURI));
|
||||
}
|
||||
FirePageHideNotification(!mSavingOldViewer);
|
||||
if (mIsBeingDestroyed) {
|
||||
// Force to stop the newly created orphaned viewer.
|
||||
viewer->Stop();
|
||||
return NS_ERROR_DOCSHELL_DYING;
|
||||
}
|
||||
mLoadingURI = nullptr;
|
||||
|
||||
// Set mFiredUnloadEvent = false so that the unload handler for the
|
||||
@@ -9197,6 +9252,8 @@ nsDocShell::NewContentViewerObj(const nsACString& aContentType,
|
||||
nsresult
|
||||
nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
//
|
||||
// Copy content viewer state from previous or parent content viewer.
|
||||
//
|
||||
@@ -13382,6 +13439,8 @@ nsDocShell::EnsureScriptEnvironment()
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::EnsureEditorData()
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
bool openDocHasDetachedEditor = mOSHE && mOSHE->HasDetachedEditor();
|
||||
if (!mEditorData && !mIsBeingDestroyed && !openDocHasDetachedEditor) {
|
||||
// We shouldn't recreate the editor data if it already exists, or
|
||||
@@ -13397,6 +13456,8 @@ nsDocShell::EnsureEditorData()
|
||||
nsresult
|
||||
nsDocShell::EnsureTransferableHookData()
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
if (!mTransferableHookData) {
|
||||
mTransferableHookData = new nsTransferableHookData();
|
||||
}
|
||||
@@ -14469,6 +14530,8 @@ nsDocShell::CanSetOriginAttributes()
|
||||
nsresult
|
||||
nsDocShell::SetOriginAttributes(const DocShellOriginAttributes& aAttrs)
|
||||
{
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
if (!CanSetOriginAttributes()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@@ -1383,6 +1383,30 @@ Animation::GetRenderedDocument() const
|
||||
return mEffect->AsKeyframeEffect()->GetRenderedDocument();
|
||||
}
|
||||
|
||||
class AsyncFinishNotification : public MicroTaskRunnable
|
||||
{
|
||||
public:
|
||||
explicit AsyncFinishNotification(Animation* aAnimation)
|
||||
: MicroTaskRunnable()
|
||||
, mAnimation(aAnimation)
|
||||
{}
|
||||
|
||||
virtual void Run(AutoSlowOperation& aAso) override
|
||||
{
|
||||
mAnimation->DoFinishNotificationImmediately(this);
|
||||
mAnimation = nullptr;
|
||||
}
|
||||
|
||||
virtual bool Suppressed() override
|
||||
{
|
||||
nsIGlobalObject* global = mAnimation->GetOwnerGlobal();
|
||||
return global && global->IsInSyncOperation();
|
||||
}
|
||||
|
||||
private:
|
||||
RefPtr<Animation> mAnimation;
|
||||
};
|
||||
|
||||
void
|
||||
Animation::DoFinishNotification(SyncNotifyFlag aSyncNotifyFlag)
|
||||
{
|
||||
@@ -1390,9 +1414,8 @@ Animation::DoFinishNotification(SyncNotifyFlag aSyncNotifyFlag)
|
||||
|
||||
if (aSyncNotifyFlag == SyncNotifyFlag::Sync) {
|
||||
DoFinishNotificationImmediately();
|
||||
} else if (!mFinishNotificationTask.IsPending()) {
|
||||
RefPtr<nsRunnableMethod<Animation>> runnable =
|
||||
NewRunnableMethod(this, &Animation::DoFinishNotificationImmediately);
|
||||
} else if (!mFinishNotificationTask) {
|
||||
RefPtr<MicroTaskRunnable> runnable = new AsyncFinishNotification(this);
|
||||
context->DispatchToMicroTask(do_AddRef(runnable));
|
||||
mFinishNotificationTask = runnable.forget();
|
||||
}
|
||||
@@ -1415,9 +1438,13 @@ Animation::MaybeResolveFinishedPromise()
|
||||
}
|
||||
|
||||
void
|
||||
Animation::DoFinishNotificationImmediately()
|
||||
Animation::DoFinishNotificationImmediately(MicroTaskRunnable* aAsync)
|
||||
{
|
||||
mFinishNotificationTask.Revoke();
|
||||
if (aAsync && aAsync != mFinishNotificationTask) {
|
||||
return;
|
||||
}
|
||||
|
||||
mFinishNotificationTask = nullptr;
|
||||
|
||||
if (PlayState() != AnimationPlayState::Finished) {
|
||||
return;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/CycleCollectedJSContext.h"
|
||||
#include "mozilla/DOMEventTargetHelper.h"
|
||||
#include "mozilla/EffectCompositor.h" // For EffectCompositor::CascadeLevel
|
||||
#include "mozilla/LinkedList.h"
|
||||
@@ -42,6 +43,7 @@ class AnimValuesStyleRule;
|
||||
|
||||
namespace dom {
|
||||
|
||||
class AsyncFinishNotification;
|
||||
class CSSAnimation;
|
||||
class CSSTransition;
|
||||
|
||||
@@ -378,7 +380,8 @@ protected:
|
||||
void ResetFinishedPromise();
|
||||
void MaybeResolveFinishedPromise();
|
||||
void DoFinishNotification(SyncNotifyFlag aSyncNotifyFlag);
|
||||
void DoFinishNotificationImmediately();
|
||||
friend class AsyncFinishNotification;
|
||||
void DoFinishNotificationImmediately(MicroTaskRunnable* aAsync = nullptr);
|
||||
void DispatchPlaybackEvent(const nsAString& aName);
|
||||
|
||||
/**
|
||||
@@ -446,7 +449,7 @@ protected:
|
||||
// getAnimations() list.
|
||||
bool mIsRelevant;
|
||||
|
||||
nsRevocableEventPtr<nsRunnableMethod<Animation>> mFinishNotificationTask;
|
||||
RefPtr<MicroTaskRunnable> mFinishNotificationTask;
|
||||
// True if mFinished is resolved or would be resolved if mFinished has
|
||||
// yet to be created. This is not set when mFinished is rejected since
|
||||
// in that case mFinished is immediately reset to represent a new current
|
||||
|
||||
@@ -155,6 +155,13 @@ DocumentTimeline::WillRefresh(mozilla::TimeStamp aTime)
|
||||
bool needsTicks = false;
|
||||
nsTArray<Animation*> animationsToRemove(mAnimations.Count());
|
||||
|
||||
// https://drafts.csswg.org/web-animations-1/#update-animations-and-send-events,
|
||||
// step2.
|
||||
// Note that this should be done before nsAutoAnimationMutationBatch. If
|
||||
// PerformMicroTaskCheckpoint was called before nsAutoAnimationMutationBatch
|
||||
// is destroyed, some mutation records might not be delivered in this
|
||||
// checkpoint.
|
||||
nsAutoMicroTask mt;
|
||||
nsAutoAnimationMutationBatch mb(mDocument);
|
||||
|
||||
for (Animation* animation = mAnimationOrder.getFirst(); animation;
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
#include "mozilla/AnimationUtils.h"
|
||||
#include "mozilla/EffectSet.h"
|
||||
#include "mozilla/LayerAnimationInfo.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetPresShellForContent
|
||||
#include "nsCSSPropertyIDSet.h"
|
||||
#include "nsCSSProps.h"
|
||||
@@ -202,10 +201,7 @@ EffectCompositor::RequestRestyle(dom::Element* aElement,
|
||||
|
||||
if (aRestyleType == RestyleType::Layer) {
|
||||
// Prompt layers to re-sync their animations.
|
||||
MOZ_ASSERT(mPresContext->RestyleManager()->IsGecko(),
|
||||
"stylo: Servo-backed style system should not be using "
|
||||
"EffectCompositor");
|
||||
mPresContext->RestyleManager()->AsGecko()->IncrementAnimationGeneration();
|
||||
mPresContext->RestyleManager()->IncrementAnimationGeneration();
|
||||
EffectSet* effectSet =
|
||||
EffectSet::GetEffectSet(aElement, aPseudoType);
|
||||
if (effectSet) {
|
||||
@@ -317,10 +313,7 @@ EffectCompositor::GetAnimationRule(dom::Element* aElement,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mPresContext->RestyleManager()->IsGecko(),
|
||||
"stylo: Servo-backed style system should not be using "
|
||||
"EffectCompositor");
|
||||
if (mPresContext->RestyleManager()->AsGecko()->SkipAnimationRules()) {
|
||||
if (mPresContext->RestyleManager()->SkipAnimationRules()) {
|
||||
// We don't need to worry about updating mElementsToRestyle in this case
|
||||
// since this is not the animation restyle we requested when we called
|
||||
// PostRestyleForAnimation (see comment at start of this method).
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include "EffectSet.h"
|
||||
#include "mozilla/dom/Element.h" // For Element
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "nsCSSPseudoElements.h" // For CSSPseudoElementType
|
||||
#include "nsCycleCollectionNoteChild.h" // For CycleCollectionNoteChild
|
||||
#include "nsPresContext.h"
|
||||
@@ -110,11 +109,8 @@ EffectSet::DestroyEffectSet(dom::Element* aElement,
|
||||
void
|
||||
EffectSet::UpdateAnimationGeneration(nsPresContext* aPresContext)
|
||||
{
|
||||
MOZ_ASSERT(aPresContext->RestyleManager()->IsGecko(),
|
||||
"stylo: Servo-backed style system should not be using "
|
||||
"EffectSet");
|
||||
mAnimationGeneration =
|
||||
aPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration();
|
||||
aPresContext->RestyleManager()->GetAnimationGeneration();
|
||||
}
|
||||
|
||||
/* static */ nsIAtom**
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "mozilla/FloatingPoint.h" // For IsFinite
|
||||
#include "mozilla/LookAndFeel.h" // For LookAndFeel::GetInt
|
||||
#include "mozilla/KeyframeUtils.h"
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "mozilla/StyleAnimationValue.h"
|
||||
#include "Layers.h" // For Layer
|
||||
#include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetStyleContextForElement
|
||||
@@ -32,17 +31,7 @@ namespace mozilla {
|
||||
bool
|
||||
PropertyValuePair::operator==(const PropertyValuePair& aOther) const
|
||||
{
|
||||
if (mProperty != aOther.mProperty || mValue != aOther.mValue) {
|
||||
return false;
|
||||
}
|
||||
if (mServoDeclarationBlock == aOther.mServoDeclarationBlock) {
|
||||
return true;
|
||||
}
|
||||
if (!mServoDeclarationBlock || !aOther.mServoDeclarationBlock) {
|
||||
return false;
|
||||
}
|
||||
return Servo_DeclarationBlock_Equals(mServoDeclarationBlock,
|
||||
aOther.mServoDeclarationBlock);
|
||||
return mProperty == aOther.mProperty && mValue == aOther.mValue;
|
||||
}
|
||||
|
||||
namespace dom {
|
||||
@@ -296,10 +285,7 @@ KeyframeEffectReadOnly::UpdateProperties(nsStyleContext* aStyleContext)
|
||||
runningOnCompositorProperties.HasProperty(property.mProperty);
|
||||
}
|
||||
|
||||
// FIXME (bug 1303235): Do this for Servo too
|
||||
if (aStyleContext->PresContext()->StyleSet()->IsGecko()) {
|
||||
CalculateCumulativeChangeHint(aStyleContext);
|
||||
}
|
||||
CalculateCumulativeChangeHint(aStyleContext);
|
||||
|
||||
MarkCascadeNeedsUpdate();
|
||||
|
||||
@@ -936,13 +922,8 @@ KeyframeEffectReadOnly::GetKeyframes(JSContext*& aCx,
|
||||
: propertyValue.mProperty;
|
||||
|
||||
nsAutoString stringValue;
|
||||
if (propertyValue.mServoDeclarationBlock) {
|
||||
Servo_DeclarationBlock_SerializeOneValue(
|
||||
propertyValue.mServoDeclarationBlock, &stringValue);
|
||||
} else {
|
||||
propertyValue.mValue.AppendToString(
|
||||
propertyForSerializing, stringValue, nsCSSValue::eNormalized);
|
||||
}
|
||||
propertyValue.mValue.AppendToString(
|
||||
propertyForSerializing, stringValue, nsCSSValue::eNormalized);
|
||||
|
||||
JS::Rooted<JS::Value> value(aCx);
|
||||
if (!ToJSValue(aCx, stringValue, &value) ||
|
||||
@@ -1286,10 +1267,8 @@ CreateStyleContextForAnimationValue(nsCSSPropertyID aProperty,
|
||||
nsCOMArray<nsIStyleRule> rules;
|
||||
rules.AppendObject(styleRule);
|
||||
|
||||
MOZ_ASSERT(aBaseStyleContext->PresContext()->StyleSet()->IsGecko(),
|
||||
"ServoStyleSet should not use StyleAnimationValue for animations");
|
||||
nsStyleSet* styleSet =
|
||||
aBaseStyleContext->PresContext()->StyleSet()->AsGecko();
|
||||
aBaseStyleContext->PresContext()->StyleSet();
|
||||
|
||||
RefPtr<nsStyleContext> styleContext =
|
||||
styleSet->ResolveStyleByAddingRules(aBaseStyleContext, rules);
|
||||
@@ -1362,10 +1341,8 @@ KeyframeEffectReadOnly::CanIgnoreIfNotVisible() const
|
||||
return false;
|
||||
}
|
||||
|
||||
// FIXME (bug 1303235): We don't calculate mCumulativeChangeHint for
|
||||
// the Servo backend yet
|
||||
nsPresContext* presContext = GetPresContext();
|
||||
if (!presContext || presContext->StyleSet()->IsServo()) {
|
||||
if (!presContext) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include "mozilla/EffectCompositor.h"
|
||||
#include "mozilla/KeyframeEffectParams.h"
|
||||
#include "mozilla/LayerAnimationInfo.h" // LayerAnimations::kRecords
|
||||
#include "mozilla/ServoBindingTypes.h" // RawServoDeclarationBlock and
|
||||
// associated RefPtrTraits
|
||||
#include "mozilla/StyleAnimationValue.h"
|
||||
#include "mozilla/dom/AnimationEffectReadOnly.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
@@ -63,11 +61,6 @@ struct PropertyValuePair
|
||||
// (string).
|
||||
nsCSSValue mValue;
|
||||
|
||||
// The specified value when using the Servo backend. However, even when
|
||||
// using the Servo backend, we still fill in |mValue| in the case where we
|
||||
// fail to parse the value since we use it to store the original string.
|
||||
RefPtr<RawServoDeclarationBlock> mServoDeclarationBlock;
|
||||
|
||||
bool operator==(const PropertyValuePair&) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/RangedArray.h"
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "mozilla/StyleAnimationValue.h"
|
||||
#include "mozilla/TimingParams.h"
|
||||
#include "mozilla/dom/BaseKeyframeTypesBinding.h" // For FastBaseKeyframe etc.
|
||||
@@ -319,12 +318,8 @@ public:
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
inline bool
|
||||
IsInvalidValuePair(const PropertyValuePair& aPair, StyleBackendType aBackend)
|
||||
IsInvalidValuePair(const PropertyValuePair& aPair)
|
||||
{
|
||||
if (aBackend == StyleBackendType::Servo) {
|
||||
return !aPair.mServoDeclarationBlock;
|
||||
}
|
||||
|
||||
// There are three types of values we store as token streams:
|
||||
//
|
||||
// * Shorthand values (where we manually extract the token stream's string
|
||||
@@ -600,8 +595,6 @@ KeyframeUtils::GetComputedKeyframeValues(const nsTArray<Keyframe>& aKeyframes,
|
||||
MOZ_ASSERT(aStyleContext);
|
||||
MOZ_ASSERT(aElement);
|
||||
|
||||
StyleBackendType styleBackend = aElement->OwnerDoc()->GetStyleBackendType();
|
||||
|
||||
const size_t len = aKeyframes.Length();
|
||||
nsTArray<ComputedKeyframeValues> result(len);
|
||||
|
||||
@@ -610,12 +603,7 @@ KeyframeUtils::GetComputedKeyframeValues(const nsTArray<Keyframe>& aKeyframes,
|
||||
ComputedKeyframeValues* computedValues = result.AppendElement();
|
||||
for (const PropertyValuePair& pair :
|
||||
PropertyPriorityIterator(frame.mPropertyValues)) {
|
||||
MOZ_ASSERT(!pair.mServoDeclarationBlock ||
|
||||
styleBackend == StyleBackendType::Servo,
|
||||
"Animation values were parsed using Servo backend but target"
|
||||
" element is not using Servo backend?");
|
||||
|
||||
if (IsInvalidValuePair(pair, styleBackend)) {
|
||||
if (IsInvalidValuePair(pair)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -623,33 +611,25 @@ KeyframeUtils::GetComputedKeyframeValues(const nsTArray<Keyframe>& aKeyframes,
|
||||
// a KeyframeValueEntry for each value.
|
||||
nsTArray<PropertyStyleAnimationValuePair> values;
|
||||
|
||||
if (styleBackend == StyleBackendType::Servo) {
|
||||
// For shorthands, we store the string as a token stream so we need to
|
||||
// extract that first.
|
||||
if (nsCSSProps::IsShorthand(pair.mProperty)) {
|
||||
nsCSSValueTokenStream* tokenStream = pair.mValue.GetTokenStreamValue();
|
||||
if (!StyleAnimationValue::ComputeValues(pair.mProperty,
|
||||
CSSEnabledState::eForAllContent, aStyleContext,
|
||||
*pair.mServoDeclarationBlock, values)) {
|
||||
CSSEnabledState::eForAllContent, aElement, aStyleContext,
|
||||
tokenStream->mTokenStream, /* aUseSVGMode */ false, values) ||
|
||||
IsComputeValuesFailureKey(pair)) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
// For shorthands, we store the string as a token stream so we need to
|
||||
// extract that first.
|
||||
if (nsCSSProps::IsShorthand(pair.mProperty)) {
|
||||
nsCSSValueTokenStream* tokenStream = pair.mValue.GetTokenStreamValue();
|
||||
if (!StyleAnimationValue::ComputeValues(pair.mProperty,
|
||||
CSSEnabledState::eForAllContent, aElement, aStyleContext,
|
||||
tokenStream->mTokenStream, /* aUseSVGMode */ false, values) ||
|
||||
IsComputeValuesFailureKey(pair)) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (!StyleAnimationValue::ComputeValues(pair.mProperty,
|
||||
CSSEnabledState::eForAllContent, aElement, aStyleContext,
|
||||
pair.mValue, /* aUseSVGMode */ false, values)) {
|
||||
continue;
|
||||
}
|
||||
MOZ_ASSERT(values.Length() == 1,
|
||||
"Longhand properties should produce a single"
|
||||
" StyleAnimationValue");
|
||||
if (!StyleAnimationValue::ComputeValues(pair.mProperty,
|
||||
CSSEnabledState::eForAllContent, aElement, aStyleContext,
|
||||
pair.mValue, /* aUseSVGMode */ false, values)) {
|
||||
continue;
|
||||
}
|
||||
MOZ_ASSERT(values.Length() == 1,
|
||||
"Longhand properties should produce a single"
|
||||
" StyleAnimationValue");
|
||||
}
|
||||
|
||||
for (auto& value : values) {
|
||||
@@ -999,30 +979,6 @@ MakePropertyValuePair(nsCSSPropertyID aProperty, const nsAString& aStringValue,
|
||||
|
||||
result.mProperty = aProperty;
|
||||
|
||||
if (aDocument->GetStyleBackendType() == StyleBackendType::Servo) {
|
||||
nsCString name = nsCSSProps::GetStringValue(aProperty);
|
||||
|
||||
NS_ConvertUTF16toUTF8 value(aStringValue);
|
||||
RefPtr<ThreadSafeURIHolder> base =
|
||||
new ThreadSafeURIHolder(aDocument->GetDocumentURI());
|
||||
RefPtr<ThreadSafeURIHolder> referrer =
|
||||
new ThreadSafeURIHolder(aDocument->GetDocumentURI());
|
||||
RefPtr<ThreadSafePrincipalHolder> principal =
|
||||
new ThreadSafePrincipalHolder(aDocument->NodePrincipal());
|
||||
|
||||
nsCString baseString;
|
||||
aDocument->GetDocumentURI()->GetSpec(baseString);
|
||||
|
||||
RefPtr<RawServoDeclarationBlock> servoDeclarationBlock =
|
||||
Servo_ParseProperty(&name, &value, &baseString,
|
||||
base, referrer, principal).Consume();
|
||||
|
||||
if (servoDeclarationBlock) {
|
||||
result.mServoDeclarationBlock = servoDeclarationBlock.forget();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
nsCSSValue value;
|
||||
if (!nsCSSProps::IsShorthand(aProperty)) {
|
||||
aParser.ParseLonghandProperty(aProperty,
|
||||
@@ -1054,13 +1010,6 @@ MakePropertyValuePair(nsCSSPropertyID aProperty, const nsAString& aStringValue,
|
||||
"The shorthand property of a token stream should be initialized"
|
||||
" to unknown");
|
||||
value.SetTokenStreamValue(tokenStream);
|
||||
} else {
|
||||
// If we succeeded in parsing with Gecko, but not Servo the animation is
|
||||
// not going to work since, for the purposes of animation, we're going to
|
||||
// ignore |mValue| when the backend is Servo.
|
||||
NS_WARNING_ASSERTION(aDocument->GetStyleBackendType() !=
|
||||
StyleBackendType::Servo,
|
||||
"Gecko succeeded in parsing where Servo failed");
|
||||
}
|
||||
|
||||
result.mValue = value;
|
||||
@@ -1412,8 +1361,6 @@ HasImplicitKeyframeValues(const nsTArray<Keyframe>& aKeyframes,
|
||||
}
|
||||
};
|
||||
|
||||
StyleBackendType styleBackend = aDocument->GetStyleBackendType();
|
||||
|
||||
for (size_t i = 0, len = aKeyframes.Length(); i < len; i++) {
|
||||
const Keyframe& frame = aKeyframes[i];
|
||||
|
||||
@@ -1429,25 +1376,18 @@ HasImplicitKeyframeValues(const nsTArray<Keyframe>& aKeyframes,
|
||||
: computedOffset;
|
||||
|
||||
for (const PropertyValuePair& pair : frame.mPropertyValues) {
|
||||
if (IsInvalidValuePair(pair, styleBackend)) {
|
||||
if (IsInvalidValuePair(pair)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (nsCSSProps::IsShorthand(pair.mProperty)) {
|
||||
if (styleBackend == StyleBackendType::Gecko) {
|
||||
nsCSSValueTokenStream* tokenStream =
|
||||
pair.mValue.GetTokenStreamValue();
|
||||
nsCSSParser parser(aDocument->CSSLoader());
|
||||
if (!parser.IsValueValidForProperty(pair.mProperty,
|
||||
tokenStream->mTokenStream)) {
|
||||
continue;
|
||||
}
|
||||
nsCSSValueTokenStream* tokenStream =
|
||||
pair.mValue.GetTokenStreamValue();
|
||||
nsCSSParser parser(aDocument->CSSLoader());
|
||||
if (!parser.IsValueValidForProperty(pair.mProperty,
|
||||
tokenStream->mTokenStream)) {
|
||||
continue;
|
||||
}
|
||||
// For the Servo backend, invalid shorthand values are represented by
|
||||
// a null mServoDeclarationBlock member which we skip above in
|
||||
// IsInvalidValuePair.
|
||||
MOZ_ASSERT(styleBackend != StyleBackendType::Servo ||
|
||||
pair.mServoDeclarationBlock);
|
||||
CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(
|
||||
prop, pair.mProperty, CSSEnabledState::eForAllContent) {
|
||||
addToPropertySets(*prop, offsetToUse);
|
||||
|
||||
@@ -135,7 +135,7 @@ TimingParams::ParseEasing(const nsAString& aEasing,
|
||||
NS_STYLE_TRANSITION_TIMING_FUNCTION_LINEAR) {
|
||||
return Nothing();
|
||||
}
|
||||
MOZ_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case eCSSUnit_Cubic_Bezier:
|
||||
case eCSSUnit_Steps: {
|
||||
nsTimingFunction timingFunction;
|
||||
|
||||
@@ -474,10 +474,7 @@ IsNativeAnonymousImplementationOfPseudoElement(nsIContent* aContent)
|
||||
// Unlike regular nodes, native anonymous content (NAC) gets created during
|
||||
// frame construction, which happens after the main style traversal. This
|
||||
// means that we have to manually resolve style for those nodes shortly after
|
||||
// they're created, either by (a) invoking ResolvePseudoElementStyle (for PE
|
||||
// NAC), or (b) handing the subtree off to Servo for a mini-traversal (for
|
||||
// non-PE NAC). We have assertions in nsCSSFrameConstructor that we don't do
|
||||
// both.
|
||||
// they're created by invoking ResolvePseudoElementStyle (for PE NAC).
|
||||
//
|
||||
// Once that happens, the NAC has a frame. So if we have no frame here,
|
||||
// we're either not NAC, or in the process of doing (b). Either way, this
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "mozilla/dom/CustomElementRegistry.h"
|
||||
|
||||
#include "mozilla/CycleCollectedJSContext.h"
|
||||
#include "mozilla/dom/CustomElementRegistryBinding.h"
|
||||
#include "mozilla/dom/HTMLElementBinding.h"
|
||||
#include "mozilla/dom/WebComponentsBinding.h"
|
||||
@@ -1153,7 +1152,7 @@ CustomElementReactionsStack::Enqueue(Element* aElement,
|
||||
|
||||
CycleCollectedJSContext* context = CycleCollectedJSContext::Get();
|
||||
RefPtr<BackupQueueMicroTask> bqmt = new BackupQueueMicroTask(this);
|
||||
context->DispatchMicroTaskRunnable(bqmt.forget());
|
||||
context->DispatchToMicroTask(bqmt.forget());
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "js/GCHashTable.h"
|
||||
#include "js/TypeDecls.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/CycleCollectedJSContext.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/dom/BindingDeclarations.h"
|
||||
#include "mozilla/dom/FunctionBinding.h"
|
||||
|
||||
@@ -80,7 +80,14 @@ DOMIntersectionObserver::Constructor(const mozilla::dom::GlobalObject& aGlobal,
|
||||
RefPtr<DOMIntersectionObserver> observer =
|
||||
new DOMIntersectionObserver(window.forget(), aCb);
|
||||
|
||||
observer->mRoot = aOptions.mRoot;
|
||||
if (!aOptions.mRoot.IsNull()) {
|
||||
if (aOptions.mRoot.Value().IsElement()) {
|
||||
observer->mRoot = aOptions.mRoot.Value().GetAsElement();
|
||||
} else {
|
||||
MOZ_ASSERT(aOptions.mRoot.Value().IsDocument());
|
||||
observer->mRoot = aOptions.mRoot.Value().GetAsDocument();
|
||||
}
|
||||
}
|
||||
|
||||
if (!observer->SetRootMargin(aOptions.mRootMargin)) {
|
||||
aRv.ThrowDOMException(NS_ERROR_DOM_SYNTAX_ERR,
|
||||
@@ -258,6 +265,30 @@ EdgeInclusiveIntersection(const nsRect& aRect, const nsRect& aOtherRect)
|
||||
return Some(nsRect(left, top, right - left, bottom - top));
|
||||
}
|
||||
|
||||
// NOTE: This returns nullptr if |aDocument| is in a cross process.
|
||||
static nsIDocument* GetTopLevelDocument(const nsIDocument& aDocument) {
|
||||
nsCOMPtr<nsIPresShell> presShell = aDocument.GetShell();
|
||||
|
||||
if (presShell) {
|
||||
nsIFrame* rootFrame = presShell->GetRootScrollFrame();
|
||||
if (rootFrame) {
|
||||
nsPresContext* presContext = rootFrame->PresContext();
|
||||
while (!presContext->IsRootContentDocument()) {
|
||||
// Walk up the tree
|
||||
presContext = presContext->GetParentPresContext();
|
||||
if (!presContext) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(presContext && presContext->IsRootContentDocument()) {
|
||||
return presContext->Document();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
enum class BrowsingContextInfo {
|
||||
SimilarOriginBrowsingContext,
|
||||
DifferentOriginBrowsingContext,
|
||||
@@ -267,14 +298,12 @@ enum class BrowsingContextInfo {
|
||||
void
|
||||
DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time)
|
||||
{
|
||||
Element* root = nullptr;
|
||||
nsINode* root = mRoot;
|
||||
nsIFrame* rootFrame = nullptr;
|
||||
nsRect rootRect;
|
||||
|
||||
if (mRoot) {
|
||||
root = mRoot;
|
||||
rootFrame = root->GetPrimaryFrame();
|
||||
if (rootFrame) {
|
||||
if (mRoot && mRoot->IsElement()) {
|
||||
if ((rootFrame = mRoot->AsElement()->GetPrimaryFrame())) {
|
||||
nsRect rootRectRelativeToRootFrame;
|
||||
if (rootFrame->GetType() == nsGkAtoms::scrollFrame) {
|
||||
// rootRectRelativeToRootFrame should be the content rect of rootFrame, not including the scrollbars.
|
||||
@@ -292,30 +321,18 @@ DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time
|
||||
containingBlock);
|
||||
}
|
||||
} else {
|
||||
nsCOMPtr<nsIPresShell> presShell = aDocument->GetShell();
|
||||
if (presShell) {
|
||||
rootFrame = presShell->GetRootScrollFrame();
|
||||
if (rootFrame) {
|
||||
nsPresContext* presContext = rootFrame->PresContext();
|
||||
while (!presContext->IsRootContentDocument()) {
|
||||
// Walk up the tree
|
||||
presContext = presContext->GetParentPresContext();
|
||||
if (!presContext) {
|
||||
break;
|
||||
MOZ_ASSERT(!mRoot || mRoot->IsInUncomposedDoc());
|
||||
nsIDocument* rootDocument =
|
||||
mRoot ? mRoot->GetUncomposedDoc() : GetTopLevelDocument(*aDocument);
|
||||
if (rootDocument) {
|
||||
if (nsIPresShell* presShell = rootDocument->GetShell()) {
|
||||
rootFrame = presShell->GetRootScrollFrame();
|
||||
if (rootFrame) {
|
||||
root = rootFrame->GetContent()->AsElement();
|
||||
nsIScrollableFrame* scrollFrame = do_QueryFrame(rootFrame);
|
||||
if (scrollFrame) {
|
||||
rootRect = scrollFrame->GetScrollPortRect();
|
||||
}
|
||||
nsIFrame* rootScrollFrame = presContext->PresShell()->GetRootScrollFrame();
|
||||
if (rootScrollFrame) {
|
||||
rootFrame = rootScrollFrame;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
root = rootFrame->GetContent()->AsElement();
|
||||
nsIScrollableFrame* scrollFrame = do_QueryFrame(rootFrame);
|
||||
// If we end up with a null root frame for some reason, we'll proceed
|
||||
// with an empty root intersection rect.
|
||||
if (scrollFrame) {
|
||||
rootRect = scrollFrame->GetScrollPortRect();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,7 +340,7 @@ DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time
|
||||
|
||||
nsMargin rootMargin;
|
||||
NS_FOR_CSS_SIDES(side) {
|
||||
nscoord basis = side == NS_SIDE_TOP || side == NS_SIDE_BOTTOM ?
|
||||
nscoord basis = side == eSideTop || side == eSideBottom ?
|
||||
rootRect.height : rootRect.width;
|
||||
nsCSSValue value = mRootMargin.*nsCSSRect::sides[side];
|
||||
nsStyleCoord coord;
|
||||
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
return mOwner;
|
||||
}
|
||||
|
||||
Element* GetRoot() const {
|
||||
nsINode* GetRoot() const {
|
||||
return mRoot;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ protected:
|
||||
nsCOMPtr<nsPIDOMWindowInner> mOwner;
|
||||
RefPtr<nsIDocument> mDocument;
|
||||
RefPtr<mozilla::dom::IntersectionCallback> mCallback;
|
||||
RefPtr<Element> mRoot;
|
||||
RefPtr<nsINode> mRoot;
|
||||
nsCSSRect mRootMargin;
|
||||
nsTArray<double> mThresholds;
|
||||
|
||||
|
||||
+41
-7
@@ -118,17 +118,23 @@ ValidateAndFixupMatrixInit(DOMMatrixInit& aMatrixInit, ErrorResult& aRv)
|
||||
}
|
||||
|
||||
void
|
||||
DOMMatrixReadOnly::SetDataFromMatrixInit(DOMMatrixInit& aMatrixInit)
|
||||
DOMMatrixReadOnly::SetDataFromMatrix2DInit(const DOMMatrix2DInit& aMatrixInit) {
|
||||
MOZ_ASSERT(Is2D());
|
||||
mMatrix2D->_11 = aMatrixInit.mM11.Value();
|
||||
mMatrix2D->_12 = aMatrixInit.mM12.Value();
|
||||
mMatrix2D->_21 = aMatrixInit.mM21.Value();
|
||||
mMatrix2D->_22 = aMatrixInit.mM22.Value();
|
||||
mMatrix2D->_31 = aMatrixInit.mM41.Value();
|
||||
mMatrix2D->_32 = aMatrixInit.mM42.Value();
|
||||
}
|
||||
|
||||
void
|
||||
DOMMatrixReadOnly::SetDataFromMatrixInit(const DOMMatrixInit& aMatrixInit)
|
||||
{
|
||||
const bool is2D = aMatrixInit.mIs2D.Value();
|
||||
MOZ_ASSERT(is2D == Is2D());
|
||||
if (is2D) {
|
||||
mMatrix2D->_11 = aMatrixInit.mM11.Value();
|
||||
mMatrix2D->_12 = aMatrixInit.mM12.Value();
|
||||
mMatrix2D->_21 = aMatrixInit.mM21.Value();
|
||||
mMatrix2D->_22 = aMatrixInit.mM22.Value();
|
||||
mMatrix2D->_31 = aMatrixInit.mM41.Value();
|
||||
mMatrix2D->_32 = aMatrixInit.mM42.Value();
|
||||
SetDataFromMatrix2DInit(aMatrixInit);
|
||||
} else {
|
||||
mMatrix3D->_11 = aMatrixInit.mM11.Value();
|
||||
mMatrix3D->_12 = aMatrixInit.mM12.Value();
|
||||
@@ -149,6 +155,34 @@ DOMMatrixReadOnly::SetDataFromMatrixInit(DOMMatrixInit& aMatrixInit)
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<DOMMatrixReadOnly> DOMMatrixReadOnly::FromMatrix(
|
||||
nsISupports* aParent, const DOMMatrix2DInit& aMatrixInit,
|
||||
ErrorResult& aRv) {
|
||||
DOMMatrix2DInit matrixInit(aMatrixInit);
|
||||
if (!ValidateAndFixupMatrix2DInit(matrixInit, aRv)) {
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
RefPtr<DOMMatrixReadOnly> matrix =
|
||||
new DOMMatrixReadOnly(aParent, /* is2D */ true);
|
||||
matrix->SetDataFromMatrix2DInit(matrixInit);
|
||||
return matrix.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<DOMMatrixReadOnly> DOMMatrixReadOnly::FromMatrix(
|
||||
nsISupports* aParent, const DOMMatrixInit& aMatrixInit, ErrorResult& aRv) {
|
||||
DOMMatrixInit matrixInit(aMatrixInit);
|
||||
if (!ValidateAndFixupMatrixInit(matrixInit, aRv)) {
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
RefPtr<DOMMatrixReadOnly> rval =
|
||||
new DOMMatrixReadOnly(aParent, matrixInit.mIs2D.Value());
|
||||
rval->SetDataFromMatrixInit(matrixInit);
|
||||
return rval.forget();
|
||||
|
||||
}
|
||||
|
||||
already_AddRefed<DOMMatrixReadOnly>
|
||||
DOMMatrixReadOnly::FromMatrix(const GlobalObject& aGlobal, const DOMMatrixInit& aMatrixInit, ErrorResult& aRv)
|
||||
{
|
||||
|
||||
+24
-1
@@ -26,6 +26,7 @@ class DOMPoint;
|
||||
class StringOrUnrestrictedDoubleSequence;
|
||||
struct DOMPointInit;
|
||||
struct DOMMatrixInit;
|
||||
struct DOMMatrix2DInit;
|
||||
|
||||
class DOMMatrixReadOnly : public nsWrapperCache
|
||||
{
|
||||
@@ -51,12 +52,23 @@ public:
|
||||
mMatrix3D = new gfx::Matrix4x4(aMatrix);
|
||||
}
|
||||
|
||||
DOMMatrixReadOnly(nsISupports* aParent, const gfx::Matrix& aMatrix)
|
||||
: mParent(aParent) {
|
||||
mMatrix2D = new gfx::Matrix(aMatrix);
|
||||
}
|
||||
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMMatrixReadOnly)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMMatrixReadOnly)
|
||||
|
||||
nsISupports* GetParentObject() const { return mParent; }
|
||||
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
static already_AddRefed<DOMMatrixReadOnly>
|
||||
FromMatrix(nsISupports* aParent, const DOMMatrix2DInit& aMatrixInit, ErrorResult& aRv);
|
||||
|
||||
static already_AddRefed<DOMMatrixReadOnly>
|
||||
FromMatrix(nsISupports* aParent, const DOMMatrixInit& aMatrixInit, ErrorResult& aRv);
|
||||
|
||||
static already_AddRefed<DOMMatrixReadOnly>
|
||||
FromMatrix(const GlobalObject& aGlobal, const DOMMatrixInit& aMatrixInit, ErrorResult& aRv);
|
||||
|
||||
@@ -207,6 +219,12 @@ public:
|
||||
ErrorResult& aRv) const;
|
||||
void Stringify(nsAString& aResult);
|
||||
bool WriteStructuredClone(JSStructuredCloneWriter* aWriter) const;
|
||||
const gfx::Matrix* GetInternal2D() const {
|
||||
if (Is2D()) {
|
||||
return mMatrix2D;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsISupports> mParent;
|
||||
@@ -220,7 +238,8 @@ protected:
|
||||
* where all of its members are properly defined.
|
||||
* The init dictionary's dimension must match the matrix one.
|
||||
*/
|
||||
void SetDataFromMatrixInit(DOMMatrixInit& aMatrixInit);
|
||||
void SetDataFromMatrix2DInit(const DOMMatrix2DInit& aMatrixInit);
|
||||
void SetDataFromMatrixInit(const DOMMatrixInit& aMatrixInit);
|
||||
|
||||
DOMMatrixReadOnly* SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv);
|
||||
void Ensure3DMatrix();
|
||||
@@ -254,6 +273,10 @@ public:
|
||||
: DOMMatrixReadOnly(aParent, aMatrix)
|
||||
{}
|
||||
|
||||
DOMMatrix(nsISupports* aParent, const gfx::Matrix& aMatrix)
|
||||
: DOMMatrixReadOnly(aParent, aMatrix)
|
||||
{}
|
||||
|
||||
static already_AddRefed<DOMMatrix>
|
||||
FromMatrix(nsISupports* aParent, const DOMMatrixInit& aMatrixInit, ErrorResult& aRv);
|
||||
static already_AddRefed<DOMMatrix>
|
||||
|
||||
@@ -169,7 +169,7 @@ DocumentOrShadowRoot::GetFullscreenElement()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Element* element = AsNode().OwnerDoc()->FullScreenStackTop();
|
||||
Element* element = AsNode().OwnerDoc()->GetUnretargetedFullScreenElement();
|
||||
NS_ASSERTION(!element ||
|
||||
element->State().HasState(NS_EVENT_STATE_FULL_SCREEN),
|
||||
"Fullscreen element should have fullscreen styles applied");
|
||||
|
||||
+30
-31
@@ -56,7 +56,6 @@
|
||||
#include "mozilla/AnimationComparator.h"
|
||||
#include "mozilla/AsyncEventDispatcher.h"
|
||||
#include "mozilla/ContentEvents.h"
|
||||
#include "mozilla/DeclarationBlockInlines.h"
|
||||
#include "mozilla/EffectSet.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/EventListenerManager.h"
|
||||
@@ -106,6 +105,7 @@
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "mozilla/css/StyleRule.h" /* For nsCSSSelectorList */
|
||||
#include "mozilla/css/Declaration.h"
|
||||
#include "nsCSSRuleProcessor.h"
|
||||
#include "nsRuleProcessorData.h"
|
||||
#include "nsTextNode.h"
|
||||
@@ -1481,6 +1481,27 @@ Element::GetElementsByClassName(const nsAString& aClassNames,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
CSSPseudoElementType
|
||||
Element::GetPseudoElementType() const {
|
||||
if (!HasProperties()) {
|
||||
return CSSPseudoElementType::NotPseudo;
|
||||
}
|
||||
nsresult rv = NS_OK;
|
||||
auto raw = GetProperty(nsGkAtoms::pseudoProperty, &rv);
|
||||
if (rv == NS_PROPTABLE_PROP_NOT_THERE) {
|
||||
return CSSPseudoElementType::NotPseudo;
|
||||
}
|
||||
return CSSPseudoElementType(reinterpret_cast<uintptr_t>(raw));
|
||||
}
|
||||
|
||||
void
|
||||
Element::SetPseudoElementType(CSSPseudoElementType aPseudo) {
|
||||
static_assert(sizeof(CSSPseudoElementType) <= sizeof(uintptr_t),
|
||||
"Need to be able to store this in a void*");
|
||||
MOZ_ASSERT(aPseudo != CSSPseudoElementType::NotPseudo);
|
||||
SetProperty(nsGkAtoms::pseudoProperty, reinterpret_cast<void*>(aPseudo));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the count of descendants (inclusive of aContent) in
|
||||
* the uncomposed document that are explicitly set as editable.
|
||||
@@ -1607,7 +1628,7 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
// And clear the lazy frame construction bits.
|
||||
NODE_NEEDS_FRAME | NODE_DESCENDANTS_NEED_FRAMES);
|
||||
// And the restyle bits
|
||||
UnsetRestyleFlagsIfGecko();
|
||||
UnsetRestyleFlags();
|
||||
} else if (IsInShadowTree()) {
|
||||
// We're not in a document, but we did get inserted into a shadow tree.
|
||||
// Since we won't have any restyle data in the document's restyle trackers,
|
||||
@@ -1617,7 +1638,7 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
// inserted into a document.
|
||||
UnsetFlags(NODE_FORCE_XBL_BINDINGS |
|
||||
NODE_NEEDS_FRAME | NODE_DESCENDANTS_NEED_FRAMES);
|
||||
UnsetRestyleFlagsIfGecko();
|
||||
UnsetRestyleFlags();
|
||||
} else {
|
||||
// If we're not in the doc and not in a shadow tree,
|
||||
// update our subtree pointer.
|
||||
@@ -1758,18 +1779,6 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
}
|
||||
}
|
||||
|
||||
// It would be cleanest to mark nodes as dirty when (a) they're created and
|
||||
// (b) they're unbound from a tree. However, we can't easily do (a) right now,
|
||||
// because IsStyledByServo() is not always easy to check at node creation time,
|
||||
// and the bits have different meaning in the non-IsStyledByServo case.
|
||||
//
|
||||
// So for now, we just mark nodes as dirty when they're inserted into a
|
||||
// document or shadow tree.
|
||||
if (IsStyledByServo() && IsInComposedDoc()) {
|
||||
MOZ_ASSERT(!HasServoData());
|
||||
SetIsDirtyForServo();
|
||||
}
|
||||
|
||||
// XXXbz script execution during binding can trigger some of these
|
||||
// postcondition asserts.... But we do want that, since things will
|
||||
// generally be quite broken when that happens.
|
||||
@@ -1896,16 +1905,6 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
|
||||
ClearInDocument();
|
||||
|
||||
// Computed styled data isn't useful for detached nodes, and we'll need to
|
||||
// recomputed it anyway if we ever insert the nodes back into a document.
|
||||
if (IsStyledByServo()) {
|
||||
ClearServoData();
|
||||
} else {
|
||||
#ifdef MOZ_STYLO
|
||||
MOZ_ASSERT(!HasServoData());
|
||||
#endif
|
||||
}
|
||||
|
||||
// Editable descendant count only counts descendants that
|
||||
// are in the uncomposed document.
|
||||
ResetEditableDescendantCount();
|
||||
@@ -2015,7 +2014,7 @@ Element::GetSMILOverrideStyle()
|
||||
return slots->mSMILOverrideStyle;
|
||||
}
|
||||
|
||||
DeclarationBlock*
|
||||
css::Declaration*
|
||||
Element::GetSMILOverrideStyleDeclaration()
|
||||
{
|
||||
Element::nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
|
||||
@@ -2023,7 +2022,7 @@ Element::GetSMILOverrideStyleDeclaration()
|
||||
}
|
||||
|
||||
nsresult
|
||||
Element::SetSMILOverrideStyleDeclaration(DeclarationBlock* aDeclaration,
|
||||
Element::SetSMILOverrideStyleDeclaration(css::Declaration* aDeclaration,
|
||||
bool aNotify)
|
||||
{
|
||||
Element::nsExtendedDOMSlots* slots = ExtendedDOMSlots();
|
||||
@@ -2063,14 +2062,14 @@ Element::IsInteractiveHTMLContent(bool aIgnoreTabindex) const
|
||||
return false;
|
||||
}
|
||||
|
||||
DeclarationBlock*
|
||||
css::Declaration*
|
||||
Element::GetInlineStyleDeclaration()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Element::SetInlineStyleDeclaration(DeclarationBlock* aDeclaration,
|
||||
Element::SetInlineStyleDeclaration(css::Declaration* aDeclaration,
|
||||
const nsAString* aSerialized,
|
||||
bool aNotify)
|
||||
{
|
||||
@@ -3199,7 +3198,7 @@ Element::GetEventTargetParentForLinks(EventChainPreVisitor& aVisitor)
|
||||
// Set the status bar similarly for mouseover and focus
|
||||
case eMouseOver:
|
||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
MOZ_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case eFocus: {
|
||||
InternalFocusEvent* focusEvent = aVisitor.mEvent->AsFocusEvent();
|
||||
if (!focusEvent || !focusEvent->mIsRefocus) {
|
||||
@@ -3214,7 +3213,7 @@ Element::GetEventTargetParentForLinks(EventChainPreVisitor& aVisitor)
|
||||
}
|
||||
case eMouseOut:
|
||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
MOZ_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case eBlur:
|
||||
rv = LeaveLink(aVisitor.mPresContext);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
||||
+18
-31
@@ -57,7 +57,9 @@ class nsDocument;
|
||||
class nsDOMStringMap;
|
||||
|
||||
namespace mozilla {
|
||||
class DeclarationBlock;
|
||||
namespace css {
|
||||
class Declaration;
|
||||
} // namespace css
|
||||
namespace dom {
|
||||
struct AnimationFilter;
|
||||
struct ScrollIntoViewOptions;
|
||||
@@ -79,27 +81,27 @@ NS_GetContentList(nsINode* aRootNode,
|
||||
// Element-specific flags
|
||||
enum {
|
||||
// Set if the element has a pending style change.
|
||||
ELEMENT_HAS_PENDING_RESTYLE = NODE_SHARED_RESTYLE_BIT_1,
|
||||
ELEMENT_HAS_PENDING_RESTYLE = ELEMENT_FLAG_BIT(0),
|
||||
|
||||
// Set if the element is a potential restyle root (that is, has a style
|
||||
// change pending _and_ that style change will attempt to restyle
|
||||
// descendants).
|
||||
ELEMENT_IS_POTENTIAL_RESTYLE_ROOT = NODE_SHARED_RESTYLE_BIT_2,
|
||||
ELEMENT_IS_POTENTIAL_RESTYLE_ROOT = ELEMENT_FLAG_BIT(1),
|
||||
|
||||
// Set if the element has a pending animation-only style change as
|
||||
// part of an animation-only style update (where we update styles from
|
||||
// animation to the current refresh tick, but leave everything else as
|
||||
// it was).
|
||||
ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE = ELEMENT_FLAG_BIT(0),
|
||||
ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE = ELEMENT_FLAG_BIT(2),
|
||||
|
||||
// Set if the element is a potential animation-only restyle root (that
|
||||
// is, has an animation-only style change pending _and_ that style
|
||||
// change will attempt to restyle descendants).
|
||||
ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT = ELEMENT_FLAG_BIT(1),
|
||||
ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT = ELEMENT_FLAG_BIT(3),
|
||||
|
||||
// Set if this element has a pending restyle with an eRestyle_SomeDescendants
|
||||
// restyle hint.
|
||||
ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR = ELEMENT_FLAG_BIT(2),
|
||||
ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR = ELEMENT_FLAG_BIT(4),
|
||||
|
||||
// Just the HAS_PENDING bits, for convenience
|
||||
ELEMENT_PENDING_RESTYLE_FLAGS =
|
||||
@@ -117,10 +119,10 @@ enum {
|
||||
ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR,
|
||||
|
||||
// Set if this element is marked as 'scrollgrab' (see bug 912666)
|
||||
ELEMENT_HAS_SCROLLGRAB = ELEMENT_FLAG_BIT(3),
|
||||
ELEMENT_HAS_SCROLLGRAB = ELEMENT_FLAG_BIT(5),
|
||||
|
||||
// Remaining bits are for subclasses
|
||||
ELEMENT_TYPE_SPECIFIC_BITS_OFFSET = NODE_TYPE_SPECIFIC_BITS_OFFSET + 4
|
||||
ELEMENT_TYPE_SPECIFIC_BITS_OFFSET = NODE_TYPE_SPECIFIC_BITS_OFFSET + 6
|
||||
};
|
||||
|
||||
#undef ELEMENT_FLAG_BIT
|
||||
@@ -274,13 +276,13 @@ public:
|
||||
/**
|
||||
* Get the inline style declaration, if any, for this element.
|
||||
*/
|
||||
virtual DeclarationBlock* GetInlineStyleDeclaration();
|
||||
virtual css::Declaration* GetInlineStyleDeclaration();
|
||||
|
||||
/**
|
||||
* Set the inline style declaration for this element. This will send
|
||||
* an appropriate AttributeChanged notification if aNotify is true.
|
||||
*/
|
||||
virtual nsresult SetInlineStyleDeclaration(DeclarationBlock* aDeclaration,
|
||||
virtual nsresult SetInlineStyleDeclaration(css::Declaration* aDeclaration,
|
||||
const nsAString* aSerialized,
|
||||
bool aNotify);
|
||||
|
||||
@@ -288,7 +290,7 @@ public:
|
||||
* Get the SMIL override style declaration for this element. If the
|
||||
* rule hasn't been created, this method simply returns null.
|
||||
*/
|
||||
virtual DeclarationBlock* GetSMILOverrideStyleDeclaration();
|
||||
virtual css::Declaration* GetSMILOverrideStyleDeclaration();
|
||||
|
||||
/**
|
||||
* Set the SMIL override style declaration for this element. If
|
||||
@@ -296,7 +298,7 @@ public:
|
||||
* context, so that the style changes will be noticed.
|
||||
*/
|
||||
virtual nsresult SetSMILOverrideStyleDeclaration(
|
||||
DeclarationBlock* aDeclaration, bool aNotify);
|
||||
css::Declaration* aDeclaration, bool aNotify);
|
||||
|
||||
/**
|
||||
* Returns a new nsISMILAttr that allows the caller to animate the given
|
||||
@@ -814,24 +816,9 @@ public:
|
||||
already_AddRefed<nsIHTMLCollection>
|
||||
GetElementsByClassName(const nsAString& aClassNames);
|
||||
|
||||
CSSPseudoElementType GetPseudoElementType() const {
|
||||
if (!HasProperties()) {
|
||||
return CSSPseudoElementType::NotPseudo;
|
||||
}
|
||||
nsresult rv = NS_OK;
|
||||
auto raw = GetProperty(nsGkAtoms::pseudoProperty, &rv);
|
||||
if (rv == NS_PROPTABLE_PROP_NOT_THERE) {
|
||||
return CSSPseudoElementType::NotPseudo;
|
||||
}
|
||||
return CSSPseudoElementType(reinterpret_cast<uintptr_t>(raw));
|
||||
}
|
||||
CSSPseudoElementType GetPseudoElementType() const;
|
||||
|
||||
void SetPseudoElementType(CSSPseudoElementType aPseudo) {
|
||||
static_assert(sizeof(CSSPseudoElementType) <= sizeof(uintptr_t),
|
||||
"Need to be able to store this in a void*");
|
||||
MOZ_ASSERT(aPseudo != CSSPseudoElementType::NotPseudo);
|
||||
SetProperty(nsGkAtoms::pseudoProperty, reinterpret_cast<void*>(aPseudo));
|
||||
}
|
||||
void SetPseudoElementType(CSSPseudoElementType aPseudo);
|
||||
|
||||
private:
|
||||
/**
|
||||
@@ -1662,9 +1649,9 @@ inline const mozilla::dom::Element* nsINode::AsElement() const
|
||||
return static_cast<const mozilla::dom::Element*>(this);
|
||||
}
|
||||
|
||||
inline void nsINode::UnsetRestyleFlagsIfGecko()
|
||||
inline void nsINode::UnsetRestyleFlags()
|
||||
{
|
||||
if (IsElement() && !IsStyledByServo()) {
|
||||
if (IsElement()) {
|
||||
UnsetFlags(ELEMENT_ALL_RESTYLE_FLAGS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "mozilla/dom/FragmentOrElement.h"
|
||||
|
||||
#include "mozilla/AsyncEventDispatcher.h"
|
||||
#include "mozilla/DeclarationBlockInlines.h"
|
||||
#include "mozilla/EffectSet.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/EventListenerManager.h"
|
||||
@@ -97,6 +96,7 @@
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "ChildIterator.h"
|
||||
#include "mozilla/css/StyleRule.h" /* For nsCSSSelectorList */
|
||||
#include "mozilla/css/Declaration.h"
|
||||
#include "nsRuleProcessorData.h"
|
||||
#include "nsTextNode.h"
|
||||
#include "mozilla/dom/NodeListBinding.h"
|
||||
@@ -2527,51 +2527,3 @@ FragmentOrElement::SetIsElementInStyleScopeFlagOnShadowTree(bool aInStyleScope)
|
||||
shadowRoot->SetIsElementInStyleScopeFlagOnSubtree(aInStyleScope);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static void
|
||||
AssertDirtyDescendantsBitPropagated(nsINode* aNode)
|
||||
{
|
||||
MOZ_ASSERT(aNode->HasDirtyDescendantsForServo());
|
||||
nsINode* parent = aNode->GetFlattenedTreeParentNode();
|
||||
if (!parent->IsContent()) {
|
||||
MOZ_ASSERT(parent == aNode->OwnerDoc());
|
||||
MOZ_ASSERT(parent->HasDirtyDescendantsForServo());
|
||||
} else {
|
||||
AssertDirtyDescendantsBitPropagated(parent);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void AssertDirtyDescendantsBitPropagated(nsINode* aNode) {}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsIContent::MarkAncestorsAsHavingDirtyDescendantsForServo()
|
||||
{
|
||||
MOZ_ASSERT(IsInComposedDoc());
|
||||
|
||||
// Get the parent in the flattened tree.
|
||||
nsINode* parent = GetFlattenedTreeParentNode();
|
||||
|
||||
// Loop until we hit a base case.
|
||||
while (true) {
|
||||
|
||||
// Base case: the document.
|
||||
if (!parent->IsContent()) {
|
||||
MOZ_ASSERT(parent == OwnerDoc());
|
||||
parent->SetHasDirtyDescendantsForServo();
|
||||
return;
|
||||
}
|
||||
|
||||
// Base case: the parent is already marked, and therefore
|
||||
// so are all its ancestors.
|
||||
if (parent->HasDirtyDescendantsForServo()) {
|
||||
AssertDirtyDescendantsBitPropagated(parent);
|
||||
return;
|
||||
}
|
||||
|
||||
// Mark the parent and iterate.
|
||||
parent->SetHasDirtyDescendantsForServo();
|
||||
parent = parent->GetFlattenedTreeParentNode();
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,9 @@ class nsDOMStringMap;
|
||||
class nsIURI;
|
||||
|
||||
namespace mozilla {
|
||||
class DeclarationBlock;
|
||||
namespace css {
|
||||
class Declaration;
|
||||
}
|
||||
namespace dom {
|
||||
struct CustomElementData;
|
||||
class DOMIntersectionObserver;
|
||||
@@ -147,8 +149,7 @@ public:
|
||||
virtual bool TextIsOnlyWhitespace() override;
|
||||
virtual bool HasTextForTranslation() override;
|
||||
virtual void AppendTextTo(nsAString& aResult) override;
|
||||
MOZ_MUST_USE
|
||||
virtual bool AppendTextTo(nsAString& aResult, const mozilla::fallible_t&) override;
|
||||
[[nodiscard]] virtual bool AppendTextTo(nsAString& aResult, const mozilla::fallible_t&) override;
|
||||
virtual nsIContent *GetBindingParent() const override;
|
||||
virtual nsXBLBinding *GetXBLBinding() const override;
|
||||
virtual void SetXBLBinding(nsXBLBinding* aBinding,
|
||||
@@ -265,7 +266,7 @@ public:
|
||||
/**
|
||||
* Holds any SMIL override style declaration for this element.
|
||||
*/
|
||||
RefPtr<mozilla::DeclarationBlock> mSMILOverrideStyleDeclaration;
|
||||
RefPtr<mozilla::css::Declaration> mSMILOverrideStyleDeclaration;
|
||||
|
||||
/**
|
||||
* The nearest enclosing content node with a binding that created us.
|
||||
|
||||
+306
-5
@@ -15,6 +15,7 @@
|
||||
#include "nsCPrefetchService.h"
|
||||
#include "nsStyleLinkElement.h"
|
||||
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsHTMLDNSPrefetch.h"
|
||||
@@ -23,9 +24,57 @@
|
||||
|
||||
#include "mozilla/Services.h"
|
||||
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "nsCSSParser.h"
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsIMediaList.h"
|
||||
#include "DecoderTraits.h"
|
||||
#include "imgLoader.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
enum Destination : uint8_t
|
||||
{
|
||||
DESTINATION_INVALID,
|
||||
DESTINATION_AUDIO,
|
||||
DESTINATION_AUDIOWORKLET,
|
||||
DESTINATION_DOCUMENT,
|
||||
DESTINATION_EMBED,
|
||||
DESTINATION_FONT,
|
||||
DESTINATION_FRAME,
|
||||
DESTINATION_IFRAME,
|
||||
DESTINATION_IMAGE,
|
||||
DESTINATION_JSON,
|
||||
DESTINATION_MANIFEST,
|
||||
DESTINATION_OBJECT,
|
||||
DESTINATION_REPORT,
|
||||
DESTINATION_SCRIPT,
|
||||
DESTINATION_SERVICEWORKER,
|
||||
DESTINATION_SHAREDWORKER,
|
||||
DESTINATION_STYLE,
|
||||
DESTINATION_TRACK,
|
||||
DESTINATION_VIDEO,
|
||||
DESTINATION_WEBIDENTITY,
|
||||
DESTINATION_WORKER,
|
||||
DESTINATION_XSLT,
|
||||
DESTINATION_FETCH
|
||||
};
|
||||
|
||||
static const nsAttrValue::EnumTable kDestinationAttributeTable[] = {
|
||||
{ "", DESTINATION_INVALID },
|
||||
{ "audio", DESTINATION_AUDIO },
|
||||
{ "font", DESTINATION_FONT },
|
||||
{ "image", DESTINATION_IMAGE },
|
||||
{ "script", DESTINATION_SCRIPT },
|
||||
{ "style", DESTINATION_STYLE },
|
||||
{ "track", DESTINATION_TRACK },
|
||||
{ "video", DESTINATION_VIDEO },
|
||||
{ "fetch", DESTINATION_FETCH },
|
||||
{ "json", DESTINATION_JSON },
|
||||
{ nullptr, 0 }
|
||||
};
|
||||
|
||||
Link::Link(Element *aElement)
|
||||
: mElement(aElement)
|
||||
, mHistory(services::GetHistoryService())
|
||||
@@ -75,7 +124,7 @@ Link::CancelDNSPrefetch(nsWrapperCache::FlagsType aDeferredFlag,
|
||||
}
|
||||
|
||||
void
|
||||
Link::TryDNSPrefetchPreconnectOrPrefetch()
|
||||
Link::TrySpeculativeLoadFeature()
|
||||
{
|
||||
MOZ_ASSERT(mElement->IsInComposedDoc());
|
||||
if (!ElementHasHref()) {
|
||||
@@ -95,15 +144,28 @@ Link::TryDNSPrefetchPreconnectOrPrefetch()
|
||||
mElement->NodePrincipal());
|
||||
|
||||
if ((linkTypes & nsStyleLinkElement::ePREFETCH) ||
|
||||
(linkTypes & nsStyleLinkElement::eNEXT)){
|
||||
(linkTypes & nsStyleLinkElement::eNEXT) ||
|
||||
(linkTypes & nsStyleLinkElement::ePRELOAD)) {
|
||||
nsCOMPtr<nsIPrefetchService> prefetchService(do_GetService(NS_PREFETCHSERVICE_CONTRACTID));
|
||||
if (prefetchService) {
|
||||
nsCOMPtr<nsIURI> uri(GetURI());
|
||||
if (uri) {
|
||||
nsCOMPtr<nsIDOMNode> domNode = GetAsDOMNode(mElement);
|
||||
prefetchService->PrefetchURI(uri,
|
||||
mElement->OwnerDoc()->GetDocumentURI(),
|
||||
domNode, linkTypes & nsStyleLinkElement::ePREFETCH);
|
||||
if (linkTypes & nsStyleLinkElement::ePRELOAD) {
|
||||
nsContentPolicyType policyType;
|
||||
bool isPreloadValid = CheckPreloadAttrs(policyType, mElement);
|
||||
if (!isPreloadValid) {
|
||||
// XXX: WPTs expect that we timeout on invalid preloads including
|
||||
// those with valid destinations instead of firing an error event.
|
||||
return;
|
||||
}
|
||||
nsContentUtils::DispatchEventForPreloadURI(domNode, policyType);
|
||||
} else {
|
||||
prefetchService->PrefetchURI(uri,
|
||||
mElement->OwnerDoc()->GetDocumentURI(),
|
||||
domNode,
|
||||
linkTypes & nsStyleLinkElement::ePREFETCH);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -125,6 +187,95 @@ Link::TryDNSPrefetchPreconnectOrPrefetch()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Link::UpdatePreload(nsIAtom* aName,
|
||||
const nsAttrValue* aValue,
|
||||
const nsAttrValue* aOldValue)
|
||||
{
|
||||
MOZ_ASSERT(mElement->IsInComposedDoc());
|
||||
|
||||
if (!ElementHasHref()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsAutoString rel;
|
||||
if (!mElement->GetAttr(kNameSpaceID_None, nsGkAtoms::rel, rel)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!nsContentUtils::PrefetchEnabled(mElement->OwnerDoc()->GetDocShell()) ||
|
||||
!nsContentUtils::IsPreloadEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t linkTypes = nsStyleLinkElement::ParseLinkTypes(rel,
|
||||
mElement->NodePrincipal());
|
||||
|
||||
if (!(linkTypes & nsStyleLinkElement::ePRELOAD)) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> uri(GetURI());
|
||||
if (!uri) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMNode> domNode = GetAsDOMNode(mElement);
|
||||
|
||||
nsContentPolicyType policyType;
|
||||
bool isPreloadValid = CheckPreloadAttrs(policyType, mElement);
|
||||
if (!isPreloadValid) {
|
||||
// XXX: WPTs expect that we timeout on invalid preloads including
|
||||
// those with valid destinations instead of firing an error event.
|
||||
return;
|
||||
}
|
||||
|
||||
if (aName == nsGkAtoms::crossorigin) {
|
||||
CORSMode corsMode = Element::AttrValueToCORSMode(aValue);
|
||||
CORSMode oldCorsMode = Element::AttrValueToCORSMode(aOldValue);
|
||||
if (corsMode != oldCorsMode) {
|
||||
nsContentUtils::DispatchEventForPreloadURI(domNode, policyType);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
nsAutoString oldValue;
|
||||
if (aOldValue) {
|
||||
aOldValue->ToString(oldValue);
|
||||
} else {
|
||||
oldValue = EmptyString();
|
||||
}
|
||||
nsContentPolicyType oldPolicyType = nsIContentPolicy::TYPE_INVALID;
|
||||
|
||||
if (aName == nsGkAtoms::as) {
|
||||
if (aOldValue) {
|
||||
CheckPreloadAttrs(oldPolicyType, aName, oldValue, mElement);
|
||||
}
|
||||
} else if (aName == nsGkAtoms::type) {
|
||||
if (CheckPreloadAttrs(oldPolicyType, aName, oldValue, mElement)) {
|
||||
oldPolicyType = policyType;
|
||||
} else {
|
||||
oldPolicyType = nsIContentPolicy::TYPE_INVALID;
|
||||
}
|
||||
} else if (aName == nsGkAtoms::media) {
|
||||
if (CheckPreloadAttrs(oldPolicyType, aName, oldValue, mElement)) {
|
||||
oldPolicyType = policyType;
|
||||
} else {
|
||||
oldPolicyType = nsIContentPolicy::TYPE_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
// Return early for invalid preloads since we shouldn't trigger a new fetch.
|
||||
if (policyType == nsIContentPolicy::TYPE_INVALID) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fire the associated event if the policy type has changed.
|
||||
if (policyType != oldPolicyType) {
|
||||
nsContentUtils::DispatchEventForPreloadURI(domNode, policyType);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Link::CancelPrefetch()
|
||||
{
|
||||
@@ -635,6 +786,156 @@ Link::SetHrefAttribute(nsIURI *aURI)
|
||||
NS_ConvertUTF8toUTF16(href), true);
|
||||
}
|
||||
|
||||
bool
|
||||
Link::CheckPreloadAttrs(nsContentPolicyType& aPolicyType,
|
||||
const nsAString& aDestination,
|
||||
const nsAString& aType,
|
||||
const nsAString& aMedia,
|
||||
nsIDocument* aDocument)
|
||||
{
|
||||
nsString mimeType;
|
||||
nsString params;
|
||||
nsContentUtils::SplitMimeType(aType, mimeType, params);
|
||||
ToLowerCase(mimeType);
|
||||
|
||||
nsAttrValue destinationAttr;
|
||||
ParseDestinationValue(aDestination, destinationAttr);
|
||||
|
||||
aPolicyType = DestinationToContentPolicy(destinationAttr);
|
||||
if (aPolicyType == nsIContentPolicy::TYPE_INVALID) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if media attribute is valid.
|
||||
if (!aMedia.IsEmpty()) {
|
||||
nsCSSParser cssParser;
|
||||
RefPtr<nsMediaList> mediaList = new nsMediaList();
|
||||
cssParser.ParseMediaList(aMedia, nullptr, 0, mediaList, false);
|
||||
|
||||
nsIPresShell* shell = aDocument->GetShell();
|
||||
if (!shell) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsPresContext* presContext = shell->GetPresContext();
|
||||
if (!presContext) {
|
||||
return false;
|
||||
}
|
||||
if (!mediaList->Matches(presContext, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (mimeType.IsEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (aPolicyType) {
|
||||
case nsIContentPolicy::TYPE_OTHER:
|
||||
if (destinationAttr.GetEnumValue() == DESTINATION_JSON) {
|
||||
return nsContentUtils::IsJSONMIMEType(mimeType);
|
||||
}
|
||||
return true;
|
||||
case nsIContentPolicy::TYPE_MEDIA:
|
||||
if (destinationAttr.GetEnumValue() == DESTINATION_TRACK) {
|
||||
return mimeType.EqualsASCII(TEXT_VTT);
|
||||
}
|
||||
return DecoderTraits::IsSupportedInVideoDocument(NS_ConvertUTF16toUTF8(mimeType));
|
||||
case nsIContentPolicy::TYPE_FONT:
|
||||
return nsContentUtils::IsFontMIMEType(mimeType);
|
||||
case nsIContentPolicy::TYPE_IMAGE:
|
||||
return imgLoader::SupportImageWithMimeType(NS_ConvertUTF16toUTF8(mimeType).get(),
|
||||
AcceptedMimeTypes::IMAGES_AND_DOCUMENTS);
|
||||
case nsIContentPolicy::TYPE_SCRIPT:
|
||||
return nsContentUtils::IsJavascriptMIMEType(mimeType);
|
||||
case nsIContentPolicy::TYPE_STYLESHEET:
|
||||
return mimeType.EqualsASCII(TEXT_CSS);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Link::CheckPreloadAttrs(nsContentPolicyType& aPolicyType,
|
||||
nsIAtom* aName,
|
||||
const nsAString& aValue,
|
||||
Element* aElement)
|
||||
{
|
||||
nsAutoString destination;
|
||||
if (aName == nsGkAtoms::as) {
|
||||
destination = aValue;
|
||||
} else {
|
||||
aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::as, destination);
|
||||
}
|
||||
|
||||
nsAutoString type;
|
||||
if (aName == nsGkAtoms::type) {
|
||||
type = aValue;
|
||||
} else {
|
||||
aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::type, type);
|
||||
}
|
||||
|
||||
nsAutoString media;
|
||||
if (aName == nsGkAtoms::media) {
|
||||
media = aValue;
|
||||
} else {
|
||||
aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::media, media);
|
||||
}
|
||||
|
||||
return CheckPreloadAttrs(aPolicyType,
|
||||
destination,
|
||||
type,
|
||||
media,
|
||||
aElement->OwnerDoc());
|
||||
}
|
||||
|
||||
bool
|
||||
Link::CheckPreloadAttrs(nsContentPolicyType& aPolicyType,
|
||||
Element* aElement)
|
||||
{
|
||||
nsAutoString unused;
|
||||
return CheckPreloadAttrs(aPolicyType,
|
||||
nullptr,
|
||||
unused,
|
||||
aElement);
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
Link::ParseDestinationValue(const nsAString& aValue,
|
||||
nsAttrValue& aResult)
|
||||
{
|
||||
// Invalid values are treated as an empty string.
|
||||
aResult.ParseEnumValue(aValue,
|
||||
kDestinationAttributeTable,
|
||||
false,
|
||||
&kDestinationAttributeTable[0]);
|
||||
}
|
||||
|
||||
/* static */ nsContentPolicyType
|
||||
Link::DestinationToContentPolicy(const nsAttrValue& aValue)
|
||||
{
|
||||
switch (aValue.GetEnumValue()) {
|
||||
case DESTINATION_AUDIO:
|
||||
case DESTINATION_TRACK:
|
||||
case DESTINATION_VIDEO:
|
||||
return nsIContentPolicy::TYPE_MEDIA;
|
||||
case DESTINATION_FONT:
|
||||
return nsIContentPolicy::TYPE_FONT;
|
||||
case DESTINATION_IMAGE:
|
||||
return nsIContentPolicy::TYPE_IMAGE;
|
||||
case DESTINATION_SCRIPT:
|
||||
return nsIContentPolicy::TYPE_SCRIPT;
|
||||
case DESTINATION_STYLE:
|
||||
return nsIContentPolicy::TYPE_STYLESHEET;
|
||||
case DESTINATION_JSON:
|
||||
case DESTINATION_FETCH:
|
||||
return nsIContentPolicy::TYPE_OTHER;
|
||||
case DESTINATION_INVALID:
|
||||
default:
|
||||
return nsIContentPolicy::TYPE_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
size_t
|
||||
Link::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
|
||||
Loaded 100 of 3376 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user