Compare commits

..
Author SHA1 Message Date
Moonchild 49a96b1d91 Merge branch 'master' into release 2022-11-19 20:15:23 +00:00
Moonchild c127f58ef3 [XPCOM] Deal with lstat potentially lying in nsLocalFileUnix. 2022-11-19 20:11:34 +00:00
Moonchild 5e6006a2bd [network] Fix Mac buffer overflow. 2022-11-19 14:23:40 +00:00
Moonchild ac9253e987 WebSocketChannel::CleanupConnection should run on the socket thread 2022-11-19 14:06:18 +00:00
Moonchild 8778d48290 [Network, DOM] Align our implementation with the current CORS/Fetch spec. 2022-11-18 20:00:59 +00:00
Moonchild 3130812693 Merge branch 'master' into release 2022-11-12 18:34:07 +00:00
Moonchild fb0c204f2b Issue #1769 - Follow-up: Default-enable JPEG-XL images if built
Sets the pref default to true and also add conneg entry for images
if jxl support is built.
Additionally, ifdefs the GfxPref to only observe when jxl is built.
2022-11-11 12:25:17 +00:00
Moonchild e6888aa2bd Merge branch '1769-take2' 2022-11-10 20:15:54 +00:00
Moonchild d14c78b29d Issue #1769: Ensure MIME type is known in URIloader for jxl 2022-11-08 18:16:29 +00:00
Moonchild 76e7290c1a Issue #1769: Update symbols for libxul linkage 2022-11-07 15:03:03 +00:00
Moonchild d19fb35c6a Merge branch 'master' into 1769-take2 2022-11-07 13:49:11 +00:00
Moonchild 94554142e9 [intl] Update timezone data to 2022e 2022-11-06 21:35:01 +01:00
Moonchild 1c04b522d3 Issue #2024 - Part 2: Add wildcard to Access-Control-Allow-{Method|Headers}
For requests without credentials, add wildcard to Access-Control-Allow-Headers
and Access-Control-Allow-Method.

Resolves #2024
2022-11-06 13:22:44 +00:00
Moonchild 84d3226fb1 Issue #2024 - Part 1: Add wildcard to Access-Control-Expose-Headers
For requests without credentials, add wildcard to Access-Control-Expose-Headers.
2022-11-06 12:31:17 +00:00
Moonchild 71ae69aea8 [WebGL] Implement webgl.max-size-per-texture-mib 2022-10-26 14:50:05 +00:00
Moonchild 9e34d697c7 [XPCOM] Fix Base64 off-by-one issue and safeguard against this mistake in the future. 2022-10-26 14:49:55 +00:00
Moonchild 8fa9125d02 [No issue] Hold some strong references on nsRefreshDriver 2022-10-26 14:49:46 +00:00
Brian Smith 4b4488c3e4 Issue #2022 - Part 2 - Add Ventura version detection.
Also add Monterey and Ventura to the graphics driver blocklist.
2022-10-26 14:49:33 +00:00
Brian Smith 248db7d301 Issue #2022 - Part 1 - Fix transparent windows on MacOS 13 Ventura.
During the BaseWindow creation contenView is nil on Ventura...
So create a NSView with the requested dimensions and set is as the contenView.
2022-10-26 14:49:23 +00:00
Moonchild e199f2949b [No issue] Ensure LockImpl::Try() returns the correct bool value. 2022-10-26 14:45:39 +00:00
Moonchild 42d1d20efd [WebGL] Implement webgl.max-size-per-texture-mib 2022-10-26 13:52:42 +00:00
Moonchild 3505c2050a [XPCOM] Fix Base64 off-by-one issue and safeguard against this mistake in the future. 2022-10-26 09:24:27 +00:00
Moonchild 1139e11f3a [No issue] Hold some strong references on nsRefreshDriver 2022-10-26 08:05:04 +00:00
athenian200 b19541f1d4 Issue #1824 - Remove dependency on libdemangle.
This may be removed from illumos soon, and it is apparently unused anyway, so leaving it in doesn't make sense.
2022-10-26 01:18:43 +00:00
Moonchild 30653de864 Merge pull request 'Support MacOS 13 Ventura' (#2023) from dbsoft/UXP:MacVentura into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2023
2022-10-25 10:02:48 +00:00
Brian Smith 7a82ec5764 Issue #2022 - Part 2 - Add Ventura version detection.
Also add Monterey and Ventura to the graphics driver blocklist.
2022-10-24 23:47:42 -05:00
Brian Smith e73a2fb0fc Issue #2022 - Part 1 - Fix transparent windows on MacOS 13 Ventura.
During the BaseWindow creation contenView is nil on Ventura...
So create a NSView with the requested dimensions and set is as the contenView.
2022-10-24 23:45:38 -05:00
Moonchild b14db5e91e Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2022-10-23 21:46:30 +00:00
Moonchild 2d752c9259 Merge pull request 'Align keypress events in content with the web' (#2020) from keypress-event-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2020
2022-10-23 21:45:26 +00:00
Moonchild 362a84565c Issue #21 - Remove panning/tab animation performance measurements
Based on FranklinDM's follow-up for the issue.

This would require browser FE changes, particularly removing the associated
code in `tabbrowser.xml`, however, that was already done in Pale Moon previously.
Other front-end applications may need to take note, though.

Based on changes from the following bugs:
* Bug 696398 - Need an api to analyze panning performance
* Bug 800031 - Include paint time in tab switch telemetry
* Bug 820167 - Enable performance measurement of tab animation
* Bug 826383 - Improve Start/Stop FrameTimeRecording for telemetry usage
2022-10-23 21:43:46 +00:00
FranklinDM d8ef6bf7af Issue #1956 - Look for Visual Studio's path directly in the mozdebug module
This change modifies the mozdebug module to include a special case for Visual Studio when looking for its path.

This also removes the workaround implemented in dcb027a718 which can break debugging in certain installations of Visual Studio 2015.
2022-10-23 21:30:17 +00:00
FranklinDM 825fb3a207 Issue #1793 - Follow-up: Fix incorrect media query 2022-10-23 21:29:24 +00:00
FranklinDM d1345b1da6 Issue #58 - Remove leftover rust build files from /js 2022-10-23 21:29:06 +00:00
FranklinDM 4f95caf7fb Issue #1829 - Follow-up: Mac-specific shortcut key for closing the developer tools toolbox window should not be excluded from other platforms 2022-10-23 21:28:47 +00:00
Moonchild 528ae6aeb0 Merge pull request 'Issue #1375 - Don't mark nodes in the shadow tree as orphan nodes' (#2021) from Basilisk-Dev/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2021
2022-10-22 14:17:59 +00:00
Basilisk-Dev ea0a08fcab Issue #1375 - Don't mark nodes in the shadow tree as orphan nodes
Port of Bug 1026714
2022-10-20 18:22:30 -04:00
Moonchild 7ac438f6ad Issue #2019 - Follow-up: Make autocomplete and satchel listen to keypress events in the system event group
The autocomplete module listens to keypress events for both printable keys
and non-printable keys a lot. However, we're stopping dispatching keypress
events for non-printable keys in the default event group of web content.

This means that autocomplete should listen to keypress events in the
system event group.

Note that it's difficult to globally change keypress event listeners to
keydown event listeners because if we stop keypress events at preceding
keydown event in autocomplete or satchel modules, some other modules
fail to handle keydown or keypress events before autocomplete, and it's
not easy to investigate which keypress event listener in which modules
should be changed to a keydown event listener.

Therefore, this patch doesn't do that, and uses the event group approach.
2022-10-18 12:48:23 +00:00
Moonchild 3142f95469 Issue #2019 - Follow-up: Adjust content spellchecker to use keydown
Since keypress is no longer triggered on all keypresses in content,
the spellchecker would potentially not be triggered when it should be.
This changes the trigger to keydown, instead.
No behavioral changes otherwise.
2022-10-17 15:22:03 +00:00
Moonchild 74b3ce90d7 Issue #2019 - Do not dispatch keypress event for non-printable keys.
This will prevent the keypress DOM event from firing on keypresses
that do not produce printable keys (e.g. editing nav keys) in content.
This should not affect any chrome events that are in use.
Event dispatch can be re-enabled if necessary with the added pref.
2022-10-17 12:28:26 +00:00
Moonchild ebd7672d6b [No issue] Ensure LockImpl::Try() returns the correct bool value. 2022-10-16 23:24:19 +00:00
Moonchild 1f78e93f1d Merge pull request 'Implement regular expressions lookbehind (v2)' (#2017) from regex-lookbehind-v2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2017
2022-10-12 16:44:09 +00:00
Moonchild 69502301fa Merge pull request 'Implement customElements.upgrade.' (#2015) from jobbautista9/UXP:1375-ceupgrade into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2015
2022-10-12 08:58:55 +00:00
Moonchild d10e8a5b06 Issue #1279 - Implement regular expressions lookbehind (v2)
Because of some additional changes in the JS engine in the meantime,
this implementation should work and not crash due to slot allocation.
2022-10-11 10:59:43 +00:00
Moonchild fb173db64b Issue #2016 - Remove non-functional V8 regex import 2022-10-10 19:36:24 +00:00
Job Bautista 5bc4892122 Issue #1375 - Use nsIAtom* instead of nsAtom* for CE Upgrade function.
We haven't refactored nsIAtom* as Mozilla did yet.
2022-10-09 12:59:21 +08:00
Job Bautista 58670d66e5 Issue #1375 - Implement customElements.upgrade.
Backported from Mozilla bug 1443722.
2022-10-09 10:33:50 +08:00
Jeremy Andrews 4ba7e05b96 Issue #2012 - Follow-up: Make sure Services.jsm is imported earlier.
I didn't catch this because I am used to the .jsm files being imported near the
top of the file, not later on. This is the case in the other two files I
worked on. Only AddonUpdateChecker.jsm seems to have this problem.
2022-10-06 03:27:46 -05:00
Moonchild 2dc264047e Fix some debug assertions.
refactored code porting in assertions causing debug build failures.
2022-10-04 16:32:25 +00:00
Moonchild 6d5b934dc0 Merge pull request 'Allow other UXP applications to use dual-GUID system.' (#2013) from athenian200/UXP:generic-dual-guid-system into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2013
Reviewed-by: Moonchild <moonchild@palemoon.org>
2022-10-04 11:45:50 +00:00
Jeremy Andrews 87ef3606e2 Issue #2012 - Change name of feature to AppCompat GUID.
It's not just for supporting "Phoenix" extensions anymore.
2022-10-03 17:13:57 -05:00
Jeremy Andrews 4ced37546e Issue #2012 - Have fallback value and use better term than "fake ID."
I also use the pref as a constant rather than calling the pref service
repeatedly to make code look much neater. APPCOMPATID matches
APPCOMPATVERSION, and doesn't give the vibe of a sneaky young lad trying to
enter into a tavern whilst underage.
2022-10-03 08:13:17 -05:00
Jeremy Andrews cb61e1a354 Issue #2012 - Allow other UXP applications to use dual-GUID system. 2022-10-02 22:17:27 -05:00
Moonchild 456b5450a4 Issue #2010 - Ensure raw tagnames are safe exiting internalEntityParser
This resolves #2010
2022-09-28 13:50:10 +00:00
Moonchild b83dd4e5e8 Issue #2010 - Ensure raw tagnames are safe exiting internalEntityParser
This resolves #2010
2022-09-28 13:49:41 +00:00
Moonchild d8e629c4a3 Merge branch 'master' into release 2022-09-27 20:12:40 +00:00
Moonchild 95907ddf88 Revert "Issue #1986 - Use logical coordinates in flex containers."
This reverts commit 2a57b39dbc.
2022-09-27 20:04:13 +00:00
Moonchild 5f8d70dacd Revert "Issue #1986 - Part 2: Add IsItemInlineAxisMainAxis() and rework some nsFrame code."
This reverts commit ef4eb3f926.
2022-09-27 20:04:02 +00:00
Moonchild 4bf2bf74b1 Revert "Issue #1986 - Add in reftests for new behavior."
This reverts commit 2fc5e3ad7d.
2022-09-27 20:03:42 +00:00
Moonchild 4898c4f297 Merge branch 'master' into release 2022-09-24 12:16:59 +00:00
Moonchild b575f4a516 Platform version bump 2022-09-24 12:16:43 +00:00
Moonchild 7cd578bbc6 Merge branch 'master' into release 2022-09-22 13:16:48 +00:00
Moonchild 47a7de8aa4 Issue #1977 - Follow-up: Correct pref check to be selective on wave formats only. 2022-09-22 13:14:17 +00:00
Moonchild 1e91df628a Merge branch 'master' into release 2022-09-22 11:52:16 +00:00
Moonchild 1a5e2e32e1 Merge pull request 'Un-prefix -moz-[min|max}-content keyword' (#2009) from 1992 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2009
2022-09-22 11:47:37 +00:00
Moonchild d06666cd12 [network] Reject cookies with no name and a __Secure- or __Host- prefix 2022-09-21 21:11:53 +00:00
Moonchild 24ee0680b1 [DOM security] Be more explicit about CSP checks and reports. 2022-09-21 14:08:22 +00:00
Moonchild 66a4e02856 Issue #1992 - Part 2: Regenerate devtools CSS database.
Using `mach devtools-css-db`
Note: this also picked up a break-spaces entry that was missed previously.
2022-09-20 20:44:57 +00:00
Moonchild 9fea63c9d4 Issue #1992 - Part 1: Un-prefix -moz-{min|max}-content keywords. 2022-09-20 20:41:33 +00:00
Moonchild fc5b767f5d Issue #2008 - Implement missing s parameter parsing and align case with spec.
This does 2 things.
First, it adds parsing of the 's' parameter parsing to DOM object construction of regexes
Second, it corrects the DOM property to be `dotAll` instead of `dotall`

For consistency's sake, all function names and calls were renamed with the finalized casing.

This resolves #2008
2022-09-18 11:01:27 +00:00
Moonchild 302d46a0f9 Merge pull request 'Media fixes to play nice with MSVC WPO/GL' (#2006) from twivi/UXP:optimize into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2006
Reviewed-by: Moonchild <moonchild@palemoon.org>
2022-09-14 09:42:09 +00:00
twivi d2683b0ff7 revert 82ac99acb5
revert Allow explicit inlines in libaom code, but still prevent automatic inlines due to compiler issues
2022-09-14 02:33:01 +00:00
twivi 92d5680b85 Updated libav/ffvpx patch files to help with upstream library 2022-09-13 14:33:32 +00:00
Moonchild f9a1ebf886 No issue - Stop pre-processing some files that don't have preprocessor statements in them. 2022-09-12 08:05:25 +00:00
twivi a68021d41e Fix ffvpx/libav architecture checks to use preprocessor instead, prevents breakage with LTCG 2022-09-11 21:51:08 +00:00
twivi 82ac99acb5 Allow explicit inlines in libaom code, but still prevent automatic inlines due to compiler issues 2022-09-11 21:49:56 +00:00
Moonchild c623c47157 Merge pull request 'Update IPC locking code.' (#2004) from athenian200/UXP:ipc-locking-update into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2004
2022-09-09 08:10:36 +00:00
Moonchild da835adb48 Merge pull request 'Fix build bustage with spell checker in GCC 12' (#2002) from jobbautista9/UXP:spellcheck-gcc12 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2002
2022-09-08 17:38:29 +00:00
Moonchild a9c9be4d21 Issue #80 - Re-unify most of gfx 2022-09-08 16:54:07 +00:00
Moonchild 0682d4ac0e No Issue - prevent build issue in MSVC due to libaom SIMD inlining. 2022-09-08 16:52:26 +00:00
Jeremy Andrews 77bca114d1 Issue #2003 - Update IPC locking code. 2022-09-08 08:10:11 -05:00
Job Bautista 59f6ae3d74 Issue #1995 - Fix build bustage in GCC 12
For some reason, GCC 12 is treating this include as a circular dependency.
See athenian200's analysis for more details.
2022-09-08 17:57:06 +08:00
Moonchild 1fba5c3cc7 Issue #80 - Re-unify most of the layout engine 2022-09-08 06:49:40 +00:00
Moonchild 3d99e06afe Issue #80 - Re-unify most of DOM 2022-09-08 06:49:09 +00:00
Moonchild ed2a457b0a Merge branch 're-unify' 2022-09-06 23:42:27 +00:00
Moonchild c927a660ea Issue #1720 - Follow-up: Explicitly include X11UndefineNone.h in
HTMLOptGroupElement.cpp to fix unified building on X11
2022-09-05 14:00:07 +00:00
Moonchild cf8bc4541d Issue #80 - Re-unify building of /js/src 2022-09-05 13:50:53 +00:00
Moonchild f4e39fc6f4 Revert "Issue #1676 - Part 4: Split builtin sources out of js/src/moz.build" 2022-09-05 13:28:53 +00:00
Moonchild d10904010a Revert "Issue #1676 - Part 5: Split devtools sources out of js/src/moz.build"
This reverts commit 24b835f0a9.
2022-09-05 13:25:24 +00:00
Moonchild 22886d3547 Revert "Issue #1676 - Part 6: Split ds sources out of js/src/moz.build"
This reverts commit eedfa63a1d.
2022-09-05 13:24:56 +00:00
Moonchild de87d59cfc Revert "Issue #1676 - Part 7: Split frontend sources out of js/src/moz.build"
This reverts commit 1396383aee.
2022-09-05 13:24:28 +00:00
Moonchild e67b9b52e3 Revert "Issue #1676 - Part 8: Fix up include for selfhosted.out.h"
This reverts commit bc450dab41.
2022-09-05 13:23:59 +00:00
Moonchild 821cba01be Revert "Issue #1676 - Part 9: Move DIRS down in js/src/moz.build" 2022-09-05 13:23:16 +00:00
Moonchild 8d79be38cc Revert "Issue #1676 - Part 10: Split gc sources out of js/src/moz.build"
This reverts commit 65eac50e2d.
2022-09-05 13:16:15 +00:00
Moonchild 55c83585d0 Revert "Issue #1676 - Part 11: Split irregexp sources out of js/src/moz.build"
This reverts commit 3d9bf5d7a3.
2022-09-05 13:15:38 +00:00
Moonchild 0ac1b38920 Revert "Issue #1676 - Part 12: Split jit sources out of js/src/moz.build"
This reverts commit 95e057e737.
2022-09-05 13:15:10 +00:00
Moonchild 2d5b40a675 Revert "Issue #1676 - Part 13: Split perf sources out of js/src/moz.build"
This reverts commit 383bc182e3.
2022-09-05 13:14:42 +00:00
Moonchild cbfbaf026f Revert "Issue #1676 - Part 14: Split proxy sources out of js/src/moz.build"
This reverts commit 6f76f1cb36.
2022-09-05 13:14:16 +00:00
Moonchild e17072f3ef Revert "Issue #1676 - Part 15: Split threading sources out of js/src/moz.build"
This reverts commit 2f50f543a2.
2022-09-05 13:13:49 +00:00
Moonchild b2ac2b28e0 Revert "Issue #1676 - Part 16: Split WASM sources out of js/src/moz.build"
This reverts commit 1abc696f87.
2022-09-05 13:13:23 +00:00
Moonchild 30a467bf67 Revert "Issue #1676 - Part 17: Put remaining source files which have debug code ifdef'd behind MOZ_DEBUG"
This reverts commit ff355fe9ac.
2022-09-05 13:12:57 +00:00
Moonchild e1f7b842fe Revert "Issue #1676 - Part 18: Move and separate top level sources from vm sources in js/src/moz.build"
This reverts commit 59511eb8dd.
2022-09-05 13:12:30 +00:00
Moonchild 42c4708b34 Revert "Issue #1676 - Part 19: Split ctypes sources out of js/src/moz.build"
This reverts commit cdf46e803b.
2022-09-05 13:12:02 +00:00
Moonchild 7e80662a24 Revert "Issue #1676 - Part 20: Split vtune sources out of js/src/moz.build"
This reverts commit fd1b2dc2b1.
2022-09-05 13:11:33 +00:00
Moonchild 982b7bf2a1 Revert "Issue #1676 - Follow-up: Put js/src (including vm), jit, and wasm back into unified sources."
This reverts commit a8a397fbce.
2022-09-05 13:10:47 +00:00
Moonchild b1b57cefa3 Merge pull request 'Stop using deprecated ext/hash_map and FreeBSD/clang fixes.' (#2001) from dbsoft/UXP:freebsdfix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2001
2022-09-05 11:13:36 +00:00
Brian Smith 6619e475ab No issue - Fix OutputVariable visibility issue, when building with clang. 2022-09-05 04:47:15 -05:00
Brian Smith f369fbd6f7 Issue #2000 - Stop using deprecated ext/hash_map.
This has been long deprecated in favor of std::unsorted_map. Since all platforms
are using modern compilers now it should not be a problem to switch over to
std::unsorted_map in the single place hash_map is used. This allows us to build
on platforms which have removed hash_map such as FreeBSD.
2022-09-04 23:05:10 -05:00
Brian Smith 2db2e0fe58 No issue - Fix FreeBSD NSS build by adding FreeBSD to the list. 2022-09-04 16:57:20 -05:00
Moonchild 92452d7614 Issue #80 - reinstated unified building for some large chunks of our code.
This should reduce compile complexity saving time and reducing linker stress.
2022-09-04 11:50:24 +00:00
Moonchild 74124f150b Issue #1999 - Switch to the unorm2 API for String.normalize()
Resolves #1999
2022-09-02 19:29:43 +00:00
Moonchild 4078c2dd1e Merge pull request 'Support EventSource in workers' (#1997) from dbsoft/UXP:1990fix2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1997
2022-09-01 20:56:43 +00:00
Moonchild 6638cc1e6d [No issue] Don't use gfxXlibSurface in GLContextGLX. 2022-08-31 11:46:12 +00:00
Moonchild ea31efd98e Merge pull request 'Fix a couple miscellaneous Mac specific issues.' (#1998) from dbsoft/UXP:macfixes into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1998
2022-08-30 07:55:06 +00:00
Brian Smith 5f1ef110ff No Issue - Fix building with WebRTC enabled on non-Intel Macs.
int3 is Intel only, so don't use it on ARM, use __builtin_trap() instead.
2022-08-29 18:30:39 -05:00
Brian Smith 6d127920f8 No Issue - Fix building on MacOS Big Sur.
The python binary copied reports a valid signature on Big Sur and thus codesign fails.
Add the -f option so it overwrites the supposedly valid signature. Other versions are
either already unsigned or the install_name_tool invalidates the signature.
2022-08-29 18:22:25 -05:00
Moonchild b1d148fd52 Issue #1996 - Implement at() method on built-in indexables.
Resolves #1996
2022-08-29 21:52:04 +00:00
Moonchild 51204afc90 Issue #1956 - Fix C++ code standard conformance issue in webaudio 2022-08-29 01:01:43 +00:00
Moonchild 6d0df6d506 Issue #1956 - Fix C++ code standard conformance issue in StoreBuffer.h 2022-08-28 15:04:19 +00:00
Brian Smith 860800629b Issue #1990 - Part 6 - Fix for infinite loop from Release() on shutdown worker.
If the worker is shut down, call Cancel() on the Runnable, this will prevent
nsInputStreamReadyEvents to be called again when deallocated.
2022-08-26 14:21:47 -05:00
Moonchild ce11609fe9 Merge pull request 'Support TURN TLS in WebRTC' (#1993) from Basilisk-Dev/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1993
2022-08-26 16:10:54 +00:00
Brian Smith d6f18548a6 Issue #1990 - Part 5 - Common up the skippability implementations that are basically copy/pastes of the DOMEventTargetHelper one.
Mozilla Bug Bug 1333540. Skipped the renamed of various functions, but otherwise a direct port.
2022-08-25 21:59:08 -05:00
Moonchild 29c1150eef Issue #1975 - Follow-up: Enable Origin header on same-origin by default.
I've used this setting without ill effects for weeks, including visiting
many a cloudflare-backed site. There is no issue there.
2022-08-24 02:48:44 +02:00
Moonchild db1c5741cd Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2022-08-24 00:51:48 +02:00
Moonchild 0488d0b40b Issue #1994 - Align CSS.supports with the current spec.
The current spec makes "implicit" parentheses a thing for feeding
css strings to CSS.supports()
The current spec also implies CSS is a namespace, not an interface
2022-08-24 00:50:36 +02:00
Brian Smith bbc3e455b0 Issue #1990 - Part 4 - Add a number of Mozilla patches from between Part 1 and 2.
1334081 - prevent null pointer dereference in StreamReaderFunc.
1330631 - Convert the EventSourceImpl::Message to be UniquePtr.
1337619 - Reset mGoingToDispatchAllMessages flag before early return.
2022-08-22 13:23:34 -05:00
Basilisk-Dev aacd52f00f Issue #1991 - backport Mozilla bug 1266667 2022-08-20 22:08:28 -04:00
Basilisk-Dev 0dad0315dd Issue #1991 - Remove console log stating TURNS is not supported
Port of Mozilla bug 1383575
2022-08-20 14:23:06 -04:00
Basilisk-Dev d49569ca0d Issue #1991 - Support TURN TLS Support in WebRTC
Backport of Mozilla bug 1056934
2022-08-20 14:21:43 -04:00
Moonchild d262539fb9 Merge pull request 'Use logical coordinates in flex containers.' (#1987) from athenian200/UXP:flex-container-changes into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1987
2022-08-20 11:59:03 +00:00
Brian Smith 3596656ea4 Issue #1990 - Part 3 - Fix build issue due to missing nsIThreadRetargetableStreamListener definition. 2022-08-18 17:57:47 -05:00
Brian Smith 10dbd42596 Issue #1990 - Part 2 - Fix crash when incorrectly access EventSourceImpl::mEventSource. - Mozilla Bug 1333099 2022-08-18 16:35:40 -05:00
Brian Smith b52731f9e0 Issue #1990 - Part 1 - EventSource for workers - Mozilla Bug 1267903 2022-08-18 16:30:38 -05:00
Jeremy Andrews 2fc5e3ad7d Issue #1986 - Add in reftests for new behavior.
Almost forgot to do this. This is in case we need to revisit this for
regressions in the future and the tests are not available online. Never know
when they might come in handy again.
2022-08-18 13:27:43 -05:00
Jeremy Andrews 544366e301 Issue #1988 - Use libc's arc4random where available.
Configure was defining HAVE_ARC4RANDOM_BUF on systems that have it this whole
time, so the OS specific ifdefs weren't necessary. Maybe the flag that was in
the original patch was an obsolete name for that flag...
2022-08-17 20:43:57 -05:00
Jeremy Andrews ef4eb3f926 Issue #1986 - Part 2: Add IsItemInlineAxisMainAxis() and rework some nsFrame code.
It turns out part 10 was actually needed, but Bug 1449838 had a significantly
better version of what that code does that was easy enough to backport to what
we have. As far as I can tell, this passes the relevant reftests now.
2022-08-16 16:11:48 -05:00
Jeremy Andrews 2a57b39dbc Issue #1986 - Use logical coordinates in flex containers.
This mostly reworks the way nsFlexContainerFrame handles things so that it can
deal with more than just height.
2022-08-16 02:14:53 -05:00
Jeremy Andrews 50bd3acb5b Issue #1970 - Follow-up: Better fix for Unix that works on newer GCC.
My previous fix apparently only worked with GCC 7. Having that return at the
end doesn't seem to hurt anything on Windows, so I see no reason to ifdef it.

I don't remember where I heard this, but I vaguely remember hearing that
ending a function without a return statement may be undefined behavior that
differs between compilers and operating systems. If so, that would explain why
this has behaved so differently across platforms and compilers.
2022-08-13 11:44:09 -05:00
Jeremy Andrews 8fa66368a0 Issue #1970 - Follow-up: Fix GTK3 build for SunOS and CentOS.
This seems to work for me, but I haven't tested anything else yet. Still, seems better to have a fix in the tree than to leave it as-is.
2022-08-13 06:47:27 -05:00
Moonchild d3f82662f5 No issue - Remove directive 4
This was a control issue way back when. Since this only really relates to
deviating build configs anymore and no longer to critical system libs of note,
there's no point in retaining this overbearing control through build errors.
People have clear instructions how to build - it is their responsibility to
stick to those.
2022-08-11 19:33:34 +00:00
Jeremy Andrews 7a2f786e0c Issue #1956 - Account for multiple DLL files in newer CRT.
The wildcard seems to work well here for getting files included in the
final target.
2022-08-03 08:53:40 -05:00
Moonchild a5696dc110 Merge pull request 'Issue #1982 - Fix libopus webrtc build breakage' (#1983) from Basilisk-Dev/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1983
2022-07-30 20:20:17 +00:00
Basilisk-Dev eab116cde1 Issue #1982 - Fix libopus webrtc build breakage 2022-07-30 15:36:03 -04:00
Moonchild a46ea601f7 Merge pull request 'Fix build bustage for applications where WebRTC building is enabled.' (#1981) from jobbautista9/UXP:1980-rtcfix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1981
2022-07-30 07:21:46 +00:00
Job Bautista fad8235ad2 Issue #1980 - Fix build bustage for applications where WebRTC building is enabled.
Turns out we have a duplicate VoidFunction callback in the WebIDLs. Per
 Mozilla bug 1324169, we should remove this callback from
 RTCPeerConnection.webidl and let Function.webidl handle it instead.
The AttributeError faced by the new Basilisk dev wasn't helpful at all;
 and turns out Mozilla had this exact same issue on bug 1505504. We're
 also backporting that just in case we encounter another case of
 callback duplication.
Also doing a minor fix in the MicroTaskRunnable class which Moonchild
 forgot to do while working on Issue #1895.
2022-07-30 13:24:40 +08:00
Moonchild 32c8246e16 Merge pull request 'Revert "Issue #1806 - Follow-up: Fix WebRTC issues with cubeb update."' (#1979) from Basilisk-Dev/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1979
2022-07-29 18:00:14 +00:00
Basilisk-Dev 27bbc35768 Revert "Issue #1806 - Follow-up: Fix WebRTC issues with cubeb update."
This reverts commit d0acadd727.
2022-07-29 13:14:25 -04:00
Moonchild d60f501490 Merge branch '1970-form-focusring-styling' 2022-07-29 13:24:43 +00:00
Moonchild 900107da1b Merge pull request 'Allow WAV into media document.' (#1978) from jobbautista9/UXP:1977-wav-videodocument into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1978
Reviewed-by: Moonchild <moonchild@palemoon.org>
2022-07-29 13:10:12 +00:00
Job Bautista 8a10b7bf8b Issue #1977 - Bring back old behavior behind a pref.
I've thought about this before creating the issue, and Moonchild
 wanted this as well.
2022-07-29 20:14:27 +08:00
Jeremy Andrews b673400639 Issue #1312 - Fix potential crashes in MailNews.
These are straightforward, one-line changes with no obvious dependencies. Probably could have been taken a long time ago.

Ref: BZ 1638634, 1606091
2022-07-28 08:50:59 -05:00
Job Bautista 28e73defa3 Issue #1977 - Allow WAV into media document.
Based on https://hg.mozilla.org/integration/mozilla-inbound/rev/b3f7abd15aeb
2022-07-27 14:16:57 +08:00
Moonchild b110549cbd Merge branch 'master' into release 2022-07-27 06:07:45 +00:00
Moonchild cfe63a2434 [NSS] Version bump 2022-07-27 04:47:25 +00:00
Moonchild 0aa19bce59 [NSS] Fix uninitialized value in cert_ComputeCertType. 2022-07-27 04:42:20 +00:00
Moonchild ef4a433814 [NSS] Avoid potential data race on primary password change. 2022-07-27 04:17:05 +00:00
Moonchild 713d6ed1b4 [NSS] protect SFTKSlot needLogin with slotLock. 2022-07-27 03:06:40 +00:00
Moonchild 515ba7c887 [DOM] Add extra check for performance API Next Hop protocol 2022-07-27 02:39:58 +00:00
Moonchild 971047835a Merge branch 'master' into release
# Conflicts:
#	config/milestone.txt
#	toolkit/mozapps/extensions/internal/XPIProvider.jsm
2022-07-25 20:47:06 +00:00
Moonchild 562ff3e9ab Merge pull request 'Implement Origin header CSRF mitigation.' (#1976) from jobbautista9/UXP:origin-csrf into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1976
2022-07-25 20:41:23 +00:00
Moonchild 7802bdb5f7 Merge pull request 'Implement Intl.RelativeTimeFormat.' (#1974) from jobbautista9/UXP:1969-relativetimeformat-take3 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1974
2022-07-25 13:44:43 +00:00
Job Bautista b20b9797dc Issue #1975 - Implement Origin header CSRF mitigation.
Backported from Mozilla bug 446344.
2022-07-25 18:56:46 +08:00
Job Bautista 824c2f0d40 Issue #1969 - Implement Intl.RelativeTimeFormat.
Based on Mozilla bugs 1270140, 1504656, 1483545, and 1504334.
Took note of Mozilla bug 1379222 which changed GetPrototypeFromCallableConstructor
 to GetPrototypeFromBuiltinConstructor.
There are many other changes I did myself since the initial implementation by
 Mozilla wouldn't work with this codebase.
2022-07-25 14:07:36 +08:00
Moonchild 6542ca6bcd Merge pull request 'Upgrade ICU to 63.2 and Unicode to 11.0' (#1973) from jobbautista9/UXP:1971-icu63-forreal into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1973
2022-07-24 20:31:14 +00:00
Moonchild b395befdbd Bump platform version 2022-07-24 17:53:25 +00:00
Moonchild 071412ab29 Issue #1970 - Part 7: Restore proper spacing in select for CJK/asian
The issue is that select elements may contain some non-Latin characters that
need extra block-size to display than the one line-height calculated by using a
Latin font spec in the style.
Before this patch, when a control has an unconstrained block-size, we set
the element's block-size to one line-height in Reflow(), which is intended to
properly initialize `BlockReflowInput::mMinLineHeight` since it uses
`line-height:-moz-block-height`.

However, this simply prevents the display from choosing a larger block-size
after the reflow occurs. Previously, this discrepancy was absorbed by the extra
padding present to make select elements the same intrinsic size as buttons, but
since we did away with that, we're losing the extra space and the font glyphs
get clipped.

This patch fixes the issue by carrying the computed line height over to the
element's display so that its computed block-size is still unconstrained.
This way it can accommodate taller characters in the display text.

After this patch, a <select><option> containing non-Latin characters should have
the same block-size as <button>, and no characters should be clipped.
2022-07-24 17:25:36 +00:00
Job Bautista b9454f2887 Issue #1971 - Part 6: Updating ICU requires a clobber. 2022-07-24 21:09:52 +08:00
Job Bautista 3b93fb3645 Issue #1971 - Part 5: Update Spidermonkey for Unicode 11.
I forgot to do this while working on issue #326.
2022-07-24 21:09:02 +08:00
Job Bautista b6185a27f2 Issue #1971 - Part 4: Generated files for Unicode 11.0. 2022-07-24 21:07:13 +08:00
Job Bautista be2e0f9830 Issue #1971 - Part 3: Update unicharutil perl scripts for Unicode 11 upgrade.
ICU 62 (and therefore 63) requires at least Unicode 11.
2022-07-24 21:05:07 +08:00
Job Bautista 62636946ff Issue #1971 - Part 2: Update ICU source to 63.2. 2022-07-24 21:03:27 +08:00
Job Bautista 970b041574 Issue #1971 - Part 1: Update build system for ICU 63.2 upgrade. 2022-07-24 20:54:59 +08:00
Moonchild 5487515bca Issue #1970 - Part 6: Rename CalcLineHeight(), and cache used line height
To better distinguish the calculation of line height (still present with args)
and simply getting the line height without args, it's now called GetLineHeight()
This also introduces `mLineHeight` to cache specifically calculated line heights
that aren't "auto" (which is a magic value), and it opens up the possibility to
override it in Part 7.
2022-07-23 23:35:18 +00:00
Moonchild 5dace0043a Issue #1970 - Part 5: Move combobox/select padding to the select rule.
This doesn't change behavior by default but allows authors to remove the padding
previously enforced to align with focus ring padding, if they wish to.
2022-07-23 17:36:23 +00:00
Jeremy Andrews 3f0dc49164 Issue #1962 - Follow-up: Fix 32-bit build and remove unused clang-cl codepath. 2022-07-23 07:17:30 -05:00
Job Bautista 81f3903598 Issue #1962 - Follow-up: Fix build issues on Windows.
Do not pass -Wno-type-limits to MSVC.
Restore MSVC check for x86_vc
2022-07-22 21:23:21 +00:00
Job Bautista 6957412ab5 Issue #1962 - Update libtheora.
Removed some obsolete patches that were either backports from newer
 svn revisions, or a fix for older, non-applicable assemblers.
Update our own README to account for upstream's migration to git.
I didn't remove the bug 703135 patch as it's for MSVC it seems, and
 we still use MSVC for Windows.
Also deleted some unneeded upstream code deleted by Mozilla as well.
2022-07-22 21:23:07 +00:00
Moonchild fa714cba35 Issue #1970 - Part 4: Don't overflow -moz-focus-inner border. 2022-07-22 18:25:57 +00:00
Moonchild d73c4c046d Issue #1970 - Part 3: Update reftests. 2022-07-22 18:23:50 +00:00
Moonchild 3d954cb29c Issue #1970 - Part 2: Remove the extra padding on buttons
Extra padding was created for a prospective -moz-focus-inner ring.
We now just size that ring the same as the content frame, inflated by its CSS
padding.
2022-07-22 15:06:19 +00:00
Moonchild 1aa650b8ac Issue #1970 - Part 1: Remove unused moz-focus-outer code for buttons. 2022-07-22 14:47:45 +00:00
Moonchild e6b3e4ebed Revert "Issue #1962 - Update libtheora."
This reverts commit bd497f7f83.
2022-07-22 14:45:49 +00:00
Moonchild a7a76f9a29 Merge pull request 'Update libtremor.' (#1965) from jobbautista9/UXP:tremor-update into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1965
2022-07-22 08:01:42 +00:00
Moonchild 590835c616 Merge pull request 'Update libtheora.' (#1963) from jobbautista9/UXP:theora-update into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1963
2022-07-22 08:01:22 +00:00
Moonchild 3bb273771a Merge pull request 'Remove mozprotocol handler.' (#1968) from jobbautista9/UXP:mozprotocol-remove into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1968
2022-07-22 08:01:10 +00:00
Job Bautista ba7b5589ab Issue #1967 - Remove moz://a from mochitest
While we don't use mochitest AFAIK, we still want a clean removal.
2022-07-22 15:53:06 +08:00
Job Bautista 69a867fd3a Issue #1967 - Remove mozprotocol handler (moz://a easter egg). 2022-07-22 10:40:33 +08:00
Moonchild c6c045a7f7 Issue #1966 - Remove support for Firefox Marketplace "apps"
Because UXP may be a platform, but it's not a mobile OS.
2022-07-22 02:30:42 +00:00
Moonchild a5421542e5 Issue #1837 - Remove unused build back-ends from the tree.
This leaves just use of recursive make to build applications.
2022-07-21 08:39:43 +00:00
Job Bautista aa3828319a Issue #1964 - Update libtremor.
Also removed mozilla patches that are already applied upstream.
2022-07-19 21:59:34 +08:00
Job Bautista bd497f7f83 Issue #1962 - Update libtheora.
Removed some obsolete patches that were either backports from newer
 svn revisions, or a fix for older, non-applicable assemblers.
Update our own README to account for upstream's migration to git.
I didn't remove the bug 703135 patch as it's for MSVC it seems, and
 we still use MSVC for Windows.
Also deleted some unneeded upstream code deleted by Mozilla as well.
2022-07-19 17:26:42 +08:00
Moonchild 9800079bc2 Merge pull request 'Improve stack size limits for all targets.' (#1961) from 1805-stacksize into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1961
2022-07-17 06:42:01 +00:00
Jeremy Andrews 8442b959f8 Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2022-07-16 11:12:01 -05:00
Jeremy Andrews ef89146385 Issue #1956 - Work around UTF-8 issue when parsing JSON with Python 2 on some Windows environments.
This is a known issue with Python 2 interacting badly with some Windows configurations. Mozilla encountered it as well.

Ref: BZ 1362872
2022-07-16 11:07:35 -05:00
Moonchild 286e7ac205 Issue #1960 - Convert async property syntax to async function syntax in
DownloadUIHelper.jsm
2022-07-16 01:14:44 +00:00
Moonchild f63a7ee3fd Issue #1805 - Follow-up: Include the same headers for Solaris as well to
future-proof gcc versions.
2022-07-15 19:48:18 +00:00
Moonchild 325a49588a Issue #1805 - Follow-up: provide for Linux builds using rlimit and min/max. 2022-07-15 16:03:43 +00:00
Moonchild 00f22ddbe6 Issue #1805 - Improve stack size limits for all targets.
This allows us to use a greater rendering depth for exceedingly-deep DOM trees
in layout, better matching what mainstream browsers are capable of. Note that
for 32-bit Windows the stack size MUST be set to larger than the default or Bad
Things Will Happen™ - we use 1.5 MB for this as a carefully-tuned value.

This needs to be capped specifically for JS use because some JavaScript
obfuscators deliberately trigger stack overflows and would lock up the browser
otherwise as long as there's still stack space to abuse. For web compatibility
we therefore limit this to 2MB in JS only (3x for ASAN) while still allowing
a greater depth for the layout engine.
2022-07-15 11:56:12 +00:00
Jeremy Andrews dcb027a718 Issue #1956 - Allow debugger to work on newer MSVC.
Newer MSVC was failing to find the devenv executable for ./mach run --debug
This isn't the prettiest solution, but at least it's better than just relying
on a hardcoded path.
2022-07-14 23:03:39 -05:00
Moonchild 08c90e00b9 Merge remote-tracking branch 'athenian200/msvc2022-linker-fix' 2022-07-12 15:46:40 +00:00
Moonchild 9ef5006592 Issue #1959 - Don't apply CSPs to explicit data documents and images.
This resolves #1959
2022-07-12 12:48:06 +00:00
Jeremy Andrews 61f1adc54d Issue #1956 - Fix symbol visibility issue more elegantly.
All it needed was __declspec(dllexport) on the function I was copy/pasting all over the place...
2022-07-12 01:39:20 -05:00
athenian200 68bfe68581 No Issue - Insert missing typedef for SunOS.
We definitely have uint64_t on SunOS. Someone probably just forgot to finish filling out the list...
2022-07-09 12:38:53 +00:00
Jeremy Andrews 1fadb7fa2f Issue #1956 - Use preprocessor to work around strange template behavior with 32-bit MSVC2022. 2022-07-06 12:52:23 -05:00
Jeremy Andrews de383de310 Issue #1956 - Follow-up: Fix weird linker issue on 32-bit MSVC2022.
I moved Range<bool>::Merge and Range<bool>::FinalizeMerge from MediaTrackConstraints.cpp, into MediaTrackConstraints.h. The header file previously contained only a forward declaration of functions implemented in the .cpp, which can be a problem if other parts of the program are including this header expecting to find the function.
2022-07-05 22:19:08 -05:00
Moonchild c29f3e8dba Merge pull request 'Issue #1956 - Fix AV1 on MSVC2022 32-bit build.' (#1958) from athenian200/UXP:libaom_msvc2022_fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1958
Reviewed-by: Moonchild <moonchild@palemoon.org>
2022-07-05 11:35:48 +00:00
Jeremy Andrews 932335ea76 Issue #1956 - Fix AV1 on MSVC2022 32-bit build. 2022-07-05 06:16:00 -05:00
Moonchild dd4d9eb032 [XPCOM] Crash safely when TArray replacements are OOB.
In the unlikely event of TArray element replacement calls are OOB, crash safely
with a debug breakpoint instead of corrupting memory.
2022-07-03 15:49:44 +00:00
Moonchild 8b94f1e480 [DOM] use the sanitizer to restrict href in svg:use to fragment-only URLs 2022-07-03 15:49:34 +00:00
Moonchild c89610a5c7 [network] Clear PAC loader when the load failed 2022-07-03 15:49:23 +00:00
Moonchild 217963cbed Update NSS to 3.52.7 2022-07-03 15:49:14 +00:00
Moonchild c4f4e18340 [DOM media] Remove potentially unsafe type accesses when debug logging 2022-07-03 15:49:04 +00:00
Moonchild 8a7c0e7345 [network] Clean up and update the list of external protocol handlers. 2022-07-03 15:48:54 +00:00
Moonchild ac9e93e5e6 [XPCOM] Crash safely when TArray replacements are OOB.
In the unlikely event of TArray element replacement calls are OOB, crash safely
with a debug breakpoint instead of corrupting memory.
2022-07-03 15:38:40 +00:00
Moonchild 2485e982f3 [DOM] use the sanitizer to restrict href in svg:use to fragment-only URLs 2022-07-03 15:37:58 +00:00
Moonchild ae9de9b891 [network] Clear PAC loader when the load failed 2022-07-03 12:28:57 +00:00
Moonchild 438c04383f Update NSS to 3.52.7 2022-07-03 11:30:19 +00:00
Moonchild c830a5f497 [DOM media] Remove potentially unsafe type accesses when debug logging 2022-07-03 10:21:06 +00:00
Moonchild 164800800d [network] Clean up and update the list of external protocol handlers. 2022-07-03 08:12:45 +00:00
Moonchild c4e16d8b64 Merge pull request 'Allow building with newer MSVC versions.' (#1955) from athenian200/UXP:msvc-detection-update into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1955
2022-07-02 21:51:14 +00:00
Jeremy Andrews 057c632bee Issue #1956 - Allow building with newer MSVC versions. 2022-07-02 13:05:26 -05:00
Moonchild 049feac2c8 Merge pull request 'Backport Function.toString changes' (#1954) from martok/UXP-contrib:1952-proxy into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1954
2022-07-02 16:04:39 +00:00
Martok 9221d44207 Issue #1952 - m-c 1440468: Proxied functions can't be passed to Function.prototype.toString.call() 2022-07-01 20:25:05 +02:00
Martok 4bf20fc91e Issue #1952 - m-c 1383775: Clean up function toString/toSource code, remove remnants of source decompiler 2022-07-01 20:25:01 +02:00
Martok 2a10574d76 Issue #1952 - m-c 1380962/2: Remove unnecessary lambda function in FunctionToString 2022-07-01 20:24:52 +02:00
Martok 16b11770a1 Issue #1952 - m-c 1380962/1: Merge append calls when assembling the source string for native functions 2022-07-01 20:21:54 +02:00
Martok 7277d7c6d7 Issue #1952 - m-c 1371593: Avoid repeated string atomizations when retrieving the unresolved name of a bound function 2022-07-01 20:21:43 +02:00
Martok 0fe63b74b1 Issue #1952 - m-c 1365387: Optimize FinishBoundFunctionInit by delaying atomizing the function name 2022-07-01 20:21:22 +02:00
Moonchild 07689ab83f Merge pull request 'Update soundtouch library to 2.3.1' (#1951) from jobbautista9/UXP:soundtouch-take2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1951
Reviewed-by: Moonchild <moonchild@palemoon.org>
2022-07-01 12:20:55 +00:00
Moonchild 77e923c146 Merge pull request 'Update nestegg library' (#1950) from jobbautista9/UXP:nestegg into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1950
Reviewed-by: Moonchild <moonchild@palemoon.org>
2022-07-01 11:55:05 +00:00
Job Bautista 10a37f462e Issue #1769 - Follow-up: Put JXL_DEPRECATED in front of types
This fixes building with Clang on Mac.
I also separated our changes to JXL_DEPRECATED into a patch file.
2022-06-30 13:55:14 +08:00
Job Bautista 2d4950d2ae Issue #1949 - Part 2: Disable exceptions in soundtouch's STTypes.h.
I don't know how Mozilla was able to build this without defining
 ST_NO_EXCEPTION_HANDLING, but looks like we have to do it so that
 the compiler doesn't complain about -fno-exceptions
2022-06-30 10:49:38 +08:00
Job Bautista 6056469e41 Issue #1949 - Part 1: Update soundtouch library to 2.3.1. 2022-06-30 10:48:26 +08:00
Job Bautista 8a92f69986 Issue #1948 - Update nestegg library.
I separated out the AVC and AAC support code into a patch file so that
 the upstream code can be updated freely without having to re-add AVC
 and AAC support again. At least if the upstream changes are not too
 extensive...
This should effectively backport Mozilla bug 1539686, which allows the
 browser to parse the color information from WebM videos that uses HDR.
2022-06-30 10:31:31 +08:00
Job Bautista 922edb1d93 Issue #1769 - Follow-up: Fix typo in MOZ_ARG_ENABLE_BOOL
Silly copy-paste mistake from AV1
2022-06-29 13:53:11 +08:00
Job Bautista cba46e5628 Issue #1769 - Part 1 Follow-up: Use standard [[deprecated]] for JXL_DEPRECATED.
This fixes building with MSVC for Windows.
2022-06-29 13:53:11 +08:00
Job Bautista 3173108a3f Issue #1769 - Part 2 Follow-up: Do not use namespace parent::child {} for defining nested namespaces.
It doesn't build for MSVC on Windows. Also other decoders are using the old
 way for defining nested namespaces, so better be consistent here.
2022-06-29 13:53:10 +08:00
Job Bautista 5f4d519194 Issue #1769 - Part 1 Follow-up: Tidy up moz.build for highway and libjxl
highway upstream added a new header file to be included in highway.h after
 0.15.0 it seems, so we have to account for that in moz.build.
Also brought back allowing compiler warnings for libjxl and highway.
 Apparently the equivalent of AllowCompilerWarnings() is a bool whose name
 is UPPERCASE and uses under_scores instead of CamelCase.
2022-06-29 13:53:10 +08:00
Job Bautista 2ad17268ed Issue #1769 - Part 3: Cleanup nsJXLDecoder.
The mp4parse Rust component has been removed in Issue #58. It doesn't seem
 like the decoder uses any mp4parse function, so seems like it's safe to
 remove it.
Removed const DecoderType named GetType() because we don't have it in our
 Decoder.h.
I've decided to abandon the OS_RGBA backporting effort and instead went for
 using OS_RGBA's value which is R8G8B8A8. Turns out that there is much more
 going on in Mozilla's version of CreateSurfacePipe than I've expected, like
 the aInFormat and aOutFormat thing which I really don't want to delve into
 right now. Looking at the code it looks like all JPEG-XL images are expected
 to have an alpha channel anyway, so I think my workaround should be safe.
I also removed the dependency in OrientedIntSize and used Size() from gfx/2d/
 Point.h like our PNG and GIF decoders currently do. Migrating our decoders
 to OrientedInt types should be done in another PR instead.
Also also changed the coding style to be closer to UXP's.
Also also also, I made a mistake in Part 1's commit message; the commit used
for libjxl is 192ddd90fdf0c69cd1db1c8d7850db036dd87f4b.
2022-06-29 13:53:10 +08:00
Job Bautista 888c35be89 Issue #1769 - Part 2: Implement JPEG-XL decoder and about:config and MIME plumbing.
Backported from Mozilla bug 1707590 whereever possible.
2022-06-29 13:53:09 +08:00
Job Bautista 73e06b6df9 Issue #1769 - Part 1: Add vendored libjxl and highway sources.
Used old-configure to add the build option for enabling JPEG-XL support.
Highway version: 0.17.0
libjxl version: tree of commit 318c592d98b97d103941b90d47107f06a10c71da
2022-06-29 13:53:09 +08:00
Moonchild 8c1064bc1c Merge pull request 'Update libaom to 3.4.0' (#1938) from jobbautista9/UXP:aom into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1938
2022-06-28 17:09:53 +00:00
Moonchild 52e304d450 Issue #1053 - Follow-up: Correct conditional define on POSIX systems. (uplift)
This conditional was incorrectly changed when removing Android support.
This potentially causes issues on Linux systems by not using pthreads correctly,
which may lead to high idle CPU usage.
2022-06-28 13:28:20 +00:00
Job Bautista 5654295d83 Issue #1937 - Follow-up: Remove some unnecessary includes and sources from sources.mozbuild
These were used only by the encoder, which has been excluded from the build.
2022-06-28 19:20:29 +08:00
Moonchild e6baad1f5f Issue #1937 - Follow-up: Exclude aom_encoder.c/h from our build
We don't need an encoder!
2022-06-28 19:09:45 +08:00
Moonchild 0051421990 Merge pull request 'Fix volume handling in sndio backend.' (#1945) from jobbautista9/UXP:sndio-volumehandling into master
Untested by me but assuming this all works as it's straightforward enough of a change otherwise.
2022-06-28 09:19:07 +00:00
Moonchild 58e418aeb0 Merge pull request 'Fix building libjpeg-turbo on ARM.' (#1947) from jobbautista9/UXP:libjpeg into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1947
2022-06-28 00:02:38 +00:00
Moonchild 904af3005d Issue #21 - Follow-up: Remove some left-over telemetry plumbing. 2022-06-27 08:03:48 +00:00
Moonchild 7e5ab94e0c Issue #1053 - Follow-up: Correct conditional define on POSIX systems.
This conditional was incorrectly changed when removing Android support.
This potentially causes issues on Linux systems by not using pthreads correctly,
which may lead to high idle CPU usage.
2022-06-27 08:02:42 +00:00
Job Bautista ae8639dc24 Issue #1933 - Follow-up: Remove cmakedefine directives from neon-compat.h.
Apparently it wasn't preprocessed yet. Just took the version from
 mozilla-central, and it worked, according to dbsoft.
2022-06-27 14:10:21 +08:00
Job Bautista c56a635ba2 Issue #1937 - Follow-up: Add missing sources, and remove unneeded ones in sources.mozbuild
This should (hopefully) fix building for Windows.
The ones I removed are not used for decoding, but for encoding, which
 we don't need.
2022-06-27 10:11:33 +08:00
Job Bautista f8767c563d Issue #1933 - Follow-up: Fix building on ARM.
neon-compat should be imported as a .h header, not an .in file.
2022-06-27 09:10:56 +08:00
Job Bautista 79e782e53f Issue #1944 - Follow-up: Make it clear that volume is a float.
1. => 1.0, 0. => 0.0
2022-06-27 02:14:05 +08:00
Job Bautista adafcc36fc Issue #1937 - Follow-up: Add missing sources and includes in sources.mozbuild 2022-06-27 02:07:45 +08:00
Job Bautista 411e6879ee Issue #1937 - Follow-up: Fix sources.mozbuild not having exports
Thankfully I already redundantly edited this file myself before to
 account for updates in the source, and backed this up to another
 location just in case the shell script breaks my build files,
 which it did!
2022-06-26 22:42:56 +08:00
Moonchild 9a52ed3bfb Merge pull request 'Update libvorbis to 1.3.7' (#1942) from jobbautista9/UXP:vorbis37 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1942
2022-06-26 11:48:09 +00:00
Moonchild a08f152454 Merge pull request 'Update libwebp to 1.2.2' (#1940) from jobbautista9/UXP:libwebp into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1940
2022-06-26 11:47:44 +00:00
Moonchild 20c80bcbc1 Merge pull request 'Update libogg to 1.3.5' (#1936) from jobbautista9/UXP:libogg into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1936
2022-06-26 11:47:07 +00:00
Moonchild 016efb9f37 Merge pull request 'Update libjpeg-turbo to 2.1.3' (#1934) from jobbautista9/UXP:libjpeg into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1934
2022-06-26 11:46:49 +00:00
Moonchild dcddfbe7af Merge pull request 'Remove support for non-ICU unicode character property tables.' (#1932) from jobbautista9/UXP:326-nukenonicu into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1932
2022-06-26 11:41:56 +00:00
Moonchild 4a1f2294a5 Merge pull request 'Update Unicode to version 10.0, and UTR-50 data to version 17' (#1931) from jobbautista9/UXP:326-u10-take2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1931
2022-06-26 11:41:11 +00:00
Job Bautista f9e0ed9849 Issue #1944 - Fix volume handling in sndio backend.
Backported from Mozilla bug 1467882.
2022-06-26 19:20:24 +08:00
Job Bautista 61cd8ae52b Issue #1941 - Update libvorbis to 1.3.7. 2022-06-26 14:12:52 +08:00
Job Bautista 76f825276d Issue #1939 - Part 2: Update libwebp source. 2022-06-26 12:52:04 +08:00
Job Bautista 3c7fcec8a0 Issue #1939 - Part 1: Update build system for libwebp. 2022-06-26 12:51:41 +08:00
Job Bautista b900a6e486 Issue #1937 - Part 2: Update libaom source. 2022-06-25 18:15:40 +08:00
Job Bautista e3fd2e48e0 Issue #1937 - Part 1: Update build system for libaom. 2022-06-25 18:15:10 +08:00
Job Bautista a2cc16a276 Issue #1935 - Update libogg to 1.3.5
I've also added some notes in the update.sh script that should've been
 documented, as well as changed README to README.md which Mozilla
 somehow forgot to do when they updated to 1.3.3...
2022-06-25 11:31:22 +08:00
Job Bautista c6c6ba4e2d Issue #1933 - Part 2: Update libjpeg-turbo source. 2022-06-24 22:35:22 +08:00
Job Bautista 0f61aed51f Issue #1933 - Part 1: Update build system for libjpeg-turbo. 2022-06-24 22:33:06 +08:00
Job Bautista 2c92077deb Issue #326 - Part 6: Regenerate Unicode data tables with the stripped-down tool 2022-06-23 15:45:09 +08:00
Job Bautista fcc171ddb7 Issue #326 - Part 5: Simplify the genUnicodePropertyData.pl tool to generate only the data we need to supplement ICU properties
Backported from Mozilla bug 1402271.
Some removals were already done by Part 1b.
2022-06-23 15:44:03 +08:00
Job Bautista bbb68510ee Issue #326 - Part 4: Update Unicode data to release 10.0
genUnicodePropertyData.pl's output:
 unknown ICU script MASARAM_GONDI at ../tools/genUnicodePropertyData.pl line 442, <FH> line 2641.
 unknown ICU script SOYOMBO at ../tools/genUnicodePropertyData.pl line 442, <FH> line 2663.
 unknown ICU script ZANABAZAR_SQUARE at ../tools/genUnicodePropertyData.pl line 442, <FH> line 2679.
 Data for CharProp2 = 14864
 Data for FullWidth = 2176
 Data for FullWidthInverse = 2688
 Total data = 19728
2022-06-23 13:28:04 +08:00
Job Bautista d4d80438a3 Issue #326 - Part 3: Explicitly make the Script enum a 16-bit type
This is so we can add a field to gfxShapedWord without making it bigger.
Backported from Mozilla bug 1353000.
2022-06-23 13:23:20 +08:00
Moonchild 785a7c8198 Merge pull request 'Update Unicode to version 9.0, and UTR-50 data to version 16' (#1929) from jobbautista9/UXP:326 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1929
2022-06-22 15:17:51 +00:00
Job Bautista 52da5f2644 Issue #326 - Part 2: Update UTR-50 data to version 16
Based on Mozilla bug 1288961.
2022-06-22 18:09:59 +08:00
Job Bautista aabe1e7517 Issue #326 - Part 1c: Generated files for Unicode 9.0.
In order to generate these files, refer to
 https://wiki.mozilla.org/I18n:Updating_Unicode_version
For those too lazy to go to the link (or if the link no longer works), we need the
 following files from http://www.unicode.org/Public/9.0.0/ucd/:
 - UnicodeData.txt
 - Scripts.txt
 - EastAsianWidth.txt
 - BidiMirroring.txt
 - HangulSyllableType.txt
 - SpecialCasing.txt
 - ReadMe.txt (to record version/date of the UCD)
 - Unihan_Variants.txt (from Unihan.zip)
 As well as Identifier*.txt from http://www.unicode.org/Public/security/9.0.0/,
 which should be put in a "security" subdirectory under the UCD folder, and
 http://www.unicode.org/Public/vertical/revision-15/VerticalOrientation-15.txt put
 in a "vertical" subdirectory.
I suggest downloading all files with GetEmAll, just in case.
Change the perl command a bit, as the guide seems to be outdated:
 perl ../tools/genUnicodePropertyData.pl /path/to/platform/gfx/harfbuzz/src/ /path/to/platform/intl/icu/source/common/unicode/ /path/to/UCD-directory/
2022-06-22 18:07:24 +08:00
Job Bautista bc08ae75fe Issue #326 - Part 1b: Remove outdated ENABLE_INTL_API code.
ENABLE_INTL_API has been removed since Issue #324.
2022-06-22 18:06:20 +08:00
Job Bautista 26adb1ff41 Issue #326 - Part 1a: Update character property table generator script for Unicode 9, and adjust APIs to fit the new identifier-type property model
Backported from Mozilla bug 1281448.
2022-06-22 16:38:14 +08:00
Moonchild 6558fea833 Merge pull request 'Update image/Orientation.h' (#1927) from jobbautista9/UXP:1926 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1927
2022-06-21 16:14:08 +00:00
Moonchild 4af7884929 Merge pull request 'Collected ports for async functions in the JS parser' (#1924) from martok/UXP-contrib:1918-asyncgenerator into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1924
2022-06-21 15:14:23 +00:00
Moonchild 27347bc827 Merge pull request 'Final set of Apple Silicon (ARM64) Macintosh changes.' (#1923) from dbsoft/UXP:AppleARMPart4 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1923
2022-06-21 14:25:47 +00:00
Moonchild e837b693ba Merge pull request 'Table sticky and directionality handling improvements' (#1922) from jobbautista9/UXP:1916-finalpr3 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1922
2022-06-21 13:44:08 +00:00
Job Bautista 334c951f93 Issue #1926 - Update image/Orientation.h 2022-06-19 20:03:54 +08:00
Martok 324f6a0ea3 Issue #1918 - m-c 1353693: Correct parsing of async generator methods 2022-06-17 21:12:01 +02:00
Martok a492c5bdb9 Issue #1918 - m-c 1353690: Properly exclude |await| from consideration as a |let| variable name in async functions, so that a newline between the two separates them into two distinct expressions. 2022-06-17 21:02:38 +02:00
Martok 5d0bc8e811 Issue #1918 - m-c 1345960: Handle shorthand property and destructuring with async keyword properly.
This was previously partially present, but got lost along the way
2022-06-17 21:00:15 +02:00
Martok a90b552eb4 Issue #1918 - m-c 1358246: Report syntax error for stray "async" keyword in object literal property name. 2022-06-17 20:42:40 +02:00
Job Bautista 165df0f7b5 Issue #1916 - Part 3: Sticky/relative position fixes in nsTableWrapperFrame.
Backported from Mozilla bug 1472602.
Didn't include the change in StickyScrollContainer.cpp because it breaks
 linking to libxul.so in the end. It's not important anyway.
2022-06-17 21:33:03 +08:00
Job Bautista 9842b6054c Issue #1916 - Part 2: Add a flag to allow FinishReflowChild to handle relative positioning, and convert the caller for which this makes sense.
Backported from Mozilla bug 1547759.
2022-06-17 19:16:53 +08:00
Job Bautista b3cacb2c3a Issue #1916 - Part 1: Convert flags passed to ReflowChild, FinishReflowChild, etc into an enum class.
Backported from Mozilla bug 1571250.
2022-06-17 16:05:57 +08:00
Brian Smith 532cd0ae7a Issue #1905 - Part 4d - Fix a crash calling a date and time function.
Fixed by updating the xptcinvoke ARM64 code to the latest Mozilla version.
2022-06-15 04:34:44 -05:00
Brian Smith 5e9342a622 Issue #1905 - Part 4c - Follow Firefox and Safari in reporting "Intel" for Mac ARM64 devices.
Based on Mozilla bug 1655285.
2022-06-15 01:29:53 -05:00
Brian Smith f924d979d5 Issue #1905 - Part 4b - Fix issue loading the profile and saving changes to the profile.
Based on the following Mozilla bugs: 1659904, 1659905 and 1659077.
2022-06-15 01:27:04 -05:00
Brian Smith 2d9b9a9617 Issue #1905 - Part 4a - Change "as" test to "Apple" from "LLVM".
This will make this test Mac only, but it should work with any Xcode.
2022-06-15 01:16:15 -05:00
Moonchild 5652238ba8 Merge pull request 'Add Apple Silicon (ARM64) Mac Support' (#1915) from dbsoft/UXP:AppleARM into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1915
2022-06-11 16:07:26 +00:00
Moonchild a164537057 Merge pull request 'Ensure UpdateChecker and UpdateParser can handle empty manifest URLs.' (#1913) from athenian200/UXP:1909_second_attempt into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1913
2022-06-11 16:05:53 +00:00
Jeremy Andrews 2b8f6866cb Fix whitespace. 2022-06-10 19:43:12 -05:00
Brian Smith 0c99c0ca2e Issue #1905 - Part 3k - Separate the GNU and LLVM-as tests.
While we should be able to test these together, I don't want to risk breakages on different *nixes.
2022-06-10 16:33:04 -05:00
Jeremy Andrews ec277eacb8 Issue #1909 - Ensure UpdateChecker and UpdateParser can handle empty manifest URLs. 2022-06-10 12:54:15 -05:00
Moonchild 9ad788853f Issue #1914 - Implement white-space: break-spaces
This also simplifies GetCSSWhitespaceToCompressionMode (FFS with the function
names, Mozilla!) to be less fragile.
2022-06-10 07:35:22 +00:00
Brian Smith 79c3747465 Issue #1905 - Part 3j - Rename the ARM64 assembly files to .S.
Missed the moz.build file in the last commit.
2022-06-10 02:00:29 -05:00
Brian Smith 90307d8552 Issue #1905 - Part 3i - Rename the ARM64 assembly files to .S.
Necessary because they now need to be preprocessed.
2022-06-10 01:53:05 -05:00
Brian Smith 0828fe1232 Issue #1905 - Part 3h - Fix breakages on other platforms.
Mac Intel broke due to incorrect FFI target_dir for Intel.
Linux and possibly other platforms use a secondary aclocal.m4 that still referenced ios.m4.
2022-06-10 01:28:08 -05:00
Brian Smith a977ba55eb Issue #1905 - Part 3g - Final set of changes connecting ARM64 support for Mac.
Back out some of the xptcstubs changes that are not viable for our codebase.
2022-06-09 22:05:20 -05:00
Brian Smith 8199a0d551 Issue #1905 - Part 3f - Collection of fixes connecting ARM support to the Mac build.
Also update ARM XPT code to add Mac/Apple support.
2022-06-09 18:08:04 -05:00
Brian Smith 6996115924 Issue #1905 - Part 3e - Fix NSPR build on ARM.
The dynamic loader had been falling through to the ancient PowerPC code without __aarch64__ #ifdef
2022-06-09 14:57:21 -05:00
Brian Smith 56ff5a50d4 Issue #1905 - Part 3d - Report GNU AS when the system "as" is LLVM-as.
LLVM as is generally compatible with GNU, this should allow ICU to build on ARM Macs.
2022-06-09 14:38:33 -05:00
Brian Smith 357463d9d7 Issue #1905 - Part 3c - Remove iOS from the rest of the configure system. 2022-06-09 14:35:28 -05:00
Brian Smith e515299477 Issue #1905 - Part 3b - Remove iOS support from old-configure.
iOS is not really a viable target and Apple Silicon Macs report the same core system.
2022-06-09 14:19:05 -05:00
Brian Smith ad1bd19571 Issue #1905 - Part 3a - Resign python binary ad-hoc since install_name_tool invalidates code signature.
The code signature is invalidated on Intel as well, but on ARM the binary fails to run with an invalid code signature error.
2022-06-09 14:12:00 -05:00
Moonchild d8070a8e0d Issue #1877 - Follow-up: Disable WMF VP9 decoding due to playback issues
On some systems this breaks frame pacing and causes stuttery playback,
especially in combination with MSE and stream switching/chunked delivery.
2022-06-08 19:00:30 +00:00
Moonchild cfc0eeca53 Revert "Issue #1909 - Guard against empty update manifest URL"
This reverts commit d7fadcdef9.
2022-06-07 11:59:07 +00:00
Moonchild cd7fab2f80 Revert "Issue #1909 - Guard against empty update manifest URL"
This reverts commit d7fadcdef9.
2022-06-07 11:58:39 +00:00
Jeremy Andrews 9733f9d2e5 [MailNews] Disable leftover Account Provisioner code. 2022-06-06 11:22:22 -05:00
Brian Smith e65f15fb4c Issue #1905 - Part 2c - Fix OpenGL crash caused by calling [NSOpenGLContext setView:] on the Compositor thread.
Starting with SDK 10.14 I believe, many functions have main thread checks, including setView: and update.
So we now move the code in the updateGLContext method into doDrawRect which runs on the main thread.
2022-06-04 17:13:45 -05:00
Jeremy Andrews 9c395967cc [MailNews] Allow shift-clicking on Edit As New to edit a message as plaintext.
Ref: BZ 731688
2022-06-04 16:13:32 -05:00
Moonchild ebd3dd9228 Merge branch 'master' into release 2022-06-03 21:50:44 +00:00
Moonchild 64e3f4118a Merge pull request 'Support MacOS Monterey version detection, 11.0 and newer SDKs and fix system font crash.' (#1912) from dbsoft/UXP:AppleARM into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1912
Reviewed-by: Moonchild <moonchild@palemoon.org>
2022-06-03 19:14:12 +00:00
Brian Smith 4abc90ad3e Issue #1905 - Part 2b - Fix crash on startup due to inability to load system font with newer SDKs.
Fix based on Mozilla Bug 1672842.
2022-06-03 05:56:46 -05:00
Brian Smith 43dfe703da Issue #1905 - Part 2a - Build system fixes to allow use of SDK versioned 11.0 and higher.
Also don't include code incompatible with SDK 10.15 and higher, when building with such a SDK.
2022-06-02 15:56:05 -05:00
Moonchild cb40e4e7ef Merge branch 'master' into release 2022-06-01 13:54:11 +00:00
Moonchild d53fd09524 [NSS] Update NSS to 3.52.6
- Initialize pointers passed to NSS_CMSDigestContext_FinishMultiple (Bug 1767590)
2022-06-01 10:22:30 +00:00
Moonchild 9551e4c9bc [DOM] Clip image data transfers. 2022-06-01 09:48:54 +00:00
Moonchild 193b14528a Issue #1911 - Clean up nsFilePicker on Windows. 2022-05-31 23:17:48 +00:00
Moonchild 70a9fe579f Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2022-05-30 19:18:16 +00:00
Moonchild eff26719cd Merge pull request 'Guard against empty update manifest URL' (#1910) from athenian200/UXP:empty-manifest-url into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1910
2022-05-30 19:15:04 +00:00
Moonchild 14f12a065e [XPCOM] Simplify nsITimer API.
It's much simpler to hold a death grip on the timer than to have a fragile
"release upon cancel" construct.
2022-05-30 11:08:22 +00:00
FranklinDM d7fadcdef9 Issue #1909 - Guard against empty update manifest URL
When installing an incompatible add-on, the add-ons manager checks first if a newer and compatible version of that add-on is available by sending a request either to the AUS or the provided update URL in the manifest.

If there's no update URL in the manifest and if the application does not provide an add-on update URL via preferences, the add-ons manager will error out and fail to notify that the said add-on is incompatible.

This commit addresses that by:
(a) preventing substitutions on the update manifest URL - this throws an error if it's empty; and
(b) failing early in the add-on update checker if the update manifest URL is empty and sends out an error notification
2022-05-30 09:24:21 +00:00
Moonchild 775ce7fc17 [network] Fix typo in nsSocketTransport2.cpp
Follow-up to 7322bc0e9d
2022-05-30 09:16:26 +00:00
Moonchild a2054a3eaf [DOM] Promise worker-proxy cleanup improvements 2022-05-30 08:28:48 +00:00
Moonchild c048d762cf [DOM] Don't allow internal MIME types to be assigned to DataTransfer
We already blocked x-moz-file(-promise) and x-moz-place* but of course people
would find ways to abuse other internal types. This change now blocks everything
except x-moz-url types which are harmless. (i.e. whitelist instead of blacklist)
2022-05-30 08:28:11 +00:00
Moonchild 39fe9559bb [places] add Content-Security-Policy to bookmarks HTML export
This commit adds a Content-Security-Policy to HTML documents for exported
bookmarks. The change will stop active content (like bookmarklets) from being
directly runnable in the exported local file, which is *not* breaking the
normal use case in which a bookmarklet is intended to modify an existing page.
It *will* affect the use case where you have a full website/application stored
in a bookmarklet that was supposed to replace the current web page. In this
case, users can right-click copy the link and drop it in the address bar.

Note: The CSP does not mean that this is a severe attack vector. It merely
provides a basic protection measure for users who use the exported bookmarks in
a non-standard way as a local file.
2022-05-30 08:28:01 +00:00
Paul Adenot baa0c0a91e [DOM media] Handle truncated WAV stream. 2022-05-30 08:26:43 +00:00
Moonchild 7322bc0e9d [network] SocketTransport2 cleanup 2022-05-30 08:26:32 +00:00
Peter Van der Beken 0fad293135 [DOM events] Clear event listener. 2022-05-30 08:26:22 +00:00
Moonchild 612b110946 [DOM media] Adjust lock scope in MediaSourceDemuxer 2022-05-30 08:26:12 +00:00
Randell Jesup ac6d297268 [Image] Image cleanup 2022-05-30 08:25:59 +00:00
Moonchild ea3642103f [DOM media] Add a lock around Reset() in WebMBufferedParser 2022-05-30 08:25:48 +00:00
Moonchild e591cf1e1a [DOM] worker cleanup. 2022-05-30 08:25:33 +00:00
Moonchild 07a26bff17 [DOM] Consistent error messages for scripts which failed to load. 2022-05-30 08:25:20 +00:00
Moonchild 0d8cddaa73 [DOM] Clear sinks and block further use after storage observer shutdown. 2022-05-30 08:25:08 +00:00
Moonchild a595fa29a3 [Network] Add a socket thread check and early exit for corner cases. 2022-05-30 08:19:22 +00:00
Moonchild 2705986b4a [xpcom] Timer cleanup, assertions and comments. 2022-05-30 08:18:26 +00:00
Moonchild 8e42fccca6 [image] Add additional locks to imgFrame. 2022-05-30 08:17:20 +00:00
Moonchild edd7cd7d87 [Network] Only call nsWSAdmissionManager::ConnectNext on the main thread. 2022-05-30 08:13:03 +00:00
Moonchild 662dba55fd Merge branch 'master' into release 2022-05-29 11:13:44 +00:00
Moonchild 23327d7213 Merge pull request 'Fix several -Wclass-memaccess GCC warnings in /gfx' (#1908) from trav90/UXP-contrib:gcc-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1908
2022-05-29 08:16:24 +00:00
Moonchild 04d84d20fa Merge pull request 'Update FFVPX to version 4.2.7' (#1907) from trav90/UXP-contrib:ffvpx-update into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1907
2022-05-29 08:15:27 +00:00
trav90 676305dfeb Issue #83 - Use correct #include in parseutils.c 2022-05-28 16:44:09 -05:00
trav90 9f0c3479c0 Issue #457 - Make GLContextSymbols a pure aggregate POD 2022-05-28 11:45:52 -05:00
trav90 33a3173c79 Issue #457 - Remove the constructor from gfxShapedText::CompressedGlyph and make it a trivial class
Also provide a couple of convenience "factory" methods to create simple and complex glyph values.
2022-05-28 11:45:35 -05:00
trav90 e517623574 Issue #83 - Update FFVPX to version 4.2.7 2022-05-28 08:53:54 -05:00
Moonchild 61efa1ee08 Merge pull request 'Remove the use of tagged shape pointers' (#1906) from 1742 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1906
2022-05-28 03:44:46 +00:00
Moonchild 8a737f3234 Merge branch 'read-barriers' into 1742 2022-05-27 16:53:08 +00:00
Jeremy Andrews 7e570f010f Issue #1742 - Part 5: Remove unnecessary GCPtr::unbarrieredGet
Ref: BZ 1323441
2022-05-27 07:25:48 -05:00
Jeremy Andrews 64ea1e09c2 Issue #1742 - Part 4: Don't trigger read barriers when comparing wrapped pointers types
This is actually an undocumented dependency of Bug 1325406 for Linux and
SunOS.

Ref: BZ 1308236
2022-05-27 07:21:59 -05:00
Moonchild 84c7d3c2f6 No issue - relax ctts flag checking in media/libstagefright
Some encoders will set ctts flags incorrectly (similar to version) resulting in
libstagefright aborting playback of media based on the media header.
(Looking at you, Twitter)
This change relaxes libstagefright's checking to pass ctts flags 0 or 1 and
falls through to actually trying to decoding the file.
2022-05-26 21:23:06 +00:00
Brian Smith 5e28396116 Issue #1905 - Part 1 - Implement detection of Monterey (12.x), Intel emulation and fix required OS version check. 2022-05-25 18:51:46 -05:00
Moonchild cd55d0fbe4 Issue #1742 - Remove the ambiguous portions of gc that dealt with tagged
pointers for shapes.

Nobody likes "isNullLike(obj)" when trying to garbage collect. It either is or
is not. Master Yoda would be pleased with this change.
2022-05-25 18:33:46 +00:00
Jeremy Andrews c772d0ef21 No Issue - Epyrus-related platform changes.
I'm very confident these changes will not impact IceDove-UXP or Pale Moon. What they do is conditionally disable a button that allows people to get a new account from a Mozilla-advertised e-mail provider, and remove the hard-coded OAuth2 keys in favor of a user-controlled preference.
2022-05-24 16:40:36 -05:00
Moonchild 46c9f72fc0 Issue #1742 - Part 3: use JS::PropertyResult instead of Shape*
This is the meat of the issue and switches using raw shape pointers out for
PropertyResult objects where feasible.
2022-05-24 21:19:51 +00:00
Moonchild a160e7772a Issue #1742 - Part 2: Add a class to encapsulate the possible results of a property lookup 2022-05-24 21:15:12 +00:00
Moonchild dc5a60fb62 Issue #1742 - Part 1: Refactor rooting base class templates
Based on Bug 1325406
2022-05-24 06:51:46 +00:00
Moonchild 1588077e62 Issue #1847 - Follow-up: Re-enable building of FIPS mode in NSS.
This fell by the wayside when transitioning to gyp, but there's no good
transition path for people previously enabling the obsolete FIPS-140 mode.
2022-05-22 08:42:57 +00:00
Moonchild 17970a216b Merge pull request 'Silence some GCC compiler warnings in FFmpeg code' (#1902) from trav90/UXP-contrib:gcc-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1902
2022-05-21 22:27:38 +00:00
trav90 be82ca4b1f Issue #457 - Silence some GCC compiler warnings in FFmpeg code 2022-05-21 13:07:38 -05:00
FranklinDM 00c51f75fa No issue - Add null check to send packet function in the developer tools server
This resolves some of the useless log spam thrown in the browser console by the developer tools.
2022-05-21 16:37:38 +00:00
Moonchild addadda237 Merge pull request 'Implement nullish coalescing operator' (#1901) from FranklinDM/UXP-contrib:work_js-nullish-coalescing into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1901
Reviewed-by: Moonchild <moonchild@palemoon.org>
2022-05-21 10:24:26 +00:00
FranklinDM 0efc152b07 Issue #1894 - Part 7: Update tests
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-21 01:09:51 +08:00
FranklinDM 8618fcbe89 Issue #1894 - Part 6: Check for nullish values when folding coalesce nodes
This uses a different approach by modifying the `Boolish` function directly to act differently if we're checking for nullish values.

Partially based on:
Bug 1566141 - Implement the Nullish Coalescing operator (??) proposal
Bug 1599163 - Nullish coalescing operator returns undefined for void expressions
2022-05-21 01:02:24 +08:00
FranklinDM 20ee1ece01 Issue #1894 - Part 5: Implement bytecode for nullish coalescing
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-21 01:02:23 +08:00
FranklinDM bbe40dab58 Issue #1894 - Part 4: Implement IonMonkey support for nullish coalescing
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-21 01:02:22 +08:00
FranklinDM 5e500dc2b4 Issue #1894 - Part 3: Implement support for nullish coalescing in JS reflection
Partially based on:
Bug 1566141 - Implement the Nullish Coalescing operator (??) proposal
Bug 1593415 - Assertion failure: false, at js/src/builtin/ReflectParse.cpp:3092 with nullish coalescing
2022-05-21 01:02:22 +08:00
FranklinDM 5d6ae8b156 Issue #1894 - Part 2: Implement support for nullish coalescing in the JS parser
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-21 01:02:21 +08:00
FranklinDM 99f31e38ba Issue #1894 - Part 1: Implement coalesce JS opcode
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-21 01:02:16 +08:00
Moonchild 51117c2b62 Bug 1679987 - Remove unused includes of nsCharSeparatedTokenizer.h. 2022-05-17 19:42:24 +00:00
Moonchild 991b053042 Merge pull request 'Add support for MP4 playback on Linux via FFmpeg 5.0' (#1900) from trav90/UXP-contrib:ffmpeg-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1900
2022-05-17 19:22:18 +00:00
Moonchild 1bf41a59b9 Issue #1210 - Keep timepicker disabled for now.
This needs localization work before enabling.
2022-05-16 20:12:09 +00:00
Moonchild 86db73b5d1 Issue #1813 - Enable date and time picker by default.
Resolves #1813
2022-05-16 20:08:29 +00:00
trav90 f302cc1391 Issue #1893 - Part 3: Update audio & video decoders for FFmpeg 5.0
FFmpeg 5.0 removed some deprecated symbols so we need to update our decoding code to account for it.
2022-05-16 10:58:20 -05:00
trav90 cb0f8292a6 Issue #1893 - Part 2: Add support for libavcodec 59/FFmpeg 5.0 2022-05-16 10:55:57 -05:00
trav90 4e03bfdec8 Issue #1893 - Part 1: Import required FFmpeg 5.0 header files 2022-05-16 10:53:55 -05:00
FranklinDM bdfd859beb Issue #1898 - Make sure that the sanity test stops running if necessary
As part of telemetry removal, d60103257e removed the `reportResult` function which also handles the stopping of the sanity test. This also removes unused histogram enumeration values and revises/adds some comments.
2022-05-15 14:48:09 +00:00
Moonchild 5338dcd132 Issue #1899 - Make sure the test for it still works
Some hoops to make sure the test still works if the default value for the pref
is false, requiring setting and resetting it and making sure the observers have
time to react to these changes before testing.
2022-05-14 12:22:48 +00:00
Moonchild a9d3c2b52a Issue #1899 - Disable the (broken) MDN integration widget by default. 2022-05-14 11:06:02 +00:00
Moonchild 517aec3111 Issue #1509 - Invalidate previous result when datalist is changed.
Even if `<datalist>` is dynamically changed, the autocomplete controller still
uses the previous search result. If changed, we have to ignore the previous
result that may now be invalid.

Also, even if `<datalist>` is changed, we have to keep the selected index
(See Mozilla Bug 595069), so we cannot use `ResetInternalState` in this
situation because it resets the selected index.

This resolves #1509.
2022-05-10 21:03:53 +00:00
Moonchild 8760ce023c Issue #1895 - Implement queueMicroTask(callback()) (uplift) 2022-05-07 14:40:14 +00:00
Moonchild b86e148bb7 Roll back milestone version to release. 2022-05-06 12:43:43 +00:00
Moonchild 9e83721e5e Merge branch 'master' into release 2022-05-06 12:43:00 +00:00
Moonchild dc2d6c2e60 Revert "No Issue - Make content-type on JAR channels behave the same as HTTP channels."
This reverts commit 425677ada7.
2022-05-03 17:38:19 +00:00
Moonchild 4ada6f6762 Update 7zSD for v31 2022-05-03 17:38:12 +00:00
6828 changed files with 885621 additions and 416268 deletions

No files matched your search

+1 -1
View File
@@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Clobber for NSS update
Issue #1971 - Update to ICU 63 requires clobber
+2 -38
View File
@@ -137,16 +137,10 @@ default:: $(BUILD_BACKEND_FILES)
endif
install_manifests := \
$(addprefix dist/,branding idl include public private sdk xpi-stage) \
$(addprefix dist/,branding bin idl include public private sdk xpi-stage) \
_tests \
$(NULL)
# Skip the dist/bin install manifest when using the hybrid
# FasterMake/RecursiveMake backend. This is a hack until bug 1241744 moves
# xpidl handling to FasterMake in that case, mechanically making the dist/bin
# install manifest non-existent (non-existent manifests being skipped)
ifeq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
install_manifests += dist/bin
endif
install_manifest_depends = \
CLOBBER \
$(configure_dir)/configure \
@@ -166,27 +160,6 @@ endif
.PHONY: install-manifests
install-manifests: $(addprefix install-,$(install_manifests))
# If we're using the hybrid FasterMake/RecursiveMake backend, we want
# to recurse in the faster/ directory in parallel of install manifests.
# But dist/idl needs to happen before (cf. dependencies in
# config/faster/rules.mk)
ifneq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
install-manifests: faster
.PHONY: faster
faster: install-dist/idl
$(MAKE) -C faster FASTER_RECURSIVE_MAKE=1
endif
.PHONY: tup
tup:
$(call BUILDSTATUS,TIERS make tup)
$(call BUILDSTATUS,TIER_START make)
$(MAKE) install-manifests buildid.h source-repo.h
$(call BUILDSTATUS,TIER_FINISH make)
$(call BUILDSTATUS,TIER_START tup)
@$(TUP) $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),,--verbose)
$(call BUILDSTATUS,TIER_FINISH tup)
# process_install_manifest needs to be invoked with --no-remove when building
# js as standalone because automated builds are building nspr separately and
# that would remove the resulting files.
@@ -198,17 +171,8 @@ endif
.PHONY: $(addprefix install-,$(subst /,_,$(install_manifests)))
$(addprefix install-,$(install_manifests)): install-%: $(install_manifest_depends)
ifneq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
@# If we're using the hybrid FasterMake/RecursiveMake backend, we want
@# to ensure the FasterMake end doesn't have install manifests for the
@# same directory, because that would blow up
$(if $(wildcard _build_manifests/install/$(subst /,_,$*)),$(if $(wildcard faster/install_$(subst /,_,$*)*),$(error FasterMake and RecursiveMake ends of the hybrid build system want to handle $*)))
endif
$(addprefix $(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$*) ,$(wildcard _build_manifests/install/$(subst /,_,$*)))
# Dummy wrapper rule to allow the faster backend to piggy back
$(addprefix install-,$(subst /,_,$(filter dist/%,$(install_manifests)))): install-dist_%: install-dist/% ;
.PHONY: install-tests
install-tests: install-test-files
Vendored
-1
View File
@@ -25,7 +25,6 @@ builtin(include, build/autoconf/zlib.m4)dnl
builtin(include, build/autoconf/icu.m4)dnl
builtin(include, build/autoconf/clang-plugin.m4)dnl
builtin(include, build/autoconf/alloc.m4)dnl
builtin(include, build/autoconf/ios.m4)dnl
builtin(include, build/autoconf/sanitize.m4)dnl
MOZ_PROG_CHECKMSYS()
-129
View File
@@ -1,129 +0,0 @@
import java.util.regex.Pattern
allprojects {
// Expose the per-object-directory configuration to all projects.
ext {
mozconfig = gradle.mozconfig
topsrcdir = gradle.mozconfig.topsrcdir
topobjdir = gradle.mozconfig.topobjdir
}
repositories {
if (gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY) {
maven {
url gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY
}
}
}
}
buildDir "${topobjdir}/gradle/build"
buildscript {
repositories {
if (gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY) {
maven {
url gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY
}
}
// For android-sdk-manager SNAPSHOT releases.
maven {
url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath('com.stanfy.spoon:spoon-gradle-plugin:1.0.4') {
// Without these, we get errors linting.
exclude module: 'guava'
}
// Provided in tree.
classpath 'com.jakewharton.sdkmanager:gradle-plugin:1.5.0-SNAPSHOT'
}
}
task generateCodeAndResources(type:Exec) {
workingDir "${topobjdir}"
commandLine mozconfig.substs.GMAKE
args '-C'
args "${topobjdir}/mobile/android/base"
args 'gradle-targets'
// Only show the output if something went wrong.
ignoreExitValue = true
standardOutput = new ByteArrayOutputStream()
errorOutput = standardOutput
doLast {
if (execResult.exitValue != 0) {
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${execResult.exitValue}:\n\n${standardOutput.toString()}")
}
}
}
// Skip unit test for all build variants, unless if it was specifically requested by user.
// The enabled property for the unit test tasks is reset based on the command line task names just before the task execution.
// I bet there is a easier/cleaner way to do this, but this gets the job done for now.
Pattern pattern = Pattern.compile('.*test(.+UnitTest)?.*')
boolean startTasksIncludeTest = gradle.startParameter.taskNames.any {
taskName ->
taskName.matches(pattern)
}
gradle.taskGraph.beforeTask {
Task task ->
if (task.name.matches(pattern)) {
task.enabled = startTasksIncludeTest
}
}
afterEvaluate {
subprojects {
if (!hasProperty('android')) {
return
}
android.applicationVariants.all {
preBuild.dependsOn rootProject.generateCodeAndResources
}
android.libraryVariants.all {
preBuild.dependsOn rootProject.generateCodeAndResources
}
}
}
apply plugin: 'idea'
idea {
project {
languageLevel = '1.7'
}
module {
// Object directories take a huge amount of time for IntelliJ to index.
// Exclude them. Convention is that object directories start with obj.
// IntelliJ is clever and will not exclude the parts of the object
// directory that are referenced, if there are any. In practice,
// indexing the entirety of the tree is taking too long, so exclude all
// but mobile/.
def topsrcdirURI = file(topsrcdir).toURI()
excludeDirs += files(file(topsrcdir)
.listFiles({it.isDirectory()} as FileFilter)
.collect({topsrcdirURI.relativize(it.toURI()).toString()}) // Relative paths.
.findAll({!it.equals('mobile/')}))
// If topobjdir is below topsrcdir, hide only some portions of that tree.
def topobjdirURI = file(topobjdir).toURI()
if (!topsrcdirURI.relativize(topobjdirURI).isAbsolute()) {
excludeDirs -= file(topobjdir)
excludeDirs += files(file(topobjdir).listFiles())
excludeDirs -= file("${topobjdir}/gradle")
}
if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
excludeDirs += file("${topsrcdir}/mobile/android/thirdparty/com/adjust")
}
}
}
task wrapper(type: Wrapper) {
}
-108
View File
@@ -1,108 +0,0 @@
dnl This Source Code Form is subject to the terms of the Mozilla Public
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
AC_DEFUN([MOZ_IOS_PATH_PROG],
[
changequote({,})
_prog_name=ifelse($2, {}, `echo $1 | tr "[:upper:]" "[:lower:]"`, $2)
changequote([,])
AC_CACHE_CHECK([for $_prog_name in iOS SDK],
ac_cv_ios_path_$1,
[
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
_res=$?
if test $_res -ne 0; then
AC_MSG_ERROR([Could not find '$_prog_name' in the iOS SDK])
fi
ac_cv_ios_path_$1=$_path
])
$1="${ac_cv_ios_path_$1}$3"
])
AC_DEFUN([MOZ_IOS_SDK],
[
MOZ_ARG_WITH_STRING(ios-sdk,
[ --with-ios-sdk=TYPE
Type of iOS SDK to use (iphonesimulator, iphoneos)
and optionally version (like iphoneos8.2)],
ios_sdk=$withval)
MOZ_ARG_ENABLE_STRING(ios-target,
[ --enable-ios-target=VER (default=8.0)
Set the minimum iOS version needed at runtime],
[_IOS_TARGET=$enableval])
_IOS_TARGET_DEFAULT=8.0
case "$target" in
arm*-apple-darwin*)
if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then
ios_sdk=iphoneos
fi
case "$ios_sdk" in
iphoneos*)
ios_target_arg="-miphoneos-version-min"
;;
*)
AC_MSG_ERROR([Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'.])
;;
esac
;;
*-apple-darwin*)
ios_target_arg="-mios-simulator-version-min"
case "$ios_sdk" in
# Empty SDK is okay, this might be an OS X desktop build.
""|iphonesimulator*)
;;
# Default to iphonesimulator
yes)
ios_sdk=iphonesimulator
;;
*)
AC_MSG_ERROR([Only 'iphonesimulator' SDKs are valid when targeting iOS simulator.])
;;
esac
;;
esac
if test -n "$ios_sdk"; then
if test -z "$_IOS_TARGET"; then
_IOS_TARGET=$_IOS_TARGET_DEFAULT
ios_target_arg="${ios_target_arg}=${_IOS_TARGET}"
fi
# Ensure that xcrun knows where this SDK is.
ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null`
_ret=$?
if test $_ret -ne 0; then
AC_MSG_ERROR([iOS SDK '$ios_sdk' could not be found.])
fi
MOZ_IOS=1
export HOST_CC=clang
export HOST_CXX=clang++
# Add isysroot, arch, and ios target arguments
case "$target_cpu" in
arm*)
ARGS="-arch armv7"
;;
*)
# Unfortunately simulator builds need this.
export CROSS_COMPILE=1
;;
esac
ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg"
# Now find our tools
MOZ_IOS_PATH_PROG(CC, clang, $ARGS)
MOZ_IOS_PATH_PROG(CXX, clang++, $ARGS)
export CPP="$CC -E"
export LD="$CXX"
MOZ_IOS_PATH_PROG(AR)
MOZ_IOS_PATH_PROG(AS, as, $ARGS)
MOZ_IOS_PATH_PROG(OTOOL)
MOZ_IOS_PATH_PROG(STRIP)
export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/
fi
AC_SUBST(MOZ_IOS)
])
+3
View File
@@ -27,6 +27,9 @@ fi
if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then
GNU_AS=1
fi
if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c Apple`" != "0"; then
GNU_AS=1
fi
rm -f conftest.out
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
GNU_LD=1
-58
View File
@@ -1,58 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Imports
from __future__ import print_function, unicode_literals
import os
import sys
# Sanity check
if not len(sys.argv) > 1:
print("Incorrect number of arguments")
sys.exit(1)
# Vars
listConfigure = sys.argv[1:]
listConfig = []
strBrandingDirectory = ""
listViolations = []
# Build a list of set configure variables
for _value in listConfigure:
_splitString = _value.split("=")
if _splitString[1] == "1":
listConfig += [ _splitString[0] ]
elif _splitString[0] == "MOZ_BRANDING_DIRECTORY":
strBrandingDirectory = _splitString[1]
# Only applies if using Official Branding or specific branding directories
if ('MOZ_OFFICIAL_BRANDING' in listConfig) or (strBrandingDirectory.endswith("branding/official")) or (strBrandingDirectory.endswith("branding/unstable")):
# Applies to Pale Moon and Basilisk
if ('MC_BASILISK' in listConfig) or ('MC_PALEMOON' in listConfig):
listViolations += [
'MOZ_SYSTEM_JPEG',
'MOZ_SYSTEM_ZLIB',
'MOZ_SYSTEM_BZ2',
'MOZ_SYSTEM_JEMALLOC'
]
# Applies to Pale Moon Only
if 'MC_PALEMOON' in listConfig:
listViolations += [
'MOZ_EME',
'MOZ_WEBRTC'
]
# Iterate through enabled violations and output 1 to DIRECTIVE4 if any are found
for _value in listViolations:
if _value in listConfig:
sys.stdout.write("1")
sys.exit(1)
# Exit outputting nothing to DIRECTIVE4 being empty because there are no violations
sys.exit(0)
-54
View File
@@ -1,54 +0,0 @@
.. _build_cppeclipse:
=====================
Cpp Eclipse Projects
=====================
For additional information on using Eclipse CDT see
`the MDN page
<https://developer.mozilla.org/en-US/docs/Eclipse_CDT>`_.
The build system contains alpha support for generating C++ Eclipse
project files to aid with development.
Please report bugs to bugzilla and make them depend on bug 973770.
To generate a C++ Eclipse project files, you'll need to have a fully
built tree::
mach build
Then, simply generate the Eclipse build backend::
mach build-backend -b CppEclipse
If all goes well, the path to the generated workspace should be
printed.
To use the generated Eclipse project files, you'll need to
have a Eclipse CDT 8.3 (We plan to follow the latest Eclipse release)
`Eclipse CDT plugin
<https://www.eclipse.org/cdt/>`_
installed. You can then import all the projects into Eclipse using
*File > Import ... > General > Existing Projects into Workspace*
-only- if you have not ran the background indexer.
Updating Project Files
======================
As you pull and update the source tree, your C++ Eclipse files may
fall out of sync with the build configuration. The tree should still
build fine from within Eclipse, but source files may be missing and in
rare circumstances Eclipse's index may not have the proper build
configuration.
To account for this, you'll want to periodically regenerate the
Eclipse project files. You can do this by running ``mach build
&& mach build-backend -b CppEclipse`` from the
command line.
Currently, regeneration rewrites the original project files. **If
you've made any customizations to the projects, they will likely get
overwritten.** We would like to improve this user experience in the
future.
-8
View File
@@ -28,14 +28,6 @@ Important Concepts
locales
rust
integrated development environment (IDE)
========================================
.. toctree::
:maxdepth: 1
cppeclipse
visualstudio
mozbuild
========
+21 -21
View File
@@ -5,41 +5,44 @@ Supported Configurations
========================
This page attempts to document supported build configurations.
For more up-to-date information please go to http://developer.palemoon.org/
Windows
=======
We support building on Windows XP and newer operating systems using
Visual Studio 2010 and newer.
We support building on Windows 7 and newer operating systems using
Visual Studio 2015 U3.
The following are not fully supported by Mozilla (but may work):
The following are not fully supported (but may work):
* Building without the latest *MozillaBuild* Windows development
environment
* Building with a *MozillaBuild* Windows development
environment not mentioned on the developer documentation site.
* Building with Mingw or any other non-Visual Studio toolchain.
OS X
====
We support building on OS X 10.6 and newer with the OS X 10.6 SDK.
(This section needs updating)
We support building on OS X 10.8 and newer with the OS X 10.8 SDK.
The tree should build with the following OS X releases and SDK versions:
* 10.6 Snow Leopard
* 10.7 Lion
* 10.8 Mountain Lion
* 10.9 Mavericks
* 10.10 Yosemite
* 10.11 El Capitan
* 10.12 Sierra
* 10.13 High Sierra
* 10.14 Mojave
* 10.15 Catalina
* 11 Big Sur (Including Apple ARM SoC)
The tree requires building with Clang 3.3 and newer. This corresponds to
version of 4.2 of Apple's Clang that ships with Xcode. This corresponds
to Xcode 4.6 and newer. Xcode 4.6 only runs on OS X 10.7.4 and newer.
So, OS X 10.6 users will need to install a non-Apple toolchain. Running
``mach bootstrap`` should install an appropriate toolchain from Homebrew
or MacPorts automatically.
The tree requires building with Apple's Clang 4.2 that ships with Xcode.
This corresponds to Xcode 4.6 and newer. Xcode 4.6 only runs on OS X 10.7.4
and newer.
The tree should build with GCC 4.4 and newer on OS X. However, this
The tree should build with GCC 7.1 and newer on OS X. However, this
build configuration isn't as widely used (and differs from what Mozilla
uses to produce OS X builds), so it's recommended to stick with Clang.
uses to produce OS X builds).
Linux
=====
@@ -47,9 +50,6 @@ Linux
Linux 2.6 and later kernels are supported.
Most distributions are supported as long as the proper package
dependencies are in place. Running ``mach bootstrap`` should install
packages for popular Linux distributions. ``configure`` will typically
dependencies are in place. ``configure`` will typically
detect missing dependencies and inform you how to disable features to
work around unsatisfied dependencies.
Clang 3.3 or GCC 4.4 is required to build the tree.
-100
View File
@@ -1,100 +0,0 @@
.. _build_visualstudio:
======================
Visual Studio Projects
======================
The build system contains alpha support for generating Visual Studio
project files to aid with development.
To generate Visual Studio project files, you'll need to have a configured tree::
mach configure
(If you have built recently, your tree is already configured.)
Then, simply generate the Visual Studio build backend::
mach build-backend -b VisualStudio
If all goes well, the path to the generated Solution (``.sln``) file should be
printed. You should be able to open that solution with Visual Studio 2010 or
newer.
Currently, output is hard-coded to the Visual Studio 2010 format. If you open
the solution in a newer Visual Studio release, you will be prompted to upgrade
projects. Simply click through the wizard to do that.
Structure of Solution
=====================
The Visual Studio solution consists of hundreds of projects spanning thousands
of files. To help with organization, the solution is divided into the following
trees/folders:
Build Targets
This folder contains common build targets. The *full* project is used to
perform a full build. The *binaries* project is used to build just binaries.
The *visual-studio* project can be built to regenerate the Visual Studio
project files.
Performing the *clean* action on any of these targets will clean the
*entire* build output.
Binaries
This folder contains common binaries that can be executed from within
Visual Studio. If you are building the Firefox desktop application,
the *firefox* project will launch firefox.exe. You probably want one of
these set to your startup project.
Libraries
This folder contains entries for each static library that is produced as
part of the build. These roughly correspond to each directory in the tree
containing C/C++. e.g. code from ``dom/base`` will be contained in the
``dom_base`` project.
These projects don't do anything when built. If you build a project here,
the *binaries* build target project is built.
Updating Project Files
======================
As you pull and update the source tree, your Visual Studio files may fall out
of sync with the build configuration. The tree should still build fine from
within Visual Studio. But source files may be missing and IntelliSense may not
have the proper build configuration.
To account for this, you'll want to periodically regenerate the Visual Studio
project files. You can do this within Visual Studio by building the
``Build Targets :: visual-studio`` project or by running
``mach build-backend -b VisualStudio`` from the command line.
Currently, regeneration rewrites the original project files. **If you've made
any customizations to the solution or projects, they will likely get
overwritten.** We would like to improve this user experience in the
future.
Moving Project Files Around
===========================
The produced Visual Studio solution and project files should be portable.
If you want to move them to a non-default directory, they should continue
to work from wherever they are. If they don't, please file a bug.
Invoking mach through Visual Studio
===================================
It's possible to build the tree via Visual Studio. There is some light magic
involved here.
Alongside the Visual Studio project files is a batch script named ``mach.bat``.
This batch script sets the environment variables present in your *MozillaBuild*
development environment at the time of Visual Studio project generation
and invokes *mach* inside an msys shell with the arguments specified to the
batch script. This script essentially allows you to invoke mach commands
inside the MozillaBuild environment without having to load MozillaBuild.
While projects currently only utilize the ``mach build`` command, the batch
script does not limit it's use: any mach command can be invoked. Developers
may abuse this fact to add custom projects and commands that invoke other
mach commands.
+1 -1
View File
@@ -16,7 +16,7 @@ if os == 'WINNT':
flavors = {
'WINNT': 'win',
'Linux': 'linux',
'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
'Darwin': 'mac',
'SunOS': 'solaris',
'GNU/kFreeBSD': 'freebsd',
'DragonFly': 'dragonfly',
-1
View File
@@ -100,7 +100,6 @@ MACH_MODULES = [
'python/mach/mach/commands/settings.py',
'python/compare-locales/mach_commands.py',
'python/mozbuild/mozbuild/mach_commands.py',
'python/mozbuild/mozbuild/backend/mach_commands.py',
'python/mozbuild/mozbuild/compilation/codecomplete.py',
'python/mozbuild/mozbuild/frontend/mach_commands.py',
'services/common/tests/mach_commands.py',
-7
View File
@@ -97,10 +97,3 @@ if CONFIG['MOZ_VALGRIND']:
'valgrind/i386-redhat-linux-gnu.sup',
'valgrind/x86_64-redhat-linux-gnu.sup',
]
if CONFIG['MOZ_ARTIFACT_BUILDS']:
# Ensure a pre-built interfaces.xpt installed to the objdir by the artifact
# code is included by the top-level chrome.manifest.
EXTRA_COMPONENTS += [
'prebuilt-interfaces.manifest',
]
-7
View File
@@ -321,9 +321,6 @@ def split_triplet(triplet):
elif os.startswith('darwin'):
canonical_kernel = 'Darwin'
canonical_os = 'OSX'
elif os.startswith('ios'):
canonical_kernel = 'Darwin'
canonical_os = 'iOS'
elif os.startswith('dragonfly'):
canonical_os = canonical_kernel = 'DragonFly'
elif os.startswith('freebsd'):
@@ -455,10 +452,6 @@ add_old_configure_arg(host_for_old_configure)
@depends(host, target)
def target_for_old_configure(host, target):
target_alias = target.alias
# old-configure does plenty of tests against $target and $target_os
# and expects darwin for iOS, so make it happy.
if target.os == 'iOS':
target_alias = target_alias.replace('-ios', '-darwin')
return '--target=%s' % target_alias
add_old_configure_arg(target_for_old_configure)
+2 -1
View File
@@ -156,7 +156,9 @@ def old_configure_options(*options):
'--enable-accessibility',
'--enable-address-sanitizer',
'--enable-alsa',
'--enable-appcompat-guid',
'--enable-av1',
'--enable-jxl',
'--enable-b2g-bt',
'--enable-b2g-camera',
'--enable-b2g-ril',
@@ -306,7 +308,6 @@ def old_configure_options(*options):
'--disable-browser-statusbar',
'--disable-sync',
'--disable-personas',
'--enable-phoenix-extensions',
# Below are configure flags used by Basilisk
'--disable-webextensions',
+46 -38
View File
@@ -383,57 +383,65 @@ def check_compiler(compiler, language, target):
)
@imports(_from='collections', _import='defaultdict')
@imports(_from='__builtin__', _import='open')
@imports('json')
@imports('subprocess')
@imports('sys')
def get_vc_paths(topsrcdir):
def vswhere(args):
encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8'
return json.loads(subprocess.check_output([os.path.join(topsrcdir, 'build/win32/vswhere.exe'), '-format', 'json'] + args).decode(encoding, 'replace'))
# Can't pass -requires with -legacy, so query each separately.
# Legacy versions first (VS2015)
for install in vswhere(['-legacy', '-version', '[14.0,15.0)']):
version = Version(install['installationVersion'])
# Skip anything older than VS2015.
if version < '14':
continue
path = install['installationPath']
yield (Version(install['installationVersion']), {
'x64': [os.path.join(path, r'VC\bin\amd64')],
# The x64->x86 cross toolchain requires DLLs from the native x64 toolchain.
'x86': [os.path.join(path, r'VC\bin\amd64_x86'), os.path.join (path, r'VC\bin\amd64')],
})
# Then VS2017 and newer.
for install in vswhere(['-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64']):
path = install['installationPath']
tools_version = open(os.path.join(path, r'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt'), 'rb').read().strip()
tools_path = os.path.join(path, r'VC\Tools\MSVC', tools_version, r'bin\HostX64')
yield (Version(install['installationVersion']), {
'x64': [os.path.join(tools_path, 'x64')],
# The x64->x86 cross toolchain requires DLLs from the native x64 toolchain.
'x86': [os.path.join(tools_path, 'x86'), os.path.join(tools_path, 'x64')],
})
@depends(host, target, check_build_environment)
@imports(_from='__builtin__', _import='sorted')
def get_vc_paths(base):
vc = defaultdict(lambda: defaultdict(dict))
subkey = r'Microsoft\VisualStudio\VC\*\*\*\Compiler'
for v, h, t, p in get_registry_values(base + '\\' + subkey):
vc[v][h][t] = p
if not vc:
return
version, data = sorted(vc.iteritems(), key=lambda x: Version(x[0]))[-1]
return data
@depends(host)
@imports(_from='operator', _import='itemgetter')
@imports('platform')
def vc_compiler_path(host):
def vc_compiler_path(host, target, env):
if host.kernel != 'WINNT':
return
vc_host = {
'x86': 'x86',
'AMD64': 'x64',
}.get(platform.machine())
if vc_host is None:
return
vc_target = {
'x86': 'x86',
'x86_64': 'x64',
'arm': 'arm',
}.get(host.cpu)
}.get(target.cpu)
if vc_target is None:
return
base_key = r'HKEY_LOCAL_MACHINE\SOFTWARE'
data = get_vc_paths(base_key)
if not data:
data = get_vc_paths(base_key + r'\Wow6432Node')
if not data:
all_versions = sorted(get_vc_paths(env.topsrcdir), key=itemgetter(0))
if not all_versions:
return
path = data.get(vc_host, {}).get(vc_target)
if not path and vc_host == 'x64':
vc_host = 'x86'
path = data.get(vc_host, {}).get(vc_target)
if not path:
# Choose the newest version.
data = all_versions[-1][1]
paths = data.get(vc_target)
if not paths:
return
path = os.path.dirname(path)
if vc_host != vc_target:
other_path = data.get(vc_host, {}).get(vc_host)
if other_path:
return (path, os.path.dirname(other_path))
return (path,)
return paths
@depends(vc_compiler_path)
+32 -19
View File
@@ -261,13 +261,17 @@ def vc_path(c_compiler):
break
return result
@depends_win(vc_path)
@depends_win(vc_path, c_compiler)
@checking('for the Debug Interface Access SDK', lambda x: x or 'not found')
@imports(_from='os.path', _import='isdir')
def dia_sdk_dir(vc_path):
def dia_sdk_dir(vc_path, c_compiler):
if vc_path:
path = os.path.join(os.path.dirname(vc_path), 'DIA SDK')
if c_compiler.version < '19.10':
path = os.path.join(os.path.dirname(vc_path), 'DIA SDK')
else:
# This would be easier if we had the installationPath that
# get_vc_paths works with, since 'DIA SDK' is relative to that.
path = os.path.normpath(os.path.join(vc_path, r'..\..\..\..\DIA SDK'))
if isdir(path):
return path
@@ -309,29 +313,36 @@ def include_path(vc_path, windows_sdk_dir, ucrt_sdk_dir, dia_sdk_dir):
set_config('INCLUDE', include_path)
@depends_win(target, vc_path, valid_windows_sdk_dir, valid_ucrt_sdk_dir, dia_sdk_dir)
@depends_win(target, c_compiler, vc_path, valid_windows_sdk_dir, valid_ucrt_sdk_dir, dia_sdk_dir)
@imports('os')
def lib_path(target, vc_path, windows_sdk_dir, ucrt_sdk_dir, dia_sdk_dir):
def lib_path(target, c_compiler, vc_path, windows_sdk_dir, ucrt_sdk_dir, dia_sdk_dir):
if not vc_path:
return
vc_target = {
'x86': '',
'x86_64': 'amd64',
'arm': 'arm',
}.get(target.cpu)
if vc_target is None:
return
# As vc_target can be '', and os.path.join will happily use the empty
# string, leading to a string ending with a backslash, that Make will
# interpret as a "string continues on next line" indicator, use variable
# args.
vc_target = (vc_target,) if vc_target else ()
sdk_target = {
'x86': 'x86',
'x86_64': 'x64',
'arm': 'arm',
}.get(target.cpu)
old_target = {
'x86': '',
'x86_64': 'amd64',
'arm': 'arm',
}.get(target.cpu)
if old_target is None:
return
# As old_target can be '', and os.path.join will happily use the empty
# string, leading to a string ending with a backslash, that Make will
# interpret as a "string continues on next line" indicator, use variable
# args.
old_target = (old_target,) if old_target else ()
if c_compiler.version < '19.10':
# MSVC2015
vc_target = old_target
else:
# MSVC2017 switched to use the same target naming as the sdk.
vc_target = (sdk_target,)
atlmfc_dir = os.path.join(vc_path, 'atlmfc', 'lib', *vc_target)
if not os.path.isdir(atlmfc_dir):
die('Cannot find the ATL/MFC libraries in the Visual C++ directory (%s). '
@@ -349,7 +360,9 @@ def lib_path(target, vc_path, windows_sdk_dir, ucrt_sdk_dir, dia_sdk_dir):
os.path.join(ucrt_sdk_dir.lib, 'ucrt', sdk_target),
))
if dia_sdk_dir:
libs.append(os.path.join(dia_sdk_dir, 'lib', *vc_target))
# For some reason the DIA SDK still uses the old-style targets
# even in a newer MSVC.
libs.append(os.path.join(dia_sdk_dir, 'lib', *old_target))
# Set in the environment for old-configure
libs = os.pathsep.join(libs)
os.environ['LIB'] = libs
Binary file not shown.
@@ -58,7 +58,6 @@ const URLs = new Map([
["data:text/html,Hi", true, false, true],
["view-source:data:text/html,Hi", false, false, true],
["javascript:alert('hi')", true, false, true],
["moz://a", false, false, true],
["about:test-chrome-privs", false, false, true],
["about:test-unknown-unlinkable", false, false, true],
["about:test-content-unlinkable", false, false, true],
@@ -80,7 +79,6 @@ const URLs = new Map([
["data:text/html,Hi", true, false, true],
["view-source:data:text/html,Hi", false, false, true],
["javascript:alert('hi')", true, false, true],
["moz://a", false, false, true],
["about:test-chrome-privs", false, false, true],
["about:test-unknown-unlinkable", false, false, true],
["about:test-content-unlinkable", false, false, true],
@@ -102,7 +100,6 @@ const URLs = new Map([
["data:text/html,Hi", true, false, true],
["view-source:data:text/html,Hi", true, false, true],
["javascript:alert('hi')", true, false, true],
["moz://a", false, false, true],
["about:test-chrome-privs", false, false, true],
["about:test-unknown-unlinkable", false, false, true],
["about:test-content-unlinkable", false, false, true],
+1 -1
View File
@@ -160,7 +160,7 @@ nsChromeProtocolHandler::NewChannel2(nsIURI* aURI,
file->Exists(&exists);
if (!exists) {
nsAutoCString path;
file->GetPersistentDescriptor(path);
file->GetNativePath(path);
printf("Chrome file doesn't exist: %s\n", path.get());
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ endif # WINNT
ifndef INCLUDED_AUTOCONF_MK
default::
else
TIERS := $(if $(MOZ_ARTIFACT_BUILDS),artifact )pre-export export $(if $(COMPILE_ENVIRONMENT),compile )misc libs tools
TIERS := pre-export export $(if $(COMPILE_ENVIRONMENT),compile )misc libs tools
endif
# These defines are used to support the twin-topsrcdir model for comm-central.
+3 -1
View File
@@ -86,12 +86,14 @@ included_inclnames_to_ignore = set([
'unicode/ucol.h', # ICU
'unicode/udat.h', # ICU
'unicode/udatpg.h', # ICU
'unicode/udisplaycontext.h',# ICU
'unicode/uenum.h', # ICU
'unicode/uniset.h', # ICU
'unicode/unorm.h', # ICU
'unicode/unorm2.h', # ICU
'unicode/unum.h', # ICU
'unicode/unumsys.h', # ICU
'unicode/upluralrules.h', # ICU
'unicode/ureldatefmt.h', # ICU
'unicode/ustring.h', # ICU
'unicode/utypes.h', # ICU
'vtune/VTuneWrapper.h' # VTune
+14 -2
View File
@@ -377,8 +377,20 @@ endif # WINNT
ifdef _MSC_VER
ifeq ($(CPU_ARCH),x86_64)
# set stack to 2MB on x64 build. See bug 582910
WIN32_EXE_LDFLAGS += -STACK:2097152
# Normal operation on 64-bit Windows needs 2 MB of stack. (Bug 582910)
# ASAN requires 6 MB of stack.
# Setting the stack to 8 MB to match the capability of other systems
# to deal with frame construction for unreasonably deep DOM trees
# with worst-case styling. This uses address space unnecessarily for
# non-main threads, but that should be tolerable on 64-bit systems.
WIN32_EXE_LDFLAGS += -STACK:8388608
else
# Since this setting affects the default stack size for non-main
# threads, too, to avoid burning the address space, increase only
# 512 KB over the default. Just enough to be able to deal with
# reasonable styling applied to DOM trees whose depth is near what
# Blink's HTML parser can output.
WIN32_EXE_LDFLAGS += -STACK:1572864
endif
endif
+2
View File
@@ -121,6 +121,8 @@ else:
DEFINES['SYMBOL_UNDERSCORE'] = True
else:
ffi_srcs = ('ffi.c', 'darwin.S', 'ffi64.c', 'darwin64.S')
elif CONFIG['FFI_TARGET'] == 'AARCH64_DARWIN':
ffi_srcs = ('sysv.S', 'ffi.c')
SOURCES += [
'/js/src/ctypes/libffi/src/%s/%s' % (CONFIG['FFI_TARGET_DIR'], s)
+63 -52
View File
@@ -4,26 +4,28 @@ SOURCES += [
'/intl/icu/source/common/bmpset.cpp',
'/intl/icu/source/common/brkeng.cpp',
'/intl/icu/source/common/brkiter.cpp',
'/intl/icu/source/common/bytesinkutil.cpp',
'/intl/icu/source/common/bytestream.cpp',
'/intl/icu/source/common/bytestrie.cpp',
'/intl/icu/source/common/bytestriebuilder.cpp',
'/intl/icu/source/common/bytestrieiterator.cpp',
'/intl/icu/source/common/caniter.cpp',
'/intl/icu/source/common/characterproperties.cpp',
'/intl/icu/source/common/chariter.cpp',
'/intl/icu/source/common/charstr.cpp',
'/intl/icu/source/common/cmemory.c',
'/intl/icu/source/common/cmemory.cpp',
'/intl/icu/source/common/cstr.cpp',
'/intl/icu/source/common/cstring.c',
'/intl/icu/source/common/cwchar.c',
'/intl/icu/source/common/cstring.cpp',
'/intl/icu/source/common/cwchar.cpp',
'/intl/icu/source/common/dictbe.cpp',
'/intl/icu/source/common/dictionarydata.cpp',
'/intl/icu/source/common/dtintrv.cpp',
'/intl/icu/source/common/edits.cpp',
'/intl/icu/source/common/errorcode.cpp',
'/intl/icu/source/common/filteredbrk.cpp',
'/intl/icu/source/common/filterednormalizer2.cpp',
'/intl/icu/source/common/icudataver.c',
'/intl/icu/source/common/icudataver.cpp',
'/intl/icu/source/common/icuplug.cpp',
'/intl/icu/source/common/listformatter.cpp',
'/intl/icu/source/common/loadednormalizer2impl.cpp',
'/intl/icu/source/common/locavailable.cpp',
'/intl/icu/source/common/locbased.cpp',
@@ -31,7 +33,7 @@ SOURCES += [
'/intl/icu/source/common/locdspnm.cpp',
'/intl/icu/source/common/locid.cpp',
'/intl/icu/source/common/loclikely.cpp',
'/intl/icu/source/common/locmap.c',
'/intl/icu/source/common/locmap.cpp',
'/intl/icu/source/common/locresdata.cpp',
'/intl/icu/source/common/locutil.cpp',
'/intl/icu/source/common/messagepattern.cpp',
@@ -42,10 +44,11 @@ SOURCES += [
'/intl/icu/source/common/patternprops.cpp',
'/intl/icu/source/common/pluralmap.cpp',
'/intl/icu/source/common/propname.cpp',
'/intl/icu/source/common/propsvec.c',
'/intl/icu/source/common/propsvec.cpp',
'/intl/icu/source/common/punycode.cpp',
'/intl/icu/source/common/putil.cpp',
'/intl/icu/source/common/rbbi.cpp',
'/intl/icu/source/common/rbbi_cache.cpp',
'/intl/icu/source/common/rbbidata.cpp',
'/intl/icu/source/common/rbbinode.cpp',
'/intl/icu/source/common/rbbirb.cpp',
@@ -67,68 +70,70 @@ SOURCES += [
'/intl/icu/source/common/servslkf.cpp',
'/intl/icu/source/common/sharedobject.cpp',
'/intl/icu/source/common/simpleformatter.cpp',
'/intl/icu/source/common/static_unicode_sets.cpp',
'/intl/icu/source/common/stringpiece.cpp',
'/intl/icu/source/common/stringtriebuilder.cpp',
'/intl/icu/source/common/uarrsort.c',
'/intl/icu/source/common/ubidi.c',
'/intl/icu/source/common/ubidi_props.c',
'/intl/icu/source/common/ubidiln.c',
'/intl/icu/source/common/ubiditransform.c',
'/intl/icu/source/common/ubidiwrt.c',
'/intl/icu/source/common/uarrsort.cpp',
'/intl/icu/source/common/ubidi.cpp',
'/intl/icu/source/common/ubidi_props.cpp',
'/intl/icu/source/common/ubidiln.cpp',
'/intl/icu/source/common/ubiditransform.cpp',
'/intl/icu/source/common/ubidiwrt.cpp',
'/intl/icu/source/common/ubrk.cpp',
'/intl/icu/source/common/ucase.cpp',
'/intl/icu/source/common/ucasemap.cpp',
'/intl/icu/source/common/ucasemap_titlecase_brkiter.cpp',
'/intl/icu/source/common/ucat.c',
'/intl/icu/source/common/uchar.c',
'/intl/icu/source/common/ucat.cpp',
'/intl/icu/source/common/uchar.cpp',
'/intl/icu/source/common/ucharstrie.cpp',
'/intl/icu/source/common/ucharstriebuilder.cpp',
'/intl/icu/source/common/ucharstrieiterator.cpp',
'/intl/icu/source/common/uchriter.cpp',
'/intl/icu/source/common/ucln_cmn.cpp',
'/intl/icu/source/common/ucmndata.c',
'/intl/icu/source/common/ucnv.c',
'/intl/icu/source/common/ucmndata.cpp',
'/intl/icu/source/common/ucnv.cpp',
'/intl/icu/source/common/ucnv2022.cpp',
'/intl/icu/source/common/ucnv_bld.cpp',
'/intl/icu/source/common/ucnv_cb.c',
'/intl/icu/source/common/ucnv_cnv.c',
'/intl/icu/source/common/ucnv_ct.c',
'/intl/icu/source/common/ucnv_err.c',
'/intl/icu/source/common/ucnv_cb.cpp',
'/intl/icu/source/common/ucnv_cnv.cpp',
'/intl/icu/source/common/ucnv_ct.cpp',
'/intl/icu/source/common/ucnv_err.cpp',
'/intl/icu/source/common/ucnv_ext.cpp',
'/intl/icu/source/common/ucnv_io.cpp',
'/intl/icu/source/common/ucnv_lmb.c',
'/intl/icu/source/common/ucnv_set.c',
'/intl/icu/source/common/ucnv_u16.c',
'/intl/icu/source/common/ucnv_u32.c',
'/intl/icu/source/common/ucnv_u7.c',
'/intl/icu/source/common/ucnv_u8.c',
'/intl/icu/source/common/ucnv_lmb.cpp',
'/intl/icu/source/common/ucnv_set.cpp',
'/intl/icu/source/common/ucnv_u16.cpp',
'/intl/icu/source/common/ucnv_u32.cpp',
'/intl/icu/source/common/ucnv_u7.cpp',
'/intl/icu/source/common/ucnv_u8.cpp',
'/intl/icu/source/common/ucnvbocu.cpp',
'/intl/icu/source/common/ucnvdisp.c',
'/intl/icu/source/common/ucnvhz.c',
'/intl/icu/source/common/ucnvisci.c',
'/intl/icu/source/common/ucnvlat1.c',
'/intl/icu/source/common/ucnvdisp.cpp',
'/intl/icu/source/common/ucnvhz.cpp',
'/intl/icu/source/common/ucnvisci.cpp',
'/intl/icu/source/common/ucnvlat1.cpp',
'/intl/icu/source/common/ucnvmbcs.cpp',
'/intl/icu/source/common/ucnvscsu.c',
'/intl/icu/source/common/ucnvscsu.cpp',
'/intl/icu/source/common/ucnvsel.cpp',
'/intl/icu/source/common/ucol_swp.cpp',
'/intl/icu/source/common/ucptrie.cpp',
'/intl/icu/source/common/ucurr.cpp',
'/intl/icu/source/common/udata.cpp',
'/intl/icu/source/common/udatamem.c',
'/intl/icu/source/common/udataswp.c',
'/intl/icu/source/common/uenum.c',
'/intl/icu/source/common/uhash.c',
'/intl/icu/source/common/udatamem.cpp',
'/intl/icu/source/common/udataswp.cpp',
'/intl/icu/source/common/uenum.cpp',
'/intl/icu/source/common/uhash.cpp',
'/intl/icu/source/common/uhash_us.cpp',
'/intl/icu/source/common/uidna.cpp',
'/intl/icu/source/common/uinit.cpp',
'/intl/icu/source/common/uinvchar.c',
'/intl/icu/source/common/uinvchar.cpp',
'/intl/icu/source/common/uiter.cpp',
'/intl/icu/source/common/ulist.c',
'/intl/icu/source/common/ulistformatter.cpp',
'/intl/icu/source/common/ulist.cpp',
'/intl/icu/source/common/uloc.cpp',
'/intl/icu/source/common/uloc_keytype.cpp',
'/intl/icu/source/common/uloc_tag.c',
'/intl/icu/source/common/umapfile.c',
'/intl/icu/source/common/umath.c',
'/intl/icu/source/common/uloc_tag.cpp',
'/intl/icu/source/common/umapfile.cpp',
'/intl/icu/source/common/umath.cpp',
'/intl/icu/source/common/umutablecptrie.cpp',
'/intl/icu/source/common/umutex.cpp',
'/intl/icu/source/common/unames.cpp',
'/intl/icu/source/common/unifiedcache.cpp',
@@ -148,11 +153,11 @@ SOURCES += [
'/intl/icu/source/common/unormcmp.cpp',
'/intl/icu/source/common/uobject.cpp',
'/intl/icu/source/common/uprops.cpp',
'/intl/icu/source/common/ures_cnv.c',
'/intl/icu/source/common/ures_cnv.cpp',
'/intl/icu/source/common/uresbund.cpp',
'/intl/icu/source/common/uresdata.cpp',
'/intl/icu/source/common/usc_impl.c',
'/intl/icu/source/common/uscript.c',
'/intl/icu/source/common/usc_impl.cpp',
'/intl/icu/source/common/uscript.cpp',
'/intl/icu/source/common/uscript_props.cpp',
'/intl/icu/source/common/uset.cpp',
'/intl/icu/source/common/uset_props.cpp',
@@ -166,23 +171,24 @@ SOURCES += [
'/intl/icu/source/common/ustrcase.cpp',
'/intl/icu/source/common/ustrcase_locale.cpp',
'/intl/icu/source/common/ustrenum.cpp',
'/intl/icu/source/common/ustrfmt.c',
'/intl/icu/source/common/ustrfmt.cpp',
'/intl/icu/source/common/ustring.cpp',
'/intl/icu/source/common/ustrtrns.cpp',
'/intl/icu/source/common/utext.cpp',
'/intl/icu/source/common/utf_impl.c',
'/intl/icu/source/common/utf_impl.cpp',
'/intl/icu/source/common/util.cpp',
'/intl/icu/source/common/util_props.cpp',
'/intl/icu/source/common/utrace.c',
'/intl/icu/source/common/utrace.cpp',
'/intl/icu/source/common/utrie.cpp',
'/intl/icu/source/common/utrie2.cpp',
'/intl/icu/source/common/utrie2_builder.cpp',
'/intl/icu/source/common/utrie_swap.cpp',
'/intl/icu/source/common/uts46.cpp',
'/intl/icu/source/common/utypes.c',
'/intl/icu/source/common/utypes.cpp',
'/intl/icu/source/common/uvector.cpp',
'/intl/icu/source/common/uvectr32.cpp',
'/intl/icu/source/common/uvectr64.cpp',
'/intl/icu/source/common/wintz.c',
'/intl/icu/source/common/wintz.cpp',
]
EXPORTS.unicode += [
@@ -192,17 +198,19 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/bytestrie.h',
'/intl/icu/source/common/unicode/bytestriebuilder.h',
'/intl/icu/source/common/unicode/caniter.h',
'/intl/icu/source/common/unicode/casemap.h',
'/intl/icu/source/common/unicode/char16ptr.h',
'/intl/icu/source/common/unicode/chariter.h',
'/intl/icu/source/common/unicode/dbbi.h',
'/intl/icu/source/common/unicode/docmain.h',
'/intl/icu/source/common/unicode/dtintrv.h',
'/intl/icu/source/common/unicode/edits.h',
'/intl/icu/source/common/unicode/enumset.h',
'/intl/icu/source/common/unicode/errorcode.h',
'/intl/icu/source/common/unicode/filteredbrk.h',
'/intl/icu/source/common/unicode/icudataver.h',
'/intl/icu/source/common/unicode/icuplug.h',
'/intl/icu/source/common/unicode/idna.h',
'/intl/icu/source/common/unicode/listformatter.h',
'/intl/icu/source/common/unicode/localpointer.h',
'/intl/icu/source/common/unicode/locdspnm.h',
'/intl/icu/source/common/unicode/locid.h',
@@ -221,6 +229,7 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/simpleformatter.h',
'/intl/icu/source/common/unicode/std_string.h',
'/intl/icu/source/common/unicode/strenum.h',
'/intl/icu/source/common/unicode/stringoptions.h',
'/intl/icu/source/common/unicode/stringpiece.h',
'/intl/icu/source/common/unicode/stringtriebuilder.h',
'/intl/icu/source/common/unicode/symtable.h',
@@ -239,6 +248,8 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/ucnv_err.h',
'/intl/icu/source/common/unicode/ucnvsel.h',
'/intl/icu/source/common/unicode/uconfig.h',
'/intl/icu/source/common/unicode/ucpmap.h',
'/intl/icu/source/common/unicode/ucptrie.h',
'/intl/icu/source/common/unicode/ucurr.h',
'/intl/icu/source/common/unicode/udata.h',
'/intl/icu/source/common/unicode/udisplaycontext.h',
@@ -246,10 +257,10 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/uidna.h',
'/intl/icu/source/common/unicode/uiter.h',
'/intl/icu/source/common/unicode/uldnames.h',
'/intl/icu/source/common/unicode/ulistformatter.h',
'/intl/icu/source/common/unicode/uloc.h',
'/intl/icu/source/common/unicode/umachine.h',
'/intl/icu/source/common/unicode/umisc.h',
'/intl/icu/source/common/unicode/umutablecptrie.h',
'/intl/icu/source/common/unicode/unifilt.h',
'/intl/icu/source/common/unicode/unifunct.h',
'/intl/icu/source/common/unicode/unimatch.h',
-1
View File
@@ -14,7 +14,6 @@ DEFINES.update(
UCONFIG_NO_LEGACY_CONVERSION = True,
UCONFIG_NO_TRANSLITERATION = True,
UCONFIG_NO_REGULAR_EXPRESSIONS = True,
UCONFIG_NO_BREAK_ITERATION = True,
# We don't need to pass data to and from legacy char* APIs.
U_CHARSET_IS_UTF8 = True,
+57 -19
View File
@@ -1,6 +1,5 @@
# THIS FILE IS GENERATED BY /intl/icu_sources_data.py DO NOT EDIT
SOURCES += [
'/intl/icu/source/i18n/affixpatternparser.cpp',
'/intl/icu/source/i18n/alphaindex.cpp',
'/intl/icu/source/i18n/anytrans.cpp',
'/intl/icu/source/i18n/astro.cpp',
@@ -53,23 +52,22 @@ SOURCES += [
'/intl/icu/source/i18n/datefmt.cpp',
'/intl/icu/source/i18n/dayperiodrules.cpp',
'/intl/icu/source/i18n/dcfmtsym.cpp',
'/intl/icu/source/i18n/decContext.c',
'/intl/icu/source/i18n/decfmtst.cpp',
'/intl/icu/source/i18n/decimalformatpattern.cpp',
'/intl/icu/source/i18n/decContext.cpp',
'/intl/icu/source/i18n/decimfmt.cpp',
'/intl/icu/source/i18n/decimfmtimpl.cpp',
'/intl/icu/source/i18n/decNumber.c',
'/intl/icu/source/i18n/digitaffix.cpp',
'/intl/icu/source/i18n/digitaffixesandpadding.cpp',
'/intl/icu/source/i18n/digitformatter.cpp',
'/intl/icu/source/i18n/digitgrouping.cpp',
'/intl/icu/source/i18n/digitinterval.cpp',
'/intl/icu/source/i18n/digitlst.cpp',
'/intl/icu/source/i18n/decNumber.cpp',
'/intl/icu/source/i18n/double-conversion-bignum-dtoa.cpp',
'/intl/icu/source/i18n/double-conversion-bignum.cpp',
'/intl/icu/source/i18n/double-conversion-cached-powers.cpp',
'/intl/icu/source/i18n/double-conversion-diy-fp.cpp',
'/intl/icu/source/i18n/double-conversion-fast-dtoa.cpp',
'/intl/icu/source/i18n/double-conversion-strtod.cpp',
'/intl/icu/source/i18n/double-conversion.cpp',
'/intl/icu/source/i18n/dtfmtsym.cpp',
'/intl/icu/source/i18n/dtitvfmt.cpp',
'/intl/icu/source/i18n/dtitvinf.cpp',
'/intl/icu/source/i18n/dtptngen.cpp',
'/intl/icu/source/i18n/dtrule.cpp',
'/intl/icu/source/i18n/erarules.cpp',
'/intl/icu/source/i18n/esctrn.cpp',
'/intl/icu/source/i18n/ethpccal.cpp',
'/intl/icu/source/i18n/fmtable.cpp',
@@ -86,6 +84,7 @@ SOURCES += [
'/intl/icu/source/i18n/inputext.cpp',
'/intl/icu/source/i18n/islamcal.cpp',
'/intl/icu/source/i18n/japancal.cpp',
'/intl/icu/source/i18n/listformatter.cpp',
'/intl/icu/source/i18n/measfmt.cpp',
'/intl/icu/source/i18n/measunit.cpp',
'/intl/icu/source/i18n/measure.cpp',
@@ -95,15 +94,50 @@ SOURCES += [
'/intl/icu/source/i18n/nfrule.cpp',
'/intl/icu/source/i18n/nfsubs.cpp',
'/intl/icu/source/i18n/nortrans.cpp',
'/intl/icu/source/i18n/nounit.cpp',
'/intl/icu/source/i18n/nultrans.cpp',
'/intl/icu/source/i18n/number_affixutils.cpp',
'/intl/icu/source/i18n/number_asformat.cpp',
'/intl/icu/source/i18n/number_capi.cpp',
'/intl/icu/source/i18n/number_compact.cpp',
'/intl/icu/source/i18n/number_currencysymbols.cpp',
'/intl/icu/source/i18n/number_decimalquantity.cpp',
'/intl/icu/source/i18n/number_decimfmtprops.cpp',
'/intl/icu/source/i18n/number_fluent.cpp',
'/intl/icu/source/i18n/number_formatimpl.cpp',
'/intl/icu/source/i18n/number_grouping.cpp',
'/intl/icu/source/i18n/number_integerwidth.cpp',
'/intl/icu/source/i18n/number_longnames.cpp',
'/intl/icu/source/i18n/number_mapper.cpp',
'/intl/icu/source/i18n/number_modifiers.cpp',
'/intl/icu/source/i18n/number_multiplier.cpp',
'/intl/icu/source/i18n/number_notation.cpp',
'/intl/icu/source/i18n/number_padding.cpp',
'/intl/icu/source/i18n/number_patternmodifier.cpp',
'/intl/icu/source/i18n/number_patternstring.cpp',
'/intl/icu/source/i18n/number_rounding.cpp',
'/intl/icu/source/i18n/number_scientific.cpp',
'/intl/icu/source/i18n/number_skeletons.cpp',
'/intl/icu/source/i18n/number_stringbuilder.cpp',
'/intl/icu/source/i18n/number_utils.cpp',
'/intl/icu/source/i18n/numfmt.cpp',
'/intl/icu/source/i18n/numparse_affixes.cpp',
'/intl/icu/source/i18n/numparse_compositions.cpp',
'/intl/icu/source/i18n/numparse_currency.cpp',
'/intl/icu/source/i18n/numparse_decimal.cpp',
'/intl/icu/source/i18n/numparse_impl.cpp',
'/intl/icu/source/i18n/numparse_parsednumber.cpp',
'/intl/icu/source/i18n/numparse_scientific.cpp',
'/intl/icu/source/i18n/numparse_stringsegment.cpp',
'/intl/icu/source/i18n/numparse_symbols.cpp',
'/intl/icu/source/i18n/numparse_validators.cpp',
'/intl/icu/source/i18n/numrange_fluent.cpp',
'/intl/icu/source/i18n/numrange_impl.cpp',
'/intl/icu/source/i18n/numsys.cpp',
'/intl/icu/source/i18n/olsontz.cpp',
'/intl/icu/source/i18n/persncal.cpp',
'/intl/icu/source/i18n/pluralaffix.cpp',
'/intl/icu/source/i18n/plurfmt.cpp',
'/intl/icu/source/i18n/plurrule.cpp',
'/intl/icu/source/i18n/precision.cpp',
'/intl/icu/source/i18n/quant.cpp',
'/intl/icu/source/i18n/quantityformatter.cpp',
'/intl/icu/source/i18n/rbnf.cpp',
@@ -130,7 +164,6 @@ SOURCES += [
'/intl/icu/source/i18n/selfmt.cpp',
'/intl/icu/source/i18n/sharedbreakiterator.cpp',
'/intl/icu/source/i18n/simpletz.cpp',
'/intl/icu/source/i18n/smallintformatter.cpp',
'/intl/icu/source/i18n/smpdtfmt.cpp',
'/intl/icu/source/i18n/smpdtfst.cpp',
'/intl/icu/source/i18n/sortkey.cpp',
@@ -167,7 +200,8 @@ SOURCES += [
'/intl/icu/source/i18n/udatpg.cpp',
'/intl/icu/source/i18n/ufieldpositer.cpp',
'/intl/icu/source/i18n/uitercollationiterator.cpp',
'/intl/icu/source/i18n/ulocdata.c',
'/intl/icu/source/i18n/ulistformatter.cpp',
'/intl/icu/source/i18n/ulocdata.cpp',
'/intl/icu/source/i18n/umsg.cpp',
'/intl/icu/source/i18n/unesctrn.cpp',
'/intl/icu/source/i18n/uni2name.cpp',
@@ -184,10 +218,8 @@ SOURCES += [
'/intl/icu/source/i18n/uspoof_impl.cpp',
'/intl/icu/source/i18n/utf16collationiterator.cpp',
'/intl/icu/source/i18n/utf8collationiterator.cpp',
'/intl/icu/source/i18n/utmscale.c',
'/intl/icu/source/i18n/utmscale.cpp',
'/intl/icu/source/i18n/utrans.cpp',
'/intl/icu/source/i18n/valueformatter.cpp',
'/intl/icu/source/i18n/visibledigits.cpp',
'/intl/icu/source/i18n/vtzone.cpp',
'/intl/icu/source/i18n/vzone.cpp',
'/intl/icu/source/i18n/windtfmt.cpp',
@@ -223,10 +255,14 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/fpositer.h',
'/intl/icu/source/i18n/unicode/gender.h',
'/intl/icu/source/i18n/unicode/gregocal.h',
'/intl/icu/source/i18n/unicode/listformatter.h',
'/intl/icu/source/i18n/unicode/measfmt.h',
'/intl/icu/source/i18n/unicode/measunit.h',
'/intl/icu/source/i18n/unicode/measure.h',
'/intl/icu/source/i18n/unicode/msgfmt.h',
'/intl/icu/source/i18n/unicode/nounit.h',
'/intl/icu/source/i18n/unicode/numberformatter.h',
'/intl/icu/source/i18n/unicode/numberrangeformatter.h',
'/intl/icu/source/i18n/unicode/numfmt.h',
'/intl/icu/source/i18n/unicode/numsys.h',
'/intl/icu/source/i18n/unicode/plurfmt.h',
@@ -263,10 +299,12 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/ufieldpositer.h',
'/intl/icu/source/i18n/unicode/uformattable.h',
'/intl/icu/source/i18n/unicode/ugender.h',
'/intl/icu/source/i18n/unicode/ulistformatter.h',
'/intl/icu/source/i18n/unicode/ulocdata.h',
'/intl/icu/source/i18n/unicode/umsg.h',
'/intl/icu/source/i18n/unicode/unirepl.h',
'/intl/icu/source/i18n/unicode/unum.h',
'/intl/icu/source/i18n/unicode/unumberformatter.h',
'/intl/icu/source/i18n/unicode/unumsys.h',
'/intl/icu/source/i18n/unicode/upluralrules.h',
'/intl/icu/source/i18n/unicode/uregex.h',
+1 -1
View File
@@ -9,4 +9,4 @@
Library('icustubdata')
SOURCES += ['/intl/icu/source/stubdata/stubdata.c']
SOURCES += ['/intl/icu/source/stubdata/stubdata.cpp']
+3
View File
@@ -41,6 +41,9 @@ if CONFIG['CPU_ARCH'] == 'arm':
if CONFIG['MOZ_FFVPX']:
external_dirs += ['media/ffvpx']
if CONFIG["MOZ_JXL"]:
external_dirs += ["media/libjxl", "media/highway"]
external_dirs += [
'media/kiss_fft',
'media/libcubeb',
-110
View File
@@ -1,110 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# /!\ Please make sure to update the following comment when you touch this
# file. Thank you /!\
# The traditional Mozilla build system relied on going through the entire
# build tree a number of times with different targets, and many of the
# things happening at each step required other things happening in previous
# steps without any documentation of those dependencies.
#
# This new build system tries to start afresh by establishing what files or
# operations are needed for the build, and applying the necessary rules to
# have those in place, relying on make dependencies to get them going.
#
# As of writing, only building non-compiled parts of Firefox is supported
# here (a few other things are also left out). This is a starting point, with
# the intent to grow this build system to make it more complete.
#
# This file contains rules and dependencies to get things working. The intent
# is for a Makefile to define some dependencies and variables, and include
# this file. What needs to be defined there, and ends up being generated by
# python/mozbuild/mozbuild/backend/fastermake.py is the following:
# - TOPSRCDIR/TOPOBJDIR, respectively the top source directory and the top
# object directory
# - PYTHON, the path to the python executable
# - ACDEFINES, which contains a set of -Dvar=name to be used during
# preprocessing
# - INSTALL_MANIFESTS, which defines the list of base directories handled
# by install manifests, see further below
#
# A convention used between this file and the Makefile including it is that
# global Make variables names are uppercase, while "local" Make variables
# applied to specific targets are lowercase.
# Targets to be triggered for a default build
default: $(addprefix install-,$(INSTALL_MANIFESTS))
ifndef NO_XPIDL
# Targets from the recursive make backend to be built for a default build
default: $(TOPOBJDIR)/config/makefiles/xpidl/xpidl
endif
# Mac builds require to copy things in dist/bin/*.app
# TODO: remove the MOZ_WIDGET_TOOLKIT and MOZ_BUILD_APP variables from
# faster/Makefile and python/mozbuild/mozbuild/test/backend/test_build.py
# when this is not required anymore.
# We however don't need to do this when using the hybrid
# FasterMake/RecursiveMake backend (FASTER_RECURSIVE_MAKE is set when
# recursing from the RecursiveMake backend)
ifndef FASTER_RECURSIVE_MAKE
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
default:
$(MAKE) -C $(TOPOBJDIR)/$(MOZ_BUILD_APP)/app repackage
endif
endif
.PHONY: FORCE
# Extra define to trigger some workarounds. We should strive to limit the
# use of those. As of writing the only ones are in
# toolkit/content/buildconfig.html and browser/locales/jar.mn.
ACDEFINES += -DBUILD_FASTER
# Files under the faster/ sub-directory, however, are not meant to use the
# fallback
$(TOPOBJDIR)/faster/%: ;
# Generic rule to fall back to the recursive make backend.
# This needs to stay after other $(TOPOBJDIR)/* rules because GNU Make
# <3.82 apply pattern rules in definition order, not stem length like
# modern GNU Make.
$(TOPOBJDIR)/%: FORCE
$(MAKE) -C $(dir $@) $(notdir $@)
# Install files using install manifests
#
# The list of base directories is given in INSTALL_MANIFESTS. The
# corresponding install manifests are named correspondingly, with forward
# slashes replaced with underscores, and prefixed with `install_`. That is,
# the install manifest for `dist/bin` would be `install_dist_bin`.
$(addprefix install-,$(INSTALL_MANIFESTS)): install-%: $(addprefix $(TOPOBJDIR)/,buildid.h source-repo.h)
@# For now, force preprocessed files to be reprocessed every time.
@# The overhead is not that big, and this avoids waiting for proper
@# support for defines tracking in process_install_manifest.
@touch install_$(subst /,_,$*)
@# BOOKMARKS_INCLUDE_DIR is for bookmarks.html only.
$(PYTHON) -m mozbuild.action.process_install_manifest \
--track install_$(subst /,_,$*).track \
$(TOPOBJDIR)/$* \
-DAB_CD=en-US \
-DBOOKMARKS_INCLUDE_DIR=$(TOPSRCDIR)/browser/locales/en-US/profile \
$(ACDEFINES) \
install_$(subst /,_,$*)
# ============================================================================
# Below is a set of additional dependencies and variables used to build things
# that are not supported by data in moz.build.
# The xpidl target in config/makefiles/xpidl requires the install manifest for
# dist/idl to have been processed. When using the hybrid
# FasterMake/RecursiveMake backend, this dependency is handled in the top-level
# Makefile.
ifndef FASTER_RECURSIVE_MAKE
$(TOPOBJDIR)/config/makefiles/xpidl/xpidl: $(TOPOBJDIR)/install-dist_idl
endif
# It also requires all the install manifests for dist/bin to have been processed
# because it adds interfaces.manifest references with buildlist.py.
$(TOPOBJDIR)/config/makefiles/xpidl/xpidl: $(addprefix install-,$(filter dist/bin%,$(INSTALL_MANIFESTS)))
+1 -1
View File
@@ -8,4 +8,4 @@
# Referenced by milestone.py.
#--------------------------------------------------------
5.1.0+
5.2.1
-6
View File
@@ -19,12 +19,6 @@
# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
#endif
// Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k
// CRT doesn't export std::_Throw(). So we define it.
#ifndef mozilla_Throw_h
# include "mozilla/throw_msvc.h"
#endif
#ifdef _DEBUG
// From
// http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx
+8 -5
View File
@@ -26,16 +26,19 @@
key="&closeCmd.key;"
command="toolbox-cmd-close"
modifiers="accel"/>
<key id="toolbox-key-toggle"
key="&toggleToolbox.key;"
command="toolbox-cmd-close"
modifiers="accel,shift"
disabled="true"/>
#ifdef XP_MACOSX
<key id="toolbox-key-toggle-osx"
key="&toggleToolbox.key;"
command="toolbox-cmd-close"
modifiers="accel,alt"
disabled="true"/>
#else
<key id="toolbox-key-toggle"
key="&toggleToolbox.key;"
command="toolbox-cmd-close"
modifiers="accel,shift"
disabled="true"/>
#endif
<key id="toolbox-key-toggle-F12"
keycode="&toggleToolboxF12.keycode;"
keytext="&toggleToolboxF12.keytext;"
@@ -20,6 +20,11 @@
* code by having a tag called "padding" and a property
* value called "margin".
*/
const { PrefObserver } = require("devtools/client/shared/prefs");
const PREF_ENABLE_MDN_DOCS_TOOLTIP =
"devtools.inspector.mdnDocsTooltip.enabled";
const TEST_URI = `
<html>
<head>
@@ -35,12 +40,50 @@ const TEST_URI = `
`;
add_task(function* () {
info("Ensure the pref is true to begin with");
let initial = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (initial != true) {
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, true);
}
yield addTab("data:text/html;charset=utf8," + encodeURIComponent(TEST_URI));
let {inspector, view} = yield openRuleView();
yield selectNode("padding", inspector);
yield testMdnContextMenuItemVisibility(view);
info("Ensure the pref is reset to its initial value");
let eventual = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (eventual != initial) {
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, initial);
}
});
/**
* Set a boolean pref, and wait for the pref observer to
* trigger, so that code listening for the pref change
* has had a chance to update itself.
*
* @param pref {string} Name of the pref to change
* @param state {boolean} Desired value of the pref.
*
* Note that if the pref already has the value in `state`,
* then the prefObserver will not trigger. So you should only
* call this function if you know the pref's current value is
* not `state`.
*/
function* setBooleanPref(pref, state) {
let oncePrefChanged = defer();
let prefObserver = new PrefObserver("devtools.");
prefObserver.on(pref, oncePrefChanged.resolve);
info("Set the pref " + pref + " to: " + state);
Services.prefs.setBoolPref(pref, state);
info("Wait for prefObserver to call back so the UI can update");
yield oncePrefChanged.promise;
prefObserver.off(pref, oncePrefChanged.resolve);
}
/**
* Tests that the MDN context menu item is shown when it should be,
* and hidden when it should be.
@@ -32,7 +32,7 @@ add_task(function* () {
info("Ensure the pref is true to begin with");
let initial = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (initial != true) {
setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, true);
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, true);
}
yield addTab("data:text/html;charset=utf8," + encodeURIComponent(TEST_DOC));
@@ -58,7 +58,7 @@ add_task(function* () {
info("Ensure the pref is reset to its initial value");
let eventual = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (eventual != initial) {
setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, initial);
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, initial);
}
});
+1 -1
View File
@@ -104,7 +104,7 @@ devtools.jar:
content/commandline/commandline.css (commandline/commandline.css)
content/commandline/commandlineoutput.xhtml (commandline/commandlineoutput.xhtml)
content/commandline/commandlinetooltip.xhtml (commandline/commandlinetooltip.xhtml)
content/framework/toolbox-window.xul (framework/toolbox-window.xul)
* content/framework/toolbox-window.xul (framework/toolbox-window.xul)
content/framework/toolbox-options.xhtml (framework/toolbox-options.xhtml)
content/framework/toolbox.xul (framework/toolbox.xul)
content/framework/toolbox-init.js (framework/toolbox-init.js)
+1 -1
View File
@@ -59,7 +59,7 @@ pref("devtools.inspector.showUserAgentStyles", false);
// Show all native anonymous content (like controls in <video> tags)
pref("devtools.inspector.showAllAnonymousContent", false);
// Enable the MDN docs tooltip
pref("devtools.inspector.mdnDocsTooltip.enabled", true);
pref("devtools.inspector.mdnDocsTooltip.enabled", false);
// Enable the Font Inspector
pref("devtools.fontinspector.enabled", true);
+1 -1
View File
@@ -1032,7 +1032,7 @@ OutputPanel.prototype._resize = function () {
break;
}
this.document.body.style.width = "-moz-max-content";
this.document.body.style.width = "max-content";
let style = this._frame.contentWindow.getComputedStyle(this.document.body);
let frameWidth = parseInt(style.width, 10);
let width = Math.min(maxWidth, frameWidth);
+3 -1
View File
@@ -1462,7 +1462,9 @@ DebuggerServerConnection.prototype = {
},
send(packet) {
this.transport.send(packet);
if (this.transport) {
this.transport.send(packet);
}
},
/**
+30 -28
View File
@@ -2209,13 +2209,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -2232,13 +2232,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -3304,9 +3304,7 @@ exports.CSS_PROPERTIES = {
"-moz-mac-source-list-selection",
"-moz-mac-vibrancy-dark",
"-moz-mac-vibrancy-light",
"-moz-max-content",
"-moz-middle-with-baseline",
"-moz-min-content",
"-moz-none",
"-moz-popup",
"-moz-pre-space",
@@ -3362,6 +3360,7 @@ exports.CSS_PROPERTIES = {
"bottom",
"bottom-outside",
"break-all",
"break-spaces",
"break-word",
"butt",
"button",
@@ -3493,6 +3492,7 @@ exports.CSS_PROPERTIES = {
"margin-box",
"match-source",
"mathematical",
"max-content",
"medium",
"menuarrow",
"menubar",
@@ -3510,6 +3510,7 @@ exports.CSS_PROPERTIES = {
"meterbar",
"meterchunk",
"middle",
"min-content",
"miter",
"mixed",
"multiply",
@@ -6000,13 +6001,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -6023,13 +6024,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -6816,12 +6817,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -6903,12 +6904,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -7651,11 +7652,11 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"none",
"unset"
]
@@ -7673,11 +7674,11 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"none",
"unset"
]
@@ -7695,11 +7696,11 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"none",
"unset"
]
@@ -7735,12 +7736,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -7757,12 +7758,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -7779,12 +7780,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -9519,6 +9520,7 @@ exports.CSS_PROPERTIES = {
"supports": [],
"values": [
"-moz-pre-space",
"break-spaces",
"inherit",
"initial",
"normal",
@@ -9542,12 +9544,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
+2 -5
View File
@@ -36,11 +36,6 @@ EXPORTS.mozilla += [
]
UNIFIED_SOURCES += [
'KeyframeEffect.cpp',
'KeyframeEffectReadOnly.cpp',
]
SOURCES += [
'Animation.cpp',
'AnimationEffectReadOnly.cpp',
'AnimationEffectTiming.cpp',
@@ -54,7 +49,9 @@ SOURCES += [
'DocumentTimeline.cpp',
'EffectCompositor.cpp',
'EffectSet.cpp',
'KeyframeEffect.cpp',
'KeyframeEffectParams.cpp',
'KeyframeEffectReadOnly.cpp',
'KeyframeUtils.cpp',
'PendingAnimationTracker.cpp',
'TimingParams.cpp',
+1 -1
View File
@@ -15,7 +15,7 @@ EXPORTS += [
'AudioChannelService.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'AudioChannelAgent.cpp',
'AudioChannelService.cpp',
]
+39
View File
@@ -791,6 +791,45 @@ CustomElementRegistry::Define(const nsAString& aName,
}
static void
TryUpgrade(nsINode& aNode)
{
Element* element = aNode.IsElement() ? aNode.AsElement() : nullptr;
if (element) {
CustomElementData* ceData = element->GetCustomElementData();
if (ceData) {
NodeInfo* nodeInfo = element->NodeInfo();
nsIAtom* typeAtom = ceData->GetCustomElementType();
CustomElementDefinition* definition =
nsContentUtils::LookupCustomElementDefinition(nodeInfo->GetDocument(),
nodeInfo->NameAtom(),
nodeInfo->NamespaceID(),
typeAtom);
if (definition) {
nsContentUtils::EnqueueUpgradeReaction(element, definition);
}
}
if (ShadowRoot* root = element->GetShadowRoot()) {
for (Element* child = root->GetFirstElementChild(); child;
child = child->GetNextElementSibling()) {
TryUpgrade(*child);
}
}
}
for (Element* child = aNode.GetFirstElementChild(); child;
child = child->GetNextElementSibling()) {
TryUpgrade(*child);
}
}
void
CustomElementRegistry::Upgrade(nsINode& aRoot)
{
TryUpgrade(aRoot);
}
void
CustomElementRegistry::Get(JSContext* aCx, const nsAString& aName,
JS::MutableHandle<JS::Value> aRetVal)
+2
View File
@@ -525,6 +525,8 @@ public:
JS::MutableHandle<JS::Value> aRetVal);
already_AddRefed<Promise> WhenDefined(const nsAString& aName, ErrorResult& aRv);
void Upgrade(nsINode& aRoot);
};
class MOZ_RAII AutoCEReaction final {
+1193 -426
View File
File diff suppressed because it is too large. Load diff
+44 -184
View File
@@ -35,221 +35,81 @@ namespace dom {
struct EventSourceInit;
class EventSourceImpl;
class EventSource final : public DOMEventTargetHelper
, public nsIObserver
, public nsIStreamListener
, public nsIChannelEventSink
, public nsIInterfaceRequestor
, public nsSupportsWeakReference
{
friend class EventSourceImpl;
public:
explicit EventSource(nsPIDOMWindowInner* aOwnerWindow);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(
EventSource, DOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(EventSource, DOMEventTargetHelper)
virtual bool IsCertainlyAliveForCC() const override;
NS_DECL_NSIOBSERVER
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSICHANNELEVENTSINK
NS_DECL_NSIINTERFACEREQUESTOR
// EventTarget
void DisconnectFromOwner() override
{
DOMEventTargetHelper::DisconnectFromOwner();
Close();
}
// nsWrapperCache
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
// WebIDL
nsPIDOMWindowInner*
GetParentObject() const
{
return GetOwner();
}
static already_AddRefed<EventSource>
Constructor(const GlobalObject& aGlobal, const nsAString& aURL,
const EventSourceInit& aEventSourceInitDict,
ErrorResult& aRv);
const EventSourceInit& aEventSourceInitDict, ErrorResult& aRv);
void GetUrl(nsAString& aURL) const
{
AssertIsOnTargetThread();
aURL = mOriginalURL;
}
bool WithCredentials() const
{
AssertIsOnTargetThread();
return mWithCredentials;
}
enum {
CONNECTING = 0U,
OPEN = 1U,
CLOSED = 2U
};
uint16_t ReadyState() const
{
AssertIsOnTargetThread();
return mReadyState;
}
IMPL_EVENT_HANDLER(open)
IMPL_EVENT_HANDLER(message)
IMPL_EVENT_HANDLER(error)
void Close();
virtual void DisconnectFromOwner() override;
protected:
virtual ~EventSource();
MOZ_IS_CLASS_INIT
nsresult Init(nsISupports* aOwner,
const nsAString& aURL,
bool aWithCredentials);
nsresult GetBaseURI(nsIURI **aBaseURI);
void SetupHttpChannel();
nsresult SetupReferrerPolicy();
nsresult InitChannelAndRequestEventSource();
nsresult ResetConnection();
nsresult DispatchFailConnection();
nsresult SetReconnectionTimeout();
void AnnounceConnection();
void DispatchAllMessageEvents();
void ReestablishConnection();
void FailConnection();
nsresult Thaw();
nsresult Freeze();
static void TimerCallback(nsITimer *aTimer, void *aClosure);
nsresult PrintErrorOnConsole(const char *aBundleURI,
const char16_t *aError,
const char16_t **aFormatStrings,
uint32_t aFormatStringsLen);
nsresult ConsoleError();
static nsresult StreamReaderFunc(nsIInputStream *aInputStream,
void *aClosure,
const char *aFromRawSegment,
uint32_t aToOffset,
uint32_t aCount,
uint32_t *aWriteCount);
nsresult SetFieldAndClear();
nsresult ClearFields();
nsresult ResetEvent();
nsresult DispatchCurrentMessageEvent();
nsresult ParseCharacter(char16_t aChr);
nsresult CheckHealthOfRequestCallback(nsIRequest *aRequestCallback);
nsresult OnRedirectVerifyCallback(nsresult result);
nsCOMPtr<nsIURI> mSrc;
nsString mLastEventID;
uint32_t mReconnectionTime; // in ms
struct Message {
nsString mEventName;
nsString mLastEventID;
nsString mData;
};
nsDeque mMessagesToDispatch;
Message mCurrentMessage;
/**
* A simple state machine used to manage the event-source's line buffer
*
* PARSE_STATE_OFF -> PARSE_STATE_BEGIN_OF_STREAM
*
* PARSE_STATE_BEGIN_OF_STREAM -> PARSE_STATE_BOM_WAS_READ |
* PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE |
* PARSE_STATE_COMMENT |
* PARSE_STATE_FIELD_NAME
*
* PARSE_STATE_BOM_WAS_READ -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE |
* PARSE_STATE_COMMENT |
* PARSE_STATE_FIELD_NAME
*
* PARSE_STATE_CR_CHAR -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_COMMENT |
* PARSE_STATE_FIELD_NAME |
* PARSE_STATE_BEGIN_OF_LINE
*
* PARSE_STATE_COMMENT -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE
*
* PARSE_STATE_FIELD_NAME -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE |
* PARSE_STATE_FIRST_CHAR_OF_FIELD_VALUE
*
* PARSE_STATE_FIRST_CHAR_OF_FIELD_VALUE -> PARSE_STATE_FIELD_VALUE |
* PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE
*
* PARSE_STATE_FIELD_VALUE -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE
*
* PARSE_STATE_BEGIN_OF_LINE -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_COMMENT |
* PARSE_STATE_FIELD_NAME |
* PARSE_STATE_BEGIN_OF_LINE
*
* Whenever the parser find an empty line or the end-of-file
* it dispatches the stacked event.
*
*/
enum ParserStatus {
PARSE_STATE_OFF,
PARSE_STATE_BEGIN_OF_STREAM,
PARSE_STATE_BOM_WAS_READ,
PARSE_STATE_CR_CHAR,
PARSE_STATE_COMMENT,
PARSE_STATE_FIELD_NAME,
PARSE_STATE_FIRST_CHAR_OF_FIELD_VALUE,
PARSE_STATE_FIELD_VALUE,
PARSE_STATE_BEGIN_OF_LINE
};
ParserStatus mStatus;
bool mFrozen;
bool mErrorLoadOnRedirect;
bool mGoingToDispatchAllMessages;
bool mWithCredentials;
bool mWaitingForOnStopRequest;
// used while reading the input streams
nsCOMPtr<nsIUnicodeDecoder> mUnicodeDecoder;
nsresult mLastConvertionResult;
nsString mLastFieldName;
nsString mLastFieldValue;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCOMPtr<nsIHttpChannel> mHttpChannel;
nsCOMPtr<nsITimer> mTimer;
uint16_t mReadyState;
nsString mOriginalURL;
nsCOMPtr<nsIPrincipal> mPrincipal;
nsString mOrigin;
// Event Source owner information:
// - the script file name
// - source code line number and column number where the Event Source object
// was constructed.
// - the ID of the inner window where the script lives. Note that this may not
// be the same as the Event Source owner window.
// These attributes are used for error reporting.
nsString mScriptFile;
uint32_t mScriptLine;
uint32_t mScriptColumn;
uint64_t mInnerWindowID;
private:
EventSource(const EventSource& x); // prevent bad usage
EventSource& operator=(const EventSource& x);
EventSource(nsPIDOMWindowInner* aOwnerWindow, bool aWithCredentials);
virtual ~EventSource();
// prevent bad usage
EventSource(const EventSource& x) = delete;
EventSource& operator=(const EventSource& x) = delete;
void AssertIsOnTargetThread() const
{
MOZ_ASSERT(NS_IsMainThread() == mIsMainThread);
}
nsresult CreateAndDispatchSimpleEvent(const nsAString& aName);
// Raw pointer because this EventSourceImpl is created, managed and destroyed
// by EventSource.
EventSourceImpl* mImpl;
nsString mOriginalURL;
uint16_t mReadyState;
bool mWithCredentials;
bool mIsMainThread;
// This is used to keep EventSourceImpl instance when there is a connection.
bool mKeepingAlive;
void UpdateMustKeepAlive();
void UpdateDontKeepAlive();
};
} // namespace dom
+1 -1
View File
@@ -1917,7 +1917,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(FragmentOrElement)
}
nsAutoCString orphan;
if (!tmp->IsInUncomposedDoc() &&
if (!tmp->IsInComposedDoc() &&
// Ignore xbl:content, which is never in the document and hence always
// appears to be orphaned.
!tmp->NodeInfo()->Equals(nsGkAtoms::content, kNameSpaceID_XBL)) {
+2 -3
View File
@@ -1390,9 +1390,8 @@ Navigator::GetPlatform(nsAString& aPlatform, bool aUsePrefOverriddenValue)
aPlatform.AssignLiteral("Win32");
#elif defined(XP_MACOSX) && defined(__ppc__)
aPlatform.AssignLiteral("MacPPC");
#elif defined(XP_MACOSX) && defined(__i386__)
aPlatform.AssignLiteral("MacIntel");
#elif defined(XP_MACOSX) && defined(__x86_64__)
#elif defined(XP_MACOSX)
// Always return "MacIntel", even on ARM64 macOS like Safari does.
aPlatform.AssignLiteral("MacIntel");
#else
// XXX Communicator uses compiled-in build-time string defines
+6 -26
View File
@@ -1402,32 +1402,6 @@ WebSocket::ConstructorCommon(const GlobalObject& aGlobal,
NS_IMPL_CYCLE_COLLECTION_CLASS(WebSocket)
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(WebSocket)
bool isBlack = tmp->IsBlack();
if (isBlack || tmp->mKeepingAlive) {
if (tmp->mListenerManager) {
tmp->mListenerManager->MarkForCC();
}
if (!isBlack && tmp->PreservingWrapper()) {
// This marks the wrapper black.
tmp->GetWrapper();
}
return true;
}
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(WebSocket)
return tmp->IsBlack();
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(WebSocket)
return tmp->IsBlack();
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(WebSocket,
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WebSocket,
DOMEventTargetHelper)
if (tmp->mImpl) {
@@ -1444,6 +1418,12 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WebSocket,
}
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
bool
WebSocket::IsCertainlyAliveForCC() const
{
return mKeepingAlive;
}
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(WebSocket)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
+2 -2
View File
@@ -45,8 +45,8 @@ public:
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(
WebSocket, DOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(WebSocket, DOMEventTargetHelper)
virtual bool IsCertainlyAliveForCC() const override;
// EventTarget
virtual void EventListenerAdded(nsIAtom* aType) override;
+4 -3
View File
@@ -222,7 +222,7 @@ EXPORTS.mozilla.dom += [
'WindowOrientationObserver.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'AnonymousContent.cpp',
'Attr.cpp',
'BarProps.cpp',
@@ -238,7 +238,6 @@ SOURCES += [
'DirectionalityUtils.cpp',
'DocGroup.cpp',
'DocumentFragment.cpp',
'DocumentOrShadowRoot.cpp',
'DocumentType.cpp',
'DOMCursor.cpp',
'DOMError.cpp',
@@ -373,12 +372,14 @@ SOURCES += [
]
if CONFIG['MOZ_WEBRTC']:
SOURCES += [
UNIFIED_SOURCES += [
'nsDOMDataChannel.cpp',
]
# these files couldn't be in UNIFIED_SOURCES for now for reasons given below:
SOURCES += [
# DocumentOrShadowRoot conflicts with mozilla::dom::ShadowRoot
'DocumentOrShadowRoot.cpp',
# Several conflicts with other bindings.
'DOMIntersectionObserver.cpp',
# Because of OS X headers.
+112 -5
View File
@@ -7056,16 +7056,26 @@ nsContentUtils::HasDistributedChildren(nsIContent* aContent)
// static
bool
nsContentUtils::IsForbiddenRequestHeader(const nsACString& aHeader)
nsContentUtils::IsForbiddenRequestHeader(const nsACString& aHeader,
const nsACString& aValue)
{
if (IsForbiddenSystemRequestHeader(aHeader)) {
return true;
}
if ((nsContentUtils::IsOverrideMethodHeader(aHeader) &&
nsContentUtils::ContainsForbiddenMethod(aValue))) {
return true;
}
return StringBeginsWith(aHeader, NS_LITERAL_CSTRING("proxy-"),
nsCaseInsensitiveCStringComparator()) ||
StringBeginsWith(aHeader, NS_LITERAL_CSTRING("sec-"),
nsCaseInsensitiveCStringComparator());
if (StringBeginsWith(aHeader, NS_LITERAL_CSTRING("proxy-"),
nsCaseInsensitiveCStringComparator()) ||
StringBeginsWith(aHeader, NS_LITERAL_CSTRING("sec-"),
nsCaseInsensitiveCStringComparator())) {
return true;
}
return false;
}
// static
@@ -7094,6 +7104,64 @@ nsContentUtils::IsForbiddenResponseHeader(const nsACString& aHeader)
aHeader.LowerCaseEqualsASCII("set-cookie2"));
}
// static
bool
nsContentUtils::IsOverrideMethodHeader(const nsACString& headerName) {
return headerName.LowerCaseEqualsASCII("x-http-method-override") ||
headerName.LowerCaseEqualsASCII("x-http-method") ||
headerName.LowerCaseEqualsASCII("x-method-override");
}
// static
bool
nsContentUtils::ContainsForbiddenMethod(const nsACString& headerValue) {
bool hasInsecureMethod = false;
nsCCharSeparatedTokenizer tokenizer(headerValue, ',');
while (tokenizer.hasMoreTokens()) {
const nsDependentCSubstring& value = tokenizer.nextToken();
if (value.LowerCaseEqualsASCII("connect") ||
value.LowerCaseEqualsASCII("trace") ||
value.LowerCaseEqualsASCII("track")) {
hasInsecureMethod = true;
break;
}
}
return hasInsecureMethod;
}
// static
bool nsContentUtils::IsCorsUnsafeRequestHeaderValue(
const nsACString& aHeaderValue) {
const char* cur = aHeaderValue.BeginReading();
const char* end = aHeaderValue.EndReading();
while (cur != end) {
// Implementation of
// https://fetch.spec.whatwg.org/#cors-unsafe-request-header-byte Is less
// than a space but not a horizontal tab
if ((*cur < ' ' && *cur != '\t') || *cur == '"' || *cur == '(' ||
*cur == ')' || *cur == ':' || *cur == '<' || *cur == '>' ||
*cur == '?' || *cur == '@' || *cur == '[' || *cur == '\\' ||
*cur == ']' || *cur == '{' || *cur == '}' ||
*cur == 0x7F) { // 0x75 is DEL
return true;
}
cur++;
}
return false;
}
// static
bool nsContentUtils::IsAllowedNonCorsAccept(const nsACString& aHeaderValue) {
if (IsCorsUnsafeRequestHeaderValue(aHeaderValue)) {
return false;
}
return true;
}
// static
bool
nsContentUtils::IsAllowedNonCorsContentType(const nsACString& aHeaderValue)
@@ -7101,6 +7169,10 @@ nsContentUtils::IsAllowedNonCorsContentType(const nsACString& aHeaderValue)
nsAutoCString contentType;
nsAutoCString unused;
if (IsCorsUnsafeRequestHeaderValue(aHeaderValue)) {
return false;
}
nsresult rv = NS_ParseRequestContentType(aHeaderValue, contentType, unused);
if (NS_FAILED(rv)) {
return false;
@@ -7111,6 +7183,41 @@ nsContentUtils::IsAllowedNonCorsContentType(const nsACString& aHeaderValue)
contentType.LowerCaseEqualsLiteral("multipart/form-data");
}
// static
bool nsContentUtils::IsAllowedNonCorsLanguage(const nsACString& aHeaderValue) {
const char* cur = aHeaderValue.BeginReading();
const char* end = aHeaderValue.EndReading();
while (cur != end) {
if ((*cur >= '0' && *cur <= '9') || (*cur >= 'A' && *cur <= 'Z') ||
(*cur >= 'a' && *cur <= 'z') || *cur == ' ' || *cur == '*' ||
*cur == ',' || *cur == '-' || *cur == '.' || *cur == ';' ||
*cur == '=') {
cur++;
continue;
}
return false;
}
return true;
}
// static
bool nsContentUtils::IsCORSSafelistedRequestHeader(const nsACString& aName,
const nsACString& aValue) {
// See https://fetch.spec.whatwg.org/#cors-safelisted-request-header
if (aValue.Length() > 128) {
return false;
}
return (aName.LowerCaseEqualsLiteral("accept") &&
nsContentUtils::IsAllowedNonCorsAccept(aValue)) ||
(aName.LowerCaseEqualsLiteral("accept-language") &&
nsContentUtils::IsAllowedNonCorsLanguage(aValue)) ||
(aName.LowerCaseEqualsLiteral("content-language") &&
nsContentUtils::IsAllowedNonCorsLanguage(aValue)) ||
(aName.LowerCaseEqualsLiteral("content-type") &&
nsContentUtils::IsAllowedNonCorsContentType(aValue));
}
bool
nsContentUtils::DOMWindowDumpEnabled()
{
+34 -1
View File
@@ -2425,7 +2425,8 @@ public:
* Returns whether a given header is forbidden for an XHR or fetch
* request.
*/
static bool IsForbiddenRequestHeader(const nsACString& aHeader);
static bool IsForbiddenRequestHeader(const nsACString& aHeader,
const nsACString& aValue);
/**
* Returns whether a given header is forbidden for a system XHR
@@ -2433,18 +2434,50 @@ public:
*/
static bool IsForbiddenSystemRequestHeader(const nsACString& aHeader);
/**
* Returns whether a given header has characters that aren't permitted
*/
static bool IsCorsUnsafeRequestHeaderValue(const nsACString& aHeaderValue);
/**
* Returns whether a given Accept header value is allowed
* for a non-CORS XHR or fetch request.
*/
static bool IsAllowedNonCorsAccept(const nsACString& aHeaderValue);
/**
* Returns whether a given Content-Type header value is allowed
* for a non-CORS XHR or fetch request.
*/
static bool IsAllowedNonCorsContentType(const nsACString& aHeaderValue);
/**
* Returns whether a given Content-Language or accept-language header value is
* allowed for a non-CORS XHR or fetch request.
*/
static bool IsAllowedNonCorsLanguage(const nsACString& aHeaderValue);
/**
* Returns whether a given header and value is a CORS-safelisted request
* header per https://fetch.spec.whatwg.org/#cors-safelisted-request-header
*/
static bool IsCORSSafelistedRequestHeader(const nsACString& aName,
const nsACString& aValue);
/**
* Returns whether a given header is forbidden for an XHR or fetch
* response.
*/
static bool IsForbiddenResponseHeader(const nsACString& aHeader);
/**
* Checks whether the header overrides any http methods
*/
static bool IsOverrideMethodHeader(const nsACString& headerName);
/**
* Checks whether the header value contains any forbidden method
*/
static bool ContainsForbiddenMethod(const nsACString& headerValue);
/**
* Returns the inner window ID for the window associated with a request,
*/
+1 -70
View File
@@ -2367,75 +2367,6 @@ nsDOMWindowUtils::GetCurrentAudioBackend(nsAString& aBackend)
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::StartFrameTimeRecording(uint32_t *startIndex)
{
NS_ENSURE_ARG_POINTER(startIndex);
nsCOMPtr<nsIWidget> widget = GetWidget();
if (!widget)
return NS_ERROR_FAILURE;
LayerManager *mgr = widget->GetLayerManager();
if (!mgr)
return NS_ERROR_FAILURE;
const uint32_t kRecordingMinSize = 60 * 10; // 10 seconds @60 fps.
const uint32_t kRecordingMaxSize = 60 * 60 * 60; // One hour
uint32_t bufferSize = Preferences::GetUint("toolkit.framesRecording.bufferSize", uint32_t(0));
bufferSize = std::min(bufferSize, kRecordingMaxSize);
bufferSize = std::max(bufferSize, kRecordingMinSize);
*startIndex = mgr->StartFrameTimeRecording(bufferSize);
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::StopFrameTimeRecording(uint32_t startIndex,
uint32_t *frameCount,
float **frameIntervals)
{
NS_ENSURE_ARG_POINTER(frameCount);
NS_ENSURE_ARG_POINTER(frameIntervals);
nsCOMPtr<nsIWidget> widget = GetWidget();
if (!widget)
return NS_ERROR_FAILURE;
LayerManager *mgr = widget->GetLayerManager();
if (!mgr)
return NS_ERROR_FAILURE;
nsTArray<float> tmpFrameIntervals;
mgr->StopFrameTimeRecording(startIndex, tmpFrameIntervals);
*frameCount = tmpFrameIntervals.Length();
*frameIntervals = (float*)moz_xmalloc(*frameCount * sizeof(float));
/* copy over the frame intervals and paint times into the arrays we just allocated */
for (uint32_t i = 0; i < *frameCount; i++) {
(*frameIntervals)[i] = tmpFrameIntervals[i];
}
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::BeginTabSwitch()
{
nsCOMPtr<nsIWidget> widget = GetWidget();
if (!widget)
return NS_ERROR_FAILURE;
LayerManager *mgr = widget->GetLayerManager();
if (!mgr)
return NS_ERROR_FAILURE;
mgr->BeginTabSwitch();
return NS_OK;
}
static bool
ComputeAnimationValue(nsCSSPropertyID aProperty,
Element* aElement,
@@ -2478,7 +2409,7 @@ nsDOMWindowUtils::AdvanceTimeAndRefresh(int64_t aMilliseconds)
nsPresContext* presContext = GetPresContext();
if (presContext) {
nsRefreshDriver* driver = presContext->RefreshDriver();
RefPtr<nsRefreshDriver> driver = presContext->RefreshDriver();
driver->AdvanceTimeAndRefresh(aMilliseconds);
RefPtr<LayerTransactionChild> transaction = GetLayerTransaction();
+15 -1
View File
@@ -2504,6 +2504,21 @@ nsDocument::InitCSP(nsIChannel* aChannel)
return NS_OK;
}
// If this is explicitly loaded as a data document, no need to set a CSP.
if (mLoadedAsData) {
return NS_OK;
}
// If this is an image, no need to set a CSP.
// If we don't do this, SVG images will be parsed as normal XML documents and
// subject to served CSPs, which might block internally applied inline styles.
// See UXP issue #1959.
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
if (loadInfo->GetExternalContentPolicyType() ==
nsIContentPolicy::TYPE_IMAGE) {
return NS_OK;
}
nsAutoCString tCspHeaderValue, tCspROHeaderValue;
nsCOMPtr<nsIHttpChannel> httpChannel;
@@ -2532,7 +2547,6 @@ nsDocument::InitCSP(nsIChannel* aChannel)
// Check if this is a signed content to apply default CSP.
bool applySignedContentCSP = false;
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
if (loadInfo && loadInfo->GetVerifySignedContent()) {
applySignedContentCSP = true;
}
+15 -3
View File
@@ -1185,7 +1185,8 @@ nsTreeSanitizer::SanitizeAttributes(mozilla::dom::Element* aElement,
continue;
}
if (IsURL(aURLs, attrLocal)) {
if (SanitizeURL(aElement, attrNs, attrLocal)) {
bool fragmentOnly = aElement->IsSVGElement(nsGkAtoms::use);
if (SanitizeURL(aElement, attrNs, attrLocal, fragmentOnly)) {
// in case the attribute removal shuffled the attribute order, start
// the loop again.
--ac;
@@ -1239,7 +1240,8 @@ nsTreeSanitizer::SanitizeAttributes(mozilla::dom::Element* aElement,
// else not allowed
} else if (aAllowXLink && kNameSpaceID_XLink == attrNs) {
if (nsGkAtoms::href == attrLocal) {
if (SanitizeURL(aElement, attrNs, attrLocal)) {
bool fragmentOnly = aElement->IsSVGElement(nsGkAtoms::use);
if (SanitizeURL(aElement, attrNs, attrLocal, fragmentOnly)) {
// in case the attribute removal shuffled the attribute order, start
// the loop again.
--ac;
@@ -1273,7 +1275,8 @@ nsTreeSanitizer::SanitizeAttributes(mozilla::dom::Element* aElement,
bool
nsTreeSanitizer::SanitizeURL(mozilla::dom::Element* aElement,
int32_t aNamespace,
nsIAtom* aLocalName)
nsIAtom* aLocalName,
bool aFragmentOnly)
{
nsAutoString value;
aElement->GetAttr(aNamespace, aLocalName, value);
@@ -1282,6 +1285,15 @@ nsTreeSanitizer::SanitizeURL(mozilla::dom::Element* aElement,
static const char* kWhitespace = "\n\r\t\b";
const nsAString& v =
nsContentUtils::TrimCharsInSet(kWhitespace, value);
// Fragment-only url cannot be harmful.
if (!v.IsEmpty() && v.First() == u'#') {
return false;
}
// if we allow only same-document fragment URLs, stop and remove here
if (aFragmentOnly) {
aElement->UnsetAttr(aNamespace, aLocalName, false);
return true;
}
nsIScriptSecurityManager* secMan = nsContentUtils::GetSecurityManager();
uint32_t flags = nsIScriptSecurityManager::DISALLOW_INHERIT_PRINCIPAL;
+3 -1
View File
@@ -143,11 +143,13 @@ class MOZ_STACK_CLASS nsTreeSanitizer {
* @param aElement the element whose attribute to possibly modify
* @param aNamespace the namespace of the URL attribute
* @param aLocalName the local name of the URL attribute
* @param aFragmentOnly allows same-document references only
* @return true if the attribute was removed and false otherwise
*/
bool SanitizeURL(mozilla::dom::Element* aElement,
int32_t aNamespace,
nsIAtom* aLocalName);
nsIAtom* aLocalName,
bool aFragmentOnly = false);
/**
* Checks a style rule for the presence of the 'binding' CSS property and
+1 -1
View File
@@ -682,7 +682,7 @@ DefineUnforgeableAttributes(JSContext* cx, JS::Handle<JSObject*> obj,
// funToString ObjectOps member for interface objects.
JSString*
InterfaceObjectToString(JSContext* aCx, JS::Handle<JSObject*> aObject,
unsigned /* indent */)
bool /* isToSource */)
{
const js::Class* clasp = js::GetObjectClass(aObject);
MOZ_ASSERT(IsDOMIfaceAndProtoClass(clasp));
-4
View File
@@ -170,10 +170,6 @@ DOMInterfaces = {
'headerFile': 'Crypto.h'
},
'CSS': {
'concrete': False,
},
'CSS2Properties': {
'nativeType': 'nsDOMCSSDeclaration'
},
+3 -12
View File
@@ -50,21 +50,12 @@ struct GCPolicy<mozilla::OwningNonNull<T>>
} // namespace JS
namespace js {
template<typename T>
struct RootedBase<mozilla::OwningNonNull<T>>
template<typename T, typename Wrapper>
struct WrappedPtrOperations<mozilla::OwningNonNull<T>, Wrapper>
{
typedef mozilla::OwningNonNull<T> SmartPtrType;
operator SmartPtrType& () const
{
auto& self = *static_cast<const JS::Rooted<SmartPtrType>*>(this);
return self.get();
}
operator T& () const
{
auto& self = *static_cast<const JS::Rooted<SmartPtrType>*>(this);
return self.get();
return static_cast<const Wrapper*>(this)->get();
}
};
} // namespace js
+3 -10
View File
@@ -38,19 +38,12 @@ struct GCPolicy<RefPtr<T>>
} // namespace JS
namespace js {
template<typename T>
struct RootedBase<RefPtr<T>>
template<typename T, typename Wrapper>
struct WrappedPtrOperations<RefPtr<T>, Wrapper>
{
operator RefPtr<T>& () const
{
auto& self = *static_cast<const JS::Rooted<RefPtr<T>>*>(this);
return self.get();
}
operator T*() const
{
auto& self = *static_cast<const JS::Rooted<RefPtr<T>>*>(this);
return self.get();
return static_cast<const Wrapper*>(this)->get();
}
};
} // namespace js
+1 -1
View File
@@ -84,7 +84,7 @@ LOCAL_INCLUDES += [
'/media/webrtc/signaling/src/peerconnection',
]
SOURCES += [
UNIFIED_SOURCES += [
'BindingUtils.cpp',
'CallbackInterface.cpp',
'CallbackObject.cpp',
+8 -2
View File
@@ -248,8 +248,14 @@ class IDLScope(IDLObject):
return self.QName()
def QName(self):
if self._name:
return self._name.QName() + "::"
# It's possible for us to be called before __init__ has been called, for
# the IDLObjectWithScope case. In that case, self._name won't be set yet.
if hasattr(self, "_name"):
name = self._name
else:
name = None
if name:
return name.QName() + "::"
return "::"
def ensureUnique(self, identifier, object):
+1 -1
View File
@@ -7,7 +7,7 @@ EXPORTS.mozilla.dom += [
'BroadcastChannel.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'BroadcastChannel.cpp',
'BroadcastChannelChild.cpp',
'BroadcastChannelParent.cpp',
+1 -1
View File
@@ -37,7 +37,7 @@ EXPORTS.mozilla.dom.cache += [
'TypeUtils.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'Action.cpp',
'ActorChild.cpp',
'AutoUtils.cpp',
+21 -10
View File
@@ -5752,6 +5752,18 @@ inline uint8_t PoisonValue(uint8_t v)
return v + rand() %3 -1;
}
static IntRect ClipImageDataTransfer(IntRect& aSrc,
const IntPoint& aDestOffset,
const IntSize& aDestBounds)
{
IntRect dest = aSrc;
dest.SafeMoveBy(aDestOffset);
dest = IntRect(IntPoint(0, 0), aDestBounds).SafeIntersect(dest);
aSrc = aSrc.SafeIntersect(dest - aDestOffset);
return aSrc + aDestOffset;
}
nsresult
CanvasRenderingContext2D::GetImageDataArray(JSContext* aCx,
int32_t aX,
@@ -5792,9 +5804,11 @@ CanvasRenderingContext2D::GetImageDataArray(JSContext* aCx,
return NS_OK;
}
IntRect srcRect(0, 0, mWidth, mHeight);
IntRect destRect(aX, aY, aWidth, aHeight);
IntRect srcReadRect = srcRect.Intersect(destRect);
IntRect dstWriteRect(0, 0, aWidth, aHeight);
IntRect srcReadRect = ClipImageDataTransfer(dstWriteRect,
IntPoint(aX, aY),
IntSize(mWidth, mHeight));
RefPtr<DataSourceSurface> readback;
DataSourceSurface::MappedSurface rawData;
if (!srcReadRect.IsEmpty()) {
@@ -5822,9 +5836,6 @@ CanvasRenderingContext2D::GetImageDataArray(JSContext* aCx,
}
}
IntRect dstWriteRect = srcReadRect;
dstWriteRect.MoveBy(-aX, -aY);
JS::AutoCheckCannotGC nogc;
bool isShared;
uint8_t* data = JS_GetUint8ClampedArrayData(darray, &isShared, nogc);
@@ -6025,10 +6036,10 @@ CanvasRenderingContext2D::PutImageData_explicit(int32_t aX, int32_t aY, uint32_t
dirtyRect = imageDataRect;
}
dirtyRect.MoveBy(IntPoint(aX, aY));
dirtyRect = IntRect(0, 0, mWidth, mHeight).Intersect(dirtyRect);
if (dirtyRect.Width() <= 0 || dirtyRect.Height() <= 0) {
IntRect srcRect = dirtyRect;
dirtyRect = ClipImageDataTransfer(srcRect, IntPoint(aX, aY),
IntSize(mWidth, mHeight));
if (dirtyRect.IsEmpty()) {
return NS_OK;
}
-3
View File
@@ -6,9 +6,6 @@
#include "ImageBitmapColorUtils.h"
#include "js/LegacyIntTypes.h"
#include <cmath>
namespace mozilla {
namespace dom {
+36 -14
View File
@@ -303,13 +303,13 @@ WebGLContext::FromDomElem(const char* funcName, TexImageTarget target, uint32_t
uint32_t height, uint32_t depth, const dom::Element& elem,
ErrorResult* const out_error)
{
if (elem.IsHTMLElement(nsGkAtoms::canvas)) {
const dom::HTMLCanvasElement* canvas = static_cast<const dom::HTMLCanvasElement*>(&elem);
if (canvas->IsWriteOnly()) {
out_error->Throw(NS_ERROR_DOM_SECURITY_ERR);
return nullptr;
}
}
if (elem.IsHTMLElement(nsGkAtoms::canvas)) {
const dom::HTMLCanvasElement* canvas = static_cast<const dom::HTMLCanvasElement*>(&elem);
if (canvas->IsWriteOnly()) {
out_error->Throw(NS_ERROR_DOM_SECURITY_ERR);
return nullptr;
}
}
uint32_t flags = nsLayoutUtils::SFE_WANT_IMAGE_SURFACE |
nsLayoutUtils::SFE_USE_ELEMENT_SIZE_IF_VECTOR;
@@ -1032,9 +1032,27 @@ ValidateCompressedTexImageRestrictions(const char* funcName, WebGLContext* webgl
}
static bool
ValidateTargetForFormat(const char* funcName, WebGLContext* webgl, TexImageTarget target,
const webgl::FormatInfo* format)
{
ValidateFormatAndSize(const char* funcName,
WebGLContext* webgl,
TexImageTarget target,
const webgl::FormatInfo* format,
const uint32_t width,
const uint32_t height,
const uint32_t depth) {
// Check if texture size will likely be rejected by the driver and give a more
// meaningful error message.
auto baseImageSize = CheckedInt<uint64_t>(format->estimatedBytesPerPixel) *
width * height * depth;
if (target == LOCAL_GL_TEXTURE_CUBE_MAP) {
baseImageSize *= 6;
}
if (!baseImageSize.isValid() ||
baseImageSize.value() > (uint64_t)gfxPrefs::WebGLMaxSizePerTextureMB * (1024 * 1024)) {
webgl->ErrorOutOfMemory("Texture size too large; base image MB > webgl.max-size-per-texture-mb");
return false;
}
// GLES 3.0.4 p127:
// "Textures with a base internal format of DEPTH_COMPONENT or DEPTH_STENCIL are
// supported by texture image specification commands only if `target` is TEXTURE_2D,
@@ -1137,7 +1155,8 @@ WebGLTexture::TexStorage(const char* funcName, TexTarget target, GLsizei levels,
}
auto dstFormat = dstUsage->format;
if (!ValidateTargetForFormat(funcName, mContext, testTarget, dstFormat))
if (!ValidateFormatAndSize(funcName, mContext, testTarget, dstFormat,
width, height, depth))
return;
if (dstFormat->compression) {
@@ -1264,7 +1283,8 @@ WebGLTexture::TexImage(const char* funcName, TexImageTarget target, GLint level,
// Check that source and dest info are compatible
auto dstFormat = dstUsage->format;
if (!ValidateTargetForFormat(funcName, mContext, target, dstFormat))
if (!ValidateFormatAndSize(funcName, mContext, target, dstFormat,
blob->mWidth, blob->mHeight, blob->mDepth))
return;
if (!mContext->IsWebGL2() && dstFormat->d) {
@@ -1484,7 +1504,8 @@ WebGLTexture::CompressedTexImage(const char* funcName, TexImageTarget target, GL
return;
}
if (!ValidateTargetForFormat(funcName, mContext, target, format))
if (!ValidateFormatAndSize(funcName, mContext, target, format,
blob->mWidth, blob->mHeight, blob->mDepth))
return;
////////////////////////////////////
@@ -2143,7 +2164,8 @@ WebGLTexture::CopyTexImage2D(TexImageTarget target, GLint level, GLenum internal
return;
const auto& dstFormat = dstUsage->format;
if (!ValidateTargetForFormat(funcName, mContext, target, dstFormat))
if (!ValidateFormatAndSize(funcName, mContext, target, dstFormat,
width, height, depth))
return;
if (!mContext->IsWebGL2() && dstFormat->d) {
+2 -2
View File
@@ -41,7 +41,7 @@ EXPORTS.mozilla.dom += [
]
# Canvas 2D and common sources
SOURCES += [
UNIFIED_SOURCES += [
'CanvasImageCache.cpp',
'CanvasRenderingContext2D.cpp',
'CanvasRenderingContextHelper.cpp',
@@ -59,7 +59,7 @@ SOURCES += [
]
# WebGL Sources
SOURCES += [
UNIFIED_SOURCES += [
'TexUnpackBlob.cpp',
'WebGL1Context.cpp',
'WebGL1ContextUniforms.cpp',
+1 -1
View File
@@ -21,7 +21,7 @@ EXPORTS.mozilla.dom += [
'Console.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'Console.cpp',
'ConsoleReportCollector.cpp',
]
+1 -1
View File
@@ -12,7 +12,7 @@ EXPORTS.mozilla.dom += [
'WebCryptoThreadPool.h'
]
SOURCES += [
UNIFIED_SOURCES += [
'CryptoBuffer.cpp',
'CryptoKey.cpp',
'KeyAlgorithmProxy.cpp',
+1 -1
View File
@@ -10,7 +10,7 @@ EXPORTS.mozilla.dom += [
'TextEncoder.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'EncodingUtils.cpp',
'FallbackEncoding.cpp',
'TextDecoder.cpp',
+3 -2
View File
@@ -52,11 +52,12 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(DOMEventTargetHelper)
if (tmp->IsBlack() || tmp->IsCertainlyAliveForCC()) {
bool isBlack = tmp->IsBlack();
if (isBlack || tmp->IsCertainlyAliveForCC()) {
if (tmp->mListenerManager) {
tmp->mListenerManager->MarkForCC();
}
if (!tmp->IsBlack() && tmp->PreservingWrapper()) {
if (!isBlack && tmp->PreservingWrapper()) {
// This marks the wrapper black.
tmp->GetWrapper();
}
+5 -10
View File
@@ -639,16 +639,11 @@ DataTransfer::PrincipalMaySetData(const nsAString& aType,
return false;
}
if (aType.EqualsASCII(kFileMime) ||
aType.EqualsASCII(kFilePromiseMime)) {
NS_WARNING("Disallowing adding x-moz-file or x-moz-file-promize types to DataTransfer");
return false;
}
// Disallow content from creating x-moz-place flavors, so that it cannot
// create fake Places smart queries exposing user data.
if (StringBeginsWith(aType, NS_LITERAL_STRING("text/x-moz-place"))) {
NS_WARNING("Disallowing adding moz-place types to DataTransfer");
// Don't allow adding internal types of the form */x-moz-*, but
// special-case the url types as they are simple variations of urls.
if (FindInReadable(NS_LITERAL_STRING(kInternal_Mimetype_Prefix), aType) &&
!StringBeginsWith(aType, NS_LITERAL_STRING("text/x-moz-url"))) {
NS_WARNING("Disallowing adding requested internal type to DataTransfer");
return false;
}
}
+4
View File
@@ -751,6 +751,8 @@ EventListenerManager::SetEventHandler(nsIAtom* aName,
bool aPermitUntrustedEvents,
Element* aElement)
{
auto removeEventHandler = MakeScopeExit([&] { RemoveEventHandler(aName, EmptyString()); });
nsCOMPtr<nsIDocument> doc;
nsCOMPtr<nsIScriptGlobalObject> global =
GetScriptGlobalAndDocument(getter_AddRefs(doc));
@@ -825,6 +827,8 @@ EventListenerManager::SetEventHandler(nsIAtom* aName,
NS_ENSURE_TRUE(context, NS_ERROR_FAILURE);
NS_ENSURE_STATE(global->GetGlobalJSObject());
removeEventHandler.release();
Listener* listener = SetEventHandlerInternal(aName,
EmptyString(),
TypedEventHandler(),
+6 -2
View File
@@ -73,7 +73,7 @@ EXPORTS.mozilla.dom += [
'XULCommandEvent.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'AnimationEvent.cpp',
'AsyncEventDispatcher.cpp',
'BeforeAfterKeyboardEvent.cpp',
@@ -95,7 +95,6 @@ SOURCES += [
'EventDispatcher.cpp',
'EventListenerManager.cpp',
'EventListenerService.cpp',
'EventStateManager.cpp',
'EventTarget.cpp',
'FocusEvent.cpp',
'ImageCaptureError.cpp',
@@ -125,6 +124,11 @@ SOURCES += [
'XULCommandEvent.cpp',
]
# nsEventStateManager.cpp should be built separately because of Mac OS X headers.
SOURCES += [
'EventStateManager.cpp',
]
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
-1
View File
@@ -13,7 +13,6 @@
#include "nsIUnicodeDecoder.h"
#include "nsIUnicodeEncoder.h"
#include "nsCharSeparatedTokenizer.h"
#include "nsDOMString.h"
#include "nsNetUtil.h"
#include "nsReadableUtils.h"
+4 -2
View File
@@ -536,7 +536,8 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest,
nsAutoCString statusText;
httpChannel->GetResponseStatusText(statusText);
response = new InternalResponse(responseStatus, statusText);
response = new InternalResponse(responseStatus, statusText,
mRequest->GetCredentialsMode());
RefPtr<FillResponseHeaders> visitor = new FillResponseHeaders(response);
rv = httpChannel->VisitResponseHeaders(visitor);
@@ -555,7 +556,8 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest,
}
MOZ_ASSERT(!result.Failed());
} else {
response = new InternalResponse(200, NS_LITERAL_CSTRING("OK"));
response = new InternalResponse(200, NS_LITERAL_CSTRING("OK"),
mRequest->GetCredentialsMode());
ErrorResult result;
nsAutoCString contentType;
+191 -27
View File
@@ -5,6 +5,7 @@
#include "mozilla/dom/InternalHeaders.h"
#include "FetchUtil.h"
#include "mozilla/dom/FetchTypes.h"
#include "mozilla/ErrorResult.h"
@@ -46,20 +47,112 @@ InternalHeaders::ToIPC(nsTArray<HeadersEntry>& aIPCHeaders,
}
}
bool
InternalHeaders::IsValidHeaderValue(const nsCString& aLowerName,
const nsCString& aNormalizedValue,
ErrorResult& aRv) {
// Steps 2 to 6 for ::Set() and ::Append() in the spec.
// Step 2
if (IsInvalidName(aLowerName, aRv) || IsInvalidValue(aNormalizedValue, aRv)) {
return false;
}
// Step 3
if (IsImmutable(aRv)) {
return false;
}
// Step 4
if (mGuard == HeadersGuardEnum::Request) {
if (IsForbiddenRequestHeader(aLowerName, aNormalizedValue)) {
return false;
}
}
// Step 5
if (mGuard == HeadersGuardEnum::Request_no_cors) {
nsAutoCString tempValue;
Get(aLowerName, tempValue, aRv);
if (tempValue.IsVoid()) {
tempValue = aNormalizedValue;
} else {
tempValue.Append(", ");
tempValue.Append(aNormalizedValue);
}
if (!nsContentUtils::IsCORSSafelistedRequestHeader(aLowerName, tempValue)) {
return false;
}
}
// Step 6
else if (IsForbiddenResponseHeader(aLowerName)) {
return false;
}
return true;
}
void
InternalHeaders::Append(const nsACString& aName, const nsACString& aValue,
ErrorResult& aRv)
{
// Step 1
nsAutoCString trimValue;
NS_TrimHTTPWhitespace(aValue, trimValue);
// Steps 2 to 6
nsAutoCString lowerName;
ToLowerCase(aName, lowerName);
if (IsInvalidMutableHeader(lowerName, aValue, aRv)) {
if (!IsValidHeaderValue(lowerName, trimValue, aRv)) {
return;
}
// Step 7
SetListDirty();
mList.AppendElement(Entry(lowerName, aValue));
// Step 8
if (mGuard == HeadersGuardEnum::Request_no_cors) {
RemovePrivilegedNoCorsRequestHeaders();
}
}
void InternalHeaders::RemovePrivilegedNoCorsRequestHeaders() {
bool dirty = false;
// remove in reverse order to minimize copying
for (int32_t i = mList.Length() - 1; i >= 0; --i) {
if (IsPrivilegedNoCorsRequestHeaderName(mList[i].mName)) {
mList.RemoveElementAt(i);
dirty = true;
}
}
if (dirty) {
SetListDirty();
}
}
bool InternalHeaders::DeleteInternal(const nsCString& aLowerName,
ErrorResult& aRv) {
bool dirty = false;
// remove in reverse order to minimize copying
for (int32_t i = mList.Length() - 1; i >= 0; --i) {
if (mList[i].mName.EqualsIgnoreCase(aLowerName.get())) {
mList.RemoveElementAt(i);
dirty = true;
}
}
if (dirty) {
SetListDirty();
}
return dirty;
}
void
@@ -68,17 +161,43 @@ InternalHeaders::Delete(const nsACString& aName, ErrorResult& aRv)
nsAutoCString lowerName;
ToLowerCase(aName, lowerName);
if (IsInvalidMutableHeader(lowerName, aRv)) {
// Step 1
if (IsInvalidName(lowerName, aRv)) {
return;
}
SetListDirty();
// Step 2
if (IsImmutable(aRv)) {
return;
}
// remove in reverse order to minimize copying
for (int32_t i = mList.Length() - 1; i >= 0; --i) {
if (lowerName == mList[i].mName) {
mList.RemoveElementAt(i);
}
// Step 3
nsAutoCString value;
GetInternal(lowerName, value, aRv);
if (IsForbiddenRequestHeader(lowerName, value)) {
return;
}
// Step 4
if (mGuard == HeadersGuardEnum::Request_no_cors &&
!IsNoCorsSafelistedRequestHeaderName(lowerName) &&
!IsPrivilegedNoCorsRequestHeaderName(lowerName)) {
return;
}
// Step 5
if (IsForbiddenResponseHeader(lowerName)) {
return;
}
// Steps 6 and 7
if (!DeleteInternal(lowerName, aRv)) {
return;
}
// Step 8
if (mGuard == HeadersGuardEnum::Request_no_cors) {
RemovePrivilegedNoCorsRequestHeaders();
}
}
@@ -91,12 +210,18 @@ InternalHeaders::Get(const nsACString& aName, nsACString& aValue, ErrorResult& a
if (IsInvalidName(lowerName, aRv)) {
return;
}
GetInternal(lowerName, aValue, aRv);
}
void
InternalHeaders::GetInternal(const nsCString& aLowerName,
nsACString& aValue,
ErrorResult& aRv) const {
const char* delimiter = ",";
bool firstValueFound = false;
for (uint32_t i = 0; i < mList.Length(); ++i) {
if (lowerName == mList[i].mName) {
if (aLowerName == mList[i].mName) {
if (firstValueFound) {
aValue += delimiter;
}
@@ -153,13 +278,18 @@ InternalHeaders::Has(const nsACString& aName, ErrorResult& aRv) const
void
InternalHeaders::Set(const nsACString& aName, const nsACString& aValue, ErrorResult& aRv)
{
// Step 1
nsAutoCString trimValue;
NS_TrimHTTPWhitespace(aValue, trimValue);
// Steps 2 to 6
nsAutoCString lowerName;
ToLowerCase(aName, lowerName);
if (IsInvalidMutableHeader(lowerName, aValue, aRv)) {
if (!IsValidHeaderValue(lowerName, trimValue, aRv)) {
return;
}
// Step 7
SetListDirty();
int32_t firstIndex = INT32_MAX;
@@ -179,6 +309,11 @@ InternalHeaders::Set(const nsACString& aName, const nsACString& aValue, ErrorRes
} else {
mList.AppendElement(Entry(lowerName, aValue));
}
// Step 8
if (mGuard == HeadersGuardEnum::Request_no_cors) {
RemovePrivilegedNoCorsRequestHeaders();
}
}
void
@@ -200,6 +335,22 @@ InternalHeaders::~InternalHeaders()
{
}
// static
bool
InternalHeaders::IsNoCorsSafelistedRequestHeaderName(const nsCString& aName) {
return aName.EqualsIgnoreCase("accept") ||
aName.EqualsIgnoreCase("accept-language") ||
aName.EqualsIgnoreCase("content-language") ||
aName.EqualsIgnoreCase("content-type");
}
// static
bool
InternalHeaders::IsPrivilegedNoCorsRequestHeaderName(
const nsCString& aName) {
return aName.EqualsIgnoreCase("range");
}
// static
bool
InternalHeaders::IsSimpleHeader(const nsACString& aName, const nsACString& aValue)
@@ -207,9 +358,12 @@ InternalHeaders::IsSimpleHeader(const nsACString& aName, const nsACString& aValu
// Note, we must allow a null content-type value here to support
// get("content-type"), but the IsInvalidValue() check will prevent null
// from being set or appended.
return aName.EqualsLiteral("accept") ||
aName.EqualsLiteral("accept-language") ||
aName.EqualsLiteral("content-language") ||
return (aName.EqualsLiteral("accept") &&
nsContentUtils::IsAllowedNonCorsAccept(aValue)) ||
(aName.EqualsLiteral("accept-language") &&
nsContentUtils::IsAllowedNonCorsLanguage(aValue))||
(aName.EqualsLiteral("content-language") &&
nsContentUtils::IsAllowedNonCorsLanguage(aValue))||
(aName.EqualsLiteral("content-type") &&
nsContentUtils::IsAllowedNonCorsContentType(aValue));
}
@@ -261,10 +415,11 @@ InternalHeaders::IsImmutable(ErrorResult& aRv) const
}
bool
InternalHeaders::IsForbiddenRequestHeader(const nsACString& aName) const
InternalHeaders::IsForbiddenRequestHeader(const nsACString& aName,
const nsACString& aValue) const
{
return mGuard == HeadersGuardEnum::Request &&
nsContentUtils::IsForbiddenRequestHeader(aName);
nsContentUtils::IsForbiddenRequestHeader(aName, aValue);
}
bool
@@ -364,15 +519,16 @@ InternalHeaders::BasicHeaders(InternalHeaders* aHeaders)
// static
already_AddRefed<InternalHeaders>
InternalHeaders::CORSHeaders(InternalHeaders* aHeaders)
InternalHeaders::CORSHeaders(InternalHeaders* aHeaders, RequestCredentials aCredentialsMode)
{
RefPtr<InternalHeaders> cors = new InternalHeaders(aHeaders->mGuard);
ErrorResult result;
nsAutoCString acExposedNames;
aHeaders->GetFirst(NS_LITERAL_CSTRING("Access-Control-Expose-Headers"), acExposedNames, result);
aHeaders->Get(NS_LITERAL_CSTRING("Access-Control-Expose-Headers"), acExposedNames, result);
MOZ_ASSERT(!result.Failed());
bool allowAllHeaders = false;
AutoTArray<nsCString, 5> exposeNamesArray;
nsCCharSeparatedTokenizer exposeTokens(acExposedNames, ',');
while (exposeTokens.hasMoreTokens()) {
@@ -388,19 +544,27 @@ InternalHeaders::CORSHeaders(InternalHeaders* aHeaders)
break;
}
if (token.EqualsLiteral("*") &&
aCredentialsMode != RequestCredentials::Include) {
allowAllHeaders = true;
}
exposeNamesArray.AppendElement(token);
}
nsCaseInsensitiveCStringArrayComparator comp;
for (uint32_t i = 0; i < aHeaders->mList.Length(); ++i) {
const Entry& entry = aHeaders->mList[i];
if (entry.mName.EqualsASCII("cache-control") ||
entry.mName.EqualsASCII("content-language") ||
entry.mName.EqualsASCII("content-type") ||
entry.mName.EqualsASCII("expires") ||
entry.mName.EqualsASCII("last-modified") ||
entry.mName.EqualsASCII("pragma") ||
exposeNamesArray.Contains(entry.mName, comp)) {
if (allowAllHeaders) {
cors->Append(entry.mName, entry.mValue, result);
MOZ_ASSERT(!result.Failed());
} else if (entry.mName.EqualsASCII("cache-control") ||
entry.mName.EqualsASCII("content-language") ||
entry.mName.EqualsASCII("content-type") ||
entry.mName.EqualsASCII("expires") ||
entry.mName.EqualsASCII("last-modified") ||
entry.mName.EqualsASCII("pragma") ||
exposeNamesArray.Contains(entry.mName, comp)) {
cors->Append(entry.mName, entry.mValue, result);
MOZ_ASSERT(!result.Failed());
}
+19 -3
View File
@@ -8,6 +8,7 @@
// needed for HeadersGuardEnum.
#include "mozilla/dom/HeadersBinding.h"
#include "mozilla/dom/RequestBinding.h"
#include "mozilla/dom/UnionTypes.h"
#include "nsClassHashtable.h"
@@ -122,7 +123,8 @@ public:
BasicHeaders(InternalHeaders* aHeaders);
static already_AddRefed<InternalHeaders>
CORSHeaders(InternalHeaders* aHeaders);
CORSHeaders(InternalHeaders* aHeaders,
RequestCredentials mCredentialsMode = RequestCredentials::Omit);
void
GetEntries(nsTArray<InternalHeaders::Entry>& aEntries) const;
@@ -134,8 +136,11 @@ private:
static bool IsInvalidName(const nsACString& aName, ErrorResult& aRv);
static bool IsInvalidValue(const nsACString& aValue, ErrorResult& aRv);
bool IsValidHeaderValue(const nsCString& aLowerName,
const nsCString& aNormalizedValue, ErrorResult& aRv);
bool IsImmutable(ErrorResult& aRv) const;
bool IsForbiddenRequestHeader(const nsACString& aName) const;
bool IsForbiddenRequestHeader(const nsACString& aName,
const nsACString& aValue) const;
bool IsForbiddenRequestNoCorsHeader(const nsACString& aName) const;
bool IsForbiddenRequestNoCorsHeader(const nsACString& aName,
const nsACString& aValue) const;
@@ -154,11 +159,22 @@ private:
return IsInvalidName(aName, aRv) ||
IsInvalidValue(aValue, aRv) ||
IsImmutable(aRv) ||
IsForbiddenRequestHeader(aName) ||
IsForbiddenRequestHeader(aName, aValue) ||
IsForbiddenRequestNoCorsHeader(aName, aValue) ||
IsForbiddenResponseHeader(aName);
}
void RemovePrivilegedNoCorsRequestHeaders();
void GetInternal(const nsCString& aLowerName, nsACString& aValue,
ErrorResult& aRv) const;
bool DeleteInternal(const nsCString& aLowerName, ErrorResult& aRv);
static bool IsNoCorsSafelistedRequestHeaderName(const nsCString& aName);
static bool IsPrivilegedNoCorsRequestHeaderName(const nsCString& aName);
static bool IsSimpleHeader(const nsACString& aName,
const nsACString& aValue);
+5 -2
View File
@@ -17,12 +17,15 @@
namespace mozilla {
namespace dom {
InternalResponse::InternalResponse(uint16_t aStatus, const nsACString& aStatusText)
InternalResponse::InternalResponse(uint16_t aStatus,
const nsACString& aStatusText,
RequestCredentials aCredentialsMode)
: mType(ResponseType::Default)
, mStatus(aStatus)
, mStatusText(aStatusText)
, mHeaders(new InternalHeaders(HeadersGuardEnum::Response))
, mBodySize(UNKNOWN_BODY_SIZE)
, mCredentialsMode(aCredentialsMode)
{
}
@@ -183,7 +186,7 @@ InternalResponse::CORSResponse()
MOZ_ASSERT(!mWrappedResponse, "Can't CORSResponse a already wrapped response");
RefPtr<InternalResponse> cors = CreateIncompleteCopy();
cors->mType = ResponseType::Cors;
cors->mHeaders = InternalHeaders::CORSHeaders(Headers());
cors->mHeaders = InternalHeaders::CORSHeaders(Headers(), mCredentialsMode);
cors->mWrappedResponse = this;
return cors.forget();
}
+8 -2
View File
@@ -9,9 +9,10 @@
#include "nsIInputStream.h"
#include "nsISupportsImpl.h"
#include "mozilla/dom/InternalHeaders.h"
#include "mozilla/dom/RequestBinding.h"
#include "mozilla/dom/ResponseBinding.h"
#include "mozilla/dom/ChannelInfo.h"
#include "mozilla/dom/InternalHeaders.h"
#include "mozilla/UniquePtr.h"
namespace mozilla {
@@ -32,7 +33,9 @@ class InternalResponse final
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(InternalResponse)
InternalResponse(uint16_t aStatus, const nsACString& aStatusText);
InternalResponse(uint16_t aStatus,
const nsACString& aStatusText,
RequestCredentials aCredentialsMode = RequestCredentials::Omit);
static already_AddRefed<InternalResponse>
FromIPC(const IPCInternalResponse& aIPCResponse);
@@ -294,8 +297,11 @@ private:
RefPtr<InternalHeaders> mHeaders;
nsCOMPtr<nsIInputStream> mBody;
int64_t mBodySize;
RequestCredentials mCredentialsMode;
public:
static const int64_t UNKNOWN_BODY_SIZE = -1;
private:
ChannelInfo mChannelInfo;
UniquePtr<mozilla::ipc::PrincipalInfo> mPrincipalInfo;
+3 -6
View File
@@ -19,14 +19,9 @@ EXPORTS.mozilla.dom += [
]
UNIFIED_SOURCES += [
'ChannelInfo.cpp',
'Fetch.cpp',
'FetchConsumer.cpp',
'Request.cpp',
'Response.cpp',
]
SOURCES += [
'ChannelInfo.cpp',
'FetchDriver.cpp',
'FetchObserver.cpp',
'FetchUtil.cpp',
@@ -34,6 +29,8 @@ SOURCES += [
'InternalHeaders.cpp',
'InternalRequest.cpp',
'InternalResponse.cpp',
'Request.cpp',
'Response.cpp',
]
IPDL_SOURCES += [
+1 -1
View File
@@ -17,7 +17,7 @@ EXPORTS.mozilla.dom += [
'MutableFileBase.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'ActorsChild.cpp',
'ActorsParent.cpp',
'FileHandleBase.cpp',
-1
View File
@@ -9,7 +9,6 @@
#include "GetFilesTask.h"
#include "WorkerPrivate.h"
#include "nsCharSeparatedTokenizer.h"
#include "nsString.h"
#include "mozilla/dom/DirectoryBinding.h"
#include "mozilla/dom/FileSystemBase.h"
-1
View File
@@ -5,7 +5,6 @@
#include "mozilla/dom/FileSystemBase.h"
#include "nsCharSeparatedTokenizer.h"
#include "FileSystemUtils.h"
#include "OSFileSystem.h"
+1 -1
View File
@@ -18,7 +18,7 @@ EXPORTS.mozilla.dom += [
'OSFileSystem.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'Directory.cpp',
'FileSystemBase.cpp',
'FileSystemRequestParent.cpp',
+5 -5
View File
@@ -30,7 +30,7 @@ if CONFIG['MOZ_GAMEPAD']:
'ipc/GamepadTestChannelParent.h'
]
SOURCES = [
UNIFIED_SOURCES = [
'Gamepad.cpp',
'GamepadButton.cpp',
'GamepadManager.cpp',
@@ -45,19 +45,19 @@ if CONFIG['MOZ_GAMEPAD']:
]
if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
SOURCES += [
UNIFIED_SOURCES += [
'fallback/FallbackGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
SOURCES += [
UNIFIED_SOURCES += [
'cocoa/CocoaGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
SOURCES += [
UNIFIED_SOURCES += [
'windows/WindowsGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
SOURCES += [
UNIFIED_SOURCES += [
'linux/LinuxGamepad.cpp'
]
+1 -1
View File
@@ -12,7 +12,7 @@ SOURCES += [
'nsGeolocation.cpp',
]
SOURCES += [
UNIFIED_SOURCES += [
'MLSFallback.cpp',
'nsGeoPosition.cpp',
]
+1 -1
View File
@@ -15,7 +15,7 @@ EXPORTS.mozilla.dom += [
'GridTracks.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'Grid.cpp',
'GridArea.cpp',
'GridDimension.cpp',
+2 -1
View File
@@ -1721,7 +1721,8 @@ HTMLFormElement::GetActionURL(nsIURI** aActionURL,
// policy - do *not* consult default-src, see:
// http://www.w3.org/TR/CSP2/#directive-default-src
rv = csp->Permits(actionURL, nsIContentSecurityPolicy::FORM_ACTION_DIRECTIVE,
true, &permitsFormAction);
true /*aSpecific */, true /* aSendViolationReports */,
&permitsFormAction);
NS_ENSURE_SUCCESS(rv, rv);
if (!permitsFormAction) {
return NS_ERROR_CSP_FORM_ACTION_VIOLATION;
+4
View File
@@ -13,6 +13,10 @@
#include "nsIFrame.h"
#include "nsIFormControlFrame.h"
#if defined(MOZ_X11)
#include "X11UndefineNone.h"
#endif
NS_IMPL_NS_NEW_HTML_ELEMENT(OptGroup)
namespace mozilla {
+2 -1
View File
@@ -191,7 +191,8 @@ SetBaseURIUsingFirstBaseWithHref(nsIDocument* aDocument, nsIContent* aMustMatch)
// http://www.w3.org/TR/CSP2/#directive-default-src
bool cspPermitsBaseURI = true;
rv = csp->Permits(newBaseURI, nsIContentSecurityPolicy::BASE_URI_DIRECTIVE,
true, &cspPermitsBaseURI);
true /* aSpecific */, true /* aSendViolationReports */,
&cspPermitsBaseURI);
if (NS_FAILED(rv) || !cspPermitsBaseURI) {
newBaseURI = nullptr;
}
+6 -2
View File
@@ -120,7 +120,7 @@ EXPORTS.mozilla.dom += [
'ValidityState.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'HTMLAllCollection.cpp',
'HTMLAnchorElement.cpp',
'HTMLAreaElement.cpp',
@@ -203,7 +203,6 @@ SOURCES += [
'nsIConstraintValidation.cpp',
'nsRadioVisitor.cpp',
'nsTextEditorState.cpp',
'PluginDocument.cpp',
'RadioNodeList.cpp',
'TextTrackManager.cpp',
'TimeRanges.cpp',
@@ -211,6 +210,11 @@ SOURCES += [
'VideoDocument.cpp',
]
SOURCES += [
# Includes npapi.h.
'PluginDocument.cpp',
]
EXTRA_COMPONENTS += [
'htmlMenuBuilder.js',
'htmlMenuBuilder.manifest'
+1 -1
View File
@@ -44,7 +44,7 @@ EXPORTS.mozilla.dom.indexedDB += [
'SerializationHelpers.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'ActorsChild.cpp',
'FileInfo.cpp',
'FileSnapshot.cpp',
+1 -33
View File
@@ -49,7 +49,7 @@ interface nsIJSRAIIHelper;
interface nsIContentPermissionRequest;
interface nsIObserver;
[scriptable, uuid(7fcc7958-77d9-45ff-8c81-277bde5f0dc8)]
[scriptable, uuid(58e97ce9-1d9e-4576-aabf-89480fdeb16d)]
interface nsIDOMWindowUtils : nsISupports {
/**
@@ -1425,38 +1425,6 @@ interface nsIDOMWindowUtils : nsISupports {
*/
readonly attribute AString currentAudioBackend;
/**
* Record (and return) frame-intervals for frames which were presented
* between calling StartFrameTimeRecording and StopFrameTimeRecording.
*
* - Uses a cyclic buffer and serves concurrent consumers, so if Stop is called too late
* (elements were overwritten since Start), result is considered invalid and hence empty.
* - Buffer is capable of holding 10 seconds @ 60fps (or more if frames were less frequent).
* Can be changed (up to 1 hour) via pref: toolkit.framesRecording.bufferSize.
* - Note: the first frame-interval may be longer than expected because last frame
* might have been presented some time before calling StartFrameTimeRecording.
*/
/**
* Returns a handle which represents current recording start position.
*/
void startFrameTimeRecording([retval] out unsigned long startIndex);
/**
* Returns number of recorded frames since startIndex was issued,
* and allocates+populates 2 arraye with the recorded data.
* - Allocation is infallible. Should be released even if size is 0.
*/
void stopFrameTimeRecording(in unsigned long startIndex,
[optional] out unsigned long frameCount,
[retval, array, size_is(frameCount)] out float frameIntervals);
/**
* Signals that we're begining to tab switch. This is used by painting code to
* determine total tab switch time.
*/
void beginTabSwitch();
/**
* The DPI of the display
*/
@@ -252,9 +252,6 @@ interface nsIContentSecurityPolicy : nsISerializable
/**
* Checks if a specific directive permits loading of a URI.
*
* NOTE: Calls to this may trigger violation reports when queried, so the
* return value should not be cached.
*
* @param aURI
* The URI about to be loaded or used.
* @param aDir
@@ -266,11 +263,17 @@ interface nsIContentSecurityPolicy : nsISerializable
* "false" allows CSP to fall back to default-src. This function
* behaves the same for both values of canUseDefault when querying
* directives that don't fall-back.
* @param aSendViolationReports
* If `true` and the uri is not allowed then trigger violation reports.
* This should be `false` for caching or preloads.
* @return
* Whether or not the provided URI is allowed by CSP under the given
* directive. (block the pending operation if false).
*/
boolean permits(in nsIURI aURI, in CSPDirective aDir, in boolean aSpecific);
boolean permits(in nsIURI aURI,
in CSPDirective aDir,
in boolean aSpecific,
in boolean aSendViolationReports);
/**
* Delegate method called by the service when sub-elements of the protected
+1 -1
View File
@@ -160,7 +160,7 @@
#include "mozilla/dom/time/DateCacheCleaner.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "mozilla/widget/PuppetBidiKeyboard.h"
#include "mozilla/RemoteSpellCheckEngineChild.h"
#include "mozilla/mozSpellChecker.h"
#include "GMPServiceChild.h"
#include "gfxPlatform.h"
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
Loaded 100 of 6828 files, more files were not shown because too many files have changed in this diff. Show more