Compare commits

...
399 Commits
Author SHA1 Message Date
athenian200 451509e2c0 Issue #1571 - Remove JEMALLOC_USES_MAP_ALIGN and fix 48-bit addressing on SunOS AMD64.
The JEMALLOC_USES_MAP_ALIGN code has turned out to be worse than useless, and in fact it breaks 64-bit SunOS. It's very old and turned out not to be needed anymore because the way the memory allocator works has changed since it was implemented. It prevented a fix I tried for 48-bit addressing from working properly. However, without either this code or the 48-bit addressing fix, the 64-bit version won't even start, which is why I thought the code was still needed.

https://bugzilla.mozilla.org/show_bug.cgi?id=457189

https://hg.mozilla.org/mozilla-central/rev/a26c500b98ab

The 48-bit addressing fix is based on code found here:

https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/web/firefox/patches/patch-js_src_gc_Memory.cpp.patch

I already applied these changes to js/src/gc/Memory.cpp, but as I was looking through jemalloc.c I saw that there were very similar ifdefs for Linux on SPARC as the ones I'd had to enaable in Memory.cpp, but for whatever reason the patches I found didn't touch them. So I tried doing for jemalloc.c what was already done for Memory.cpp, and it worked (but only after I removed the map align code).
2020-06-01 11:00:26 +02:00
wolfbeast 7895b8acd9 Issue #1570 - Implement globalThis
This resolves #1570
2020-06-01 10:59:51 +02:00
Fedor ccff4610c5 Issue #1558 - Prevent null deref crash in WebrtcVideoConduit DTOR 2020-06-01 10:59:15 +02:00
athenian200 15a1f78f8b Issue #1557 - Allow event dispatch on disabled form controls. (uplift) 2020-05-21 13:16:17 +00:00
athenian200 8b44473fe6 Revert "Merge pull request #1357 from athenian200/form-disabled-issue"
This reverts commit ed88b99849, reversing
changes made to c4b0715baa.
2020-05-21 13:10:27 +00:00
athenian200 6e0aee959e Issue #1540 - Stop MP3 demuxer from choking on very small files. 2020-05-20 17:18:39 +02:00
Matt A. Tobin ba5930cc8e Issue #1449 - Implement URLSearchParams's sort() 2020-05-10 16:06:19 +02:00
wolfbeast 6376255c0c Issue #1589 - Ensure computed length and data is always available 2020-05-10 14:51:23 +02:00
Moonchild 320682148b [XPFE] Properly anchor XUL windows when tearing down 2020-05-06 19:03:37 +02:00
Moonchild 1ed84ac1f8 [WebRTC] Port some upstream sctp fixes
- add SCTP auth token boundary check.
- turn off SCTP auth and address reconfiguration.
2020-05-06 19:03:23 +02:00
Moonchild 9c9d04e3e0 [dom] Reorder some calls to improve memory safety 2020-05-06 19:03:08 +02:00
Moonchild 19504d5263 [devtools] Port various upstream fixes 2020-05-06 19:02:56 +02:00
Moonchild 533b346f4e [js] Record load in MCreateThis alias set. 2020-05-06 19:02:42 +02:00
Bas Schouten 6afd96c460 Prevent the existance of dangling pointers upon failure of FindDataStart. 2020-05-06 19:02:28 +02:00
Matt A. Tobin 9858dc03cb Hyperbola IceDove should use the toolkit SearchService 2020-05-06 19:00:16 +02:00
wolfbeast d21b46fc9c Revert "Issue #1445 - Clarify the status of extensions in the Add-On manager"
This reverts commit f107de8a90.
2020-04-27 11:58:42 +02:00
wolfbeast 55fa46d059 Revert "Issue #1446 - Only allow extension add-on types for Firefox compat mode."
This reverts commit e8417acbff.
2020-04-27 11:57:28 +02:00
wolfbeast b089b365d6 Revert "Issue #1446 - Only match extension add-on types for target applications."
This reverts commit 4889e6dbbd.
2020-04-27 11:57:14 +02:00
wolfbeast 0c150945dc Revert "Issue #1445 - Use the detailed string also in the list entries."
This reverts commit ac68f8cf6c.
2020-04-27 11:57:01 +02:00
wolfbeast 0fb23389f5 Revert "Issue #1445 - remove redundant nativeIndicator"
This reverts commit 2073a7f1c9.
2020-04-27 11:56:47 +02:00
wolfbeast 7ba07f4a17 Revert "Issue #1445 - Add a link to details on using Firefox extensions in Pale Moon"
This reverts commit c220c30bbb.
2020-04-27 11:56:33 +02:00
wolfbeast 554183b5dd Revert "Issue #1445 - strings cleanup"
This reverts commit 461a9e86b2.
2020-04-27 11:56:19 +02:00
wolfbeast 98fe8b0ccb Merge branch 'redwood' into 28.9-platform 2020-04-26 12:56:46 +02:00
Matt A. Tobin 519030e688 Issue #80 - Resolve issues with compiling on insane gcc configurations with no optimizations in dom/ 2020-04-26 10:27:18 +02:00
adeshkp b9531d8e11 Issue #80 - Add Unused.h to dom/gamepad for Mac build 2020-04-26 10:26:57 +02:00
adeshkp 7605f4b0f8 Issue #80 - Fix include in PlatformDecoderModule.h 2020-04-26 10:26:07 +02:00
wolfbeast ab0e18135f Issue #80 - Fix include in dom/quota
Reported by Luke.
2020-04-26 10:23:13 +02:00
wolfbeast e883ac54e9 Issue #80 - Fix include in dom/media for Pale Moon builds. 2020-04-26 10:22:59 +02:00
New Tobin Paradigm 9cb65e8a77 Add Unused.h to dom/media/webrtc/MediaTrackConstraints.cpp 2020-04-26 10:22:46 +02:00
adeshkp 3a3152d54b Issue #80 - Include D3DMessageUtils.h in dom/plugins/ipc for Mac build
This should ideally not be needed on Mac but compilation fails due to
sizeof `DxgiAdapterDesc` not known.

Didn't face this issue on Linux though, probably due to a different include
chain which already has this file included somewhere along the way.
2020-04-26 10:22:32 +02:00
adeshkp f174801b64 Issue #80 - Fix includes in dom/media/platforms for Mac build 2020-04-26 10:22:20 +02:00
New Tobin Paradigm 3caceeb539 Issue #80 - Include nsIContentInlines.h in dom/svg/SVGTests.cpp to fix linux bustage 2020-04-26 10:21:59 +02:00
Moonchild 216189e6f7 Issue #80 - De-unify dom/xul 2020-04-26 10:21:48 +02:00
Moonchild bbae11cdd9 Issue #80 - De-unify dom/xslt 2020-04-26 10:21:37 +02:00
Moonchild 917447df6e Issue #80 - De-unify dom/xml 2020-04-26 10:21:27 +02:00
Moonchild 244c8ef1f7 Issue #80 - De-unify dom/xhr 2020-04-26 10:21:10 +02:00
Moonchild e1b6493747 Issue #80 - De-unify dom/xbl 2020-04-26 10:20:59 +02:00
Moonchild 4e225fc7d1 Issue #80 - De-unify dom/workers 2020-04-26 10:20:48 +02:00
Moonchild 683b1bedea Issue #80 - De-unify dom/system 2020-04-26 10:20:38 +02:00
Moonchild 11519ee6d2 Issue #80 - De-unify dom/svg 2020-04-26 10:20:27 +02:00
Moonchild 8a343284d9 Issue #80 - De-unify dom/smil 2020-04-26 10:20:16 +02:00
Moonchild 5a34fb5e1d Issue #80 - De-unify dom/security
Exception: CSPUtils relies on something in CSPContext, but on
Windows it throws in an MSVC include which provides no hints.
2020-04-26 10:20:05 +02:00
Moonchild 16c8dff724 Issue #80 - De-unify dom/quota 2020-04-26 10:19:55 +02:00
Moonchild 3595b9eecf Issue #80 - De-unify dom/push 2020-04-26 10:19:44 +02:00
Moonchild 594cbca6d1 Issue #80 - De-unify dom/plugins/ipc 2020-04-26 10:19:33 +02:00
Moonchild a4ba260904 Issue #80 - De-unify dom/plugins/base 2020-04-26 10:19:22 +02:00
Moonchild 4a8c186eea Issue #80 - De-unify dom/performance 2020-04-26 10:19:11 +02:00
Moonchild 8ff6e8c8a2 Issue #80 - De-unify dom/media part 3
Excluding /dom/media/webrtc for bad template use:
MediaTrackConstraints.cpp/h
MediaEngineCameraVideoSource.cpp and
MediaEngineRemoteVideoSource.cpp
2020-04-26 10:18:59 +02:00
Moonchild 3652cd0f99 Issue #80 - De-unify dom/media part 2 2020-04-26 10:18:45 +02:00
Moonchild b738ccc61b Issue #80 - De-unify dom/media part 1 (updated reland)
This de-unifies up to and including dom/media/platforms with the exception of
dom/media/platforms/wmf, because that one throws weird errors in the Win
SDK which don't have a clear cause (yet)
2020-04-26 10:18:28 +02:00
Moonchild 1c3a9a40e5 Issue #80 - De-unify dom/ipc 2020-04-24 10:37:30 +02:00
Moonchild 0a33733505 Issue #80 - De-unify dom/indexedDB 2020-04-24 10:37:19 +02:00
wolfbeast 691878e20f Issue #80 - De-unify dom/html 2020-04-24 10:37:08 +02:00
wolfbeast bf1fa93b91 [AM] Clean up addon-signing build leftovers. 2020-04-24 10:36:55 +02:00
wolfbeast 0ac7481d2e Issue #80 - De-unify dom/network 2020-04-24 10:36:44 +02:00
wolfbeast 168bb31e4f Issue #80 - De-unify dom/grid 2020-04-24 10:36:33 +02:00
wolfbeast ca04b37910 Issue #80 - De-unify dom/geolocation 2020-04-24 10:36:23 +02:00
wolfbeast f3b26f64fc Issue #80 - De-unify dom/gamepad 2020-04-24 10:36:11 +02:00
wolfbeast 99d23484bb Issue #80 - De-unify dom/filesystem 2020-04-24 10:36:01 +02:00
wolfbeast 376bc050a6 Issue #80 - De-unify dom/filehandle 2020-04-24 10:35:49 +02:00
Matt A. Tobin 9258382b0d Issue #576 - Remove IdentityService and ContextualIdentityService 2020-04-24 10:35:38 +02:00
Matt A. Tobin b6a703907e Issue #65 - Remove AppConstants from toolkit/prompts/content/tabprompts.xml
This file not only somehow escaped my pass through here but was also mocking me by using AppConstants in a preprocessed file BUT ALSO right AFTER a preprocessor directive.
2020-04-24 10:35:09 +02:00
Matt A. Tobin da42871b0e Put Request.cpp and Response.cpp back into UNIFIED in dom/fetch due to linux linker errors
Reference:

15:03.06 ../../build/unix/gold/ld: error: /home/mattatobin/development/.obj/trunk-master/navigator-x64-gtk3/toolkit/library/../../dom/fetch/Request.o: requires dynamic R_X86_64_PC32 reloc against '_ZN7mozilla3dom9FetchBodyINS0_7RequestEED2Ev' which may overflow at runtime; recompile with -fPIC
15:03.06 ../../build/unix/gold/ld: error: /home/mattatobin/development/.obj/trunk-master/navigator-x64-gtk3/toolkit/library/../../dom/fetch/Response.o: requires dynamic R_X86_64_PC32 reloc against '_ZN7mozilla3dom9FetchBodyINS0_8ResponseEED2Ev' which may overflow at runtime; recompile with -fPIC
15:03.06 ../../build/unix/gold/ld: error: read-only segment has dynamic relocations
15:03.07 /home/mattatobin/development/.obj/trunk-master/navigator-x64-gtk3/toolkit/library/../../dom/fetch/Request.o:Request.cpp:function mozilla::dom::Request::~Request(): error: undefined reference to 'mozilla::dom::FetchBody<mozilla::dom::Request>::~FetchBody()'
15:03.07 /home/mattatobin/development/.obj/trunk-master/navigator-x64-gtk3/toolkit/library/../../dom/fetch/Response.o:Response.cpp:function mozilla::dom::Response::~Response(): error: undefined reference to 'mozilla::dom::FetchBody<mozilla::dom::Response>::~FetchBody()'
2020-04-24 10:34:46 +02:00
wolfbeast c55433ee03 Issue #80 - De-unify dom/fetch
Running into the same problem as with dom/canvas: derived template
classes not being happy about being non-unified. Kept unified for now
to prevent linking errors.
2020-04-24 10:34:33 +02:00
wolfbeast d0a2389b43 Issue #80 - De-unify dom/events 2020-04-24 10:34:20 +02:00
wolfbeast 796a14e116 Issue #80 - De-unify dom/crypto 2020-04-24 10:34:08 +02:00
Matt A. Tobin ba6e4753b7 Fix typo in dom/animation/CSSPseudoElement.cpp
Linux filesystems tend to be case sensitive
2020-04-24 10:33:56 +02:00
wolfbeast 6d3d69f644 Issue #80 - De-unify dom/canvas 2020-04-24 10:33:20 +02:00
Matt A. Tobin fce3132fe8 Make application moz.configure file optional and set application/xulrunner as the default platform build_app 2020-04-24 10:33:08 +02:00
Matt A. Tobin a7da3cf52b Issue #80 - De-unify layout/mathml 2020-04-24 10:32:48 +02:00
Matt A. Tobin f5316668a3 Issue #80 - De-unify layout/forms 2020-04-24 10:32:36 +02:00
wolfbeast dc687dbc0b Issue #80 - De-unify dom/cache 2020-04-24 10:32:24 +02:00
wolfbeast 216aa2cada Issue #80 - De-unify dom/archivereader 2020-04-24 10:32:14 +02:00
wolfbeast 9d96ad90dd Issue #80 - De-unify dom/animation
KeyFrameEffect and KeyFrameEffectReadOnly are still built unified as
buddies because they have some complex interdependency that couldn't
easily be resolved without linking failures.
2020-04-24 10:32:03 +02:00
Matt A. Tobin b064c95231 Issue #80 - De-unify dom/messagechannel 2020-04-24 10:31:52 +02:00
Matt A. Tobin 11eb1f57f4 Issue #80 - De-unify dom/audiochannel 2020-04-24 10:31:42 +02:00
Matt A. Tobin 052cb18fff Issue #80 - De-unify dom/notification 2020-04-24 10:31:31 +02:00
Matt A. Tobin d306fe61c5 Issue #80 - De-unify dom/url 2020-04-24 10:31:19 +02:00
Matt A. Tobin 7859a0d693 Issue #80 - De-unify dom/encoding 2020-04-24 10:31:08 +02:00
Matt A. Tobin c5d9e1f973 Issue #80 - De-unify dom/json 2020-04-24 10:30:52 +02:00
Matt A. Tobin 2e12bda342 Issue #80 - De-unify dom/u2f 2020-04-24 10:30:40 +02:00
Matt A. Tobin 9755cd617d Issue #80 - De-unify dom/power 2020-04-24 10:30:29 +02:00
Matt A. Tobin abaf4d9fb4 Issue #80 - De-unify dom/mathml 2020-04-24 10:30:18 +02:00
Matt A. Tobin ae6f407177 Issue #80 - De-unify dom/jsurl 2020-04-24 10:30:08 +02:00
Matt A. Tobin 2a44476795 Issue #80 - De-unify dom/worklet 2020-04-24 10:29:56 +02:00
Matt A. Tobin 755cf4c7d0 Issue #80 - De-unify dom/console 2020-04-24 10:29:45 +02:00
Matt A. Tobin 47f26a67f4 Issue #80 - De-unify dom/media/webm 2020-04-24 10:29:34 +02:00
Matt A. Tobin e8aa76713a Issue #80 - De-unify dom/media/flac 2020-04-24 10:29:23 +02:00
Matt A. Tobin e6ffc4bdb7 Issue #80 - De-unify dom/media/mp3 2020-04-24 10:29:13 +02:00
Matt A. Tobin 90bbe7536d Issue #80 - De-unify dom/media/ogg 2020-04-24 10:29:01 +02:00
Matt A. Tobin 140750e4e8 Issue #80 - De-unify dom/media/encoder 2020-04-24 10:28:50 +02:00
Matt A. Tobin f2e089d51b Issue #80 - De-unify dom/media/mediasink 2020-04-24 10:28:38 +02:00
Matt A. Tobin e1d0ac30ac Issue #80 - De-unify dom/media/wave 2020-04-24 10:28:28 +02:00
Matt A. Tobin 9e8adc25a4 Issue #80 - De-unify dom/storage 2020-04-24 10:28:16 +02:00
Matt A. Tobin 7f66e8946a Issue #80 - De-unify dom/time 2020-04-24 10:28:05 +02:00
Matt A. Tobin c75b8ec714 Issue #80 - De-unify dom/permission 2020-04-24 10:27:54 +02:00
Matt A. Tobin 4250d93166 Issue #80 - De-unify dom/broadcastchannel 2020-04-24 10:27:42 +02:00
Matt A. Tobin 37250226d5 Issue #80 - De-unify dom/offline 2020-04-24 10:27:30 +02:00
Matt A. Tobin 802a4cfefe Issue #80 - De-unify /layout/inspector 2020-04-24 10:27:18 +02:00
Matt A. Tobin 5641a6d574 Issue #80 - De-unify /layout/tools/layout-debug/src 2020-04-24 10:27:06 +02:00
Matt A. Tobin 88d2480356 Issue #80 - De-unify /layout/ipc 2020-04-24 10:26:52 +02:00
Matt A. Tobin fcb4b997d0 Issue #80 - De-unify /layout/build 2020-04-24 10:26:40 +02:00
wolfbeast 79964767f5 [docs] Update coding style cf. discussion with Tobin. 2020-04-24 10:26:16 +02:00
wolfbeast a4a8d082a3 Issue #251 - Move MOZ_AV1 back to ac configure for everyone to use. 2020-04-24 10:25:57 +02:00
Matt A. Tobin adce88de95 Issue #1516 - Part 1: Add a global build define to determine if the client can draw in the titlebar and update consumers of the local define 2020-04-24 10:24:52 +02:00
wolfbeast 974d6ca889 Issue #1517 - Enable high-resolution DOM timestamps on trunk
At the very least we should enable these short term, with the potential
removal of it pending.
2020-04-16 13:58:36 +02:00
wolfbeast e08a4ad1c8 Issue #1517 - Enable high-resolution DOM timestamps on release 2020-04-16 04:20:42 +02:00
wolfbeast 39dac57259 Merge branch 'redwood' into 28.9-platform 2020-04-14 21:49:04 +02:00
wolfbeast c2d9ab62f3 Fix additional deprot in dom/base 2020-04-14 21:37:53 +02:00
wolfbeast b9e692af05 Revert 1320408 part 15: Make addDataProperty static 2020-04-14 21:10:50 +02:00
wolfbeast 871e57fdd6 Issue #80 - De-unify dom/base and fix deprot. 2020-04-14 14:19:58 +02:00
wolfbeast 03530de64f Fix deprot in /layout 2020-04-14 14:02:50 +02:00
Moonchild 4730da5b27 Create SECURITY.md
Provide basic instructions how to report security vulnerabilities.
2020-04-14 13:28:43 +02:00
wolfbeast 3cb245b749 Issue #1514 - Perform validity check before trying to use the content.
Resolves #1514
2020-04-14 13:28:28 +02:00
wolfbeast 9f5529d1e7 Issue #1513 - Bail on orphan node
This was refactored by Mozilla into doing effectively the same thing so
it aligns with them re: behavior.
Resolves #1513
2020-04-14 13:28:10 +02:00
wolfbeast 26c888208a Issue #1512 - Improve handling of multiple selections.
IsSelectionEditable should check whether the focus node and anchor node
aren't null before trying to use them.
This also changes the initialization of selections' aOutIndex to the
last range in the selection as a fallback in case we don't add a range
later (in AddItem) which could also end up with a null selection
otherwise if the additional selection nodes are removed.
2020-04-14 13:27:57 +02:00
wolfbeast 9a52b3b852 [layout] Always move descendants of layout frames if moved.
If we move the frame then we always need to move any descendant views,
not just in case the frame itself has a view.
2020-04-14 13:27:34 +02:00
wolfbeast 96afb5250d Issue #1511 - Bail on orphan situation.
This resolves #1511
2020-04-14 13:27:12 +02:00
Jan de Mooij b93afb1ba7 [js] Handle functions with rest parameters in isObservableArgumentSlot. 2020-04-14 13:26:57 +02:00
Matt A. Tobin 277f2116b6 Move aom source to a sub-directory under media/libaom
There is no damned reason to treat this differently than any other media lib given its license and there never was.
2020-04-14 13:26:42 +02:00
Matt A. Tobin d270404436 Silence removing dist/bin 2020-04-14 13:26:26 +02:00
Matt A. Tobin 3bec218684 Take files out of preprocessing that no longer require it 2020-04-14 13:26:13 +02:00
Matt A. Tobin 6daff43b61 Follow up to d0eee8f01 - Run precomplete cmd during package staging 2020-04-14 13:25:58 +02:00
Matt A. Tobin eedf9f5ebf Align mar generation on Windows with other platforms
This makes mar generation dependent on packaging not installer
2020-04-14 13:25:44 +02:00
Matt A. Tobin 049dae86d2 Alter config.guess to properly detect host and target bitness on SunOS 2020-04-14 13:25:29 +02:00
wolfbeast 65ba3cac58 [Docshell] Ensure nsDocShell::mContentViewer is released properly. 2020-04-14 13:25:13 +02:00
wolfbeast 1b8788aecb Issue #1505 - Part 3: Make native mode actually native again. 2020-04-14 13:24:59 +02:00
wolfbeast 747632bd64 Issue #1505 - Part 2: Store application build ID in nsHttpHandler
Since we're needing to reuse this several times, it makes it simpler to
just get it once in init and storing it.
2020-04-14 13:24:46 +02:00
wolfbeast 02327fa745 Issue #1505 - Rebuild application version string
To respond dynamically to the pref change, the mAppVersion string needs
to be rebuilt.
Includes some minor improvements for corner cases and removes leftover
b2g junk.
2020-04-14 13:24:32 +02:00
New Tobin Paradigm b470422d5a Issue #1497 - Re-implement an un-preprocessed file check 2020-04-14 13:24:17 +02:00
wolfbeast 449d530a30 Issue #1508 - Redirect moz://a to http://thereisonlyxul.org/ 2020-04-14 13:24:03 +02:00
wolfbeast 8bd941d4e3 Issue #1507 - Remove nsRefreshDriver's use of high res system timers.
Since we are using vsync for timing anyway in the layout refresh driver,
there is no need to bump the system timer resolution down to 1 ms.

This resolves #1507.
2020-04-14 13:23:48 +02:00
JustOff 7172fc72a3 Issue #65 - Fix unprocessed directives in WebRequest.jsm 2020-04-14 13:23:21 +02:00
Matt A. Tobin b977981df6 Make the reference to Handle unambiguous in ipc/testshell/XPCShellEnvironment.cpp
.. correctly
2020-04-14 13:23:06 +02:00
Matt A. Tobin 9dc65422ba Revert "Make the reference to Handle unambiguous in ipc/testshell/XPCShellEnvironment.cpp"
This reverts commit d4afddfada.
2020-04-14 13:22:51 +02:00
Matt A. Tobin 45e8e98031 Make the reference to Handle unambiguous in ipc/testshell/XPCShellEnvironment.cpp 2020-04-14 13:22:34 +02:00
Matt A. Tobin 965232ab2f Output webidl filenames as they are processed 2020-04-14 13:22:13 +02:00
athenian200 980ca14602 Issue #1501 - Un-bust building of NSS after update to 3.48 on Solaris. 2020-04-14 13:21:54 +02:00
Matt A. Tobin 02519e8575 Explicitly remove dist/bin before mozbuild's install_manifests get a hold of it 2020-04-14 13:21:33 +02:00
Matt A. Tobin e003547dc5 Properly fix crash in nsDownloadManager when repeatedly pausing and resuming a download
This applies only to applications that do not use JSDownloads and is based on Bug 1224326
2020-04-14 13:21:07 +02:00
Matt A. Tobin 56f8375338 Revert "Only state the stop notification for JSDownloads in nsWebBrowserPersist::EndDownload"
This reverts commit aa28523a55.
2020-04-14 13:20:54 +02:00
wolfbeast 2407845ec1 Issue #1280 - Un-bust certerror pages and ForgetAboutSite 2020-04-14 13:20:35 +02:00
wolfbeast 3f09b298b0 Issue #1280 - Stop requesting HPKP state from within devtools. 2020-04-14 13:20:22 +02:00
wolfbeast c27830f35c Issue #1280 - Part 2: Remove HPKP tests. 2020-04-14 13:19:54 +02:00
wolfbeast 99bad1726e Issue #1280 - Part 1: Remove HPKP components.
This also removes leftover plumbing for storing preload information
in SiteSecurityService since no service still uses it.
2020-04-14 13:19:41 +02:00
JustOff d86349716a Issue #1473 - Fix building %OS_SLICE% on non-Windows platforms 2020-04-14 13:19:20 +02:00
JMadgwick 64a7c9e2d2 Issue #1471 - Fix building on sparc64 Linux
Correct various pre-processor defines for sparc64 and in mozjemalloc use the JS arm64 allocator on Linux/sparc64.
This corrects build problems opn Linux sparc64 and is in line with bugzilla bug #1275204.
2020-04-14 13:18:48 +02:00
New Tobin Paradigm 514ff21cba Update README.md 2020-04-14 13:18:16 +02:00
wolfbeast edb5796d58 Issue #1497 Revert "Check if there are any unpreprocessed files"
This reverts PR #429
2020-04-14 13:18:02 +02:00
wolfbeast c23e3b25f8 Issue #1497 Revert "MoonchildProductions#1251 - Part 19"
"Make the unpreprocessed file script work on Solaris."

This reverts commit e51afbcc2f.
2020-04-14 13:17:47 +02:00
Matt A. Tobin e360caa1a2 Teach config.guess to know if we want to build 32 or 64 bit builds on Windows 2020-04-14 13:17:20 +02:00
Matt A. Tobin 9eeaeff77b Issue #1499 - Re-import ExtensionStorage.jsm 2020-04-14 13:16:54 +02:00
wolfbeast a435374873 Issue #1498 - Part 6: Remove STS preloadlist pref. 2020-04-14 13:16:38 +02:00
wolfbeast 04cfc091da Issue #1498 - Part 5: Update SSService CID and correct mismatch. 2020-04-14 13:16:24 +02:00
wolfbeast b23e7b61c6 Issue #1498 - Part 4: Remove clearPreloads.
Also tag #1280
2020-04-14 13:16:11 +02:00
wolfbeast 69b4e77751 Issue #1498 - Part 3: Remove support for storing "knockout" values. 2020-04-14 13:15:58 +02:00
wolfbeast 5657b5c53b Issue #1498 - Part 2: Stop persisting preload states.
Since we don't use preloading anymore for either HPKP or HSTS, we no
longer need persistent storage in the profile for preload states.
Tag #1280 also
2020-04-14 13:14:43 +02:00
wolfbeast 1037746d00 Issue #1498 - Part 1: Stop using HSTS preload lists. 2020-04-14 13:14:03 +02:00
Matt A. Tobin a060401264 Take nsSiteSecurityService out of UNIFIED_SOURCES
It exceeded the obj file sections limit because of the HSTS preload list so it cannot be built in UNIFIED mode.
2020-04-14 13:13:44 +02:00
wolfbeast 4e26fc1844 Issue #447 - Update HSTS preload list 2020-04-14 13:13:06 +02:00
Brian Smith 2645f9b944 Issue #1491 - Part 2: Disable a workaround on macOS 10.14+ for an Apple bug described in Mozilla bug 378645 involving popup windows that was fixed by Apple. 2020-04-14 13:12:48 +02:00
Brian Smith 88ce149033 Issue #1491 - Part 1: Update nsCocoaFeatures for newer versions of MacOS X. 2020-04-14 13:12:25 +02:00
wolfbeast 09655ad6d8 Issue #1467 - Part 4: Rename NSS_SQLSTORE to MOZ_SECURITY_SQLSTORE.
Rename the build config option accordingly.
2020-04-14 13:12:08 +02:00
wolfbeast 4fd0b98c2c Issue #1467 - Part 3: Use UTF-8 file paths for NSS-SQL database. 2020-04-14 13:11:51 +02:00
wolfbeast 894b33e53a Issue #1467 - Part 2: Make the PBKDF rounds adaptive to choice of NSS db 2020-04-14 13:11:37 +02:00
wolfbeast 236d425993 Issue #1467 - Part 1b: Fix type and make moz.configure happy. 2020-04-14 13:11:22 +02:00
wolfbeast 899e14e945 Issue #1467 - Part 1: Set up conditional NSS-SQL builds.
- Adds buildconfig option --enable-nss-sqlstore
- Prefixes NSS dbinit with either sql: or dbm: depending on config
- Pre-initializes mozStorage when NSS-SQL storage is used to prevent
  an sqlite3_config race in NSS Init
2020-04-14 13:11:05 +02:00
wolfbeast 03fda9f0f3 [devtools] Properly escape method arguments for curl. 2020-04-14 13:10:45 +02:00
wolfbeast 3aae828871 [DOM] Make sure to exit fullscreen mode if popups are opened or focused. 2020-04-14 13:10:23 +02:00
wolfbeast e7514afc7c [js] Remove pointless MakeMRegExpHoistable optimization.
It's a lot of code with no measurable effect.
2020-04-14 13:10:09 +02:00
wolfbeast 4adf0d09f7 [network] Cherry-pick various sctp lib upstream fixes. 2020-04-14 13:09:51 +02:00
wolfbeast 22d0b88e37 Issue #1355 - Make addition of cell border display items depend on
whether they should be drawn.

This reduces the size of display lists for tables by only adding display
list items that are actually going to be visibly drawn, which will help
overall performance of table drawing.
2020-04-14 13:06:54 +02:00
JustOff f7388678bd Issue #1482 - Give dynamic SSUAO rules priority over static ones 2020-04-14 13:06:30 +02:00
wolfbeast b45f5c435e Issue #1485 - Fix incorrect grid cell sizing to min/max space.
There were actually two separate logical errors in this method:

The first part is that "origSizes.isSome()" is simply a bogus
requirement for applying min/max-sizes here. I'm still keeping
the optimization of not needlessly copying the mSizes array
(as originally intended) since it's a quite common case.

The second bug is that min/max-sizes were only applied under
the "if (fr != 0.0f)" block. This is bogus since the calculated
'fr' value depends on 'aAvailableSize' which might change by
applying min/max-sizes and thus 'fr' could become non-zero in
the second round.
To fix, this patch just moves "applyMinMax" block out one level.
2020-04-14 13:06:11 +02:00
Matt A. Tobin 3c73c0805c Issue #1477 - Fix finding config.guess on builds not using MOZ_OBJDIR
* So far this seems to only affect Macintosh builds but other unix builds may be affected. Windows doesn't seem to be.
* This maintains consistency with other one-off file invocations and backwards compatibility with older comm setups
2020-04-14 13:05:58 +02:00
wolfbeast db93b005f5 Issue #1480 - Skip abspos, fixed, float and placeholders for outline. 2020-04-14 13:05:43 +02:00
JustOff d2aaa74f31 Issue #1053 - Remove no longer used function and modules from UserAgentUpdates.jsm 2020-04-14 13:05:25 +02:00
JustOff 702cf42544 Issue #1473 - Add %OS_SLICE% macro to SSUAO to refine OS info 2020-04-14 13:05:07 +02:00
wolfbeast 79a9dc2479 Minor update to UXP coding style guideline. 2020-04-14 13:04:46 +02:00
New Tobin Paradigm ddcc3deddd Update README.md 2020-04-14 13:04:19 +02:00
wolfbeast f3b148844a Issue #1474 - Prevent the cp detection from starting if preffed off.
When setting up connectivity, e.g. with new network detection, the pref
wouldn't be checked (or honored), resulting in spurious startup calls
despite being preffed off. This fixes that.

Resolves #1474
2020-04-14 13:04:05 +02:00
wolfbeast 51d5d162b7 Update UXP coding style guide JS guide. 2020-04-14 13:03:47 +02:00
wolfbeast 94494805da Update UXP coding style guide JS guide. 2020-04-14 13:03:34 +02:00
Matt A. Tobin 5c7109182c Issue #1470 - Part 3: Remove now unused update.locale
This requires changes to package-manifest in all applications
2020-04-14 13:03:21 +02:00
Matt A. Tobin 68e873ada7 Issue #1470 - Part 2: Change calls from UpdateUtils.getUpdateChannel() to UpdateUtils.UpdateChannel in telemetry modules 2020-04-14 13:03:07 +02:00
Matt A. Tobin a5b05528fe Issue #1470 - Part 1: Refactor UpdateUtils.jsm 2020-04-14 13:02:53 +02:00
wolfbeast ce88d82f4a Update UXP coding style guide with JS guide. 2020-04-14 13:02:39 +02:00
New Tobin Paradigm 61d3aa9be2 Remove exposed bug from UpdateUtils.jsm 2020-04-14 13:02:22 +02:00
Matt A. Tobin a078d9f976 Issue #1053 - Remove android-only skia-npapi 2020-04-14 13:01:51 +02:00
Matt A. Tobin 3ed2b7a7cc Issue #1053 - Remove android support from nsNSSComponent.cpp 2020-04-14 13:01:34 +02:00
Matt A. Tobin 9816a810e6 Issue #251 - Move --disable-dbm to ac configure
Also Tag #1467
2020-04-14 13:01:21 +02:00
Matt A. Tobin 9a8068ea3f Remove unused mailnews.mozbuild 2020-04-14 13:01:07 +02:00
Matt A. Tobin dcd9bbb717 Mork is not dependent on dbm and never was. 2020-04-14 13:00:55 +02:00
Matt A. Tobin ecc0a40688 Correct typo in mailnews/base/src/moz.build 2020-04-14 13:00:41 +02:00
Matt A. Tobin 8f40737fc7 Issue #1319 - Remove EARLY_BETA_OR_EARLIER condition 2020-04-14 13:00:26 +02:00
wolfbeast e7841ab5d7 Issue #1465 - Implement optional catch binding. 2020-04-14 13:00:11 +02:00
wolfbeast dba09fa5c4 Revert "Issue #1355 - Better way to create display items for column backgrounds"
This reverts commit 44c47c5038.
2020-04-14 12:59:57 +02:00
wolfbeast afe2b7fa5a Revert "Layout\reftests\table-background\reftest.list should have only additions to the end of it."
This reverts commit efdc2af8ab.
2020-04-14 12:59:43 +02:00
wolfbeast acaec3f389 [DOM] Add a null check 2020-04-14 12:59:26 +02:00
Matt A. Tobin d2083edba2 No Issue - Always build marionette until it can be tracked down and killed 2020-04-14 12:58:54 +02:00
win7-7 1ebcc1d7e5 Layout\reftests\table-background\reftest.list should have only additions to the end of it.
Layout\reftests\table-background\reftest.list should have only additions to the end of it. Revert incorrect additions.
2020-04-14 12:58:33 +02:00
win7-7 cbb61ab832 Issue #1355 - Better way to create display items for column backgrounds
Part 1: Remove current table item, as it's never set.

Part 2: Get rid of generic table painting code, and handle each class separately.

Part 4: Hoist outline skipping into col(group) frame code.

Part 5: Skip box-shadow for table column and column groups.

Part 6: Store column and column group backgrounds separately, and then append them before the rest of the table contents.

Part 7: Pass rects in display list coordinates to AppendBackgroundItemsToTop.

Part 8: Create column and column group background display items as part of the cell's BuildDisplayList.

Part 9: Used cached values instead of calling nsDisplayListBuilder::ToReferenceFrame when possible, since it can be expensive when the requested frame isn't the builder's current frame.

Part 10: Make sure we build display items for table parts where only the normal position is visible, since we may need to create background items for ancestors at that position.

Part 11: Create an AutoBuildingDisplayList when we create background items for table columns and column groups, so that we initialize the invalidation state correctly.
2020-04-14 12:58:11 +02:00
Matt A. Tobin cf288a1847 Issue #1053 - Remove android preprocessor directive from toolkit/locales/jar.mn 2020-04-14 12:57:54 +02:00
wolfbeast 0d1eea2ebf Revert #1091 Remove unboxed object code phase 1 + extras.
This should be the last code backout for this. merging this branch
should get us back to the way we were (+ additional code changes for
later changes) as fasr as the unused unboxed code is concerned.
2020-04-14 12:57:32 +02:00
wolfbeast af69cb07db Revert #1137 - Remove unboxed arrays
- accounting for removal of watch()/unwatch()
- updated for intermediate code changes.
2020-04-14 12:57:13 +02:00
wolfbeast dc4695406f Revert "Issue #1382 - Remove invalid assertion."
This reverts commit 9c6a8450b3.
2020-04-14 12:56:56 +02:00
wolfbeast c22a493144 Revert #1142 - Remove unboxed objects
- accounting for removal of watch()/unwatch()
2020-04-14 12:56:40 +02:00
Matt A. Tobin d20ca24a07 Issue #1053 - Remove android support from toolkit
Note: Does not remove support completely from toolkit/mozapps/installer or from telemetry or AppConstants.jsm
2020-04-14 12:56:02 +02:00
Matt A. Tobin b2ca17a298 Bug 1339444 - Remove unused resource://gre/modules/sqlite/sqlite_internal.js 2020-04-14 12:55:48 +02:00
Matt A. Tobin eb70e6e3d0 Issue #439 - Remove tests from toolkit/ 2020-04-14 12:55:19 +02:00
Matt A. Tobin 32ead79529 Issue #1053 - Remove android support from db 2020-04-14 12:55:00 +02:00
Matt A. Tobin 3e59235162 Issue #1053 - Remove android support from docshell 2020-04-14 12:54:47 +02:00
Matt A. Tobin 7494866cb5 Issue #1053 - Remove android support from hal 2020-04-14 12:54:30 +02:00
Matt A. Tobin 19bf63b0ee Issue #1053 - Remove android support from image 2020-04-14 12:54:15 +02:00
Matt A. Tobin 8b539ec9e7 Issue #1053 - Remove android support from intl/locale/nsLocaleService.cpp
This is the only non-icu file with android code in it. Not going to remove android in icu its self because it remains a 3rd party lib.
2020-04-14 12:54:01 +02:00
Matt A. Tobin ba0011606d Follow-up to 4e2e9be6a - Move HeapSnapshot DevTools-only Modules back to DevTools
I am so done with this.

Resolves #316
2020-04-14 12:53:46 +02:00
Matt A. Tobin ec2daa8dc9 Issue #1053 - Remove android support from memory 2020-04-14 12:53:27 +02:00
Matt A. Tobin 44c169c9be Issue #1053 - Remove android support from mfbt 2020-04-14 12:53:13 +02:00
Matt A. Tobin 57383be95d Issue #1053 - Remove android support from ipc except for ipc/chromium
This does not include android in the imported chromium code as specific research needs done on defines and logic.
2020-04-14 12:52:59 +02:00
Matt A. Tobin 6ef03f136b Issue #1053 - Remove android support from mozglue
Yes, I checked for unsaved files this time...
2020-04-14 12:52:45 +02:00
Matt A. Tobin d6bcaa6491 Issue #1053 - Remove android support from netwerk/protocol/http/nsHttpHandler.cpp 2020-04-14 12:52:32 +02:00
Matt A. Tobin 92edec6f58 Issue #1053 - Remove android support from netwerk 2020-04-14 12:52:18 +02:00
Matt A. Tobin 2dea4edfd7 Issue #1053 - Remove android support from storage/mozStorageConnection.cpp 2020-04-14 12:52:05 +02:00
Matt A. Tobin 54cb1b965e Issue #1053 - Remove android support from uriloader 2020-04-14 12:51:52 +02:00
Matt A. Tobin a6d1dd183d Issue #1053 - Remove android support from xpcom/threads/nsThread.cpp
Forgot to save..
2020-04-14 12:51:38 +02:00
Matt A. Tobin da15aa0fdf Issue #1053 - Remove android support from XPCOM 2020-04-14 12:51:25 +02:00
Matt A. Tobin 867737dd4b Remove redundant moz.build from db/ 2020-04-14 12:51:11 +02:00
Matt A. Tobin 36fc5f674e Reclassify heapsnapshot and nsJSInspector as not part of devtools
This resolves Issue #316
2020-04-14 12:50:57 +02:00
wolfbeast 7b30664f59 Set module default identification properly. 2020-04-14 12:50:42 +02:00
wolfbeast ef71f96a8d Remove gtest reference to non-existing path of removed component 2020-04-14 12:50:25 +02:00
wolfbeast 2b99226680 [gfx] Put Skia-specific CTOR init behind Skia-conditional. 2020-04-14 12:50:12 +02:00
wolfbeast 2794f0c48c Issue #316 - Make sure MOZ_DEVTOOLS_SERVER is passed down to js. 2020-04-14 12:49:36 +02:00
Matt A. Tobin 2f23073a3a Issue #1053 - Remove android support from NPAPI 2020-04-14 12:49:22 +02:00
Matt A. Tobin 496fbaf738 Issue #1053 - Remove conditional android code from widget/ 2020-04-14 12:49:08 +02:00
Matt A. Tobin 85621ee9b3 Issue #1053 - Remove Android Widget Toolkit specific files 2020-04-14 12:48:53 +02:00
Matt A. Tobin ee6595e6de Issue #439 - Remove tests from widget/ 2020-04-14 12:48:40 +02:00
wolfbeast 201be4d8fc Issue #316 - Be more gentle with the CC and nursery. 2020-04-14 12:48:23 +02:00
wolfbeast 9e586a1d0e Issue #316 - Pre-process Performance.webidl 2020-04-14 12:48:09 +02:00
wolfbeast 009c9dd2f8 Issue #316 - Make the memory GC performance object conditional (WIP)
This was only added for GCubench and likely interfering with building
without devtools-server.
2020-04-14 12:47:56 +02:00
Matt A. Tobin 6407f1abd4 Issue #1457 - Unfold sqlite3 from nss 2020-04-14 12:47:38 +02:00
wolfbeast 28f0155307 Issue #1383 - Remove "Copy raw data to clipboard" button
This resolves #1383
2020-04-14 12:47:23 +02:00
JustOff 11ede87242 Issue #1445 - Add a link to details on using Firefox extensions in Pale Moon 2020-04-14 12:47:05 +02:00
Matt A. Tobin 3630fec559 Issue #1454 - Add MOZ_PKG_SPECIAL to UpdateUtils 2020-04-14 12:46:46 +02:00
JustOff d062e7311c Issue #1445 - strings cleanup 2020-04-14 12:46:29 +02:00
wolfbeast 0313ac74fd Issue #1445 - remove redundant nativeIndicator
This resolves #1445
2020-04-14 12:46:14 +02:00
Matt A. Tobin 9612c64265 Issue #1320 - Stop appending cpu arch to the end of %BUILD_TARGET% on Windows in UpdateUtils.jsm 2020-04-14 12:45:59 +02:00
wolfbeast c5d570792d Issue #1445 - Use the detailed string also in the list entries. 2020-04-14 12:45:44 +02:00
wolfbeast 10c4e73e56 Issue #1446 - Only match extension add-on types for target applications.
This resolves #1446
2020-04-14 12:45:31 +02:00
win7-7 c9fd86cb78 Issue #1355 - Make nsTableCellFrame::GetColIndex/GetRowIndex faster
We can devirtualize it, remove some branches.
2020-04-14 12:45:15 +02:00
wolfbeast 550d634ff5 Issue #1446 - Only allow extension add-on types for Firefox compat mode. 2020-04-14 12:44:56 +02:00
wolfbeast bbee80fa1c Issue #1445 - Clarify the status of extensions in the Add-On manager
This resolves #1445.
2020-04-14 12:44:41 +02:00
wolfbeast 8ffe533b3d [CSS] Only emit non-GC chrome wrapped XUL box warnings in debug builds. 2020-04-14 12:44:16 +02:00
wolfbeast 9670bdb685 Issue #1441 - Guard appomni/greomni with UXP_CUSTOM_OMNI env var.
This adds an addition to the environment set up for child processes
(plugin container) so that it may still be able to pass the omni
parameters there as-needed.
2020-04-14 12:44:02 +02:00
wolfbeast 8fa80e2c8d Revert "Issue #1441 - Guard appomni/greomni with UXP_CUSTOM_OMNI env var."
This reverts commit 2bdbca39b2.
2020-04-14 12:43:49 +02:00
Simon Giesecke a377d1ecd4 [IndexedDB] Ensure that strong references to newly created cursors are
kept until the DOM Binding is created.

This fixes random crashes on websites that use IndexedDB cursors.
See also BZ bug 1599420
2020-04-14 12:43:34 +02:00
Henri Sivonen 1ebbb0af03 [Parser] Move setting context to null to the correct location. 2020-04-14 12:43:22 +02:00
wolfbeast 29b13d3523 Issue #1441 - Guard appomni/greomni with UXP_CUSTOM_OMNI env var. 2020-04-14 12:43:06 +02:00
sotaro 76476ed75b [Layers] Clear WrappingTextureSourceYCbCrBasic::mTexture correctly 2020-04-14 12:42:53 +02:00
wolfbeast 84fc500ff2 [Network] Bump http channel default Firefox CompatMode init value. 2020-04-14 12:42:38 +02:00
wolfbeast 2560dd2514 Fix a whitespace issue in nsComputedDOMStyle.cpp 2020-04-14 12:42:23 +02:00
wolfbeast 0e2b0db4d7 [CSS] Add stub for font-variation-settings
This stub is added because websites insist on considering this
very hardware-dependent and O.S.-variable low-level font-control
as a "critical feature" which it isn't as there is 0 guarantee
that font variation settings are supported or honored by any
operating system used by the client.

On top this is a WD status feature that sites shouldn't be using, and
the feature itself is strongly discouraged for use in favor of standard
CSS font manipulation keywords like `font-weight`.
2020-04-14 12:42:10 +02:00
wolfbeast c4f65de9b2 [CSP] Allow not having a Port for RessourceURI if the Scheme has no
Default Port
2020-04-14 12:41:57 +02:00
Matt A. Tobin e3148b0a25 Issue #65 - Correct nsHelperAppDlg.js for bad preprocessing conversion 2020-04-14 12:41:44 +02:00
Matt A. Tobin fe6730c219 Issue #80 - Stop building non-generated dom/binding files as UNIFIED_SOURCES
Also fix deprot
2020-04-14 12:41:31 +02:00
Matt A. Tobin 2e44ddb15e Directly assign PrimitiveConversions.h to the generated binding of KeyframeAnimationOptions.
This is a hack to deal UnifiedBindings trying to deal with an incomplete codegen implementation so it was worked around with a hack back in Firefox 30-something. If we have anymore of this non-sense crop up as stuff is added or removed from DOM then extend this conditional.

Least until something better comes along.
2020-04-14 12:41:12 +02:00
win7-7 da74d1f3f3 Issue #1355 - Do less work for columns not in the desired set in PaintRowGroupBackgroundByColIdx
Do less work in PaintRowGroupBackgroundByColIdx for cells that are not in our desired set of columns.

crash fix:

Guard against empty column groups when building a display list for a table.
2020-04-14 12:40:47 +02:00
Matt A. Tobin 91be118376 Issue #65 - Don't split in the middle of assignment statements in createProfileWizard.js 2020-04-14 12:40:06 +02:00
Matt A. Tobin 2258e09d59 Issue #65 - Correct fallthough case in profileSelection.js 2020-04-14 12:39:51 +02:00
Matt A. Tobin 30ec922d7e Issue #65 - Remove AppConstants from toolkit/components/passwordmgr 2020-04-14 12:39:35 +02:00
Matt A. Tobin 1000488a5b Issue #65 - Remove AppConstants from toolkit/components/alerts 2020-04-14 12:39:21 +02:00
Matt A. Tobin ffe75592e3 Issue #65 - Remove AppConstants from toolkit/components/places 2020-04-14 12:39:08 +02:00
Matt A. Tobin 0084e71953 Issue #65 - Remove AppConstants from toolkit/components/apppicker 2020-04-14 12:38:54 +02:00
Matt A. Tobin dbeceecde2 Issue #65 - Remove AppConstants from toolkit/components/thumbnails 2020-04-14 12:38:41 +02:00
Matt A. Tobin 9fc28c55c3 Issue #65 - Remove AppConstants from toolkit/components/printing 2020-04-14 12:38:27 +02:00
Matt A. Tobin 113a825c1f Issue #65 - Remove AppConstants from toolkit/components/satchel 2020-04-14 12:38:14 +02:00
Matt A. Tobin 419abfb09f Issue #65 - Remove AppConstants from toolkit/components/jsdownloads 2020-04-14 12:37:58 +02:00
Matt A. Tobin 4e58dab0a1 Issue #65 - Remove AppConstants from toolkit/mozapps/downloads 2020-04-14 12:37:44 +02:00
Matt A. Tobin 9e42d9ea2f Issue #65 - Remove AppConstants from toolkit/mozapps/extensions 2020-04-14 12:37:29 +02:00
Matt A. Tobin 377f54f3fe Issue #65 - Remove AppConstants from toolkit/mozapps/update 2020-04-14 12:37:16 +02:00
Matt A. Tobin 62f39d829d Issue #65 - Remove AppConstants from toolkit/profile 2020-04-14 12:37:02 +02:00
win7-7 28971524e4 fix whitespace
fix whitespace.
2020-04-14 12:36:29 +02:00
win7-7 be37269123 Issue #1386 - Devirtualize GetRowSpan/GetColSpan
It's at ~1.5% on the perf log for the Netflix use case, which seems a bit too much.
2020-04-14 12:36:12 +02:00
Matt A. Tobin 8acff5cdbe Issue #1395 - Part 2: Remove the rest of FlyWeb 2020-04-14 12:35:06 +02:00
Matt A. Tobin 11a4ab0982 Issue #1395 - Remove FlyWeb Service 2020-04-14 12:31:31 +02:00
Matt A. Tobin 8c41fcd240 Issue #1390 - Get rid of the Presentation API 2020-04-14 12:31:16 +02:00
Matt A. Tobin 27f4e60be8 Issue #1390 - Remove secondscreen modules from toolkit 2020-04-14 12:31:03 +02:00
wolfbeast aae1baabe9 [AM] Remove shared theme leftovers for webextensions 2020-04-14 12:30:49 +02:00
Matt A. Tobin f620afc446 Issue #1392 - Change --enable-eme to MOZ_ARG_ENABLE_BOOL and remove MOZ_EME_MODULES 2020-04-14 12:30:34 +02:00
Moonchild 456f4a5891 Update UXP Coding Style.md
Be more explicit about paranthesis spacing
2020-04-14 12:30:16 +02:00
Moonchild 84d99e2996 Update UXP Coding Style.md
Minor typo
2020-04-14 12:30:03 +02:00
wolfbeast e29301f5d0 Issue #26 - Part 2c: Remove dependence on gmp/widevine-adapter/* 2020-04-14 12:29:44 +02:00
wolfbeast 369ad75fc8 Issue #26 - Part 2b: Stub out GMPDecryptorProxy functions.
If EME isn't built, these functions would have no use and the callback
structures are unavailable. Stubbing these out will still allow the
callers to work unchanged, but in effect simply always return without
dispatching a promised task.
This fixes the dependency issue from part 2a.
2020-04-14 12:29:29 +02:00
wolfbeast 37e3135bc5 Issue #26 Part 2a: make more EME code conditional.
- Exclude missed MediaKey functions and CDMProxy code.
- Exclude EME APIs frm being built (webidl change)
- Fix tests in --disable-eme state
2020-04-14 12:29:16 +02:00
wolfbeast 259bd2e977 [Installer] Updated the 7-zip stub binary to make sure it doesn't hang
on older versions of Windows but instead provides a usable error message
2020-04-14 12:28:34 +02:00
win7-7 0ebdc99757 Issue #1384 - Match standard for colSpan/rowSpan
HTML standardizes proper behavior of colSpan and rowSpan:

The main thing is that getting the .rowSpan and .colSpan IDL properties will now return the actual clamped value that we use.
2020-04-14 12:28:14 +02:00
wolfbeast 68d3bc54fb Issue #1382 - Remove invalid assertion.
There is flexibility in exactly the value the initialized length must
hold, i.e. if an array is completely empty, it is valid for the
initialized length to be any value between zero and the length of the
array, as long as the in-memory values below the initialized length have
been initialized with a hole value.
In the case of 0, the array is packed and the move operation would be a
nop, so simply convert the assert to a condition to save some cycles.
2020-04-14 12:28:00 +02:00
win7-7 2109f36dd4 Issue #1355 - Hit testing in large tables has become extremely slow
Add dirty rect intersection checks so that we don't build unnecessary table part display items.
2020-04-14 12:27:45 +02:00
wolfbeast 58f10adc97 Revert "Issue #1355 - Hit testing in large tables has become extremely slow"
This reverts commit f7b2f0a665.
2020-04-14 12:27:31 +02:00
win7-7 05c68a17a0 Issue #1355 - Hit testing in large tables has become extremely slow
Add dirty rect intersection checks so that we don't build unnecessary table part display items.
2020-04-14 12:27:14 +02:00
New Tobin Paradigm f78958a020 Fix preprocessor directive in UserAgentUpdates.jsm 2020-04-14 12:26:58 +02:00
wolfbeast bcd6c96aec Issue #1378 - Follow-up: make sure background items remain table-aligned. 2020-04-14 12:26:44 +02:00
Matt A. Tobin 73289f5389 Issue #65 - Remove AppConstants from toolkit/modules
Except for secondscreen
2020-04-14 12:26:25 +02:00
Matt A. Tobin 4acc0d58cb Issue #65 - Remove AppConstants from toolkit/content 2020-04-14 12:26:11 +02:00
Matt A. Tobin a1c9dd468d Issue #65 - Remove AppConstants from netwerk/ 2020-04-14 12:25:58 +02:00
Matt A. Tobin 0a5acb852a Issue #65 - Remove AppConstants from mailnews/ 2020-04-14 12:25:45 +02:00
Matt A. Tobin c8bbebe59d Issue #65 - Remove AppConstants from dom/ 2020-04-14 12:25:32 +02:00
wolfbeast fddc35e438 Issue #1378 - Align the drawing of table cell backgrounds with the spec. 2020-04-14 12:22:44 +02:00
Matt A. Tobin 7e4efa4e1f Issue #1377 - Fix porting typo in mailnews/base/search/content/searchWidgets.xml
MailNews Core being historically comm tended to avoid defining shorthand for Components.interfaces
2020-04-14 12:21:51 +02:00
wolfbeast 84b5515a8d Issue #447 - Update HSTS preload list & reduce debug spew
Commented out spewing dump() statements in loops. With the ever growing
HSTS list it takes too much time and is pointless to display.
2020-04-14 12:21:27 +02:00
wolfbeast 6b7fa183dd Issue #1342 - Remove support for system libvpx 2020-04-14 12:21:10 +02:00
wolfbeast a43d59bcbf Issue #1342 - Remove support for system sqlite 2020-04-14 12:20:23 +02:00
wolfbeast ac6896b599 Issue #1342 - Update old.configure for removed build options 2020-04-14 12:20:08 +02:00
wolfbeast 171053d0b2 Issue #1342 - Remove support for system linbpng 2020-04-14 12:19:55 +02:00
win7-7 efd88ee999 Issue #1355 - Speed up the traversal of a table row frame's child cells
Speed up getting the first cellframe in a row and the next cellframe after the given one
2020-04-14 12:19:39 +02:00
wolfbeast 9a74d53315 Issue #1342 - Remove support for system NSPR/NSS 2020-04-14 12:18:35 +02:00
wolfbeast e2a478072a Issue #1342 - Remove support for system ICU 2020-04-14 12:18:21 +02:00
wolfbeast cb06cac81d [WebRequest] Remove AddonManagerPermissions leftovers
This was added as part of the WebExtension sec issue CVE-2017-5389.
Since we no longer have this interface, it needed to be removed to
prevent errors in the WebRequest channel callback.
2020-04-14 12:17:58 +02:00
athenian200 c3d92cd338 Issue #1356 - Add tests.
Forgot to include these before.
2020-04-14 12:17:34 +02:00
athenian200 8ae2267eac Issue #1356 - Restore older syntax.
Some newer Firefox syntax snuck into my last bug. Just to be on the safe side I'm restoring the older syntax here.
2020-04-14 12:16:48 +02:00
athenian200 563dc95cdb Issue #1356 - Remove -moz-user-input disabled to improve event handling. 2020-04-14 12:16:31 +02:00
wolfbeast 7e59ac9036 Issue #1360 - Enable acceleration by default on all known-good platforms. 2020-04-14 12:15:53 +02:00
wolfbeast f1e40aaa5b Issue #1360 - Part 2: Update tests for changed preferences. 2020-04-14 12:14:27 +02:00
wolfbeast 068372c618 Issue #1360 - Part 1: Simplify layers acceleration prefs.
This gets rid of platform-dependent hard-coded defaults, but keeps
build-time blocking if there is no GL provider (in which case layers
acceleration almost certainly won't work because it needs a GL
compositor and would likely crash without)

New prefs are
- layers.acceleration.enabled to enable HWA
- layers.acceleration.force to force it enabled (requires .enabled to be
  set as well)

This is the platform part of this issue. The rest will be front-end work
(Preference UI integration and pref migration)
2020-04-14 12:14:11 +02:00
Moonchild a1cce3b2b0 Merge pull request #1371 from athenian200/ftp-list
Potential hang on bad FTP sequence
2020-01-26 08:26:23 +00:00
athenian200 7d53919c26 Fix whitespace. 2020-01-26 01:51:37 -06:00
athenian200 8bb5db350d Issue #1349 - Stop 2xx FTP responses from causing browser to hang.
LIST and RETR still appear to work as intended on ftp:// URLs after my changes. I wasn't able to test STOR because the browser doesn't appear to support FTP uploads at this time (although our FTP implementation appears perfectly capable of doing an FTP upload.)

If I understood the issue correctly, though, what we're doing is ensuring that we receive a preliminary 100 response from the FTP server for a given action before jumping to the 200 code describing what we do if the action was completed. Even though it makes no logical sense for a server to say an action was completed before it was initiated, someone could write a really annoying FTP server that takes advantage of this fact to crash the browser if they wanted.
2020-01-26 01:40:55 -06:00
wolfbeast a64ac6d702 No issue - Always use jemalloc allocator for storage memory when
MOZ_MEMORY is defined (which is defined by enabling jemalloc in config)
2020-01-23 15:17:51 +01:00
Kai Engert 6d761aa68f Issue #1338 - Follow-up: Also cache the most recent PBKDF1 hash
This rewrites the caching mechanism to apply to both PBKDF1 and PBKDF2
2020-01-23 13:11:09 +01:00
wolfbeast 90c5288fef Issue #1342 - Remove support for system libevent 2020-01-23 13:08:02 +01:00
wolfbeast 3624078103 Issue #1366 - Fix build bustage from erroneously removing 2 function implementations. 2020-01-22 21:42:10 +01:00
wolfbeast 5a6059feef Issue #1354 - Fix another potential crashing scenario in WebGL.
(merge of gl-work branch)
2020-01-22 11:51:19 +01:00
Moonchild 8e33fa9c4b Merge pull request #1367 from g4jc/showmodaldialog
Completely remove showModalDialog
2020-01-22 10:35:12 +00:00
Gaming4JC a9290ef91e Issue #1366 - Completely remove showModalDialog 2020-01-21 21:36:54 -05:00
wolfbeast fabe21d593 Issue #1354 - Fix typo 2020-01-21 21:23:46 +01:00
wolfbeast c6dbf55449 Issue #1354 - Clear the current context when MakeCurrent() fails. 2020-01-20 22:42:14 +01:00
wolfbeast 722161775b Issue #1338 - Bump NSS version
Our NSS version is closer to the currently-released .1, so bump version
to that.
Note: we still have some additional patches to the in-tree version in
place so this isn't a 100% match to the RTM one.
2020-01-20 11:59:36 +01:00
wolfbeast 71d8ada4a9 Merge branch 'master' of https://github.com/MoonchildProductions/UXP 2020-01-19 14:40:01 +01:00
wolfbeast e0baeba546 Issue #1362 - Revert "Implement regular expression lookbehind"
This reverts commit fa473930f4.
2020-01-19 14:39:14 +01:00
wolfbeast b1abb9aebe Issue #1362 - Revert "Update js/src/builtin/TestingFunctions.cpp for
regex lookbehind changes"

This reverts commit e79607a7a6.
2020-01-19 14:36:29 +01:00
Matt A. Tobin 22198ec194 Issue #1358 - Default to SSL/TLS when using the Account Wizard 2020-01-18 14:09:43 -05:00
Matt A. Tobin c137a4045c Issue #1359 - Pointlessly rename greprefs.. again. 2020-01-18 13:17:41 -05:00
wolfbeast 63219a15b1 Minor update to the html5 parser component doc 2020-01-18 13:25:35 +01:00
wolfbeast b87a4551b5 No issue - Fix unsafe http methods on HTTP/2 with TLSv1.3 0RTT. 2020-01-18 13:17:09 +01:00
wolfbeast 82dffb32bd Add component documentation for the HTML5 parser. 2020-01-18 13:01:53 +01:00
wolfbeast a2073c54b4 Revert "No issue - Fix unsafe http methods on HTTP/2 with TLSv1.3 0RTT."
This reverts commit 67d336a6f2.
2020-01-18 02:08:53 +01:00
wolfbeast 67d336a6f2 No issue - Fix unsafe http methods on HTTP/2 with TLSv1.3 0RTT. 2020-01-17 17:11:06 +01:00
Matt A. Tobin e4c4c20e7e Update readme instructions for how to use the java html5 parser codegen makefile 2020-01-16 07:43:21 -05:00
Matt A. Tobin ed60101550 Merge branch 'html5-parser-work' 2020-01-16 07:32:48 -05:00
Matt A. Tobin 927c386dd8 Regenerate nsHtml5*.cpp files from java htmlparser sources 2020-01-16 07:28:40 -05:00
Matt A. Tobin 635baac21a Update the html5 parser java codegen makefile to clean up snapshot javasrc 2020-01-16 07:22:22 -05:00
Matt A. Tobin c050c611df Update gitignore to no longer track snapshot javasrc for the html5 parser 2020-01-16 07:19:29 -05:00
Matt A. Tobin 9dbbc6c08f Remove obsolete javasrc snapshot 2020-01-16 07:17:55 -05:00
Matt A. Tobin 72779c9dde Update java htmlparser copyright on code to be translated to cpp 2020-01-16 07:16:39 -05:00
Matt A. Tobin e93b373374 Fix an issue with the html5 tokenizer and tree builder (java htmlparser) 2020-01-15 22:07:59 -05:00
wolfbeast fa816e1ec6 No issue - Fix some line endings in WebGLShaderValidator.cpp 2020-01-16 01:41:21 +01:00
wolfbeast 7007ec9e42 Issue #1354 - Don't allow glsl[130,400] unless we have gpu_shader5
- Teach GLContext about gpu_shader5
- Downgrade shader language version if gpu_shader5 support isn't found.
2020-01-16 01:40:30 +01:00
wolfbeast 058105eec0 Issue #1354 - Cherry-pick ANGLE update for broken drivers that support
required indexing but not the extensions.
2020-01-16 01:31:47 +01:00
Matt A. Tobin 3da18fda02 Bug 1562033
Adjust tokenization of U+0000 (java htmlparser)
2020-01-15 18:10:14 -05:00
Matt A. Tobin ee1d953749 Bug 1347737 - Introduce a new non-heap-allocated type for holding nsStringBuffer* in the HTML parser. (java htmlparser) 2020-01-15 16:55:12 -05:00
Matt A. Tobin 984790c6fb Bug 1555523 (java htmlparser version) 2020-01-15 16:18:08 -05:00
Matt A. Tobin 6f27b4eb34 Bug 1322938 - Make the tree builder aware of <dialog>.
Tag #1343 | https://hg.mozilla.org/projects/htmlparser/rev/d9bdf700af247563fec9b07b52ede6bf61edd513
2020-01-15 15:30:54 -05:00
Matt A. Tobin 2ac58ecef8 Update the java codegen makefile for having the two libs in-tree and change a few target names so they aren't obnoxious 2020-01-15 14:59:35 -05:00
Matt A. Tobin 03fb2e2294 Add the java javaparser
https://github.com/javaparser/javaparser/
Invisible tag: javaparser-1.0.6
2020-01-15 14:58:11 -05:00
Matt A. Tobin 6168dbe21f Add java htmlparser sources that match the original 52-level state
https://hg.mozilla.org/projects/htmlparser/
Commit: abe62ab2a9b69ccb3b5d8a231ec1ae11154c571d
2020-01-15 14:56:04 -05:00
Matt A. Tobin 09314667a6 Update gitignore for import of java html5 codegen and parser sources 2020-01-15 14:45:20 -05:00
wolfbeast 82804d2002 Issue #1332 - Enable seeking to next frame by default.
The indicated BZ bug was resolved in Gecko 50, and could have already
been enabled before (since it returns a promise as-required).
With the rest of promise-based media implemented it makes no sense to
keep this disabled on production.
2020-01-14 15:51:26 +01:00
wolfbeast 8d65feff0a No issue - Remove some unused webextension sync preferences. 2020-01-14 15:48:23 +01:00
wolfbeast da7423057d Issue #1319 - Set some obvious prefs for production builds.
This sets some defaults for production builds that should be
self-explanatory.
2020-01-14 15:47:27 +01:00
wolfbeast cbbae72431 Issue #1353 - Disable remote jar: URIs by default.
Considering the one exception this was still enabled for on all versions
of Firefox since 45 until our fork point is no longer applicable.
This resolves #1353
2020-01-14 15:29:08 +01:00
wolfbeast 1392abe1de No issue - Remove unused network.http.bypass-cachelock-threshold pref. 2020-01-14 15:07:15 +01:00
wolfbeast abf6fd8f2a No issue - Don't define gamepad prefs when gamepad support isn't built.
This also sets sane defaults when present. See also #1319.
2020-01-14 14:45:33 +01:00
wolfbeast 0257b657d2 Issue #1319 - Enable promise debugging only in DEBUG builds. 2020-01-14 14:44:13 +01:00
wolfbeast 4a038e2b4b Issue #1319 - Disable MOZ_LOGGING in production builds.
This makes it only enabled in debug builds, instead, where logging
would be most useful.
2020-01-14 13:35:03 +01:00
wolfbeast 6d342dbab9 Issue #1319 - Remove stderr_to_file.
This local-debug function is only useful for Android to work around
issues with logspewing and should never be in production builds anyway.
2020-01-14 13:23:39 +01:00
wolfbeast 217dca872b Fix comments for NSS PBKDF setup (no code change) 2020-01-14 13:14:57 +01:00
Kai Engert 3733205f09 Issue #1338: Follow-up: Cache the most recent PBKDF2 password hash,
to speed up repeated SDR operations.

Landed on NSS-3.48 for Bug 1606992
2020-01-14 13:08:48 +01:00
wolfbeast aa2ac8dded Reinstate the java->c++ source, generator code + documentation.
We've kept the java source up-to-date until its removal, so there should
be very little additional java mangling needed to have it back up to
speed and usable again.

This reverts commit c6446f1126.
2020-01-13 09:32:00 +01:00
wolfbeast 60dc9eaa95 Simplify some alias sets in IonMonkey. 2020-01-11 13:09:17 +01:00
wolfbeast 06dbb7b7dd Prefer file extension as-provided over default extension for mimetype to
look up default applications on Windows
2020-01-11 12:53:56 +01:00
Daiki Ueno f64e760ab0 Issue #1338 - Followup: certdb: propagate trust information if trust
module is loaded afterwards,

Summary: When the builtin trust module is loaded after some temp certs
being created, these temp certs are usually not accompanied by trust
information. This causes a problem in UXP as it loads the module from a
separate thread while accessing the network cache which populates temp
certs.

This change makes it properly roll up the trust information, if a temp
cert doesn't have trust information.
2020-01-10 20:34:53 +01:00
wolfbeast 095a02f259 Update GTK clipboard handling
- Store the clipboard even if it was set in a GTK dialog.
- Fix a GtkTargetList leak.
- Notify GTK that the data is no longer available for
clipboard_get_cb(), so that GTK will no longer advertise nor attempt to
store the data.
2020-01-10 19:40:14 +01:00
wolfbeast 9365776219 Issue #1338 - Un-bust building of NSS after update to 3.48 on Linux. 2020-01-10 18:17:14 +01:00
wolfbeast 0186023f4a Handle missing base64 challenge in NegotiateAuth and NTLMAuth. 2020-01-09 22:35:03 +01:00
Yaron Tausky 51b1cd97aa Make copy of list before iterating over it. 2020-01-09 22:23:13 +01:00
wolfbeast 8198126c39 Be more consistent about decoding IP addresses in PSM. 2020-01-09 21:39:28 +01:00
wolfbeast d429ac8a60 Simplify value setting.
This gets rid of unused boolean return values on setters and a level of
indirection for calls to set values.
2020-01-09 18:26:06 +01:00
Moonchild 29bf28ca34 Merge pull request #1347 from g4jc/html5_dialog
Implement HMTL5 <dialog>
2020-01-09 13:07:56 +00:00
wolfbeast d79cc5fb49 Issue #1348 - Part 3: Set IS_PRIVATE input scope in private browsing.
Microsoft IME on Windows 10 20H1 (build 19025+) supports IME private
mode by input scope. Although previous Windows versions use an
undocumented API for Edge and IE only, the next Windows 10 release will
use a public API for it.
We pre-empt this potential privacy concern by setting the IS_PRIVATE
flag when in PB mode.
2020-01-09 13:22:29 +01:00
wolfbeast 8ae047bbbf Issue #1348 - Part 2: Teach IMEState about Private Browsing mode. 2020-01-09 13:19:56 +01:00
Makoto Kato 1672355a77 Issue #1348 - Part 1: Clean up input scope support for IMM32.
Use AutoTArray to set input scope.
2020-01-09 09:53:16 +01:00
Gaming4JC 52bda2a828 Bug 1379728 part 1. Remove the double-definition of the 'close' event from EventNameList.h.
Tag #1343
2020-01-07 18:33:24 -05:00
Gaming4JC 25e85f99ce Bug 1322938 - Make the HTML tree builder aware of <dialog>.
Original patch by :hsivonen
Tag #1343
2020-01-07 18:33:24 -05:00
Gaming4JC b91b0c37eb Bug 1322938 - Put <dialog> element behind preference.
Tag #1343
2020-01-07 18:33:23 -05:00
Gaming4JC a4011e7246 Bug 1322938 - Update <dialog> element Web Platform Tests expected results.
Tag #1343
2020-01-07 18:33:23 -05:00
Gaming4JC ef2cd8749f Bug 1322938 - Emit close event when HTMLDialogElement.prototype.close() is called.
Tag #1343
2020-01-07 18:33:23 -05:00
Gaming4JC 2e3b937f4e Bug 1322938 - Basic implementation of HTMLDialogElement.
Tag #1343
2020-01-07 18:33:22 -05:00
wolfbeast c032651778 Reject sample rates that are out-of-range for libsoundtouch.
We never reach this with our normal use of this lib but adding the
sanity check just in case. (ported from upstream)
2020-01-07 21:24:58 +01:00
Moonchild c66b70c4da Merge pull request #1346 from JustOff/PR_CSSStyleSheet_legacy
Issue #1345 - Implement non-standard legacy CSSStyleSheet rules
2020-01-07 12:30:21 +00:00
JustOff b4d686d62d Issue #1345 - Implement non-standard legacy CSSStyleSheet rules 2020-01-07 13:05:05 +02:00
5391 changed files with 106236 additions and 452678 deletions

No files matched your search

+5 -3
View File
@@ -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
+6
View File
@@ -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
+3
View File
@@ -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
View File
@@ -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).
+21 -27
View File
@@ -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));
}
}
+6
View File
@@ -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
+15 -5
View File
@@ -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
View File
@@ -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
+2 -32
View File
@@ -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])
-3
View File
@@ -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=
-6
View File
@@ -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'
]
+27 -16
View File
@@ -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)
+3 -7
View File
@@ -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',
-5
View File
@@ -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"
+72
View File
@@ -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)
-4
View File
@@ -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)
+10 -12
View File
@@ -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']
+4 -8
View File
@@ -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']
+1 -10
View File
@@ -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
+8 -11
View File
@@ -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',
]
+3 -5
View File
@@ -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
-1
View File
@@ -13,7 +13,6 @@
PR_*
PL_*
#endif
#include ../../../db/sqlite3/src/sqlite.symbols
ATOB_AsciiToData
ATOB_AsciiToData_Util
ATOB_ConvertAsciiToItem
-22
View File
@@ -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'
-3
View File
@@ -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
View File
@@ -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
-32
View File
@@ -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
+5 -5
View File
@@ -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
View File
@@ -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',
]
-11
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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;
+33 -15
View File
@@ -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
View File
@@ -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.
+9 -57
View File
@@ -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',
)
-1
View File
@@ -17,7 +17,6 @@ DIRS += [
'heapsnapshot',
'inspector',
'jsbeautify',
'jsinspector',
'layout',
'locales',
'node-properties',
+2 -1
View File
@@ -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
View File
@@ -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
-2
View File
@@ -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.
{
+11 -29
View File
@@ -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);
-22
View File
@@ -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 },
+2
View File
@@ -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 {
+1
View File
@@ -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 {
+1
View File
@@ -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"
+2
View File
@@ -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 {
+5 -2
View File
@@ -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',
+2
View File
@@ -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
+1
View File
@@ -12,6 +12,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/dom/File.h"
using namespace mozilla;
using namespace mozilla::dom;
USING_ARCHIVEREADER_NAMESPACE
+1 -1
View File
@@ -13,7 +13,7 @@ EXPORTS.mozilla.dom.archivereader += [
'ArchiveZipFile.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'ArchiveEvent.cpp',
'ArchiveReader.cpp',
'ArchiveRequest.cpp',
+2 -4
View File
@@ -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')
+3
View File
@@ -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 {
+2
View File
@@ -7,6 +7,8 @@
#ifndef CORSMode_h_
#define CORSMode_h_
#include <stdint.h>
namespace mozilla {
enum CORSMode : uint8_t {
+1
View File
@@ -7,6 +7,7 @@
#include "mozilla/Base64.h"
#include "mozilla/BasePrincipal.h"
#include "jsfriendapi.h"
namespace mozilla {
namespace dom {
+1
View File
@@ -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 {
+3
View File
@@ -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"
+1
View File
@@ -6,6 +6,7 @@
#include "mozilla/StaticPtr.h"
#include "mozilla/ClearOnShutdown.h"
#include "nsIDocShell.h"
#include "nsNetCID.h"
namespace mozilla {
namespace dom {
+1
View File
@@ -7,6 +7,7 @@
#ifndef DocGroup_h
#define DocGroup_h
#include "nsIDocument.h"
#include "nsISupports.h"
#include "nsISupportsImpl.h"
#include "nsIPrincipal.h"
+2
View File
@@ -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"
+2
View File
@@ -8,6 +8,8 @@
* animating */
#include "ImageTracker.h"
#include "mozilla/Preferences.h"
#include "nsAppRunner.h" // for XRE_IsContentProcess
namespace mozilla {
namespace dom {
+1
View File
@@ -10,6 +10,7 @@
#ifndef mozilla_dom_ImageTracker
#define mozilla_dom_ImageTracker
#include "imgIRequest.h"
#include "nsDataHashtable.h"
#include "nsHashKeys.h"
+3
View File
@@ -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"
+1
View File
@@ -5,6 +5,7 @@
#include "MutableBlobStreamListener.h"
#include "MutableBlobStorage.h"
#include "nsIInputStream.h"
namespace mozilla {
namespace dom {
-59
View File
@@ -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
-9
View File
@@ -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
+1
View File
@@ -15,6 +15,7 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/Likely.h"
#include "mozilla/Unused.h"
#include "nsNodeInfoManager.h"
#include "nsCOMPtr.h"
+1
View File
@@ -8,6 +8,7 @@
#define mozilla_dom_Pose_h
#include "nsWrapperCache.h"
#include "mozilla/ErrorResult.h"
namespace mozilla {
namespace dom {
+2
View File
@@ -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"
+1
View File
@@ -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"
+1
View File
@@ -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 {
+2
View File
@@ -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 {
+2
View File
@@ -7,6 +7,8 @@
#ifndef TimerClamping_h___
#define TimerClamping_h___
#include <math.h>
namespace mozilla {
class TimerClamping
+2 -2
View File
@@ -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',
]
+34
View File
@@ -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)
{
+13
View File
@@ -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:
+1
View File
@@ -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;
+3 -1
View File
@@ -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);
+4
View File
@@ -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;
+2 -1
View File
@@ -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;
}
-1
View File
@@ -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)
-8
View File
@@ -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());
+9
View File
@@ -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
View File
@@ -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
+1 -60
View File
@@ -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);
}
+1
View File
@@ -57,6 +57,7 @@
#include "mozilla/dom/ErrorEvent.h"
#include "nsAXPCNativeCallContext.h"
#include "mozilla/CycleCollectedJSContext.h"
#include "mozilla/Telemetry.h"
#include "nsJSPrincipals.h"
+1
View File
@@ -31,6 +31,7 @@
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ScriptSettings.h"
using namespace mozilla;
using namespace mozilla::dom;
bool
-10
View File
@@ -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;
+1 -2
View File
@@ -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;
+1 -1
View File
@@ -1144,7 +1144,7 @@ nsScriptLoader::InstantiateModuleTree(nsModuleLoadRequest* aRequest)
nsModuleScript* ms = aRequest->mModuleScript;
MOZ_ASSERT(ms);
if (!ms->ModuleRecord()) {
if (!ms || !ms->ModuleRecord()) {
return false;
}
-4
View File
@@ -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>
-31
View File
@@ -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>
-22
View File
@@ -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);
}
-13
View File
@@ -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' ],
},
+6
View File
@@ -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
View File
@@ -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"
+1
View File
@@ -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