Compare commits
399
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
451509e2c0 | ||
|
|
7895b8acd9 | ||
|
|
ccff4610c5 | ||
|
|
15a1f78f8b | ||
|
|
8b44473fe6 | ||
|
|
6e0aee959e | ||
|
|
ba5930cc8e | ||
|
|
6376255c0c | ||
|
|
320682148b | ||
|
|
1ed84ac1f8 | ||
|
|
9c9d04e3e0 | ||
|
|
19504d5263 | ||
|
|
533b346f4e | ||
|
|
6afd96c460 | ||
|
|
9858dc03cb | ||
|
|
d21b46fc9c | ||
|
|
55fa46d059 | ||
|
|
b089b365d6 | ||
|
|
0c150945dc | ||
|
|
0fb23389f5 | ||
|
|
7ba07f4a17 | ||
|
|
554183b5dd | ||
|
|
98fe8b0ccb | ||
|
|
519030e688 | ||
|
|
b9531d8e11 | ||
|
|
7605f4b0f8 | ||
|
|
ab0e18135f | ||
|
|
e883ac54e9 | ||
|
|
9cb65e8a77 | ||
|
|
3a3152d54b | ||
|
|
f174801b64 | ||
|
|
3caceeb539 | ||
|
|
216189e6f7 | ||
|
|
bbae11cdd9 | ||
|
|
917447df6e | ||
|
|
244c8ef1f7 | ||
|
|
e1b6493747 | ||
|
|
4e225fc7d1 | ||
|
|
683b1bedea | ||
|
|
11519ee6d2 | ||
|
|
8a343284d9 | ||
|
|
5a34fb5e1d | ||
|
|
16c8dff724 | ||
|
|
3595b9eecf | ||
|
|
594cbca6d1 | ||
|
|
a4ba260904 | ||
|
|
4a8c186eea | ||
|
|
8ff6e8c8a2 | ||
|
|
3652cd0f99 | ||
|
|
b738ccc61b | ||
|
|
1c3a9a40e5 | ||
|
|
0a33733505 | ||
|
|
691878e20f | ||
|
|
bf1fa93b91 | ||
|
|
0ac7481d2e | ||
|
|
168bb31e4f | ||
|
|
ca04b37910 | ||
|
|
f3b26f64fc | ||
|
|
99d23484bb | ||
|
|
376bc050a6 | ||
|
|
9258382b0d | ||
|
|
b6a703907e | ||
|
|
da42871b0e | ||
|
|
c55433ee03 | ||
|
|
d0a2389b43 | ||
|
|
796a14e116 | ||
|
|
ba6e4753b7 | ||
|
|
6d3d69f644 | ||
|
|
fce3132fe8 | ||
|
|
a7da3cf52b | ||
|
|
f5316668a3 | ||
|
|
dc687dbc0b | ||
|
|
216aa2cada | ||
|
|
9d96ad90dd | ||
|
|
b064c95231 | ||
|
|
11eb1f57f4 | ||
|
|
052cb18fff | ||
|
|
d306fe61c5 | ||
|
|
7859a0d693 | ||
|
|
c5d9e1f973 | ||
|
|
2e12bda342 | ||
|
|
9755cd617d | ||
|
|
abaf4d9fb4 | ||
|
|
ae6f407177 | ||
|
|
2a44476795 | ||
|
|
755cf4c7d0 | ||
|
|
47f26a67f4 | ||
|
|
e8aa76713a | ||
|
|
e6ffc4bdb7 | ||
|
|
90bbe7536d | ||
|
|
140750e4e8 | ||
|
|
f2e089d51b | ||
|
|
e1d0ac30ac | ||
|
|
9e8adc25a4 | ||
|
|
7f66e8946a | ||
|
|
c75b8ec714 | ||
|
|
4250d93166 | ||
|
|
37250226d5 | ||
|
|
802a4cfefe | ||
|
|
5641a6d574 | ||
|
|
88d2480356 | ||
|
|
fcb4b997d0 | ||
|
|
79964767f5 | ||
|
|
a4a8d082a3 | ||
|
|
adce88de95 | ||
|
|
974d6ca889 | ||
|
|
e08a4ad1c8 | ||
|
|
39dac57259 | ||
|
|
c2d9ab62f3 | ||
|
|
b9e692af05 | ||
|
|
871e57fdd6 | ||
|
|
03530de64f | ||
|
|
4730da5b27 | ||
|
|
3cb245b749 | ||
|
|
9f5529d1e7 | ||
|
|
26c888208a | ||
|
|
9a52b3b852 | ||
|
|
96afb5250d | ||
|
|
b93afb1ba7 | ||
|
|
277f2116b6 | ||
|
|
d270404436 | ||
|
|
3bec218684 | ||
|
|
6daff43b61 | ||
|
|
eedf9f5ebf | ||
|
|
049dae86d2 | ||
|
|
65ba3cac58 | ||
|
|
1b8788aecb | ||
|
|
747632bd64 | ||
|
|
02327fa745 | ||
|
|
b470422d5a | ||
|
|
449d530a30 | ||
|
|
8bd941d4e3 | ||
|
|
7172fc72a3 | ||
|
|
b977981df6 | ||
|
|
9dc65422ba | ||
|
|
45e8e98031 | ||
|
|
965232ab2f | ||
|
|
980ca14602 | ||
|
|
02519e8575 | ||
|
|
e003547dc5 | ||
|
|
56f8375338 | ||
|
|
2407845ec1 | ||
|
|
3f09b298b0 | ||
|
|
c27830f35c | ||
|
|
99bad1726e | ||
|
|
d86349716a | ||
|
|
64a7c9e2d2 | ||
|
|
514ff21cba | ||
|
|
edb5796d58 | ||
|
|
c23e3b25f8 | ||
|
|
e360caa1a2 | ||
|
|
9eeaeff77b | ||
|
|
a435374873 | ||
|
|
04cfc091da | ||
|
|
b23e7b61c6 | ||
|
|
69b4e77751 | ||
|
|
5657b5c53b | ||
|
|
1037746d00 | ||
|
|
a060401264 | ||
|
|
4e26fc1844 | ||
|
|
2645f9b944 | ||
|
|
88ce149033 | ||
|
|
09655ad6d8 | ||
|
|
4fd0b98c2c | ||
|
|
894b33e53a | ||
|
|
236d425993 | ||
|
|
899e14e945 | ||
|
|
03fda9f0f3 | ||
|
|
3aae828871 | ||
|
|
e7514afc7c | ||
|
|
4adf0d09f7 | ||
|
|
22d0b88e37 | ||
|
|
f7388678bd | ||
|
|
b45f5c435e | ||
|
|
3c73c0805c | ||
|
|
db93b005f5 | ||
|
|
d2aaa74f31 | ||
|
|
702cf42544 | ||
|
|
79a9dc2479 | ||
|
|
ddcc3deddd | ||
|
|
f3b148844a | ||
|
|
51d5d162b7 | ||
|
|
94494805da | ||
|
|
5c7109182c | ||
|
|
68e873ada7 | ||
|
|
a5b05528fe | ||
|
|
ce88d82f4a | ||
|
|
61d3aa9be2 | ||
|
|
a078d9f976 | ||
|
|
3ed2b7a7cc | ||
|
|
9816a810e6 | ||
|
|
9a8068ea3f | ||
|
|
dcd9bbb717 | ||
|
|
ecc0a40688 | ||
|
|
8f40737fc7 | ||
|
|
e7841ab5d7 | ||
|
|
dba09fa5c4 | ||
|
|
afe2b7fa5a | ||
|
|
acaec3f389 | ||
|
|
d2083edba2 | ||
|
|
1ebcc1d7e5 | ||
|
|
cbb61ab832 | ||
|
|
cf288a1847 | ||
|
|
0d1eea2ebf | ||
|
|
af69cb07db | ||
|
|
dc4695406f | ||
|
|
c22a493144 | ||
|
|
d20ca24a07 | ||
|
|
b2ca17a298 | ||
|
|
eb70e6e3d0 | ||
|
|
32ead79529 | ||
|
|
3e59235162 | ||
|
|
7494866cb5 | ||
|
|
19bf63b0ee | ||
|
|
8b539ec9e7 | ||
|
|
ba0011606d | ||
|
|
ec2daa8dc9 | ||
|
|
44c169c9be | ||
|
|
57383be95d | ||
|
|
6ef03f136b | ||
|
|
d6bcaa6491 | ||
|
|
92edec6f58 | ||
|
|
2dea4edfd7 | ||
|
|
54cb1b965e | ||
|
|
a6d1dd183d | ||
|
|
da15aa0fdf | ||
|
|
867737dd4b | ||
|
|
36fc5f674e | ||
|
|
7b30664f59 | ||
|
|
ef71f96a8d | ||
|
|
2b99226680 | ||
|
|
2794f0c48c | ||
|
|
2f23073a3a | ||
|
|
496fbaf738 | ||
|
|
85621ee9b3 | ||
|
|
ee6595e6de | ||
|
|
201be4d8fc | ||
|
|
9e586a1d0e | ||
|
|
009c9dd2f8 | ||
|
|
6407f1abd4 | ||
|
|
28f0155307 | ||
|
|
11ede87242 | ||
|
|
3630fec559 | ||
|
|
d062e7311c | ||
|
|
0313ac74fd | ||
|
|
9612c64265 | ||
|
|
c5d570792d | ||
|
|
10c4e73e56 | ||
|
|
c9fd86cb78 | ||
|
|
550d634ff5 | ||
|
|
bbee80fa1c | ||
|
|
8ffe533b3d | ||
|
|
9670bdb685 | ||
|
|
8fa80e2c8d | ||
|
|
a377d1ecd4 | ||
|
|
1ebbb0af03 | ||
|
|
29b13d3523 | ||
|
|
76476ed75b | ||
|
|
84fc500ff2 | ||
|
|
2560dd2514 | ||
|
|
0e2b0db4d7 | ||
|
|
c4f65de9b2 | ||
|
|
e3148b0a25 | ||
|
|
fe6730c219 | ||
|
|
2e44ddb15e | ||
|
|
da74d1f3f3 | ||
|
|
91be118376 | ||
|
|
2258e09d59 | ||
|
|
30ec922d7e | ||
|
|
1000488a5b | ||
|
|
ffe75592e3 | ||
|
|
0084e71953 | ||
|
|
dbeceecde2 | ||
|
|
9fc28c55c3 | ||
|
|
113a825c1f | ||
|
|
419abfb09f | ||
|
|
4e58dab0a1 | ||
|
|
9e42d9ea2f | ||
|
|
377f54f3fe | ||
|
|
62f39d829d | ||
|
|
28971524e4 | ||
|
|
be37269123 | ||
|
|
8acff5cdbe | ||
|
|
11a4ab0982 | ||
|
|
8c41fcd240 | ||
|
|
27f4e60be8 | ||
|
|
aae1baabe9 | ||
|
|
f620afc446 | ||
|
|
456f4a5891 | ||
|
|
84d99e2996 | ||
|
|
e29301f5d0 | ||
|
|
369ad75fc8 | ||
|
|
37e3135bc5 | ||
|
|
259bd2e977 | ||
|
|
0ebdc99757 | ||
|
|
68d3bc54fb | ||
|
|
2109f36dd4 | ||
|
|
58f10adc97 | ||
|
|
05c68a17a0 | ||
|
|
f78958a020 | ||
|
|
bcd6c96aec | ||
|
|
73289f5389 | ||
|
|
4acc0d58cb | ||
|
|
a1c9dd468d | ||
|
|
0a5acb852a | ||
|
|
c8bbebe59d | ||
|
|
fddc35e438 | ||
|
|
7e4efa4e1f | ||
|
|
84b5515a8d | ||
|
|
6b7fa183dd | ||
|
|
a43d59bcbf | ||
|
|
ac6896b599 | ||
|
|
171053d0b2 | ||
|
|
efd88ee999 | ||
|
|
9a74d53315 | ||
|
|
e2a478072a | ||
|
|
cb06cac81d | ||
|
|
c3d92cd338 | ||
|
|
8ae2267eac | ||
|
|
563dc95cdb | ||
|
|
7e59ac9036 | ||
|
|
f1e40aaa5b | ||
|
|
068372c618 | ||
|
|
a1cce3b2b0 | ||
|
|
7d53919c26 | ||
|
|
8bb5db350d | ||
|
|
a64ac6d702 | ||
|
|
6d761aa68f | ||
|
|
90c5288fef | ||
|
|
3624078103 | ||
|
|
5a6059feef | ||
|
|
8e33fa9c4b | ||
|
|
a9290ef91e | ||
|
|
fabe21d593 | ||
|
|
c6dbf55449 | ||
|
|
722161775b | ||
|
|
71d8ada4a9 | ||
|
|
e0baeba546 | ||
|
|
b1abb9aebe | ||
|
|
22198ec194 | ||
|
|
c137a4045c | ||
|
|
63219a15b1 | ||
|
|
b87a4551b5 | ||
|
|
82dffb32bd | ||
|
|
a2073c54b4 | ||
|
|
67d336a6f2 | ||
|
|
e4c4c20e7e | ||
|
|
ed60101550 | ||
|
|
927c386dd8 | ||
|
|
635baac21a | ||
|
|
c050c611df | ||
|
|
9dbbc6c08f | ||
|
|
72779c9dde | ||
|
|
e93b373374 | ||
|
|
fa816e1ec6 | ||
|
|
7007ec9e42 | ||
|
|
058105eec0 | ||
|
|
3da18fda02 | ||
|
|
ee1d953749 | ||
|
|
984790c6fb | ||
|
|
6f27b4eb34 | ||
|
|
2ac58ecef8 | ||
|
|
03fb2e2294 | ||
|
|
6168dbe21f | ||
|
|
09314667a6 | ||
|
|
82804d2002 | ||
|
|
8d65feff0a | ||
|
|
da7423057d | ||
|
|
cbbae72431 | ||
|
|
1392abe1de | ||
|
|
abf6fd8f2a | ||
|
|
0257b657d2 | ||
|
|
4a038e2b4b | ||
|
|
6d342dbab9 | ||
|
|
217dca872b | ||
|
|
3733205f09 | ||
|
|
aa2ac8dded | ||
|
|
60dc9eaa95 | ||
|
|
06dbb7b7dd | ||
|
|
f64e760ab0 | ||
|
|
095a02f259 | ||
|
|
9365776219 | ||
|
|
0186023f4a | ||
|
|
51b1cd97aa | ||
|
|
8198126c39 | ||
|
|
d429ac8a60 | ||
|
|
29bf28ca34 | ||
|
|
d79cc5fb49 | ||
|
|
8ae047bbbf | ||
|
|
1672355a77 | ||
|
|
52bda2a828 | ||
|
|
25e85f99ce | ||
|
|
b91b0c37eb | ||
|
|
a4011e7246 | ||
|
|
ef2cd8749f | ||
|
|
2e3b937f4e | ||
|
|
c032651778 | ||
|
|
c66b70c4da | ||
|
|
b4d686d62d |
No files matched your search
+5
-3
@@ -49,9 +49,11 @@ js/src/autom4te.cache
|
||||
js/src/tests/results-*.html
|
||||
js/src/tests/results-*.txt
|
||||
|
||||
# Java HTML5 parser classes
|
||||
parser/html/java/htmlparser/
|
||||
parser/html/java/javaparser/
|
||||
# Java HTML5 parser codegen artifacts
|
||||
parser/html/java/htmlparser/bin/
|
||||
parser/html/java/javaparser/bin/
|
||||
parser/html/java/*.jar
|
||||
parser/html/javasrc/
|
||||
|
||||
# Ignore the files and directory that Eclipse IDE creates
|
||||
.project
|
||||
|
||||
@@ -47,6 +47,12 @@ ifndef MOZ_PROFILE_USE
|
||||
# We need to explicitly put BUILD_BACKEND_FILES here otherwise the rule in
|
||||
# rules.mk doesn't run early enough.
|
||||
$(TIERS) binaries:: CLOBBER $(configure_dir)/configure config.status $(BUILD_BACKEND_FILES)
|
||||
|
||||
# While our mozbuild backend has some kind of crazy install_manfests junk to
|
||||
# try and make this not have to happen, we actually want dist/bin to be
|
||||
# completely removed regardless.
|
||||
default alldep all::
|
||||
@$(RM) -r $(DIST)/bin
|
||||
ifndef JS_STANDALONE
|
||||
ifdef COMPILE_ENVIRONMENT
|
||||
$(TIERS) binaries:: $(topsrcdir)/js/src/configure js/src/config.status
|
||||
|
||||
@@ -34,3 +34,6 @@ and other community members.
|
||||
If you fork this repository to perform your own work on it, please consider offering
|
||||
improvement patches upstream to its origin to mutually improve the platform and build
|
||||
a future for XUL.
|
||||
|
||||
## Looking for Pale Moon and Basilisk?
|
||||
As of [`Issue #969`](https://github.com/MoonchildProductions/UXP/issues/969), release versions `28.9.0` and `2020.03.04` respectively, they have been split off into their own dedicated repositories located at [`MoonchildProductions/Pale-Moon`](https://github.com/MoonchildProductions/Pale-Moon) and [`MoonchildProductions/Basilisk`](https://github.com/MoonchildProductions/Basilisk).
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# Security Policy
|
||||
|
||||
## What is or is not a vulnerability?
|
||||
|
||||
In general, vulnerabilities are those bugs that can actually be exploited to perform malicious tasks.
|
||||
Most _crashes_ are not security vulnerabilities. Although important to fix, they don't inherently cause a problem for the
|
||||
browser's security.
|
||||
|
||||
What should be considered vulnerabilities or security hazards by default:
|
||||
- Use-after-free crashes, since those can potentially be used for remote code execution;
|
||||
- Spoofing issues in the UI;
|
||||
- File security issues, like out-of-bounds access to arbitrary files or locations;
|
||||
- Type confusion issues;
|
||||
- Bypass of security measures like CSP or the various mechanisms around HTTPS.
|
||||
|
||||
Generally not security vulnerabilities:
|
||||
- Null dereferencing crashes;
|
||||
- Malware extensions (but please do report those on the forum in the extensions board!);
|
||||
- Denial-of-service (AKA "evil trap sites")
|
||||
- Browser hangs
|
||||
- Issues with non-standard manual configuration (either at build time or by manipulating about:config directly)
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you find an issue in UXP or the applications it builds on that could impact the security or safety of users please **do not**
|
||||
make an issue on GitHub about it. GitHub does not support restricted viewability for security sensitive bugs.
|
||||
|
||||
If you want to report a security-sensitive issue then please go to the [forum](https://forum.palemoon.org) and report the issue
|
||||
via a **private message** to **Moonchild** (the founder and prime responsible for security issues).
|
||||
The forum's private message system is fully secure since your visits are encrypted and private messages are not available to anyone
|
||||
except the recipient (not even moderators!).
|
||||
|
||||
You will be informed via private message if the vulnerability report is accepted or declined, with reasoning.
|
||||
Security updates occur regularly and are given priority over most other development tasks. In general, they can be solved
|
||||
relatively quickly and will be included in the next point release (third digit if not rolled into a more major one).
|
||||
|
||||
@@ -175,23 +175,17 @@ HTMLTableCellAccessible::Table() const
|
||||
uint32_t
|
||||
HTMLTableCellAccessible::ColIdx() const
|
||||
{
|
||||
nsITableCellLayout* cellLayout = GetCellLayout();
|
||||
NS_ENSURE_TRUE(cellLayout, 0);
|
||||
|
||||
int32_t colIdx = 0;
|
||||
cellLayout->GetColIndex(colIdx);
|
||||
return colIdx > 0 ? static_cast<uint32_t>(colIdx) : 0;
|
||||
nsTableCellFrame* cellFrame = GetCellFrame();
|
||||
NS_ENSURE_TRUE(cellFrame, 0);
|
||||
return cellFrame->ColIndex();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
HTMLTableCellAccessible::RowIdx() const
|
||||
{
|
||||
nsITableCellLayout* cellLayout = GetCellLayout();
|
||||
NS_ENSURE_TRUE(cellLayout, 0);
|
||||
|
||||
int32_t rowIdx = 0;
|
||||
cellLayout->GetRowIndex(rowIdx);
|
||||
return rowIdx > 0 ? static_cast<uint32_t>(rowIdx) : 0;
|
||||
nsTableCellFrame* cellFrame = GetCellFrame();
|
||||
NS_ENSURE_TRUE(cellFrame, 0);
|
||||
return cellFrame->RowIndex();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
@@ -285,6 +279,12 @@ HTMLTableCellAccessible::GetCellLayout() const
|
||||
return do_QueryFrame(mContent->GetPrimaryFrame());
|
||||
}
|
||||
|
||||
nsTableCellFrame*
|
||||
HTMLTableCellAccessible::GetCellFrame() const
|
||||
{
|
||||
return do_QueryFrame(mContent->GetPrimaryFrame());
|
||||
}
|
||||
|
||||
nsresult
|
||||
HTMLTableCellAccessible::GetCellIndexes(int32_t& aRowIdx, int32_t& aColIdx) const
|
||||
{
|
||||
@@ -520,11 +520,9 @@ HTMLTableAccessible::SelectedCellCount()
|
||||
if (!cellFrame || !cellFrame->IsSelected())
|
||||
continue;
|
||||
|
||||
int32_t startRow = -1, startCol = -1;
|
||||
cellFrame->GetRowIndex(startRow);
|
||||
cellFrame->GetColIndex(startCol);
|
||||
if (startRow >= 0 && (uint32_t)startRow == rowIdx &&
|
||||
startCol >= 0 && (uint32_t)startCol == colIdx)
|
||||
uint32_t startRow = cellFrame->RowIndex();
|
||||
uint32_t startCol = cellFrame->ColIndex();
|
||||
if (startRow == rowIdx && startCol == colIdx)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@@ -570,11 +568,9 @@ HTMLTableAccessible::SelectedCells(nsTArray<Accessible*>* aCells)
|
||||
if (!cellFrame || !cellFrame->IsSelected())
|
||||
continue;
|
||||
|
||||
int32_t startCol = -1, startRow = -1;
|
||||
cellFrame->GetRowIndex(startRow);
|
||||
cellFrame->GetColIndex(startCol);
|
||||
if ((startRow >= 0 && (uint32_t)startRow != rowIdx) ||
|
||||
(startCol >= 0 && (uint32_t)startCol != colIdx))
|
||||
uint32_t startRow = cellFrame->RowIndex();
|
||||
uint32_t startCol = cellFrame->ColIndex();
|
||||
if (startRow != rowIdx || startCol != colIdx)
|
||||
continue;
|
||||
|
||||
Accessible* cell = mDoc->GetAccessible(cellFrame->GetContent());
|
||||
@@ -597,11 +593,9 @@ HTMLTableAccessible::SelectedCellIndices(nsTArray<uint32_t>* aCells)
|
||||
if (!cellFrame || !cellFrame->IsSelected())
|
||||
continue;
|
||||
|
||||
int32_t startRow = -1, startCol = -1;
|
||||
cellFrame->GetColIndex(startCol);
|
||||
cellFrame->GetRowIndex(startRow);
|
||||
if (startRow >= 0 && (uint32_t)startRow == rowIdx &&
|
||||
startCol >= 0 && (uint32_t)startCol == colIdx)
|
||||
uint32_t startCol = cellFrame->ColIndex();
|
||||
uint32_t startRow = cellFrame->RowIndex();
|
||||
if (startRow == rowIdx && startCol == colIdx)
|
||||
aCells->AppendElement(CellIndexAt(rowIdx, colIdx));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "TableCellAccessible.h"
|
||||
|
||||
class nsITableCellLayout;
|
||||
class nsTableCellFrame;
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
@@ -53,6 +54,11 @@ protected:
|
||||
*/
|
||||
nsITableCellLayout* GetCellLayout() const;
|
||||
|
||||
/**
|
||||
* Return the table cell frame.
|
||||
*/
|
||||
nsTableCellFrame* GetCellFrame() const;
|
||||
|
||||
/**
|
||||
* Return row and column indices of the cell.
|
||||
*/
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// HTML:dialog
|
||||
|
||||
todo(isAccessible("dialog"), "dialog element is not accessible");
|
||||
ok(isAccessible("dialog"), "dialog element is not accessible");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// HTML:div
|
||||
|
||||
Vendored
+15
-5
@@ -381,11 +381,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
eval $set_cc_for_build
|
||||
SUN_ARCH=i386
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
_ISAINFO=`isainfo -k 2>/dev/null`
|
||||
if [ "$_ISAINFO" = "amd64" ]; then
|
||||
SUN_ARCH=x86_64
|
||||
elif [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
@@ -842,6 +845,13 @@ EOF
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
*:MINGW32_NT*:*)
|
||||
if [ "$PLATFORM" = "X64" ]; then
|
||||
echo x86_64-pc-mingw32
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
fi
|
||||
exit ;;
|
||||
*:MINGW64*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw64
|
||||
exit ;;
|
||||
|
||||
+2
-15
@@ -8,19 +8,6 @@ dnl ICU library, as well as a few other things.
|
||||
AC_DEFUN([MOZ_CONFIG_ICU], [
|
||||
|
||||
ICU_LIB_NAMES=
|
||||
MOZ_SYSTEM_ICU=
|
||||
MOZ_ARG_WITH_BOOL(system-icu,
|
||||
[ --with-system-icu
|
||||
Use system ICU (located with pkgconfig)],
|
||||
MOZ_SYSTEM_ICU=1)
|
||||
|
||||
if test -n "$MOZ_SYSTEM_ICU"; then
|
||||
PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 58.1)
|
||||
CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS"
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_SYSTEM_ICU)
|
||||
|
||||
dnl We always use ICU.
|
||||
USE_ICU=1
|
||||
@@ -51,7 +38,7 @@ if test -n "$USE_ICU"; then
|
||||
dnl We also don't do it on Windows because sometimes the file goes
|
||||
dnl missing -- possibly due to overzealous antivirus software? --
|
||||
dnl which prevents the browser from starting up :(
|
||||
if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
|
||||
if test -z "$JS_STANDALONE" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
|
||||
MOZ_ICU_DATA_ARCHIVE=1
|
||||
else
|
||||
MOZ_ICU_DATA_ARCHIVE=
|
||||
@@ -64,7 +51,7 @@ AC_SUBST(USE_ICU)
|
||||
AC_SUBST(ICU_DATA_FILE)
|
||||
AC_SUBST(MOZ_ICU_DATA_ARCHIVE)
|
||||
|
||||
if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
|
||||
if test -n "$USE_ICU"; then
|
||||
if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then
|
||||
AC_MSG_ERROR([Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api])
|
||||
fi
|
||||
|
||||
@@ -42,15 +42,6 @@ if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then
|
||||
_IS_OUTER_CONFIGURE=1
|
||||
fi
|
||||
|
||||
MOZ_ARG_WITH_BOOL(system-nspr,
|
||||
[ --with-system-nspr Use an NSPR that is already built and installed.
|
||||
Use the 'nspr-config' script in the current path,
|
||||
or look for the script in the directories given with
|
||||
--with-nspr-exec-prefix or --with-nspr-prefix.
|
||||
(Those flags are only checked if you specify
|
||||
--with-system-nspr.)],
|
||||
_USE_SYSTEM_NSPR=1 )
|
||||
|
||||
JS_POSIX_NSPR=unset
|
||||
ifdef([CONFIGURING_JS],[
|
||||
if test -n "$JS_STANDALONE"; then
|
||||
@@ -71,7 +62,6 @@ ifdef([CONFIGURING_JS],[
|
||||
])
|
||||
|
||||
dnl Pass at most one of
|
||||
dnl --with-system-nspr
|
||||
dnl --with-nspr-cflags/libs
|
||||
dnl --enable-nspr-build
|
||||
dnl --enable-posix-nspr-emulation
|
||||
@@ -79,10 +69,6 @@ dnl --enable-posix-nspr-emulation
|
||||
AC_MSG_CHECKING([NSPR selection])
|
||||
nspr_opts=
|
||||
which_nspr=default
|
||||
if test -n "$_USE_SYSTEM_NSPR"; then
|
||||
nspr_opts="x$nspr_opts"
|
||||
which_nspr="system"
|
||||
fi
|
||||
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
|
||||
nspr_opts="x$nspr_opts"
|
||||
which_nspr="command-line"
|
||||
@@ -136,11 +122,7 @@ fi
|
||||
# anything itself.
|
||||
if test -n "$_IS_OUTER_CONFIGURE"; then
|
||||
|
||||
if test -n "$_USE_SYSTEM_NSPR"; then
|
||||
AM_PATH_NSPR($NSPR_MINVER, [MOZ_SYSTEM_NSPR=1], [AC_MSG_ERROR([you do not have NSPR installed or your version is older than $NSPR_MINVER.])])
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
|
||||
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
|
||||
_SAVE_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $NSPR_CFLAGS"
|
||||
AC_TRY_COMPILE([#include "prtypes.h"],
|
||||
@@ -178,19 +160,7 @@ AC_SUBST(NSPR_INCLUDE_DIR)
|
||||
AC_SUBST(NSPR_LIB_DIR)
|
||||
|
||||
PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr"
|
||||
if test -n "$MOZ_SYSTEM_NSPR"; then
|
||||
_SAVE_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $NSPR_CFLAGS"
|
||||
AC_TRY_COMPILE([#include "prlog.h"],
|
||||
[#ifndef PR_STATIC_ASSERT
|
||||
#error PR_STATIC_ASSERT not defined
|
||||
#endif],
|
||||
,
|
||||
AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT]))
|
||||
CFLAGS=$_SAVE_CFLAGS
|
||||
# piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc
|
||||
PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER"
|
||||
elif test -n "$JS_POSIX_NSPR"; then
|
||||
if test -n "$JS_POSIX_NSPR"; then
|
||||
PKGCONF_REQUIRES_PRIVATE=
|
||||
fi
|
||||
AC_SUBST([PKGCONF_REQUIRES_PRIVATE])
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Define indicating that this build is prior to one of the early betas. To be
|
||||
# unset mid-way through the beta cycle.
|
||||
EARLY_BETA_OR_EARLIER=
|
||||
@@ -33,15 +33,9 @@ if ('MOZ_OFFICIAL_BRANDING' in listConfig) or (strBrandingDirectory.endswith("br
|
||||
# Applies to Pale Moon and Basilisk
|
||||
if ('MC_BASILISK' in listConfig) or ('MC_PALEMOON' in listConfig):
|
||||
listViolations += [
|
||||
'MOZ_SYSTEM_LIBEVENT',
|
||||
'MOZ_SYSTEM_NSS',
|
||||
'MOZ_SYSTEM_NSPR',
|
||||
'MOZ_SYSTEM_JPEG',
|
||||
'MOZ_SYSTEM_ZLIB',
|
||||
'MOZ_SYSTEM_BZ2',
|
||||
'MOZ_SYSTEM_PNG',
|
||||
'MOZ_SYSTEM_LIBVPX',
|
||||
'MOZ_SYSTEM_SQLITE',
|
||||
'MOZ_SYSTEM_JEMALLOC'
|
||||
]
|
||||
|
||||
|
||||
@@ -610,7 +610,7 @@ imply_option('--enable-project', application)
|
||||
def default_project(build_env, help):
|
||||
if build_env.topobjdir.endswith('/js/src'):
|
||||
return 'js'
|
||||
return 'browser'
|
||||
return 'application/xulrunner'
|
||||
|
||||
option('--enable-project', nargs=1, default=default_project,
|
||||
help='Project to build')
|
||||
@@ -618,28 +618,22 @@ option('--enable-project', nargs=1, default=default_project,
|
||||
option('--with-external-source-dir', env='EXTERNAL_SOURCE_DIR', nargs=1,
|
||||
help='External directory containing additional build files')
|
||||
|
||||
@depends('--enable-project', '--with-external-source-dir',
|
||||
check_build_environment, '--help')
|
||||
@depends('--enable-project', '--with-external-source-dir', check_build_environment, '--help')
|
||||
@imports(_from='os.path', _import='exists')
|
||||
def include_project_configure(project, external_source_dir, build_env, help):
|
||||
if not project:
|
||||
die('--enable-project is required.')
|
||||
|
||||
base_dir = build_env.topsrcdir
|
||||
|
||||
if external_source_dir:
|
||||
base_dir = os.path.join(base_dir, external_source_dir[0])
|
||||
|
||||
|
||||
build_app = project[0]
|
||||
|
||||
if not external_source_dir and build_app not in ('xulrunner', 'js'):
|
||||
die('Cannot find project %s', build_app)
|
||||
|
||||
path_project_src_dir_root = os.path.join(base_dir, build_app, 'moz.configure')
|
||||
|
||||
if exists(path_project_src_dir_root):
|
||||
return path_project_src_dir_root
|
||||
else:
|
||||
die('Cannot find project %s', build_app)
|
||||
return os.path.join(build_env.topsrcdir, 'toolkit', 'moz.configure')
|
||||
|
||||
@depends('--with-external-source-dir')
|
||||
def external_source_dir(value):
|
||||
@@ -649,12 +643,29 @@ def external_source_dir(value):
|
||||
set_config('EXTERNAL_SOURCE_DIR', external_source_dir)
|
||||
add_old_configure_assignment('EXTERNAL_SOURCE_DIR', external_source_dir)
|
||||
|
||||
@depends('--enable-project', '--with-external-source-dir', check_build_environment, '--help')
|
||||
@imports(_from='os.path', _import='exists')
|
||||
def build_project(project, external_source_dir, build_env, help):
|
||||
if not project:
|
||||
die('--enable-project is required.')
|
||||
|
||||
base_dir = build_env.topsrcdir
|
||||
|
||||
if external_source_dir:
|
||||
base_dir = os.path.join(base_dir, external_source_dir[0])
|
||||
|
||||
build_app = project[0]
|
||||
|
||||
if not external_source_dir and build_app not in ('xulrunner', 'js'):
|
||||
die('Cannot find project %s', build_app)
|
||||
|
||||
build_app_abspath = os.path.join(base_dir, build_app)
|
||||
|
||||
if exists(build_app_abspath):
|
||||
return os.path.relpath(build_app_abspath, build_env.topsrcdir)
|
||||
else:
|
||||
die('Cannot find project %s', build_app)
|
||||
|
||||
@depends(include_project_configure, check_build_environment, '--help')
|
||||
def build_project(include_project_configure, build_env, help):
|
||||
ret = os.path.dirname(os.path.relpath(include_project_configure,
|
||||
build_env.topsrcdir))
|
||||
return ret
|
||||
|
||||
set_config('MOZ_BUILD_APP', build_project)
|
||||
set_define('MOZ_BUILD_APP', build_project)
|
||||
|
||||
@@ -157,6 +157,7 @@ def old_configure_options(*options):
|
||||
'--enable-accessibility',
|
||||
'--enable-address-sanitizer',
|
||||
'--enable-alsa',
|
||||
'--enable-av1',
|
||||
'--enable-b2g-bt',
|
||||
'--enable-b2g-camera',
|
||||
'--enable-b2g-ril',
|
||||
@@ -166,6 +167,7 @@ def old_configure_options(*options):
|
||||
'--enable-cookies',
|
||||
'--enable-cpp-rtti',
|
||||
'--enable-crashreporter',
|
||||
'--enable-dbm',
|
||||
'--enable-dbus',
|
||||
'--enable-debug-js-modules',
|
||||
'--enable-jetpack',
|
||||
@@ -222,6 +224,7 @@ def old_configure_options(*options):
|
||||
'--enable-release',
|
||||
'--enable-safe-browsing',
|
||||
'--enable-sandbox',
|
||||
'--enable-security-sqlstore',
|
||||
'--enable-signmar',
|
||||
'--enable-simulator',
|
||||
'--enable-small-chunk-size',
|
||||
@@ -233,7 +236,6 @@ def old_configure_options(*options):
|
||||
'--enable-system-cairo',
|
||||
'--enable-system-extension-dirs',
|
||||
'--enable-system-pixman',
|
||||
'--enable-system-sqlite',
|
||||
'--enable-tasktracer',
|
||||
'--enable-tests',
|
||||
'--enable-thread-sanitizer',
|
||||
@@ -287,13 +289,7 @@ def old_configure_options(*options):
|
||||
'--with-sixgill',
|
||||
'--with-soft-float',
|
||||
'--with-system-bz2',
|
||||
'--with-system-icu',
|
||||
'--with-system-jpeg',
|
||||
'--with-system-libevent',
|
||||
'--with-system-libvpx',
|
||||
'--with-system-nspr',
|
||||
'--with-system-nss',
|
||||
'--with-system-png',
|
||||
'--with-system-zlib',
|
||||
'--with-thumb',
|
||||
'--with-thumb-interwork',
|
||||
|
||||
@@ -16,11 +16,6 @@ ac_add_options --enable-crashreporter
|
||||
|
||||
ac_add_options --enable-release
|
||||
|
||||
# Disable checking that add-ons are signed by the trusted root
|
||||
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-0}
|
||||
# Disable enforcing that add-ons are signed by the trusted root
|
||||
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}
|
||||
|
||||
ac_add_options --enable-js-shell
|
||||
|
||||
. "$topsrcdir/build/mozconfig.automation"
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
import os, sys
|
||||
|
||||
if not len(sys.argv) is 2 or not os.path.exists(sys.argv[1]):
|
||||
print("\nYou did not supply a valid path to check.")
|
||||
exit(1)
|
||||
else:
|
||||
print("\nChecking for un-preprocessed files...", end = ' ')
|
||||
DIST_PATH = sys.argv[1]
|
||||
|
||||
PP_FILE_TYPES = (
|
||||
'.css',
|
||||
'.dtd',
|
||||
'.html',
|
||||
'.js',
|
||||
'.jsm',
|
||||
'.xhtml',
|
||||
'.xml',
|
||||
'.xul',
|
||||
'.manifest',
|
||||
'.properties',
|
||||
'.rdf'
|
||||
)
|
||||
|
||||
PP_SPECIAL_TYPES = ('.css')
|
||||
|
||||
PP_DIRECTIVES = [
|
||||
'define',
|
||||
'if',
|
||||
'ifdef',
|
||||
'ifndef',
|
||||
'elif',
|
||||
'elifdef',
|
||||
'endif',
|
||||
'error',
|
||||
'expand',
|
||||
'filter',
|
||||
'include',
|
||||
'literal',
|
||||
'undef',
|
||||
'unfilter'
|
||||
]
|
||||
|
||||
PP_FILES = []
|
||||
PP_BAD_FILES = []
|
||||
|
||||
for root, directories, filenames in os.walk(DIST_PATH):
|
||||
for filename in filenames:
|
||||
if filename.endswith(PP_FILE_TYPES):
|
||||
PP_FILES += [ os.path.join(root, filename).replace(os.sep, '/') ]
|
||||
|
||||
for file in PP_FILES:
|
||||
with open(file) as fp:
|
||||
marker = '%' if file.endswith(PP_SPECIAL_TYPES) else '#'
|
||||
directives = tuple(marker + directive for directive in PP_DIRECTIVES)
|
||||
for line in fp:
|
||||
if line.startswith(directives):
|
||||
PP_BAD_FILES += [ file.replace(DIST_PATH + '/', '') ]
|
||||
fp.close()
|
||||
|
||||
PP_BAD_FILES = list(dict.fromkeys(PP_BAD_FILES))
|
||||
|
||||
print('Done!')
|
||||
|
||||
if len(PP_BAD_FILES) > 0:
|
||||
print("\nWARNING: The following {0} file(s) in {1} may require preprocessing:\n".format(len(PP_BAD_FILES), DIST_PATH))
|
||||
for file in PP_BAD_FILES:
|
||||
print(file)
|
||||
|
||||
exit(0)
|
||||
@@ -44,11 +44,7 @@ export:: $(export-preqs)
|
||||
-DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
|
||||
-DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
|
||||
-DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
|
||||
-DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
|
||||
-DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
|
||||
-DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
|
||||
-DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
|
||||
-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
|
||||
$(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
|
||||
$(INSTALL) system_wrappers $(DIST)
|
||||
|
||||
|
||||
Vendored
+10
-12
@@ -6,16 +6,14 @@
|
||||
|
||||
Library('icu')
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_ICU']:
|
||||
OS_LIBS += CONFIG['MOZ_ICU_LIBS']
|
||||
DIRS += [
|
||||
'common',
|
||||
'data',
|
||||
'i18n',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
DIRS += ['stubdata']
|
||||
USE_LIBS += ['icustubdata']
|
||||
else:
|
||||
DIRS += [
|
||||
'common',
|
||||
'data',
|
||||
'i18n',
|
||||
]
|
||||
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
DIRS += ['stubdata']
|
||||
USE_LIBS += ['icustubdata']
|
||||
else:
|
||||
USE_LIBS += ['icudata']
|
||||
USE_LIBS += ['icudata']
|
||||
Vendored
+4
-8
@@ -6,10 +6,8 @@
|
||||
|
||||
external_dirs = []
|
||||
|
||||
DIRS += [
|
||||
'lgpllibs',
|
||||
'sqlite',
|
||||
]
|
||||
DIRS += ['lgpllibs']
|
||||
|
||||
if not CONFIG['MOZ_SYSTEM_JPEG']:
|
||||
external_dirs += ['media/libjpeg']
|
||||
|
||||
@@ -30,14 +28,12 @@ if CONFIG['MOZ_TREMOR']:
|
||||
if CONFIG['MOZ_WEBM_ENCODER']:
|
||||
external_dirs += ['media/libmkv']
|
||||
|
||||
if not CONFIG['MOZ_SYSTEM_LIBVPX']:
|
||||
external_dirs += ['media/libvpx']
|
||||
external_dirs += ['media/libvpx']
|
||||
|
||||
if CONFIG['MOZ_AV1']:
|
||||
external_dirs += ['media/libaom']
|
||||
|
||||
if not CONFIG['MOZ_SYSTEM_PNG']:
|
||||
external_dirs += ['media/libpng']
|
||||
external_dirs += ['media/libpng']
|
||||
|
||||
external_dirs += ['media/libwebp']
|
||||
|
||||
|
||||
Vendored
+1
-10
@@ -3,8 +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/.
|
||||
|
||||
ifndef MOZ_SYSTEM_NSS
|
||||
|
||||
CC_WRAPPER =
|
||||
CXX_WRAPPER =
|
||||
|
||||
@@ -121,15 +119,9 @@ DEFAULT_GMAKE_FLAGS += NSS_ENABLE_TLS_1_3=1
|
||||
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1)
|
||||
DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' NSPR31_LIB_PREFIX=lib
|
||||
endif
|
||||
ifndef MOZ_SYSTEM_SQLITE
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=nss3
|
||||
else
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_DIR=$(ABS_DIST)/../config/external/sqlite
|
||||
endif # MOZ_FOLD_LIBS
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_DIR=$(ABS_DIST)/../db/sqlite3/src
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_INCLUDE_DIR=$(ABS_DIST)/include
|
||||
endif
|
||||
ifdef NSS_DISABLE_DBM
|
||||
DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1
|
||||
endif
|
||||
@@ -475,4 +467,3 @@ endif # MOZ_FOLD_LIBS
|
||||
# security/nss/lib/ckfw/builtins. See bug #836220.
|
||||
libs-nss/lib$(if $(MOZ_FOLD_LIBS),/ckfw): $(call mkdir_deps,$(DEPTH)/security/nss/lib/ckfw/builtins)
|
||||
|
||||
endif
|
||||
Vendored
+8
-11
@@ -6,14 +6,11 @@
|
||||
|
||||
Library('crmf')
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_NSS']:
|
||||
OS_LIBS += [l for l in CONFIG['NSS_LIBS'] if l.startswith('-L')]
|
||||
else:
|
||||
USE_LIBS += [
|
||||
# The dependency on nss is not real, but is required to force the
|
||||
# parent directory being built before this one. This has no
|
||||
# practical effect on linkage, since the only thing linking crmf
|
||||
# will need nss anyways.
|
||||
'nss',
|
||||
'static:/security/nss/lib/crmf/crmf',
|
||||
]
|
||||
USE_LIBS += [
|
||||
# The dependency on nss is not real, but is required to force the
|
||||
# parent directory being built before this one. This has no
|
||||
# practical effect on linkage, since the only thing linking crmf
|
||||
# will need nss anyways.
|
||||
'nss',
|
||||
'static:/security/nss/lib/crmf/crmf',
|
||||
]
|
||||
Vendored
+3
-5
@@ -6,10 +6,7 @@
|
||||
|
||||
DIRS += ['crmf']
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_NSS']:
|
||||
Library('nss')
|
||||
OS_LIBS += CONFIG['NSS_LIBS']
|
||||
elif CONFIG['MOZ_FOLD_LIBS']:
|
||||
if CONFIG['MOZ_FOLD_LIBS']:
|
||||
GeckoSharedLibrary('nss', linkage=None)
|
||||
# TODO: The library name can be changed when bug 845217 is fixed.
|
||||
SHARED_LIBRARY_NAME = 'nss3'
|
||||
@@ -32,9 +29,10 @@ else:
|
||||
'/security/nss/lib/smime/smime3',
|
||||
'/security/nss/lib/ssl/ssl3',
|
||||
'/security/nss/lib/util/nssutil3',
|
||||
'sqlite',
|
||||
]
|
||||
|
||||
USE_LIBS += ['sqlite']
|
||||
|
||||
# XXX: We should fix these warnings.
|
||||
ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
|
||||
Vendored
-1
@@ -13,7 +13,6 @@
|
||||
PR_*
|
||||
PL_*
|
||||
#endif
|
||||
#include ../../../db/sqlite3/src/sqlite.symbols
|
||||
ATOB_AsciiToData
|
||||
ATOB_AsciiToData_Util
|
||||
ATOB_ConvertAsciiToItem
|
||||
|
||||
Vendored
-22
@@ -1,22 +0,0 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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_SYSTEM_SQLITE']:
|
||||
Library('sqlite')
|
||||
OS_LIBS += CONFIG['SQLITE_LIBS']
|
||||
else:
|
||||
DIRS += ['../../../db/sqlite3/src']
|
||||
if CONFIG['MOZ_FOLD_LIBS']:
|
||||
Library('sqlite')
|
||||
# When folding libraries, sqlite is actually in the nss library.
|
||||
USE_LIBS += [
|
||||
'nss',
|
||||
]
|
||||
else:
|
||||
SharedLibrary('sqlite')
|
||||
SHARED_LIBRARY_NAME = 'mozsqlite3'
|
||||
|
||||
SYMBOLS_FILE = '/db/sqlite3/src/sqlite.symbols'
|
||||
@@ -29,9 +29,6 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
|
||||
# while the program here is in C.
|
||||
HostProgram('nsinstall_real', c_only=True)
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_ICU']:
|
||||
DEFINES['MOZ_SYSTEM_ICU'] = True
|
||||
|
||||
PYTHON_UNIT_TESTS += [
|
||||
'tests/test_mozbuild_reading.py',
|
||||
'tests/unit-expandlibs.py',
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ ifeq ($(MOZ_REPLACE_MALLOC_LINKAGE),dummy library)
|
||||
mozglue/build/target memory/replace/logalloc/replay/target: memory/replace/dummy/target
|
||||
endif
|
||||
endif
|
||||
ifeq (,$(MOZ_SYSTEM_NSPR)$(MOZ_SYSTEM_NSS)$(MOZ_FOLD_LIBS))
|
||||
ifeq (,$(MOZ_FOLD_LIBS))
|
||||
config/external/nss/target: config/external/nspr/pr/target config/external/nspr/ds/target config/external/nspr/libc/target
|
||||
endif
|
||||
# Most things are built during compile (target/host), but some things happen during export
|
||||
|
||||
@@ -1253,9 +1253,6 @@ soundtouch/SoundTouchFactory.h
|
||||
#if MOZ_LIBAV_FFT==1
|
||||
libavcodec/avfft.h
|
||||
#endif
|
||||
#if MOZ_SYSTEM_PNG==1
|
||||
png.h
|
||||
#endif
|
||||
#if MOZ_SYSTEM_ZLIB==1
|
||||
zlib.h
|
||||
#endif
|
||||
@@ -1276,11 +1273,7 @@ bzlib.h
|
||||
#ifdef MOZ_ENABLE_GIO
|
||||
gio/gio.h
|
||||
#endif
|
||||
#if MOZ_SYSTEM_LIBEVENT==1
|
||||
event.h
|
||||
#else
|
||||
sys/event.h
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_LIBPROXY
|
||||
proxy.h
|
||||
#endif
|
||||
@@ -1295,15 +1288,6 @@ QtSparql/qsparqlresult.h
|
||||
#if MOZ_TREE_PIXMAN!=1
|
||||
pixman.h
|
||||
#endif
|
||||
#if MOZ_SYSTEM_LIBVPX==1
|
||||
vpx/svc_context.h
|
||||
vpx/vpx_codec.h
|
||||
vpx/vpx_decoder.h
|
||||
vpx/vpx_encoder.h
|
||||
vpx/vp8cx.h
|
||||
vpx/vp8dx.h
|
||||
vpx_mem/vpx_mem.h
|
||||
#endif
|
||||
gst/gst.h
|
||||
gst/app/gstappsink.h
|
||||
gst/app/gstappsrc.h
|
||||
@@ -1316,22 +1300,6 @@ kvm.h
|
||||
spawn.h
|
||||
err.h
|
||||
xlocale.h
|
||||
#ifdef MOZ_SYSTEM_ICU
|
||||
unicode/locid.h
|
||||
unicode/numsys.h
|
||||
unicode/timezone.h
|
||||
unicode/ucal.h
|
||||
unicode/uchar.h
|
||||
unicode/uclean.h
|
||||
unicode/ucol.h
|
||||
unicode/udat.h
|
||||
unicode/udatpg.h
|
||||
unicode/uenum.h
|
||||
unicode/unorm.h
|
||||
unicode/unum.h
|
||||
unicode/ustring.h
|
||||
unicode/utypes.h
|
||||
#endif
|
||||
libutil.h
|
||||
unwind.h
|
||||
fenv.h
|
||||
@@ -93,7 +93,7 @@ if (!defined($official)) {$official="";}
|
||||
if (!defined($milestone)) {$milestone="";}
|
||||
if (!defined($module)) {$module="";}
|
||||
if (!defined($binary)) {$binary="";}
|
||||
if (!defined($displayname)) {$displayname="Mozilla";}
|
||||
if (!defined($displayname)) {$displayname="UXP";}
|
||||
if (!defined($appversion)) {$appversion=$milestone;}
|
||||
if (!defined($depth)) {$depth=".";}
|
||||
if (!defined($rcinclude)) {$rcinclude="";}
|
||||
@@ -234,10 +234,10 @@ for ($j = 1; $j < 4; $j++)
|
||||
}
|
||||
my $winappversion = "$appver[0],$appver[1],$appver[2],$appver[3]";
|
||||
|
||||
my $copyright = "License: MPL 2";
|
||||
my $company = "Mozilla Foundation";
|
||||
my $trademarks = "Mozilla";
|
||||
my $productname = $displayname;
|
||||
my $copyright = "License: MPL 2.0";
|
||||
my $company = "Moonchild Productions";
|
||||
my $trademarks = "Moonchild";
|
||||
my $productname = "UXP";
|
||||
|
||||
|
||||
if (defined($override_comment)){$override_comment =~ s/\@MOZ_APP_DISPLAYNAME\@/$displayname/g; $comment=$override_comment;}
|
||||
|
||||
+5
-6
@@ -3,9 +3,8 @@
|
||||
# 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 not CONFIG['NSS_DISABLE_DBM'] and CONFIG['MOZ_MORK']:
|
||||
DIRS += [
|
||||
'public',
|
||||
'src',
|
||||
'build',
|
||||
]
|
||||
DIRS += [
|
||||
'public',
|
||||
'src',
|
||||
'build',
|
||||
]
|
||||
@@ -1,11 +0,0 @@
|
||||
# vim: set filetype=python:
|
||||
# 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 not CONFIG['NSS_DISABLE_DBM'] and CONFIG['MOZ_MORK']:
|
||||
DIRS += [
|
||||
'mork/public',
|
||||
'mork/src',
|
||||
'mork/build',
|
||||
]
|
||||
+12
-23
@@ -3,25 +3,18 @@
|
||||
# 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/.
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
||||
EXPORTS += [
|
||||
'sqlite3.h',
|
||||
]
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
||||
# We allow warnings for third-party code that can be updated from upstream.
|
||||
ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
if CONFIG['MOZ_FOLD_LIBS']:
|
||||
# When folding libraries, sqlite is actually in the nss library.
|
||||
FINAL_LIBRARY = 'nss'
|
||||
else:
|
||||
# The final library is in config/external/sqlite
|
||||
FINAL_LIBRARY = 'sqlite'
|
||||
GeckoSharedLibrary('sqlite', linkage=None, mozglue='library')
|
||||
SHARED_LIBRARY_NAME = 'mozsqlite3'
|
||||
SYMBOLS_FILE = 'sqlite.symbols'
|
||||
|
||||
SOURCES += [
|
||||
'sqlite3.c',
|
||||
]
|
||||
EXPORTS += ['sqlite3.h']
|
||||
SOURCES += ['sqlite3.c']
|
||||
|
||||
# -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we
|
||||
# don't have to vacuum to make sure the data is not visible in the file.
|
||||
@@ -34,8 +27,11 @@ SOURCES += [
|
||||
# hidden preference. If that preference is missing or invalid then this value
|
||||
# will be used.
|
||||
# Note: Be sure to update the configure.in checks when these change!
|
||||
for var in ('SQLITE_SECURE_DELETE', 'SQLITE_THREADSAFE', 'SQLITE_CORE',
|
||||
'SQLITE_ENABLE_FTS3', 'SQLITE_ENABLE_UNLOCK_NOTIFY',
|
||||
for var in ('SQLITE_SECURE_DELETE',
|
||||
'SQLITE_THREADSAFE',
|
||||
'SQLITE_CORE',
|
||||
'SQLITE_ENABLE_FTS3',
|
||||
'SQLITE_ENABLE_UNLOCK_NOTIFY',
|
||||
'SQLITE_ENABLE_DBSTAT_VTAB'):
|
||||
DEFINES[var] = 1
|
||||
|
||||
@@ -67,10 +63,6 @@ if CONFIG['MOZ_DEBUG']:
|
||||
DEFINES['SQLITE_DEBUG'] = 1
|
||||
DEFINES['SQLITE_ENABLE_API_ARMOR'] = True
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
# default to user readable only to fit Android security model
|
||||
DEFINES['SQLITE_DEFAULT_FILE_PERMISSIONS'] = '0600'
|
||||
|
||||
# Force using malloc_usable_size when building with jemalloc because _msize
|
||||
# causes assertions on Win64. See bug 719579.
|
||||
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
|
||||
@@ -86,10 +78,7 @@ DEFINES['SQLITE_OMIT_DECLTYPE'] = True
|
||||
# performance and doesn't suffer from a full separate tmp partition.
|
||||
# Exclude 32bit platforms due to address space fragmentation issues.
|
||||
# System Sqlite is managed through a PRAGMA instead.
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
# On Android there's no tmp partition, so always use a MEMORY temp store.
|
||||
DEFINES['SQLITE_TEMP_STORE'] = 3
|
||||
elif CONFIG['HAVE_64BIT_BUILD']:
|
||||
if CONFIG['HAVE_64BIT_BUILD']:
|
||||
# On 64bit platforms default to a MEMORY temp store for performance.
|
||||
DEFINES['SQLITE_TEMP_STORE'] = 2
|
||||
|
||||
|
||||
@@ -9828,7 +9828,7 @@ var Debugger =
|
||||
var host = httpActivity.hostname;
|
||||
|
||||
info.hsts = sss.isSecureHost(sss.HEADER_HSTS, host, flags);
|
||||
info.hpkp = sss.isSecureHost(sss.HEADER_HPKP, host, flags);
|
||||
info.hpkp = false;
|
||||
} else {
|
||||
DevToolsUtils.reportException("NetworkHelper.parseSecurityInfo", "Could not get HSTS/HPKP status as hostname is not available.");
|
||||
info.hsts = false;
|
||||
|
||||
@@ -58,9 +58,21 @@ const Curl = {
|
||||
* A cURL command.
|
||||
*/
|
||||
generateCommand: function (data) {
|
||||
let utils = CurlUtils;
|
||||
const utils = CurlUtils;
|
||||
|
||||
let command = ["curl"];
|
||||
|
||||
// Make sure to use the following helpers to sanitize arguments before execution.
|
||||
const addParam = value => {
|
||||
const safe = /^[a-zA-Z-]+$/.test(value) ? value : escapeString(value);
|
||||
command.push(safe);
|
||||
};
|
||||
|
||||
const addPostData = value => {
|
||||
const safe = /^[a-zA-Z-]+$/.test(value) ? value : escapeString(value);
|
||||
postData.push(safe);
|
||||
};
|
||||
|
||||
let ignoredHeaders = new Set();
|
||||
|
||||
// The cURL command is expected to run on the same platform that Firefox runs
|
||||
@@ -69,7 +81,7 @@ const Curl = {
|
||||
utils.escapeStringWin : utils.escapeStringPosix;
|
||||
|
||||
// Add URL.
|
||||
command.push(escapeString(data.url));
|
||||
addParam(data.url);
|
||||
|
||||
let postDataText = null;
|
||||
let multipartRequest = utils.isMultipartRequest(data);
|
||||
@@ -79,15 +91,15 @@ const Curl = {
|
||||
if (utils.isUrlEncodedRequest(data) ||
|
||||
["PUT", "POST", "PATCH"].includes(data.method)) {
|
||||
postDataText = data.postDataText;
|
||||
postData.push("--data");
|
||||
postData.push(escapeString(utils.writePostDataTextParams(postDataText)));
|
||||
addPostData("--data-raw");
|
||||
addPostData(utils.writePostDataTextParams(postDataText));
|
||||
ignoredHeaders.add("content-length");
|
||||
} else if (multipartRequest) {
|
||||
postDataText = data.postDataText;
|
||||
postData.push("--data-binary");
|
||||
addPostData("--data-binary");
|
||||
let boundary = utils.getMultipartBoundary(data);
|
||||
let text = utils.removeBinaryDataFromMultipartText(postDataText, boundary);
|
||||
postData.push(escapeString(text));
|
||||
addPostData(text);
|
||||
ignoredHeaders.add("content-length");
|
||||
}
|
||||
|
||||
@@ -95,15 +107,15 @@ const Curl = {
|
||||
// For GET and POST requests this is not necessary as GET is the
|
||||
// default. If --data or --binary is added POST is the default.
|
||||
if (!(data.method == "GET" || data.method == "POST")) {
|
||||
command.push("-X");
|
||||
command.push(data.method);
|
||||
addParam("-X");
|
||||
addParam(data.method);
|
||||
}
|
||||
|
||||
// Add -I (HEAD)
|
||||
// For servers that supports HEAD.
|
||||
// This will fetch the header of a document only.
|
||||
if (data.method == "HEAD") {
|
||||
command.push("-I");
|
||||
addParam("-I");
|
||||
}
|
||||
|
||||
// Add http version.
|
||||
@@ -114,7 +126,7 @@ const Curl = {
|
||||
// data.httpVersion are HTTP/1.0, HTTP/1.1 and HTTP/2.0
|
||||
// So in case of HTTP/2.0 (which should ideally be HTTP/2) we are using
|
||||
// only major version, and full version in other cases
|
||||
command.push("--http" + (version == "2.0" ? version.split(".")[0] : version));
|
||||
addParam("--http" + (version == "2.0" ? version.split(".")[0] : version));
|
||||
}
|
||||
|
||||
// Add request headers.
|
||||
@@ -126,14 +138,14 @@ const Curl = {
|
||||
for (let i = 0; i < headers.length; i++) {
|
||||
let header = headers[i];
|
||||
if (header.name.toLowerCase() === "accept-encoding") {
|
||||
command.push("--compressed");
|
||||
addParam("--compressed");
|
||||
continue;
|
||||
}
|
||||
if (ignoredHeaders.has(header.name.toLowerCase())) {
|
||||
continue;
|
||||
}
|
||||
command.push("-H");
|
||||
command.push(escapeString(header.name + ": " + header.value));
|
||||
addParam("-H");
|
||||
addParam(header.name + ": " + header.value);
|
||||
}
|
||||
|
||||
// Add post data.
|
||||
@@ -388,7 +400,12 @@ const CurlUtils = {
|
||||
* Credit: Google DevTools
|
||||
*/
|
||||
escapeStringWin: function (str) {
|
||||
/* Replace quote by double quote (but not by \") because it is
|
||||
/*
|
||||
Replace dollar sign because of commands (e.g $(cmd.exe)) in
|
||||
powershell when using double quotes.
|
||||
Useful details http://www.rlmueller.net/PowerShellEscape.htm
|
||||
|
||||
Replace quote by double quote (but not by \") because it is
|
||||
recognized by both cmd.exe and MS Crt arguments parser.
|
||||
|
||||
Replace % by "%" because it could be expanded to an environment
|
||||
@@ -402,7 +419,8 @@ const CurlUtils = {
|
||||
Replace new line outside of quotes since cmd.exe doesn't let
|
||||
to do it inside.
|
||||
*/
|
||||
return "\"" + str.replace(/"/g, "\"\"")
|
||||
return "\"" + str.replace(/\$/g, "`$")
|
||||
.replace(/"/g, "\"\"")
|
||||
.replace(/%/g, "\"%\"")
|
||||
.replace(/\\/g, "\\\\")
|
||||
.replace(/[\r\n]+/g, "\"^$&\"") + "\"";
|
||||
|
||||
+5
-11
@@ -4,20 +4,14 @@
|
||||
# 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/.
|
||||
|
||||
DIRS += [
|
||||
'server',
|
||||
'shared',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_DEVTOOLS']:
|
||||
DIRS += ['client']
|
||||
|
||||
if CONFIG['MOZ_DEVTOOLS_SERVER']:
|
||||
DIRS += [
|
||||
'server',
|
||||
'shared',
|
||||
]
|
||||
else:
|
||||
DIRS += [
|
||||
'shared/heapsnapshot',
|
||||
'shared/jsinspector',
|
||||
]
|
||||
|
||||
# /browser uses DIST_SUBDIR. We opt-in to this treatment when building
|
||||
# DevTools for the browser to keep the root omni.ja slim for use by external XUL
|
||||
# apps. Mulet also uses this since it includes /browser.
|
||||
|
||||
@@ -4,60 +4,12 @@
|
||||
# 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/.
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Memory')
|
||||
|
||||
if CONFIG['ENABLE_TESTS']:
|
||||
DIRS += ['tests/gtest']
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += [ 'tests/unit/xpcshell.ini' ]
|
||||
MOCHITEST_MANIFESTS += [ 'tests/mochitest/mochitest.ini' ]
|
||||
MOCHITEST_CHROME_MANIFESTS += [ 'tests/mochitest/chrome.ini' ]
|
||||
|
||||
EXPORTS.mozilla.devtools += [
|
||||
'AutoMemMap.h',
|
||||
'CoreDump.pb.h',
|
||||
'DeserializedNode.h',
|
||||
'DominatorTree.h',
|
||||
'FileDescriptorOutputStream.h',
|
||||
'HeapSnapshot.h',
|
||||
'HeapSnapshotTempFileHelperChild.h',
|
||||
'HeapSnapshotTempFileHelperParent.h',
|
||||
'ZeroCopyNSIOutputStream.h',
|
||||
]
|
||||
|
||||
IPDL_SOURCES += [
|
||||
'PHeapSnapshotTempFileHelper.ipdl',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
SOURCES += [
|
||||
'AutoMemMap.cpp',
|
||||
'CoreDump.pb.cc',
|
||||
'DeserializedNode.cpp',
|
||||
'DominatorTree.cpp',
|
||||
'FileDescriptorOutputStream.cpp',
|
||||
'HeapSnapshot.cpp',
|
||||
'HeapSnapshotTempFileHelperParent.cpp',
|
||||
'ZeroCopyNSIOutputStream.cpp',
|
||||
]
|
||||
|
||||
# Disable RTTI in google protocol buffer
|
||||
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['MOZ_DEVTOOLS_SERVER']:
|
||||
DevToolsModules(
|
||||
'census-tree-node.js',
|
||||
'CensusUtils.js',
|
||||
'DominatorTreeNode.js',
|
||||
'HeapAnalysesClient.js',
|
||||
'HeapAnalysesWorker.js',
|
||||
'HeapSnapshotFileUtils.js',
|
||||
'shortest-paths.js',
|
||||
)
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
CXXFLAGS += ['-Wno-error=shadow']
|
||||
DevToolsModules(
|
||||
'census-tree-node.js',
|
||||
'CensusUtils.js',
|
||||
'DominatorTreeNode.js',
|
||||
'HeapAnalysesClient.js',
|
||||
'HeapAnalysesWorker.js',
|
||||
'HeapSnapshotFileUtils.js',
|
||||
'shortest-paths.js',
|
||||
)
|
||||
@@ -17,7 +17,6 @@ DIRS += [
|
||||
'heapsnapshot',
|
||||
'inspector',
|
||||
'jsbeautify',
|
||||
'jsinspector',
|
||||
'layout',
|
||||
'locales',
|
||||
'node-properties',
|
||||
|
||||
@@ -668,7 +668,8 @@ var NetworkHelper = {
|
||||
let host = httpActivity.hostname;
|
||||
|
||||
info.hsts = sss.isSecureHost(sss.HEADER_HSTS, host, flags);
|
||||
info.hpkp = sss.isSecureHost(sss.HEADER_HPKP, host, flags);
|
||||
// HPKP is no longer supported.
|
||||
info.hpkp = false;
|
||||
} else {
|
||||
DevToolsUtils.reportException("NetworkHelper.parseSecurityInfo",
|
||||
"Could not get HSTS/HPKP status as hostname is not available.");
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# Updating HTML5 parser code
|
||||
|
||||
Our html5 parser is based on the java html5 parser from [Validator.nu](http://about.validator.nu/htmlparser/) by Henri Sivonen. It has been adopted by Mozilla and further updated, and has been imported as a whole into the UXP tree to have an independent and maintainable source of it that doesn't rely on external sources.
|
||||
|
||||
## Stages
|
||||
Updating the parser code consists of 3 stages:
|
||||
- Make updates to the html parser source in java
|
||||
- Let the java parser regenerate part of its own code after the change
|
||||
- Translate the java source to C++
|
||||
|
||||
This process was best explained in the [following Bugzilla comment](https://bugzilla.mozilla.org/show_bug.cgi?id=1378079#c6), which explain how to add a new attribute name ("is") to html5, inserted in this document for convenience:
|
||||
|
||||
>> Is
|
||||
>> there any documentation on how to add a new nsHtml5AttributeName?
|
||||
>
|
||||
> I don't recall. I should get around to writing it.
|
||||
>
|
||||
>> Looks like
|
||||
>> I need to clone hg.mozilla.org/projects/htmlparser/ and generate a hash with
|
||||
>> it?
|
||||
>
|
||||
> Yes. Here's how:
|
||||
>
|
||||
> `cd parser/html/java/`
|
||||
> `make sync`
|
||||
>
|
||||
> Now you have a clone of [https://hg.mozilla.org/projects/htmlparser/](https://hg.mozilla.org/projects/htmlparser/) in > parser/html/java/htmlparser/
|
||||
>
|
||||
> `cd htmlparser/src/`
|
||||
> `$EDITOR nu/validator/htmlparser/impl/AttributeName.java`
|
||||
>
|
||||
> Search for the word "uncomment" and uncomment stuff according to the two comments that talk about uncommenting
|
||||
> Duplicate the declaration a normal attribute (nothings special in SVG mode, etc.). Let's use "alt", since it's the first one.
|
||||
> In the duplicate, replace ALT with IS and "alt" with "is".
|
||||
> Search for "ALT,", duplicate that line and change the duplicate to say "IS,"
|
||||
> Save.
|
||||
>
|
||||
> `javac nu/validator/htmlparser/impl/AttributeName.java`
|
||||
> `java nu.validator.htmlparser.impl.AttributeName`
|
||||
>
|
||||
> Copy and paste the output into nu/validator/htmlparser/impl/AttributeName.java replacing the text below the comment "START GENERATED CODE" and above the very last "}".
|
||||
> Recomment the bits that you uncommented earlier.
|
||||
> Save.
|
||||
>
|
||||
> `cd ../..` - Back to parser/html/java/
|
||||
> `make translate`
|
||||
|
||||
## Organizing commits
|
||||
|
||||
**The html5 parser code is fragile due to its generation and translation before being used as C++ in our tree. Do not touch or commit anything without a code peer nearby with knowledge of the parser and the commit process (at this moment that means Gaming4JC (@g4jc)), and communicate the changes thoroughly.**
|
||||
|
||||
To organize this properly in our repo, commits should be split up when making these kinds of changes:
|
||||
1. Commit your code edits to the html parser
|
||||
2. Regenerate java into a translation-ready source
|
||||
3. Commit
|
||||
4. Translate and regenerate C++ code
|
||||
5. Check a build to make sure the changes have the intended result
|
||||
6. Commit
|
||||
|
||||
This is needed because the source edit will sometimes be in parts that are self-generated and may otherwise be lost in generation noise, and because we want to keep a strict separation between commits resulting from developer work and those resulting from running scripts/automated processes.
|
||||
|
||||
|
||||
|
||||
+248
-12
@@ -1,4 +1,4 @@
|
||||
# UXP Coding Style Guide
|
||||
# UXP Coding Style Guide
|
||||
While our source tree is currently in a number of different Coding Styles and the general rule applies to adhere to style of surrounding code when you are making changes, it is our goal to unify the style of our source tree and making it adhere to a single style.
|
||||
This document describes the preferred style for new source code files and the preferred style to convert existing files to.
|
||||
|
||||
@@ -11,9 +11,9 @@ Our own managed and maintained code should adhere to this guide where possible o
|
||||
## General formatting rules
|
||||
The following formatting rules apply to all code:
|
||||
- Always use spaces for indentation, never use tabs!
|
||||
- Put a space between a keyword and parenthesis, e.g. `if (`.
|
||||
- Put a space between a keyword and parenthesis, e.g. `if (`. Do _not_ put a space between a function/type-assignment name and its parenthesis, e.g. `function(somevar)` or `int32_t(somevar)`.
|
||||
- Put a space between variables and operators, e.g. `a == b`.
|
||||
- Put a space after a comma or semicolon in variable lists, e.g. `function (a, b, c)` or `for (i = 1; i < 10; i++)`.
|
||||
- Put a space after a comma or semicolon in variable lists, e.g. `function(a, b, c)` or `for (i = 1; i < 10; i++)`.
|
||||
- Indentation of scopes is 2 spaces.
|
||||
- Indentation of long lines is variable-aligned or expression-aligned (see "long line wrapping")
|
||||
- Conditional defines are always placed on column 1. This is also true for nested defines.
|
||||
@@ -126,7 +126,7 @@ switch (variable) {
|
||||
code_for_1;
|
||||
code_for_1;
|
||||
break;
|
||||
case value2:
|
||||
case value2: // Comment describing 2 (alternative)
|
||||
code_for_2;
|
||||
code_for_2;
|
||||
// fallthrough
|
||||
@@ -225,15 +225,251 @@ somelongvariable = somelongexpression ?
|
||||
|
||||
## JavaScript
|
||||
Applies to `*.js` and `*.jsm`.
|
||||
### General formatting guidelines
|
||||
- Place function signatures on the same line as js object identifiers, and do not use named function syntax in that case:
|
||||
```JavaScript
|
||||
var myObject = {
|
||||
myIdentifier: function(var1, var2) {
|
||||
...
|
||||
},
|
||||
myIdentifier2: function() {
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
- Variable initializers should be placed on the variable declaration line if needed.
|
||||
```JavaScript
|
||||
var fwdCommand = document.getElementById("Browser:Forward");
|
||||
```
|
||||
```JavaScript
|
||||
var myObject = {
|
||||
myVariable: null,
|
||||
myString: "Something"
|
||||
}
|
||||
```
|
||||
- Avoid placing executed code on the expression line. Preferably brace executed code.
|
||||
|
||||
WRONG:
|
||||
```JavaScript
|
||||
if (a == b) do_something();
|
||||
if (a == b) { do_something(); }
|
||||
```
|
||||
DISCOURAGED:
|
||||
```JavaScript
|
||||
if (a == b)
|
||||
do_something();
|
||||
```
|
||||
CORRECT:
|
||||
```JavaScript
|
||||
if (a == b) {
|
||||
do_something();
|
||||
}
|
||||
```
|
||||
- Format in-lined variable functions as if you would format normal functions with the exception of closure: break with the opening brace, followed by code, and closing brace on its own line, followed immediately by any other variables passed in-line.
|
||||
```JavaScript
|
||||
appMenuButton.addEventListener("mousedown", function(event) {
|
||||
if (event.button == 0) {
|
||||
appMenuOpening = new Date();
|
||||
}
|
||||
}, false);
|
||||
```
|
||||
- Don't use a space between `{` `}` braces in empty js objects, `{` `}` braces in empty function scopes, or `[` `]` brackets in empty arrays.
|
||||
|
||||
### Flow control
|
||||
Flow control expressions should follow the following guidelines:
|
||||
- Scopes have their opening braces on the expression line
|
||||
- Scopes have their closing braces on a separate line, indent-aligned with the flow control expression
|
||||
- Any alternative flow control paths are generally started with an expression on the closing brace line. The logic behind this is that you should keep the flow control level visually the same for the executed code blocks with no breaks (a closing brace on its own line means "done").
|
||||
- Case statements are indented by 2 on a new line with the case expression on its own line.
|
||||
- Flow control default scopes are always placed at the bottom.
|
||||
|
||||
#### if..else
|
||||
`if..else` statements example:
|
||||
```JavaScript
|
||||
if (something == somethingelse) {
|
||||
true_case_code here;
|
||||
} else {
|
||||
false_case_code here;
|
||||
}
|
||||
|
||||
if (case1) {
|
||||
case1_code here;
|
||||
} else if (case2) {
|
||||
case2_code here;
|
||||
} else {
|
||||
other_case_code here;
|
||||
}
|
||||
|
||||
if (case1) {
|
||||
case1_code here;
|
||||
} else {
|
||||
if (case2) {
|
||||
case2_code here;
|
||||
}
|
||||
case2_and_other_code here;
|
||||
}
|
||||
```
|
||||
#### for
|
||||
`for` loop example:
|
||||
```JavaScript
|
||||
for (let i = 1; i < max; i++) {
|
||||
loop_code here;
|
||||
}
|
||||
|
||||
for (let i = 0;; i++) {
|
||||
do_something_with(i);
|
||||
if (i > max) break;
|
||||
...
|
||||
}
|
||||
```
|
||||
#### while
|
||||
`while` loop example:
|
||||
```JavaScript
|
||||
while (something == true) {
|
||||
loop_code here;
|
||||
}
|
||||
|
||||
do {
|
||||
execute_me_at_least_once();
|
||||
...
|
||||
} while (something == true);
|
||||
```
|
||||
#### switch..case
|
||||
`switch..case` flow control example:
|
||||
```JavaScript
|
||||
switch (variable) {
|
||||
case value1:
|
||||
// Comment describing 1
|
||||
code_for_1;
|
||||
code_for_1;
|
||||
break;
|
||||
case value2: // Comment describing 2 (alternative)
|
||||
code_for_2;
|
||||
code_for_2;
|
||||
// fallthrough
|
||||
case value3:
|
||||
case value4:
|
||||
code_for_3_and_4;
|
||||
break;
|
||||
default:
|
||||
code_for_default;
|
||||
code_for_default;
|
||||
}
|
||||
```
|
||||
Alternatively (braced):
|
||||
```JavaScript
|
||||
switch (variable) {
|
||||
case value1: {
|
||||
// Comment describing 1
|
||||
code_for_1;
|
||||
code_for_1;
|
||||
break;
|
||||
}
|
||||
case value2: {
|
||||
code_for_2;
|
||||
code_for_2;
|
||||
// fallthrough
|
||||
}
|
||||
case value3:
|
||||
case value4: {
|
||||
code_for_3_and_4;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
code_for_default;
|
||||
code_for_default;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### try..catch
|
||||
- When using `try..catch` blocks, the use of optional catch binding is discouraged. Please always include the error variable.
|
||||
|
||||
`try..catch` flow control examples:
|
||||
```JavaScript
|
||||
try {
|
||||
do_something();
|
||||
} catch(e) {
|
||||
handle_error(e);
|
||||
} finally {
|
||||
always();
|
||||
}
|
||||
|
||||
try {
|
||||
do_something();
|
||||
} catch(e) {}
|
||||
|
||||
try {
|
||||
do_something();
|
||||
} finally {
|
||||
always();
|
||||
}
|
||||
```
|
||||
DISCOURAGED
|
||||
```JavaScript
|
||||
try {
|
||||
do_something();
|
||||
} catch {
|
||||
// No error processing
|
||||
do_something_else();
|
||||
}
|
||||
```
|
||||
|
||||
### Long line wrapping
|
||||
If statements on a single line become overly long, they should be split into multiple lines:
|
||||
- Binary operators (including ternary) must be left on their original lines if the line break happens around the operator. The second line should start in the same column as the start of the expression in the first line.
|
||||
- Lists of variables (e.g. when calling or declaring a function) should be split at the wrapping column.
|
||||
- Long OOP calls should be split at the period with the period on the start of the new line, indented to the column of the first object, filling to the wrapping column where possible, including additional terms.
|
||||
- When breaking assignments/operations/logic, break right after the operator (`=`, `+`, `&&`, `||`, etc.)
|
||||
- **Don't break too rigorously**; short additions should be kept on the same line to keep things legible - use common sense and context for flexibility.
|
||||
|
||||
WRONG:
|
||||
```JavaScript
|
||||
somelongobjectname.somelongfunction(
|
||||
var1, var2, var3, var4, var5);
|
||||
|
||||
if (somelongvariable == somelongothervariable
|
||||
|| somelongvariable2 == somelongothervariable2) {
|
||||
|
||||
somelongvariable = somelongexpression ? somevalue1
|
||||
: somevalue2;
|
||||
|
||||
var iShouldntBeUsingThisLongOfAVarName
|
||||
= someValueToAdd + someValueToAdd + someValueToAdd
|
||||
+ someValueToAdd;
|
||||
|
||||
Cu.import("resource:///modules/DownloadsCommon.jsm", {}).
|
||||
DownloadsCommon.initializeAllDataLinks();
|
||||
```
|
||||
CORRECT:
|
||||
```JavaScript
|
||||
somelongobjectname.somelongfunction(var1, var2, var3,
|
||||
var4, var5);
|
||||
|
||||
if (somelongvariable == somelongothervariable ||
|
||||
somelongvariable2 == somelongothervariable2) {
|
||||
|
||||
somelongvariable = somelongexpression ?
|
||||
somevalue1 :
|
||||
somevalue2;
|
||||
|
||||
var iShouldntBeUsingThisLongOfAVarName =
|
||||
someValueToAdd + someValueToAdd + someValueToAdd +
|
||||
someValueToAdd;
|
||||
|
||||
Cu.import("resource:///modules/DownloadsCommon.jsm", {})
|
||||
.DownloadsCommon.initializeAllDataLinks();
|
||||
|
||||
let sessionStartup = Cc["@mozilla.org/browser/sessionstartup;1"]
|
||||
.getService(Ci.nsISessionStartup);
|
||||
```
|
||||
|
||||
## XUL and other XML-derivatives
|
||||
Applies to `*.xul`, `*.html`, `*.xhtml`.
|
||||
TODO
|
||||
## IDL
|
||||
Applies to `*.idl`, `*.xpidl` and `*.webidl`.
|
||||
|
||||
<!--stackedit_data:
|
||||
eyJoaXN0b3J5IjpbMjUzODYzMzMsMjg5MjUwODIsLTQzMjMzNz
|
||||
ExMSw4MzQ2MjYwNDksLTE5MDMyNzE5OTYsLTEwMTIwMjc3ODMs
|
||||
LTE4MzgzODM5MDIsODA5MjEzNTEyLC01Mzg0MjM4MDAsMzgyNj
|
||||
I3NDYzLDIwODYwMjIwODUsLTE1MjU5MjE2MjIsLTY1OTMzMTA0
|
||||
MCwtNzQwOTE5MDQ1LDE4Njc1NTQxNDJdfQ==
|
||||
-->
|
||||
TODO
|
||||
## Python-esque
|
||||
Applies to `*.py`, `mozbuild` etc.
|
||||
TODO
|
||||
@@ -119,12 +119,10 @@ static RedirEntry kRedirMap[] = {
|
||||
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
|
||||
nsIAboutModule::ALLOW_SCRIPT
|
||||
},
|
||||
#ifndef ANDROID
|
||||
{
|
||||
"profiles", "chrome://global/content/aboutProfiles.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT
|
||||
},
|
||||
#endif
|
||||
// about:srcdoc is unresolvable by specification. It is included here
|
||||
// because the security manager would disallow srcdoc iframes otherwise.
|
||||
{
|
||||
|
||||
@@ -860,6 +860,12 @@ nsDocShell::~nsDocShell()
|
||||
shPrivate->SetRootDocShell(nullptr);
|
||||
}
|
||||
|
||||
if (mContentViewer) {
|
||||
mContentViewer->Close(nullptr);
|
||||
mContentViewer->Destroy();
|
||||
mContentViewer = nullptr;
|
||||
}
|
||||
|
||||
if (--gDocShellCount == 0) {
|
||||
NS_IF_RELEASE(sURIFixup);
|
||||
}
|
||||
@@ -4943,13 +4949,11 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
if (errorClass == nsINSSErrorsService::ERROR_CLASS_BAD_CERT) {
|
||||
error.AssignLiteral("nssBadCert");
|
||||
|
||||
// If this is an HTTP Strict Transport Security host or a pinned host
|
||||
// and the certificate is bad, don't allow overrides (RFC 6797 section
|
||||
// 12.1, HPKP draft spec section 2.6).
|
||||
// If this is an HTTP Strict Transport Security host, don't allow
|
||||
// overrides (RFC 6797 section 12.1).
|
||||
uint32_t flags =
|
||||
UsePrivateBrowsing() ? nsISocketProvider::NO_PERMANENT_STORAGE : 0;
|
||||
bool isStsHost = false;
|
||||
bool isPinnedHost = false;
|
||||
if (XRE_IsParentProcess()) {
|
||||
nsCOMPtr<nsISiteSecurityService> sss =
|
||||
do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
|
||||
@@ -4957,9 +4961,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI,
|
||||
flags, nullptr, &isStsHost);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HPKP, aURI,
|
||||
flags, nullptr, &isPinnedHost);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else {
|
||||
mozilla::dom::ContentChild* cc =
|
||||
mozilla::dom::ContentChild::GetSingleton();
|
||||
@@ -4967,8 +4968,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
SerializeURI(aURI, uri);
|
||||
cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HSTS, uri, flags,
|
||||
&isStsHost);
|
||||
cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HPKP, uri, flags,
|
||||
&isPinnedHost);
|
||||
}
|
||||
|
||||
if (Preferences::GetBool(
|
||||
@@ -4976,11 +4975,9 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
cssClass.AssignLiteral("expertBadCert");
|
||||
}
|
||||
|
||||
// HSTS/pinning takes precedence over the expert bad cert pref. We
|
||||
// HSTS takes precedence over the expert bad cert pref. We
|
||||
// never want to show the "Add Exception" button for these sites.
|
||||
// In the future we should differentiate between an HSTS host and a
|
||||
// pinned host and display a more informative message to the user.
|
||||
if (isStsHost || isPinnedHost) {
|
||||
if (isStsHost) {
|
||||
cssClass.AssignLiteral("badStsCert");
|
||||
}
|
||||
|
||||
@@ -13356,24 +13353,9 @@ nsDocShell::EnsureScriptEnvironment()
|
||||
uint32_t chromeFlags;
|
||||
browserChrome->GetChromeFlags(&chromeFlags);
|
||||
|
||||
bool isModalContentWindow =
|
||||
(mItemType == typeContent) &&
|
||||
(chromeFlags & nsIWebBrowserChrome::CHROME_MODAL_CONTENT_WINDOW);
|
||||
// There can be various other content docshells associated with the
|
||||
// top-level window, like sidebars. Make sure that we only create an
|
||||
// nsGlobalModalWindow for the primary content shell.
|
||||
if (isModalContentWindow) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> primaryItem;
|
||||
nsresult rv =
|
||||
mTreeOwner->GetPrimaryContentShell(getter_AddRefs(primaryItem));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
isModalContentWindow = (primaryItem == this);
|
||||
}
|
||||
|
||||
// If our window is modal and we're not opened as chrome, make
|
||||
// this window a modal content window.
|
||||
mScriptGlobal =
|
||||
NS_NewScriptGlobalObject(mItemType == typeChrome, isModalContentWindow);
|
||||
mScriptGlobal = NS_NewScriptGlobalObject(mItemType == typeChrome);
|
||||
MOZ_ASSERT(mScriptGlobal);
|
||||
|
||||
mScriptGlobal->SetDocShell(this);
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
#include "nsDBusHandlerApp.h"
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
#include "nsExternalSharingAppService.h"
|
||||
#include "nsExternalURLHandlerService.h"
|
||||
#endif
|
||||
|
||||
// session history
|
||||
#include "nsSHEntry.h"
|
||||
@@ -85,10 +81,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(PlatformLocalHandlerApp_t)
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDBusHandlerApp)
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalSharingAppService)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalURLHandlerService)
|
||||
#endif
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ContentHandlerService, Init)
|
||||
|
||||
// session history
|
||||
@@ -114,10 +106,6 @@ NS_DEFINE_NAMED_CID(NS_LOCALHANDLERAPP_CID);
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
NS_DEFINE_NAMED_CID(NS_DBUSHANDLERAPP_CID);
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
NS_DEFINE_NAMED_CID(NS_EXTERNALSHARINGAPPSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_EXTERNALURLHANDLERSERVICE_CID);
|
||||
#endif
|
||||
NS_DEFINE_NAMED_CID(NS_SHENTRY_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SHTRANSACTION_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SHISTORY_CID);
|
||||
@@ -142,10 +130,6 @@ const mozilla::Module::CIDEntry kDocShellCIDs[] = {
|
||||
{ &kNS_LOCALHANDLERAPP_CID, false, nullptr, PlatformLocalHandlerApp_tConstructor },
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
{ &kNS_DBUSHANDLERAPP_CID, false, nullptr, nsDBusHandlerAppConstructor },
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
{ &kNS_EXTERNALSHARINGAPPSERVICE_CID, false, nullptr, nsExternalSharingAppServiceConstructor },
|
||||
{ &kNS_EXTERNALURLHANDLERSERVICE_CID, false, nullptr, nsExternalURLHandlerServiceConstructor },
|
||||
#endif
|
||||
{ &kNS_SHENTRY_CID, false, nullptr, nsSHEntryConstructor },
|
||||
{ &kNS_SHTRANSACTION_CID, false, nullptr, nsSHTransactionConstructor },
|
||||
@@ -183,9 +167,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "performance", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "plugins", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "serviceworkers", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
#ifndef ANDROID
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "profiles", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
#endif
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "srcdoc", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "support", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "telemetry", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
@@ -205,10 +187,6 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
|
||||
{ NS_LOCALHANDLERAPP_CONTRACTID, &kNS_LOCALHANDLERAPP_CID },
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
{ NS_DBUSHANDLERAPP_CONTRACTID, &kNS_DBUSHANDLERAPP_CID },
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
{ NS_EXTERNALSHARINGAPPSERVICE_CONTRACTID, &kNS_EXTERNALSHARINGAPPSERVICE_CID },
|
||||
{ NS_EXTERNALURLHANDLERSERVICE_CONTRACTID, &kNS_EXTERNALURLHANDLERSERVICE_CID },
|
||||
#endif
|
||||
{ NS_SHENTRY_CONTRACTID, &kNS_SHENTRY_CID },
|
||||
{ NS_SHTRANSACTION_CONTRACTID, &kNS_SHTRANSACTION_CID },
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef mozilla_AnimationComparator_h
|
||||
#define mozilla_AnimationComparator_h
|
||||
|
||||
#include "mozilla/dom/Animation.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
// Although this file is called AnimationComparator, we don't actually
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "mozilla/dom/AnimationEffectReadOnly.h"
|
||||
#include "mozilla/dom/AnimationEffectReadOnlyBinding.h"
|
||||
#include "mozilla/dom/Animation.h"
|
||||
#include "mozilla/AnimationUtils.h"
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
#include <initializer_list>
|
||||
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
class nsXPIDLString;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "mozilla/dom/CSSPseudoElement.h"
|
||||
#include "mozilla/dom/CSSPseudoElementBinding.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/KeyframeEffectBinding.h" // for ElementOrCSSPseudoElement class
|
||||
#include "mozilla/AnimationComparator.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "mozilla/dom/AnimationEffectTiming.h"
|
||||
#include "mozilla/dom/KeyframeEffectBinding.h"
|
||||
#include "mozilla/KeyframeUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDOMMutationObserver.h" // For nsAutoAnimationMutationBatch
|
||||
#include "nsIScriptError.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "mozilla/dom/KeyframeEffectReadOnly.h"
|
||||
|
||||
#include "mozilla/dom/Animation.h"
|
||||
#include "mozilla/dom/KeyframeAnimationOptionsBinding.h"
|
||||
// For UnrestrictedDoubleOrKeyframeAnimationOptions;
|
||||
#include "mozilla/dom/CSSPseudoElement.h"
|
||||
@@ -25,6 +26,7 @@
|
||||
#include "nsCSSPseudoElements.h" // For CSSPseudoElementType
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsRefreshDriver.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
||||
@@ -37,6 +37,11 @@ EXPORTS.mozilla += [
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'KeyframeEffect.cpp',
|
||||
'KeyframeEffectReadOnly.cpp',
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
'Animation.cpp',
|
||||
'AnimationEffectReadOnly.cpp',
|
||||
'AnimationEffectTiming.cpp',
|
||||
@@ -50,9 +55,7 @@ UNIFIED_SOURCES += [
|
||||
'DocumentTimeline.cpp',
|
||||
'EffectCompositor.cpp',
|
||||
'EffectSet.cpp',
|
||||
'KeyframeEffect.cpp',
|
||||
'KeyframeEffectParams.cpp',
|
||||
'KeyframeEffectReadOnly.cpp',
|
||||
'KeyframeUtils.cpp',
|
||||
'PendingAnimationTracker.cpp',
|
||||
'TimingParams.cpp',
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/dom/ArchiveRequestBinding.h"
|
||||
#include "mozilla/dom/File.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
USING_ARCHIVEREADER_NAMESPACE
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/File.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
USING_ARCHIVEREADER_NAMESPACE
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ EXPORTS.mozilla.dom.archivereader += [
|
||||
'ArchiveZipFile.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'ArchiveEvent.cpp',
|
||||
'ArchiveReader.cpp',
|
||||
'ArchiveRequest.cpp',
|
||||
|
||||
@@ -16,14 +16,12 @@ EXPORTS += [
|
||||
'AudioChannelService.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'AudioChannelAgent.cpp',
|
||||
'AudioChannelService.cpp',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base/',
|
||||
]
|
||||
LOCAL_INCLUDES += ['/dom/base/']
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
#define mozilla_dom_BlobSet_h
|
||||
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef CORSMode_h_
|
||||
#define CORSMode_h_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
enum CORSMode : uint8_t {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "mozilla/Base64.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "jsfriendapi.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "mozilla/dom/BindingDeclarations.h"
|
||||
#include "mozilla/dom/ChromeUtilsBinding.h"
|
||||
#include "mozilla/dom/ThreadSafeChromeUtilsBinding.h"
|
||||
#include "mozilla/dom/UnionTypes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
#include "mozilla/dom/CustomElementRegistry.h"
|
||||
|
||||
#include "mozilla/dom/CustomElementRegistryBinding.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/HTMLElementBinding.h"
|
||||
#include "mozilla/dom/WebComponentsBinding.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIParserService.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsNetCID.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef DocGroup_h
|
||||
#define DocGroup_h
|
||||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsIPrincipal.h"
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef GroupedSHistory_h
|
||||
#define GroupedSHistory_h
|
||||
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
|
||||
#include "nsIFrameLoader.h"
|
||||
#include "nsIGroupedSHistory.h"
|
||||
#include "nsIPartialSHistory.h"
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
* animating */
|
||||
|
||||
#include "ImageTracker.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsAppRunner.h" // for XRE_IsContentProcess
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#ifndef mozilla_dom_ImageTracker
|
||||
#define mozilla_dom_ImageTracker
|
||||
|
||||
#include "imgIRequest.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#ifndef mozilla_dom_MutableBlobStorage_h
|
||||
#define mozilla_dom_MutableBlobStorage_h
|
||||
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsProxyRelease.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "prio.h"
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "MutableBlobStreamListener.h"
|
||||
#include "MutableBlobStorage.h"
|
||||
#include "nsIInputStream.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -37,10 +37,7 @@
|
||||
#include "mozilla/dom/PowerManager.h"
|
||||
#include "mozilla/dom/WakeLock.h"
|
||||
#include "mozilla/dom/power/PowerManagerService.h"
|
||||
#include "mozilla/dom/FlyWebPublishedServer.h"
|
||||
#include "mozilla/dom/FlyWebService.h"
|
||||
#include "mozilla/dom/Permissions.h"
|
||||
#include "mozilla/dom/Presentation.h"
|
||||
#include "mozilla/dom/ServiceWorkerContainer.h"
|
||||
#include "mozilla/dom/StorageManager.h"
|
||||
#include "mozilla/dom/TCPSocket.h"
|
||||
@@ -67,8 +64,6 @@
|
||||
#include "nsIAppsService.h"
|
||||
#include "mozIApplication.h"
|
||||
#include "WidgetUtils.h"
|
||||
#include "nsIPresentationService.h"
|
||||
|
||||
#include "mozilla/dom/MediaDevices.h"
|
||||
#include "MediaManager.h"
|
||||
|
||||
@@ -218,7 +213,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator)
|
||||
#ifdef MOZ_EME
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMediaKeySystemAccessManager)
|
||||
#endif
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPresentation)
|
||||
#ifdef MOZ_GAMEPAD
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGamepadServiceTest)
|
||||
#endif
|
||||
@@ -284,10 +278,6 @@ Navigator::Invalidate()
|
||||
mTimeManager = nullptr;
|
||||
}
|
||||
|
||||
if (mPresentation) {
|
||||
mPresentation = nullptr;
|
||||
}
|
||||
|
||||
mServiceWorkerContainer = nullptr;
|
||||
|
||||
#ifdef MOZ_EME
|
||||
@@ -1364,41 +1354,6 @@ Navigator::GetBattery(ErrorResult& aRv)
|
||||
return mBatteryPromise;
|
||||
}
|
||||
|
||||
already_AddRefed<Promise>
|
||||
Navigator::PublishServer(const nsAString& aName,
|
||||
const FlyWebPublishOptions& aOptions,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
RefPtr<FlyWebService> service = FlyWebService::GetOrCreate();
|
||||
if (!service) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<FlyWebPublishPromise> mozPromise =
|
||||
service->PublishServer(aName, aOptions, mWindow);
|
||||
MOZ_ASSERT(mozPromise);
|
||||
|
||||
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(mWindow);
|
||||
ErrorResult result;
|
||||
RefPtr<Promise> domPromise = Promise::Create(global, result);
|
||||
if (result.Failed()) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mozPromise->Then(AbstractThread::MainThread(),
|
||||
__func__,
|
||||
[domPromise] (FlyWebPublishedServer* aServer) {
|
||||
domPromise->MaybeResolve(aServer);
|
||||
},
|
||||
[domPromise] (nsresult aStatus) {
|
||||
domPromise->MaybeReject(aStatus);
|
||||
});
|
||||
|
||||
return domPromise.forget();
|
||||
}
|
||||
|
||||
PowerManager*
|
||||
Navigator::GetMozPower(ErrorResult& aRv)
|
||||
{
|
||||
@@ -1931,19 +1886,5 @@ Navigator::RequestMediaKeySystemAccess(const nsAString& aKeySystem,
|
||||
}
|
||||
#endif
|
||||
|
||||
Presentation*
|
||||
Navigator::GetPresentation(ErrorResult& aRv)
|
||||
{
|
||||
if (!mPresentation) {
|
||||
if (!mWindow) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
mPresentation = Presentation::Create(mWindow);
|
||||
}
|
||||
|
||||
return mPresentation;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
@@ -39,8 +39,6 @@ class WakeLock;
|
||||
class ArrayBufferViewOrBlobOrStringOrFormData;
|
||||
class ServiceWorkerContainer;
|
||||
class DOMRequest;
|
||||
struct FlyWebPublishOptions;
|
||||
struct FlyWebFilter;
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -74,7 +72,6 @@ class Connection;
|
||||
} // namespace network
|
||||
|
||||
class PowerManager;
|
||||
class Presentation;
|
||||
class LegacyMozTCPSocket;
|
||||
class StorageManager;
|
||||
|
||||
@@ -141,9 +138,6 @@ public:
|
||||
Geolocation* GetGeolocation(ErrorResult& aRv);
|
||||
Promise* GetBattery(ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<Promise> PublishServer(const nsAString& aName,
|
||||
const FlyWebPublishOptions& aOptions,
|
||||
ErrorResult& aRv);
|
||||
static void AppName(nsAString& aAppName, bool aUsePrefOverriddenValue);
|
||||
|
||||
static nsresult GetPlatform(nsAString& aPlatform,
|
||||
@@ -210,8 +204,6 @@ public:
|
||||
system::AudioChannelManager* GetMozAudioChannelManager(ErrorResult& aRv);
|
||||
#endif // MOZ_AUDIO_CHANNEL_MANAGER
|
||||
|
||||
Presentation* GetPresentation(ErrorResult& aRv);
|
||||
|
||||
bool SendBeacon(const nsAString& aUrl,
|
||||
const Nullable<ArrayBufferViewOrBlobOrStringOrFormData>& aData,
|
||||
ErrorResult& aRv);
|
||||
@@ -288,7 +280,6 @@ private:
|
||||
RefPtr<time::TimeManager> mTimeManager;
|
||||
RefPtr<ServiceWorkerContainer> mServiceWorkerContainer;
|
||||
nsCOMPtr<nsPIDOMWindowInner> mWindow;
|
||||
RefPtr<Presentation> mPresentation;
|
||||
#ifdef MOZ_GAMEPAD
|
||||
RefPtr<GamepadServiceTest> mGamepadServiceTest;
|
||||
#endif
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/Unused.h"
|
||||
|
||||
#include "nsNodeInfoManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define mozilla_dom_Pose_h
|
||||
|
||||
#include "nsWrapperCache.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
#ifndef TabGroup_h
|
||||
#define TabGroup_h
|
||||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsTHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#include "mozilla/RefPtr.h"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIHttpChannelInternal.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsILoadContext.h"
|
||||
#include "nsIPrincipal.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "TimeoutHandler.h"
|
||||
#include "nsJSUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,9 +7,11 @@
|
||||
#ifndef mozilla_dom_timeout_handler_h
|
||||
#define mozilla_dom_timeout_handler_h
|
||||
|
||||
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsITimeoutHandler.h"
|
||||
#include "nsString.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef TimerClamping_h___
|
||||
#define TimerClamping_h___
|
||||
|
||||
#include <math.h>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class TimerClamping
|
||||
|
||||
+2
-2
@@ -225,7 +225,7 @@ EXPORTS.mozilla.dom += [
|
||||
'WindowOrientationObserver.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'AnonymousContent.cpp',
|
||||
'Attr.cpp',
|
||||
'BarProps.cpp',
|
||||
@@ -376,7 +376,7 @@ UNIFIED_SOURCES += [
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WEBRTC']:
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'nsDOMDataChannel.cpp',
|
||||
]
|
||||
|
||||
|
||||
@@ -1526,6 +1526,40 @@ nsAttrValue::ParseIntWithFallback(const nsAString& aString, int32_t aDefault,
|
||||
SetIntValueAndType(val, eInteger, nonStrict ? &aString : nullptr);
|
||||
}
|
||||
|
||||
void
|
||||
nsAttrValue::ParseClampedNonNegativeInt(const nsAString& aString,
|
||||
int32_t aDefault, int32_t aMin,
|
||||
int32_t aMax)
|
||||
{
|
||||
ResetIfSet();
|
||||
|
||||
nsContentUtils::ParseHTMLIntegerResultFlags result;
|
||||
int32_t val = nsContentUtils::ParseHTMLInteger(aString, &result);
|
||||
bool nonStrict = (result & nsContentUtils::eParseHTMLInteger_IsPercent) ||
|
||||
(result & nsContentUtils::eParseHTMLInteger_NonStandard) ||
|
||||
(result & nsContentUtils::eParseHTMLInteger_DidNotConsumeAllInput);
|
||||
|
||||
if (result & nsContentUtils::eParseHTMLInteger_ErrorOverflow) {
|
||||
if (result & nsContentUtils::eParseHTMLInteger_Negative) {
|
||||
val = aDefault;
|
||||
} else {
|
||||
val = aMax;
|
||||
}
|
||||
nonStrict = true;
|
||||
} else if ((result & nsContentUtils::eParseHTMLInteger_Error) || val < 0) {
|
||||
val = aDefault;
|
||||
nonStrict = true;
|
||||
} else if (val < aMin) {
|
||||
val = aMin;
|
||||
nonStrict = true;
|
||||
} else if (val > aMax) {
|
||||
val = aMax;
|
||||
nonStrict = true;
|
||||
}
|
||||
|
||||
SetIntValueAndType(val, eInteger, nonStrict ? &aString : nullptr);
|
||||
}
|
||||
|
||||
bool
|
||||
nsAttrValue::ParseNonNegativeIntValue(const nsAString& aString)
|
||||
{
|
||||
|
||||
@@ -362,6 +362,19 @@ public:
|
||||
*/
|
||||
bool ParseNonNegativeIntValue(const nsAString& aString);
|
||||
|
||||
/**
|
||||
* Parse a string value into a clamped non-negative integer.
|
||||
* This method follows the rules for parsing non-negative integer from:
|
||||
* https://html.spec.whatwg.org/multipage/infrastructure.html#clamped-to-the-range
|
||||
*
|
||||
* @param aString the string to parse
|
||||
* @param aDefault value to return for negative or invalid values
|
||||
* @param aMin minimum value
|
||||
* @param aMax maximum value
|
||||
*/
|
||||
void ParseClampedNonNegativeInt(const nsAString& aString, int32_t aDefault,
|
||||
int32_t aMin, int32_t aMax);
|
||||
|
||||
/**
|
||||
* Parse a string value into a positive integer.
|
||||
* This method follows the rules for parsing non-negative integer from:
|
||||
|
||||
@@ -1080,6 +1080,7 @@ nsContentUtils::ParseHTMLInteger(const nsAString& aValue,
|
||||
int sign = 1;
|
||||
if (*iter == char16_t('-')) {
|
||||
sign = -1;
|
||||
result |= eParseHTMLInteger_Negative;
|
||||
++iter;
|
||||
} else if (*iter == char16_t('+')) {
|
||||
result |= eParseHTMLInteger_NonStandard;
|
||||
|
||||
@@ -444,7 +444,9 @@ public:
|
||||
// Set if one or more error flags were set.
|
||||
eParseHTMLInteger_Error = 1 << 3,
|
||||
eParseHTMLInteger_ErrorNoValue = 1 << 4,
|
||||
eParseHTMLInteger_ErrorOverflow = 1 << 5
|
||||
eParseHTMLInteger_ErrorOverflow = 1 << 5,
|
||||
// Use this flag to detect the difference between overflow and underflow
|
||||
eParseHTMLInteger_Negative = 1 << 6,
|
||||
};
|
||||
static int32_t ParseHTMLInteger(const nsAString& aValue,
|
||||
ParseHTMLIntegerResultFlags *aResult);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "nsDOMMutationObserver.h"
|
||||
|
||||
#include "mozilla/AnimationTarget.h"
|
||||
#include "mozilla/CycleCollectedJSContext.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/OwningNonNull.h"
|
||||
|
||||
@@ -29,6 +30,9 @@ using mozilla::dom::TreeOrderComparator;
|
||||
using mozilla::dom::Animation;
|
||||
using mozilla::dom::Element;
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
AutoTArray<RefPtr<nsDOMMutationObserver>, 4>*
|
||||
nsDOMMutationObserver::sScheduledMutationObservers = nullptr;
|
||||
|
||||
|
||||
@@ -3577,7 +3577,8 @@ nsDOMWindowUtils::IsNodeDisabledForEvents(nsIDOMNode* aNode, bool* aRetVal)
|
||||
while (node) {
|
||||
if (node->IsNodeOfType(nsINode::eHTML_FORM_CONTROL)) {
|
||||
nsCOMPtr<nsIFormControl> fc = do_QueryInterface(node);
|
||||
if (fc && fc->IsDisabledForEvents(eVoidEvent)) {
|
||||
WidgetEvent event(true, eVoidEvent);
|
||||
if (fc && fc->IsDisabledForEvents(&event)) {
|
||||
*aRetVal = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ DEPRECATED_OPERATION(UseOfCaptureEvents)
|
||||
DEPRECATED_OPERATION(UseOfReleaseEvents)
|
||||
DEPRECATED_OPERATION(UseOfDOM3LoadMethod)
|
||||
DEPRECATED_OPERATION(ChromeUseOfDOM3LoadMethod)
|
||||
DEPRECATED_OPERATION(ShowModalDialog)
|
||||
DEPRECATED_OPERATION(Window_Content)
|
||||
DEPRECATED_OPERATION(SyncXMLHttpRequest)
|
||||
DEPRECATED_OPERATION(DataContainerEvent)
|
||||
|
||||
@@ -166,7 +166,6 @@
|
||||
#include "mozilla/dom/HTMLIFrameElement.h"
|
||||
#include "mozilla/dom/HTMLImageElement.h"
|
||||
#include "mozilla/dom/MediaSource.h"
|
||||
#include "mozilla/dom/FlyWebService.h"
|
||||
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
@@ -8369,13 +8368,6 @@ nsDocument::CanSavePresentation(nsIRequest *aNewRequest)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Don't save presentation if there are active FlyWeb connections or FlyWeb
|
||||
// servers.
|
||||
FlyWebService* flyWebService = FlyWebService::GetExisting();
|
||||
if (flyWebService && flyWebService->HasConnectionOrServer(win->WindowID())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mSubDocuments) {
|
||||
for (auto iter = mSubDocuments->Iter(); !iter.Done(); iter.Next()) {
|
||||
auto entry = static_cast<SubDocMapEntry*>(iter.Get());
|
||||
|
||||
@@ -1261,6 +1261,15 @@ nsFocusManager::SetFocusInner(nsIContent* aNewContent, int32_t aFlags,
|
||||
isElementInActiveWindow = (mActiveWindow && newRootWindow == mActiveWindow);
|
||||
}
|
||||
|
||||
// Exit fullscreen if a website focuses another window
|
||||
if (!isElementInActiveWindow && aFlags & FLAG_RAISE) {
|
||||
if (nsIDocument* doc = mActiveWindow ? mActiveWindow->GetDoc() : nullptr) {
|
||||
if (doc && doc->GetFullscreenElement()) {
|
||||
nsIDocument::AsyncExitFullscreen(doc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Exit fullscreen if we're focusing a windowed plugin on a non-MacOSX
|
||||
// system. We don't control event dispatch to windowed plugins on non-MacOSX,
|
||||
// so we can't display the "Press ESC to leave fullscreen mode" warning on
|
||||
|
||||
+4
-315
@@ -909,7 +909,6 @@ nsPIDOMWindow<T>::nsPIDOMWindow(nsPIDOMWindowOuter *aOuterWindow)
|
||||
mMayHaveMouseEnterLeaveEventListener(false),
|
||||
mMayHavePointerEnterLeaveEventListener(false),
|
||||
mInnerObjectsFreed(false),
|
||||
mIsModalContentWindow(false),
|
||||
mIsActive(false), mIsBackground(false),
|
||||
mMediaSuspend(Preferences::GetBool("media.block-autoplay-until-in-foreground", true) ?
|
||||
nsISuspendedTypes::SUSPENDED_BLOCK : nsISuspendedTypes::NONE_SUSPENDED),
|
||||
@@ -1957,7 +1956,6 @@ nsGlobalWindow::CleanUp()
|
||||
}
|
||||
|
||||
mArguments = nullptr;
|
||||
mDialogArguments = nullptr;
|
||||
|
||||
CleanupCachedXBLHandlers(this);
|
||||
|
||||
@@ -2195,7 +2193,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGlobalWindow)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mControllers)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mArguments)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDialogArguments)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mReturnValue)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNavigator)
|
||||
|
||||
@@ -2274,7 +2271,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGlobalWindow)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mControllers)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mArguments)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mDialogArguments)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mReturnValue)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mNavigator)
|
||||
|
||||
@@ -3019,8 +3015,6 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
||||
} else {
|
||||
if (thisChrome) {
|
||||
newInnerWindow = nsGlobalChromeWindow::Create(this);
|
||||
} else if (mIsModalContentWindow) {
|
||||
newInnerWindow = nsGlobalModalWindow::Create(this);
|
||||
} else {
|
||||
newInnerWindow = nsGlobalWindow::Create(this);
|
||||
}
|
||||
@@ -3871,31 +3865,16 @@ nsGlobalWindow::SetArguments(nsIArray *aArguments)
|
||||
MOZ_ASSERT(IsOuterWindow());
|
||||
nsresult rv;
|
||||
|
||||
// Historically, we've used the same machinery to handle openDialog arguments
|
||||
// (exposed via window.arguments) and showModalDialog arguments (exposed via
|
||||
// window.dialogArguments), even though the former is XUL-only and uses an XPCOM
|
||||
// array while the latter is web-exposed and uses an arbitrary JS value.
|
||||
// Moreover, per-spec |dialogArguments| is a property of the browsing context
|
||||
// (outer), whereas |arguments| lives on the inner.
|
||||
//
|
||||
// We've now mostly separated them, but the difference is still opaque to
|
||||
// nsWindowWatcher (the caller of SetArguments in this little back-and-forth
|
||||
// embedding waltz we do here).
|
||||
//
|
||||
// So we need to demultiplex the two cases here.
|
||||
nsGlobalWindow *currentInner = GetCurrentInnerWindowInternal();
|
||||
if (mIsModalContentWindow) {
|
||||
// nsWindowWatcher blindly converts the original nsISupports into an array
|
||||
// of length 1. We need to recover it, and then cast it back to the concrete
|
||||
// object we know it to be.
|
||||
nsCOMPtr<nsISupports> supports = do_QueryElementAt(aArguments, 0, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mDialogArguments = static_cast<DialogValueHolder*>(supports.get());
|
||||
} else {
|
||||
mArguments = aArguments;
|
||||
rv = currentInner->DefineArgumentsProperty(aArguments);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
mArguments = aArguments;
|
||||
rv = currentInner->DefineArgumentsProperty(aArguments);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -3904,7 +3883,6 @@ nsresult
|
||||
nsGlobalWindow::DefineArgumentsProperty(nsIArray *aArguments)
|
||||
{
|
||||
MOZ_ASSERT(IsInnerWindow());
|
||||
MOZ_ASSERT(!mIsModalContentWindow); // Handled separately.
|
||||
|
||||
nsIScriptContext *ctx = GetOuterWindowInternal()->mContext;
|
||||
NS_ENSURE_TRUE(aArguments && ctx, NS_ERROR_NOT_INITIALIZED);
|
||||
@@ -5040,21 +5018,6 @@ nsGlobalWindow::IsPrivilegedChromeWindow(JSContext* aCx, JSObject* aObj)
|
||||
nsContentUtils::ObjectPrincipal(aObj) == nsContentUtils::GetSystemPrincipal();
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
nsGlobalWindow::IsShowModalDialogEnabled(JSContext*, JSObject*)
|
||||
{
|
||||
static bool sAddedPrefCache = false;
|
||||
static bool sIsDisabled;
|
||||
static const char sShowModalDialogPref[] = "dom.disable_window_showModalDialog";
|
||||
|
||||
if (!sAddedPrefCache) {
|
||||
Preferences::AddBoolVarCache(&sIsDisabled, sShowModalDialogPref, false);
|
||||
sAddedPrefCache = true;
|
||||
}
|
||||
|
||||
return !sIsDisabled && !XRE_IsContentProcess();
|
||||
}
|
||||
|
||||
nsIDOMOfflineResourceList*
|
||||
nsGlobalWindow::GetApplicationCache(ErrorResult& aError)
|
||||
{
|
||||
@@ -9741,126 +9704,6 @@ nsGlobalWindow::ConvertDialogOptions(const nsAString& aOptions,
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<nsIVariant>
|
||||
nsGlobalWindow::ShowModalDialogOuter(const nsAString& aUrl,
|
||||
nsIVariant* aArgument,
|
||||
const nsAString& aOptions,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(IsOuterWindow());
|
||||
|
||||
if (mDoc) {
|
||||
mDoc->WarnOnceAbout(nsIDocument::eShowModalDialog);
|
||||
}
|
||||
|
||||
if (!IsShowModalDialogEnabled()) {
|
||||
aError.Throw(NS_ERROR_NOT_AVAILABLE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<DialogValueHolder> argHolder =
|
||||
new DialogValueHolder(&aSubjectPrincipal, aArgument);
|
||||
|
||||
// Before bringing up the window/dialog, unsuppress painting and flush
|
||||
// pending reflows.
|
||||
EnsureReflowFlushAndPaint();
|
||||
|
||||
if (!AreDialogsEnabled()) {
|
||||
// We probably want to keep throwing here; silently doing nothing is a bit
|
||||
// weird given the typical use cases of showModalDialog().
|
||||
aError.Throw(NS_ERROR_NOT_AVAILABLE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (ShouldPromptToBlockDialogs() && !ConfirmDialogIfNeeded()) {
|
||||
aError.Throw(NS_ERROR_NOT_AVAILABLE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> dlgWin;
|
||||
nsAutoString options(NS_LITERAL_STRING("-moz-internal-modal=1,status=1"));
|
||||
|
||||
ConvertDialogOptions(aOptions, options);
|
||||
|
||||
options.AppendLiteral(",scrollbars=1,centerscreen=1,resizable=0");
|
||||
|
||||
EnterModalState();
|
||||
uint32_t oldMicroTaskLevel = nsContentUtils::MicroTaskLevel();
|
||||
nsContentUtils::SetMicroTaskLevel(0);
|
||||
aError = OpenInternal(aUrl, EmptyString(), options,
|
||||
false, // aDialog
|
||||
true, // aContentModal
|
||||
true, // aCalledNoScript
|
||||
true, // aDoJSFixups
|
||||
true, // aNavigate
|
||||
nullptr, argHolder, // args
|
||||
nullptr, // aLoadInfo
|
||||
false, // aForceNoOpener
|
||||
getter_AddRefs(dlgWin));
|
||||
nsContentUtils::SetMicroTaskLevel(oldMicroTaskLevel);
|
||||
LeaveModalState();
|
||||
if (aError.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMModalContentWindow> dialog = do_QueryInterface(dlgWin);
|
||||
if (!dialog) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIVariant> retVal;
|
||||
aError = dialog->GetReturnValue(getter_AddRefs(retVal));
|
||||
MOZ_ASSERT(!aError.Failed());
|
||||
|
||||
return retVal.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<nsIVariant>
|
||||
nsGlobalWindow::ShowModalDialog(const nsAString& aUrl, nsIVariant* aArgument,
|
||||
const nsAString& aOptions,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
FORWARD_TO_OUTER_OR_THROW(ShowModalDialogOuter,
|
||||
(aUrl, aArgument, aOptions, aSubjectPrincipal,
|
||||
aError), aError, nullptr);
|
||||
}
|
||||
|
||||
void
|
||||
nsGlobalWindow::ShowModalDialog(JSContext* aCx, const nsAString& aUrl,
|
||||
JS::Handle<JS::Value> aArgument,
|
||||
const nsAString& aOptions,
|
||||
JS::MutableHandle<JS::Value> aRetval,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
MOZ_ASSERT(IsInnerWindow());
|
||||
|
||||
nsCOMPtr<nsIVariant> args;
|
||||
aError = nsContentUtils::XPConnect()->JSToVariant(aCx,
|
||||
aArgument,
|
||||
getter_AddRefs(args));
|
||||
if (aError.Failed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIVariant> retVal =
|
||||
ShowModalDialog(aUrl, args, aOptions, aSubjectPrincipal, aError);
|
||||
if (aError.Failed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
JS::Rooted<JS::Value> result(aCx);
|
||||
if (retVal) {
|
||||
aError = nsContentUtils::XPConnect()->VariantToJS(aCx,
|
||||
FastGetGlobalJSObject(),
|
||||
retVal, aRetval);
|
||||
} else {
|
||||
aRetval.setNull();
|
||||
}
|
||||
}
|
||||
|
||||
class ChildCommandDispatcher : public Runnable
|
||||
{
|
||||
public:
|
||||
@@ -14613,70 +14456,6 @@ nsGlobalChromeWindow::TakeOpenerForInitialContentBrowser(mozIDOMWindowProxy** aO
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsGlobalModalWindow implementation
|
||||
|
||||
// QueryInterface implementation for nsGlobalModalWindow
|
||||
NS_INTERFACE_MAP_BEGIN(nsGlobalModalWindow)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMModalContentWindow)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsGlobalWindow)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsGlobalModalWindow, nsGlobalWindow)
|
||||
NS_IMPL_RELEASE_INHERITED(nsGlobalModalWindow, nsGlobalWindow)
|
||||
|
||||
|
||||
void
|
||||
nsGlobalWindow::GetDialogArgumentsOuter(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aRetval,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(IsOuterWindow());
|
||||
MOZ_ASSERT(IsModalContentWindow(),
|
||||
"This should only be called on modal windows!");
|
||||
|
||||
if (!mDialogArguments) {
|
||||
MOZ_ASSERT(mIsClosed, "This window should be closed!");
|
||||
aRetval.setUndefined();
|
||||
return;
|
||||
}
|
||||
|
||||
// This does an internal origin check, and returns undefined if the subject
|
||||
// does not subsumes the origin of the arguments.
|
||||
JS::Rooted<JSObject*> wrapper(aCx, GetWrapper());
|
||||
JSAutoCompartment ac(aCx, wrapper);
|
||||
mDialogArguments->Get(aCx, wrapper, &aSubjectPrincipal, aRetval, aError);
|
||||
}
|
||||
|
||||
void
|
||||
nsGlobalWindow::GetDialogArguments(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aRetval,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
FORWARD_TO_OUTER_OR_THROW(GetDialogArgumentsOuter,
|
||||
(aCx, aRetval, aSubjectPrincipal, aError),
|
||||
aError, );
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<nsGlobalModalWindow>
|
||||
nsGlobalModalWindow::Create(nsGlobalWindow *aOuterWindow)
|
||||
{
|
||||
RefPtr<nsGlobalModalWindow> window = new nsGlobalModalWindow(aOuterWindow);
|
||||
window->InitWasOffline();
|
||||
return window.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalModalWindow::GetDialogArguments(nsIVariant **aArguments)
|
||||
{
|
||||
FORWARD_TO_OUTER_MODAL_CONTENT_WINDOW(GetDialogArguments, (aArguments),
|
||||
NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
// This does an internal origin check, and returns undefined if the subject
|
||||
// does not subsumes the origin of the arguments.
|
||||
return mDialogArguments->Get(nsContentUtils::SubjectPrincipal(), aArguments);
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<nsGlobalWindow>
|
||||
nsGlobalWindow::Create(nsGlobalWindow *aOuterWindow)
|
||||
{
|
||||
@@ -14691,96 +14470,6 @@ nsGlobalWindow::InitWasOffline()
|
||||
mWasOffline = NS_IsOffline();
|
||||
}
|
||||
|
||||
void
|
||||
nsGlobalWindow::GetReturnValueOuter(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aReturnValue,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(IsOuterWindow());
|
||||
MOZ_ASSERT(IsModalContentWindow(),
|
||||
"This should only be called on modal windows!");
|
||||
|
||||
if (mReturnValue) {
|
||||
JS::Rooted<JSObject*> wrapper(aCx, GetWrapper());
|
||||
JSAutoCompartment ac(aCx, wrapper);
|
||||
mReturnValue->Get(aCx, wrapper, &aSubjectPrincipal, aReturnValue, aError);
|
||||
} else {
|
||||
aReturnValue.setUndefined();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsGlobalWindow::GetReturnValue(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aReturnValue,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
FORWARD_TO_OUTER_OR_THROW(GetReturnValueOuter,
|
||||
(aCx, aReturnValue, aSubjectPrincipal, aError),
|
||||
aError, );
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalModalWindow::GetReturnValue(nsIVariant **aRetVal)
|
||||
{
|
||||
FORWARD_TO_OUTER_MODAL_CONTENT_WINDOW(GetReturnValue, (aRetVal), NS_OK);
|
||||
|
||||
if (!mReturnValue) {
|
||||
nsCOMPtr<nsIVariant> variant = CreateVoidVariant();
|
||||
variant.forget(aRetVal);
|
||||
return NS_OK;
|
||||
}
|
||||
return mReturnValue->Get(nsContentUtils::SubjectPrincipal(), aRetVal);
|
||||
}
|
||||
|
||||
void
|
||||
nsGlobalWindow::SetReturnValueOuter(JSContext* aCx,
|
||||
JS::Handle<JS::Value> aReturnValue,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(IsOuterWindow());
|
||||
MOZ_ASSERT(IsModalContentWindow(),
|
||||
"This should only be called on modal windows!");
|
||||
|
||||
nsCOMPtr<nsIVariant> returnValue;
|
||||
aError =
|
||||
nsContentUtils::XPConnect()->JSToVariant(aCx, aReturnValue,
|
||||
getter_AddRefs(returnValue));
|
||||
if (!aError.Failed()) {
|
||||
mReturnValue = new DialogValueHolder(&aSubjectPrincipal, returnValue);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsGlobalWindow::SetReturnValue(JSContext* aCx,
|
||||
JS::Handle<JS::Value> aReturnValue,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
FORWARD_TO_OUTER_OR_THROW(SetReturnValueOuter,
|
||||
(aCx, aReturnValue, aSubjectPrincipal, aError),
|
||||
aError, );
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalModalWindow::SetReturnValue(nsIVariant *aRetVal)
|
||||
{
|
||||
FORWARD_TO_OUTER_MODAL_CONTENT_WINDOW(SetReturnValue, (aRetVal), NS_OK);
|
||||
|
||||
mReturnValue = new DialogValueHolder(nsContentUtils::SubjectPrincipal(),
|
||||
aRetVal);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool
|
||||
nsGlobalWindow::IsModalContentWindow(JSContext* aCx, JSObject* aGlobal)
|
||||
{
|
||||
return xpc::WindowOrNull(aGlobal)->IsModalContentWindow();
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
int16_t
|
||||
nsGlobalWindow::Orientation(CallerType aCallerType) const
|
||||
|
||||
@@ -458,9 +458,6 @@ public:
|
||||
|
||||
static bool IsPrivilegedChromeWindow(JSContext* /* unused */, JSObject* aObj);
|
||||
|
||||
static bool IsShowModalDialogEnabled(JSContext* /* unused */ = nullptr,
|
||||
JSObject* /* unused */ = nullptr);
|
||||
|
||||
bool DoResolve(JSContext* aCx, JS::Handle<JSObject*> aObj,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JS::PropertyDescriptor> aDesc);
|
||||
@@ -583,9 +580,6 @@ public:
|
||||
return mIsChrome;
|
||||
}
|
||||
|
||||
using nsPIDOMWindow::IsModalContentWindow;
|
||||
static bool IsModalContentWindow(JSContext* aCx, JSObject* aGlobal);
|
||||
|
||||
// GetScrollFrame does not flush. Callers should do it themselves as needed,
|
||||
// depending on which info they actually want off the scrollable frame.
|
||||
nsIScrollableFrame *GetScrollFrame();
|
||||
@@ -950,12 +944,6 @@ public:
|
||||
mozilla::ErrorResult& aRv);
|
||||
void PrintOuter(mozilla::ErrorResult& aError);
|
||||
void Print(mozilla::ErrorResult& aError);
|
||||
void ShowModalDialog(JSContext* aCx, const nsAString& aUrl,
|
||||
JS::Handle<JS::Value> aArgument,
|
||||
const nsAString& aOptions,
|
||||
JS::MutableHandle<JS::Value> aRetval,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError);
|
||||
void PostMessageMoz(JSContext* aCx, JS::Handle<JS::Value> aMessage,
|
||||
const nsAString& aTargetOrigin,
|
||||
const mozilla::dom::Optional<mozilla::dom::Sequence<JS::Value > >& aTransfer,
|
||||
@@ -1227,12 +1215,6 @@ public:
|
||||
mozilla::dom::Element* aPanel,
|
||||
mozilla::ErrorResult& aError);
|
||||
|
||||
void GetDialogArgumentsOuter(JSContext* aCx, JS::MutableHandle<JS::Value> aRetval,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError);
|
||||
void GetDialogArguments(JSContext* aCx, JS::MutableHandle<JS::Value> aRetval,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError);
|
||||
void GetReturnValueOuter(JSContext* aCx, JS::MutableHandle<JS::Value> aReturnValue,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError);
|
||||
@@ -1681,18 +1663,6 @@ protected:
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError);
|
||||
|
||||
already_AddRefed<nsIVariant>
|
||||
ShowModalDialogOuter(const nsAString& aUrl, nsIVariant* aArgument,
|
||||
const nsAString& aOptions,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError);
|
||||
|
||||
already_AddRefed<nsIVariant>
|
||||
ShowModalDialog(const nsAString& aUrl, nsIVariant* aArgument,
|
||||
const nsAString& aOptions,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError);
|
||||
|
||||
// Ask the user if further dialogs should be blocked, if dialogs are currently
|
||||
// being abused. This is used in the cases where we have no modifiable UI to
|
||||
// show, in that case we show a separate dialog to ask this question.
|
||||
@@ -1832,9 +1802,6 @@ protected:
|
||||
// For |window.arguments|, via |openDialog|.
|
||||
nsCOMPtr<nsIArray> mArguments;
|
||||
|
||||
// For |window.dialogArguments|, via |showModalDialog|.
|
||||
RefPtr<DialogValueHolder> mDialogArguments;
|
||||
|
||||
// Only used in the outer.
|
||||
RefPtr<DialogValueHolder> mReturnValue;
|
||||
|
||||
@@ -2067,40 +2034,14 @@ public:
|
||||
nsCOMPtr<mozIDOMWindowProxy> mOpenerForInitialContentBrowser;
|
||||
};
|
||||
|
||||
/*
|
||||
* nsGlobalModalWindow inherits from nsGlobalWindow. It is the global
|
||||
* object created for a modal content windows only (i.e. not modal
|
||||
* chrome dialogs).
|
||||
*/
|
||||
class nsGlobalModalWindow : public nsGlobalWindow,
|
||||
public nsIDOMModalContentWindow
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIDOMMODALCONTENTWINDOW
|
||||
|
||||
static already_AddRefed<nsGlobalModalWindow> Create(nsGlobalWindow *aOuterWindow);
|
||||
|
||||
protected:
|
||||
explicit nsGlobalModalWindow(nsGlobalWindow *aOuterWindow)
|
||||
: nsGlobalWindow(aOuterWindow)
|
||||
{
|
||||
mIsModalContentWindow = true;
|
||||
}
|
||||
|
||||
~nsGlobalModalWindow() {}
|
||||
};
|
||||
|
||||
/* factory function */
|
||||
inline already_AddRefed<nsGlobalWindow>
|
||||
NS_NewScriptGlobalObject(bool aIsChrome, bool aIsModalContentWindow)
|
||||
NS_NewScriptGlobalObject(bool aIsChrome)
|
||||
{
|
||||
RefPtr<nsGlobalWindow> global;
|
||||
|
||||
if (aIsChrome) {
|
||||
global = nsGlobalChromeWindow::Create(nullptr);
|
||||
} else if (aIsModalContentWindow) {
|
||||
global = nsGlobalModalWindow::Create(nullptr);
|
||||
} else {
|
||||
global = nsGlobalWindow::Create(nullptr);
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "mozilla/dom/ErrorEvent.h"
|
||||
#include "nsAXPCNativeCallContext.h"
|
||||
#include "mozilla/CycleCollectedJSContext.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
#include "nsJSPrincipals.h"
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
bool
|
||||
|
||||
@@ -303,11 +303,6 @@ public:
|
||||
virtual bool CanClose() = 0;
|
||||
virtual void ForceClose() = 0;
|
||||
|
||||
bool IsModalContentWindow() const
|
||||
{
|
||||
return mIsModalContentWindow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to indicate that some node (this window, its document,
|
||||
* or content in that document) has a paint event listener.
|
||||
@@ -629,11 +624,6 @@ protected:
|
||||
// This member is only used by inner windows.
|
||||
bool mInnerObjectsFreed;
|
||||
|
||||
|
||||
// This variable is used on both inner and outer windows (and they
|
||||
// should match).
|
||||
bool mIsModalContentWindow;
|
||||
|
||||
// Tracks activation state that's used for :-moz-window-inactive.
|
||||
// Only used on outer windows.
|
||||
bool mIsActive;
|
||||
|
||||
@@ -29,8 +29,7 @@ const unsigned long SANDBOXED_NAVIGATION = 0x1;
|
||||
|
||||
/**
|
||||
* This flag prevents content from creating new auxiliary browsing contexts,
|
||||
* e.g. using the target attribute, the window.open() method, or the
|
||||
* showModalDialog() method.
|
||||
* e.g. using the target attribute, or the window.open() method.
|
||||
*/
|
||||
const unsigned long SANDBOXED_AUXILIARY_NAVIGATION = 0x2;
|
||||
|
||||
|
||||
@@ -1144,7 +1144,7 @@ nsScriptLoader::InstantiateModuleTree(nsModuleLoadRequest* aRequest)
|
||||
|
||||
nsModuleScript* ms = aRequest->mModuleScript;
|
||||
MOZ_ASSERT(ms);
|
||||
if (!ms->ModuleRecord()) {
|
||||
if (!ms || !ms->ModuleRecord()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,6 @@ support-files =
|
||||
formReset.html
|
||||
invalid_accesscontrol.resource
|
||||
invalid_accesscontrol.resource^headers^
|
||||
mutationobserver_dialog.html
|
||||
orientationcommon.js
|
||||
script-1_bug597345.sjs
|
||||
script-2_bug597345.js
|
||||
@@ -627,9 +626,6 @@ subsuite = clipboard
|
||||
skip-if = toolkit == 'android' #bug 904183
|
||||
[test_createHTMLDocument.html]
|
||||
[test_declare_stylesheet_obsolete.html]
|
||||
[test_dialogArguments.html]
|
||||
tags = openwindow
|
||||
skip-if = toolkit == 'android' || e10s # showmodaldialog
|
||||
[test_document.all_iteration.html]
|
||||
[test_document.all_unqualified.html]
|
||||
[test_document_constructor.html]
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<script>
|
||||
|
||||
var div = document.createElement("div");
|
||||
|
||||
var M;
|
||||
if ("MozMutationObserver" in window) {
|
||||
M = window.MozMutationObserver;
|
||||
} else if ("WebKitMutationObserver" in window) {
|
||||
M = window.WebKitMutationObserver;
|
||||
} else {
|
||||
M = window.MutationObserver;
|
||||
}
|
||||
|
||||
var didCall1 = false;
|
||||
var didCall2 = false;
|
||||
function testMutationObserverInDialog() {
|
||||
div.innerHTML = "<span>1</span><span>2</span>";
|
||||
m = new M(function(records, observer) {
|
||||
opener.is(records[0].type, "childList", "Should have got childList");
|
||||
opener.is(records[0].removedNodes.length, 2, "Should have got removedNodes");
|
||||
opener.is(records[0].addedNodes.length, 1, "Should have got addedNodes");
|
||||
observer.disconnect();
|
||||
m = null;
|
||||
didCall1 = true;
|
||||
});
|
||||
m.observe(div, { childList: true });
|
||||
div.innerHTML = "<span><span>foo</span></span>";
|
||||
}
|
||||
|
||||
function testMutationObserverInDialog2() {
|
||||
div.innerHTML = "<span>1</span><span>2</span>";
|
||||
m = new M(function(records, observer) {
|
||||
opener.is(records[0].type, "childList", "Should have got childList");
|
||||
opener.is(records[0].removedNodes.length, 2, "Should have got removedNodes");
|
||||
opener.is(records[0].addedNodes.length, 1, "Should have got addedNodes");
|
||||
observer.disconnect();
|
||||
m = null;
|
||||
didCall2 = true;
|
||||
});
|
||||
m.observe(div, { childList: true });
|
||||
div.innerHTML = "<span><span>foo</span></span>";
|
||||
}
|
||||
|
||||
window.addEventListener("load", testMutationObserverInDialog);
|
||||
window.addEventListener("load", testMutationObserverInDialog2);
|
||||
window.addEventListener("load",
|
||||
function() {
|
||||
opener.ok(didCall1, "Should have called 1st mutation callback");
|
||||
opener.ok(didCall2, "Should have called 2nd mutation callback");
|
||||
window.close();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input type="button" onclick="window.close()" value="close">
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,31 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for Bug 1019761</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript">
|
||||
|
||||
/*
|
||||
Tests whether Firefox crashes when accessing the dialogArguments property
|
||||
of a modal window that has been closed.
|
||||
*/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function openModal() {
|
||||
showModalDialog("javascript:opener.winRef = window; \
|
||||
window.opener.setTimeout(\'winRef.dialogArguments;\', 0);\
|
||||
window.close();");
|
||||
|
||||
ok(true, "dialogArguments did not cause a crash.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
window.onload = openModal;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -484,28 +484,6 @@ function testSyncXHR() {
|
||||
|
||||
function testSyncXHR2() {
|
||||
ok(callbackHandled, "Should have called the mutation callback!");
|
||||
then(testModalDialog);
|
||||
}
|
||||
|
||||
function testModalDialog() {
|
||||
var didHandleCallback = false;
|
||||
div.innerHTML = "<span>1</span><span>2</span>";
|
||||
m = new M(function(records, observer) {
|
||||
is(records[0].type, "childList", "Should have got childList");
|
||||
is(records[0].removedNodes.length, 2, "Should have got removedNodes");
|
||||
is(records[0].addedNodes.length, 1, "Should have got addedNodes");
|
||||
observer.disconnect();
|
||||
m = null;
|
||||
didHandleCallback = true;
|
||||
});
|
||||
m.observe(div, { childList: true });
|
||||
div.innerHTML = "<span><span>foo</span></span>";
|
||||
try {
|
||||
window.showModalDialog("mutationobserver_dialog.html");
|
||||
ok(didHandleCallback, "Should have called the callback while showing modal dialog!");
|
||||
} catch(e) {
|
||||
todo(false, "showModalDialog not implemented on this platform");
|
||||
}
|
||||
then(testTakeRecords);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,11 +53,6 @@ DOMInterfaces = {
|
||||
'concrete': False
|
||||
},
|
||||
|
||||
'AddonManagerPermissions': {
|
||||
'wrapperCache': False,
|
||||
'concrete': False
|
||||
},
|
||||
|
||||
'AnimationEffectReadOnly': {
|
||||
'concrete': False
|
||||
},
|
||||
@@ -340,14 +335,6 @@ DOMInterfaces = {
|
||||
'wrapperCache': False,
|
||||
},
|
||||
|
||||
'FlyWebFetchEvent': {
|
||||
'headerFile': 'FlyWebServerEvents.h',
|
||||
},
|
||||
|
||||
'FlyWebWebSocketEvent': {
|
||||
'headerFile': 'FlyWebServerEvents.h',
|
||||
},
|
||||
|
||||
'FontFaceSet': {
|
||||
'implicitJSContext': [ 'load' ],
|
||||
},
|
||||
|
||||
@@ -1109,6 +1109,12 @@ class CGHeaders(CGWrapper):
|
||||
# Now find all the things we'll need as arguments because we
|
||||
# need to wrap or unwrap them.
|
||||
bindingHeaders = set()
|
||||
|
||||
# KeyframeAnimationOptions.webidl is doing something VERY screwy and
|
||||
# Unified Building really sucks so directly include this
|
||||
if prefix == "KeyframeAnimationOptionsBinding":
|
||||
bindingHeaders.add("mozilla/dom/PrimitiveConversions.h")
|
||||
|
||||
declareIncludes = set(declareIncludes)
|
||||
|
||||
def addHeadersForType((t, dictionary)):
|
||||
|
||||
@@ -16,6 +16,7 @@ def generateLine(propName, extendedAttrs):
|
||||
return " [%s] attribute DOMString %s;\n" % (", ".join(extendedAttrs),
|
||||
propName)
|
||||
def generate(output, idlFilename, preprocessorHeader):
|
||||
print(idlFilename)
|
||||
cpp = list(buildconfig.substs['CPP'])
|
||||
cpp += shellutil.split(buildconfig.substs['ACDEFINES'])
|
||||
cpp.append(preprocessorHeader)
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
* 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 "jswrapper.h"
|
||||
#include "WebIDLGlobalNameHash.h"
|
||||
#include "js/GCAPI.h"
|
||||
#include "XrayWrapper.h"
|
||||
#include "XPCWrapper.h"
|
||||
#include "mozilla/dom/Selection.h"
|
||||
#include "mozilla/HashFunctions.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/dom/DOMJSProxyHandler.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define mozilla_dom_WebIDLGlobalNameHash_h__
|
||||
|
||||
#include "js/RootingAPI.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
Loaded 100 of 5391 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user