Compare commits

..
1786 Commits
Author SHA1 Message Date
Moonchild b6fae24296 [network] Refactor TransactionObserver::OnDataAvailable() 2023-09-27 21:55:28 +02:00
André Bargull 13c6b7422d [js] Handle dead wrappers 2023-09-27 21:55:19 +02:00
Moonchild 24f2e663cd Restore incorrect SIMD Op removals. 2023-09-25 10:48:42 +02:00
Brian Smith f96b155988 Issue #2313 - Implement WebAssembly sign extension opcodes. (uplift) 2023-09-25 10:46:25 +02:00
Brian Smith d5cc24e916 Issue #2308 & #1240 Follow-up - Fill in missing JSOP_INC/DEC cases for Doubles in Ion. 2023-09-20 03:34:06 +02:00
Brian Smith 8eba271c5f Issue #2308 & #1240 Follow-up - Replace JSOP_POS in ++/-- with JSOP_TONUMERIC.
https://bugzilla.mozilla.org/show_bug.cgi?id=1519135
2023-09-20 03:33:57 +02:00
Brian Smith 19955c82b3 Issue #2308 & #1240 Follow-up - Fill in missing JSOP_INC/DEC cases for Ion on Intel32/64. 2023-09-20 03:33:50 +02:00
Brian Smith 80ae8aec7c Issue #2308 & #1240 Follow-up - Add BigInt support to JSOP_INC and JSOP_DEC.
https://bugzilla.mozilla.org/show_bug.cgi?id=1526309
2023-09-20 03:33:41 +02:00
Brian Smith d8441d7c81 Issue #2308 & #1240 Follow-up - Introduce new increment and decrement operations.
https://bugzilla.mozilla.org/show_bug.cgi?id=1508521
2023-09-20 03:33:33 +02:00
Brian Smith c2446f2478 Issue #2308 - Fix JSON BigInt regressions.
https://bugzilla.mozilla.org/show_bug.cgi?id=1522433
2023-09-20 03:33:23 +02:00
Brian Smith 6efb7a1904 Issue #2282 - Performance observer safety checks.
Both fixes from later revisions, without the Dispatch API changes.
2023-09-20 03:33:14 +02:00
Brian Smith fa0b03a10f Issue #2026 Follow-up: Fill in missing BigInt64 cases in js::IsTypedArrayConstructor().
Hopefully fixes RSA errors on ProtonMail.
2023-09-20 03:32:41 +02:00
Moonchild 3ae2972950 Issue #2309 - Cherry-pick upstream libwebp fix.
Backport of: https://chromium.googlesource.com/webm/libwebp.git/+/2af26267cdfcb63a88e5c74a85927a12d6ca1d76

Resolves #2309
2023-09-13 10:22:50 +02:00
Moonchild 2d48de9998 Merge branch 'master' into release 2023-09-01 15:44:29 +02:00
Moonchild ee97a5dad4 [DOM] Follow-up: fix refcounting in FilePickerParent. 2023-09-01 09:54:03 +02:00
Moonchild 7a4b850150 [gfx] Check if we have a valid texture before trying to delete it. 2023-08-31 10:02:50 +02:00
Moonchild 7de2732e7f [DOM] Make IORunnable::mFilePickerParent into a RefPtr. 2023-08-30 19:30:17 +02:00
Moonchild f20e3f4dd1 [network] Hold a strong ref to mChannel in OpenConn 2023-08-30 18:59:32 +02:00
Moonchild ca691c8d2d [DOM] Deny web notifications if principal can't resolve. 2023-08-30 17:46:49 +02:00
Moonchild 226f97e2f4 [network] Add locking around access to WebSocketChannel::mPMCECompressor 2023-08-30 16:38:42 +02:00
Moonchild 7fdc866b5a [XPCOM] Add xll files to the executables list. 2023-08-30 12:48:43 +02:00
Moonchild e112df8849 Merge pull request 'Implement ergonomic brand check' (#2300) from martok/UXP-contrib:mr/ergo-brand-check into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2300
2023-08-30 09:36:31 +00:00
Moonchild 45ec6b3a86 Issue #2293 - Add preferences to disable CSS animation/transition props.
This resolves #2293
2023-08-30 10:52:52 +02:00
Martok 8b9d69f912 Issue #2298 - Support '#x in obj' ergonomic brand check syntax 2023-08-30 09:38:14 +02:00
Martok 92ecaaeaa9 Issue #2298 - Carry private-ness of names through ParseNodeHandler 2023-08-30 09:38:13 +02:00
Moonchild ac24db13ef Merge pull request 'Bug 1274518 - Add IPDL preprocessing support' (#2296) from mrnhmath/UXP:ipdlprep into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2296
2023-08-26 07:07:10 +00:00
Matheus MarinhoandKai-Zhen Li 8ac0957072 Bug 1274518 - Add IPDL preprocessing support
Co-authored-by: Kai-Zhen Li <seinlin.maung@gmail.com>
2023-08-25 17:18:15 -03:00
Moonchild 7178ca44ef Merge pull request 'Add --enable-irc and --enable-inspector to old.configure' (#2292) from mrnhmath/UXP:extflags into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2292
2023-08-19 05:05:16 +00:00
Matheus Marinho 178a43839d Add --enable-irc and --enable-inspector to old.configure 2023-08-18 23:23:51 -03:00
Moonchild da947c5045 Merge pull request 'Hunspell must be built into libxul on SunOS.' (#2291) from athenian200/UXP:sunos_hunspell_fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2291
2023-08-18 21:35:17 +00:00
athenian200 6d65f1d192 Issue #2290 - Hunspell must be built into libxul on SunOS. 2023-08-18 10:29:49 -05:00
Moonchild 4ddaf0f490 Merge pull request 'Implement Address Sanitizer for MSVC, Leak, Undefined Behavior and other debug fixes.' (#2288) from dbsoft/UXP:sanitize into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2288
2023-08-16 07:08:19 +00:00
Brian Smith ff81f4969c Issue #2266 - Part 2 - Add Leak and Undefined Behavior Sanitizer support.
Also fix building on FreeBSD and Linux, from the previous commit.
2023-08-14 23:40:46 -05:00
Brian Smith 369ba2e7d6 Issue #2266 - Part 1 - Allow MSVC and potentially GCC to use Address Sanitizer on Windows.
Check for WINNT instead of CLANG-CL, except for the Blacklist that isn't supported by MSVC.
Neither CLANG-CL nor MSVC require -fsanitize=address on the link phase.
2023-08-14 19:56:06 -05:00
Brian Smith a0fb8c06de Issue #2255 - Disable untested code path in Stopwatch.(h|cpp).
https://bugzilla.mozilla.org/show_bug.cgi?id=1325299
Multiprocessor support in Windows returned bogus times causing debug asserts.
This may or may not be related to the issue but found it trying to debug it.
2023-08-14 13:08:41 -05:00
Brian Smith d16b014115 No Issue - Fix building WebRTC/Basilisk with --enable-debug
A bogus MOZ_ASSERT was added at some point, this should make it work.
2023-08-14 13:06:15 -05:00
Moonchild 3bb0c18a59 Merge branch '2284-flexpercentage-work' 2023-08-14 10:34:09 +02:00
Moonchild 53b548e31a Issue #2284 - Adjust some in-content CSS to account for flex definite-sizing change.
As of this change, flex items in a vertical flex container will sometimes
be considered to have "indefinite" sizes, i.e. percent sizes in them will
no longer resolve.
To work around this, they need to provide a definite flex-basis (e.g. as
part of the "flex" shorthand property) if we want percent sizes to
resolve (instead of being treated as "auto") inside of them.
2023-08-13 22:09:27 +02:00
Moonchild 2a6187709b Issue #2284 - Update reftest for behaviour change.
I've verified this against Edge-latest.
2023-08-13 22:06:13 +02:00
Moonchild cd98dce5fa Issue #2284 - Add exception for flex/grid items resolving percentages against parent.
This folds in BZ bugs 1578586 and 1092007 part 2.
2023-08-13 22:04:54 +02:00
Moonchild 9bfeaab2e6 Merge pull request 'Fix RegEx GC crash' (#2287) from martok/UXP-contrib:mr/2172-regex-gc into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2287
2023-08-10 06:05:46 +00:00
Martok 3b32a66cb6 Issue #2172 - add null zone sanity checks 2023-08-09 22:41:30 +02:00
Martok edfb29e1a2 Issue #2172 - ensure pointers in RegExpShared are updated after GC compacting 2023-08-08 19:36:21 +02:00
Martok 41f38134f1 Issue #2172 - add missing RegExpShared TraceKind declaration 2023-08-08 19:36:13 +02:00
Moonchild 20ac6059ce Merge pull request 'Several low risk fixes and improvements' (#2286) from dbsoft/UXP:fixes into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2286
2023-08-07 07:36:53 +00:00
Brian Smith d9aa76f5c2 No Issue - Fix building with --enable-js-lto
Needed to include jscntxt.h due to de-unified building.
2023-08-06 23:22:09 -05:00
Brian Smith 9dda91e5cb Issue #2285 - Ensure we don't try to treat non-DOM-Node event targets as such,
https://bugzilla.mozilla.org/show_bug.cgi?id=1440809
Fix crash on https://beeper.notion.site
2023-08-06 22:35:51 -05:00
Brian Smith 39d52370dc Issue #2026 - Follow-up: Support Big(U)Int64Array in crypto.getRandomValues.
https://bugzilla.mozilla.org/show_bug.cgi?id=1718932
2023-08-06 22:28:22 -05:00
Moonchild 8b1222c5f8 Merge pull request 'Properly implement Performance Timeline Level 2 w3c spec.' (#2283) from dbsoft/UXP:perf-l2-2282 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2283
2023-08-06 14:21:18 +00:00
Brian Smith e748187360 Issue #2282 - - Properly implement Performance Timeline Level 2 w3c spec.
https://bugzilla.mozilla.org/show_bug.cgi?id=1539006
Do not throw from PerformanceObserver.observe when none of the entryTypes are known.
https://bugzilla.mozilla.org/show_bug.cgi?id=1403027
Implement PerformanceObserver::takeRecords().
https://bugzilla.mozilla.org/show_bug.cgi?id=1436692
"server" is not a valid PerformanceEntry type.
https://bugzilla.mozilla.org/show_bug.cgi?id=1463065
Fix a null ptr crash in PerformanceObserver::Observe.
https://bugzilla.mozilla.org/show_bug.cgi?id=1631346
2023-08-02 02:41:40 -05:00
Moonchild 13cca807e6 Merge pull request 'Implement Big(U)Int64Array and fill in some missing BigInt pieces.' (#2280) from dbsoft/UXP:bigint64-2026 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2280
2023-07-29 08:58:35 +00:00
Brian Smith 7f8ea9ae2f Issue #1240 - Follow-up: Add missing JSVAL_TYPE_BIGINT cases in JitFrames.cpp.
As pointed out by roytam1 during testing with Discord.
2023-07-28 19:57:55 -05:00
Brian Smith 1851f19271 Issue #1240 - Follow-up: Fix incorrect values in Number() constructor.
https://bugzilla.mozilla.org/show_bug.cgi?id=1466893
Our code base was using the return value to create the Number object.
However with the BigInt changes, it is no longer stored in rval, use args[0].
2023-07-28 19:55:53 -05:00
Brian Smith 3dc659b86d Issue #2026 - Part 4 - Fill in missing dense elements case and fix a comment.
https://bugzilla.mozilla.org/show_bug.cgi?id=1456569
Skipped this during the initial implementation, not sure when or if  this code path
is used, but I figure it should be there just in case.
Also fix debug builgs by removing an no longer valid MOZ_ASSERT.
2023-07-28 19:54:06 -05:00
Brian Smith 83daf83360 Merge branch 'bigint-devtools-test' of https://repo.palemoon.org/martok/UXP-contrib into bigint64-2026 2023-07-28 19:47:20 -05:00
Martok 5a7348a8d1 Issue #2026 - Part 3c - Add BigInt Devtools support. (new frontend) 2023-07-29 01:39:08 +02:00
Martok fa32034f30 Issue #2026 - Part 3b - Add BigInt Devtools support. (legacy frontend) 2023-07-28 23:35:59 +02:00
Brian Smith 56a82b8ed4 Issue #2026 - Part 3a - Add support for BigInt in devtools. (Server side)
https://bugzilla.mozilla.org/show_bug.cgi?id=1527867
2023-07-25 02:27:03 -05:00
Brian Smith 7a5b68c98e Issue #2026 - Part 2b - Format BigInts representable as int64_t without first converting them to strings.
https://bugzilla.mozilla.org/show_bug.cgi?id=1543677
2023-07-25 01:59:56 -05:00
Brian Smith 1edc4e41d3 Issue #2026 - Part 2a - Support BigInt in NumberFormat and toLocaleString.
https://bugzilla.mozilla.org/show_bug.cgi?id=1543677
2023-07-25 01:41:42 -05:00
Brian Smith edacbbd965 Issue #2026 - Part 1 - Implement BigInt64 and BigUint64Array.
https://bugzilla.mozilla.org/show_bug.cgi?id=1456569
2023-07-24 23:30:27 -05:00
Moonchild a3096d09f9 Update UXP/Goanna version now BigInt has landed. 2023-07-25 01:02:59 +02:00
Moonchild b4ddadd8b9 Merge pull request 'Add BigInt primitive type.' (#2276) from dbsoft/UXP:bigint-merged into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2276
2023-07-23 23:38:53 +00:00
Brian Smith f359533b82 Issue #1240 - Part 11 - Fix several issue reported on review.
Skip over block delimiters when parsing BigInt literals.
Update BigInt hashing to account for the possibility of moving GC.
https://bugzilla.mozilla.org/show_bug.cgi?id=1531018
Make HashableValue comparison of BigInts infallible.
https://bugzilla.mozilla.org/show_bug.cgi?id=1530406
Fix BigInt constructor API CallArgs usage.
https://bugzilla.mozilla.org/show_bug.cgi?id=1526279
2023-07-23 15:36:19 -05:00
Brian Smith 94609cf97b Issue #1240 - Part 10 - Implement minimal Ion support for BigInt.
https://bugzilla.mozilla.org/show_bug.cgi?id=1507484
Implement IC support for BigInt.
https://bugzilla.mozilla.org/show_bug.cgi?id=1522431
2023-07-21 20:25:52 -05:00
Brian Smith 6257513c7e Issue #1240 - Part 9 - Fix incorrectly parsing decimal BigInt 0n.
The decimal parser strips leading 0s, so prevent tokenbuf being empty.
2023-07-21 14:20:11 -05:00
Brian Smith 0587c85114 Issue #1240 - Part 8 - Fix incorrect asserts with debug enabled.
Fix BigInt errors in remainder operations
https://bugzilla.mozilla.org/show_bug.cgi?id=1524136
Also fix 2 debug asserts in fallthroughs due to missing BigInt cases.
2023-07-21 04:10:47 -05:00
Brian Smith f4c134225c Issue #1240 - Part 7 - Handle BigInt values in XPCVariant code.
https://bugzilla.mozilla.org/show_bug.cgi?id=1603055
2023-07-20 17:25:46 -05:00
Brian Smith 24e4a09270 Issue #1240 - Part 5g - Implement BigInt comparison operators.
Implement BigInt support for equality operators.
https://bugzilla.mozilla.org/show_bug.cgi?id=1486173 Part 3.
Implement BigInt support for relational comparison operators.
https://bugzilla.mozilla.org/show_bug.cgi?id=1492669
2023-07-19 17:10:33 -05:00
Brian Smith f193a4a7dc Issue #1240 - Part 6c - Implement asIntN and asUintN methods for BigInt values.
https://bugzilla.mozilla.org/show_bug.cgi?id=1501104
2023-07-19 16:39:34 -05:00
Brian Smith 2b198142f0 Issue #1240 - Part 6b - Use ToIndex when constructing TypedArray with length argument.
https://bugzilla.mozilla.org/show_bug.cgi?id=1317383 Part 2.
2023-07-19 16:36:58 -05:00
Brian Smith 700bead8ba Issue #1240 - Part 6a - Implement BigInt.prototype.toLocaleString.
https://bugzilla.mozilla.org/show_bug.cgi?id=1366287 Part 5.
2023-07-19 16:00:07 -05:00
Brian Smith f734e4f724 Issue #1240 - Part 5f - Add DataView methods for BigInt access.
https://bugzilla.mozilla.org/show_bug.cgi?id=1528582
2023-07-19 15:27:59 -05:00
Brian Smith 32acbcb96b Issue #1240 - Part 5e - BigInt bitwise operators.
https://bugzilla.mozilla.org/show_bug.cgi?id=1490387
2023-07-19 14:32:00 -05:00
Brian Smith 0da765e156 Issue #1240 - Part 5d - Use the radix when parsing BigInts.
Fixes Hex, Octal and Binary BigInt literal parsing.
Previously it was only parsing in decimal.
2023-07-19 03:02:35 -05:00
Brian Smith a816a6b6de Issue #1240 - Part 5c -Implement ToInt32OrBigInt operation.
https://bugzilla.mozilla.org/show_bug.cgi?id=1490387
2023-07-19 03:00:43 -05:00
Brian Smith 37e02a4bd4 Issue #1240 - Part 5b - BigInt support for basic arithmetic operations.
https://bugzilla.mozilla.org/show_bug.cgi?id=1471134 Parts 3-5.
2023-07-19 02:19:32 -05:00
Brian Smith 93a10f9e2f Issue #1240 - Part 5a - BigInt to Number conversion.
https://bugzilla.mozilla.org/show_bug.cgi?id=1466893
2023-07-19 02:17:04 -05:00
Brian Smith 94240c9002 Merge branch 'master' into bigint-merged 2023-07-18 20:25:54 -05:00
Brian Smith 069fa50258 Issue #1240 - Part 4 - Implement parser support for BigInt literals.
https://bugzilla.mozilla.org/show_bug.cgi?id=1505849
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1456568
Un-result-ified the BigInt XDR code, so we can enable it.
https://bugzilla.mozilla.org/show_bug.cgi?id=1419094
Uninitialised memory read with BigInt right-shift
https://bugzilla.mozilla.org/show_bug.cgi?id=1679003
2023-07-18 20:23:02 -05:00
Moonchild 7175868124 Merge pull request 'Fix intermittent crash on MacOS 14 Sonoma Beta 3.' (#2274) from dbsoft/UXP:sonomafix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2274
2023-07-17 18:38:50 +00:00
Brian Smith 8c25550baf No Issue - Fix intermitted crash on MacOS 14 Sonoma Beta 3.
Not sure why this is happening but mIOSurface is nullptr.
If we just skip binding, it will be created on the next call to BeginUpdate.
2023-07-17 02:01:35 -05:00
Moonchild 3b029cdfe4 Merge branch 'master' into release 2023-07-15 16:01:39 +02:00
Moonchild cd0c08484d Merge pull request 'Fix cloning of self-hosted functions' (#2273) from martok/UXP-contrib:mr/canon-names into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2273
2023-07-14 16:31:37 +00:00
Martok 3c37b8857d Issue #2271 - Use declared names of self-hosted functions for cloning
Ensure that cloning a self-hosted function always has access to the declared
name from the source and that it doesn't get lost on successive clones.
This is done by storing the declared name in an extended slot on rename, and
cloning it with the function.

Based-on: m-c 1546232
2023-07-13 13:57:43 +02:00
Martok 1eccb6f42a Issue #2271 - Separate cloning of native and interpreted functions
Separate code paths make it easier to follow and specialize than a single
one-size-fits-all function.

Based-on: m-c 1405766, 1411954
2023-07-13 13:57:42 +02:00
Brian Smith cb1aa7f456 Issue #1240 - Part 3c - Fast-forward to the V8 version of BigIntType.
Disabling some sections temporarily since the dependencies are not there yet.
Based on the following: https://bugzilla.mozilla.org/show_bug.cgi?id=1502797
https://bugzilla.mozilla.org/show_bug.cgi?id=1471134
https://bugzilla.mozilla.org/show_bug.cgi?id=1441098 Part 3 & 4
Add structured clone support for BigInt and Enable BigInt wrapping from DOM bindings.
https://bugzilla.mozilla.org/show_bug.cgi?id=1522738
2023-07-13 04:07:05 -05:00
Brian Smith 42cf583a57 Issue #1240 - Part 3b - Implement WrappingOperations.h for wraparound math operations & conversions.
https://bugzilla.mozilla.org/show_bug.cgi?id=1441657
Implement mozilla::WrappingMultiply.
Prerequisite for our V8 fast forward.
2023-07-13 03:27:12 -05:00
Brian Smith 3aeea5f9d0 Issue #1240 - Part 3a - Adjust mozilla::FloatingPoint<T>'s definition.
So only the barest details are specified for floating-point encodings,
with every other number, bit mask, &c. mathematically derived.
Also add a bunch of documentation comments.
https://bugzilla.mozilla.org/show_bug.cgi?id=1508725
Prerequisite for our V8 fast forward.
2023-07-13 03:02:29 -05:00
Brian Smith b2ae4d3885 Issue #1240 - Part 2 - Define the BigIntObject class for BigInt wrapper objects.
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1366287 Part 3.
In our Part 3 we will fast forward to the V8 implementation skipping GMP.
2023-07-13 02:40:25 -05:00
Brian Smith eb7a856c76 Issue #1240 - Part 1 - Define a new BigInt primitive type.
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1366287 Part 1.0.
However leaving out the --enable-bigint changes.
2023-07-13 01:59:24 -05:00
Moonchild 8e0e86face Merge pull request 'Further enhance Maybe<> and use it in the Performance API' (#2272) from dbsoft/UXP:maybe-2255-deux into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2272
2023-07-13 05:54:23 +00:00
Brian Smith 0980b1e936 Issue #2255 - Fix build bustage on Linux.
Need #include <utility> to ensure std::forward is available.
2023-07-12 17:52:59 -05:00
Brian Smith f0b08a209d Issue #2255 - Use Maybe<> in the Performance API. 2023-07-12 14:25:06 -05:00
Brian Smith 3284e449a7 Issue #2255 - Add support for Maybe<T&>
https://bugzilla.mozilla.org/show_bug.cgi?id=1620568
Make Maybe<T>::emplace() work when T is const
https://bugzilla.mozilla.org/show_bug.cgi?id=1335780
2023-07-12 14:24:28 -05:00
Moonchild 377625e539 Merge pull request 'Enhance Mac Packaging via mozconfig options and fix ARM Mac debug builds.' (#2269) from dbsoft/UXP:macbundle-2268 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2269
2023-07-11 15:53:23 +00:00
Brian Smith eae076209f Issue #2268 - Fix Mac packaging by making the individual parts configurable.
Add --with-macbundle-entitlement= to specify alternate entitlements or "none"
Add --with-macbundle-type=hybrid to use the old DMG format.
2023-07-07 17:46:55 -05:00
Brian Smith 7a2f114334 No Issue - Fix debug builds on ARM Mac.
mach_override used by the IO Poisoner used in debug mode is not support on ARM.
https://bugzilla.mozilla.org/show_bug.cgi?id=1658385
2023-07-07 17:38:09 -05:00
Moonchild ea9077a8a5 Merge branch 'master' into release 2023-07-07 19:41:06 +02:00
Moonchild af5dbfc120 [XPCOM] Win: Update executable extension list 2023-07-05 22:08:40 +02:00
Moonchild 3d87998c59 [DOM] Filter out symlinks for webkitdirectory.
This is effectively a back-out of the following patches from Bug 1274959
except we add comments and test coverage:

- Part 1 which made the DirectoryListingTask include symlinks in the
  results as exposed by Directory.getFilesAndDirectories.
- Part 3 which made GetFilesHelper include symlinks in the results.

Test coverage for getFilesAndDirectories is provided by
dom/filesystem/tests/test_basic.html by way of changes to its included
file dom/filesystem/tests/filesystem_commons.js and changes to the
createTreeFile helper in dom/filesystem/tests/script_fileList.js.
Test coverage for GetFilesHelper is provided by
dom/filesystem/tests/test_webkitdirectory.html and changes to the
createTestFile helper in dom/filesystem/tests/script_fileList.js.

Commenting out either of the `isLink` test in the relevant C++ code will
cause the given tests to fail on non-windows platforms.
2023-07-05 21:55:00 +02:00
Moonchild 6f46768035 [network] Prepare for requiring Authorization in CORS ACAH preflight
The Authorization header with a JSON Web Token (JWT) can be sent via
XMLHttpRequest without explicit authorization via Access-Control headers.
According to the spec, this must always explicitly be mentioned in ACAH
request headers and isn't allowed to be wildcarded. However, nobody
currently obeys this rule and many websites are misconfigured because
Chromium and Firefox always allowed it.

This patch adds the more stricter code but keeps it behind an #ifdef 0
to be released later on if and when there is enough consensus on the web
to obey this spec. This patch explicitly avoids the added complexity
Mozilla added to educate web devs since our role in that respect is not
significant. it's not preffed and it won't throw an explicit deprecation
warning.

See Mozilla bugs 1687364 and 1841019.
2023-07-05 19:27:03 +02:00
Moonchild b98ca4be18 Merge pull request 'Simplify and enhance Maybe and Some().' (#2267) from dbsoft/UXP:maybesome-update into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2267
2023-07-04 21:17:52 +00:00
Brian Smith d9c5b3bde5 Issue #2255 & #1240 - Simplify and enhance Maybe and Some().
https://bugzilla.mozilla.org/show_bug.cgi?id=1325351
This is a prerequisite for our BigInt V8 fast forward and potential #2255 fix.
2023-07-04 13:58:36 -05:00
Moonchild b3f6b7a224 [multiple] Update Intl tests. 2023-07-02 11:36:47 +02:00
Moonchild 05d58b4aa1 Issue #1656 - Follow-up: Re-nuke the vim lines introduced in #2265 2023-07-02 10:28:09 +02:00
Moonchild 90aaa1fdfb Merge pull request 'Intl API Updates' (#2265) from martok/UXP-contrib:intl-upgrades into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2265
2023-07-02 08:18:10 +00:00
Moonchild e40bea1e04 Merge pull request 'Improve incremental GC sweeping' (#2264) from gcsweep-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2264
2023-07-02 08:16:54 +00:00
Martok 569f23eb6a Issue #2046 - Implement Intl.DateTimeFormat's date-/timeStyle and hourCycle options
- remove mozExtensions flag and expose to client code

Based-on: m-c 1557718
2023-06-30 00:01:36 +02:00
Martok af47a256b5 Issue #1819 - Further align Intl.Locale to spec
- Reference updates (UTS 35)
- variant subtag and transform extension canonicalisation
2023-06-30 00:01:35 +02:00
Martok e96f965422 Issue #2259 - Performance improvements for LanguageTag parsing
- parsing: dont normalise things that don't need to be normalised anymore:
  extension, private-use, variant, language, script, and region subtags
- Add missing() and present() methods to LanguageSubtag
- Change mozilla::Range to mozilla::Span for slightly better code

Based-on: m-c 1592588
2023-06-30 00:01:35 +02:00
Martok 7c3aa6a8b6 Issue #2259 - Performance improvements in Locale
- Move BestAvailableLocale function to C++
- Move default locale computation to C++
- Add available-locales set to SharedIntlData
- Remove separate sets for DateFormat and NumberFormat available locales.

Based-on: m-c 1373089
2023-06-30 00:01:35 +02:00
Martok 1a9d6d6372 Issue #1819 - Implement Intl.Locale proposal
This is according to spec for the mozilla71 cycle, a follow-up will further adjust to spec.

- Add Intl.Locale as native C++
- Port Unicode BCP 47 locale identifier parser to C++
- Port language tag parser to C++
- adjust make_intl_data to generate the data

Based-on: m-c 1433303, 1570370
2023-06-30 00:01:35 +02:00
Martok 2f940bdc9d Issue #2259 - process Unicode langtags and locale identifiers according to BCP 47
Major spec change: text references are to BCP47 (not the implementing RFCs) and
the single source of truth is now Unicode CLDR.

- Switch from IANA to CLDR for make_unicode
- Update grandfathered tag handling directly in the parser
- Don't support extlang, irregular, privateuse or 4-letter subtags
- Adjust comments to refer to Unicode BCP 47 locale identifiers, remove RFC 5646
- Canonicalize/order langtags correctly
- Tokenize BCP47 in reusable class

Based-on: m-c 1407674(partial), 1451082, 1530320, 1522070, 1531091
2023-06-30 00:01:34 +02:00
Martok 6808e659ad Issue #2195 - Add support for hourCycle to Intl.DateTimeFormat
Based-on: m-c 1386146, 1430809
2023-06-30 00:01:34 +02:00
Martok 371ae1639a Issue #2259 - Improve ResolveLocale performance when initializing the default Intl objects
Based-on: m-c 1365650
2023-06-30 00:01:27 +02:00
Martok 33ec3d04f2 Issue #2259 - Support Unicode extensions with multiple value subtags in BCP47 language tags
Based-on: m-c 1321789
2023-06-30 00:01:18 +02:00
Martok f168e0afe9 Issue #2259 - Reimplement String.prototype.toLocale{Lower,Upper}Case per ECMAScript Intl specification
- Update make_unicode to output SpecialCasing
- Handle special casing
- Use realloc instead of malloc when resizing a newly created string buffer

Based-on: m-c 1318403, 1431957
2023-06-29 23:05:33 +02:00
Martok 9eb285a9fb Issue #2259 - Implement caseFirst option in Intl.Collator
Based-on: m-c 866473
2023-06-29 23:03:12 +02:00
Martok bbe3b8e12f Issue #2046 - Introduce mozIntl.DateTimeFormat with mozExtensions
Based-on: m-c 1329904
2023-06-29 23:02:37 +02:00
Martok 73c366766a Issue #2259 - Update Intl.* Object-ness to ECMA-402, 4th edition
- turn each Intl object into a NativeObject subclass
- create them as PlainObject
- ensure correct type is passed in self-hosted code
- implement legacy constructor semantics for DateTime&NumberFormat
- store internals on object slot instead of JS WeakMap

Based-on: m-c 1328386, 1332604
2023-06-29 23:02:11 +02:00
Martok 388733cd1d Issue #2259 - Introduce helper for self-hosted hasOwnProperty calls in intl 2023-06-29 22:27:29 +02:00
Martok 35f1a49cf2 Issue #2259 - Adjust self-hosted Array.prototype.sort to ES2018
The comparator to ArraySort must be optional also in self-hosted code, where calling the
implementation directly is generally faster than calling between JS and C++ multiple times.
2023-06-29 22:27:29 +02:00
Martok c2019fa28c Issue #2259 - Add JS::StackGCVector and JS::RootedVector
Based-on: m-c 1521732/{1,3}, 1527881
2023-06-29 22:27:29 +02:00
Martok bed754c21c Issue #2259 - Add mozilla::Result<V, E> and JS::Result<> for fallible return values
Based-on: m-c 1283562, 1277368/1, 1324828
2023-06-29 22:27:28 +02:00
Martok 85efbc0c1e Issue #2259 - Add mozilla::Vector -> mozilla::Span implicit conversion
Based-on: part of m-c 1578339
2023-06-29 22:27:18 +02:00
Martok 93bd7fc61e Issue #2259 - Add missing IsAscii* helper functions in mozilla/TextUtils.h 2023-06-29 22:18:07 +02:00
Martok 1ec5d757e6 Issue #1969 Follow-Up: Error reporting arguments in RelativeTimeFormat/DateTimeFormat 2023-06-29 22:18:07 +02:00
Moonchild 1a3f3da99d Fix debug builds 2023-06-28 19:54:07 +02:00
Moonchild b238bb079f Avoid TLS lookups when checking if zones need to be marked for GC.
This converts the fromPointer() calls to an object cast to (hopefully)
avoid the GC crashes. Logic is reversed from MustSkipMarking to
ShouldMark with appropriate renames.
2023-06-27 18:39:24 +02:00
Moonchild c3d4cec8ad Simplify incremental GC sweeping
Splitting several parts of `SweepPhase` into constituent parts to
separate out sweeping code from code that handles yielding to the
mutator and resuming.
2023-06-27 03:04:39 +02:00
Moonchild a666c05d68 Merge pull request 'Build UXP with C++14 by default' (#2263) from martok/UXP-contrib:build-cpp14 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2263
2023-06-26 09:36:27 +00:00
Martok 14836b0c17 Issue #2262 - Build with C++14 by default
Including infrastructure changes to ensure correct opts for future changes.

Based-on: m-c 1325632, 1418047, 1418573
2023-06-21 22:18:07 +02:00
Moonchild 30829b7a07 Merge pull request 'Remove support for "experiment" type extensions' (#2261) from FranklinDM/UXP-contrib:work_telemetry-remove-experiment-extensions into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2261
2023-06-20 09:31:08 +00:00
Moonchild 2fe6bb5c36 Merge pull request 'Follow-up: Print leaking class name and remove crash reporter dependency' (#2260) from FranklinDM/UXP-contrib:work_js-1691-followup-1 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2260
2023-06-20 09:30:39 +00:00
FranklinDM 773cbb1a3e Issue #21 - Follow-up: Remove experiment category images 2023-06-19 21:59:39 +08:00
FranklinDM 5f6b2407e7 Issue #21 - Part 3: Remove experiments localization
This also removes bits from about:support that weren't removed in bf6bb142fc.
2023-06-19 21:55:23 +08:00
FranklinDM adfb8133d1 Issue #21 - Part 2: Remove experiment extension assets and styling 2023-06-19 21:55:22 +08:00
FranklinDM 559d2ed26f Issue #21 - Part 1: Remove experiments base code from the Add-ons Manager
The experiments manager was already removed in bf6bb142fc and this was imported dead code from Tycho AM.
2023-06-19 21:55:21 +08:00
Moonchild 2004256c89 No issue - Update SQLite lib to 3.42.0 2023-06-19 15:34:01 +02:00
FranklinDM 32751e3d8f Issue #1691 - Follow-up: Print leaking class name and remove crash reporter dependency 2023-06-19 15:15:47 +08:00
Moonchild b4af6b6265 No issue - Set the default for incremental cycle collector to be off.
Negative performance impact if enabled.
2023-06-05 21:17:24 +02:00
Moonchild ae1d53ceb1 Issue #2257 - Remove rematerialized frames after bailouts and exceptions.
This ensures that rematerialized frames used by the devtools debugger
are properly removed so that no stale data is used during bailouts.
2023-06-05 21:17:13 +02:00
Brian Smith c3f4709d5e Issue #2252 - Prevent crash when attempting to load a script with execution disallowed.
This issue is due to the ExecutionContext added in Issue #1691 not handling GetScript()
in a context where script execution is not allowed.  This expressed itself in crashes when
playing MP4s with the NoScript extension installed and enabled.
2023-06-05 21:16:57 +02:00
FranklinDM a7bb3fc175 Issue #1592 - Follow-up: Ensure topmost scope marker is cleaned up 2023-06-05 21:16:43 +02:00
FranklinDM 6a0203f25f Issue #2250 - Part 2: Ignore the ancestor filter assertion if rule matching is restricted or if the current element is under a shadow host
This only affects debug builds.
2023-06-05 21:16:31 +02:00
FranklinDM b0dfcb147f Issue #2250 - Part 1: Return early if the element being tested for is likely an ancestor and does not have an assigned slot 2023-06-05 21:16:22 +02:00
Job Bautista 06fd4c9357 Issue #2221 - Follow-up: Simplify jit_ioncheck{1|2|3}_deunified_sources assignment. 2023-06-05 21:15:52 +02:00
Job Bautista b9ea7fd9ee Issue #2221 - Follow-up: Ensure jit_ioncheck{1|2|3}_deunified_sources is defined.
Should fix build bustage in armhf, as well as prevent bustage in mips32.
2023-06-05 21:15:33 +02:00
Moonchild c11311fd5b No issue - Set the default for incremental cycle collector to be off.
Negative performance impact if enabled.
2023-06-04 17:15:36 +02:00
Moonchild 4253a2a893 Issue #2257 - Remove rematerialized frames after bailouts and exceptions.
This ensures that rematerialized frames used by the devtools debugger
are properly removed so that no stale data is used during bailouts.
2023-06-01 18:45:35 +02:00
Moonchild 6e35a8566e Issue #2256 - Implement Object.hasOwn(object, property)
This is a convenience access function to hasOwnProperty.

Trivial, self-hosted implementation providing the interface to the
already existing hasOwnProperty cpp function with additional toObject
for spec compliance.

Resolves #2256
2023-05-29 22:47:26 +02:00
Moonchild 281a8854d0 Merge pull request 'Fix crashes and assertions involving ::slotted() and ancestor matching' (#2253) from FranklinDM/UXP-contrib:work_css-slotted-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2253
2023-05-23 13:32:31 +00:00
Moonchild 370e66ecce Merge pull request 'Prevent crash when attempting to load a script with execution disallowed.' (#2254) from dbsoft/UXP:noscript2252 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2254
2023-05-23 13:28:22 +00:00
Brian Smith beabbde706 Issue #2252 - Prevent crash when attempting to load a script with execution disallowed.
This issue is due to the ExecutionContext added in Issue #1691 not handling GetScript()
in a context where script execution is not allowed.  This expressed itself in crashes when
playing MP4s with the NoScript extension installed and enabled.
2023-05-21 07:55:37 -05:00
FranklinDM ac5101015f Issue #1592 - Follow-up: Ensure topmost scope marker is cleaned up 2023-05-21 19:01:42 +08:00
FranklinDM 0627dc7639 Issue #2250 - Part 2: Ignore the ancestor filter assertion if rule matching is restricted or if the current element is under a shadow host
This only affects debug builds.
2023-05-21 19:01:42 +08:00
FranklinDM c58f825821 Issue #2250 - Part 1: Return early if the element being tested for is likely an ancestor and does not have an assigned slot 2023-05-21 19:01:41 +08:00
Moonchild e4eb31879f Merge pull request 'Ensure jit_ioncheck{1|2|3}_deunified_sources in js/src/moz.build is defined.' (#2248) from jobbautista9/UXP:2221-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2248
2023-05-17 11:09:09 +00:00
Job Bautista 709d0bde73 Issue #2221 - Follow-up: Simplify jit_ioncheck{1|2|3}_deunified_sources assignment. 2023-05-17 19:02:53 +08:00
Moonchild 2a730d59f9 Merge pull request 'Implement Array find from last.' (#2247) from jobbautista9/UXP:array-findlast into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2247
2023-05-17 10:52:33 +00:00
Job Bautista 5ee57767e0 Issue #2221 - Follow-up: Ensure jit_ioncheck{1|2|3}_deunified_sources is defined.
Should fix build bustage in armhf, as well as prevent bustage in mips32.
2023-05-17 18:13:48 +08:00
Job Bautista 61d8ec5478 Issue #2246 - Implement Array find from last.
Based on the implementation from Mozilla bug 1704385.
2023-05-17 17:21:08 +08:00
Moonchild 3f09edfde0 Merge pull request 'Implement geometry .from* static constructors' (#2242) from jobbautista9/UXP:2241-fromrect-nodouble into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2242
2023-05-14 22:05:31 +00:00
Moonchild b116ab7a1e Merge pull request 'Implement partial support for calc-in-color' (#2244) from FranklinDM/UXP-contrib:work_css-hack-calc-in-color into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2244
2023-05-14 22:03:43 +00:00
FranklinDM ddf3f39070 Issue #1765 - Part 3: Provided token type should be used in LookForTokenType
I didn't realize this immediately after moving the code into a method. Oops.
2023-05-14 18:31:21 +08:00
FranklinDM e56b7b826d Issue #1765 - Part 2: Implement calc() parsing inside rgb/a() and the non-hue component of hsl/a()
This also adds a new helper method for checking the type of tokens that will be parsed after the current token, which is useful for determining the unit of values inside calc() functions.

Partially based on https://github.com/roytam1/UXP/commit/8a0897d23f5b51526f8a2c6ef63cb26968e6b985
2023-05-13 19:22:42 +08:00
FranklinDM 19650c6f8a Issue #1765 - Part 1: Move ReduceNumberCalcOps struct up higher, rename IsCSSTokenCalcFunction to CSSParserImpl::IsCalcFunctionToken 2023-05-13 19:22:42 +08:00
Job Bautista d2a86d81f3 Issue #2241 - Part 7.2 Follow-up: Fix build bustage due to unified building in Basilisk.
Tag #80
2023-05-12 19:04:16 +08:00
Job Bautista ccb51f2f40 Issue #2241 - Part 8: Remove non-working layout.css.DOM*.enabled prefs.
A follow-up to fdfe7a8245.
2023-05-12 16:28:57 +08:00
Job Bautista ecf05312e6 Issue #2241 - Part 7.2: Implement .fromRect and .fromQuad.
Backported from Mozilla bug 1558101.
2023-05-12 16:26:06 +08:00
Job Bautista c7ca649bd1 Issue #2241 - Part 7.1: Implement .fromFloat{32/64}Array.
Backported from Mozilla bug 1558101.
2023-05-12 16:26:06 +08:00
Job Bautista b2889d844f Issue #2241 - Part 6: Implement DOMMatrix.fromMatrix.
Also fixes .multiply() to use DOMMatrixInit.

Backported from Mozilla bug 1560462.
2023-05-12 16:26:06 +08:00
Job Bautista fdfe7a8245 Issue #2241 - Part 4&5 Follow-up: Fix WebIDL errors
Remove [Pref] attribute from Geometry interfaces as they're now exposed to web
workers too via Part 5.

Remove nonexistent toJSON objects erroneously added in Part 4.1.
2023-05-12 16:26:06 +08:00
Job Bautista 709c34a448 Issue #2241 - Part 5: Expose Geometry interfaces to web workers.
Exposes DOMMatrix, DOMPoint, DOMQuad, and DOMRect to workers.

Backported from Mozilla bug 1420580.
2023-05-12 16:26:05 +08:00
Job Bautista 0adb8cc71f Issue #2241 - Part 4.3: Move devtools over to getBounds().
This leaves getAdjustedQuads alone because it lives in its own world and its
result gets sent over IPC. That leaves things in a bit of an intermediate state,
but that should be OK for now.

Backported from Mozilla bug 1186265.
2023-05-12 16:26:05 +08:00
Job Bautista 286e18e40c Issue #2241 - Part 4.2: Resurrect DOMQuad.bounds, but deprecated.
This also forces DOMQuad.toJSON() to only return the points.

Backported from Mozilla bug 1186265.
2023-05-12 16:26:05 +08:00
Job Bautista 4c2a1920b8 Issue #2241 - Part 4.1: Get DOMPoint, DOMQuad, DOMRect, DOMMatrix a bit closer to spec.
Backported from Mozilla bug 1186265's part 1.
2023-05-12 16:26:05 +08:00
Job Bautista 29bdffbb54 Issue #2241 - Part 3: Extend DOMMatrixReadOnly to allow instantiation with a Matrix4x4.
Backported from Mozilla bug 1355675.
2023-05-12 16:26:05 +08:00
Job Bautista ef31c426b1 Issue #2241 - Part 2: Add SameValueZero implementation to mfbt/FloatingPoint.h
Backported from Mozilla bug 1560658.

This is to prevent duplication of code while implementing DOMMatrix operations.
2023-05-12 16:26:04 +08:00
Job Bautista 30b5a4d830 Issue #2241 - Part 1: Move {js::,JS_}{{Strictly,Loosely}Equal,SameValue} into their own header and implementation files
Backported from Mozilla bug 1516742.

The .from* methods are going to depend on SameValueZero, which needs to be
visible to /dom. This patch provides the foundation for that.
2023-05-12 16:26:04 +08:00
Moonchild 58308a5c7a Merge branch 'master' into release
# Conflicts:
#	python/mozbuild/mozpack/dmg.py
2023-05-11 17:35:14 +02:00
Moonchild aed983c97b No issue - block a few problematic DLLs. 2023-05-11 01:13:44 +02:00
Moonchild ab3e0ceef7 No issue - Disable ms-cxh and ms-cxh-full protocol handling. 2023-05-11 00:10:27 +02:00
Moonchild 0fcefb9d0a [widget] Rewrite data-read loop in OnDataAvailable.
The read-loop in OnDataAvailable was needlessly baroque and used a very
strange dialect of Hungarian notation. Factored out the zero-element
case for simplicity, and added justification in comments as-appropriate.
2023-05-10 23:15:23 +02:00
Moonchild 8666ce68fc No issue - Limit JPEG decoder memory allocation to surface cache size.
This means that for trivial images whose header specifies large
dimensions but with no image data, we don't waste a lot of memory.
See BZ bug 1277397
2023-05-10 22:50:22 +02:00
Moonchild f9f3dfd1ac Merge pull request 'Fix import.meta module error in lambdas by moving parseGoal() into SharedContext.' (#2238) from dbsoft/UXP:importmeta into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2238
2023-05-09 07:44:27 +00:00
Moonchild 8395e1f700 Merge pull request 'Updates to Mac packaging for notarization.' (#2239) from dbsoft/UXP:macentitlements into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2239
2023-05-09 07:36:08 +00:00
Brian Smith 688394928d No Issue - Updates to Mac packaging for notarization. Add Mac entitlements.
Switch to using "create" instead of "makehybrid" when creating the disk image.
This fixes bogus extended attributes which interfere with the code signature.
Finally add any -bin or dylibs in the Resources folder since --deep skips that folder.
2023-05-08 20:18:12 -05:00
Brian Smith 13536bf8c9 Issue #2236 - Fix import.meta module error in lambdas by moving parseGoal() into SharedContext.
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1604792
Also remove ParseGoal being passed through Parser introduced in #1691 Part 2.
2023-05-08 18:28:18 -05:00
Moonchild 2971cffab4 Merge pull request 'Create async function wrapper when instantiating module functions' (#2235) from FranklinDM/UXP-contrib:work_js-async-func-in-modules into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2235
2023-05-06 19:52:30 +00:00
FranklinDM ca10d0ad23 Issue #2234 - Part 3: Update tests
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1402649 and https://bugzilla.mozilla.org/show_bug.cgi?id=1382306
2023-05-07 01:01:23 +08:00
FranklinDM e381dd84c2 Issue #2234 - Part 2: Ensure that the created async function wrapper is valid
This excludes the GC-related changes (cell pointer asserts) since we don't have them. This bug should be revisited if we'd ever plan on porting those asserts over.

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1402649
2023-05-07 01:01:22 +08:00
FranklinDM 4b516daf13 Issue #2234 - Part 1: Create async function wrapper when instantiating module functions
This excludes the change that removes "excessive" rooting from the Lambda* methods in Interpreter.cpp.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1382306
2023-05-07 01:01:21 +08:00
Moonchild a928dac2f1 Merge pull request 'Parse exported async functions.' (#2233) from jobbautista9/UXP:2232-exportasync into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2233
2023-05-06 08:11:54 +00:00
Job Bautista 42f88e499d Issue #2232 - Parse exported async functions. 2023-05-06 15:32:59 +08:00
Moonchild 83edd9cfc6 Issue #1691 - Follow-up: Ship dynamic module imports enabled by default. 2023-05-05 16:07:21 +02:00
Moonchild 08a7bb2e70 Merge pull request 'Do not parse or return body for XHRs with HEAD/CONNECT method or content-length=0' (#2231) from martok/UXP-contrib:mr/xhr-parse-body into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2231
2023-05-05 13:55:17 +00:00
Moonchild e7e10ab287 Issue #1656 - Remove more vim control lines.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from accessible, [root], tools, uriloader, widget, xpcom and
xpfe.
Resolves #1656
2023-05-05 15:53:29 +02:00
Moonchild b9da018639 Issue #1656 - Remove more vim control lines.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from modules, netwerk, security, storage, testing, toolkit, and
a few scattered misc files. More to come.
2023-05-05 15:20:27 +02:00
Moonchild 5eab50c9f9 Issue #1656 - Remove more vim control lines.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from embedding, extensions, gfx, hal, ipc, layout, mailnews,
media and memory. More to come.
2023-05-04 22:06:35 +02:00
Martok 285cc24da6 No Issue - Do not parse or return body for XHRs with HEAD/CONNECT method or content-length=0
Based-on: m-c 1392220, 1437360
2023-05-04 21:03:16 +02:00
Moonchild 1e50ffb192 Issue #1656 - Remove more vim control lines.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from dom. More to come.
2023-05-04 03:33:25 +02:00
Moonchild ce594b49ca Issue #1656 - Remove more vim control lines.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from the rest of js, caps, chrome, config, devtools, docshell,
image, intl. More to come.
2023-05-03 22:09:21 +02:00
Moonchild 5d4f11bfaf Issue #1656 - remove vim control lines from js/src
With recent work a bunch more vim control lines were re-introduced.
This nukes them again.
2023-05-03 20:17:09 +02:00
Moonchild b30d6d72f7 Bump platform version. 2023-05-03 19:56:24 +02:00
Moonchild 127bf5784a Merge pull request 'JS: Implement Class Fields & Logical Assignment Operators' (#2224) from martok/UXP-contrib:mr/class-fields into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2224
Reviewed-by: Moonchild <moonchild@palemoon.org>
2023-05-03 17:29:59 +00:00
Moonchild 36ea7f9a5c Merge pull request 'Fix videojs and potentially other problems.' (#2228) from dbsoft/UXP:1691fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2228
2023-05-02 19:06:08 +00:00
Brian Smith c29f841bdc Issue #1691 - Follow-up: Fix videojs and potentially other problems.
When rewriting the ExecutionContext code in ScriptLoader I accidentally removed some required code.
2023-05-02 10:44:02 -05:00
Brian Smith 88c7d54975 No Issue - Fix FreeBSD build failure with WebRTC enabled. (release uplift)
Tag #2227
2023-05-01 22:12:11 +02:00
Timothy Valldeperas eadb5678b3 Issue #2175 - Fix build bustage in WebRTC. (release uplift)
Resolves #2227
2023-05-01 19:04:57 +02:00
Martok 63a00fdd25 Issue #2097 - Handle Logical Assignment in Ion CFG 2023-05-01 17:16:22 +02:00
Martok 3d38507c23 Issue #2097 - Implement logical assignment operators
Based-on: 1629106/1, 1684020
2023-05-01 17:16:22 +02:00
Martok 12626eeba3 Issue #2142 - Remove the temporary fields option
Now that everything is finished, we don't need the feature flag any more.
2023-05-01 17:16:21 +02:00
Martok 5e32190186 Issue #2142 - Implement class static block
Based-on: m-c 1712138/{2,3}, 1713155/2
2023-05-01 17:16:21 +02:00
Martok 7b74607f1f Issue #2142 - Track isFieldInitializer on JSScript instead of Scope
Introduce a FunctionSyntaxKind for FieldInitializer since special rules
(around `arguments`) apply. At the same time we can move the flag from the
scope to the JSScript. This is similar to how derived constructors are handled
and makes the initWithEnclosingScope code closer to initWithEnclosingContext.

This version is a bit more complex than Mozilla's due to different storage of
bit flags on JSScript.

Based-on: m-c 1636800
2023-05-01 17:16:21 +02:00
Martok 0f3f695117 Issue #2142 - Parse and process static class fields
Based-on: m-c 1535804/{6,7}
2023-05-01 17:16:21 +02:00
Martok 09956fe9e4 Issue #2142 - Support SuperProperty in field initializers
Based-on: m-c 1555037/2
2023-05-01 17:16:20 +02:00
Martok 3ceff0d994 Issue #2142 - Optimize .initializers scoping and emitter
* Refactor code for emitting the .initializers array into ClassEmitter
* Only emit .initializers scope when actually required
* Remove unfinished code to handle non-present class field initialisers
* Use predicate count_if and any_of of ListNode
* Remove unnecessary parameters for class field parsing

Based-on: m-c 1553744, 1555979, 1555037/1, 1535804/{1-5}
2023-05-01 17:16:20 +02:00
Martok fc82386ef5 Issue #2142 - Set anonymous function name in field initializer
This was done wildly different in m-c 1552875, in the interest of keeping
|setOrEmitSetFunName| around it is implemented differently here.
2023-05-01 17:16:20 +02:00
Martok 2c06165a59 Issue #2142 - Don't treat PNK_NAME specially emitAssignmentOrInit
If there ever was a point where this structure "avoids duplication", at least since the
*OpEmitter refactor emitting PNK_NAME differently makes it actually harder to follow.

Mozilla makes the same change at a different time.
2023-05-01 17:16:19 +02:00
Martok 445fd61891 Issue #2142 - Emit field keys in correct order
Based-on: m-c 1552229
2023-05-01 17:16:19 +02:00
Martok c1681ef614 Issue #2142 - Pass through arguments in synthesized constructors for derived classes
Based-on: m-c 1552022
2023-05-01 17:16:19 +02:00
Martok 7521dd33e7 Issue #2142 - Fix several scoping issues in field initializers
Based-on: m-c 1540789, 1547130, 1547467
2023-05-01 17:16:19 +02:00
Martok 98853c14d7 Issue #2142 - Restrict contents of direct eval in fields
Based-on: m-c 1542406
2023-05-01 17:16:18 +02:00
Martok e708a68921 Issue #2142 - Use JSOP_INITPROP for field initializers
We don't want to call setters for field initialization.

Based-on: m-c 1535471, 1547035
2023-05-01 17:16:18 +02:00
Martok b35fadd54c Issue #2142 - Implement ASI for fields
Based-on: m-c 1529772/{3,4}
2023-05-01 17:16:18 +02:00
Martok 0d3a394cad Issue #2142 - Factor out PropertyName parsing from Parser::propertyName()
Based-on: m-c 1529772/{1,2}
2023-05-01 17:16:18 +02:00
Martok f7935ec5b2 Issue #2142 - Handle fields in derived classes
* Don't name field initializer lambdas

Based-on: m-c 1534721, 1551454, 1542448
2023-05-01 17:16:18 +02:00
Martok b72b80ed58 Issue #2142 - Add FunctionEmitter, FunctionScriptEmitter, and FunctionParamsEmitter with current methods
Based-on: m-c 1473796/3, 1473796/4
2023-05-01 17:16:17 +02:00
Martok a3584bd6b9 Issue #2142 - Add PropertyEmitter, ObjectEmitter, ClassEmitter, LexicalScopeEmitter, DefaultEmitter
Based-on: m-c 1501577, 1521696, 1501578, 1473796/1
2023-05-01 17:16:17 +02:00
Martok 559bacdb66 Issue #2142 - Improve TokenPos handling in BCE
* Don't print bogus error locations on BCE internal errors
* Do not use TokenPos in BytecodeEmitter::{setFunctionBodyEndPos,setScriptStartOffsetIfUnset}

Based-on: m-c 1451826/1, 1530034, 1473796/2
2023-05-01 17:16:17 +02:00
Martok 3cbe292dc6 Issue #2142 - Implement syntax for public/private fields and computed field names
This state still has the initializers scoped on .initializers local variable, which will be changed later.

Based-on: m-c 1499448, 1530084, 1530832, 1529448 (partial), 1532921, 1528039, 1528038, 1535166, 1550628,
              1535166, 1550628, 1541641, 1547133, 1540787, 1535804/9
2023-05-01 17:16:17 +02:00
Moonchild 741ecee75a Merge pull request 'Implement Element.replaceChildren' (#2226) from FranklinDM/UXP-contrib:work_js-element-replacechildren into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2226
2023-05-01 14:17:52 +00:00
FranklinDM eb4d4475b0 Issue #2225 - Implement Element.replaceChildren
This accounts for refactoring changes (e.g. avoids RemoveChild*
changes).

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1626015
2023-05-01 21:05:38 +08:00
Martok 7647230e93 Issue #2142 - Add internal option for fields, but always true
This allows us to perform bisects on the following commits without causing runtime issues.

Based-on: m-c 1529758
2023-04-30 22:00:06 +02:00
Martok 6b36e0f3c0 Issue #2142 - Reduce calls to FindReservedWord when checking for forbidden identifiers during parsing
Based-on: m-c 1351913/{1,2}
2023-04-30 22:00:06 +02:00
Moonchild ed041c19c5 Merge pull request 'Replace deprecated Harfbuzz functions with current ones.' (#2223) from jobbautista9/UXP:1862-harfbuzz-deprecated-methods into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2223
2023-04-30 19:44:13 +00:00
Moonchild 40f2e813d4 Merge pull request 'Use link-time optimization for Spidermonkey in Windows by default, and fix a deprot in js/src' (#2222) from jobbautista9/UXP:ltcg-js into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2222
2023-04-30 19:40:46 +00:00
Moonchild 3ff018f32f Merge pull request 'Collected small changes' (#2214) from martok/UXP-contrib:mr/collect-1 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2214
2023-04-30 19:36:28 +00:00
Martok 6ab2fe9a69 Issue #2142 - Ensure 'await' is always a restricted identifier when parsing modules
Based-on: m-c 1356189
2023-04-30 20:56:24 +02:00
Martok 750a32d64d Issue #2142 - Add predicate functions count_if and any_of to ListNode iterator 2023-04-30 20:56:23 +02:00
Martok d4be309498 Issue #2142 - Change InitPropertyOperation to accept a PropertyName directy and use DefineDataProperty
Based-on: m-c 1413907, 1547129
2023-04-30 20:56:23 +02:00
Martok 196d6a6931 Issue #2142 - Extend newSuperCall for JSOP_SPREADSUPERCALL
Based-on: m-c 1537936
2023-04-30 20:56:23 +02:00
Martok a356af699f Issue #2142 - Fold BytecodeEmitter::checkTypeSet into BytecodeEmitter::emitCheck
The bytecode emitter used to call checkTypeSet for each JOF_TYPESET op. Despite
correctness asserts in the TypeScript code, this was pretty error prone.

The solution is to move this check to BytecodeEmitter::emitCheck (called for
each opcode we emit), so we don't have to worry about this anymore.

Based-on: m-c 1521491/3
2023-04-30 20:56:22 +02:00
Martok eebbd8cb00 Issue #1691 - Follow-up: use error message with no arguments for bad import statements 2023-04-30 20:55:40 +02:00
Job Bautista 4a2aae060f Issue #1862 - Follow-up: Replace deprecated Harfbuzz functions with current ones.
Based on Mozilla bug 1500356.
2023-04-30 21:20:06 +08:00
Job Bautista 9baae9a47e Issue #1691 - Follow-up: Fix CallSelfHostedFunction deprot introduced by Part 4. 2023-04-30 21:11:01 +08:00
Job Bautista 42e0b5db07 Issue #2221 - Enable link-time optimization for Spidermonkey by default if building it shared.
Currently only Windows can take advantage of this.

The reason why the arrays of deunified sources are named like that in
Spidermonkey's moz.build is to avoid UnsortedErrors in python. There's probably
a better way to handle that, but I just want something that works for now.

And yes, the deunified sources will be reunified if LTO is disabled.
2023-04-30 21:10:44 +08:00
Martok 311482507b Issue #1285 - Follow-up: Correctly handle follow-up compilations of RegExp with named capturing groups 2023-04-30 13:26:26 +02:00
Martok 9f246c4c74 Issue #1894 - Follow-up: Fix return value ordering in IonMonkey nullish coalescing 2023-04-30 13:26:26 +02:00
Martok 06222816f7 Issue #2173 - Follow-up: Use common ancestor of PNK_(OPT)DOT in ASTSerializer::expression 2023-04-30 13:26:26 +02:00
Martok c11d3892a5 Issue #2213 - Follow-up: Fix derieved Generator prototypes after previous change 2023-04-30 13:26:25 +02:00
Moonchild 4d4d8cfc9f Merge pull request 'Bug 1432272 - Make Fetch API use the global's base URL instead of the entry document's base URL' (#2217) from FranklinDM/UXP-contrib:work_js-bz-1432272 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2217
2023-04-30 10:55:21 +00:00
Moonchild ff537f4ffd Merge pull request 'Split hunspell library out of xul.' (#2212) from jobbautista9/UXP:shared-hunspell-nojs into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2212
2023-04-30 10:54:22 +00:00
Moonchild 78156cd0ca Merge pull request 'Follow-up: Use internal Move instead of std::move for consistency in SurfaceCache' (#2220) from FranklinDM/UXP-contrib:work_image-followup-move into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2220
2023-04-30 10:51:48 +00:00
Moonchild 732e1bb7f7 Merge pull request 'Implement Dynamic Module Import and its various dependencies.' (#2215) from dbsoft/UXP:d-m-i into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2215
2023-04-30 10:51:26 +00:00
Moonchild 22e68f166c Merge pull request 'Free ImageSurfaceCache outside of the SurfaceCache mutex lock' (#2219) from FranklinDM/UXP-contrib:work_image-free-imagesurfacecache-outside-lock into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2219
2023-04-30 10:51:00 +00:00
FranklinDM e821844e24 Issue #2073 - Follow-up: Use internal Move instead of std::move for consistency 2023-04-30 18:21:06 +08:00
FranklinDM 7251ed27ff Issue #2218 - Part 2: Make SurfaceCache free ImageSurfaceCache objects outside of the lock
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1389479
2023-04-30 18:17:29 +08:00
FranklinDM 608f037816 Issue #2218 - Part 1: Add nsExpirationTracker::NotifyEndTransaction(Locked) callbacks for subclasses to know when an aging iteration is complete
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1389479
2023-04-30 18:17:24 +08:00
Moonchild 1978ebd3b8 Merge pull request '[MailNews] Fix build bustage due to recent MIME API changes' (#2216) from FranklinDM/UXP-contrib:work_mail-fix-mime-api-bustage into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2216
2023-04-28 16:54:12 +00:00
FranklinDM 80a323d747 Bug 1432272 - Make Fetch API use the global's base URL instead of the entry document's base URL 2023-04-28 20:52:48 +08:00
FranklinDM 479561661e No issue - [MailNews] Fix build bustage due to recent MIME API changes 2023-04-28 20:23:29 +08:00
Brian Smith f7ee58a9e7 Issue #1691 - Part 16: Dynamically imported modules can throw any value as an exception.
https://bugzilla.mozilla.org/show_bug.cgi?id=1508672

(cherry picked from commit 910a37b53f1826a863cc3ab6eb61fc369f4505a0)
2023-04-27 13:35:48 -05:00
Brian Smith 32029813bb Issue #1691 - Part 15: Make |new import()| a syntax error.
https://bugzilla.mozilla.org/show_bug.cgi?id=1508672

(cherry picked from commit 45fda91268b6a3ca8471c8094f2d640ebad682f9)
2023-04-27 13:35:40 -05:00
Brian Smith 623b0dc624 Issue #1691 - Part 14: Fix a debug assert and memory leak.
PNK_IMPORT_META and PNK_CALL_IMPORT are binary nodes... They function similar
to list nodes, so they worked there, but debug mode asserts because of the wrong type.
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
Fixed a memory leak due to missing code in SourceScriptObject::finalize(). Thanks FranklinDM!

(cherry picked from commit 15e81193c692c2c2aec665e7e5a88d98a9b85eca)
2023-04-27 13:35:34 -05:00
Brian Smith b1ed742b2f Issue #1691 - Part 13: Remove MUST_MATCH_TOKEN* macros in Parser.
https://bugzilla.mozilla.org/show_bug.cgi?id=1501928
This was helpful in debugging one of the crashes, the macros made debugging a nightmare.

(cherry picked from commit 7bceec3f7dff086305c3f50939a8c830ca7f107b)
2023-04-27 13:35:28 -05:00
Brian Smith 1adf442e92 Issue #1691 - Part 12: Fix return value in ExecScript() and debug assert in ParseTask.
https://bugzilla.mozilla.org/show_bug.cgi?id=1331662
Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes.
ExecutionContext: The mRetValue is not used even though it is checked in various asserts.
This is how it is in the Mozilla code even years later, only the passed in value is used.
ParseTask: JoinDecode() and JoinCompile() run the same code but the type is different
causing a debug assert when it checks the type Script vs ScriptDecode.

(cherry picked from commit 8f577428b7834b7d0f0d5afacbe060fbb1ff2136)
2023-04-27 13:35:21 -05:00
Brian Smith 7b42bc809d Issue #1691 - Part 11: Fix incorrect reference counting in ModuleScript class.
(cherry picked from commit 4ef1fa98c9518f5c107424667229ddb6f9f97767)
2023-04-27 13:35:14 -05:00
Brian Smith 22d254b479 Issue #1691 - Part 10: Add and use method to annotate CC crashes with a class name.
https://bugzilla.mozilla.org/show_bug.cgi?id=1277260
Make PtrInfo into a class and mark it final.
Also fix an erroneous debug assert because mBaseURL not set in one code path.

(cherry picked from commit a1890054011adf0cf87be0d56047418c9f201420)
2023-04-27 13:35:07 -05:00
Brian Smith 30a6828f47 Issue #1691 - Part 9: Make import() work when the active script is in another document.
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
Associate event handler with active script when they are compiled.

(cherry picked from commit 1a3cc5d6828a05a6309d959fad3c7e959ab9eb8d)
2023-04-27 13:35:01 -05:00
Brian Smith 914299b8ba Issue #1691 - Part 8: Fix --enable-debug builds and continue dynamic module import changes.
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
Support import from timeout handlers by associating the initiating script with the compiled JSScript.
Fix error message that covers all import() failures that don't throw a JS exception.
https://bugzilla.mozilla.org/show_bug.cgi?id=1331662
Partial - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes.
Left EvaluateString() in nsXBLProtoImplField.cpp until ExecutionContext errors can be fixed.

(cherry picked from commit 22fcfc77971a9bb204df664c474681f4dcf54211)
2023-04-27 13:34:55 -05:00
Brian Smith e29f4488b1 Issue #1691 - Part 7f: Split up compile and execute so we can use ClassicScript.
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
Refactor nsJSUtils::ExecutionContext to separate compilation and execution steps and allow extraction of compiled JSScript.
https://bugzilla.mozilla.org/show_bug.cgi?id=1366773
Move buffer argument from JS::StartIncrementalEncoding to JS::FinishIncrementalEncoding.

(cherry picked from commit d4b520b08b958e116dfeeffdc61f3425610d1ce9)
2023-04-27 13:34:48 -05:00
Brian Smith 8431e52405 Issue #1691 - Part 7e: Dependencies for required to finish part 7d.
https://bugzilla.mozilla.org/show_bug.cgi?id=1331662
Reimplement EvaluateString using the ExecutionContext class.
https://bugzilla.mozilla.org/show_bug.cgi?id=1316078
Extract redudant code into StartOffThreadParseTask.
Use an ExclusiveContext instead of a JSContext in XDR functions.
Add a script decoder as a valid off-main-thread parse-task.
https://bugzilla.mozilla.org/show_bug.cgi?id=900784
Add nsJSUtils functions for encoding and decoding the bytecode.
https://bugzilla.mozilla.org/show_bug.cgi?id=1316081
Add XDRIncrementalEncoder to replace delazified LazyScript in the encoded XDR buffer.
Add an XDRIncrementalEncoder instance on the ScriptSource.
Expose a new JSAPI to incrementally encode bytecode when it is generated.
https://bugzilla.mozilla.org/show_bug.cgi?id=1334091
XDR function use the sourceObject instead of the enclosingScript as argument.

(cherry picked from commit d6de9a669f4b2f5115670bd771cd53d7cfb3956a)
2023-04-27 13:34:41 -05:00
Brian Smith 3a59f91dee Issue #1691 - Part 7d: Allow dynamic import in cases where there's no referencing script or module.
Support dynamic import from classic scripts by creating ClassicScript objects and associating them with the compiled.
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
This patch is incomplete, some code in ScriptLoader::EvaluateScript() could not be applied for missing dependencies.
Part 7e will apply the missing dependencies and finish the patch.

(cherry picked from commit ce31a906e801b72f06385b0755710317ccf3658b)
2023-04-27 13:34:33 -05:00
Brian Smith b84f08cf54 Issue #1691 - Part 7c: Refactor ModuleScript into ClassicScript class and LoadedScript base class so we can represent all scripts that can perform dynamic import.
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012

(cherry picked from commit c37b8b55231f6609c87e49c84edf7e94a1bf5518)
2023-04-27 13:34:27 -05:00
Brian Smith 1ddeac519b Issue #1691 - Part 7b: Make load request element optional.
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012

(cherry picked from commit 169bb5d2ada59026fb6407716a7b3862810c9b97)
2023-04-27 13:34:20 -05:00
Brian Smith 9fa3fc6315 Issue #1691 - Part 7a: Add a JS API to get the private value for the calling script or module.
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012

(cherry picked from commit e89e50d5047468e0bb02ee82f9cd0be282b24a1b)
2023-04-27 13:34:14 -05:00
Brian Smith c961285752 Issue #1691 - Part 6e: Fix problems due to divergent codebases. This gets basic dynamic import working.
Fix a problem in Part 5b where Mozilla used toGCThing() and we don't.
Fix a problem in Part 4 where runtime() returns nullptr in our codebase since it runs on JS Helper thread.
We need to get the runtime via runtimeFromAnyThread() instead.

(cherry picked from commit dddb46225bbd1adff11f635e32934aee36923e47)
2023-04-27 13:34:05 -05:00
Brian Smith a28f3edf2a Issue #1691 - Part 6d: Optimize handling of internally-created Promise objects.
https://bugzilla.mozilla.org/show_bug.cgi?id=1358879
The patch uses a different test: PROMISE_FLAG_DEFAULT_REJECT_FUNCTION which doesn't
exist in our codebase.  It was added in this bug, which appears to be partly complete:
https://bugzilla.mozilla.org/show_bug.cgi?id=1313049

(cherry picked from commit 97fc74b693813eaaa9ab833d9c51fc5868ff039f)
2023-04-27 13:33:56 -05:00
Brian Smith 6b69dad2aa Issue #1691 - Part 6c: Fix a few issues with the earlier commits.
Need PNK_CALL_IMPORT and PNK_IMPORT_META in the node children list or it will abort.
When porting ScriptFetchOptions support, I had 2 constructors, I picked the wrong one.
Missed adding the preference javascript.options.dynamicImport to all.js.

(cherry picked from commit b95ccb711dc41b343d02ae69b3dc4747bbbe86fb)
2023-04-27 13:33:47 -05:00
Brian Smith e4c920f397 Issue #1691 - Part 6b: Initial browser support for dynamic import from module scripts.
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
Factor out script fetch options from script load request classes.
https://bugzilla.mozilla.org/show_bug.cgi?id=1480720
Remove support for version parameter from script loader.
https://bugzilla.mozilla.org/show_bug.cgi?id=1428745

(cherry picked from commit 3ec2529aa6303f6950622e3cb91a23580649c73b)
2023-04-27 13:33:36 -05:00
Brian Smith 5f63601f0f Issue #1691 - Part 6a: Support private values which contain pointers to cycle-collected C++ objects
https://bugzilla.mozilla.org/show_bug.cgi?id=1342012

(cherry picked from commit 1286cca73d58332ba0becd0011f747713b8acfac)
2023-04-27 13:33:27 -05:00
Brian Smith 1a4146cead Issue #1691 - Part 5b: Stop modules from entraining the top-level JSScript.
https://bugzilla.mozilla.org/show_bug.cgi?id=1489477

(cherry picked from commit 6ce0af856186e65fb4987daf4e06dc68fb3f7483)
2023-04-27 13:33:17 -05:00
Brian Smith fdfe9a8ad2 Issue #1691 - Part 5: Don't pre-create module metadata object when compiling.
https://bugzilla.mozilla.org/show_bug.cgi?id=1489477

(cherry picked from commit d83bad49f6b03894548fbf85fc18ad7e8cc19a93)
2023-04-27 13:33:10 -05:00
Brian Smith 130d9f4d91 Issue #1691 - Part 4: Finish implementing call import.
https://bugzilla.mozilla.org/show_bug.cgi?id=1499140

(cherry picked from commit 7bf7d64887944b127a72090dd62eb57f67c5089d)
2023-04-27 13:33:00 -05:00
Brian Smith 6eecfad57c Issue #1691 - Part 3: Finish implementing import meta.
https://bugzilla.mozilla.org/show_bug.cgi?id=1427610

(cherry picked from commit a8625238ac846fb7eb103646ddb8634a5860f067)
2023-04-27 13:32:52 -05:00
Brian Smith 12291f8248 Issue #1691 - Part 2: Implement call import and import meta in the parser.
https://bugzilla.mozilla.org/show_bug.cgi?id=1427610
https://bugzilla.mozilla.org/show_bug.cgi?id=1484948

(cherry picked from commit 6be083187f49e444de1bb116bb5930b20125190b)
2023-04-27 13:32:43 -05:00
Brian Smith 7223fb518d Issue #1691 - Part 1: Provide a way of associating a private value with a script
or module.

This is a prerequisite for dynamic import

(cherry picked from commit 2e2972647ee29340df51a804f05e40fc1da2c89b)
2023-04-27 13:28:56 -05:00
Job Bautista ff9c52f223 Issue #1451 - Fix hunspell build bustage in FreeBSD.
Thanks to dbsoft for this patch!
2023-04-26 17:46:36 +08:00
Moonchild ba04f314c0 Merge pull request 'Place Skia back into gkmedias.' (#2211) from jobbautista9/UXP:61-skia-gkmedias into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2211
2023-04-25 15:07:35 +00:00
Moonchild dae88dede5 Merge pull request 'Correct handling of async (arrow) functions declared inside constructors' (#2213) from martok/UXP-contrib:mr/nested-async-assert into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2213
2023-04-25 15:06:18 +00:00
Martok dd512188ed No issue - Correct handling of async (arrow) functions declared inside constructors
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1462353, but since we still support
legacy generators, this only corrects the handling and leaves the newTarget plumbing
intact.
2023-04-23 23:02:00 +02:00
Job Bautista a12787e985 Issue #1451 - Split hunspell library out of xul.
utf_info.cxx imported from 1.4.1 upstream.

Also moved unicode_info struct to the header to fix bustage with compiling the
new utf_info.cxx.

I've also gone ahead and deunified this new shared library as unified building
is busting in hunspell.cxx, complaining about config.h not being found. Weird
that it only happens in unified mode.

This reduces libxul size on all platforms by ~200 KB.
2023-04-23 13:51:11 +08:00
Job Bautista 41944ab728 Issue #61 - Follow-up: Fix xul.dll link bustage related to Skia. 2023-04-20 20:05:39 +08:00
Job Bautista acb5f39d42 Issue #61 - Follow-up: Fix gkmedias.dll link bustage related to Skia.
I don't understand why SK_API is being a problem, but it seems they are.
2023-04-20 20:05:39 +08:00
Job Bautista a6f9c5fe3e Revert "Issue #61 - Place Skia in libxul"
This reverts commit 39cebe99e2.
2023-04-20 20:05:39 +08:00
Moonchild e2acdfd18d [No issue] Remove unmaintained WebGL conformance test suite. 2023-04-20 00:51:12 +02:00
Moonchild 54e3e60796 Revert "[devtools] Don't allow sourcemap URLs to redirect"
This reverts commit 2a05494abe.
2023-04-17 10:25:45 +02:00
Moonchild eb5c408991 Issue #2053 - Follow-up: Clear the performance entries buffer if full.
Also enlarged the buffer to 16k entries which should be enough for all
legitimate use of performance measurements (and then some).
This throws a quota exceeded error if sites want to record more entries
into the buffer and just clears it (similar to Moz's behaviour under
memory pressure) ready for fresh entries to be added again.
2023-04-13 17:22:41 +02:00
Moonchild 2a05494abe [devtools] Don't allow sourcemap URLs to redirect 2023-04-13 10:54:34 +02:00
Moonchild bc89e58def [network] Improve checks while parsing MIME parameters. 2023-04-13 10:54:27 +02:00
Moonchild 3a009b97f6 Issue #1911 - Follow-up: Filter out illegal characters in more locations. 2023-04-13 10:54:10 +02:00
Moonchild a105f6d5e9 No issue - Fix off-by-one of kLargeDatasetSize 2023-04-13 10:54:02 +02:00
Sandra 5db241c0c0 Increase size of data over which we write the data to disk rather than keep it around in memory 2023-04-13 10:53:53 +02:00
Sandra d38dca10e5 Use nsAnonymousTemporaryFile for clipboard cache
Base on https://github.com/mozilla/gecko-dev/commit/ecc04a9245b409d7eed7df63ba733cd2073180de
2023-04-13 10:53:14 +02:00
Moonchild 69868a9ad6 [devtools] Don't allow sourcemap URLs to redirect 2023-04-12 17:28:19 +02:00
Moonchild 3a6949f398 [network] Improve checks while parsing MIME parameters. 2023-04-12 16:41:04 +02:00
Moonchild dfa402aa98 Issue #1911 - Follow-up: Filter out illegal characters in more locations. 2023-04-12 15:08:37 +02:00
Moonchild c74cecc05c No issue - Fix off-by-one of kLargeDatasetSize 2023-04-12 12:08:35 +02:00
Moonchild 0ba7d1e988 Merge pull request 'Use nsAnonymousTemporaryFile for clipboard cache' (#2209) from _Sandra_/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2209
2023-04-12 10:03:14 +00:00
Sandra 9f22c3a7b9 Increase size of data over which we write the data to disk rather than keep it around in memory 2023-04-12 07:12:24 +03:00
Moonchild c2211e7ddc Issue #2053 - Follow-up: Re-enable navigation timing now it's to-spec.
Verified fixed with Google website translation.
2023-04-11 23:55:32 +02:00
Moonchild 2f258b259f Issue #2053 - Follow-up: Make the default ResourceTimingBufferSize larger
Contrary to setting no limit by default, we're giving it a reasonable
default size to prevent runaway memory usage when websites just keep
recording ad infinitum.
2023-04-11 23:38:10 +02:00
Moonchild c95e970df5 Merge pull request 'Update Performance API to User Timing L3' (#2208) from FranklinDM/UXP-contrib:work_js-user-timing-l3 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2208
2023-04-11 21:32:22 +00:00
_Sandra_ 558c26bbbf Merge pull request 'work_js-user-timing-l3' (#1) from FranklinDM/UXP-contrib:work_js-user-timing-l3 into master
Reviewed-on: https://repo.palemoon.org/_Sandra_/UXP/pulls/1
2023-04-11 16:16:48 +00:00
Sandra 1efbe485bb Use nsAnonymousTemporaryFile for clipboard cache
Base on https://github.com/mozilla/gecko-dev/commit/ecc04a9245b409d7eed7df63ba733cd2073180de
2023-04-11 11:58:51 +03:00
FranklinDM 9e976ddf7f Issue #2053 - Part 5: Throw a DOMException instead of a JS exception for some errors 2023-04-10 18:22:55 +08:00
FranklinDM ac1fd1133c Issue #2053 - Part 4b: Fix measure name to timestamp conversion
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1772417
2023-04-10 18:22:54 +08:00
FranklinDM 65203af3dc Issue #2053 - Part 4a: Align IsPerformanceTimingAttribute to user-timing spec
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1772417
2023-04-10 18:22:54 +08:00
FranklinDM 19a7544fdf Issue #2053 - Part 3: Update PerformanceMark to User Timing L3
There are a few minor differences between this and Mozilla's implementation:
(a) The type error messages were not hardcoded to the Performance class and were moved to Errors.msg or domerr.msg instead.
(b) Resist fingerprinting-pref changes were skipped.

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1724645
2023-04-10 18:22:53 +08:00
FranklinDM d4138780ee Issue #2053 - Part 2: Update PerformanceMeasure to User Timing L3
There are a few minor differences between this and Mozilla's implementation:
(a) The type error messages were not hardcoded to the Performance class and were moved to Errors.msg instead.
(b) PerformanceMeasureOptions is used directly and doesn't use the the Maybe<> container class. I haven't found the reason yet, but PerformanceMeasureOptions is disallowed from having a copy constructor and without that, it isn't possible to use it with Maybe<>... There doesn't seem to be any problem with using it directly, though.
(c) Resist fingerprinting-pref changes were skipped.

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1762482
2023-04-10 18:22:53 +08:00
FranklinDM 5fc711ba17 Issue #2053 - Part 1: Performance should be an EventTarget
Some sites (e.g. Bitbucket) are now calling `performance.addEventListener` and expect that Performance is an EventTarget.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1432522
2023-04-10 18:22:46 +08:00
Moonchild ff29aa37a8 Merge pull request 'Add support for libavcodec 60/FFmpeg 6.0' (#2204) from trav90/UXP-contrib:ffmpeg60 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2204
2023-04-09 13:47:20 +00:00
Moonchild bfeb62ceec Merge pull request 'Implement self.structuredClone()' (#2206) from FranklinDM/UXP-contrib:work_js-structuredclone into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2206
2023-04-09 13:44:46 +00:00
Moonchild b62bf0c4b7 Merge pull request 'Implement window.event' (#2207) from FranklinDM/UXP-contrib:work_js-window-event into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2207
2023-04-09 13:38:38 +00:00
FranklinDM 78e4526d55 Issue #595 - Implement window.event
This MSIE extension is still technically part of the standard*, although its use is discouraged. This API will also likely never go away based on some comments at this issue on MDN content**.

Note that this uses a different approach for getting the inner window.

* https://dom.spec.whatwg.org/#interface-window-extensions
** https://github.com/mdn/content/issues/21848

Spec PR: https://github.com/whatwg/dom/pull/407
Spec discussion: https://github.com/whatwg/dom/issues/334

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=218415
2023-04-08 00:20:48 +00:00
FranklinDM ae19a0513e Issue #2197 - Follow-up: Remove GC debug assertion on sandbox
There's no way to access GC from here.
2023-04-08 08:16:11 +08:00
FranklinDM c660c6f699 Issue #2197 - Part 4: Expose structuredClone in Sandbox
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1734320
2023-04-07 23:41:57 +08:00
FranklinDM 84af6181e7 Issue #2197 - Part 3: Implement self.structuredClone()
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1722576
2023-04-07 23:41:56 +08:00
FranklinDM 6d2e5850ce Issue #2197 - Part 2d: Implement PostMessageOptions for Window
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1502802
2023-04-07 23:41:56 +08:00
FranklinDM b3a6a8f274 Issue #2197 - Part 2c: Implement StructuredSerializeOptions for ServiceWorker
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1502802
2023-04-07 23:41:55 +08:00
FranklinDM 83501c86d2 Issue #2197 - Part 2b: Implement StructuredSerializeOptions for Worker
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1502802
2023-04-07 23:41:55 +08:00
FranklinDM 5c8599d223 Issue #2197 - Part 2a: Implement StructuredSerializeOptions for MessagePort
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1502802
2023-04-07 23:41:54 +08:00
FranklinDM 0206e87a2e Issue #2197 - Part 1b: Transferables should be arrays of objects
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1336020
2023-04-07 23:41:54 +08:00
FranklinDM 253c711a92 Issue #2197 - Part 1a: postMessages should have transferable as [] by default
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1336020
2023-04-07 23:41:48 +08:00
Moonchild c01fd8ec19 Merge pull request 'Move getElementsByName from HTMLDocument to nsIDocument' (#2201) from FranklinDM/UXP-contrib:work_dom-move-getelementsbyname-to-document into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2201
2023-04-07 15:41:23 +00:00
Moonchild a9c9fc184a Merge pull request 'No issue - Use inet_ntop() for converting IPv4 network addresses instead of the deprecated inet_ntoa()' (#2202) from FranklinDM/UXP-contrib:work_network-replace-deprecated-intet-ntoa into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2202
2023-04-07 15:38:34 +00:00
FranklinDM e35a3f19c7 Issue #252 - Follow-up: Include a null check against mDocument 2023-04-07 23:24:03 +08:00
trav90 717f059d1b Issue #2199 - Add support for libavcodec 60/FFmpeg 6.0 2023-04-07 09:59:19 -05:00
Moonchild dcdbf5d1da Merge pull request 'Follow-up: Silence compiler warnings for libjxl (MSVC)' (#2200) from FranklinDM/UXP-contrib:work_media-silence-jxl-msvc into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2200
2023-04-07 14:58:41 +00:00
Moonchild 4f166f3ddb Merge pull request 'Merge dom.getRootNode.enabled pref into dom.webcomponents.enabled.' (#2198) from jobbautista9/UXP:1361-rootnode-merge into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2198
2023-04-07 14:57:55 +00:00
FranklinDM 4cc241fb63 No issue - Use inet_ntop() for converting IPv4 network addresses instead of the deprecated inet_ntoa()
The original implementation opted to silence the warnings instead and use the deprecated inet_ntoa() as a Windows XP consideration (bug 1240932). Since we've removed support for that platform, it makes sense to use the modern inet_ntop() API instead.
2023-04-07 22:20:38 +08:00
FranklinDM c2b9a9e005 Issue #252 - Move getElementsByName from HTMLDocument to Document
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1415176
2023-04-07 22:08:20 +08:00
FranklinDM 80bd22fc35 Issue #2061 - Follow-up: Silence compiler warnings for libjxl (MSVC) 2023-04-07 21:59:19 +08:00
Job Bautista 8f602a52ee Issue #1361 - Follow-up: Merge dom.getRootNode.enabled pref into dom.webcomponents.enabled. 2023-04-07 20:16:46 +08:00
Moonchild 8e2788496d Merge pull request 'Update in-tree harfbuzz to 7.1.0, remove old fontconfig support on GTK systems, and cache ScaledFonts in gfxFont::GetScaledFont' (#2196) from jobbautista9/UXP:2191-cache-scaledfonts into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2196
2023-04-06 22:20:55 +00:00
Job Bautista 7fe1f000c7 Issue #2191 - Follow-up: Add missing mozilla::gfx in gfxFcPlatformFontList.cpp
Fixes build bustage in GNU/Linux
2023-04-05 21:22:18 +08:00
Job Bautista 5e50b32a3c Issue #2191 - Remove virtual from gfxFont::GetCairoScaledFont.
Backported from Mozilla bug 1385029.
2023-04-05 21:22:18 +08:00
Job Bautista 82bce1935f Issue #2191 - Require implementation of gfxFont::GetScaledFont and remove unnecessary gfxPlatform::GetScaledFontForFont.
Backported from Mozilla bug 1385029.
2023-04-05 21:22:18 +08:00
Job Bautista c85b510dbb Issue #2191 - Remove redundant CairoScaledFont accessor from gfxFont subclasses.
Backported from Mozilla bug 1385029.
2023-04-05 21:22:18 +08:00
Job Bautista 4af61863f3 Issue #2191 - Get rid of gfxFontconfigUtils.h since gfxFontconfigFontBase is unnecessary.
Backported from Mozilla bug 1385029.
2023-04-05 21:22:17 +08:00
Job Bautista b494419e91 Issue #2191 - Make ScaledFont::SetCairoScaledFont virtual so it can be accessed from outside Moz2D.
Backported from Mozilla bug 1385029.
2023-04-05 21:22:17 +08:00
Job Bautista 57ef40f783 Issue #2191 - Remove as much old fontconfig support as needed for Harfbuzz 7.1.0 update.
Based on Mozilla bugs 1119128, 1285533, and 1421964.

gfx.font_rendering.fontconfig.fontlist.enabled is no longer available.

gfxFontconfigUtils.h still exists, and will be removed in another commit. Just
need more research on bug 1385029.

Tag #1862
2023-04-05 21:22:17 +08:00
Job Bautista 3122de9547 Issue #1862 - Part 2: Update harfbuzz's build system for 7.1.0.
Harfbuzz upstream seems to have fixed all conflicts originally encountered
before 2.6.0, so let's unify all harfbuzz's sources.
Some parts of README-mozilla (now README-mcp) no longer apply, so update that as
well.
2023-04-05 21:22:17 +08:00
Job Bautista b137a3cff3 Issue #1862 - Part 1: Update harfbuzz source to 7.1.0. 2023-04-05 21:22:16 +08:00
Moonchild 186d4b7132 Merge pull request 'Fix FreeBSD build failure with WebRTC enabled.' (#2193) from dbsoft/UXP:freebsdwebrtc into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2193
2023-04-05 10:15:13 +00:00
Moonchild a85b4739e4 Merge pull request 'Fix build bustage with GCC 9 related to checkExportedNamesForDeclaration' (#2192) from jobbautista9/UXP:2189-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2192
2023-04-05 10:14:24 +00:00
Brian Smith dad82a67d6 No Issue - Fix FreeBSD build failure with WebRTC enabled. 2023-04-05 00:54:29 -05:00
Job Bautista 1359f67e56 PR #2189 - Follow-up: Fix build bustage with GCC 9 related to checkExportedNamesForDeclaration 2023-04-05 13:11:44 +08:00
Moonchild a68e524a90 Merge pull request 'JS: Parser Frontend Refactor' (#2189) from martok/UXP-contrib:mr/frontend-2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2189
2023-04-04 18:54:15 +00:00
Moonchild e354a428b7 Merge pull request 'Update freetype2 to 2.13.0.' (#2190) from jobbautista9/UXP:freetype2-2.13.0 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2190
2023-04-04 10:38:11 +00:00
Job Bautista 031f4f5504 Issue #1863 - Update freetype2 to 2.13.0. 2023-04-04 14:09:09 +08:00
Martok 98a18afe5b Issue #2173 - Introduce FunctionNode::syntaxKind instead of JSOPs
This moves some "implementation details" to later in the emitter,
and also keeps syntax information available for later use.

Based-on: 1518391/{3+4}
2023-04-03 16:50:25 +02:00
Martok 0c7e7591b7 Issue #2173 - Separate CodeNode into FunctionNode and ModuleNode
ModuleNode only has a body and FunctionNode has many more attributes,
and will get more in the following commit.

Based-on: 1518391/2
2023-04-03 16:50:24 +02:00
Martok c3617331a1 Issue #2173 - Remove unused case/code from function node ops
CodeNodes only ever use 3 JSOPs at this point in time.

Based-on: 1518391/1
2023-04-03 16:50:24 +02:00
Martok 3415e1d32d Issue #2173 - Allow constant folding to see inside functions when using the module pattern
(function() { ... })() IIFE pattern should get its body const-folded. This won't make much
runtime difference on JIT, but can be significant in interpreted code (and saves time for
JIT codegen).

Based-on: m-c 632020
2023-04-03 16:50:24 +02:00
Martok f687581b7f Issue #2173 - Fix remaining ParseNode* in FullParseHandler methods signature
The handlers should use the alias types exclusively in their interface.

Based-on: m-c 1479659/11
2023-04-03 16:50:24 +02:00
Martok 6d9f234c60 Issue #2173 - Add TryNode
This is adjusted from upstream to follow our data structure with PNK_CATCHLIST

Based-on: m-c 1479659/8
2023-04-03 16:50:23 +02:00
Martok 2067485b27 Issue #2173 - Add accessors to LexicalScopeNode
Based-on: m-c 1479659/7
2023-04-03 16:50:23 +02:00
Martok 9cd981b485 Issue #2173 - Add accessors to NullaryNode and change LoopControlStatement arity to PN_LOOP
Based-on: m-c 1479659/6
2023-04-03 16:50:23 +02:00
Martok 88f7cba9c9 Issue #2173 - Add accessors to NameNode, CodeNode, RegExpLiteral, and add NumericLiteral
Based-on: m-c 1479659/{5,9,10}, m-c 1491147
2023-04-03 16:50:23 +02:00
Martok 6cea01f811 Issue #2173 - Add accessors to UnaryNode and subclasses
Based-on: m-c 1479659/4
2023-04-03 16:50:22 +02:00
Martok 0fdd23e0b4 Issue #2173 - Add accessors to BinaryNode and subclasses
Based-on: m-c 1479659/3
2023-04-03 16:50:22 +02:00
Martok ad4b2ecefa Issue #2173 - Add accessors to TernaryNode
Based-on: m-c 1479659/2
2023-04-03 16:50:22 +02:00
Martok cc14ee0148 Issue #2173 - Add accessors to ListNode
Based-on: m-c 1479659/{1,12}
2023-04-03 16:50:22 +02:00
Martok 483420f253 Issue #2173 - Fix return value of MUST_MATCH_TOKEN* macros in Parser methods which returns bool
Based-on: m-c 1479659/0
2023-04-03 16:50:21 +02:00
Martok 4d76651ff2 Issue #2173 - Store the info about the existence of the default case into the switch ParseNode
Based-on: m-c 1477157
2023-04-03 16:50:21 +02:00
Martok 33d29efe43 Issue #2173 - Add a new PNK_PROPERTYNAME to hold location information about property access name
Based-on: m-c 1378808/2
2023-04-03 16:50:21 +02:00
Martok 416d9683fe Issue #2173 - Add a new PNK_ARGUMENTS node type for call argument lists
Also change PNK_GENEXP (not supported by upstream) to a PN_BINARY node

Based-on: m-c 1378808/1
2023-04-03 16:50:06 +02:00
Martok 3481496454 Issue #2173 - Fix exporting array and object binding patterns
Examples:
  export const [name1, name2] = [1, 2];
  export var {...name} = get;

Based-on: m-c 1446811, m-c 1462286
2023-04-03 15:33:21 +02:00
Martok 299090f227 Issue #2155 - Follow-up: Reorder super-property evaluation order per latest spec change
Fix regression from difference between Interpreter (old) and ElemOpEmitter (new). We don't have
any Ion/IC support for these ops.

Based-on: m-c 1472211
2023-04-03 14:52:45 +02:00
Moonchild 9d03184aa2 Merge pull request 'Also use xz compression for packaging FreeBSD builds.' (#2188) from jobbautista9/UXP:freebsd-xz into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2188
2023-04-03 09:40:47 +00:00
Job Bautista 7598e16eaa No issue - FreeBSD builds should also use xz compression for packaging.
Currently it defaults to bzip2, which has been obsolete for us.
2023-04-03 15:46:55 +08:00
Moonchild 54fc723126 Issue #2180 - Follow-up: Move sentinel check up a bit. 2023-04-02 15:39:05 +02:00
Moonchild 9b8ca17ee4 Issue #2180 - Add pref to control NSS TLS 1.3 protocol downgrade sentinel 2023-04-02 15:38:57 +02:00
Moonchild cddc95b39b Issue #2176 - Don't reconstruct the parent when tearing down
display:contents nodes with pseudo-elements.

We need to use StyleChildrenIterator which iterates over them, instead.
This is a bit of a hack but we can't always have our cake.

We need to be a bit careful though, since ::before and ::after are owned
by their own frame, and thus could be unbound from the tree or even dead
after removing the frame.

This basically ports bugs 1435566 and 1438467
2023-04-02 15:38:31 +02:00
Moonchild 5676529793 Issue #2171 - Skip over shadow nodes that don't have an owning node.
Resolves #2171
2023-04-02 15:37:44 +02:00
Moonchild 85f0301dd8 Merge pull request 'Fix debug build bustage with shared Spidermonkey.' (#2187) from jobbautista9/UXP:62-jsprincipals-debug-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2187
2023-04-02 13:36:39 +00:00
Job Bautista d3ed316788 Issue #62 - Follow-up: Fix debug build bustage with shared Spidermonkey.
A method marked with dllimport shouldn't be defined.
2023-04-02 12:47:04 +08:00
Moonchild 131409a24b Merge pull request 'Increase mozjemalloc page cache size from 1 MiB to 16 MiB.' (#2185) from jobbautista9/UXP:2184-mozjemalloc-12 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2185
2023-04-01 07:37:59 +00:00
Job Bautista 4a052de454 Issue #2184 - Increase mozjemalloc page cache size from 1 MiB to 16 MiB.
We don't need the reduced memory overhead as we are not using e10s. This
should speed up JS by a point according to Speedometer 2.1.
2023-04-01 10:42:03 +08:00
Moonchild c36eae9bf5 Merge pull request 'Add sys/auxv.h to system-headers' (#2183) from jobbautista9/UXP:2181-auxv into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2183
2023-03-30 09:40:57 +00:00
Job Bautista da09b1d972 Issue #2181 - Add sys/auxv.h to system-headers
This should fix getauxval being undefined when building highway on Linux ARM64.
2023-03-30 14:39:44 +08:00
Moonchild 93addf962f Merge pull request 'Fix drawing in titlebar on Mac when building with the Big Sur 11.0 SDK.' (#2182) from dbsoft/UXP:drawintitlebar into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2182
2023-03-29 20:32:48 +00:00
Brian Smith c09fb2cd97 No Issue - Fix drawing in titlebar on Mac when building with the Big Sur 11.0 SDK.
On Intel we build with the 10.12 SDK so this problem is avoided.
Also Pale Moon no longer supports drawing in the titlebar in the front end.
However Basilisk does and built for ARM the tabs were cut off by the native titlebar.
This uses the new APIs introduced in SDK 10.10 and 11.0 to draw in the titlebar.
2023-03-29 02:46:32 -05:00
Moonchild ad7ffc0525 Issue #2180 - Follow-up: Move sentinel check up a bit. 2023-03-28 17:59:19 +02:00
Moonchild 500ece900a Issue #2180 - Add pref to control NSS TLS 1.3 protocol downgrade sentinel 2023-03-28 15:13:09 +02:00
Moonchild f90106bd7e Merge pull request 'Refactor more BytecodeEmitters' (#2179) from martok/UXP-contrib:mr/bce-split2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2179
2023-03-27 14:10:07 +00:00
Moonchild 5a0b5b05da Merge pull request 'Issue #2175 - Fix build bustage in WebRTC.' (#2177) from tvall43/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2177
2023-03-27 14:08:41 +00:00
Moonchild 77692ac0bf Merge pull request 'Fix JS_SHARED_LIBRARY and always build Spidermonkey and ICU as shared lib in Windows.' (#2164) from jobbautista9/UXP:62-shared-mozjs into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2164
2023-03-27 14:07:14 +00:00
Martok 1a24ac966e Issue #2155 - Add SwitchEmitter
Based-on: m-c 1456006/{0,1}
2023-03-26 20:20:16 +02:00
Martok c26df1a48a Issue #2155 - Move TryEmitter and ForOfLoopControl to TryEmitter.{cpp.h} and ForOfLoopControl.{cpp.h}
Based-on: m-c 1460489/5
2023-03-26 20:20:16 +02:00
Martok 0a2eb24435 Issue #2155 - Move NestableControl classes except ForOfLoopControl to BytecodeControlStructures.{cpp.h}
Based-on: m-c 1460489/3
2023-03-26 20:20:15 +02:00
Martok 2e2855cf04 Issue #2155 - Split Nestable to ds/ and EmitterScope to EmitterScope.{cpp.h}
Based-on: m-c 1351107/17, m-c 1460489/2
2023-03-26 20:20:15 +02:00
Moonchild 73d78767c8 Merge pull request 'Don't reconstruct the parent when tearing down display:contents nodes' (#2178) from 2176 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2178
2023-03-26 18:06:09 +00:00
Timothy Valldeperas 5b6c6b98d2 Issue #2175 - Fix build bustage in WebRTC. 2023-03-26 01:16:13 -05:00
Job Bautista f23839412e Issue #62 - Always build Spidermonkey as shared lib in Windows.
Shared JS is confirmed working fine in Windows after a week of testing.
Non-Windows will have to wait unfortunately. The JS_SHARED_LIBRARY option is
kept for easy testing on those unsupported platforms.
2023-03-26 13:14:59 +08:00
Job Bautista 86b77f1284 Issue #2165 - Disable LNK4217 and LNK4286 warnings when linking ICU as they're too spammy. 2023-03-26 13:14:10 +08:00
Moonchild ecda3426e6 Issue #2176 - Don't reconstruct the parent when tearing down
display:contents nodes with pseudo-elements.

We need to use StyleChildrenIterator which iterates over them, instead.
This is a bit of a hack but we can't always have our cake.

We need to be a bit careful though, since ::before and ::after are owned
by their own frame, and thus could be unbound from the tree or even dead
after removing the frame.

This basically ports bugs 1435566 and 1438467
2023-03-26 00:15:45 +01:00
Moonchild eae71465d0 Merge pull request 'Don't discard event state mask when matching ::slotted() or :host arguments' (#2174) from FranklinDM/UXP-contrib:work_css-host-slotted-retain-event-states into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2174
2023-03-24 12:18:15 +00:00
Job Bautista 19b76a68ac Issue #324 - Follow-up: Remove more traces of *INTL_API.
The trace in Spidermonkey's old-configure is causing the MOZ_CONFIG_ICU function
to be called twice, which is not desirable as it can cause the MOZ_SHARED_ICU
check in build/autoconf/icu.m4 to fail and build an ICU data file even if we're
building ICU as a shared library.
2023-03-24 20:12:47 +08:00
FranklinDM 9365fbd8ad Issue #2135 - Don't discard event state mask when matching ::slotted() or :host arguments
This should fix issues with selectors like :host(:hover) that continue to be matched although the cursor is no longer hovering over those elements.
2023-03-24 19:39:30 +08:00
Job Bautista 431f782f17 Issue #2165 - Follow-up: Always build ICU as shared lib in Windows. 2023-03-24 17:51:39 +08:00
Job Bautista ee870812ff Revert "Issue #2165 - Follow-up: No longer support bundling the ICU data file into packaging, fold it into the ICU shared library, and always build ICU shared."
This reverts commit 0c63f5a273.
Building shared ICU is currently broken in non-Windows, so we need the option for now.
2023-03-24 17:45:16 +08:00
Moonchild 434379eb34 Issue #2161 - Ctrl + Enter should cause keypress event even though the
key combination doesn't input any character

Currently, we dispatch keypress event when Enter is pressed without
modifiers or only with the Shift key (line break).
However, other browsers dispatch keypress events for Ctrl + Enter also
even if it doesn't cause any text input.

So, we should fire keypress events for Ctrl + Enter, even in strict
keypress dispatching mode. Note that with other modifiers, it depends on
the browser and/or platform and we can't dispatch the event for
consistent behavior.

This means web developers shouldn't rely one keypress events to catch
Alt + Enter, Meta + Enter and two or more modifiers + Enter.

Based on BZ 1438133
Resolves #2161
2023-03-23 22:35:03 +01:00
Moonchild 2f3f8e13eb Merge branch 'css-slotted-pseudo-rebased' 2023-03-23 12:46:34 +01:00
FranklinDM ef7ff8da4b Issue #1592 - Follow-up: Don't post a restyle event if restyleElement is null
This fixes a potential crash caused if restyleElement is null.
2023-03-23 12:18:04 +01:00
FranklinDM 2733585a3f Issue #1592 - Part 10: Slot elements should restyle their parent on attribute changes 2023-03-23 12:18:04 +01:00
FranklinDM 039b67f6c6 Issue #1592 - Part 9: Post a restyle event after changing the slot of a slottable 2023-03-23 12:18:03 +01:00
FranklinDM c0e6ba933e Issue #1592 - Part 8: Test the assigned slot for type/class/ID/attribute instead of the slottable when matching ::slotted() 2023-03-23 12:18:02 +01:00
FranklinDM 4665c79582 Issue #1592 - Part 7: Slottables cannot be matched from the outer tree. 2023-03-23 12:18:02 +01:00
FranklinDM 7c82808510 Issue #1592 - Part 6: Allow pseudo-classes with a forgiving selector list argument to follow pseudo-elements
Pseudo-classes with a forgiving selector list argument are allowed to follow a pseudo-element, but must treat any selector that is not of the same type as invalid. It doesn't make any sense, but that's the behavior of other tainted browsers.
2023-03-23 12:18:01 +01:00
FranklinDM c5cb2983e6 Issue #1592 - Part 5: Use flattened element tree when looking for a parent while matching ::slotted() 2023-03-23 12:18:01 +01:00
FranklinDM 9c5999c8bc Issue #1592 - Part 4: Walk ::slotted()-containing rules for slottables
- Check against all selector parts and not the leftmost selector only for ::slotted()
- Walk rules for ::slotted() regardless if the shadow root is opened/closed
- Ensure that ::slotted() rules are walked in the right order
- Fix ::slotted inheritance from topmost shadow root
2023-03-23 12:18:00 +01:00
FranklinDM 8313fea7c5 Issue #1592 - Part 3: Ensure only tree-abiding pseudo-elements will follow ::slotted() 2023-03-23 12:17:59 +01:00
FranklinDM 5fc444a0b6 Issue #1592 - Part 2: Parse ::slotted() pseudo-element as if it were a pseudo-class
- Block slot elements from being matched by ::slotted
- Ensure ::slotted() is serialized as a pseudo-element
- Add pref to control whether the pseudo-class is enabled
2023-03-23 12:17:59 +01:00
FranklinDM d2be38e92b Issue #1592 - Part 1c: Pass SelectorParsingFlags as a reference 2023-03-23 12:17:58 +01:00
FranklinDM fc5d7a94b7 Issue #1592 - Part 1b: Move <slot> UA rule to html.css
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1468127
2023-03-23 12:17:58 +01:00
FranklinDM 8206716e8d Issue #1592 - Part 1a: Prevent crashing if a slot element was selected via DOM Inspector 2023-03-23 12:17:57 +01:00
Moonchild 376bae925b Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2023-03-23 01:57:44 +01:00
Moonchild 494ec06817 Merge pull request 'Follow-up: Fix :host matching from inside the shadow tree' (#2169) from FranklinDM/UXP-contrib:work_css-host-in-shadow-tree-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2169
2023-03-23 00:33:59 +00:00
FranklinDM ef8565458e Issue #2061 - Follow-up: Silence compiler warnings for libjxl 2023-03-23 01:12:42 +01:00
Moonchild 537a5d447e Issue #2171 - Skip over shadow nodes that don't have an owning node.
Resolves #2171
2023-03-23 00:29:13 +01:00
Moonchild da24537414 Merge pull request 'Port ByteCodeEmitter helper classes' (#2159) from martok/UXP-contrib:mr/bce-emitters into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2159
2023-03-22 16:20:08 +00:00
FranklinDM 9700f5557b Issue #1593 - Follow-up: Fix :host matching from inside the shadow tree
Previously, we'd match :host despite the element having a different shadow root from the one that we currently have. Also, there's a test where :host should be blocked from matching if it is a descendant of an explicit universal selector.
2023-03-20 20:15:13 +08:00
Job Bautista 0c63f5a273 Issue #2165 - Follow-up: No longer support bundling the ICU data file into packaging, fold it into the ICU shared library, and always build ICU shared.
This removes two variables in the build system: MOZ_ICU_DATA_ARCHIVE and
MOZ_SHARED_ICU.
Per discussion in PR #2164, it's now preferred to fold the ICU data into the new
shared library.
This effectively means --enable-shared-icu is no longer a thing. UXP apps must
update their packaging manifest to avoid breakage.
2023-03-19 10:55:00 +08:00
Moonchild ce68156cf4 Revert "[widget] Linux GTK3: Detach accessible from moz_container before it's deleted"
This reverts commit 465a18f342.
Resolves #2168
2023-03-18 19:57:56 +01:00
Moonchild 16baa04533 Revert "[widget] Linux GTK3: Detach accessible from moz_container before it's deleted"
This reverts commit 465a18f342.
Resolves #2168
2023-03-18 19:57:19 +01:00
Job Bautista eac3436960 Issue #2165 - Build ICU as a shared library if we're building Spidermonkey shared.
It seems that if we're going to enable JS_SHARED_LIBRARY, we need ICU to be a
shared library too in order to prevent code duplication in mozjs.dll bloating
it to a whopping 21 MB.
This unfortunately means we have to fold icudata back to icu itself. But since
icudata is still separated from libxul (which is what really matters for #1451),
I think this is a fair compromise.
Building ICU as shared is offered as an option via --enable-shared-icu. But
technically you really need --enable-shared-icu if you're going to use
--enable-shared-js. Unfortunately I can't make configure exit with an error if
MOZ_SHARED_ICU is not defined when JS_SHARED_LIBRARY is enabled, because options
are controlled by different configure scripts (icu is based on bash, while js is
based on python), and I have no idea how to pass MOZ_SHARED_ICU to js's
moz.configure.

Tag #62
2023-03-19 00:16:46 +08:00
Moonchild 09513970d8 Issue #2166 - Follow-up: Fix style nits. 2023-03-18 15:35:38 +01:00
Moonchild 1a19248860 Merge pull request 'Remove mozilla::AlignedStorage' (#2167) from FranklinDM/UXP-contrib:work_remove-aligned-storage into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2167
2023-03-18 14:24:31 +00:00
Moonchild 5032ad9593 Issue #2117 - Follow-up: Run precomplete cmd during package staging
We rely on this for all OSes except Mac where precomplete should not
be in the root (it uses Mozilla's fallback packaging that places it in
$RESPATH)
2023-03-17 22:11:30 +01:00
Moonchild df5696425e Issue #2117 - Follow-up: Run precomplete cmd during package staging
We rely on this for all OSes except Mac where precomplete should not
be in the root (it uses Mozilla's fallback packaging that places it in
$RESPATH)
2023-03-17 22:10:59 +01:00
FranklinDM d8a518b4db Issue #2166 - Part 6: Remove mozilla::AlignedStorage
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1341951
2023-03-17 20:29:23 +08:00
FranklinDM a343d564a6 Issue #2166 - Part 5c: Use override keyword for all virtual methods of Recover Instructions
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1341951
2023-03-17 20:29:22 +08:00
FranklinDM 5d6aca7e55 Issue #2166 - Part 5b: Replace RInstructionStorage copy by a cloneInto function on every RInstruction
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1341951
2023-03-17 20:29:22 +08:00
FranklinDM 705e2e17be Issue #2166 - Part 5a: Use alignas/alignof inside RInstructionStorage
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1341951
2023-03-17 20:29:21 +08:00
FranklinDM 53adec5e96 Issue #2166 - Part 4: Use alignas/alignof to define Variant's internal raw storage
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1338374
2023-03-17 20:29:20 +08:00
FranklinDM 88d2d5eef6 Issue #2166 - Part 3: Make tl::Min/Max variadic
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1338374
2023-03-17 20:29:19 +08:00
FranklinDM 5e6a0efb65 Issue #2166 - Part 2: Use alignas/alignof in MaybeOneOf
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1338374
2023-03-17 20:29:19 +08:00
FranklinDM 0c35e43441 Issue #2166 - Part 1: Use alignas/alignof for public JS::ProfilingFrameIterator's internal storage
... of a private wasm or JIT profiling frame iterator.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1338374
2023-03-17 20:29:18 +08:00
Moonchild b55f765f2e Issue #1911 - Follow-up: Filter out illegal file extensions also.
We already did this for file names, just not extensions.
2023-03-17 12:02:55 +01:00
Moonchild 856078d435 [widget] Linux GTK3: Detach accessible from moz_container before it's deleted 2023-03-17 12:02:46 +01:00
Moonchild c74c262d2f [GFX] Add some sanity checks and clamps to SurfaceData calculations. 2023-03-17 12:02:38 +01:00
Moonchild 787e29e374 No Issue - Ensure more OsiSpace
ensureOsiSpace(); was very much under-used. This adds more instances
where it makes sense to ensure Osi space before placing masm calls.
2023-03-17 12:02:31 +01:00
FranklinDM e439896c9b Issue #2148 - Shrink Vector from (usually) four pointers in size to three
when no inline storage is used.

See Bug 1338374
2023-03-17 12:02:20 +01:00
FranklinDM 15b508f1fb Issue #2148 - Make Vector not use AlignedStorage for its inline element storage
See Bug 1338374 1/2
2023-03-17 12:02:12 +01:00
Job Bautista 5651ebfc76 Issue #2148 - Discard RegExpShared data tables when discarding regexp JIT code.
Based on Mozilla bug 1378736's part 2.
Should fix the double-free.
Follow-up for #2083
2023-03-17 12:02:04 +01:00
Job Bautista 593bfc1ce8 Issue #2148 - Don't null out RegExpObject -> RegExpShared pointer on GC.
Follow-up for issue #2083.
Taken from Mozilla bug 1378736.
2023-03-17 12:01:50 +01:00
Moonchild 9477683481 Issue #1911 - Follow-up: Filter out illegal file extensions also.
We already did this for file names, just not extensions.
2023-03-16 17:14:07 +01:00
Moonchild 465a18f342 [widget] Linux GTK3: Detach accessible from moz_container before it's deleted 2023-03-16 16:49:56 +01:00
Moonchild 4435cfeeae [GFX] Add some sanity checks and clamps to SurfaceData calculations. 2023-03-16 14:39:31 +01:00
Moonchild 8577fab815 No Issue - Ensure more OsiSpace
ensureOsiSpace(); was very much under-used. This adds more instances
where it makes sense to ensure Osi space before placing masm calls.
2023-03-16 13:38:26 +01:00
Job Bautista 972e0410ca Issue #62 - Fix xul.dll link bustage related to JS::ubi::DominatorTree.
This is the one I don't understand how it fixed the bustage. Why is it needed
to remove JS_PUBLIC_API..? It would seem counter-intuitive, but it wasn't...
2023-03-16 14:02:16 +08:00
Job Bautista b805d9da66 Issue #62 - Fix xul.dll link bustage relating to JSErrorNotes. 2023-03-16 14:02:16 +08:00
Job Bautista 948268ffde Issue #62 - Fix xul.dll link bustage related to MovableCellHasher.
The unsafeSet method is based on Jon Coppeard's part 2 patch for Mozilla bug
1306008. This is needed because of the use of unsafeSet in rekey() of
MovableCellHasher<JS::Heap<T>>
2023-03-16 14:02:16 +08:00
Job Bautista bddc8b630c Issue #62 - Get --enable-shared-js and --enable-export-js working again, and fix link bustage related to ICU when doing shared lib 2023-03-16 14:02:16 +08:00
Brian Smith 28953cda7a Issue #2160 - Initial support for notarizing during DMG package.
Added --with-macbundle-idenity configure option to set a codesign identity.
If no identity is set or cross-compiling from Linux no codesigning will be
done. Currently doing a full deep bundle v2 sign, instead of limited v1.
2023-03-15 15:10:52 +01:00
FranklinDM 68f456b5fd Issue #2148 - Shrink Vector from (usually) four pointers in size to three
when no inline storage is used.

See Bug 1338374
2023-03-15 13:02:23 +01:00
FranklinDM 9475b959d7 Issue #2148 - Make Vector not use AlignedStorage for its inline element storage
See Bug 1338374 1/2
2023-03-15 13:01:21 +01:00
Job Bautista 17e261ae9b Issue #2148 - Discard RegExpShared data tables when discarding regexp JIT code.
Based on Mozilla bug 1378736's part 2.
Should fix the double-free.
Follow-up for #2083
2023-03-15 13:00:37 +01:00
Job Bautista 1122d6cba6 Issue #2148 - Don't null out RegExpObject -> RegExpShared pointer on GC.
Follow-up for issue #2083.
Taken from Mozilla bug 1378736.
2023-03-15 12:59:35 +01:00
Moonchild 79201ad741 Merge pull request 'Support for notarizing during DMG package.' (#2163) from dbsoft/UXP:macnotarize into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2163
2023-03-15 11:50:34 +00:00
Martok c3a35f75a2 Issue #2155 - Fix wrong assertion
(x) = function() {..} is an extremely sparsely documented way to prevent function name inference.
Modeled after how BytecodeEmitter::emitInitializer does it.
2023-03-15 10:29:12 +01:00
Martok 6bb4747ff3 Issue #2155 - Fix debug build 2023-03-14 23:28:13 +01:00
Brian Smith 26b3d4c151 Issue #2160 - Initial support for notarizing during DMG package.
Added --with-macbundle-idenity configure option to set a codesign identity.
If no identity is set or cross-compiling from Linux no codesigning will be
done. Currently doing a full deep bundle v2 sign, instead of limited v1.
2023-03-14 15:28:51 -05:00
Moonchild 31e7e7e66c Merge pull request 'Fix all deprot in builtin/intl' (#2162) from jobbautista9/UXP:deprot-hunt3 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2162
2023-03-14 16:30:59 +00:00
Job Bautista 396549c5ac Issue #2046 - Follow-up: Fix deprot in builtin/intl
Missing a couple of includes.
Tag #80
2023-03-14 22:39:27 +08:00
Moonchild 516f3f545d Merge branch 'master' into release
# Conflicts:
#	CLOBBER
#	js/src/vm/RegExpObject.cpp
#	security/nss/lib/nss/nss.h
#	security/nss/lib/pkcs12/p12d.c
#	security/nss/lib/softoken/softkver.h
#	security/nss/lib/util/nssutil.h
2023-03-13 13:11:20 +01:00
Martok 0f87c37c5d Issue #2155 - Remove now-unused functions 2023-03-13 00:37:54 +01:00
Martok 482ef6ac19 Issue #2155 - Fix BytecodeEmitter::emitArguments for our ParseNode tree
This resolves the differences in storage of call arguments between Mozilla's and our ParseNode tree.
2023-03-13 00:37:54 +01:00
Martok b26511f287 Issue #2155 - Add PropOpEmitter, ElemOpEmitter, NameOpEmitter, CallOrNewEmitter
Attn: this plain patch port still contains issues caused by differences in the
ParseNode tree that will be fixed in the following commits.

Based-on: m-c 1466000/{7-10}
2023-03-13 00:37:54 +01:00
Martok da908629c1 Issue #2155 - Refactor BytecodeEmitter in preparation for *Emitter work
This removed a bit of reduncancy and makes stack building easier to follow.

- Move call context handling from BytecodeEmitter::emitGetNameAtLocation to BytecodeEmitter::emitCalleeAndThis
- Add stack comments for prop and elem related methods in BytecodeEmitter
- Remove emitAtopOp with NameNode*
- Pass JSOp to BytecodeEmitter::emitAssignment (modified)
- Add BytecodeEmitter::emitGetFunctionThis variant with offset

Based-on: m-c 1466000/{2-6}
2023-03-13 00:37:53 +01:00
Martok 6a6777e73e Issue #2155 - Simplify BytecodeEmitter::isRestParameter 2023-03-13 00:37:53 +01:00
Martok c7dff3002f Issue #2155 - Split TDZCheckCache, IfEmitter/InternalIfEmitter, JumpList from BytecodeEmitter 2023-03-13 00:37:53 +01:00
FranklinDM 9f009467d8 No issue - Make content-type on JAR channels behave the same as HTTP channels
This ensures that the content type is also determined when opening JAR channels both synchronously and asynchronously. Current m-c modifies only the async portion, while the mentioned commit below modifies only the sync portion. This commit does it for both.

Partially based on 425677ada7 and bug 1757604.
2023-03-12 20:19:03 +01:00
Moonchild d3d61f478c Merge pull request 'Fix some deprots in js' (#2156) from jobbautista9/UXP:deprot-hunt2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2156
2023-03-12 16:49:59 +00:00
Moonchild 5ed6e2e676 Merge pull request 'Use pre-C++17 static_assert() by adding reason for assert.' (#2157) from dbsoft/UXP:fix_static_assert into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2157
2023-03-12 16:47:59 +00:00
Brian Smith 3089da7aeb No issue - Use pre-C++17 static_assert() by adding reason for assert.
This fixes warnings with clang and build failures with Visual C versions prior to 2022.
2023-03-12 09:20:15 -05:00
Job Bautista 26201f3795 Issue #80 - Move implementation of CPOWTimer::CPOWTimer to header.
Fixes link bustage in xul.dll
Inline functions must be implemented in the header.
2023-03-12 22:04:36 +08:00
Job Bautista 4ca103d1b8 Issue #80 - Fix deprot in js/xpconnect.
I think we never deunified js/xpconnect before. But if we're going to ever build
this tree deunified in the future, there's nothing stopping us now!
2023-03-12 20:26:26 +08:00
Job Bautista 1d594e9b3e Issue #80 - Fix deprot in js/ipc.
I think we never deunified js/ipc before. But if we're going to build this tree
deunified ever in the future, there's nothing stopping us now!
2023-03-12 20:26:26 +08:00
Job Bautista b29ef13cd6 Issue #2046 - Follow-up: Fix deprot in RelativeTimeFormat.
Found while building js/src deunified, with the exception of builtin/intl.
Tag #80.
2023-03-12 20:26:25 +08:00
Moonchild 16c5b95b91 Bump Goanna milestone to 6.1 2023-03-12 10:54:48 +01:00
Moonchild e848bea43f Merge pull request 'Modify :not() selector to accept a complex selector list' (#2151) from FranklinDM/UXP-contrib:work_css-not-selector-list-support into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2151
2023-03-11 17:57:09 +00:00
Moonchild 4c4bc3ca0f Merge pull request 'Destroy the host frame and restyle when there are content changes' (#2152) from FranklinDM/UXP-contrib:work_wc-content-change-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2152
2023-03-11 07:08:38 +00:00
Moonchild 014e4b6e7f Merge pull request 'Follow-up: Ensure empty selector lists aren't iterated when serialized' (#2154) from FranklinDM/UXP-contrib:work_css-empty-selector-list-serialization-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2154
2023-03-11 07:02:24 +00:00
FranklinDM ac589d72a2 Issue #2078 - Follow-up: Ensure empty selector lists aren't iterated when serialized
Really odd that this wasn't caught/doesn't cause any issues on MSVC/unoptimized GCC. Must've been luck, I guess.
2023-03-11 12:09:53 +08:00
FranklinDM 14746314c4 Issue #2135 - Destroy the host frame and restyle when there are content changes
This is likely inefficient, but I haven't found a way other than this to ensure that the host frame is updated if the inserted/removed content isn't slotted. I'm assuming that Firefox is handling this somewhere else (and may have been even moved to Stylo), but was mentioned in an m-c bug we haven't seen yet. In fact, this is actually similar to how we handled elements passed to ContentInserted before landing e31ed5b074.
2023-03-11 00:04:53 +08:00
FranklinDM 18c6aa0252 Issue #2137 - Part 4: Fix namespace regression 2023-03-10 19:14:26 +08:00
FranklinDM 40c9c92116 Issue #2137 - Part 3: Don't always use the internal pseudo-class for handling negations 2023-03-10 19:14:25 +08:00
FranklinDM e9a1859915 Issue #2137 - Part 2: Implement SelectorParsingFlags and use it to pass info around 2023-03-10 19:14:25 +08:00
FranklinDM de225cca0d Issue #2137 - Part 1: Modify :not() selector to accept a complex selector list 2023-03-10 19:14:24 +08:00
Moonchild 476dec2351 Issue #2135 - Follow-up: Check for aElement not being null
This was introduced to Make <link rel="stylesheet"> work in shadow trees.
eElement can, however, be `null` here and if so, it would crash.
2023-03-10 11:44:28 +01:00
Moonchild 1affd523ec Merge pull request 'Root the RegExpShared in RegExpMacroAssembler.' (#2150) from jobbautista9/UXP:2148-rootregexpshared into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2150
2023-03-09 09:02:10 +00:00
Job Bautista 21668cd7d3 Issue #2148 - Root the RegExpShared in RegExpMacroAssembler.
Based on Mozilla bug 1355050.
2023-03-09 14:52:14 +08:00
Moonchild 713ada0ccf Merge pull request 'Follow-up: Ensure document is not null in nsImageLoadingContent::BindToTree' (#2147) from FranklinDM/UXP-contrib:work_wc-image-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2147
2023-03-08 08:28:08 +00:00
FranklinDM a4e18703e9 Issue #2135 - Follow-up: Ensure document is not null in nsImageLoadingContent::BindToTree 2023-03-08 12:14:27 +08:00
Moonchild 9fafaedafb Issue #2146 - Remove nsChannelClassifier/nsIURIClassifier
Resolves #2146
2023-03-08 01:19:47 +01:00
Moonchild e923f5aacd Merge branch 'trackingprotection-cleanup' 2023-03-07 17:38:18 +01:00
Moonchild 3f7b0b7164 Issue #1693 - Follow-up: restore exported NSS symbols for mailnews.
This restores the erroneously-removed CMS* symbol exports, as well as a
few NSS functions that are likely to be used or have utility value in
applications.
2023-03-07 17:36:12 +01:00
Moonchild dd32c96ac6 Issue #2133 - Part 4: Remove TrackingProtection var in classifier. 2023-03-07 11:35:36 +01:00
Moonchild 71a3487554 Issue #2133 - Part 3: Remove TrackingProtection plumbing 2023-03-07 01:37:28 +01:00
Moonchild 517ab728ac Issue #2133 - Part 2: Remove nsIPrivateBrowsingTrackingProtectionWhitelist
This removes the in-memory whitelist for PB mode.
2023-03-07 00:01:58 +01:00
Moonchild 4d38cb76c2 Issue #2133 - Part 1: Remove private browsing TP pref.
This removes selectively enabling TP mode in PB windows.
2023-03-06 22:37:16 +01:00
Moonchild 98e96503e6 Issue #1693 - Follow-up: restore exported NSS symbol for debug builds.
Tag #1382
2023-03-06 15:18:25 +01:00
Moonchild a75c4164e1 Merge pull request 'Implement CSS env() Environment Variables' (#2144) from martok/UXP-contrib:mr/css-env2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2144
2023-03-06 10:56:05 +00:00
Martok 958b02c358 Issue #2143 - Implement CSS env() Environment Variables 2023-03-05 23:06:55 +01:00
Moonchild 5b9f0fd796 Merge pull request 'Implement CSS inset property' (#2140) from FranklinDM/UXP-contrib:work_css-inset-property into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2140
2023-03-05 21:55:21 +00:00
Moonchild 6cdb875cc5 Merge pull request 'Incremental WebComponents merge' (#2139) from FranklinDM/UXP-contrib:work_wc-incremental-1 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2139
2023-03-05 20:53:16 +00:00
FranklinDM f7e1c71930 Issue #2136 - Part 2: Regenerate devtools CSS database 2023-03-05 07:54:18 +08:00
FranklinDM 3e37869990 Issue #2136 - Part 1: Implement CSS inset property 2023-03-05 07:54:11 +08:00
FranklinDM ce47a81c57 Issue #2135 - Follow-up: Fix potential crash if shadow root is null 2023-03-05 07:41:07 +08:00
Moonchild e7cffa5316 Issue #2046 - correct debug assert for intl_FormatRelativeTime()
Probably fallout from the refactoring in #2109
Tag #1382
2023-03-04 20:42:22 +01:00
FranklinDM 50124e9ea6 Issue #2135 - Follow-up: Fix typo 2023-03-04 23:48:07 +08:00
FranklinDM d8befb4395 Issue #2135 - Follow-up: Fix crash for passing nullptr as an argument to the aNodesWithProperties parameter 2023-03-04 23:45:46 +08:00
Moonchild d38d687150 Merge pull request 'Update NSPR to 4.35 and NSS to 3.79.4' (#2138) from jobbautista9/UXP:1693-nss-nspr-3_79_4-update into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2138
2023-03-04 13:59:11 +00:00
FranklinDM cd76bf5aa1 Issue #2135 - Bug 1433669/Part 2: Flush the document instead of the shell in ContentEventHandler
* Unlike the original patch, I went with just getting a reference to the document rather than replacing mPresShell with mDocument.
2023-03-04 21:32:19 +08:00
FranklinDM 851e691089 Issue #2135 - Bug 1433669/Part 1: Remove dead function 2023-03-04 21:32:18 +08:00
FranklinDM 055ccba3c3 Issue #2135 - Bug 1419803: Use GetComposedDoc instead of GetUncomposedDoc in ContentEventHandler 2023-03-04 21:32:18 +08:00
FranklinDM 6cc4505e14 Issue #2135 - Bug 1425864: Ensure printing documents which have shadow DOM works 2023-03-04 21:32:17 +08:00
FranklinDM 8caa472402 Issue #2135 - Bug 1393806/Part 3: Change dom::ReparentWrapper to take an ErrorResult
* Bug 1393806 (Part 4) landed as part of Issue #1118.
* Account for ReparentWrappersInSubtree, introduced in 1466991
2023-03-04 21:32:17 +08:00
FranklinDM f9ee95f207 Issue #2135 - Bug 1393806/Part 2: Modify AdoptNodeIntoOwnerDoc to use the non-XPCOM version of document.AdoptNode
* Unlike the original patch, this does not remove the XPCOM version of Document.adoptNode/importNode to avoid breaking other applications that might be using those functions.
2023-03-04 21:32:16 +08:00
FranklinDM 88b54a8b67 Issue #2135 - Bug 1393806/Part 1: Change nsNodeUtils cloning/adopting stuff to use an ErrorResult for errors
This will allow us to propagate out more informative errors in some cases.
2023-03-04 21:32:16 +08:00
FranklinDM 744da8ddb3 Issue #2135 - Bug 1414692: Adopt shadow roots when adopting a shadow host across documents 2023-03-04 21:32:15 +08:00
FranklinDM 6a1b4a9e3a Issue #2135 - Bug 1329877: Optimize AncestorFilter usage in lazy frame construction 2023-03-04 21:32:15 +08:00
FranklinDM 7669ddb4b7 Issue #2135 - Bug 1518795: Properly track responsive content in a connected ShadowRoot 2023-03-04 21:32:14 +08:00
FranklinDM 8edbed3761 Issue #2135 - Implement sequential focus navigation for shadow DOM
This covers the following:
Bug 1413834	Implement sequential focus navigation regarding shadow DOM
> Bug 1430020	Let sequential focus navigation in shadow DOM enter iframes
> Bug 1430701	Handle focus navigation on frameless shadow hosts in light DOM
> Bug 1430692	Handle focus navigation on NAC in shadow DOM
> Bug 1453693	Ensure sequential focus navigation works in Shadow DOM and add some tests
> Bug 1466581	Handle sequential focus also in nested shadow DOM
> Bug 1481079	Shadow DOM hosts should be focusable
> Bug 1507101	Use StyleChildrenIterator instead of custom frame tree walking code to handle NAC inside shadow dom
> Bug 1512043	Ensure traverse all nodes owned by the top level shadow host
> Bug 1512457	Fix various cases that focus navigation doesn't work well with frameless shadow host
> Bug 1513141	Really minor nsFocusManager cleanup
> Bug 1519090	Keyboard focus is trapped inside <slot>
> Bug 1528034	Make IsHostOrSlot null-safe
> Bug 1544826	Wrong focus navigation behavior when the root element is a shadow root
>> Bug 1500273	Ensure backward focus navigation works in Shadow DOM
2023-03-04 21:32:14 +08:00
FranklinDM 125b8ae43c Issue #2135 - Bug 1455891/Part 1: Improve StyleChildrenIterator 2023-03-04 21:32:13 +08:00
FranklinDM 59dbe81c92 Issue #2135 - Bug 1410578: Make <link rel="stylesheet"> work in shadow trees 2023-03-04 21:32:13 +08:00
FranklinDM 00c570d27b Issue #2135 - Bug 1453789: Remove Element.createShadowRoot 2023-03-04 21:32:12 +08:00
FranklinDM 2fbefbbc58 Issue #2135 - Bug 1066965: Make contentEditable and spellchecking to work in Shadow DOM 2023-03-04 21:32:12 +08:00
FranklinDM 59b4e5ceb2 Issue #2135 - Bug 1356496: Don't use nsIDOM* in ConfirmSelectionInBody 2023-03-04 21:32:11 +08:00
FranklinDM 6ffdfa793e Issue #2135 - Bug 1430301: Implement ShadowRoot.elementFromPoint/elementsFromPoint 2023-03-04 21:32:11 +08:00
FranklinDM fb9484caa3 Issue #2135 - Bug 1438129: Remove ShadowRoot.applyAuthorStyles. 2023-03-04 21:32:10 +08:00
FranklinDM 4390724666 Issue #2135 - Bug 1323815: FocusEvent.relatedTarget should work consistently with MouseEvent.relatedTarget
* This incorporates changes from Bug 1413102.
2023-03-04 21:32:10 +08:00
FranklinDM a69e82b0d7 Issue #2135 - Bug 1413102 (Follow-up): Ignore current target because of shadow DOM retargeting
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1466581
2023-03-04 21:32:10 +08:00
FranklinDM 3d82baddf3 Issue #2135 - Bug 1413102: Ensure Shadow DOM boundaries are dealt properly in event handling
* RE: BasicEvents.h - our WidgetEvent is not movable (yet), so the change that requires that wasn't included.
* Parts of this use code that was introduced in bug 1427511. For now, they were replaced with their equivalents.
2023-03-04 21:32:09 +08:00
FranklinDM 60d420fe71 Issue #2135 - Bug 1430305: Implement ShadowRoot.fullscreenElement 2023-03-04 21:32:09 +08:00
FranklinDM 9e2c43705b Issue #2135 - Bug 1430303: Implement ShadowRoot.pointerLockElement 2023-03-04 21:32:08 +08:00
Job Bautista f0e4bf4035 Issue #1693 - Update old-configure and force clobber
NSS 3.79.4 and NSPR 4.35 upgrades require a clobber.
2023-03-04 13:58:00 +08:00
Job Bautista 1c811a1476 Issue #1693 - Update NSS symbols file for 3.79.4 upgrade
Based on latest SeaMonkey's security/nss.symbols, as well as some
unresolved external symbols I found myself.
2023-03-04 13:57:07 +08:00
Job Bautista 43c816cd19 Issue #1693 - Update NSS to 3.79.4 2023-03-04 13:13:49 +08:00
Job Bautista 409d3e66de Issue #1693 - Update NSPR to 4.35 2023-03-04 13:04:26 +08:00
Job Bautista c7aa6e40f6 Issue #1693 - Use scoped enums for IDBTransaction.
Based on a patch from Mozilla bug 1598164.
Needed due to identifier collision between NSS and IDBTransaction.

Co-authored by: Simon Giesecke <simon.giesecke@gmail.com>
Co-authored by: Matt A. Tobin <email@mattatobin.com>
2023-03-04 13:02:13 +08:00
Moonchild 8744033a34 Issue #1361 - Enable WebComponents' getRootNode by default.
Since we're enabling WebComponents, we should enable this too.
TODO: merge the two relevant prefs.
2023-03-01 23:49:34 +01:00
Moonchild 4b7f6babe3 Merge pull request 'CE define must upgrade elements in the shadow-including tree order' (#2134) from FranklinDM/UXP-contrib:work_wc-define-upgrade-in-shadow-including-tree-order into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2134
2023-02-28 08:32:23 +00:00
FranklinDM 059af6d121 Issue #1375 - Part 2: customElements.define must upgrade custom element in shadow-including tree order
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1326028
2023-02-28 07:48:27 +08:00
FranklinDM 9e2751484a Issue #1375 - Part 1: Allow moving a reference into nsInterfaceHashtable 2023-02-28 07:47:27 +08:00
Moonchild cd86d9ce3f No Issue - Remove speech recognition pref and enable TTS API by default.
Speech recognition was removed a while back. The pref is just leftover.
Having the TTS API available will provide some accessibility benefits
for users, so flip that on while we're here.
2023-02-28 00:42:11 +01:00
Moonchild 6da7d30e76 No Issue - Enable MSE for WebM on all platforms.
WebM is certainly mature enough to have hooked into MSE (default on
Linux and other for years now).
2023-02-28 00:40:26 +01:00
Moonchild 953a2eab75 Issue #1361 - Enable WebComponents by default in the platform. 2023-02-28 00:38:44 +01:00
Moonchild f3c063a868 Issue #2131 - Remove image.webp.enabled preference 2023-02-27 19:27:19 +01:00
Moonchild 41448d401d Merge pull request 'Remove shadow tree hacks in the frame constructor and use correct insertion point during reconstruction' (#2130) from FranklinDM/UXP-contrib:work_sdom-1404789 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2130
2023-02-27 09:20:32 +00:00
FranklinDM 679e53697c Issue #1375 - Follow-up: Get the insertion point right when reconstructing direct children of a shadow root
This should've been changed alongside bug 1404789 when it landed.
2023-02-27 13:15:43 +08:00
FranklinDM 047e44d5c7 Issue #1375 - Follow-up: Remove shadow tree hacks in the frame constructor
This should've been removed alongside bug 1404789 when it landed.
2023-02-27 13:15:37 +08:00
Moonchild eff173129a Merge branch 'full-range-video' 2023-02-26 21:15:12 +01:00
Moonchild a578a28dd8 Merge pull request 'RGB video playback' (#2125) from u3shit/UXP:gbrp-video into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2125
2023-02-26 20:14:03 +00:00
u3shit c64fe52b28 Issue #2101 - Part 7: Add color range support on GPUs 2023-02-26 19:42:14 +01:00
u3shit 338cbff242 Issue #2101 - Part 6: Plumbing of ColorRange between video decoders and YUV convert 2023-02-26 19:42:04 +01:00
u3shit c03bb68372 Issue #2101 - Part 5: Add ColorRange support to video decoders 2023-02-26 19:41:56 +01:00
u3shit e736dc2d34 Issue #2101 - Part 4: Add color range support to gfx/ycbcr
Loosely based on current mozilla code
https://hg.mozilla.org/mozilla-central/file/25a8668d92431d469b443f0f2030328bab754aea/gfx/ycbcr/yuv_convert.cpp
2023-02-26 19:41:47 +01:00
u3shit 8ed007c4e8 Issue #2101 - Part 3: Update libyuv
Updated to version 1861, git revision 88b050f337cc0ca2a51800fe7bf4737222c87344 from
https://chromium.googlesource.com/libyuv/libyuv/
2023-02-26 19:41:38 +01:00
u3shit 466b773179 Issue #2101 - Part 2: Use stdint.h types instead of uint8 and friends
Required for upcoming libyuv update
2023-02-26 19:41:30 +01:00
u3shit 092ff20c60 Issue #2101 - Part 1: Add mColorRange info to YCbCrBuffer
https://hg.mozilla.org/integration/autoland/rev/6f4c7904cda8
2023-02-26 19:41:20 +01:00
u3shit f6e1f851d0 Issue #2118 - Part 2: Add support for Identity YUVColorSpace
https://hg.mozilla.org/mozilla-central/rev/be342c90755d11551623362f2058c0326f63bbb3
2023-02-26 13:04:53 +01:00
u3shit 98fef024cd Issue #2118 - Part 1: Update gfxUtils YuvColorMatrix functions to match upstream mozilla code more closely.
https://hg.mozilla.org/mozilla-central/file/4fba5295dc19f9d2f5d065ba502a44d8f2dc9e85/gfx/thebes/gfxUtils.cpp#l1246
2023-02-26 13:04:53 +01:00
Moonchild c47d20f3f3 Merge pull request 'Fix HTML5 parser behavior when looking for custom elements' (#2129) from FranklinDM/UXP-contrib:work_wc-fix-parser-for-custom-elements into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2129
2023-02-26 10:20:48 +00:00
Moonchild 3e108a2c4e Merge pull request 'Fix :host selector matching' (#2128) from FranklinDM/UXP-contrib:work_css-fix-host-selector-matching into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2128
2023-02-26 10:16:24 +00:00
Moonchild e3275643e2 Merge pull request 'Remove assertion that GetPreEffectsVisualOverflowRect is called only by frames whose parent is an anonymous block' (#2127) from FranklinDM/UXP-contrib:work_css-remove-svg-frame-assertion into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2127
2023-02-26 10:14:07 +00:00
FranklinDM 6c2fef44cf Issue #1344 - (Parser: C++) Don't reset containsHyphen value after finding one 2023-02-26 16:19:09 +08:00
FranklinDM acbce95aa3 Issue #1344 - (Parser: Java) Don't reset containsHyphen value after finding one 2023-02-26 16:19:02 +08:00
FranklinDM 468a37eab8 Issue #1593 - Follow-up: Fix :host selector matching
Previously, we would match `:host` if:
(a) we don't have any arguments and our parent is the shadow root, or;
(b) if any of the arguments match, then reject if we don't have a containing shadow

Revised, we would match `:host` if:
(Preconditions) The element must have a shadow root, the selector must not have any feature selectors, and it is not blocked from matching `:host` (e.g. .matches outside of the shadow root context)
(a) The selector does not have any arguments, or;
(b) It matches any of its arguments in the functional part of the pseudo-class

With this, we now pass these tests that were previously failing:
http://wpt.live/css/css-scoping/css-scoping-shadow-host-rule.html
http://wpt.live/css/css-scoping/host-descendant-002.html
http://wpt.live/css/css-scoping/host-multiple-001.html
Improved (1 less red box):
http://wpt.live/css/css-scoping/css-scoping-shadow-host-namespace.html
2023-02-26 01:32:13 +08:00
FranklinDM 9d7d704523 Issue #1382 - Part 2: Add crash test
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=842114
2023-02-25 11:27:54 +08:00
FranklinDM a28ce48a16 Issue #1382 - Part 1: Remove assertion that GetPreEffectsVisualOverflowRect is called only by frames whose parent is an anonymous block
This is always hit if an SVG effect is applied on other frame types.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1340257
2023-02-25 11:27:53 +08:00
Moonchild 630e34a966 Merge pull request 'Cleanup Mac DMG packaging, better naming and remove extra precomplete file.' (#2123) from dbsoft/UXP:Mac2117 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2123
2023-02-24 13:33:54 +00:00
Moonchild fc408bf1e2 Merge pull request 'Propagate combinator restriction to :is()/:where()' (#2122) from FranklinDM/UXP-contrib:work_css-propagate-combinator-restriction into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2122
2023-02-23 09:40:56 +00:00
Moonchild 3a2adcff71 Merge pull request 'Move Has* function definition out of the header file for consistency' (#2121) from FranklinDM/UXP-contrib:work_css-pseudoclass-funcdef-move into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2121
2023-02-23 09:19:20 +00:00
Moonchild dabadd700c Issue #2046 - Follow-up: Fix debug assert using old chars definition. 2023-02-22 22:31:24 +01:00
FranklinDM 826464c80b Issue #2078 - Follow-up: Propagate combinator restriction to :is()/:where()
Based on spec discussion: https://github.com/w3c/csswg-drafts/issues/5093
2023-02-22 14:00:49 +08:00
FranklinDM f17feba05f Issue #2078 - Follow-up: aPreventComplexSelectors should be passed 2023-02-22 14:00:49 +08:00
FranklinDM 4493017fd8 Issue #2078 - Follow-up: Move isForgiving check to ParsePseudoClassWithSelectorListArg 2023-02-22 14:00:43 +08:00
FranklinDM bae06ce171 No issue - Move Has* function definition out of the header file for consistency 2023-02-22 13:51:53 +08:00
Moonchild f2ef28d09c Merge pull request 'Improve :host and :host-context matching' (#2120) from FranklinDM/UXP-contrib:work_css-host-matching-fixes into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2120
2023-02-21 22:56:39 +00:00
Moonchild b9f3a03a5f Merge pull request 'Ensure :host() and :host-context() are given proper weights' (#2119) from FranklinDM/UXP-contrib:work_css-host-and-host-context-specificity into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2119
2023-02-21 22:55:35 +00:00
Moonchild 5b21c547de [DOM] WebCrypto: Check decoded key type before using it.
Just in case someone forces the wrong key type and misuses WebCrypto.
It won't be usable anyway so better to throw.
2023-02-21 21:07:04 +01:00
Moonchild ee7201bbb4 Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2023-02-21 20:29:51 +01:00
Moonchild b2af611dc1 No issue - Refactor FindErrorInstanceOrPrototype
The logic here wasn't very transparent or easy to follow.
Doing a positive check to set the result instead of defaulting to it
also potentially prevents issues.
2023-02-21 20:29:35 +01:00
FranklinDM e0226ccae6 Issue #1593 - Follow-up: Accept only a single selector in the argument of :host/:host-context
Current spec says these two pseudo-classes accept only a single compound selector:
:host( <compound-selector> )
:host-context( <compound-selector> )
2023-02-21 22:50:18 +08:00
FranklinDM 9c1d44f5f6 Issue #1593 - Follow-up: Copy mIsRelevantLink value over rather than calling IsLink
Calling IsLink ignores whatever state we have for aTreeMatchContext and will trigger an assertion if aTreeMatchContext.mForStyling is false. This also adds a comment about what that line effectively does.
2023-02-21 22:50:18 +08:00
FranklinDM ab5a651d55 Issue #1593 - Follow-up: :host() should not automatically match if we have a non-empty selector list 2023-02-21 22:50:17 +08:00
FranklinDM ae59eb00e5 Issue #1823 - Ensure :host() and :host-context() are given proper weights 2023-02-21 22:46:04 +08:00
Moonchild 9d9d93381e Merge pull request 'Implement :is() and :where() CSS pseudo-classes' (#2110) from FranklinDM/UXP-contrib:work_css-is-where into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2110
2023-02-21 12:31:17 +00:00
athenian200 d022966201 Merge pull request 'MailNews: Re-check availability of OAuth2 when hostname fields modified.' (#2052) from blu.256/UXP:fix/mailnews/oauth-custom-domain into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2052
2023-02-21 06:12:19 +00:00
Brian Smith c2ed566b06 Issue #2117 - Part 2 - Revert "Follow up to d0eee8f01 - Run precomplete cmd during package staging"
This reverts commit c622e988fe.
2023-02-20 10:17:49 -06:00
Brian Smith 2f5798b5db Issue #2117 - Part 1 - Update Mac DMG platform names to intel64 for Intel and arm64 for Apple Silicon. 2023-02-20 10:12:47 -06:00
FranklinDM 31c074ce15 Issue #2078 - Part 6: Replace empty list head with the next non-empty list for forgiving selector lists
What happens here if aListHead is an empty selector list:
(1) next selector group is parsed and continues to the next iteration if it's empty or invalid
(2) if we're a forgiving selector list and aListHead is empty, replace it with the selector group that we've just parsed
(3) step 1 ignores invalid/empty, so we assert that step 2 should never have an empty selector list
2023-02-20 23:36:28 +08:00
FranklinDM f19504608e Issue #2078 - Part 5: Ensure :is() and :where() are given proper weights 2023-02-20 23:36:27 +08:00
FranklinDM adc21f14fa Issue #2078 - Part 4: Unify selector list matching
This should allow pseudo-classes that accept selector lists to properly handle complex selectors. `:visited` is also matched inside selector lists.
A previous iteration of this commit had incorrect matching behavior when called from `RestrictedSelectorListMatches`.
2023-02-20 23:36:26 +08:00
FranklinDM 828c8cc46f Issue #2078 - Part 3: Rename nsCSSRuleProcessor::SelectorListMatches to RestrictedSelectorListMatches
This is in preparation for merging the logic of RestrictedSelectorListMatches and AnySelectorInArgListMatches.
2023-02-20 23:35:55 +08:00
FranklinDM bc399f7871 Issue #2078 - Part 2: Rename nsPseudoClassList->u.mSelectors to mSelectorList
This makes it clear that we're accessing a selector list (nsCSSSelectorList), which is different from the selectors (nsCSSSelector) contained inside a selector list. Previously, both were confusingly referred to as mSelectors.
2023-02-20 23:35:54 +08:00
FranklinDM 024b7500d1 Issue #2078 - Part 1: Update CSS rule processor to handle :is() and :where() CSS pseudo-classes
This modifies selector list parsing to accommodate being "forgiving". Aliases for the :is selector's former names were also included. Note that the older and prefixed variant `-moz-any` remains unforgiving.
2023-02-20 23:35:47 +08:00
Moonchild 9b1b294e29 Merge pull request 'Improve fallback handling with mach clobber python command' (#2116) from FranklinDM/UXP-contrib:work_python-clobber-fallback into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2116
2023-02-20 12:24:04 +00:00
Moonchild 33bc5535f2 Merge pull request 'Annotate crash with database name when storage connection not closed' (#2115) from FranklinDM/UXP-contrib:work_js-annotate-crash-with-db-name into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2115
2023-02-20 12:09:47 +00:00
Moonchild 3076df399c Merge pull request 'Fix invalid assert for decoder type if JXL is not built on debug builds' (#2114) from FranklinDM/UXP-contrib:work_jxl-assert-fix-1 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2114
2023-02-20 11:12:10 +00:00
Moonchild aa43190b9a Merge pull request 'Split monolithic Intl.* into separate files' (#2109) from martok/UXP-contrib:mr/intl-split into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2109
2023-02-20 11:07:49 +00:00
FranklinDM ae476cc42c No issue - Improve fallback handling and resolve PATH issues with python clobber command 2023-02-20 17:32:40 +08:00
FranklinDM a434994229 Issue #1382 - Annotate crash with database name when storage connection not closed
Reported on https://bugzilla.mozilla.org/show_bug.cgi?id=1384036
This was fixed with an unrelated issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1372823
2023-02-20 17:25:09 +08:00
FranklinDM 8d980914af Issue #1382 - Fix invalid assert for decoder type if JXL is not built on debug builds 2023-02-20 17:22:16 +08:00
Moonchild 97f69387f4 Merge pull request 'Implement CSSStyleRule.selectorText setter' (#2113) from FranklinDM/UXP-contrib:work_css-stylerule-selectortext-setter into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2113
2023-02-20 08:31:46 +00:00
FranklinDM 8d6c043b89 Issue #2111 - Implement CSSStyleRule.selectorText setter
Unlike the original patch, this copies Chrome behavior: ignores invalid values of selectorText without any console log.

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=37468
2023-02-20 12:56:39 +08:00
Moonchild 83aff65a42 Force clobber 2023-02-19 17:53:31 +01:00
Moonchild 41bab244fc Force clobber 2023-02-19 17:53:21 +01:00
Moonchild 5bd97df957 [NSS] Update NSS to 3.52.9 to pick up fixes. 2023-02-19 17:51:26 +01:00
Moonchild 8772711181 [DOM] Check whether module load request was already cancelled when a load fails 2023-02-19 17:51:18 +01:00
Moonchild dc9526f4c6 [widget] Properly test for and handle errors in target-surface creation
and mapping.
2023-02-19 17:51:10 +01:00
Moonchild fb73c3aa3b [NSS] Update NSS to 3.52.9 to pick up fixes. 2023-02-19 15:26:44 +01:00
Moonchild 078a424cf3 [DOM] Check whether module load request was already cancelled when a load fails 2023-02-19 13:10:29 +01:00
Moonchild 576ac835f0 [widget] Properly test for and handle errors in target-surface creation
and mapping.
2023-02-19 12:08:17 +01:00
Martok ac4240f055 Issue #2046 - Move a bunch of functions in builtin/intl/CommonFunctions.js into more-specific files, where those functions are only used in a single more-specific file 2023-02-17 00:21:40 +01:00
Martok 233feee823 Issue #2046 - Move builtin/Intl.js (which now contains only shared functionality) to builtin/intl/CommonFunctions.js 2023-02-17 00:07:06 +01:00
Martok df8d3c4b0a Issue #2046 - Move Intl.Collator self-hosted code to a new builtin/intl/Collator.js file 2023-02-17 00:01:59 +01:00
Martok d3abfaff82 Issue #2046 - Move Intl.NumberFormat self-hosted code to a new builtin/intl/NumberFormat.js file 2023-02-17 00:00:36 +01:00
Martok 5cf6aa9065 Issue #2046 - Move Intl.DateTimeFormat self-hosted code to a new builtin/intl/DateTimeFormat.js file 2023-02-17 00:00:21 +01:00
Martok 1491d55375 Issue #2046 - Move Intl.PluralRules self-hosted code to a new builtin/intl/PluralRules.js file 2023-02-16 23:56:35 +01:00
Martok f53901c567 Issue #2046 - Move Intl.RelativeTimeFormat self-hosted code to a new builtin/intl/RelativeTimeFormat.js file 2023-02-16 23:55:05 +01:00
Martok a63ea3fdfb Issue #2046 - Move the self-hosting of non-constructor properties of Intl to a new builtin/intl/IntlObject.js file 2023-02-16 23:53:01 +01:00
Martok fe7e00d47f Issue #2046 - Move various generated files from builtin/Intl* to builtin/intl/*, and add "Generated" to their names for clarity 2023-02-16 23:42:45 +01:00
Martok face1e6e9b Issue #2046 - Move builtin/Intl.* to builtin/intl/IntlObject.* 2023-02-16 22:41:00 +01:00
Martok 22b189727f Issue #2046 - Trim builtin/Intl.*'s #include set down to what is required for Intl itself 2023-02-16 22:24:52 +01:00
Martok 9ad97da85b Issue #2046 - Move Intl.RelativeTimeFormat functionality into builtin/intl/RelativeTimeFormat.* 2023-02-16 21:26:50 +01:00
Martok 5f9d4f115e Issue #2046 - Move Intl.PluralRules functionality into builtin/intl/PluralRules.* 2023-02-16 01:33:43 +01:00
Martok 29e2547f26 Issue #2046 - Move Intl.DateTimeFormat functionality into builtin/intl/DateTimeFormat.* 2023-02-16 00:14:24 +01:00
Martok 24f8c4f052 Issue #2046 - Move SharedIntlData into its own builtin/intl/SharedIntlData.* files so the world doesn't have to import all shared Intl functionality. 2023-02-15 22:58:28 +01:00
Martok 52821c2e85 Issue #2046 - Move Intl.Collator functionality into builtin/intl/Collator.* 2023-02-15 22:32:08 +01:00
Martok 2b0f6aea16 Issue #2046 - Move NewUNumberFormatForPluralRules next to its only use 2023-02-15 22:32:07 +01:00
Martok 31adccdffc Issue #2046 - Move Intl.NumberFormat functionality into builtin/intl/NumberFormat.* 2023-02-15 22:32:07 +01:00
Martok b13cd385a4 Issue #2046 - Create helper method to call ICU string conversion methods
Based-on: m-c 1333844
2023-02-13 01:29:00 +01:00
Martok 3091ff4e57 Issue #2046 - Move functionality used in the implementation of multiple Intl.* constructors into builtin/intl/CommonFunctions.* 2023-02-12 23:27:21 +01:00
Martok 8ca01873c0 Issue #2046 - Move ScopedICUObject into builtin/intl/ScopedICUObject.h 2023-02-12 22:32:41 +01:00
Moonchild 013e19eed6 Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2023-02-11 22:52:55 +01:00
Moonchild 6a353ef32d Issue #1851 - Update TwemojiMozilla to 0.7.0 (Twemoji 14) 2023-02-11 22:52:29 +01:00
Moonchild 05ad5bcb5b Merge pull request 'Clean up caret when destroying editor.' (#2108) from jobbautista9/UXP:2107-caret into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2108
2023-02-11 09:16:39 +00:00
Job BautistaandMakoto Kato 42742eceae Issue #2107 - Clean up caret when destroying editor.
Editor changes caret visibility during drag and drop. But when destroying
editor, we don't restore caret state. So we should restore it when destroying
editor.

Co-authored-by: Makoto Kato <m_kato@ga2.so-net.ne.jp>
2023-02-09 20:51:34 +08:00
Moonchild ffdba3d91e No issue - Accept also video/vp8 as MIME type (bis) 2023-02-08 01:01:25 +01:00
Moonchild 1f32c17fcf No issue - Accept also video/vp8 as MIME type 2023-02-07 19:58:04 +01:00
Moonchild 8b26fcd0de Merge pull request 'Implement XUL crop:clip property value for string cropping' (#2105) from FranklinDM/UXP-contrib:work_xul-crop-clip into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2105
2023-02-04 17:00:04 +00:00
FranklinDM 1a2a779aaf Issue #2104 - Part 2: Indicate if a label was cropped via the "_is_cropped" attribute 2023-02-03 22:44:04 +08:00
FranklinDM dc14e5a906 Issue #2104 - Part 1: Implement "clip" attribute value for XUL string cropping
This implements the "clip" attribute value for the "crop" attribute found in XUL label elements. It functions similarly to having the text-overflow property set to an empty string or "". This shouldn't break previously established behavior as it only adds a new value to be checked.

The behavior of the "none" attribute value in the documentation (https://udn.realityripple.com/docs/Archive/Mozilla/XUL/Attribute/crop) is incorrect. The "none" attribute value literally means "don't crop anything" if you'd check the code and is also equivalent to not setting the "crop" attribute at all. This has always been the case since Firefox 2 (earliest version I checked) and apparently, this section of the documentation was copied verbatim from XULPlanet without even checking if it's correct.
2023-02-03 22:44:04 +08:00
Moonchild 9ab36e7ae0 Issue #2103 - Fix typo in RegExp Parser
This corrects the typo where the left-hand character would determine if
the right-hand character would be added or not.

Resolves #2103
2023-02-02 10:50:47 +01:00
Moonchild fb8347c7d2 Issue #2103 - Fix typo in RegExp Parser
This corrects the typo where the left-hand character would determine if
the right-hand character would be added or not.

Resolves #2103
2023-02-02 10:50:02 +01:00
Moonchild aa0d7fc060 Merge pull request 'Promises pt. 3: Implement Promise.any' (#2102) from martok/UXP-contrib:mr/prom-async-pt3 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2102
2023-02-01 22:52:14 +00:00
Martok 04e13794b2 Issue #2089 - Implement the Promise.any combinator
Based-on: m-c 1568903/9,1560300
2023-02-01 00:02:45 +01:00
Martok 2421d31e02 Issue #2089 - Rename shared Promise combinator functions, with helpers for element functions
Based-on: m-c 1568903/{5-8}
2023-02-01 00:02:45 +01:00
Martok 0148ae5a60 Issue #2089 - Implement AggregateError
Based-on: m-c 1568903/4,1641355(partial),1652148,1643397
2023-02-01 00:02:44 +01:00
Martok ec38c883c6 Issue #2089 - Move ErrorObject parts from jsexn.cpp to ErrorObject.cpp
Based-on: m-c 1568903/2
2023-02-01 00:02:44 +01:00
Martok e3c44ebafa Issue #2089 - Add cache for Promise property lookups
Based-on: m-c 1475678/11
2023-02-01 00:02:44 +01:00
Moonchild c9764f76ec Merge pull request 'Remove unnecessary cast in GeneratorObject::suspend's do loop.' (#2100) from jobbautista9/UXP:2099-generatorobject-cast into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2100
2023-01-31 16:22:02 +00:00
Job Bautista a1d573eb13 Issue #2099 - Remove unnecessary cast in GeneratorObject::suspend's do loop.
This resolves build bustage with --enable-debug.
2023-01-31 20:03:09 +08:00
Moonchild 94e2874370 Merge pull request 'Promises pt. 2: Optimization and Unification' (#2096) from martok/UXP-contrib:mr/prom-async-pt2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2096
2023-01-31 11:10:03 +00:00
Moonchild a13035b1de Merge pull request 'Make RegExpShared into a proper GC thing' (#2095) from jobbautista9/UXP:2083-regexpshared-gc-final into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2095
2023-01-31 09:46:14 +00:00
Moonchild d7c90a831a [xpcom] remove incorrect assertion.
See https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2095#issuecomment-33796
2023-01-29 19:19:48 +01:00
Moonchild 243c2bd498 No issue - bump default platform UA compatibility mode to 102.0 2023-01-29 19:17:00 +01:00
Moonchild e57d4347cd Issue #1382 - Remove incorrect assertion.
Tag #2090 #2095
2023-01-29 19:16:16 +01:00
Job Bautista 5732cf1f17 Issue #2083 - Follow-up: RegExpShared::source should be a GCPtr.
A hangover from before RegExpShared was a GC thing, as noted by m-c 1399928.
2023-01-28 19:32:24 +08:00
Martok ae4149e7ee Issue #2089 - Report unhandled rejection for optimized away promise
Based-on: m-c 1498775
2023-01-27 19:31:17 +01:00
Job Bautista 40ef2a5756 PR #2090 - Follow-up: Remove invalid MOZ_ASSERT in js::NativeDefineDataProperty
We don't have isHelperThreadContext, and this is breaking debug builds.
2023-01-27 16:47:12 +08:00
Job Bautista e8d30841e7 Issue #2091 - Parse \p{Extended_Pictographic} too.
This is essentially a follow up to Issue #1286. We already have
 UCHAR_EXTENDED_PICTOGRAPHIC in our in-tree ICU, so there's no reason to comment
 this case out.
2023-01-27 05:01:53 +01:00
Martok 15a0dd6e4c Issue #2089 - Further runtime perf improvements for PromiseState
- Reduce slot size of PromiseReactionRecord to fit into OBJECT8 alloc kind
- Use the Call() helper from Interpreter.h to reduce code duplication
- Clear the incumbent global slot when it's no longer used

Based-on: m-c 1475678/{12-14}
2023-01-27 00:09:15 +01:00
Martok c1b1638522 Issue #2089 - Create a shared helper for PerformPromiseRace, PerformPromiseAll and PerformPromiseAllSettled
Replace the previous non-CommonPerformPromiseAllRace port with the unified one

Based-on: m-c 1475678/10,1539694
2023-01-26 22:33:28 +01:00
Martok c805a6a526 Issue #2089 - Add a PromiseCapability struct, directly initialize dense elements in PerformPromiseAll using NewbornArrayPush
Based-on: m-c 1475678/{8,9}
2023-01-26 22:25:07 +01:00
Martok 82222eb7b4 Issue #2089 - Improve Runtime perf of Promises
- reduce typecasting
- reduce rooting already rooted values
- directly handle unwrapped promises

Based-on: m-c 1475678/{1-7}
2023-01-26 20:54:33 +01:00
Martok 0dc2b249dc Issue #2089 - Don't use BlockOnPromise fast path with non-default resolving functions, combine default resolving functions flags
Based-on: m-c 1474348
2023-01-26 20:54:32 +01:00
Martok f2eeb76969 Issue #2089 - Optimize Promise.then and Promise.all/race with default resolving functions
Based-on: m-c 1401508,1412200,1473970/{1-4}
2023-01-26 20:54:32 +01:00
Martok 6445a1bdb4 Issue #2089 - Turn AsyncGeneratorResumeNext recursion into iteration to avoid stack overflow
Based-on: m-c 1416809
2023-01-26 20:54:32 +01:00
Martok 94df491338 Issue #2089 - Only create result Promises in Promise#then and Promise#catch if it's used or the creation is otherwise observable
Based-on: m-c 1342070
2023-01-26 20:54:31 +01:00
Martok a6ceedf7b2 Issue #2089 - Shrink Promise instances from 8 to 4 slots by moving debug information to an external object
Based-on: m-c 1342050
2023-01-26 20:54:31 +01:00
Martok 9faf29374e Issue #2093 - Trace HeapPtr<RegExpShared::groupsTemplate_> for GC move/compact events, regression from #2072 2023-01-26 20:11:28 +01:00
Job Bautista 47c6fe9cee Revert "Issue #1382 - RegExpShared::groupsTemplate_ cannot be a GCPtr since RegExpShared is managed by C++"
This workaround has been obsoleted by the work on Issue #2083.
This reverts commit bbd7436086.
2023-01-26 15:26:32 +08:00
Job Bautista 64370b64d2 Issue #2083 - Part 5: Fix memory leak in RegExpObject.
Based on Mozilla bug 1345177.
2023-01-26 15:26:32 +08:00
Job Bautista 523201f3e4 Issue #2083 - Part 4: Give RegExpShared a finalizer.
Based on Mozilla bug 1345177.
2023-01-26 15:26:32 +08:00
Job Bautista 997616e308 Issue #2083 - Part 3: Fix RegExpShared rooting hazards now it's a GC thing.
Based on Mozilla bug 1345177.
Changes from the original bug's patch:

- The original patch didn't have a dotAll for a call to irregexp::ParsePattern,
  so let's make our dotAll a member of the MutableHandleRegExpShared re.
- Make RegExpShared::initializeNamedCaptures, introduced in Issue #1285, static.
  This resolves a build bustage where static RegExpShared::compile was trying to
  use a member function.
2023-01-26 15:26:32 +08:00
Job Bautista f5761df1c7 Issue #2083 - Part 2: Remove use of RegExpGuard.
Based on Mozilla bug 1345177.
There were more uses of RegExpGuard in js/src/builtin/RegExp.cpp not found in
 the original bug's patch.
2023-01-26 15:26:31 +08:00
Job Bautista c566c36791 Issue #2083 - Part 1: Make RegExpShared a GC thing.
Based on Mozilla bug 1345177.
Changes from the original bug's patch:

- We don't have JS::CurrentThreadIsHeapCollecting, so let's use
  trc->runtime()->isHeapCollecting() instead.
- Mozilla bug 1337117 renamed runtimeFromMainThread to
  runtimeFromActiveCooperatingThread for Firefox 54, so let's use the former
2023-01-26 15:26:31 +08:00
Moonchild 5a4478b409 Merge pull request 'Fix crash in js::CreateRegExpMatchResult' (#2094) from martok/UXP-contrib:mr/2093-regexp into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2094
2023-01-25 23:02:39 +00:00
Martok cce4862b70 Issue #2093 - Trace HeapPtr<RegExpShared::groupsTemplate_> for GC move/compact events, regression from #2072 2023-01-25 23:22:07 +01:00
Moonchild c06a9ae523 Merge pull request 'Parse \p{Extended_Pictographic} too.' (#2092) from jobbautista9/UXP:2091-extended-pictographic into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2092
2023-01-25 21:46:18 +00:00
Job Bautista aa108a39d6 Issue #2091 - Parse \p{Extended_Pictographic} too.
This is essentially a follow up to Issue #1286. We already have
 UCHAR_EXTENDED_PICTOGRAPHIC in our in-tree ICU, so there's no reason to comment
 this case out.
2023-01-25 16:33:44 +08:00
Moonchild b87775f75a Merge pull request 'Promises pt. 1: Basics' (#2090) from martok/UXP-contrib:mr/prom-async-pt1 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2090
Reviewed-by: Moonchild <moonchild@palemoon.org>
2023-01-23 16:55:39 +00:00
Martok d72c98277b Issue #2089 - Avoid copying/recreating iterator result, AsyncGeneratorRequest and GeneratorObject expression stacks
Based-on: m-c 1394682,1410283,1396499
2023-01-22 00:11:28 +01:00
Martok 9f07ad27f5 Issue #2089 - In Promises, use a C++ version of SpeciesConstructor when calling from C++
Based-on: m-c 1344656,1386534
2023-01-22 00:11:28 +01:00
Martok b1440d285b Issue #2089 - Use JS engine stack if necessary when reporting errors
Based-on: m-c 996060
2023-01-22 00:11:27 +01:00
Martok d78912ec17 No issue - Throw error when resolving or rejecting promise returned by async function with testing function
Based-on: m-c 1418106
2023-01-22 00:11:27 +01:00
Martok d454045363 No issue - add API to tell Profile Timeline Recording state to JS engine
Based-on: m-c 1342070/5
2023-01-21 22:49:10 +01:00
Martok 44adc9e25c No issue - Cleanup unused function exports to self-hosted global
Based-on: m-c 1325696
2023-01-21 22:49:10 +01:00
Martok 7cde54d976 No issue - Remove "code" from jsprototype.h macros
Based-on: m-c 1394084
2023-01-21 00:55:40 +01:00
Martok 13eac0ae3f No issue - reformat GlobalObject::skipDeselectedConstructor 2023-01-21 00:51:34 +01:00
Martok 0d1d366685 No issue - implement js::NativeDefineDataProperty helper 2023-01-21 00:50:37 +01:00
Moonchild 75e4818d36 Merge branch 'master' into release 2023-01-19 00:42:00 +01:00
Moonchild 9536cf49ce [DOM] Make nsHTMLContentSerializer handle noscript depending on the
scripting enabled state of the document.
2023-01-18 21:23:40 +01:00
Moonchild bd9042426a [devtools] Improve Copy as cURL
Windows commonly fails to work because of --compressed, and its string
escaping needed improvement because of the complexities of argument
parsing in command windows.
2023-01-18 19:21:26 +01:00
Moonchild 76f10666f4 [DOM] Add some null checks for PerformanceWorkers 2023-01-18 17:54:34 +01:00
Moonchild c8b74d4cbd No issue - factor out some frame iterator helper functions. 2023-01-18 14:08:50 +01:00
Moonchild 25ed473471 [gtk widget] Use text/uri-list for file drag&drop. 2023-01-18 12:32:12 +01:00
Moonchild 304dfb8da2 [network] Avoid queue manipulation inside a loop 2023-01-18 02:26:23 +01:00
Moonchild a65144e9e0 Fix merge conflicts. 2023-01-13 12:55:52 +01:00
Moonchild 4f29548526 Merge branch 'master' into release
# Conflicts:
#	image/decoders/nsJXLDecoder.cpp
#	js/src/irregexp/NativeRegExpMacroAssembler.cpp
#	js/src/irregexp/RegExpAST.h
#	js/src/irregexp/RegExpEngine.cpp
#	js/src/irregexp/RegExpParser.cpp
#	js/src/irregexp/RegExpParser.h
#	xpcom/io/nsLocalFileUnix.cpp
2023-01-13 12:11:56 +01:00
Moonchild 2c4410681f Merge pull request 'Re-unify some more missed sources in js/src' (#2088) from jobbautista9/UXP:js-src-80 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2088
Reviewed-by: Moonchild <moonchild@palemoon.org>
2023-01-10 11:22:52 +00:00
Job Bautista 5b3edcd412 Issue #80 - Re-unify some more missed sources in js/src 2023-01-10 15:50:56 +08:00
Moonchild 8dadf744e3 Issue #2087 - Don't throw on lacking PresShell in SetFontInternal
In CanvasRenderingContext2D::SetFontInternal, we should not throw if
there is no PresShell due to (sandboxed/hidden) iframe use that has not
initialized its presentation yet at the time of property manipulation.
This removes the throwing of the error and just silently fails.

Resolves #2087
2023-01-09 10:52:49 +01:00
Moonchild e7268f447a Merge pull request 'Remove CSS unprefixing service' (#2085) from FranklinDM/UXP-contrib:work_css-remove-unprefixing-service into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2085
Reviewed-by: Moonchild <moonchild@palemoon.org>
2023-01-06 15:49:41 +00:00
Moonchild d3830bea8d Merge pull request 'Fix invalid inequality check on assert in RegExpParser' (#2086) from FranklinDM/UXP-contrib:work_regexp-assert-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2086
2023-01-06 15:04:30 +00:00
Moonchild 4ebfc47dff Merge pull request 'Performance Enhancements for Animated Images' (#2081) from martok/UXP-contrib:gfx-gifmem into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2081
2023-01-06 15:02:51 +00:00
FranklinDM 9694f5c216 No issue - Fix invalid neq check on assert in RegExpParser 2023-01-06 22:16:32 +08:00
FranklinDM 1264824127 Issue #2084 - Part 2: Simplify logic in CSSParserImpl::LookupKeywordPrefixAware
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1259348
2023-01-06 22:13:16 +08:00
FranklinDM b5f8fa6479 Issue #2084 - Part 1: Remove CSSUnprefixingService.js and associated code
It's effectively dead code since it's been supplanted by built-in webkit-prefixed-CSS support (landed before fork point in Firefox 49).

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1259348
2023-01-06 22:13:08 +08:00
Moonchild af3a27e838 Merge pull request 'Follow-up fixes to #2060' (#2072) from martok/UXP-contrib:irregexp-fix1 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2072
2023-01-06 09:06:56 +00:00
Moonchild 1d4532ac5e Merge pull request 'Fix linking libxul on *nix when using gold, lld, and mold as linker.' (#2082) from jobbautista9/UXP:staticxul-ldmagic into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2082
2023-01-05 17:53:04 +00:00
Job Bautista 2e8442e6ec Issue #2079 - Fix linking libxul on *nix when using a linker other than bfd.
Don't mark the .kPStaticModules section as relro for bfd, as the linkers on
 Windows and Mac don't do this anyway.
Add a section insert of .kPStaticModules to config/expandlibs_exec.py, which
 seems to be the primary cause of linking bustage on gold, lld, and mold.
2023-01-05 13:12:29 +08:00
Martok bbd7436086 Issue #1382 - RegExpShared::groupsTemplate_ cannot be a GCPtr since RegExpShared is managed by C++ 2023-01-04 20:48:25 +01:00
Martok 61dccf9933 Issue #2073 - m-c 1454149: Do not advance animated images which are not displayed 2023-01-04 00:50:26 +01:00
Martok cbcf9b9d8e Issue #2073 - m-c 1546500: Avoid dispatching synchronous thread shutdown runnables 2023-01-04 00:50:17 +01:00
Martok d28497f2cf Issue #2073 - m-c 1651587: Make image::Image release efficient on main thread 2023-01-04 00:50:03 +01:00
Martok 919a966dc2 Issue #2073 - m-c 1383404: make SourceBuffer::Compact more efficient (squashed)
The first part also means that Compact no longer needs the SurfaceCache lock (used to be via CreateChunk->CanHold),
which avoids potential deadlocks during shutdown that m-c 523950 would otherwise cause
2023-01-04 00:49:05 +01:00
Martok b618b3fb76 Issue #2073 - m-c 523950: Discard decoded frames of very large GIF animations (squashed)
Controlled by image.animated.decode-on-demand.threshold-kb, default 256MB

Includes squashed bugfixes/regressions:
 - m-c 1444537: Shutting down the decode pool should make animated decoders bail early
 - m-c 1628606: Make sure to mark the surface cache entry available before sending the frame complete notification
 - m-c 1502275: Skip recreating the decoder after redecode errors if an animated image is reset
 - m-c 1443232: Don't insert frames into our AnimationFrameBuffer that we consider in error and unusable
2023-01-04 00:49:04 +01:00
Martok e7fd4ba61b Issue #2073 - m-c 1343341: Infrastructure necessary to allow discarding of animated images (squashed)
Includes squashed changes of:
 - m-c 1317907: Refactor FrameAnimator::GetCompositedFrame to be a bit simpler
 - m-c 1351434: bugfix
 - m-c 686905: Enable the pref image.mem.animated.discardable to allow discarding of animated images
2023-01-03 02:01:10 +01:00
Martok 608ecc9549 Issue #2073 - m-c 1382683: Accelerate GIF decoding to SurfacePipe
1. Implement SurfacePipe::WritePixelBlocks for faster writing of pixels
2. Switch nsGIFDecoder2 to write pixels in blocks instead of individually
2023-01-03 02:01:10 +01:00
Moonchild 61b688198a Merge pull request 'Implement inset-(block|inline)-(start|end)' (#2076) from css-offset-inset-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2076
Reviewed-by: Travis W. <travawine@palemoon.org>
2023-01-01 23:33:27 +00:00
Moonchild 7bcc49489a Issue #2075 - Part 5: Allow logical aliases in the property database. 2022-12-31 10:19:45 +00:00
Moonchild 45193b1a82 Issue #2075 - Part 4: Update tests
* Update reftests to use inset-*
* Update property database
* Update logical properties test
2022-12-31 01:32:15 +00:00
Moonchild f404243371 Issue #2075 - Part 3: Regenerate devtools CSS database
Using `mach devtools-css-db`
2022-12-31 01:30:30 +00:00
Moonchild a943408c35 Issue #2075 - Part 2: Update devtools for inset-* 2022-12-31 01:29:03 +00:00
Moonchild 34ccfbcc0e Issue #2075 - Part 1: Rename offset-* logical properties to inset-*
This adds aliases behind a pref with the old offset-* names
2022-12-30 22:37:02 +00:00
Martok 4731658b7e Follow-up #2060 - Correctly handle \k in non-unicode expressions 2022-12-30 15:27:03 +01:00
Moonchild 4a3caaf522 Merge pull request 'Fix deprot in dom/base and js/src when building them de-unified.' (#2074) from jobbautista9/UXP:deprot-hunt1 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2074
2022-12-29 21:12:51 +00:00
Job Bautista edaddb1e5d Issue #80 - Fix deprot in js/src/irregexp.
Regression seems to have been introduced by PR #2060? This tree didn't fail
 building before we've reinstated unified building for js/src.
Found while building js/src de-unified.
2022-12-29 22:00:18 +08:00
Job Bautista 028e97d11e Issue #80 - Fix deprot in dom/base.
This regression was introduced by my PR #2015.
Found while building dom/base de-unified.
2022-12-29 22:00:07 +08:00
Moonchild a6d113f87b Issue #2053 - Disable DOM Performance API navigation timing.
We may eventually want to make this permanent in the front-end of
Pale Moon for privacy reasons.
Disabling this to avoid usage expecting changed spec results.
2022-12-26 11:21:32 +00:00
Moonchild 413cb600cc Update README 2022-12-25 16:59:18 +00:00
Moonchild 4ed26484ee Issue #2070 - When multiple HSTS headers are received, only consider the first.
This implements a plain interpretations of RFC 6797, which says to only consider
the first HSTS header.
This slightly conflicts with RFC 7230, which says that sending multiple headers
which can't be merged is illegal (except for a specific whitelist which HSTS isn't in),
so this situation should never occur in the first place (and would therefore not need
the explicit entry in RFC 6797).

It improves HSTS robustness dealing with non-compliant servers.

Resolves #2070
2022-12-25 11:42:42 +00:00
Moonchild 2a77e5662d Merge pull request 'Terminate some fallthrough attributes with a semicolon.' (#2071) from jobbautista9/UXP:fallthrough-sc into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2071
2022-12-25 08:27:44 +00:00
Moonchild 1555b1d89c Merge pull request 'Update libjxl to 0.7.0 and highway to 1.0.2.' (#2062) from jobbautista9/UXP:jxl-0.7 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2062
2022-12-25 08:26:16 +00:00
Job Bautista 080877ccec No issue - Fallthrough attributes must be terminated with semicolon.
This also fixes building with Clang 15 on Linux.
2022-12-25 14:50:24 +08:00
Job BautistaandMoonchild dcf9837607 Issue #2061 Follow-up: Fix moz.build to compile on all platforms.
Remove stuff from /extra/ and the JPEG transcoding file from compilation, as
 we don't need them.
A disable define for box decoding is also added, but currently commented out as
 there's no need to disable the function right now.

Co-authored-by: Moonchild <moonchild@palemoon.org>
2022-12-25 11:33:10 +08:00
Moonchild 5de28553a1 Current changes to the platform warrant a new milestone version for Goanna. 2022-12-24 23:36:07 +00:00
Moonchild 6249e60f41 Merge pull request 'Only wrap the last line of inline elements when positively padding to the right.' (#2069) from jobbautista9/UXP:paddingright-linewrap-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2069
2022-12-24 23:22:11 +00:00
Moonchild fb305d451f Merge pull request 'Restore and fix support for FasterMake' (#2066) from FranklinDM/UXP-contrib:work_restore-faster-make into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2066
2022-12-24 20:56:23 +00:00
Moonchild 154b94d350 Merge pull request 'Ensure a floated ::first-letter inherits from ::first-line.' (#2064) from jobbautista9/UXP:first-letter-floatinherit into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2064
2022-12-24 19:29:20 +00:00
Moonchild ea2d754647 Merge pull request 'Replace use of deprecated GetPreventDefault in GTK menu bar' (#2067) from FranklinDM/UXP-contrib:work_gtkmb-defaultprevented into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2067
2022-12-24 19:28:28 +00:00
Job BautistaandJonathan Kew 0063a28576 Issue #2068 - Only wrap the last line of inline elements when positively padding to the right.
This fixes the 21 year old Mozilla bug 122795.

Co-authored-by: Jonathan Kew <jfkthame@gmail.com>
2022-12-24 17:41:31 +08:00
FranklinDM 4e9a2f783e No issue - Replace use of deprecated GetPreventDefault in GTK menu bar 2022-12-24 13:16:03 +08:00
FranklinDM 84acd8c0ef Issue #2065 - Part 5: Fix incorrect inclusion of base file name in destination path for generated FasterMake track files
I'm not sure about what they had in mind when they first wrote this, but this is completely unnecessary. The base name is the file name. This part will break building with `mach faster` once partial filenames with wildcards are included in the package manifest, which became the case when we began supporting the newer MSVC runtime.

This also aligns FasterMake with how RecursiveMake treats wildcard copy directives.

They fixed this in bug 1416465, but it included a conditional that will almost always be true and kept this incorrect joining of the path and base name in the destination path. Since the value for the base name is either empty or contains a partial file name, that conditional effectively does nothing.
2022-12-24 12:57:59 +08:00
FranklinDM fba59dfc4b Issue #2065 - Part 4: Revise comments and remove parts dependent on hybrid FasterMake/RecursiveMake backend 2022-12-24 12:57:55 +08:00
FranklinDM 7ff4b0d120 Issue #2065 - Part 3: Process install manifests with --track in the recursive make backend
This excludes parts that remove support for building the Mozilla SDK.
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1390916
2022-12-24 12:57:52 +08:00
FranklinDM 13e658a200 Issue #2065 - Part 2: Expand pattern when track file is created rather than read
This fixes build bustage on Windows when using `mach build faster`.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1416465
2022-12-24 12:57:48 +08:00
FranklinDM abf74404c5 Issue #2065 - Part 1: Restore FasterMake build backend
I use this for quickly rebuilding and preprocessing the JS/XUL/CSS assets them without the need to recompile the IDL interfaces and other unnecessary items.
2022-12-24 12:57:44 +08:00
Job Bautista cfc61b4c5d Issue #2061 Follow-up: Export jxl/version.h.
Fixes building on Windows.
I also decided to move the preprocessed jxl/version.h to our include/jxl
 instead of relying on moz.build in preprocessing the file. Future me
 should note to not forget to update the version number at that new file
2022-12-24 10:42:27 +08:00
Moonchild 012669ee58 Merge pull request 'RegExp: upgrades to the irregexp regex engine' (#2060) from martok/UXP-contrib:irregexp-upgrades into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2060
2022-12-23 19:55:27 +00:00
Job BautistaandRyo Onodera 6f635acadc Issue #2063 - Ensure a floated ::first-letter inherits from ::first-line.
This fixes the 24 year old Mozilla bug 13610.

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2022-12-23 19:21:40 +08:00
Job Bautista fc4d64665f Issue #2061 - Part 4: Update build system for highway library update. 2022-12-22 12:55:56 +08:00
Job Bautista ada110f579 Issue #2061 - Part 3: Update highway source to 1.0.2. 2022-12-22 12:55:25 +08:00
Job Bautista 1356ecde96 Issue #2061 - Part 2: Update build system for libjxl update. 2022-12-22 12:54:52 +08:00
Job Bautista 3d07029232 Issue #2061 - Part 1: Update libjxl source to 0.7.0. 2022-12-22 12:53:52 +08:00
Martok 3f2b011ee6 Issue #1286 - Parse unicode property escapes and property sequences
In addition to upstream, we also allow RGI-named sequences since they're used in the wild.
2022-12-21 19:35:56 +01:00
Martok 9a9e4e0c9a No issue - Refactor CharacterRange + Unicode handling into module for maintainability
Collects code from RegExpParser and RegExpEngine (regexp-compiler-tonode.cc)
Simplify parsing AtomEscape/CharacterClassEscape
2022-12-21 18:53:27 +01:00
Martok 58f3b2c581 Issue #1285 - Implement named capturing groups for replacing 2022-12-21 18:53:27 +01:00
Martok b356d64f4e Issue #1285 - implement named capturing groups and named backrefs
- RegExpParser collects seen groups in named_captures_.
- After irregexp::ParsePattern has finished, RegExpParser::StoreNamedCaptureMap translates
  the parser data to RegExpCompileData.capture_name/index
- RegExpShared::initializeNamedCaptures takes these and builds a PlainObject map which
  is kept with the compiled expression
This is done because irregexp doesn't have access to the JS context and so can't allocate
any JSValues itself.
- for each match result, this map is used to build PlainObjects of name->match/undefined
  (extremely simplified from upstream at the expense of some perf)

IonMonkey switches to non-masm code path for expressions with named groups.
2022-12-21 18:53:27 +01:00
Martok 9a0807a62c No issue - Refactor parsing of unicode escapes to be more general 2022-12-21 18:53:26 +01:00
Martok ffab95c3a3 No issue - Fix VectorMatchPairs allocating more memory than required 2022-12-21 18:53:26 +01:00
Martok 4a290b16b0 No issue - Flag to parse 'v' flag as 'u' for automated tests, disabled by default 2022-12-21 18:53:26 +01:00
Martok 4e252574e0 No issue - refactor base classes for easier access
- move InfallibleVector into its own header, together with common typedefs
- refactor CapturesVector
2022-12-21 18:53:25 +01:00
Martok 94f456f834 Issue #2056 - Fix handling of captures in lookbehinds
- Port unification of CheckNotBackReference*
- Port LoadCurrentCharacter
- Make RegExpMacroAssembler::CheckAtStart understand cp_offset
- Replace magic numbers in ChoiceNode::Emit, Trace::PerformDeferredActions
- CheckBacktrackStackLimit
- Allow backrefs to resist recursion
2022-12-21 18:53:25 +01:00
Moonchild 37bbb4152d Issue #1279 - Implement regular expressions lookbehind (v3)
Based on d10e8a5b with the addition of chromium issue 570241.
2022-12-21 18:53:25 +01:00
Moonchild fc62ce0076 Merge pull request 'Use gfxPackedPixel + WritePixels instead of WriteBuffer in JPEG-XL decoding' (#2059) from jobbautista9/UXP:jxl-writepixels into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2059
2022-12-19 08:00:40 +00:00
Job Bautista b9d00e8c27 Issue #2057 - Use gfxPackedPixel + WritePixels instead of WriteBuffer.
This means we no longer need the workarounds intended for #2033 and #2040!
2022-12-19 13:58:32 +08:00
Moonchild (Away until 22-12-14) a2a0dec11d Merge pull request '[no issue] fix macro condition' (#2055) from lexx9999/UXP:lx_fix_macro into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2055
2022-12-16 12:25:37 +00:00
Moonchild 528db2cbd8 Issue #1818 - Remove obsolete path hack in widget code. 2022-12-16 09:13:48 +00:00
Moonchild 84e6bcc1e6 [network] Align cookie checks with RFC 6265 (bis) 2022-12-16 09:13:38 +00:00
Moonchild 0dc9ff518d [libjar] Add some extra sanity checks to our Zip reader. 2022-12-16 09:13:25 +00:00
Moonchild a2e3bd44aa [network] move some generic websocket code to the baseclass 2022-12-16 09:13:09 +00:00
Moonchild 3e9621aa59 Issue #1818 - Remove obsolete path hack in widget code. 2022-12-15 13:14:03 +00:00
Moonchild 03875cd609 [network] Align cookie checks with RFC 6265 (bis) 2022-12-15 12:30:21 +00:00
Moonchild d9fb68d21b [libjar] Add some extra sanity checks to our Zip reader. 2022-12-15 11:49:39 +00:00
Moonchild df2b82e2cb [network] move some generic websocket code to the baseclass 2022-12-15 10:59:40 +00:00
Moonchild 163a0e7caf Revert "Issue #1279 - Implement regular expressions lookbehind (v2)"
This reverts commit d10e8a5b06.
2022-12-15 09:11:02 +00:00
Moonchild 49a86db5f3 Issue #2040 - Pre-multiply the alpha values in our JXL decode buffer. (uplift)
Using selective calculation (only if not opaque) and fast integer
math here should optimize well in compilers.
2022-12-15 09:09:19 +00:00
Moonchild c34cceb678 Revert "Issue #1279 - Implement regular expressions lookbehind (v2)"
This reverts commit d10e8a5b06.
2022-12-15 09:01:05 +00:00
lexx9999 6343937b2c Issue #2041 follow-up - fix macro condition 2022-12-11 05:26:37 +01:00
Moonchild b9894f1e93 Merge pull request 'Include the Emoji font on all GTK platforms, not just Linux.' (#2054) from dbsoft/UXP:GTKFont into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2054
2022-12-09 15:32:51 +00:00
Mavridis Philippe c8bafb9faa MailNews: Re-check availability of OAuth2 when hostname fields modified.
This is for those cases where the hostnme of the email address is not
the actual hostname of the e-mail service (e.g. GMail with a custom
domain).

This should resolve issue athenian200/epyrus#53.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
2022-12-07 13:22:55 +02:00
Brian Smith ecd5436c58 No issue - Fix packaging Epyrus on FreeBSD and Solaris.
The TwemojiMozilla.ttf font should be bundled on Windows and any GTK platforms.
We should not limit the GTK platform to Linux only.
2022-12-04 08:07:44 -06:00
Moonchild b019e959d4 Merge pull request 'Add animation support and progressive decoding for JPEG-XL.' (#2050) from jobbautista9/UXP:jxl-anim-progdec into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2050
2022-12-03 14:09:30 +00:00
Moonchild ab4cc6ebae PR #2050 follow-up: add symbols to build shared on Windows. 2022-12-03 10:45:25 +00:00
Job Bautista 925b33158b Issue #2041 Follow-up - Remove opacity check from original patch.
Per Issue #2033 we don't support expanding RGB to RGBA yet, so this opacity
 check will always return RGBX, which makes images with transparent backgrounds
 show up with a black background instead. Feel free to readd once we backport
 Mozilla bug 1551088.
2022-12-02 14:17:10 +08:00
Job Bautista daf859d84c Issue #2048 - Add progressive decoding for JPEG-XL.
Based on Mozilla phab D122159, intended for bug 1709815.
Also moved the temporary RGBA and premultiplication fixes to a macro, since
 progressive decoding also needs these fixes.
2022-12-02 13:28:34 +08:00
Job Bautista b66e0ffdc4 Issue #2041 - Add animation support for JPEG-XL.
Based on Mozilla phab D122158, intended for bug 1709818.
2022-12-02 11:15:05 +08:00
Moonchild 8f266bb6e7 Merge pull request 'Allow <button> children to receive pointer events' (#2043) from martok/UXP-contrib:2030-button into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2043
2022-11-30 22:04:23 +00:00
Moonchild 2e888727e0 Issue #2040 - Pre-multiply the alpha values in our JXL decode buffer.
Using selective calculation (only if not opaque) and fast integer
math here should optimize well in compilers.
2022-11-30 14:28:09 +00:00
Moonchild bc165aebf8 Merge pull request 'Prevent GTK color picker from being frozen when launched from a modal XUL window' (#2037) from FranklinDM/UXP-contrib:work_gtk-color-picker-frozen into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2037
2022-11-27 22:32:30 +00:00
Moonchild 9d0a8340d7 Merge pull request 'Follow-up to the Ventura fixes and fix building LDAP on Mac for Epyrus' (#2044) from dbsoft/UXP:Mac into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2044
2022-11-27 22:31:53 +00:00
Brian Smith abc044bc61 No Issue - Fix building ldap on MacOS.
Discovered this problem building Epyrus on MacOS, based on this Mozilla Bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1652906
2022-11-27 13:59:27 -06:00
Brian Smith a061db91dd Issue #2022 Follow-Up - Add autorelease to our manual NSView to prevent potential leaks.
Also move titlebar overrides from BaseWindow to ToolbarWindow...
This caused problems in Waterfox Classic on Ventura, while this didn't seem to be necessary in UXP...
There is no need for those overrides in BaseWindow, so why risk potential problems.
https://bugzilla.mozilla.org/show_bug.cgi?id=1576387
https://github.com/WaterfoxCo/Waterfox-Classic/commit/d7f5814dc089f615385a00db4dfe187c6aefa1af
2022-11-27 13:57:13 -06:00
Martok 0494d561c5 Issue #2030 - Dispatch click on common interactive ancestor if mousdown/up are not on the same element
For example, if the mouse is dragged from one element to another while
staying inside the same button, dispatch from their common ancestor
2022-11-27 16:35:56 +01:00
Martok 41fed1ebf8 Issue #2030 - Pref-gate default button event dispatch logic 2022-11-27 16:35:47 +01:00
Martok a585aeacf0 Issue #2030 - Allow child nodes of button to participate in mouse hit tests
This is needed for web compatibility, even if standards compliance is debatable.
2022-11-27 16:35:38 +01:00
Martok 814fa6e3ba Issue #2030 - (chore) refactor event dispatch functions
Based on selected bits of M-C 1461708:
- EventStateManager::CheckForAndDispatchClick() to early-return style
- split EventStateManager::CheckForAndDispatchClick() into:
  EventCausesClickEvents, PostHandleMouseUp, DispatchClickEvents
- Move implementation of UIEvent::GetRangeParent() and UIEvent::RangeOffset() to nsLayoutUtils
2022-11-27 16:35:25 +01:00
Moonchild 2640953d8b Issue #2019 - Follow-up: Make nsPluginInstanceOwner also listen to keypress events in the system event group.
nsPluginInstanceOwner only listens to keypress events in the default event group.
However, in our changed operating mode, keypress events are not fired in the
default event group if the key does not result in something printable.
This means that nsPluginInstanceOwner should also listen to keypress events
in the system event group and should handle each keypress that way, but
only once. I.e., if a printable keypress event is received in the system event
group, it should be ignored, since it would've already been handled in the
default event group in that case.
2022-11-26 18:18:09 +00:00
Moonchild 7eb7d67f7a Issue #2033 - Temporary fix of R<->B channel swap.
We have a BGR/RGB channel ordering mismatch here. to at least
provide proper display, a quick&dirty byte swap on the output
buffer will fix this for now, but we should look into seeing where
the surface mismatch is caused.
std::swap() should optimize pretty well in any of the used
compilers, but if necessary, a full buffer ASM routine can be
slotted in (although on current hardware I doubt this will be
even noticeable as it is)
2022-11-26 02:43:18 +00:00
Moonchild 541508cd83 Merge pull request '[No issue] Add executable bit to shell scripts in tree' (#2038) from trav90/UXP-contrib:add-executable-bit into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2038
2022-11-25 19:17:40 +00:00
trav90 2770a0588c [No issue] Add executable bit to shell scripts in tree 2022-11-25 09:37:30 -06:00
Moonchild 88f392397b Issue #2019 - Follow-up: Make nsPluginInstanceOwner also listen to keypress events in the system event group.
nsPluginInstanceOwner only listens to keypress events in the default event group.
However, in our changed operating mode, keypress events are not fired in the
default event group if the key does not result in something printable.
This means that nsPluginInstanceOwner should also listen to keypress events
in the system event group and should handle each keypress that way, but
only once. I.e., if a printable keypress event is received in the system event
group, it should be ignored, since it would've already been handled in the
default event group in that case.
2022-11-24 21:41:28 +00:00
Moonchild 6efb151520 [no issue] fix whitespace. 2022-11-24 15:06:28 +00:00
FranklinDM 058474229d Issue #2036 - Prevent GTK color picker from being frozen when launched from a modal XUL window
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1496836
2022-11-24 21:54:22 +08:00
Moonchild eb87672d4c Merge pull request 'Improve the protocol handling dialog' (#2032) from FranklinDM/UXP-contrib:work_protocol-handling-dialog-opener into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2032
2022-11-24 12:42:24 +00:00
Moonchild 4b9789888f Issue #2033 - Temporary fix of R<->B channel swap.
We have a BGR/RGB channel ordering mismatch here. to at least
provide proper display, a quick&dirty byte swap on the output
buffer will fix this for now, but we should look into seeing where
the surface mismatch is caused.
std::swap() should optimize pretty well in any of the used
compilers, but if necessary, a full buffer ASM routine can be
slotted in (although on current hardware I doubt this will be
even noticeable as it is)
2022-11-24 12:37:28 +00:00
FranklinDM cc98224267 Issue #2029 - Part 2: Protocol handling dialog should be dependent if not modal
Following the behavior of the download dialog, the content handling dialog should be `dependent` as well. This means that this dialog should close when the parent window is closed, is not visible on the taskbar, and stays in front of the parent window.
2022-11-23 17:57:11 +08:00
FranklinDM 7001a57aef Issue #2029 - Part 1: Add preference for opening the protocol handling dialog as window modal
This adds the preference, `prompts.content_handling_dialog_modal.enabled`, to control whether the dialog is window modal or not.
2022-11-23 17:56:50 +08:00
Moonchild 173320cf7d Merge pull request 'Use reserved stack space instead of heap allocation in nsLocalFileUnix' (#2028) from FranklinDM/UXP-contrib:work_issue-2027 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2028
2022-11-22 00:10:09 +00:00
Moonchild 5f243826b4 Revert "Revert "[XPCOM] Deal with lstat potentially lying in nsLocalFileUnix.""
This reverts commit 3d4474a977.
2022-11-22 00:09:27 +00:00
Moonchild 3d4474a977 Revert "[XPCOM] Deal with lstat potentially lying in nsLocalFileUnix."
This reverts commit c127f58ef3.
2022-11-20 14:15:22 +00:00
Moonchild e28860ba7f Revert "[XPCOM] Deal with lstat potentially lying in nsLocalFileUnix."
This reverts commit c127f58ef3.
2022-11-20 14:14:48 +00:00
FranklinDM 06bc499a0d Issue #2027 - Use reserved stack space instead of heap allocation in nsLocalFile
This should resolve the build bustage associated with c127f58ef3.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1371279
2022-11-20 18:42:34 +08:00
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 930ddd693b No Issue - Break overly long tooltips into multiple lines.
A very very old bug and annoyance: tooltips with very long content without
spaces (e.g. long URLs or gibberish data) would just cut off and leave an
un-styled right border going over the widget's constrained space.
Because of an additional bug (still unsolved), this was never properly
addressed because solutions attempted didn't work.
The workaround for the secondary bug allows for word-break to now work and this
primary problem to be resolved.
2022-05-08 21:07:03 +00:00
Moonchild 4cdd532738 Merge pull request 'Fix ASAN and clang crashes on Linux, BSD and MacOS.' (#1892) from dbsoft/UXP:fixxptcinvoke into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1892
2022-05-08 11:52:32 +00:00
Moonchild 8760ce023c Issue #1895 - Implement queueMicroTask(callback()) (uplift) 2022-05-07 14:40:14 +00:00
Moonchild 6f8d063b18 Issue #1895 - Implement queueMicroTask(callback()) 2022-05-07 14:39:41 +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
Brian Smith b1957eb7c9 Issue #1891 - Fix ASAN and clang crashes on Linux, BSD and MacOS.
Merge with the existing Solaris fix, by folding Solaris into the Linux/BSD section.
Add Apple Silicon (ARM64) support.
This should also address Issue #1884 by moving the offending code into assembly.
2022-05-05 15:53:25 -05:00
Moonchild a5b4a440d6 Update NSS to 3.52.5
- Default configure to enable dbm
- Remove a redundant check on ASN1 decoding (Bug 1753535)
2022-05-04 22:44:31 +00:00
Moonchild 9a84af4d5b Bug 1761981 2022-05-04 22:00:02 +00:00
Moonchild eecc234b44 No issue - Align our resource timing with the updated Fetch spec.
This makes FetchStart use StartTime() when the TAO check fails for
PerformanceResourceTiming

Given the recent Fetch spec updates, Step 8.1 in
https://fetch.spec.whatwg.org/#finalize-and-report-timing specifies that start
time(StartTime) and post-redirect start time(FetchStart) should be start time
when the TAO check fails.
2022-05-04 17:24:10 +00:00
Moonchild 2366accae5 Issue #1890 - Update libopus
This resolves #1890
2022-05-04 17:03:37 +00:00
Stephen A Pohl d01ae5cf25 [XPCOM] Improve the conversion of line breaks.
Fix an off-by-one error in CRLF checking.
2022-05-04 13:54:20 +00:00
Moonchild 92b3def6a8 Merge pull request 'Implement optional chaining' (#1889) from FranklinDM/UXP-contrib:work_js-optional-chaining into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1889
2022-05-04 10:42:06 +00:00
FranklinDM 006b8f5c6e Issue #1658 - Part 8: Update tests 2022-05-04 14:57:19 +08:00
FranklinDM 152974a8fe Issue #1658 - Part 7: Implement support for optional chaining in console autocomplete
This works by stripping the optional chaining characters from the completion part variable, allowing the developer tools' parser to proceed as if it were a regular, non-optional expression.

Tests were partially based on: https://bugzilla.mozilla.org/show_bug.cgi?id=1594009

Tests for features that do not apply to our version of developer tools (e.g. autocomplete for integer literals, ignoring spaces between property accessors, etc) were excluded.
2022-05-04 14:57:19 +08:00
FranklinDM 6d480d82a5 Issue #1658 - Part 6: Break and return no control flow for jumps emitted by optional chains under IonBuilder
IIUC, we want to process the GOTO in the case of optional chains, and we do not satisfy the requirements mentioned in the comment of snoopControlFlow's caller. Optional chains are not loops, we (probably) don't have a loop in the instruction following the GOTO, and in the GOTO destination, we're either returning an undefined/null value or the actual value.
2022-05-04 14:57:18 +08:00
FranklinDM fa72aef363 Issue #1658 - Part 5: Add and initialize TDZ check to optional chaining emitter
Partially based on: https://bugzilla.mozilla.org/show_bug.cgi?id=1685260
2022-05-04 14:57:18 +08:00
FranklinDM 2ed7526705 Issue #1658 - Part 4: Fix optional chaining assertions and remove unreachable code
This includes the following:

Bug 1611777 - Part 1: Report syntax error for optional property access in self-hosting code. r=yulia!
Bug 1611777 - Part 2: Merge same blocks in emitDeleteOptionalChain(). r=yulia!
Bug 1611777 - Part 3: N/A
Bug 1611777 - Part 4: `super` can't occur on the left-hand side of an optional chain
Bug 1611777 - Part 5: Remove unnecessary super-handling in optional delete. r=yulia!
The child node of a DeleteOptionalChainExpr node can't be a super-property
accessor, so we can remove this code.

Bug 1611777 - Part 6: Crash for unexpected super-base in optional call. r=yulia!
Bug 1611777 - Part 7: Add missing entries to list of valid optional chain start expressions. r=yulia!
Bug 1611777 - Part 8: Add missing emitGet in emitOptionalElemExpression. r=yulia!
Aligns emitOptionalElemExpression() with emitOptionalDotExpression(), so it's
easier to compare both methods against each other.

Bug 1611777 - Part 9: Replace an if-statement with an assertion. r=yulia!
Bug 1611777 - Part 10: N/A
Bug 1611777 - Part 11: Support optional chaining in class heritage expression. r=yulia!
Bug 1611777 - Part 12: Use optionalExpr() for update expressions to match spec grammar. r=yulia!

Using optionalExpr matches the spec grammar more closely. This change also
modifies the reported error message. ++a?.b reported before this change
"unexpected token: '?.'", but now reports "invalid increment/decrement operand".

Bug 1611777 - Part 13: N/A
Bug 1611777 - Part 14: Simplify two lines in optionalExpr(). r=yulia!

We don't need to test for tt == TokenKind::Eof when we return for tt != TokenKind::OptionalChain anyway. Omit local variable for the result value and instead use a tail-call. This matches the local style in the parser more closely.

Bug 1611777 - Part 15: Support FunCall/FunApply optimisations for optional chaining. r=yulia!
Bug 1611777 - Part 16: Pass through ValueUsage in optional chains. r=yulia
2022-05-04 14:57:17 +08:00
FranklinDM 9ecfdbe358 Issue #1658 - Part 3: Implement support for optional chaining in JS reflection
Partially based on:
Bug 1610447 - Update Reflect to handle Optional Chaining operator
Bug 1657835 - Assertion failure: false, at js/src/builtin/ReflectParse.cpp:3168
2022-05-04 14:57:16 +08:00
FranklinDM 97dcd8009a Issue #1658 - Part 2: Implement bytecode for optional chaining
Partially based on:
Bug 1566143 - Implement the Optional Chaining operator (?.) proposal
Bug 1650340 - Fix deleteElementInOptionalChain
Bug 1644839 - Fix return value of emitOptionalChain on failure
2022-05-04 14:57:16 +08:00
FranklinDM e1fc99d6ef Issue #1658 - Part 1: Implement support for optional chaining in the JS Parser
Partially based on: https://bugzilla.mozilla.org/show_bug.cgi?id=1566143
2022-05-04 14:57:15 +08:00
athenian200 0de24cc207 Merge pull request 'Allow /bin/sh to be used as a fallback value when SHELL is not set.' (#1888) from athenian200/UXP:shell_detection into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1888
2022-05-04 01:05:04 +00:00
Jeremy Andrews 28ad4a4b7c Issue #1887 - Allow /bin/sh to be used as a fallback value when SHELL is not set. 2022-05-03 20:01:09 -05: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
Moonchild f41a43acf2 Revert "No Issue - Make content-type on JAR channels behave the same as HTTP channels."
This reverts commit 425677ada7.
2022-05-03 17:37:28 +00:00
Moonchild 1dd2c05377 Update 7zSD for v31 2022-05-03 17:07:38 +02:00
Moonchild f48c32ebc1 New cycle master 2022-05-03 11:27:24 +00:00
FranklinDM b0b90b81f3 [Toolkit] Set an icon for the default handler 2022-05-03 11:15:20 +00:00
Moonchild 6f9c302a32 Issue #1860 - Back out the change to vector for DisplayLists
A safe implementation means significant performance loss, making this change
undesirable.
2022-05-03 11:10:30 +00:00
FranklinDM a3bee9a6a8 Issue #1860 - Follow-up: Prevent duplicate display items by checking for its existence in the vector first before adding items
Performance impact unknown, resolves crashes on some sites that encounter this scenario.
2022-05-03 09:18:48 +00:00
FranklinDM 26d1ff2bd6 Issue #21 - Remove run phase property and constants from XPIProvider.jsm
These were introduced in Bug 853388 for the sole purpose of tracking the current startup phase for telemetry
2022-05-03 09:15:47 +00:00
FranklinDM 825ae7cb05 Regenerate developer tools' static CSS properties database 2022-05-03 09:15:15 +00:00
FranklinDM 2302734e6f Fix property alias indentation 2022-05-03 09:15:05 +00:00
FranklinDM 40c0791320 Fix generation of developer tools' static CSS properties database
- Remove `resolve_path` method and use `mozpath` instead for path operations
- Store target developer tools path as an instance variable to avoid duplicate checks for path existence
2022-05-03 09:14:57 +00:00
FranklinDM ab0be54f2d Issue #1853 - Follow-up: Add missing end of array marker to scrollbar width keyword table
This prevents the parser from accepting values outside the keyword table.
2022-05-03 09:14:47 +00:00
Moonchild 6b4ef9af48 Merge branch 'vpx-format-update' 2022-05-02 00:16:10 +00:00
Moonchild 425677ada7 No Issue - Make content-type on JAR channels behave the same as HTTP channels.
That is, treat it as a hint if called before open, and as an override if called
after. Override the hint on open.
2022-05-01 12:15:08 +00:00
Moonchild 633728842e Merge branch 'master' into vpx-format-update 2022-05-01 09:28:43 +00:00
Moonchild bc2841f9f9 Merge pull request 'Restore Mac OS X code and buildability' (#1886) from dbsoft/UXP:1829 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1886
2022-04-29 07:20:46 +00:00
Brian Smith d78e03d528 Merge branch 'master' into 1829
* master:
  No issue - Update README and SECURITY
  Issue #1885 - Follow-up: Update error message if invalid rootMargin specified.
  Issue #1879 - Follow-up: Update config/external/nss/target to security/target.
  Issue #1885 - Allow unitless rootMargin entries for IntersectionObserver.
  Issue #1879 - Revert changes to cryptox.h
  Revert "Issue #1879 - spot-fix typo in cryptox.h"
  Issue #1879 - spot-fix typo in cryptox.h
  Issue #21 - Change MappedAttrParser to store its nsIPrincipal instead of nsSVGElement
  Issue #21 - Remove use counters telemetry
  Issue #1881 - Interpret empty or whitespace root margin string as zero length
  Issue #1877 - Resolve NIGHTLY_BUILD conditionals.
  Issue #1880 - Boot Comic Sans out of the font configuration.
2022-04-28 20:27:47 -05:00
Brian Smith bebeb4e26a Issue #1829 - Build system fixes.
Readd de-unified source changes that got clobbered by commit 378738aaa9.
Fix build issues using clang broken by commit 39f9ab375b.
2022-04-28 14:21:17 -05:00
Moonchild bf110158b9 Issue #1820 - Part 8: Check bit depth in PDM::Supports. 2022-04-27 16:08:36 +00:00
Moonchild 983a87a9d7 Issue #1820 - Part 7: Check bit depth in WebMDecoder to determine if we support HDR. 2022-04-27 12:34:59 +00:00
Moonchild bf8359c704 Issue #1820 - Part 6: Extract bit depth information from codec parameter string
into VideoInfo::mBitDepth.
2022-04-27 12:34:26 +00:00
Moonchild 4e5b100cca Issue #1820 - Part 5: Add mBitDepth field to VideoInfo. 2022-04-27 11:12:39 +00:00
Moonchild a874f27b5a Issue #1820 - Part 4: Add a gtest for testing the extraction function. 2022-04-27 11:03:38 +00:00
Moonchild 6b2f1524f8 Issue #1820 - Part 3: Use Codec detail extractor helper to tell if it's a new
style VP8/VP9 codec string.
2022-04-27 10:28:18 +00:00
Moonchild 93b170e629 Issue #1820 - Part 2: Add VP9-in-MP4 support to the decoder
This also adds support in StageFright for VP9.0 FourCCs and consolidates
individual string checks to helpers for WebM
2022-04-27 10:27:49 +00:00
Moonchild 33523f5d5e No issue - Update README and SECURITY
- thereisonlyxul is no longer a thing.
- minor wording update.
2022-04-27 00:14:54 +00:00
Brian Smith 1eaadfbc8d Issue #1829 - Readd code cleanup that is not Mac related that got clobbered by reverting Issue #1751 2022-04-26 15:57:19 -05:00
Brian Smith 0102047d68 Issue #1829 - Fix psutil python extension on MacOS and potentially FreeBSD
Compilation failed due to missing sys/ioctl.h header on MacOS and FreeBSD. Call to function ioctl() with no prototype.  This was non-fatal due to the psutil component being optional.
2022-04-26 13:26:41 -05:00
Brian Smith b07c898b06 Issue #1829 - Readd a fix for Big Sur not loading libraries such as OpenGL.
This fix was included earlier but got clobbered by a recent NSPR update.
2022-04-26 13:25:29 -05:00
Brian Smith 6dd43c3e2f Issue #1829 - Fix Mac breakage due to removal of Telemetry. 2022-04-26 13:24:10 -05:00
Moonchild b9b1abc871 Issue #1820 - Part 1 : Add an extraction function to parse the RFC-6381 VP9 codec string. 2022-04-26 17:32:29 +00:00
Brian Smith 768231cf6a Issue #1829 - Revert "Issue #1751 - Remove MacOS support from configure"
This reverts commit d3543ca2fe.
2022-04-26 11:34:08 -05:00
Brian Smith c82b759d56 Issue #1829 - Revert "Issue #1751 -- Remove XP_MACOSX conditionals from /dom"
This reverts commit 0dd3424f77.
2022-04-26 11:24:42 -05:00
Brian Smith 9e2a89c71d Issue #1829 - Revert "Issue #1751 -- Remove XP_DARWIN"
This reverts commit 3d671e4275.
2022-04-26 11:07:23 -05:00
Brian Smith 68d1c14bdf Issue #1829 - Revert "Issue #1751 -- Remove files unused without XP_DARWIN"
This reverts commit cd1f724135.
2022-04-26 11:01:55 -05:00
Brian Smith b73c17b7c6 Issue #1829 - Revert "Issue #1751 -- Remove XP_MACOSX conditionals and support files from /gfx"
This reverts commit 616b39413d.
2022-04-26 10:59:55 -05:00
Brian Smith 1a31160dde Issue #1829 - Revert "Issue #1751 -- Remove XP_MACOSX conditionals and support files from /xpcom"
This reverts commit 1bf0734a72.
2022-04-26 10:56:11 -05:00
Brian Smith e764f258e2 Issue #1829 - Revert "Issue #1751 -- Remove XP_MACOSX conditionals from /layout"
This reverts commit aa0fd3d68c.
2022-04-26 10:21:29 -05:00
Brian Smith 3daf711085 Issue #1829 - Revert “Issue #1751 -- Remove XP_MACOSX conditionals from the rest of the tree.”
This also removes some PP abuse and takes file entries out of PP when no longer
needed without XP_MACOSX conditionals.

This reverts commit 6f707bde95.
2022-04-26 10:19:04 -05:00
Brian Smith 7fe7026030 Issue #1829 - Revert "Issue #1751 -- fix up a few stray #ifs"
This reverts commit e7e63565ee.
2022-04-26 10:19:04 -05:00
Brian Smith 93407295fc Issue #1829 - Revert “Issue #1751 -- Remove cocoa support code from /dom”
This reverts commit ca35efb84e.
2022-04-26 10:19:03 -05:00
Brian Smith db8d2ef672 Issue #1829 - Revert "Issue #1751 -- Remove cocoa and uikit widget support code"
This reverts commit 08da125d9c.
2022-04-26 10:19:03 -05:00
Brian Smith f4f9b0cec7 Issue #1829 - Revert "Issue #1751 -- Update crashtests"
This reverts commit b5ece9f771.
2022-04-26 10:19:02 -05:00
Brian Smith adf51bc0f5 Issue #1829 - Revert "Issue #1751 -- Remove cocoa and uikit gfx and hal support code"
This reverts commit 1ee35eafa0.
2022-04-26 10:19:02 -05:00
Brian Smith 378738aaa9 Issue #1829 - Revert “Issue #1751 - Remove Mac code behind MOZ_WIDGET_TOOLKIT == 'cocoa’”
This reverts commit 1fe9c19305.
2022-04-26 10:19:00 -05:00
Moonchild c482078b09 Merge pull request 'Remove use counters telemetry' (#1883) from FranklinDM/UXP-contrib:work_telemetry-use-counters-removal into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1883
2022-04-26 08:14:02 +00:00
Brian Smith 82f11ad8aa Issue #1829 - Revert "Issue #1751 - Remove Mac/ARM C fallback on gcc from pixman"
This reverts commit 2215d8467e.
2022-04-25 20:27:54 -05:00
Moonchild 72ff18e58e Issue #1885 - Follow-up: Update error message if invalid rootMargin specified. 2022-04-25 13:52:17 +00:00
Jeremy Andrews a0bdc21cf5 Issue #1879 - Follow-up: Update config/external/nss/target to security/target. 2022-04-24 15:03:59 -05:00
Moonchild 42ee994d99 Issue #1885 - Allow unitless rootMargin entries for IntersectionObserver.
I could have done this through a CSSLoader to allow all CSS unit quirks but
I wasn't planning to start passing around document and element references
everywhere, so instead just did it manually by accepting numbers/floats in
addition to pixel and percent.
2022-04-24 17:00:46 +00:00
Moonchild f25a45b9e6 Issue #1879 - Revert changes to cryptox.h
The error when removing this code was an #if vs #elif. But since we're planning
to restore MacOSX anyway, may as well rever the entire file here :)
2022-04-24 15:52:33 +00:00
Moonchild 677085e0c4 Revert "Issue #1879 - spot-fix typo in cryptox.h"
This reverts commit fbbcbffcc7.
2022-04-24 15:48:49 +00:00
Moonchild fbbcbffcc7 Issue #1879 - spot-fix typo in cryptox.h
Resolves #1879
2022-04-24 09:34:16 +00:00
Moonchild 5d5f72d4bc Merge pull request 'Interpret empty or whitespace root margin string as zero length for the IntersectionObserver' (#1882) from FranklinDM/UXP-contrib:work_inobsvr-empty-rootmargin-string into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1882
2022-04-24 09:28:37 +00:00
FranklinDM c8b89feae8 Issue #21 - Change MappedAttrParser to store its nsIPrincipal instead of nsSVGElement
This reverts part 2 of Bug 968923 since this was only modified to accommodate use counters.
2022-04-24 00:09:21 +08:00
FranklinDM 17b2aa7650 Issue #21 - Remove use counters telemetry
This reverts Bug 968923 - Implement some equivalent of Chrome's use counters (on top of telemetry?)

For reference: https://bugzilla.mozilla.org/show_bug.cgi?id=968923
2022-04-24 00:02:42 +08:00
FranklinDM 6f685140aa Issue #1881 - Interpret empty or whitespace root margin string as zero length
This attempts to get the first non-whitespace token, which if exists, continues with previous behavior of parsing the margin string. Otherwise, if the specified margin string is empty or consists only of whitespace characters, is interpreted as zero length.

IntersectionObserver is the only consumer of the `ParseMarginString` method, as far as I can tell, so this should not affect anything else.

Note: For some reason, Firefox and Chrome treat the unitless zero length as invalid, while with this change, we do not change existing behavior in that regard and continue to accept that value.
2022-04-23 19:34:31 +08:00
Moonchild 5aa65d2aea Issue #1877 - Resolve NIGHTLY_BUILD conditionals. 2022-04-22 13:58:16 +00:00
Moonchild 712ca7303b Issue #1880 - Boot Comic Sans out of the font configuration.
Resolves #1880
2022-04-22 13:18:55 +00:00
Moonchild 8c824b8a75 Merge pull request 'Implement :host and :host-context' (#1878) from webcomps-wchen into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1878
2022-04-20 19:33:34 +00:00
Jeremy Andrews 7aa445162e Issue #1593 - Part 5: Fix error that messes with event state detection.
Iterator changes between 42 and 52 were a bit confusing.
2022-04-19 21:48:36 +00:00
Jeremy Andrews 643e298a55 Issue #1593 - Part 4: Make :host pass DOM parsing test and basic specificity tests. 2022-04-19 21:45:51 +00:00
Jeremy Andrews f82c95d1eb Issue #1593 - Part 3: Add selector logic for :host and :host-context. 2022-04-19 21:44:23 +00:00
Jeremy Andrews 01747509f6 Issue #1593 - Part 2: Account for Shadow DOM v1 and iterator in nsBindingManager. 2022-04-19 21:43:21 +00:00
Jeremy Andrews 22b8e6b79f Issue #1593 - Part 1: Import William Chen's patches w/o selector implementation,
fixed up.
2022-04-19 21:42:11 +00:00
Moonchild f9b28d2006 Merge pull request 'Remove explicit SSL session cache cleanup' (#1875) from FranklinDM/UXP-contrib:work_nss-locks-assertion into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1875
2022-04-19 20:10:21 +00:00
Moonchild 185a027640 Issue #1877 - Resolve RELEASE_OR_BETA conditionals. 2022-04-19 17:38:02 +00:00
Moonchild 99ec088ecf No issue - Use UXP generic credentials if no module.ver is present. 2022-04-19 16:47:11 +00:00
Moonchild 062a5085b1 Bump milestone 2022-04-19 01:29:44 +00:00
Moonchild 65ed8de1fa Merge pull request 'Ensure UndisplayedMap handling code consistently uses a normalized parent' (#1874) from FranklinDM/UXP-contrib:work_frames-undisplayedmap-nmparent into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1874
2022-04-18 15:51:05 +00:00
Moonchild 2e34db5696 Merge pull request 'Bump minimum required GCC version in mfbt' (#1872) from trav90/UXP-contrib:compiler-hacks-cleanup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1872
2022-04-18 15:44:50 +00:00
FranklinDM 3a565183f0 Issue #738 - Follow-up: Remove explicit session cache cleanup routine from ShutdownNSS
This is no longer needed because the call to SSL_ConfigServerSessionIDCache on startup was already removed (see 1425f020c4), meaning LocksInitializedEarly does not become true and only causes an assertion on debug builds.

On the other hand, SSL_ClearSessionCache is already called on XPCOM shutdown and calling it again here is redundant.

Additional context: https://bugzilla.mozilla.org/show_bug.cgi?id=1485087#c5

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1485087
2022-04-18 23:44:27 +08:00
FranklinDM 7ed9c249be Issue #1873 - Part 3: Fix indentation 2022-04-18 23:22:04 +08:00
FranklinDM 37c86f2c07 Issue #1873 - Part 2: Ensure normalized parent is used for UndisplayedMap handling code
We have four entry points that deal with the parents of display:none/ display:contents content. These are the functions for setting, changing, getting and removing a style context. Or more specifically:

GetStyleContextInMap called by GetDisplay[None|Contents]StyleFor

SetStyleContextInMap called by RegisterDisplay[None|Contents]StyleFor

ChangeStyleContextInMap called by ChangeRegisteredDisplay[None|Contents]StyleFor

UnregisterDisplay[None|Contents]StyleFor okay, this is actually two functions, but they act as a pair

This change makes all these functions call GetApplicableParent up front and act on and pass around the parent that it returns. This is so that throughout the code we are always handling the parent that will be used as the key in the UndisplayedMap entry. This is necessary so that all the code that sets/gets the 'MayHaveChildrenWithLayoutBoxesDisabled' bit on/from an nsIContent object is using the same object, otherwise everything breaks down.

Partially based on part 2 of https://bugzilla.mozilla.org/show_bug.cgi?id=1367214
2022-04-18 23:21:58 +08:00
FranklinDM 8d8da66f94 Issue #1873 - Part 1: Introduce ParentForUndisplayedMap helper method
This introduces the `ParentForUndisplayedMap` helper method to reduce duplication in terms of getting the parent and asserting parent existence.

Partially based on parts of https://bugzilla.mozilla.org/show_bug.cgi?id=1341083
2022-04-18 23:21:22 +08:00
Moonchild 145947d86b Issue #1860 - Follow-up: Fix indentation. 2022-04-18 14:47:04 +02:00
Moonchild c2b4aa8cf2 Issue #1860 - Follow-up: Make sure we don't add duplicate frames
Changing to vector makes manipulating display list items more risky.
This is to make sure we don't inadvertently end up with duplicates in
the list of display items avoiding double-free scenarios.
2022-04-18 14:31:55 +02:00
Moonchild 129bb5568d Merge pull request 'Change LayerManagerData::mDisplayItems to a vector instead of hashtable' (#1866) from win7-7/UXP:pr-1860 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1866
2022-04-18 12:01:00 +00:00
win7-7 5b84c3e982 Merge branch 'master' into pr-1860 2022-04-18 13:15:28 +03:00
Moonchild 3abcec5d8b Merge branch 'lzma-updater' 2022-04-18 01:37:21 +02:00
Moonchild 6466bf6f5b Issue #1859 - Build xz-embedded lib when the updater is built. 2022-04-17 20:12:53 +02:00
Moonchild f4e8585e60 Merge pull request 'Follow-up: Prevent grid shorthand from resetting gutter properties' (#1871) from FranklinDM/UXP-contrib:work_css-grid-noreset-gutter-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1871
2022-04-17 17:31:01 +00:00
Moonchild cc231f0a26 Merge pull request 'Set canonical name for trimStart and trimEnd functions' (#1870) from FranklinDM/UXP-contrib:work_js-selfhosted-trim-assertion into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1870
2022-04-17 17:29:58 +00:00
FranklinDM 86b17cfb4a Issue #1838 - Follow-up: Prevent grid shorthand from resetting gutter properties
This also fixes crashing when using the grid shorthand property.
2022-04-18 01:24:20 +08:00
Moonchild d2a4597cfc Issue #1859 - Part 6: Update mach mar to accept --bz2 for old style MAR
So we can build bzip2 MARs for selectively updating older versions of
the applications that don't understand xz.
2022-04-17 19:21:40 +02:00
Moonchild 43165d9edb Issue #1859 - Part 5: Add format detection to unwrap_full_update.pl 2022-04-17 19:21:30 +02:00
Moonchild 88624edc98 Issue #1859 - Part 4: Update mar file generation scripts for use of xz.
- Update packaging scripts to support both lzma and bzip2
- Update python script to support lzma
- Update test scripts to support lzma to be thorough

This all requires xz to be available in the path on the build system.
2022-04-17 19:21:20 +02:00
Moonchild c58e7c72b4 Issue #1859 - Part 3: Replace bzip2 handling in MAR files with xz.
Since there really is no need to add file detection logic to the updater
if updating through AUS is old->new only anyway, replacing bzip2
handling with xz handling is fine, instead of adding it.
Considering the far superior compression of LZMA and MAR not being
a common archive format anyway, let's just K.I.S.S. it :)
2022-04-17 19:21:09 +02:00
Moonchild 8bbfcc4c81 Issue #1859 - Part 2: xz-embedded build config changes
Always build as static lib for use in updater.
2022-04-17 19:20:59 +02:00
FranklinDM f2ad2ba0de Issue #1382 - Set canonical name for trimStart and trimEnd functions
This is needed to fix the assertion on debug builds that self-hosted functions must have consistent names, as these two functions are aliased to `trimLeft` and `trimRight`.
2022-04-18 01:12:25 +08:00
Moonchild 2af23767e1 Issue #1834 - Remove obvious entries for Binary Outcast code. 2022-04-17 11:21:48 +02:00
FranklinDM bb9700d982 Issue #1370 - Follow-up: Give table wrapper boxes a special case during flex base size resolution, so that percent main-sizes can be respected
This is a workaround, based on https://bugzilla.mozilla.org/show_bug.cgi?id=1455976
2022-04-17 11:03:22 +02:00
trav90 077b053ba4 Issue #1531 follow-up - Bump minimum required GCC version in mfbt 2022-04-16 21:12:11 -05:00
Moonchild 279ed4a9cf Merge pull request 'Fix building with GCC 11' (#1868) from trav90/UXP-contrib:gcc-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1868
2022-04-17 01:16:32 +00:00
trav90 5f8057cbed Issue #1804 - Fix building with GCC 11 2022-04-16 19:15:44 -05:00
Moonchild 95cda916d1 Merge pull request 'Cache the most recent nsGenConNode to speed up future insertions' (#1867) from win7-7/UXP:pr-1861 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1867
2022-04-16 16:27:21 +00:00
Moonchild 08842d77ae Merge pull request 'Issue #1818 Cleanup some old GCC hacks' (#1865) from trav90/UXP-contrib:compiler-hacks-cleanup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1865
2022-04-16 16:23:23 +00:00
Moonchild 1191c9e371 Merge pull request 'Issue #1531 - Bump minimum required GCC version to 7.1' (#1858) from trav90/UXP-contrib:build-system-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1858
2022-04-16 16:13:03 +00:00
win7-7 4ea9a83b75 Merge remote-tracking branch 'Upstream/master' into pr-1861 2022-04-15 21:42:20 +03:00
Moonchild 9a2da3012a Issue #1864 - Fix IonBuilder::maybeMarkEmpty.
Look at the instruction's operands instead of the instruction itself,
and take an early exit on empty types.
2022-04-15 20:22:02 +02:00
win7-7 022ed72339 Merge remote-tracking branch 'Upstream/master' into pr-1861 2022-04-15 20:17:27 +03:00
trav90 f5c363c01d Issue #1818 - Part 4: always use -pipe with GCC
Usable GCC versions have supported -pipe for a VERY long time. There's no need to keep checking if it is supported.
2022-04-15 08:30:32 -05:00
trav90 41fc1ccf4d Issue #1818 - Part 3: Remove more old gcc compiler hacks. 2022-04-15 08:30:25 -05:00
trav90 7abed0e352 Issue #1818 - Part 2: Remove code for implementation of atomics with __sync
All supported compilers support using C++11 <atomic> natively, so implementing
this using GCC's old __sync functions is no longer necessary.
2022-04-15 08:30:16 -05:00
trav90 d430c6398b Issue #1818 - Part 1: remove a number of old GCC hacks. 2022-04-15 08:30:05 -05:00
win7-7 e44c44b749 Issue #1861 - Cache the most recent nsGenConNode to speed up future insertions.
Cache the most recent nsGenConNode to speed up future insertions.
2022-04-15 13:43:24 +03:00
win7-7 d347a1e0c6 Issue #1860 - Change LayerManagerData::mDisplayItems to a vector instead of hashtable
This should improve cache locality and help speed up layer building.
2022-04-15 13:39:58 +03:00
Moonchild 39ba93e1d7 Merge branch 'restore-dual-guid' 2022-04-15 01:32:54 +02:00
Moonchild 5cecc096a3 Issue #1821 - Pre-process AddonRepository.jsm 2022-04-14 22:13:57 +02:00
Moonchild 8feed35c61 Issue #1821 - Restore "dot" indicators
This also removes orange compat warning styling and associated strings.

Reverses the entirety of #1445
2022-04-14 20:03:05 +02:00
Moonchild 7b706516bc Issue #1821 - Revert "Issue #1744 - Remove the ability to accept Firefox
GUIDS (remove the dual system)"

This reverts commit 3aa334d0b7.
2022-04-14 20:02:49 +02:00
Moonchild 144b3844da Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2022-04-13 20:41:37 +02:00
Moonchild eb96f030b9 Issue #1859 - Part 1: Update xz-embedded library.
This also updates the script for updating and README.
2022-04-13 20:40:56 +02:00
Moonchild 981154dc48 [network] Add non-overrideable default MIME types for js, jsm and json.
This ensures the browser always recognizes these file type extensions
appropriately, even if not otherwise registered in the system.
2022-04-13 15:44:41 +02:00
Matt A. Tobin a0da6b5b68 No Issue - Update mach langpack with -v 2022-04-13 15:37:31 +02:00
trav90 bd99ce1461 Issue #1531 - Bump minimum required GCC version to 7.1 2022-04-12 10:06:02 -05:00
Moonchild bed3776982 Merge pull request 'Re-enable building of any XUL application via UXP toolkit' (#1856) from g4jc/UXP-contrib:build_blocker into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1856
Reviewed-by: Moonchild <moonchild@palemoon.org>
2022-04-12 02:53:43 +00:00
Gaming4JC ef236bef4f Re-enable non-comm-style XUL application builds with a warning
A check was placed here to ensure the platform is built comm-style e.g. 'your-application/UXP'. There are packaging instances where old-style is still used. This re-enables the old-style with a visual warning indicating that any failure is the responsibility of the application maintainter as this style is not supported by the platform.
2022-04-11 21:57:22 -04:00
Moonchild d90ce1e30a Merge pull request 'Follow-up: Remove grid preference check from developer tools' (#1855) from FranklinDM/UXP-contrib:work_css-grid-pref-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1855
2022-04-09 15:49:48 +00:00
FranklinDM bee1a6fe1c Issue #1838 - Follow-up: Remove grid preference check from developer tools 2022-04-09 22:15:18 +08:00
Moonchild f9caae6cfd Fix Mesa check + whitespace 2022-04-09 01:59:40 +02:00
Moonchild e10f9df9df Fix typo 2022-04-09 01:59:02 +02:00
Moonchild 7d87b7a270 [devtools] Restrict sourcemap URLs 2022-04-09 01:25:04 +02:00
Moonchild 3d43617bc1 [xpcom] xpcom Threadpool cleanup
Make sure thread locks are in place to guard accesses.
2022-04-09 00:33:41 +02:00
Moonchild ac9fdbf123 [js] Fix AliasSet of MLoadTypedArrayElementHole 2022-04-09 00:31:18 +02:00
Moonchild e6101f7fa6 No issue - Avoid WebGL crash on Mesa
This prevents too high vert-count draws that Mesa doesn't handle.
2022-04-08 22:55:27 +02:00
Moonchild 52bcfa36bf [XPCOM] xpcom/threads misc cleanup 2022-04-08 21:54:05 +02:00
Moonchild 6d9b8e43bf [NSS] Update NSS to 3.52.4 2022-04-08 21:44:21 +02:00
Moonchild ae8cc0e398 Issue #1836 - Implement Selection.setBaseAndExtent() 2022-04-08 20:28:55 +02:00
Moonchild 7d49b154e2 Issue #1840 - Try to deal with bad website scripting loading/unloading modules.
Apparently Bing does rapid-fire loading/unloading of module scripts that
causes our attempts at resolving and initializing them to end up with
null fetched modules.
Returning null is probably a better way to handle this than crashing
on ms->ModuleRecord() ;-)
2022-04-08 20:23:10 +02:00
Moonchild d5ae68701b Merge pull request 'Implement 'content' keyword for 'flex-basis' property and address spec changes' (#1854) from FranklinDM/UXP-contrib:work_css-flex-basis-content into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1854
2022-04-08 16:08:33 +00:00
Moonchild 330b866f46 Merge pull request 'Land final NSS-gyp work' (#1850) from nss-gyp-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1850
2022-04-08 13:07:17 +00:00
Moonchild edcbb85f5e Update 7zSD. 2022-04-08 15:05:09 +02:00
Moonchild c683df5483 No issue - Always build MAR support.
Even when there is no updater.
2022-04-08 15:04:57 +02:00
Moonchild 8862a2ebf7 [NSS] check for missing signedData field and bump version 2022-04-08 15:04:27 +02:00
Moonchild 82fa1fbf14 [DOM IndexedDB] Increase intermediate byte storage maximum capacity. 2022-04-08 15:04:04 +02:00
Paul Adenot faec3f2140 [DOM media] Handle truncated ADTS and MP3 resources. 2022-04-08 15:03:54 +02:00
Moonchild ab5f44b61d [devtools] Escape backtick characters 2022-04-08 15:03:43 +02:00
Moonchild c332210793 [interface] Make Windows non-ePopupLevelTop popups respect owner z-order 2022-04-08 15:03:34 +02:00
Yaron Tausky 6709388785 Bug 1650214 - Cancel progress timer when shutting down FileReader
Not canceling the timer when run in a worker could lead to the timer firing
after the primary worker runnable finished running, leading to an assertion
failure in cycle collector code.
2022-04-08 15:03:24 +02:00
Moonchild 2829b9387b [interface] Hold a self-reference in nsDataObj. 2022-04-08 15:03:12 +02:00
Moonchild 1e1a1e5c71 [DOM] Stop treating XSLT meta refresh as a special snowflake thing.
It's just not healthy. It'll get delusions of self-importance and go rogue.
Next thing you know it'll start identifying as other elements.
2022-04-08 15:03:02 +02:00
Moonchild 55d1aa0748 [interface] Don't block size mode changes. 2022-04-08 15:02:54 +02:00
Moonchild 9fd02b65e1 [win system] Update the list of delayed-loaded dlls
Primarily for those who custom-install and somehow mess up directory permissions
exposing themselves to dll injection attacks.
2022-04-08 15:02:20 +02:00
Steve Fink e6a9d13e64 [js] Add dynamic check for valid serialized length 2022-04-08 15:00:02 +02:00
Matt A. Tobin 8832bfb62f No Issue - Don't build the layout recorder unless debug 2022-04-08 14:58:33 +02:00
Moonchild 44e35f67b4 Issue #1853 - Follow-up: extend attribution mapping to resize and corner
controls to allow themes to respond to scrollbar-width.

Also clean up the comments and whitespace a bit.
2022-04-08 00:57:11 +02:00
Moonchild 56d9003017 Issue #953 - Neuter the user-facing controls for e10s
This should prevent people using a massive footgun that would blow off
their entire legs. Requires appropriate FE changes.
2022-04-08 00:55:37 +02:00
Moonchild e49b80dba7 Issue #1853 - Map scrollbar-width to an element attribute.
By mapping this to an attribute, this allows browser themes to respond to
the various available scrollbar width settings in CSS.
2022-04-08 00:40:49 +02:00
Moonchild 834ded7d18 Issue #1852 - Undo Stylo nonsense that breaks body and frame margins.
This restores support for using HTML tag styling of margins on the body.
Reftests post bug still pass for dynamic changes, so does the newly-added
test for body margins and frames that tests the old styling method.
This also removes the reftest list for stylo testing for obvious reasons.
2022-04-08 00:27:44 +02:00
Moonchild c617545914 Issue #1822 - Follow-up: Remove reputation check leftovers from jsdownloads. 2022-04-08 00:23:23 +02:00
Moonchild ee4e449e04 Issue #21 - Remove MOZ_SERVICES_HEALTHREPORT from old-configure.
Also remove irrelevant references from build docs.
2022-04-08 00:10:55 +02:00
Moonchild fd51da7587 Issue #1851 - Update embedded emoji font to Twemoji 13.1 (TM 0.6.0) 2022-04-08 00:01:44 +02:00
Moonchild e1a982d677 No issue - Fix a potential autocomplete issue.
Account for the case where we don't have a tree view in selectedIndex
setter which may break future autocompletes.
2022-04-07 23:57:37 +02:00
Moonchild b76d12c2bd [XPCOM] Use swap in nsThread::SetObserver. 2022-04-07 23:56:24 +02:00
Moonchild 57dffbd698 [DOM] Align XHR requests with the spec. 2022-04-07 23:55:45 +02:00
Moonchild e0e12932bc [Docshell] Implement reload flood guard 2022-04-07 23:54:44 +02:00
Olli Pettay 9a1e152ba3 [Docshell] Close ContentViewer properly if initialization fails. 2022-04-07 23:53:44 +02:00
Moonchild a9046dcd55 [Network] Escape external protocol handler URLs 2022-04-07 23:52:40 +02:00
Olli Pettay c265d1cb7c [DOM] Don't try to create too large string buffers 2022-04-07 23:49:05 +02:00
Moonchild d61076d50e No issue - Minor performance improvement in BidiUtils 2022-04-07 23:48:24 +02:00
Moonchild 43bed4dad8 [DOM] Fix handling of text fragments 2022-04-07 23:47:40 +02:00
Moonchild 3a27ace545 No Issue - Further optimize MSVC linker configuration
Minor update to linker configuration to leverage optimal amount of
threads and folding for the linker for the build hardware used.
2022-04-07 23:43:06 +02:00
Moonchild d3cc8bc1ae Issue #21 - Remove calls to Services.telemetry and nsITelemetry
These calls would cause breakage without the supporting plumbing.
2022-04-07 23:35:02 +02:00
Moonchild 4f6406f033 Issue #1847 - Clean up gyp[_base].mozbuild for Android removal. 2022-04-07 15:50:39 +02:00
Moonchild ce1c300502 Issue #1847 - Fixes for SunOS 2022-04-07 15:45:41 +02:00
Matt A. Tobin 6a0d77b68c Issue #1847 - Update generate_certdata.py so it matches what this
version of NSS expects.
2022-04-07 15:45:01 +02:00
Matt A. Tobin 3ceb3ee7ef Issue #1847 - Get NSS gyp to understand disabling avx2 in freebl 2022-04-07 15:44:14 +02:00
Matt A. Tobin 3adf5e5d9c Issue #1847 - Transfer build configuration to gyp 2022-04-07 15:43:28 +02:00
Matt A. Tobin b2ad7e8ed9 Issue #1847 - Updates to handle NSS
Bug 1295937
2022-04-07 15:42:57 +02:00
Matt A. Tobin 3b48d984b2 Issue #1847 - Restore build/gyp.mozbuild to m-esr52 state.
To do: remove android stuff again at the end.
2022-04-07 15:42:13 +02:00
Moonchild 02afcba614 Merge pull request 'Use RTTI when building protobuf with GCC' (#1849) from trav90/UXP-contrib:build-system-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1849
2022-04-07 13:38:57 +00:00
Travis W aed6c5eb62 Issue #1846 - Use RTTI when building protobuf with GCC 2022-04-07 13:15:18 +00:00
Moonchild 429a4cd9d7 Merge pull request 'Restore method that moves downloaded data's part file' (#1848) from FranklinDM/UXP-contrib:work_safebrowsing-removal-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1848
2022-04-07 10:37:33 +00:00
FranklinDM acf30bc5f4 Issue #1370 - Part 6: Update tests 2022-04-07 18:35:51 +08:00
FranklinDM ca38eaca70 Issue #1370 - Part 5: Regenerate developer tools' static CSS properties database 2022-04-07 18:35:51 +08:00
FranklinDM 567ba7ede6 Issue #1370 - Part 4: Treat flex-basis: content as max-content
This uses a different approach and builds upon the refactoring made in the 576eb6ee01fb9ee3669cad634b26473c2886cab1.

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1374540
2022-04-07 18:35:50 +08:00
FranklinDM 79b640795a Issue #1370 - Part 3: Implement content keyword for flex-basis property
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1105111
2022-04-07 18:35:49 +08:00
FranklinDM 0b75a2a787 Issue #1370 - Part 2: Remove redundant special-case code for treating flex-basis enum values as 'auto' in vertical axis
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1436881
2022-04-07 18:35:48 +08:00
FranklinDM b8d18bace6 Issue #1370 - Part 1: Refactor nsFrame to use a separate function for handling flex-basis
This removes the need to keep the `flex-basis` handling code of the ComputeSize* functions in sync since they both call the same function now for this purpose.
2022-04-07 18:35:42 +08:00
FranklinDM ecbe89cd7d Issue #1822 - Follow-up: Restore method that moves downloaded data's part file
This commit fixes the issue where all downloaded files are empty/zero-byte by creating a new `_move` method, which is called in place of the removed `_checkReputationAndMove` method.

In 6042fdd44c the reputation check for downloads was removed but that same method is also being used for moving the part file of completed downloads, which consequently broke all downloads except those without a part file, and made them empty since the actual downloaded file isn't being moved.
2022-04-07 18:18:52 +08:00
Jeremy Andrews a7bb296293 Issue #1824 - Use Bash to check if config.status is up-to-date on SunOS.
The Python script here claims it can handle any Bourne-compatible shell, but the detection logic here really only works with GNU Bash. Not that there are that many Bourne-compatible shell implementations to compare against...
2022-04-06 23:51:45 +02:00
Moonchild 7da587d0aa Issue #21 - Remove unused telemetry build variables.
Hard-code the values in AppConstants.jsm for compatibility, even if
nobody should actually be using this in extensions or what not.
2022-04-06 23:48:37 +02:00
Matt A. Tobin ac50292859 Issue #1845 - Remove Marionette from toolkit.mozbuild
It even seems this was always forced enabled. :?
2022-04-06 23:42:28 +02:00
Matt A. Tobin 633a742916 Issue #1845 - Remove Marionette from mach_bootstrap.py 2022-04-06 23:29:58 +02:00
Moonchild 63b8aaa495 Issue #1845 - Remove Marionette files 2022-04-06 23:28:22 +02:00
Moonchild 4897e3653a Issue #184 - Get rid of embedding/ios 2022-04-06 23:19:49 +02:00
Moonchild af32d0b7d1 Issue #1843 - Expand on WindowsVersion.h to add later versions.
Needs future cleanup because of way too many named individual functions
and redundancy.
2022-04-06 22:56:00 +02:00
Jeremy Andrews e6c662b5c6 Issue # 1824 - Restore NSDISTMODE, and have SunOS use it by default.
To make a long story short, there's an old flag called NSDISTMODE that
was never added to old-configure so it could be passed down through the
build system to all the places it needs to go nowadays if used in your
.mozconfig, but which still sort of works when set as an environment
variable. If you leave it unset, it uses relative symlinks. However, it
has two other modes. One of them is "copy" and the other is
"absolute_symlink." Copy simply copies the files into the directory, and
absolute_symlink attempts to use absolute symlinks instead of relative
ones.

I've been wondering for a while now if there was a way to make the
shared library files in `dist/bin` that we use `./mach run` against
*not* be relative symlinks, and this seems to be that elusive technique.

It seems to be a part of the institutional memory that was all but lost
shortly after Netscape went under. You mostly see a few references to it
in NSS, NSPR, and the Makefiles in the `config` directory. And also
there is one reference in a Makefile in the application directory, which
seems to explains why application executables themselves usually aren't
symlinks:

/platform/libs/nspr/src/pr/src/md/unix/Makefile.in#76
/platform/libs/nss/src/coreconf/UNIX.mk#34
/palemoon/app/Makefile.in#30
/platform/config/config.mk#396

My patch essentially revives NSDISTMODE and makes it work as intended
again, more or less. Some parts of the work are loosely inspired by this
bug that was never finished upstream, showing that Mozilla only
rediscovered it earlier this year while trying to disable symlinks in
dist/bin for WSL, as far as I can tell.

https://bugzilla.mozilla.org/show_bug.cgi?id=1699855
2022-04-06 00:04:36 +02:00
Moonchild 6abe7e7914 Issue #1795 - Don't try to pass a dash array of > 16 elements to ExtCreatePen.
According to MSDN documentation, the count of the style array passed to
ExtCreatePen is limited to 16. When we call ExtCreatePen with cStyle=17 or more,
it simply returns an error and the cairo surface used for printing is getting
into an error state, after which nothing further gets printed.
Instead of erroring out, this code change returns an unsupported status so that
cairo will provide fallback handling for it.
2022-04-05 19:42:46 +02:00
David Major 7ab66b1c6a Issue #1795 - Reapply bug 624198 fix that got lost in an upstream update. 2022-04-05 19:41:10 +02:00
Moonchild df3eed4ef9 Issue #1795 - Increase the MAX_FONT_SIZE limit applied in cairo_ft_font
to match the Thebes gfxFont size limit.

Also adds synching comments just to be sure.
2022-04-05 19:39:53 +02:00
Moonchild 804d0f6604 Issue #1795 - Add closure point to bounds calculation.
This addition of a closure point (explicitly completing the closed shape) isn't
strictly needed in our current cairo version as it works perfectly fine without,
but if our clipping extents code changes then this might cause problems if the
extra point isn't added (in case of 0-length paths).
2022-04-05 19:25:09 +02:00
Moonchild 327f5499ca Issue #1795 - Extend cairo API with an explicit font_get_hint_metrics function.
This extension allows us to get font hint metrics without having to create and
destroy cairo font options structs. Since this is used in loops, this will
improve performance, especially in documents which have many text segments.
2022-04-05 19:23:28 +02:00
Moonchild 97f911427a Issue #1795 - Remove support for building without DirectWrite. 2022-04-05 19:21:29 +02:00
Moonchild 3b575dfced Revert "Merge pull request 'Update libcubeb to latest version' (#1812) from athenian200/UXP:libcubeb_final into master"
This reverts commit 0bc66e3b04, reversing
changes made to 6e6b5d8996.
2022-04-05 17:00:28 +02:00
athenian200 0bc66e3b04 Merge pull request 'Update libcubeb to latest version' (#1812) from athenian200/UXP:libcubeb_final into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1812
2022-04-05 13:35:47 +00:00
Moonchild 6e6b5d8996 Issue #1795 - Update libpixman 2022-04-05 14:51:06 +02:00
Moonchild 12635c1c22 Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2022-04-04 22:27:31 +02:00
Moonchild 4c0d99d173 Issue #457 - Silence warnings in libcairo and libpixman.
We know these issues exist due to it being old 3rd party code.
2022-04-04 22:22:24 +02:00
Moonchild 8399d85036 Issue #1841 - Part 3: Remove the Direct3D9 compositor. 2022-04-04 22:16:37 +02:00
Moonchild ef5083db5f Issue #1841 - Part 2: Remove D3D9 layer compositor references and
layer fallback code.
2022-04-04 22:15:34 +02:00
Moonchild cff9ef7fb8 Issue #1841 - Part 1: Ignore the values for D3D9 preferences, forcing
them to their current default, in preparation for the removal.
2022-04-04 22:14:00 +02:00
Moonchild 124a5a8eb7 Issue #457 - Fix double -> float warning in gfxUtils. 2022-04-04 22:08:36 +02:00
Moonchild a9376e01cb [layout] Hold strong references to delayed menu command events. 2022-04-04 22:07:00 +02:00
Moonchild 8884db9790 [DOM/XSLT] Pass sandbox flags from source doc. 2022-04-04 22:06:43 +02:00
Moonchild 28a69cf1e2 Use brace initialization for Atomics.
Remind me to always build BEFORE committing :P
2022-04-04 22:06:25 +02:00
Moonchild bdfc1adbd2 [network] Make several variables atomic in nsSocketTransport2.
Fixes potential thread races between:
- nsSocketTransport::OnInputClosed and nsSocketTransport::OpenInputStream.
- nsSocketTransport::OnOutputClosed and nsSocketTransport::OpenOutputStream.
- nsSocketTransport::Close and nsSocketTransport::RecoverFromError called from
  OnSocketDetached.
2022-04-04 22:06:07 +02:00
Moonchild f990d9a46a [network] Use a COM pointer instead of NS_ADDREF in nsSocketTransport2.cpp 2022-04-04 22:05:50 +02:00
Moonchild 497e453fe7 [network] Align IDN normalization with the current spec. 2022-04-04 22:05:33 +02:00
Moonchild 7dec0edf50 [network] Tighten checks for ACE (punycode) encoding. 2022-04-04 22:05:15 +02:00
Moonchild 97ee3ee428 [network] Clean up IDN logic and add some corner case use. 2022-04-04 22:04:54 +02:00
Moonchild 18cfe514ab Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2022-04-04 17:34:00 +02:00
Moonchild 15aafa8a46 Revert "Issue #1806 - Part 1: Update cubeb"
This reverts commit 711e049432.
2022-04-04 17:33:26 +02:00
Moonchild 757a30f720 Revert "Issue #1806 - Part 2: Adjust the platform for lib changes"
This reverts commit 3635039d2b.
2022-04-04 17:33:15 +02:00
Moonchild 78d1f68932 Merge pull request 'Support updated box alignment spec on gap properties' (#1839) from FranklinDM/UXP-contrib:work_css-boxalign-gap into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1839
2022-04-04 01:47:29 +00:00
FranklinDM b226f8942d Issue #1838 - Part 7: Update tests 2022-04-02 23:14:36 +08:00
FranklinDM f1c2ba75d1 Issue #1838 - Part 6: Re-resolve row-gap against the sum of row track sizes for auto-sized grid containers
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1458902
2022-04-02 23:14:30 +08:00
FranklinDM f3707e0637 Issue #1838 - Part 5: Address follow-up issues to initial flexbox layout for (column|row)-gap properties
Notes:
* Bug 1473044 - Make flexbox cross size take row/column gap into account
https://bugzilla.mozilla.org/show_bug.cgi?id=1473044
* Bug 1473047 - Re-resolve row-gap percentages after intrinsic block size calculated
https://bugzilla.mozilla.org/show_bug.cgi?id=1473047
* Bug 1612401 - Prevent absolute-positioned children from contributing gap size to flexbox's inline-size
https://bugzilla.mozilla.org/show_bug.cgi?id=1612401
* Bug 1639627 - Make flex-container percent 'row-gap' values resolve to 0, when they're resolved against an indefinite block-size (essentially reverts Bug 1473047)
2022-04-02 23:14:25 +08:00
FranklinDM ed8d7f1391 Issue #1838 - Part 4: Implement flexbox layout for (column|row)-gap properties
This implements flexbox layout for the gap properties without the refactoring work performed on `nsFlexContainerFrame`.

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1398483 and https://bugzilla.mozilla.org/show_bug.cgi?id=1454822

This excludes the second part of bug 1454822, the width caching implementation, because it is out of scope and currently causes unstable layout with `writing-mode: vertical-lr` (see bug 1709937).
2022-04-02 23:14:18 +08:00
FranklinDM 7e975c2c5b Issue #1838 - Part 3: Regenerate developer tools' static CSS properties database 2022-04-02 23:14:09 +08:00
FranklinDM 4608ae53aa Issue #1838 - Part 2: Remove grid- prefix from grid-(column|row)-gap properties
This removes the `grid` prefix from the gap-related properties of grid since they are now part of the box alignment specification. Former grid-gap* properties were aliased to the unprefixed properties to maintain compatibility.

The previously multi-column layout only `column-gap` property has been modified to apply to the Grid layout (and Flexbox in a following commit), moving the `mColumnGap` member variable from `nsStyleColumn` to `nsStylePosition`.

Notes:
* Bug 1398537 - support for percent values in column-gap for multi-column layout landed as part of Issue #1230. However, it was incomplete because it did not update `nsRuleNode` to allow transformation of percentage values for `column-gap`. This was consequently fixed as part of this commit.
* Bug 1456166 - this might not apply because we don't have that devtools test in UXP
* `nsRuleNode`, `nsCSSParser`, `Declaration`, and other related classes were merged into Stylo. These should be taken into consideration when porting patches from Mozilla.

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1398482
2022-04-02 23:14:04 +08:00
FranklinDM 121ee9438c Issue #1838 - Part 1: Remove CSS grid preference
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1398492
2022-04-02 23:13:54 +08:00
Moonchild ba4eba034f Issue #21 - Remove telemetry from PopupNotifications.jsm. 2022-04-02 14:51:59 +02:00
Moonchild 534de5cc5b Issue #21 - Remove remaining telemetry structs, callers and flags. 2022-04-02 14:49:45 +02:00
Moonchild 023a71c6f2 Issue #21 - Remove Telemetry from Accessibility, EME and WebRTC. 2022-04-02 14:48:02 +02:00
Moonchild c83282fd4d Issue #21 - Remove Telemetry from Push and devtools. 2022-04-02 14:45:36 +02:00
Moonchild d60103257e Issue #21 - Remove Telemetry accumulation/structures from toolkit js.
This fixes toolkit modules and prevents toolkit component breakage.
Also removes about:telemetry
2022-04-02 14:42:57 +02:00
Moonchild ee86d3eb9c Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and
additional js module changes (next part).
2022-04-02 14:39:54 +02:00
Moonchild d0acadd727 Issue #1806 - Follow-up: Fix WebRTC issues with cubeb update. 2022-04-02 14:36:54 +02:00
Matt A. Tobin 9a811901ef No Issue - Make building the backend fun again! 2022-04-02 14:27:46 +02:00
Matt A. Tobin 4a7af0d90f Issue #1835 - Part 2: Remove config and most mentions of XULRunner
Resolves #1835
2022-04-01 17:33:23 +02:00
Matt A. Tobin 0f52679d2e Issue #1835 - Part 1: Remove /xulrunner application dir. 2022-04-01 17:27:20 +02:00
Moonchild e00bc543ad [No issue] Don't rely on nsCRT from jsdate. 2022-04-01 17:19:24 +02:00
Jeremy Andrews 1e8c040307 No Issue - Clean-up stray right parenthesis 2022-04-01 17:17:29 +02:00
Moonchild 7c90c0205c Issue #1822 - Part 4: Remove URL classifier and internal blocklist errors.
This removes NS_ERROR_{TRACKING|MALWARE|PHISHING|UNWANTED|BLOCKED}_URI
that are no longer in use.
2022-04-01 16:05:02 +02:00
Moonchild a95439db61 Issue #1822 - Part 3: Remove LOAD_CLASSIFIER_URI and various
helper functions.
2022-04-01 16:03:01 +02:00
Andrea Marchesini f5fcb8a32c Issue #1833 - Get rid of ArchiveReader API 2022-04-01 15:53:22 +02:00
Moonchild ce0cefe053 Issue #1053 - Second pass remove android defines and build system stuff.
Mostly IPC, tools and mozbuild.
2022-04-01 15:47:43 +02:00
Matt A. Tobin 35e7103093 No Issue - Remove Mozilla source tree bootstrapping python module
Part of Mozilla's DaaS, "bootstrapping" the tree is heavily dependent on
Mozilla infrastructure, m-c structure and dependencies, libs, toolchain,
etc. and would never work for us. Sweeping some clutter, in other words.

This copies in a function that was imported from mozboot to satisfy deps.
2022-04-01 15:35:04 +02:00
Moonchild 426a9755d9 Issue #1053 - Remove Android systrace, more build system removals.
Also updates more comments.
2022-04-01 15:28:15 +02:00
Moonchild c14bb310ce Issue #1053 - Clean up docs and some code comments.
Polish only, no code changes.
2022-04-01 15:26:49 +02:00
Moonchild ccee5c781b Issue #1053 - Remove android-ndk from mozconfigure. 2022-04-01 15:25:14 +02:00
Moonchild d5934d65de Issue #1053 - Remove some Android compiler/runtime bug workarounds. 2022-04-01 15:23:31 +02:00
Moonchild 39f9ab375b Issue #1053 - Remove /dom/system/android and dependent modules,
as well as robocop.
2022-04-01 15:22:15 +02:00
Moonchild 28a3cd1028 Issue #1053 - First pass Android defines and remove Android Annotation
processors, some Andoid packaging stuff, Eclipse IDE support et al.
2022-04-01 15:17:54 +02:00
Moonchild f987138760 Issue #1053 - Remove Android WebGL/EGL extensions. 2022-04-01 15:16:42 +02:00
Moonchild 1803c596dc Issue #1822 - Part 2: Remove Google API key parsing in URLS. 2022-04-01 15:12:20 +02:00
Moonchild 6042fdd44c Issue #1822 - Part 1: Remove Google Safebrowsing plumbing
This removes support for querying Google services for reputation data
for sites and downloads.
2022-04-01 15:10:04 +02:00
Jeremy Andrews c56023163b Issue #1832 - Account for shadow boundaries in nsFrameManager.
Resolves #1832
2022-04-01 15:00:11 +02:00
Moonchild 1caa678592 Issue #1831 - Add an option to enable TLS 1.3 "compatibility" mode.
Critical note: this potentially reduces the strength of TLS 1.3 and
should only be enabled if absolutely necessary to access a site.
A browser restart is required for the pref change to take effect as it
is set on NSS initialization.

Resolves #1831
2022-04-01 14:52:46 +02:00
Moonchild ddaee7c1be Issue #1830 - Remove --disable-xul config and conditionals. 2022-04-01 14:47:16 +02:00
Moonchild c030a50228 Issue #1721 - Implement GlobalPrivacyControl
(and get rid of failed DoNotTrack)
2022-04-01 14:41:51 +02:00
Moonchild e4c6db86b8 [WebRTC] Clean up encode callback during GMP release. 2022-04-01 14:40:31 +02:00
Moonchild a7b63631b0 No issue - Clean up some obsolete/archaic code paths. 2022-04-01 14:38:31 +02:00
Matt A. Tobin cdff23ad0b Bug 1340030 - Remove necko_standalone lib
The only users of this library were removed by Bug 1239866 and Bug 1239870 as part of the larger removal of libxpcomrt in Bug 1237409.

This was done before our fork point..
2022-04-01 14:32:45 +02:00
Matt A. Tobin 3635039d2b Issue #1806 - Part 2: Adjust the platform for lib changes 2022-04-01 14:31:39 +02:00
Matt A. Tobin 711e049432 Issue #1806 - Part 1: Update cubeb 2022-04-01 14:29:58 +02:00
Moonchild 57c4f24573 [Autocomplete] Add styling for Pale Moon's private-* implementation of AC popups 2022-04-01 14:28:46 +02:00
Moonchild 808f96cc8f Increase MAX_ICON_SIZE to account for more common use of HiDPI icons.
This change was unintentionally reverted when importing gecko/44 search service
code.
2022-04-01 14:28:27 +02:00
Olli Pettay 2a9d0cc5af [XPCOM] be more precise when counting the number of allocator users
This patch is based on code inspection.
One could also move sAllocatorUsers to Free(), but it shouldn't matter
in practice.
2022-04-01 14:28:04 +02:00
Moonchild 1fa4cfb004 [Network] Block mk: protocol to work around MSIE vulnerability. 2022-04-01 14:27:48 +02:00
Moonchild 44d2b36eff [DOM] Use RefPtr in ContentChild::RecvGetFilesResponse. 2022-04-01 14:27:25 +02:00
Jeremy Andrews bb830b178a Issue #1806 - Convert DOS line endings to Unix line endings.
When redoing my work and creating a new file on Windows, I forgot to ensure it didn't have CRLF line endings.
2021-08-27 14:24:40 -05:00
Matt A. Tobin c6b1b30bb5 Issue #1751 - Fix preprocessor typo to restore ARM Linux buildability 2021-08-25 18:47:59 -04:00
Jeremy Andrews 5f1430b0bd Issue #1806 - Part 8: Fix Linux and SunOS build again.
The patches didn't reapply for some reason, so this restores the working state.
2021-08-24 17:52:06 -05:00
Jeremy Andrews b818d43967 Issue #1806 - Part 7: Fix up weird issue introduced when redoing branch.
Apparently this time I accentally pulled a random + and - sign into a couple files because I wasn't careful to look at the raw versions on Bugzilla.
2021-08-24 17:19:47 -05:00
Jeremy Andrews a21085b86b Issue #1806 - Part 6: Make it build on Windows.
Without this change, you get an error about external linkage or something. These files are now used outside of WebRTC.
2021-08-24 16:15:22 -05:00
Jeremy Andrews 89c3761e5c Issue #1806 - Part 5: Add multichannel audio capability.
I'm positive this works on Windows at the very least. Cubeb added proper channel map support at some point, and this allows us to take advantage of that.

Ref: BZ 1431221, BZ 1432779
2021-08-24 16:07:22 -05:00
Jeremy Andrews 893fc90379 Issue #1806 - Part 4: Add more audio troubleshooting information.
This should help us troubleshoot audio issues better in the future in general, since we'll know more about the hardware involved, etc.
2021-08-24 14:35:49 -05:00
Jeremy Andrews 41b1b3947c Issue #1806 - Part 3: Allow forcing a particular libcubeb backend.
This streamlines troubleshooting in situations where multiple audio backends are compiled into the binary. Now testing different audio backends is as simple as restarting the browser and changing a pref rather than requiring a full recompile.
2021-08-24 13:42:09 -05:00
Jeremy Andrews c23dab7adc Issue #1806 - Part 2: Move AudioConfig stuff from MediaInfo.h to MediaData.h.
This avoids circular dependencies, because otherwise the two headers would try to include each other.
2021-08-24 13:12:43 -05:00
Jeremy Andrews cc75c6a6e9 Issue #1806 - Part 1: Restore libcubeb update.
Restore the proper working environment for libcubeb work after reversion.
2021-08-24 10:38:44 -05:00
Moonchild ee49838173 Revert "Issue #1806 - Update libcubeb"
This reverts commit 741fd8b61c.
2021-08-22 17:39:55 +00:00
Moonchild a725c0fe3d Revert "Issue #1806 - Follow-up: New libcubeb uses incorrect audio backend for Oracle Solaris."
This reverts commit 9d4f14582b.
2021-08-22 17:39:42 +00:00
Moonchild 5d09ddb574 Revert "Issue #1806 - Follow-up: Restore PulseAudio support in libcubeb."
This reverts commit 0c2a0f45ec.
2021-08-22 17:39:29 +00:00
Moonchild 0c2a0f45ec Issue #1806 - Follow-up: Restore PulseAudio support in libcubeb.
This was incorrectly removed because we aren't using a Rustified abstraction.
2021-08-21 08:10:13 +00:00
Coordinator Tobin 4ac28d1d48 Merge pull request 'Follow-up: New libcubeb uses incorrect audio backend for Oracle Solaris.' (#1809) from athenian200/UXP:use_sun_audio into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1809
2021-08-19 02:37:04 +00:00
Jeremy Andrews 9d4f14582b Issue #1806 - Follow-up: New libcubeb uses incorrect audio backend for Oracle Solaris.
Mozilla picked up a change to libcubeb moz.build file from the FreeBSD project. Using OSS directly works fine in Illumos, but Oracle Solaris still has to use a Sun-specific API for sound to work, even though it also uses OSS under the hood. No code changes are needed here, the build configuration is just not what Solaris needs even though it's fine for Illumos. The Sun-specific API works for both, though, and should thus be preferred.
2021-08-18 17:24:13 -05:00
Moonchild a5a14974a1 Issue #1797 - Implement WindowOrWorkerGlobalScope.origin
Resolves #1797
2021-08-15 11:45:53 +00:00
Moonchild 9baa17379e Bump platform version. 2021-08-13 09:43:04 +00:00
Moonchild 225b5e5e5a [db] Update SQLite to 3.36.0 2021-08-13 09:41:57 +00:00
Moonchild 741fd8b61c Issue #1806 - Update libcubeb
This is a full lib update, changing callers where needed.
This also moves GertCubeMSGLatencyInFrames to CubebUtils.{cpp|h} where it
belongs.
2021-08-12 14:14:18 +00:00
Jens Stutte fe2ea0ce88 [DOM] Be more explicit about the WorkerPrivate self-reference. 2021-08-12 11:39:07 +00:00
Moonchild fa49002626 [MFBT] Convert debug asserts to early returns for situations that should
never occur.
2021-08-12 11:30:26 +00:00
Moonchild ca1a84cb93 [DOM/NPAPI] Defer loading object when setting attribute. 2021-08-12 00:27:34 +00:00
Moonchild 61a3331fe2 [network] Use a proof of lock everywhere in cache v2. 2021-08-11 23:49:44 +00:00
Moonchild 4932924d67 Issue #1675 - Move regexp to new-regexp to make bz porting simpler. 2021-07-30 11:24:18 +00:00
Moonchild 66cd46d9bc Issue #1679 - Part4: Clean up commented-out/WIP code. 2021-07-30 09:58:15 +00:00
Moonchild 979c60bc7c Issue #1679 - Part 3: Make everything build on supported compilers. 2021-07-30 09:43:28 +00:00
Moonchild 6203743160 Issue #1781 - Follow-up: fix debug assert in MergeMultiplicativeR() 2021-07-24 06:42:30 +00:00
Moonchild 738448aa0d [no issue] Replace PurpleBlock with SegmentedVector to reduce indirect memory
accesses when calling suspect

Improves overall memory performance.
Also prerequisite for further work on #1677.
2021-07-23 15:29:24 +00:00
Moonchild 74989fb284 Merge pull request 'Implement Promise.allSettled()' (#1796) from athenian200/UXP:Promise-allSettled into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1796
2021-07-18 17:03:03 +00:00
athenian200 22377b86a3 Merge branch 'master' into Promise-allSettled 2021-07-15 16:21:00 +02:00
Jeremy Andrews 5764d0c28d Issue #1725 - Fix logic in PerformPromiseAllSettled.
This function essentially appears to work as written, there was an issue with it returning false too early in some situations that prevented it from working properly.
2021-07-15 03:08:11 -05:00
Moonchild c198ef11b9 [layout] Ensure we set the primary frame for native anon content where needed. 2021-07-15 04:11:48 +00:00
Moonchild caf98496b7 Revert "[accessibility] Remove selection listeners from shutting down PresShell."
This reverts commit 684000d9a5.
2021-07-14 17:30:58 +00:00
Eitan Isaacson 684000d9a5 [accessibility] Remove selection listeners from shutting down PresShell. 2021-07-14 16:40:33 +00:00
Moonchild 00f9e24368 [gfx] Hard-block old mesa/nouveau versions 2021-07-14 15:15:14 +00:00
Dana Keeler 361743b222 [NSPR] Lock access to PRCallOnceType members in PR_CallOnce* for thread safety.
Cherry-picked upstream fix from 4.31
2021-07-14 14:42:24 +00:00
Moonchild ce2938d274 [ANGLE] Cherry-pick upstream fix 2021-07-14 13:51:11 +00:00
Valentin Gosu 6fe78cec8a [network] Make CacheIOThread::ThreadFunc hold reference to thread. 2021-07-14 13:27:14 +00:00
Moonchild 8cc2f6ba9b [network] Add some sanity checks to deserialized nsStandardURLs
Note: C++ lambda expressions are actually useful for once.
2021-07-14 13:20:09 +00:00
Moonchild 8ea119da4a [network] Stop blocking 10080
Port 10080 is shared by too many devices and services that do need http(s)
access, so this port should not be blacklisted by default.
2021-07-14 01:51:13 +00:00
Moonchild f864b515d9 WIP: Base implementation 2021-07-13 20:09:21 +00:00
Matt A. Tobin 3003f52e1d Issue #1793 - Only use Glass on the Toolkit Download Manager on Windows 7 2021-07-12 13:11:40 -04:00
Matt A. Tobin cc934f8264 Issue #1793 - Only use proper Aero Styling in the Toolkit Error Console on Windows 7 2021-07-12 13:00:51 -04:00
Matt A. Tobin 1327910cda Issue #1793 - Add a border-bottom to treecols header 2021-07-12 12:58:30 -04:00
Matt A. Tobin 3b7f2ddd3c Issue #1793 - Add a border-bottom to toolbox
Follow-up to e8be661944
2021-07-12 12:57:39 -04:00
Moonchild 82b1fdca1f Issue #1792 - Part 4: Implement constructors for the EventTarget interface. 2021-07-12 03:06:58 +00:00
Moonchild 1b86eb76fc Issue #1792 - Part 3: Add ConstructibleEventTarget helper class.
Of course it couldn't be trivial :P
wrapObject is a pure virtual function which prevents an abstract constructor
from being used.
So, we need to extend DOMEventTargetHelper (applicable acronym: DETH :D) with
a wrapObject implementation - in a derivative class is the clearest way to do
this, as opposed to making DETH more complex.
2021-07-12 03:04:29 +00:00
Moonchild ea0e4de698 Issue #1792 - Part 2: Move GetParentObject() to EventTarget.h for re-use. 2021-07-12 02:56:48 +00:00
Moonchild 6e7adbe74d Issue #1792 - Part 1: Remove superfluous check for abstract ancestors.
This removes some restrictions on whether an interface that implements
QueryInterface can have a non-abstract ancestor.

This restriction was put in place back when we automatically added
QueryInterface to all rootmost non-abstract interfaces (~Pale Moon 24).
At the time, we needed to make sure it did NOT end up on EventTarget, because
back then WebIDL quickstubs would replace the QI implementation on non-WebIDL
EventTargets with the WebIDL one, which would not work for them.

Since then, we have removed WebIDL quickstubs and we now explicitly list which
interfaces get QueryInterface, so this check is no longer needed.
2021-07-12 02:54:51 +00:00
Moonchild a58b35c01b Issue #1757 - Follow-up: Remove some stray WPT leftovers.
These were re-introduced when reverting the <details> element pref changes.
2021-07-12 02:50:57 +00:00
Moonchild 5e6305573f [network] Stop treating http and https as different for encoding schemes.
There is no reason to treat available encoding schemes for these protocols
differently.
2021-07-10 13:00:14 +00:00
Moonchild 3163b3af18 [network] Enable brotli compression on http for sites that offer it. 2021-07-06 03:07:36 +00:00
Moonchild 1fb9257ed8 [toolkit] Slightly lighten light-mode logopage background 2021-07-05 18:40:09 +02:00
Moonchild 72d0b86709 [Toolkit] Update logopage styling.
Part of the UX refresh Pale Moon effort. This uses the new -moz-dark-theme media
query to make the logopage dark if the UI is dark, without explicitly relying on
(often not sane) system color values.
2021-07-01 17:48:58 +00:00
Moonchild 2215d8467e Issue #1751 - Remove Mac/ARM C fallback on gcc from pixman 2021-06-25 19:25:29 +00:00
athenian200 a0461e3775 Issue #1784 - Add -moz-dark-theme media query and allow prefers-color-scheme to follow it. 2021-06-22 18:14:44 +00:00
Matt A. Tobin 4490f61f58 [Toolkit] Attempt to initialize DownloadTaskbarProgress when onDownloadWindowLoad() is called so that DownloadTaskbarProgress from the Downloads Manager window works when the application doesn't explicitly invoke onBrowserWindowLoad(). 2021-06-22 01:54:11 -04:00
Moonchild 1fe9c19305 Issue #1751 - Remove Mac code behind MOZ_WIDGET_TOOLKIT == 'cocoa' 2021-06-21 17:52:42 +00:00
Moonchild 5afcb4a092 [whitespace] Fix CRLF line endings.
When originally implementing ResizeObserver, line endings ended up being CRLF
instead of LF. This commit fixes those line endings (no code changes)
2021-06-21 00:40:58 +00:00
Moonchild 8689ac6304 Bump platform version 2021-06-19 23:02:06 +00:00
Moonchild 014fdd0521 Merge branch '1783' 2021-06-19 23:00:12 +00:00
New Tobin Paradigm 2c626f6046 Merge pull request 'Support detecting bool preferences in chrome stylesheets' (#1785) from athenian200/UXP:bool-chrome-stylesheets into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1785
2021-06-19 20:40:11 +00:00
Jeremy Andrews 4dac05e0e0 Issue #1776 - Support detecting bool preferences in chrome stylesheets
This functionality was already added to Gecko for UA stylesheets allow the "dom.details_element.enabled" preference to work. I changed the condition to allow bool preferences to be used in chrome stylesheets as well.
2021-06-19 15:01:08 -05:00
Moonchild cfdfbcf059 Issue #1783 - Part 3: Remove ResizeObservation's BroadcastSize.
This is chrome-only and unused, and interfered with getting the spec update in.
2021-06-19 15:40:37 +00:00
Moonchild 6f7dd6fd98 Issue #1783 - Part 2: Update ResizeObserver and resizeObserverSize.
This adds the later spec revision's contentBoxSize and borderBoxSize, and the
inlineSize and blockSize concepts.
The older spec contentRect remains functional as well for backwards
compatibility with the earlier spec (that was IMHO perfectly fine as it was...)
2021-06-19 15:38:14 +00:00
Moonchild 22a75217e1 Issue #1783 - Part 1: Move GetNodeDepth to ResizeObserver.cpp
GetNodeDepth() is a specialized version for ResizeObserver to get the depth of
a node across Shadow DOM. It's better to have this in ResizeObserver.cpp
instead of the generic ContentUtils.

Also updated the function to bypass the shadow root itself and not count it
because ResizeObserver doesn't observe the shadow root and only needs the
relative depths among all observed targets. IOW we use the flattened tree here.
2021-06-18 17:44:33 +00:00
Moonchild a970411caf Issue #1782: Remove Luna, Royale and Zune support from the platform.
These are obsolete system themes; the platform will fall back to generic/unknown
theme support instead.
2021-06-14 11:52:16 +00:00
Matt A. Tobin e8be661944 [Toolkit] Don't use the "aero" msstyle provided toolbox background on Windows 10 2021-06-12 13:13:08 -04:00
Moonchild 5ab5ce9c4f Issue #1781 - Part 3: Add reftest for the static calc() case. 2021-06-12 11:54:09 +00:00
Moonchild 205e69e2bb Issue #1781 - Part 2: Fix animation interpolation for stroke-dashoffset.
Since we have calc() and floats working now, this is a trivial fix.
2021-06-12 11:36:16 +00:00
Moonchild c337c1496b Issue #1781 - Part 1: support calc() in stroke-dashoffset CSS
This adds basic calc() support to stroke-dashoffset. It does not provide
CSS animation (yet, todo for part 2)
2021-06-12 01:12:39 +00:00
Moonchild 7f6f1c664d [js] Fix porting typo
Follow-up for 9acd98298c
2021-06-03 00:23:41 +00:00
Jan de Mooij 9acd98298c [js] Fix invalid early return in BaselineFrame::trace.
We were not tracing debugger environments for Baseline frames without any
local/expression slots.
2021-06-02 10:29:47 +00:00
Moonchild ce71c0fe3f [toolkit] Exclude printer spew from troubleshooting information.
In almost all cases this is pointless to include, a ton of useless entries,
and there's no reason to have people post a full enumeration of installed
printers on their system when asked for TS information.
If there's a printer specific issue, people can always be asked to post relevant
info manually.
2021-06-02 09:44:59 +00:00
Matt A. Tobin 42cf1ad419 Issue #1774 - Add metrics to the editable menulist-button for GTK3 2021-05-31 18:55:45 -04:00
Moonchild 6272d48e86 Revert "Issue #1774 - Make menulist-button visible again in gtk3"
This reverts commit 0a0830ba8b.
2021-05-31 17:56:30 +00:00
Moonchild 27e7b312a5 Merge pull request 'Issue #1774 - Make menulist-button visible again in gtk3' (#1775) from jobbautista9/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1775
2021-05-31 15:30:27 +00:00
Job Bautista 0a0830ba8b Issue #1774 - Make menulist-button visible again in gtk3 2021-05-31 22:59:39 +08:00
Moonchild c921ad59d5 Issue #1772 - Stop using legacy code page conversion for file paths on Linux.
OS.File already only supports UTF-8 paths on non-Windows systems, so this change
makes our different ways of accessing file paths consistent with each other.
This should prevent unexpected crashes in glibc that expect UTF-8.

This resolves #1772.
2021-05-14 12:25:57 +00:00
Moonchild 349346d0b7 Revert "Issue #21 - Remove TelemertyVFS"
This:
- reverts commit 83ecae9ff7
- adds a failure check to Connection::GetQuotaObjects

This resolves #1768.
2021-05-14 10:50:53 +00:00
Moonchild e983389355 [network] Fix typo in port blocking range check.
This fixes a typo in 5e705bd505
2021-05-12 20:25:55 +00:00
Moonchild 2b7197465d Merge pull request 'Fix undefined event error thrown when scrolling on the auto scroll pop-up' (#1771) from FranklinDM/UXP:scroll-wheel-event-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1771
2021-05-12 14:20:11 +00:00
FranklinDM 5c583e905e Issue #1770 - Fix incorrect reference to event parameter 2021-05-12 14:21:12 +08:00
Moonchild 1ee35eafa0 Issue #1751 -- Remove cocoa and uikit gfx and hal support code 2021-05-09 21:36:43 +00:00
Moonchild b5ece9f771 Issue #1751 -- Update crashtests 2021-05-09 00:29:23 +00:00
Moonchild 08da125d9c Issue #1751 -- Remove cocoa and uikit widget support code 2021-05-08 21:00:49 +00:00
Moonchild ca35efb84e Issue #1751 -- Remove cocoa support code from /dom 2021-05-08 20:59:55 +00:00
Moonchild e7e63565ee Issue #1751 -- fix up a few stray #ifs 2021-05-06 16:47:48 +00:00
Moonchild 6f707bde95 Issue #1751 -- Remove XP_MACOSX conditionals from the rest of the tree.
This also removes some PP abuse and takes file entries out of PP when no longer
needed without XP_MACOSX conditionals.
2021-05-06 09:24:03 +00:00
Moonchild aa0fd3d68c Issue #1751 -- Remove XP_MACOSX conditionals from /layout 2021-05-03 12:26:37 +00:00
Moonchild 1bf0734a72 Issue #1751 -- Remove XP_MACOSX conditionals and support files from /xpcom 2021-05-03 11:35:41 +00:00
Moonchild b1eb04d3f0 Merge branch '1767' 2021-05-02 20:28:54 +00:00
Moonchild 616b39413d Issue #1751 -- Remove XP_MACOSX conditionals and support files from /gfx 2021-05-02 20:28:36 +00:00
Moonchild cd1f724135 Issue #1751 -- Remove files unused without XP_DARWIN 2021-05-02 07:11:32 +00:00
Moonchild 3d671e4275 Issue #1751 -- Remove XP_DARWIN 2021-05-02 07:10:18 +00:00
Moonchild 56da7e2747 Issue #1751 -- Remove XP_IOS 2021-05-01 07:15:13 +00:00
Moonchild 0dd3424f77 Issue #1751 -- Remove XP_MACOSX conditionals from /dom 2021-04-30 21:22:08 +00:00
Moonchild 4e31a42b28 Issue #1767 - Prevent incorrect calling of network change detection function.
This rewrites the websocket channel network change detection function to not
skip part of its logic in a situation that has already been checked, preventing
a thread race. See analysis of the problem in the issue.
2021-04-26 10:26:22 +00:00
Moonchild 5e705bd505 [Network] Solve type mismatch in AllowPort().
Casting it to an int16_t was wrong and would preclude the check for high port
numbers (due to overflow).
This makes the type matching, but adds an explicit check to ensure the port
number passed in is within a valid range.
2021-04-20 13:12:38 +00:00
Jeff Gilbert 88a34442a3 [WebGL] Bind framebuffer before DrawBuffers/ReadBuffer selection. 2021-04-20 12:46:56 +00:00
Moonchild cf3b5cb6cc [DOM] Add missing IDL definitions for CSP .nonce attributes.
Apparently Mozilla completely spaced out on this when adding the CSP nonce
mechanism, potentially causing web compat issues if scripting relies on
being able to get/set nonces through DOM and/or causing CSP policy check
issues if websites try to "hide" nonces.
2021-04-19 20:47:29 +00:00
Moonchild 6f50c402b3 Merge pull request 'Allow use of Tauthon instead of Python 2.7' (#1762) from OlCe1/UXP:tauthon-build-support into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1762
2021-04-08 02:26:58 +00:00
Olivier Certner 264b79b31d Issue #1761 - Enable use of Tauthon instead of Python 2.7 at build
Make essential Tauthon's builtins and modules available in sandboxes, without
disrupting building with Python 2.7.

1. Allow new builtins and modules. "__build_class__" is for
building... new-style classes (to handle the new metaclass syntax imported from
3.x). "_oserror" is necessary because of internal changes to raise errors
deriving from OSError (which are reported as IOError if not caught).
2. Look for modules and packages in the right places.

This was tested on FreeBSD, and should work out of the box on Linux.
2021-04-07 16:12:20 +02:00
Moonchild b9d8b3aa2d Merge branch '1756'
This resolves #1756
2021-04-01 10:44:59 +00:00
Moonchild 5e6b15940f Merge pull request 'Reinstate "dom.details_element.enabled" preference' (#1758) from athenian200/UXP:details_element_pref into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1758
2021-04-01 07:17:23 +00:00
athenian200 82cb11de19 Issue #1757 - Reinstate "dom.details_element.enabled" preference
The removal of this preference was botched, all other surrounding plumbing changes appear to be working okay. The ability to use prefs to control this stylesheet might be useful in the future, so perhaps this is one of those "if it ain't broke, don't fix it" bugs where leaving well enough alone in the first place would have been the best choice.
2021-03-31 17:57:48 -05:00
Moonchild e07dee79c5 Issue #1756 - Clean up ICU patch.
We don't need ICU_UNUM_HAS_FORMATDOUBLEFORFIELDS because we don't support any
ICU other than the one in-tree.
2021-03-31 15:41:38 +00:00
Moonchild 685dafd775 Issue #1756 - Expose NumberFormat.formatToParts() to content. 2021-03-31 14:45:56 +00:00
Moonchild 1271dbeaf3 Issue #1756 - Initial wrapped implementation in C++ 2021-03-31 11:54:20 +00:00
Moonchild 2953a5b1a1 Issue #1755 - Add smooth, high-quality and pixelated to CSS image-rendering 2021-03-28 10:55:28 +00:00
Moonchild b969ea3b9c Issue #1754 - Fix clip path overflow.
Resolves #1754.
2021-03-26 17:19:27 +00:00
Moonchild 698b235b28 [WebRTC] Apply port restrictions to peerconnections. 2021-03-24 18:04:20 +00:00
Moonchild 75dbd532f5 [WebGL] Only allow texture uploads from pixelbuffer if bound.
Throw an error if it mismatches.
2021-03-24 12:16:08 +00:00
Moonchild 021fecdedc [docshell] Stop loading of the document if network load is stopped.
After all, stop means stop.
2021-03-24 11:41:58 +00:00
Moonchild c1b064b99f Merge pull request 'Implement "prefers-color-scheme" as a user preference.' (#1753) from athenian200/UXP:prefers-color-scheme into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1753
2021-03-24 08:58:18 +00:00
athenian200 e946ca91fb Issue #1752 - Implement "prefers-color-scheme" as a user preference.
This PR passes all current tests for this feature, and implements the "prefers-color-scheme" media query as an enumerated keyword that is controlled by an integer preference.

Currently, the possible options are 0 to see a website's fallback code and essentially behave like this isn't implemented (our current behavior), 1 to express a preference for a light theme (the default for spec reasons), and 2 to express a preference for a dark theme. Over time, this list may expand to include other preferences like a preference for a sepia theme or something, and this leaves us prepared for that future.
2021-03-23 22:25:54 -05:00
Moonchild d3543ca2fe Issue #1751 - Remove MacOS support from configure 2021-03-22 09:37:12 +00:00
Moonchild b59777a67b Issue #1053 - Remove __ANDROID__ defines (except in third party code) 2021-03-21 16:15:54 +00:00
Moonchild a94a86ff78 Issue #1749 - Remove restriction of SVG width/height element attributes.
According to the original SVG spec, the SVG element in documents had to follow
special rules as to what was allowed for width/height attributes. This is no
longer the case, so we can decouple it from whatever internal units SVG/XML
language uses and allow all units like every other element.
2021-03-20 07:35:30 +00:00
Moonchild d249dd517b [CSS] Enable scrollbar-width keyword by default.
I totally forgot this <.<
2021-03-17 12:14:00 +00:00
New Tobin Paradigm 3064ad3efe Merge pull request 'Remove the ability to accept Firefox GUIDS (remove the dual system)' (#1748) from athenian200/UXP:phoenix_extensions into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1748
2021-03-16 11:27:34 +00:00
athenian200 3aa334d0b7 Issue #1744 - Remove the ability to accept Firefox GUIDS (remove the dual system)
This finally removes the dual-GUID hack. There's nothing as permanent as a temporary solution.
2021-03-16 06:20:59 -05:00
Moonchild 6a6772f480 [Toolkit] Update TwemojiMozilla font to 0.5.1 (Twemoji 12.1.6) 2021-03-16 10:59:51 +00:00
Matt A. Tobin 29a5601f3a [NSS hotpatch] Hard disable AVX2 in NSS Build System 2021-03-15 22:16:14 +00:00
Moonchild 494718c324 Clobber for NSS update 2021-03-15 18:53:11 +00:00
Moonchild 958eb2936b Issue #1693 - Update NSS to 3.52.2-UXP
Update root certificates and port NSS sec patches from previous work.
2021-03-15 18:52:57 +00:00
Moonchild c46598c11d [NSS] Update root certificates. 2021-03-15 18:49:45 +00:00
J.C. Jones 156287f0d8 [NSS] Prevent slotLock race in NSC_GetTokenInfo
Basically, NSC_GetTokenInfo doesn't lock slot->slotLock before accessing slot
after obtaining it, even though slotLock is defined as its lock.
2021-03-15 18:43:00 +00:00
Sohaib ul Hassan 2642a2150f [NSS] Implement constant-time GCD and modular inversion
The implementation is based on the work by Bernstein and Yang
(https://eprint.iacr.org/2019/266)
"Fast constant-time gcd computation and modular inversion".

It fixes the old mp_gcd and s_mp_invmod_odd_m functions. The patch also fixes
mpl_significant_bits s_mp_div_2d and s_mp_mul_2d by having less control flow to
reduce side-channel leaks.

Co-authored by : Billy Bob Brumley
2021-03-15 18:40:01 +00:00
Moonchild 4397303e5d Issue #1743 - Update CK_GCM_PARAMS use for PKCS11 v3.0 in WebCryptoTask
Re-apply now we have PKCS11 v3.0 again
2021-03-15 18:25:42 +00:00
Moonchild a9a050901e Issue #1693 - Update NSPR to 4.25-RTM 2021-03-15 18:24:14 +00:00
Moonchild fd9fc4ea60 Issue #1693 - Update NSS to 3.52.1-RTM 2021-03-15 12:57:35 +00:00
Moonchild d830832cb9 Revert "Issue #1743 - Update CK_GCM_PARAMS use for PKCS11 v3.0 in WebCryptoTask"
This reverts commit 2b6effbf29.
2021-03-14 22:58:58 +00:00
Moonchild dc468397f3 Issue #1746 - Revert "Update NSPR to 4.29"
This reverts commit 149d2ffa77.
2021-03-14 22:48:44 +00:00
Moonchild 52d5ff242f Issue #1746 - Revert "Update to NSS 3.59.1.1" 2021-03-14 22:47:32 +00:00
Moonchild 0038394c39 Issue #1746 - Revert "Additional configuration for NSS lib update."
This reverts commit ae775e493b.
2021-03-14 22:44:25 +00:00
Moonchild 005d9c42d3 Issue #1746 - Update pkix code with later NSS code. 2021-03-14 13:06:22 +00:00
Moonchild cc8a7e3f7b Issue #1053 - Remove MOZ_WIDGET_ANDROID and IDB_MOBILE 2021-03-11 06:43:10 +00:00
Moonchild dce8a3300b Issue #1053 - Remove Android-specific blocks from system headers and /dom 2021-03-11 06:41:21 +00:00
Moonchild 515c1193c5 Issue #1053 - Remove mobile-specific graphics "optimizations" (=compromises) 2021-03-10 18:58:26 +00:00
Moonchild 108ec40998 Issue #1053 - Remove android blocks from configure. 2021-03-10 17:10:56 +00:00
Moonchild c2268033a8 Issue #1053 - Remove build system MOZ_ANDROID_* defines and related code. 2021-03-10 14:26:15 +00:00
Moonchild 78a37c1045 Issue #1737 - Update build config and mozbuild files. 2021-03-04 00:03:56 +00:00
Moonchild d192e6808f Issue #1737 - Import libaom 2.0.2 source 2021-03-04 00:03:46 +00:00
Moonchild c81c0395a3 [parser] run java translation. 2021-03-02 12:01:30 +00:00
Moonchild 78444682d7 Merge pull request '[widget] MailNews Followup: Require user interaction when picking files or folders v2' (#1745) from g4jc/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1745
2021-02-26 17:41:20 +00:00
Gaming4JC 9b0d589d9f [widget] MailNews Followup: Require user interaction when picking files or folders v2
98f6ad61f4 introduced a boolean, this just passes it down and fixes build bustage of mailnews.
2021-02-26 11:57:24 -05:00
Moonchild ad5a13bd50 [OTS] Backport some upstream OTS commits. 2021-02-24 14:24:24 +00:00
Moonchild 5587b6bf1a [MFBT] Update lz4 to 1.9.3 2021-02-24 12:16:57 +00:00
Moonchild 85b0f705d9 Issue #457 - Remove duplicate PKCS11 definitions 2021-02-24 11:09:47 +00:00
Moonchild 29271977c9 [security] Hold mutex when accessing TSI fields. 2021-02-24 11:08:36 +00:00
Moonchild b2c0fda775 [DOM] Don't reveal error details for CORS-cross-origin decoding errors. 2021-02-24 10:13:37 +00:00
Moonchild 525961c261 [html parser] Check for integer overflow when computing new buffer sizes. 2021-02-24 09:57:24 +00:00
Moonchild 77d26e8bcd [dom] Update noscript serialization to the changed spec.
Make <noscript> escaping conditional on whether scripting is enabled.
2021-02-24 09:05:30 +00:00
Moonchild 5f1bc29870 Issue #1722 - Update about:license
Mostly making parts conditional and removing blocks that are no longer
applicable, and a few minor edits otherwise to update links and text.

Resolves #1722
2021-02-21 19:20:31 +00:00
Moonchild 98f6ad61f4 [widget] Require user interaction when picking files or folders v2
Now with extra sauce to make it work cross-platform and cross-versions and
for HTML input elements only.
2021-02-21 10:32:47 +00:00
Moonchild 2b6effbf29 Issue #1743 - Update CK_GCM_PARAMS use for PKCS11 v3.0 in WebCryptoTask 2021-02-17 22:30:39 +00:00
Moonchild 2103a2283b Issue #1688 - Add flood guard to state change logic. 2021-02-16 12:13:16 +00:00
Moonchild 8f663e3bcd [widget] Require user interaction when picking files or folders. 2021-02-15 21:09:05 +00:00
Moonchild 9fa7943937 Issue #1741 - Follow-up: Remove superfluous prefobserver
This one is no longer necessary (and incorrect) after the changes made in #1684
2021-02-15 06:26:33 +00:00
Moonchild 9832adb6f7 Issue #1741 - Add missing prefobserver for general.useragent.* prefs
Resolves #1741
2021-02-14 16:04:06 +00:00
Moonchild 4f06d20f8a [js] Add XMMRegName for invalid_xmm 2021-02-14 08:34:36 +00:00
Moonchild fc65e1f2fa Issue #1739 - Implement numeric separators.
Resolves #1739
2021-02-13 09:41:29 +00:00
Moonchild 458939c9d9 Issue #1738 - Follow-up: Update comment (no code changes) 2021-02-12 21:24:32 +00:00
Moonchild 9ca880e200 Issue #1738 - Part 2: Implement well-formed JSON stringify
This implements the ES2019 spec for JSON stringification, including
lower-casing, properly escaping lone surrogates, etc.
2021-02-11 13:55:24 +00:00
Moonchild 2c72b8859a Issue #1738 - Part 1: Improve performance of JSON stringify
- Use some pointer voodoo and instead of stringbuffer append()
- Use a lookup table instead of char comparisons for chr < 256
- Stop using a Hashtable/MovableCellHasher for JSON CycleDetector
2021-02-11 13:20:54 +00:00
Moonchild 006d2ca827 Update tzdata to 2021a
Because people are apparently never satisfied with the time zones on the planet!
2021-02-10 03:08:34 +00:00
Moonchild 5c1d1d37fb Merge pull request 'Support for latest stable FreeBSD (12.2)' (#1736) from OlCe1/UXP:FreeBSD-support-update into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1736
2021-02-08 20:36:20 +00:00
Moonchild aa99e58876 Issue #1737 - Disable AV1 by default.
Our current implementation has consistent playback issues; this needs to be
addressed before the codec can be enabled by default.
2021-02-07 20:20:36 +00:00
Moonchild aab1c211a6 [angle] Cherry-pick compressed tex depth stride fix. 2021-02-05 18:40:41 +00:00
Olivier Certner 9f2085b5e9 Issue #1699 - Follow-up: mozjemalloc: Fix build by excluding some irrelevant init_lock code
This had been initially dealt with in issue #1699's commits, but one of them
was in the end reverted, which caused this problem (this change should have
been done there).
2021-02-05 18:22:59 +01:00
Olivier Certner 1305a9187e Issue #1730 - Part 2: harfbuzz: Remove some useless define causing a build error
Defining _POSIX_C_SOURCE to 199309L on FreeBSD causes compile errors, because of
an obscure interaction between system wrappers and libc++ headers. The source
doesn't seem to need it at all, which tests confirm.

I bet that this is not needed either on other modern systems (even those based
on glibc), and that the define could probably be entirely removed. Not trying
it because I can't test it myself.
2021-02-05 18:22:53 +01:00
Olivier Certner 5f29c78f7c Issue #1730 - Part 1: Interpose malloc even on RTLD_DEEPBIND presence
New FreeBSD versions have introduced RTLD_DEEPBIND (see dlopen(3)), which
triggers a provoked build error to be on the "safe" side.

Indeed, improper use of RTLD_DEEPBIND could cause malloc interposing not to
work on specific libraries. This would happen for libraries that provide their
own malloc/free and exchange pointers with other libraries or the main program,
one allocating an area and another one deallocating it.

It seems it happened for glibc, which is not a concern on FreeBSD, and for the
Flash Player (not a concern either, there is no native Flash Player). Moreover,
there is only a single reference to RTLD_DEEPBIND in the whole platform
currently, namely in the WebRTC code, but the corresponding code chunk is
compiled-in only on Linux (and this library doesn't seem to redefine malloc
functions anyway). So I don't see how a problem could happen. Additionally,
Pale Moon, which is my focus, doesn't use WebRTC.

Corresponding Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=493541
2021-02-05 18:22:46 +01:00
Olivier Certner f3405dbede Issue #1729 - Support building/linking against libc++ 9+
Including <cstdlib> must never trigger inclusion of "mozalloc.h", because the
first thing this one does is precisely to include <cstdlib>.

It is now the case that, in libc++ 9 and beyond, <cstdlib> includes <math.h>
which then tries to include <type_traits>, which the STL wrapper intercepts,
trying to load "mozalloc.h". Same problem happens with <limits>.

Fix pulled from: https://bugzilla.mozilla.org/show_bug.cgi?id=1594027.
2021-02-05 18:20:47 +01:00
Moonchild 66d028942c Issue #1732 - Implement JSON superset proposal.
This change makes unicode line and paragraph separators allowed in JS strings,
removing the only quirk of the JS string definition that made JSON not a valid
subset of JS.

Resolves #1732
2021-02-05 12:44:26 +00:00
Moonchild bd9fdeccc7 Issue #1726 - Add verification test for string.replaceAll() 2021-02-04 21:29:55 +00:00
Moonchild 9b401e7748 Merge pull request 'Implement String.replaceAll()' (#1728) from meatloaf/UXP:string_replaceAll into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1728
2021-02-04 21:27:26 +00:00
Moonchild 914368530b Issue #439 - Remove web-platform tests from the tree.
This removes a total of 23,936 files we would never use nor have the capacity
to properly maintain or keep up-to-date.
2021-02-04 19:41:06 +00:00
meatloaf 24c40b5836 Issue #1726 - Implement String.replaceAll()
This also implements IsRegExp, as this demands it.
Ported from https://bugzilla.mozilla.org/show_bug.cgi?id=1540021
2021-02-04 12:59:54 -06:00
Moonchild c5ad76a287 Issue #1515 - Add null check to nsCSSFrameConstructor::IsValidSibling
With the changes to layout for WebComponents, it is now apparently possible to
pass in null for frame tree items to this function, which would cause a null
deref crash if not checked.
2021-02-03 11:10:44 +00:00
Moonchild ce297b972b Fix CRLF line endings in npapi.h 2021-01-30 13:17:11 +00:00
Moonchild 4d6e9aec05 Issue #1720 - Remove explicit header inclusion from npapi.h
This should allow the header to be used outside of the UXP tree for compiling
plugins etc.
Resolves #1720
2021-01-30 13:16:33 +00:00
Moonchild f394d6502c [js] Remove unused promise selfhosting functions.
These are leftovers from when promises were fully self-hosted and could cause
confusion if left in place.
2021-01-30 01:06:36 +00:00
Moonchild a4503737e1 Merge pull request 'Issue #1723 - Fix Linux build bustage in HTMLMenuItemElement.cpp' (#1724) from trav90/UXP:1723-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1724
2021-01-30 01:02:59 +00:00
trav90 402881b4c2 Issue #1723 - Fix Linux build bustage in HTMLMenuItemElement.cpp 2021-01-29 16:28:26 -06:00
Moonchild e1daeef183 [network] Hold mutex when accessing mSecurityInfo. 2021-01-27 10:52:32 +00:00
Moonchild f77c7a36b7 [DOM] Store weak pointer to next parents. 2021-01-26 23:16:22 +00:00
Moonchild 8fd57ace20 [DOM] Try to avoid slow shrinking GC during sync calls 2021-01-26 22:42:46 +00:00
Moonchild 2836e51466 [webaudio] Fix up ReverbInputBuffer's writeIndex. 2021-01-26 14:55:48 +00:00
Moonchild 3661ecee11 [WebRTC] Improve SDP parser error handling. 2021-01-26 13:59:19 +00:00
Moonchild 2f9e27a306 [js] Add AutoEnterOOMUnsafeRegion to JS_TransplantObject.
Transplanting objects is inherently oom-unsafe, so add
`AutoEnterOOMUnsafeRegion` to `JS_TransplantObject()` and annotate crashes
accordingly if they do happen.
2021-01-26 12:28:25 +00:00
Moonchild 3a8b4ad00a Fix rooting hazard in ImageBitmap::CreateInternal by avoiding movable data. 2021-01-26 11:49:35 +00:00
Moonchild c1dd23bd83 [layout, XUL] Avoid accessing invalidated frame. 2021-01-26 09:56:37 +00:00
Matt A. Tobin dd932e0011 Merge branch 'presentation-cleanup' 2021-01-25 18:26:58 -05:00
Moonchild 874330d453 Issue #1719 - Make <menuitem> pref-controlled and disable by default.
Resolves #1719
2021-01-25 23:18:58 +00:00
Matt A. Tobin 7702d1f3fa Issue #1390 - Clean up presentation api leftovers 2021-01-25 17:38:49 -05:00
Moonchild 1126548dee Issue #1319 - Resolve RELEASE_OR_BETA questions in all.js
- Enabled SVG transform-box property. I've tested this extensively including the
bug that prevented Mozilla from shipping until 55 which does not seem to apply
to us (most likely a stylo issue). Should be good to go.
- Moved the getRootNode pref to a better place (no change)
- Enabled inputmode property for forms. This is n/a for physical keyboards but
should improve the experience for soft keyboards that can pop up various forms
of input (e.g. numeric) depending on the mode indicated. According to BZ this is
feature complete at our level but was problematic for Android which we don't
have support for anyway.
- Restricted crashing on insecure input of text to debug only.
- Enabled shutting down the async OSFile worker if not used for 30 seconds to
be more conscientious about resource use.
- Enabled blocking of autoplay of media in the background by default, since it
is a saner default to have for the OOBE and is commonly a desired setting by
users (see forum).
- Disabled the storage manager API by default. This fine-grained control over
stored website data is already handled by various extensions and we don't have
the front-end support for it. Assuming this was necessary for Mozilla due to
limited access of WebExtensions to this kind of data.
2021-01-23 12:42:53 +00:00
Moonchild 411ccb0e49 Issue #1630 - Enable W3C pointer events by default.
Resolves #1630
2021-01-19 10:04:24 +00:00
Matt A. Tobin 75286e68d7 [Media] Enable AV1 by default if built 2021-01-18 14:56:32 -05:00
Moonchild 22e78108bd Issue #1715 - Handle errors when initializing print settings from the printer
fails due to a bad printer name or O.S. error.

Resolves #1715
2021-01-18 18:07:28 +00:00
Moonchild c77d06c0c4 Merge pull request 'Selectively enable and pref the DOM Web Animations API' (#1714) from 1689 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1714
2021-01-18 09:41:05 +00:00
Moonchild 82fb08c650 Bump platform version for added features. 2021-01-16 14:29:01 +00:00
Moonchild b3d380b4ea Issue #1689 - Part 5: Enable DOM Animations API except the preffed-off parts.
This enables the DOM Animations API core functions with the exception of those
parts that are either unimplemented or not ready for use, which have been
preffed off in this issue's previous parts.

Also tag #1319 for enabling a previous RELEASE_OR_BETA shielded API.
2021-01-14 19:04:25 +00:00
Moonchild abc58d2ed0 Issue #1689 - Part 4: Add a preference for {Document,Element}.getAnimations()
This is probably the last thing we will ship (if ever) since it needs the most
spec and implementation work for arbitrary use that is pretty far into a corner.
2021-01-14 17:43:44 +00:00
Moonchild 931314ef61 Issue #1689 - Part 3: Add a preference for animation composite modes.
This feature should not be shipped until the various definitions of addition for
each additive property are properly specified and then implemented accordingly.

Unlike other patches in this series, compositing is not frequently used
internally so there is no need to enable this by default for chrome callers.
2021-01-14 17:41:30 +00:00
Moonchild 407c86641a Issue #1689 - Part 2: Add a preference for implicit keyframes
This preference controls whether authors are allowed to specify animations
without a 0% or 100% keyframe.

We intend to ship this but it isn't implemented yet (needs a follow-up) but this
preference acts as a safeguard in case we discover we need to disable it once
it's implemented.
2021-01-14 16:05:53 +00:00
Moonchild b0fe759f03 Issue #1689 - Part 1: Add pref for DOM Animation timelines API
Default false, no intent to ship for web content. Always enabled for Chrome.
2021-01-14 14:46:52 +00:00
Moonchild 5158142779 Merge pull request 'Add scrollbar-width CSS spec' (#1707) from 1705 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1707
2021-01-13 00:25:23 +00:00
Moonchild 0939fde1a4 Issue #1705 - Part 9b: Revert overzealous changes on Mac (cocoa). 2021-01-12 13:07:40 +00:00
Matt A. Tobin 7023db88ca Issue #1624 - Fix slot access intrinsics for objects with > 16 reserved slots
Also flips ion inlining pref back on
2021-01-11 09:31:44 -05:00
Moonchild 59ef3f4eda Issue #1705 - Part 9: Implement scrollbar-width:thin on Mac (cocoa). 2021-01-09 23:21:36 +00:00
Moonchild ecc771848f Issue #1705 - Part 8: Implement scrollbar-width:thin on GTK. 2021-01-09 23:20:31 +00:00
Moonchild 382fe423e5 Issue #1705 - Part 7: Implement scrollbar-width:thin on Windows. 2021-01-09 23:19:35 +00:00
Moonchild c0db767c25 Issue #1710 - Check for triggering principal URI in FTP subresource check.
Resolves #1710
2021-01-09 19:19:39 +00:00
Moonchild 764e13c912 Issue #1705 - Part 6: Remove scrollbarbutton min-{width|height} rule from theme.
This would interfere with implementing thin scrollbars.

Almost all widgets provide a non-overridable size for scrollbar buttons, so it
makes no sense to specify min size for them. It is probably(?) a layout bug that
min size properties can override the value returned by GetMinimumWidgetSize
even if aIsOverridable is set to false, but removing this rule is simpler than
locating and fixing the issue in layout code ;)
2021-01-08 14:40:49 +00:00
Moonchild c05bca3168 Issue #1705 - Part 5: Implement scrollbar-width:none for all target platforms. 2021-01-08 14:15:50 +00:00
Moonchild c1825acab0 Merge pull request 'Add modern FreeBSD support' (#1706) from OlCe1/UXP:FreeBSD-support-reformatted into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1706
2021-01-07 21:26:47 +00:00
Olivier Certner 5d95844f49 Revert "Issue #1699 - Part 3a: mozjemalloc: Memory barriers on 'malloc_initialized'"
This reverts commit f76695c1ce.

SUSv4 specifies that 'pthread_create' acts as a (full) memory barrier, so
barriers here are not necessary.
2021-01-07 20:28:40 +01:00
Olivier Certner 3e2dcaf7f2 Issue #1699 - Part 3c: mozjemalloc: FreeBSD: Ensure early initialization
This guarantees that initialization is done in a single-thread context.
2021-01-07 17:49:14 +01:00
Olivier Certner 91f7c9d30e Issue #1699 - Part 3b: mozjemalloc: Bootstrap allocator, early diversion for FreeBSD
Coded a simple memory allocator meant to be used during jemalloc bootstrap
(malloc_init_hard()). Although protected by "#ifdef __FreeBSD__", it is not
FreeBSD-specific: Any POSIX platform could use it.

Hook it so that it is used in place of jemalloc's own routines while
malloc_init_hard() is executing or memory for mutexes is being
allocated. Currently, 'malloc', 'calloc', '*memalign' and 'free' are diverted
during init or lock initializations.

Details are quite complex, see the big comment block starting with "There are
several problematic interactions between FreeBSD's libthr and this jemalloc."
for more explanations.

Also replaced ad-hoc BSD code to determine the number of CPUs with 'sysconf',
which is POSIX-compliant (and supported on modern BSDs).
2021-01-07 17:49:14 +01:00
Olivier Certner f76695c1ce Issue #1699 - Part 3a: mozjemalloc: Memory barriers on 'malloc_initialized'
The barriers are here to make sure that setting 'malloc_initialized' at end of
init must be noticed later by any thread running on a different core. They are
in theory necessary in the absence of an explicit pthread lock.

What could happen is that the thread doing the initialization later spawns
other threads that could not have the updated 'malloc_initialized' value,
leading to a second initialization. This is dependent on whether OSes force a
full memory barrier before the new thread is run, which I don't know, and don't
want to bother.

This was done for FreeBSD only, for the sake of robustness. In theory, this
would be needed on Windows too.
2021-01-07 17:34:03 +01:00
Olivier Certner da217348d9 Issue #1699 - Part 2: libevent: Remove 'evutil_secure_rng_add_bytes'
In fact, this is a security threat.

This function calls 'arc4random_addrandom', which was removed from the
reference implementation 7 years go [1], on the ground that this was in fact an
internal interface which is almost impossible to use correctly. This update has
since then been propagated to other implementations (e.g., FreeBSD, IllumOS,
Android).

Do this for all platforms, since 'evutil_secure_rng_add_bytes' is not even used
in the current tree, and for the reason stated above, should never be.

Related bugs at Mozilla and libevent: Links [2] and [3] below.

[1] http://marc.info/?l=openbsd-cvs&m=138238762705209&w=2
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=931354
[3] https://sourceforge.net/p/levent/bugs/320/
2021-01-07 17:02:06 +01:00
Olivier Certner 87aa6b2300 Issue #1699 - Part 1: python/psutil: Support recent FreeBSD versions
'sysctl' interface to currently opened connections changed in FreeBSD 12.

Drop support for FreeBSD < 9, these are very old and unsupported versions.
2021-01-07 17:02:05 +01:00
Moonchild 65da2431f9 Issue #1705 - Part 4: Add scrollbar-width CSS keyword to CSS parser.
This should be all parts needed to add a brand new enum keyword including
getting the computed style from it...
2021-01-06 23:57:26 +00:00
Moonchild 0e6a9cc60a Issue #1705 - Part 3: Rename ScrollbarStyles to ScrollStyles.
ScrollbarStyles contains values of overflow, (over)scroll-behavior, etc.
The only one which is marginally related to scroll _bars_ is overflow, which can
be used to hide scrollbar (by making an element not scrollable) or enforce the
scrollbar to display.

It makes more sense to be called ScrollStyles as it's mainly concerning behavior
of scrolling, not scrollbars. Also, with the addition of scrollbar width
properties, the current name can be confusing.
2021-01-06 16:31:36 +00:00
Moonchild 4681e04dc5 Issue #1705 - Part 2: Add a ShowScrollbar enum to be used in ScrollReflowInput.
Overflow properties have two purposes:
1. controlling whether the scrollbar should be shown;
2. controlling whether the content is scrollable.

However, with the scrollbar-width property being added, scrollability and
presence of a scrollbar are no longer tied together.
This patch makes a separation between the value of overflow and the presence of
a scrollbar by making it clear that for ScrollReflowInput, we only care about
whether scrollbar should be shown.
This should make it easier to write the logic involving presence of the
scrollbar based on webdev choice.
2021-01-06 12:48:38 +00:00
Moonchild e16ed489a4 Issue #1705 - Part 1: Rename nsChangeHint_CSSOverflowChange to *ScrollbarChange.
Prepare for scrollbar-width which should trigger the same kind of change.
2021-01-06 10:35:21 +00:00
Moonchild 5af0c434b9 Merge branch '61' 2021-01-04 11:29:47 +00:00
Matt A. Tobin 1a4abb5d97 Issue #61 - Add missing external symbols for gkmedias when WebRTC is built 2021-01-04 03:43:58 -05:00
Matt A. Tobin 3f1ed03579 Issue #61 - Add missing external symbol cubeb_set_log_callback to gkmedias symbols.def 2021-01-03 23:41:17 -05:00
Matt A. Tobin 46ca396f8c Issue #61 - Add configure option for non-windows platforms
Windows will ALWAYS have this enabled but we eventually want all target operating systems to use this as well but that will require more work
2021-01-03 23:40:35 -05:00
Moonchild 39cebe99e2 Issue #61 - Place Skia in libxul
Skia does some nasty things that break with DLL calls like having virtual dtors
without a body definition (and it's honestly surprising that it even builds to
begin with the way it's done, but apparently they use some linking symbol voodoo
to work around that in dependent classes).
Not wanting to have to pull Google code apart to try and fix that for something
we're only using for canvas anyway, it's better to just let Skia reside in
libxul instead.
2021-01-03 21:45:04 +00:00
Moonchild b713575ca4 Issue #61 - Add missing #endif in symbols file 2021-01-03 21:41:19 +00:00
Matt A. Tobin a625decfc9 [NSS hotpatch] Hard disable AVX2 in NSS Build System
This should be ported to the NSS repo
2021-01-03 03:11:22 -05:00
Moonchild 84fa3f9f72 Redundant code path cleanup (#1702)
Remove various obsolete configure options.
Remove Adjust SDK install tracking filth.
Remove redundant code paths in old-configure
This also optimizes linker use
Remove redundant conditional blocks.
Rewrite span.h without constexpr use.
2021-01-02 19:27:13 +00:00
Moonchild babeb5c556 Issue #61 - Reinstate buildability with shared gkmedias dll
This fully works for splitting gkmedias.dll back out from xul with one exception
which is Skia throwing undefined externals when linking gkmedias.
2021-01-02 13:35:39 +00:00
Moonchild 0bb464bfc1 Issue #1053 - Part 2b: Remove android from /layout reftests
Also cleans up some other obsolete checks and stylo reftest lists.
2020-12-31 22:46:09 +00:00
Moonchild e011a048e4 Issue #1053 - Part 3b: Remove AndroidSurfaceTexture and Android media decoder
interface.
2020-12-27 13:11:19 +00:00
Moonchild 8d4456c797 Issue #1053 - Part 3a: Remove Android conditionals from /gfx 2020-12-27 06:58:56 +00:00
Moonchild ae2a160348 Issue #1053 - Part 2a: Remove android from /layout (partial)
This removes android code from base, build, forms, generic, inspector, style,
printing, tools and xul.
2020-12-26 10:16:55 +00:00
Moonchild 9f004841a2 Issue #1053 - Part 1c: Remove references to mobile/android targets and paths 2020-12-25 23:29:47 +00:00
Moonchild 62568d94d5 Issue #1681 - Hard-code FLAC media type association for .flac
We don't support AAC outside of OMX at the moment, so oops.
2020-12-24 13:35:26 +00:00
Moonchild 837432de64 Revert "Issue #1681 - Hard-code FLAC and AAC media type associations for .flac and .aac"
This reverts commit a8e90975d0.
2020-12-24 13:34:22 +00:00
Moonchild a8e90975d0 Issue #1681 - Hard-code FLAC and AAC media type associations for .flac and .aac 2020-12-24 13:30:53 +00:00
Moonchild 6ae313b51c Clobber for NSS update. 2020-12-23 22:24:08 +00:00
Moonchild ae775e493b Issue #1693 - Additional configuration for NSS lib update.
The Seed and RC2 components are completely obsolete, so we shouldn't build them.
AVX2 for Chacha20-Poly1305 would fall outside of our platform sysreqs, and has a
build system issue with non-MSVC flags being passed (needs more research, also a
recent change around NSS 3.53 when the makefile destruction happened)
2020-12-23 19:45:11 +00:00
Moonchild 029bcfe189 Issue #1693 - Update NSS to 3.59.1.1
This updates to MoonchildProductions/NSS@bd49b2b88 in the repo created for our
consumption of the library.
2020-12-23 19:02:52 +00:00
Moonchild 149d2ffa77 Issue #1693 - Update NSPR to 4.29 2020-12-23 19:01:09 +00:00
Moonchild 25b6703e95 Issue #1701 - Implement Intl.PluralRules API 2020-12-22 20:32:56 +00:00
Moonchild 911cbcd1af Issue #1700 - Apply background color instead of inset shadow for findbar input.
This changes the toolkit theme for Linux and Windows (Mac already did this) to
style the input textbox on the findbar with -moz-appearance:none so as to give
us styling control (as opposed to using a native widget style) and apply a
neutral style to it.
Also ensures Mac remains readable in case of poorly contrasting text.
2020-12-21 16:24:37 +00:00
Moonchild 05569cb6d1 Revert "Issue #1686 - Align a keybinding definition with the others"
This reverts commit 85dc118aac.
2020-12-20 19:48:50 +00:00
Moonchild 8500ebf532 Merge pull request 'Reinstate the performance timing code removed in error' (#1698) from adesh/UXP:fix-performace-api into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1698
2020-12-16 15:36:19 +00:00
adesh 0187d3e4e7 Issue #1697 - Reinstate the performance timing code removed in error.
This was a fallout from pull request #929.
2020-12-16 06:31:31 -05:00
Moonchild 408477a87a Revert "Issue #1695 - Add clamping to websocket polling timeouts."
As of [da0c073a7] we no longer need this workaround because the issue is avoided
with proper sleep/wake logic restored.

This reverts commit 2fa993b563.
2020-12-16 06:42:42 +00:00
Moonchild da0c073a74 Issue #1695 - Restore Sleep/Wake timer that was erroneously removed.
This was fallout from PR #929 for Issue #21
2020-12-16 06:39:51 +00:00
Moonchild 78f114fc42 [toolkit] Handle corner case confusion of downloaded files without extension.
See code comment for details.
2020-12-15 11:33:29 +00:00
Moonchild ac4c22f096 Issue #1696 - Propagate flex sizes to the table wrapper
This avoids overlapping of table styled elements inside flexboxes as used on
some websites.

Resolves #1696
2020-12-15 10:30:06 +00:00
Moonchild 3c0236666e [network] Update port blacklist.
See BZ bugs 1674735, 1677047, 1677940 and 1676868 for details.
2020-12-15 09:04:21 +00:00
Moonchild 2fa993b563 Issue #1695 - Add clamping to websocket polling timeouts. 2020-12-12 12:41:26 +00:00
Moonchild 4281fcc163 Revert "Issue #1391 - Disable DOM Filesystem/dirpicker APIs by default."
This reverts commit 45a976a5f1.
2020-12-08 17:26:30 +00:00
Moonchild 6b45065f14 Issue #1695 - Fix socket timeout logic. 2020-12-08 17:19:01 +00:00
Moonchild 6cb00e2cfd Issue #1694 - Part 2: Use scriptabledateformat for Update History display. 2020-12-04 16:41:24 +00:00
Moonchild 16a1ff22a3 Issue #1694 - Part 1: Use scriptabledateformat for the Cookie Accept dialog. 2020-12-04 16:37:02 +00:00
Moonchild fd576c4270 Issue #1624 - flip the inlining pref.
The default is now set to the more stable but slower global setting.
2020-12-03 18:33:35 +00:00
Moonchild 7fda700f92 Nuke erroneously added vim line. 2020-12-03 17:52:32 +00:00
Moonchild 1a21b52692 Issue #1624 - Make ion inlining optimizations a pref.
This also adds it to JS_SetGlobalJitCompilerOption()
2020-12-03 13:56:36 +00:00
Moonchild 7f619fa9bf Merge branch 'nss-patch-work' 2020-12-01 22:47:40 +00:00
Moonchild b668164260 Issue #1624 - Globally disable inlining optimizations in the JS JIT compiler. 2020-12-01 22:46:55 +00:00
Moonchild 433ed209ba Revert "Issue #1624 - Exclude function scopes from Ion compilation."
This reverts commit bb31c1c65e.
2020-12-01 22:39:36 +00:00
Moonchild b1bbc9286d Merge pull request 'Fix macOS version detection above 10.15 and update blocklist support to 11.0' (#1692) from dbsoft/UXP:Big_Sur_Version into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1692
2020-12-01 22:27:41 +00:00
Brian Smith e43b01e58b Issue #1690 - Part 2: Update MacOS Blocklist support from 10.13 to 11.0.
Changes based on Mozilla bug 1678061.
2020-12-01 15:46:38 -06:00
Moonchild 1683d012e2 Clobber for NSS update. 2020-12-01 15:33:00 +00:00
Moonchild 958205f4da [NSS] Version and build bump 2020-12-01 14:20:15 +00:00
Moonchild cca3b9062d [NSS] Update root certificates. 2020-12-01 14:19:59 +00:00
Moonchild bb31c1c65e Issue #1624 - Exclude function scopes from Ion compilation.
This seems to work around the problem with the compiled code stack for in-line
declared JS module code. Not optimal, for sure, but better than having to kill
Ion compilation outright.
2020-11-30 16:53:49 +00:00
Moonchild 060e3eb0c8 Revert "Issue #1691 - Part 1: Provide a way of associating a private value with a script"
This reverts commit 15914ec578.
2020-11-28 10:18:10 +00:00
Moonchild 15914ec578 Issue #1691 - Part 1: Provide a way of associating a private value with a script
or module.

This is a prerequisite for dynamic import
2020-11-27 15:47:49 +00:00
Brian Smith b1ac886a98 Issue #1690 - Part 1: Fix MacOS version detection above 10.15.
Changes based on Mozilla bug 1616404 but supporting back to 10.7.
2020-11-23 08:18:34 -06:00
46075 changed files with 2427176 additions and 3249279 deletions

No files matched your search

-22
View File
@@ -187,28 +187,6 @@ devtools/client/framework/test/code_ugly*
devtools/server/tests/unit/babel_and_browserify_script_with_source_map.js
devtools/server/tests/unit/setBreakpoint*
# mobile/android/ exclusions
mobile/android/tests/
# Uses `#filter substitution`
mobile/android/b2gdroid/app/b2gdroid.js
mobile/android/app/mobile.js
mobile/android/chrome/content/healthreport-prefs.js
# Uses `#expand`
mobile/android/chrome/content/about.js
# Not much JS to lint and non-standard at that
mobile/android/installer/
mobile/android/locales/
# Non-standard `(catch ex if ...)`
mobile/android/chrome/content/browser.js
mobile/android/components/Snippets.js
# Bug 1178739: Ignore this file as a quick fix for "Illegal yield expression"
mobile/android/modules/HomeProvider.jsm
# services/ exclusions
# Uses `#filter substitution`
-3
View File
@@ -91,9 +91,6 @@ GPATH
# Git clone directory for updating web-platform-tests
testing/web-platform/sync/
# Android Gradle artifacts.
mobile/android/gradle/.gradle
# XCode project cruft
embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/project.xcworkspace/xcuserdata
embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/xcuserdata
-5
View File
@@ -36,11 +36,6 @@ def FlagsForFile(filename):
flag_list = shlex.split(out.getvalue())
# This flag is added by Fennec for android build and causes ycmd to fail to parse the file.
# Removing this flag is a workaround until ycmd starts to handle this flag properly.
# https://github.com/Valloric/YouCompleteMe/issues/1490
final_flags = [x for x in flag_list if not x.startswith('-march=armv')]
return {
'flags': final_flags,
'do_cache': True
+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 CSS flow-root implementation
Touching ICU's build system requires a CLOBBER. (Issue #2165)
+7 -50
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,45 +160,9 @@ 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.
# Eventually, a standalone js build would just be able to build nspr itself,
# removing the need for the former.
ifdef JS_STANDALONE
NO_REMOVE=1
endif
.PHONY: $(addprefix install-,$(subst /,_,$(install_manifests)))
.PHONY: $(addprefix install-,$(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 /,_,$*)))
$(addprefix $(call py_action,process_install_manifest,--track install_$(subst /,_,$*).track $*) ,$(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/% ;
@@ -217,10 +175,9 @@ install-tests: install-test-files
.PHONY: run-tests-deps
run-tests-deps: $(install_manifest_depends)
# Force --no-remove, because $objdir/_tests is handled by multiple manifests.
.PHONY: install-test-files
install-test-files:
$(call py_action,process_install_manifest,--no-remove _tests _build_manifests/install/_test_files)
$(call py_action,process_install_manifest,--track install__test_files.track _tests _build_manifests/install/_test_files)
include $(topsrcdir)/build/moz-automation.mk
@@ -240,13 +197,13 @@ ifndef NO_PROFILE_GUIDED_OPTIMIZE
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
recurse_pre-export:: install-manifests
binaries::
@$(MAKE) install-manifests NO_REMOVE=1 install_manifests=dist/include
@$(MAKE) install-manifests install_manifests=dist/include
endif
endif
else # !MOZ_PROFILE_USE (normal build)
recurse_pre-export:: install-manifests
binaries::
@$(MAKE) install-manifests NO_REMOVE=1 install_manifests=dist/include
@$(MAKE) install-manifests install_manifests=dist/include
endif
# For historical reasons that are unknown, $(DIST)/sdk is always blown away
+5 -5
View File
@@ -9,8 +9,6 @@ selective cherry-picking of directly-applicable patches, this repository has its
own development and holds the base for a maintained platform to be used by XUL
applications.
For a list of active projects making use of the Unified XUL Platform, checkout http://thereisonlyxul.org/.
## Additional documentation
Additional documentation relevant to this source code can be found in the `/docs`
@@ -23,7 +21,7 @@ You are also always welcome to get in touch with our community on the [Pale Moon
### A note about trademarks and branding
Although this repository is licensed under Mozilla Public License v2.0, the
Although this repository is primarily licensed under Mozilla Public License v2.0, the
trademarks and brands contained herein remain the property of their respective
owners. For more details, please see the notifications in the respective directories.
@@ -35,5 +33,7 @@ If you fork this repository to perform your own work on it, please consider offe
improvement patches upstream to its origin to mutually improve the platform and build
a future for XUL.
## Looking for Pale Moon and Basilisk?
As of [`Issue #969`](https://repo.palemoon.org/MoonchildProductions/UXP/issues/969), release versions `28.9.0` and `2020.03.04` respectively, they have been split off into their own dedicated repositories located at [`MoonchildProductions/Pale-Moon`](https://repo.palemoon.org/MoonchildProductions/Pale-Moon) and [`MoonchildProductions/Basilisk`](https://repo.palemoon.org/MoonchildProductions/Basilisk).
## Looking for Pale Moon?
As of [`Issue #969`](https://repo.palemoon.org/MoonchildProductions/UXP/issues/969), release version `28.9.0`,
applications have been split off into their own dedicated (front-end) repositories, with Pale Moon located at
[`MoonchildProductions/Pale-Moon`](https://repo.palemoon.org/MoonchildProductions/Pale-Moon).
+2 -3
View File
@@ -15,14 +15,14 @@ What should be considered vulnerabilities or security hazards by default:
Generally not security vulnerabilities:
- Null dereferencing crashes;
- Malware extensions (but please do report those on the forum in the extensions board!);
- Malware extensions (but please do report those on the forum in the add-ons board!);
- Denial-of-service (AKA "evil trap sites")
- Browser hangs
- Issues with non-standard manual configuration (either at build time or by manipulating about:config directly)
## Reporting a Vulnerability
If you find an issue in UXP or the applications it builds on that could impact the security or safety of users please **do not**
If you find an issue in UXP, or the applications building on it, that could impact the security or safety of users please **do not**
make an issue on Gitea about it. Gitea does not support restricted viewability for security sensitive bugs.
If you want to report a security-sensitive issue then please go to the [forum](https://forum.palemoon.org) and report the issue
@@ -33,4 +33,3 @@ except the recipient (not even moderators!).
You will be informed via private message if the vulnerability report is accepted or declined, with reasoning.
Security updates occur regularly and are given priority over most other development tasks. In general, they can be solved
relatively quickly and will be included in the next point release (third digit if not rolled into a more major one).
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -5,9 +5,7 @@
#include "AccIterator.h"
#include "AccGroupInfo.h"
#ifdef MOZ_XUL
#include "XULTreeAccessible.h"
#endif
#include "mozilla/dom/HTMLLabelElement.h"
-2
View File
@@ -341,8 +341,6 @@ LogRequest(nsIRequest* aRequest)
printf("targeted; ");
if (loadFlags & nsIChannel::LOAD_CALL_CONTENT_SNIFFERS)
printf("call content sniffers; ");
if (loadFlags & nsIChannel::LOAD_CLASSIFY_URI)
printf("classify uri; ");
} else {
printf(" no request");
}
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -13,7 +13,6 @@
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/Element.h"
#include "mozilla/Telemetry.h"
using namespace mozilla;
using namespace mozilla::a11y;
+8 -26
View File
@@ -18,10 +18,6 @@
#include "mozilla/AppUnits.h"
#include "mozilla/gfx/2D.h"
#if defined(MOZ_WIDGET_GTK)
#include "gfxPlatformGtk.h" // xxx - for UseFcFontList
#endif
using namespace mozilla;
using namespace mozilla::a11y;
@@ -653,28 +649,14 @@ TextAttrsMgr::FontWeightTextAttr::
if (font->IsSyntheticBold())
return 700;
bool useFontEntryWeight = true;
// Under Linux, when gfxPangoFontGroup code is used,
// font->GetStyle()->weight will give the absolute weight requested of the
// font face. The gfxPangoFontGroup code uses the gfxFontEntry constructor
// which doesn't initialize the weight field.
#if defined(MOZ_WIDGET_GTK)
useFontEntryWeight = gfxPlatformGtk::UseFcFontList();
#endif
if (useFontEntryWeight) {
// On Windows, font->GetStyle()->weight will give the same weight as
// fontEntry->Weight(), the weight of the first font in the font group,
// which may not be the weight of the font face used to render the
// characters. On Mac, font->GetStyle()->weight will just give the same
// number as getComputedStyle(). fontEntry->Weight() will give the weight
// of the font face used.
gfxFontEntry *fontEntry = font->GetFontEntry();
return fontEntry->Weight();
} else {
return font->GetStyle()->weight;
}
// On Windows, font->GetStyle()->weight will give the same weight as
// fontEntry->Weight(), the weight of the first font in the font group,
// which may not be the weight of the font face used to render the
// characters. On Mac, font->GetStyle()->weight will just give the same
// number as getComputedStyle(). fontEntry->Weight() will give the weight
// of the font face used.
gfxFontEntry *fontEntry = font->GetFontEntry();
return fontEntry->Weight();
}
////////////////////////////////////////////////////////////////////////////////
@@ -68,7 +68,6 @@
#include "mozilla/Services.h"
#include "nsDeckFrame.h"
#ifdef MOZ_XUL
#include "XULAlertAccessible.h"
#include "XULColorPickerAccessible.h"
#include "XULComboboxAccessible.h"
@@ -79,7 +78,6 @@
#include "XULSliderAccessible.h"
#include "XULTabAccessible.h"
#include "XULTreeGridAccessibleWrap.h"
#endif
#if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
#include "nsNPAPIPluginInstance.h"
@@ -1356,7 +1354,6 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
}
RefPtr<Accessible> accessible;
#ifdef MOZ_XUL
// XUL controls
if (role.EqualsLiteral("xul:alert")) {
accessible = new XULAlertAccessible(aContent, aDoc);
@@ -1515,7 +1512,6 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
accessible = new XULToolbarButtonAccessible(aContent, aDoc);
}
#endif // MOZ_XUL
return accessible.forget();
}
@@ -1739,7 +1735,6 @@ nsAccessibilityService::HasAccessible(nsIDOMNode* aDOMNode)
////////////////////////////////////////////////////////////////////////////////
// nsAccessibilityService private (DON'T put methods here)
#ifdef MOZ_XUL
already_AddRefed<Accessible>
nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
DocAccessible* aDoc)
@@ -1769,7 +1764,6 @@ nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
new XULTreeGridAccessibleWrap(aContent, aDoc, treeFrame);
return accessible.forget();
}
#endif
nsAccessibilityService*
GetOrCreateAccService(uint32_t aNewConsumer)
-2
View File
@@ -274,13 +274,11 @@ private:
CreateAccessibleByFrameType(nsIFrame* aFrame, nsIContent* aContent,
Accessible* aContext);
#ifdef MOZ_XUL
/**
* Create accessible for XUL tree element.
*/
already_AddRefed<Accessible>
CreateAccessibleForXULTree(nsIContent* aContent, DocAccessible* aDoc);
#endif
/**
* Reference for accessibility service instance.
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-6
View File
@@ -48,9 +48,7 @@
#include "mozilla/dom/DocumentType.h"
#include "mozilla/dom/Element.h"
#ifdef MOZ_XUL
#include "nsIXULDocument.h"
#endif
using namespace mozilla;
using namespace mozilla::a11y;
@@ -210,11 +208,9 @@ DocAccessible::NativeRole()
return roles::CHROME_WINDOW;
if (itemType == nsIDocShellTreeItem::typeContent) {
#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode));
if (xulDoc)
return roles::APPLICATION;
#endif
return roles::DOCUMENT;
}
}
@@ -387,13 +383,11 @@ DocAccessible::URL(nsAString& aURL) const
void
DocAccessible::DocType(nsAString& aType) const
{
#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode));
if (xulDoc) {
aType.AssignLiteral("window"); // doctype not implemented for XUL at time of writing - causes assertion
return;
}
#endif
dom::DocumentType* docType = mDocumentNode->GetDoctype();
if (docType)
docType->GetPublicId(aType);
+8 -31
View File
@@ -19,9 +19,7 @@
#include "Relation.h"
#include "Role.h"
#include "States.h"
#ifdef MOZ_XUL
#include "XULTreeAccessible.h"
#endif
#include "mozilla/dom/Element.h"
@@ -43,10 +41,8 @@
#include "nsFocusManager.h"
#include "nsGlobalWindow.h"
#ifdef MOZ_XUL
#include "nsIXULDocument.h"
#include "nsIXULWindow.h"
#endif
using namespace mozilla;
using namespace mozilla::a11y;
@@ -102,7 +98,6 @@ RootAccessible::NativeRole()
}
// RootAccessible protected member
#ifdef MOZ_XUL
uint32_t
RootAccessible::GetChromeFlags()
{
@@ -122,7 +117,6 @@ RootAccessible::GetChromeFlags()
xulWin->GetChromeFlags(&chromeFlags);
return chromeFlags;
}
#endif
uint64_t
RootAccessible::NativeState()
@@ -131,7 +125,6 @@ RootAccessible::NativeState()
if (state & states::DEFUNCT)
return state;
#ifdef MOZ_XUL
uint32_t chromeFlags = GetChromeFlags();
if (chromeFlags & nsIWebBrowserChrome::CHROME_WINDOW_RESIZE)
state |= states::SIZEABLE;
@@ -142,7 +135,6 @@ RootAccessible::NativeState()
state |= states::MOVEABLE;
if (chromeFlags & nsIWebBrowserChrome::CHROME_MODAL)
state |= states::MODAL;
#endif
nsFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm && fm->GetActiveWindow() == mDocumentNode->GetWindow())
@@ -292,7 +284,6 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
if (!accessible)
return;
#ifdef MOZ_XUL
XULTreeAccessible* treeAcc = accessible->AsXULTree();
if (treeAcc) {
if (eventType.EqualsLiteral("TreeRowCountChanged")) {
@@ -305,7 +296,6 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
return;
}
}
#endif
if (eventType.EqualsLiteral("RadioStateChange")) {
uint64_t state = accessible->State();
@@ -341,7 +331,6 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
}
Accessible* treeItemAcc = nullptr;
#ifdef MOZ_XUL
// If it's a tree element, need the currently selected item.
if (treeAcc) {
treeItemAcc = accessible->CurrentItem();
@@ -385,29 +374,22 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
nsEventShell::FireEvent(selChangeEvent);
return;
}
}
else
#endif
if (eventType.EqualsLiteral("AlertActive")) {
} else if (eventType.EqualsLiteral("AlertActive")) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_ALERT, accessible);
}
else if (eventType.EqualsLiteral("popupshown")) {
} else if (eventType.EqualsLiteral("popupshown")) {
HandlePopupShownEvent(accessible);
}
else if (eventType.EqualsLiteral("DOMMenuInactive")) {
} else if (eventType.EqualsLiteral("DOMMenuInactive")) {
if (accessible->Role() == roles::MENUPOPUP) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
accessible);
}
}
else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
} else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
FocusMgr()->ActiveItemChanged(accessible);
#ifdef A11Y_LOG
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuItemActive", accessible);
#endif
}
else if (eventType.EqualsLiteral("DOMMenuItemInactive")) {
} else if (eventType.EqualsLiteral("DOMMenuItemInactive")) {
// Process DOMMenuItemInactive event for autocomplete only because this is
// unique widget that may acquire focus from autocomplete popup while popup
// stays open and has no active item. In case of XUL tree autocomplete
@@ -421,8 +403,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
logging::ActiveItemChangeCausedBy("DOMMenuItemInactive", accessible);
#endif
}
}
else if (eventType.EqualsLiteral("DOMMenuBarActive")) { // Always from user input
} else if (eventType.EqualsLiteral("DOMMenuBarActive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_START,
accessible, eFromUserInput);
@@ -440,8 +421,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
logging::ActiveItemChangeCausedBy("DOMMenuBarActive", accessible);
#endif
}
}
else if (eventType.EqualsLiteral("DOMMenuBarInactive")) { // Always from user input
} else if (eventType.EqualsLiteral("DOMMenuBarInactive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_END,
accessible, eFromUserInput);
@@ -450,8 +430,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuBarInactive", accessible);
#endif
}
else if (accessible->NeedsDOMUIEvent() &&
} else if (accessible->NeedsDOMUIEvent() &&
eventType.EqualsLiteral("ValueChange")) {
uint32_t event = accessible->HasNumericValue()
? nsIAccessibleEvent::EVENT_VALUE_CHANGE
@@ -650,7 +629,6 @@ RootAccessible::HandlePopupHidingEvent(nsINode* aPopupNode)
}
}
#ifdef MOZ_XUL
void
RootAccessible::HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
XULTreeAccessible* aAccessible)
@@ -714,7 +692,6 @@ RootAccessible::HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
aAccessible->TreeViewInvalidated(startRow, endRow, startCol, endCol);
}
#endif
ProxyAccessible*
RootAccessible::GetPrimaryRemoteTopLevelContentDoc() const
+5 -7
View File
@@ -70,14 +70,12 @@ protected:
*/
void HandlePopupHidingEvent(nsINode* aNode);
#ifdef MOZ_XUL
void HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
XULTreeAccessible* aAccessible);
void HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
XULTreeAccessible* aAccessible);
void HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
XULTreeAccessible* aAccessible);
void HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
XULTreeAccessible* aAccessible);
uint32_t GetChromeFlags();
#endif
uint32_t GetChromeFlags();
};
inline RootAccessible*
+5 -26
View File
@@ -64,9 +64,7 @@ this.AccessFu = { // jshint ignore:line
if (this._enabled) {
this._disable();
}
if (Utils.MozBuildApp === 'mobile/android') {
Services.obs.removeObserver(this, 'Accessibility:Settings');
} else if (Utils.win.navigator.mozSettings) {
if (Utils.win.navigator.mozSettings) {
Utils.win.navigator.mozSettings.removeObserver(
SCREENREADER_SETTING, this.handleEvent);
}
@@ -585,11 +583,7 @@ var Output = {
get androidBridge() {
delete this.androidBridge;
if (Utils.MozBuildApp === 'mobile/android') {
this.androidBridge = Services.androidBridge;
} else {
this.androidBridge = null;
}
this.androidBridge = null;
return this.androidBridge;
},
@@ -815,12 +809,6 @@ var Input = {
target.blur();
}
}
if (Utils.MozBuildApp == 'mobile/android') {
// Return focus to native Android browser chrome.
Services.androidBridge.handleGeckoMessage(
{ type: 'ToggleChrome:Focus' });
}
break;
case aEvent.DOM_VK_RETURN:
if (this.editState.editing) {
@@ -837,18 +825,9 @@ var Input = {
},
moveToPoint: function moveToPoint(aRule, aX, aY) {
// XXX: Bug 1013408 - There is no alignment between the chrome window's
// viewport size and the content viewport size in Android. This makes
// sending mouse events beyond its bounds impossible.
if (Utils.MozBuildApp === 'mobile/android') {
let mm = Utils.getMessageManager(Utils.CurrentBrowser);
mm.sendAsyncMessage('AccessFu:MoveToPoint',
{rule: aRule, x: aX, y: aY, origin: 'top'});
} else {
let win = Utils.win;
Utils.winUtils.sendMouseEvent('mousemove',
aX - win.mozInnerScreenX, aY - win.mozInnerScreenY, 0, 0, 0);
}
let win = Utils.win;
Utils.winUtils.sendMouseEvent('mousemove',
aX - win.mozInnerScreenX, aY - win.mozInnerScreenY, 0, 0, 0);
},
moveCursor: function moveCursor(aAction, aRule, aInputType, aAdjustRange) {
+1 -3
View File
@@ -76,8 +76,6 @@ const EDGE = 0.1;
const TIMEOUT_MULTIPLIER = 1;
// A single pointer down/up sequence periodically precedes the tripple swipe
// gesture on Android. This delay acounts for that.
const IS_ANDROID = Utils.MozBuildApp === 'mobile/android' &&
Utils.AndroidSdkVersion >= 14;
/**
* A point object containing distance travelled data.
@@ -206,7 +204,7 @@ this.GestureTracker = { // jshint ignore:line
if (aDetail.type !== 'pointerdown') {
return;
}
let GestureConstructor = aGesture || (IS_ANDROID ? DoubleTap : Tap);
let GestureConstructor = aGesture || Tap;
this._create(GestureConstructor);
this._update(aDetail, aTimeStamp);
},
+1 -1
View File
@@ -786,7 +786,7 @@ this.UtteranceGenerator = { // jshint ignore:line
// This is because we expose the checked information on the node itself.
// XXX: this means the checked state is always appended to the end,
// regardless of the utterance ordering preference.
if ((Utils.AndroidSdkVersion < 16 || Utils.MozBuildApp === 'browser') &&
if (Utils.MozBuildApp === 'browser' &&
aState.contains(States.CHECKABLE)) {
let checked = aState.contains(States.CHECKED);
let statetr;
-12
View File
@@ -39,13 +39,6 @@ var PointerRelay = { // jshint ignore:line
delete this._eventsOfInterest;
switch (Utils.widgetToolkit) {
case 'android':
this._eventsOfInterest = {
'touchstart' : true,
'touchmove' : true,
'touchend' : true };
break;
default:
// Desktop.
this._eventsOfInterest = {
@@ -110,11 +103,6 @@ var PointerRelay = { // jshint ignore:line
target: aEvent.target
}];
if (Utils.widgetToolkit === 'android' &&
changedTouches.length === 1 && changedTouches[0].identifier === 1) {
return;
}
if (changedTouches.length === 1 &&
changedTouches[0].identifier === SYNTH_ID) {
return;
+17 -30
View File
@@ -257,11 +257,8 @@ AndroidPresenter.prototype.pivotChanged =
let androidEvents = [];
let isExploreByTouch = (aReason == Ci.nsIAccessiblePivot.REASON_POINT &&
Utils.AndroidSdkVersion >= 14);
let focusEventType = (Utils.AndroidSdkVersion >= 16) ?
this.ANDROID_VIEW_ACCESSIBILITY_FOCUSED :
this.ANDROID_VIEW_FOCUSED;
let isExploreByTouch = (aReason == Ci.nsIAccessiblePivot.REASON_POINT);
let focusEventType = this.ANDROID_VIEW_ACCESSIBILITY_FOCUSED;
if (isExploreByTouch) {
// This isn't really used by TalkBack so this is a half-hearted attempt
@@ -270,25 +267,21 @@ AndroidPresenter.prototype.pivotChanged =
}
let brailleOutput = {};
if (Utils.AndroidSdkVersion >= 16) {
if (!this._braillePresenter) {
this._braillePresenter = new BraillePresenter();
}
brailleOutput = this._braillePresenter.pivotChanged(aContext, aReason).
details;
if (!this._braillePresenter) {
this._braillePresenter = new BraillePresenter();
}
brailleOutput = this._braillePresenter.pivotChanged(aContext, aReason).
details;
if (aReason === Ci.nsIAccessiblePivot.REASON_TEXT) {
if (Utils.AndroidSdkVersion >= 16) {
let adjustedText = aContext.textAndAdjustedOffsets;
let adjustedText = aContext.textAndAdjustedOffsets;
androidEvents.push({
eventType: this.ANDROID_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY,
text: [adjustedText.text],
fromIndex: adjustedText.startOffset,
toIndex: adjustedText.endOffset
});
}
androidEvents.push({
eventType: this.ANDROID_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY,
text: [adjustedText.text],
fromIndex: adjustedText.startOffset,
toIndex: adjustedText.endOffset
});
} else {
let state = Utils.getState(aContext.accessible);
androidEvents.push({eventType: (isExploreByTouch) ?
@@ -371,7 +364,7 @@ AndroidPresenter.prototype.textSelectionChanged =
aOldEnd, aIsFromUserInput) {
let androidEvents = [];
if (Utils.AndroidSdkVersion >= 14 && !aIsFromUserInput) {
if (!aIsFromUserInput) {
if (!this._braillePresenter) {
this._braillePresenter = new BraillePresenter();
}
@@ -388,7 +381,7 @@ AndroidPresenter.prototype.textSelectionChanged =
});
}
if (Utils.AndroidSdkVersion >= 16 && aIsFromUserInput) {
if (aIsFromUserInput) {
let [from, to] = aOldStart < aStart ?
[aOldStart, aStart] : [aStart, aOldStart];
androidEvents.push({
@@ -407,10 +400,6 @@ AndroidPresenter.prototype.textSelectionChanged =
AndroidPresenter.prototype.viewportChanged =
function AndroidPresenter_viewportChanged(aWindow, aCurrentContext) {
if (Utils.AndroidSdkVersion < 14) {
return null;
}
let events = [{
eventType: this.ANDROID_VIEW_SCROLLED,
text: [],
@@ -420,7 +409,7 @@ AndroidPresenter.prototype.viewportChanged =
maxScrollY: aWindow.scrollMaxY
}];
if (Utils.AndroidSdkVersion >= 16 && aCurrentContext) {
if (aCurrentContext) {
let currentAcc = aCurrentContext.accessibleForBounds;
if (Utils.isAliveAndVisible(currentAcc)) {
events.push({
@@ -447,8 +436,7 @@ AndroidPresenter.prototype.announce =
return {
type: this.type,
details: [{
eventType: (Utils.AndroidSdkVersion >= 16) ?
this.ANDROID_ANNOUNCEMENT : this.ANDROID_VIEW_TEXT_CHANGED,
eventType: this.ANDROID_ANNOUNCEMENT,
text: [localizedAnnouncement],
addedCount: localizedAnnouncement.length,
removedCount: 0,
@@ -680,7 +668,6 @@ this.Presentation = { // jshint ignore:line
get presenters() {
delete this.presenters;
let presenterMap = {
'mobile/android': [VisualPresenter, AndroidPresenter],
'b2g': [VisualPresenter, B2GPresenter],
'browser': [VisualPresenter, B2GPresenter, AndroidPresenter]
};
+1 -28
View File
@@ -33,9 +33,7 @@ this.Utils = { // jshint ignore:line
_buildAppMap: {
'{3c2e2abc-06d4-11e1-ac3b-374f68613e61}': 'b2g',
'{d1bfe7d9-c01e-4237-998b-7b5f960a4314}': 'graphene',
'{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'browser',
'{aa3c5121-dab2-40e2-81ca-7ea25febc110}': 'mobile/android',
'{a23983c0-fd0e-11dc-95ff-0800200c9a66}': 'mobile/xul'
'{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'browser'
},
init: function Utils_init(aWindow) {
@@ -111,35 +109,13 @@ this.Utils = { // jshint ignore:line
return this._ScriptName;
},
get AndroidSdkVersion() {
if (!this._AndroidSdkVersion) {
if (Services.appinfo.OS == 'Android') {
this._AndroidSdkVersion = Services.sysinfo.getPropertyAsInt32(
'version');
} else {
// Most useful in desktop debugging.
this._AndroidSdkVersion = 16;
}
}
return this._AndroidSdkVersion;
},
set AndroidSdkVersion(value) {
// When we want to mimic another version.
this._AndroidSdkVersion = value;
},
get BrowserApp() {
if (!this.win) {
return null;
}
switch (this.MozBuildApp) {
case 'mobile/android':
return this.win.BrowserApp;
case 'browser':
return this.win.gBrowser;
case 'b2g':
return this.win.shell;
default:
return null;
}
@@ -149,9 +125,6 @@ this.Utils = { // jshint ignore:line
if (!this.BrowserApp) {
return null;
}
if (this.MozBuildApp == 'b2g') {
return this.BrowserApp.contentBrowser;
}
return this.BrowserApp.selectedBrowser;
},
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
+2 -4
View File
@@ -21,12 +21,10 @@ DIRS += [ 'aom',
'interfaces',
'ipc',
'jsat',
'xpcom'
'xpcom',
'xul'
]
if CONFIG['MOZ_XUL']:
DIRS += ['xul']
TEST_DIRS += ['tests/mochitest']
BROWSER_CHROME_MANIFESTS += [
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -67,7 +67,7 @@
* Change scrollbar styles from hidden to auto. That makes us to create an
* accessible for scroll area.
*/
function changeScrollbarStyles(aContainerID, aScrollAreaID)
function changeScrollStyles(aContainerID, aScrollAreaID)
{
this.container = getAccessible(aContainerID);
this.scrollAreaNode = getNode(aScrollAreaID);
@@ -77,7 +77,7 @@
new invokerChecker(EVENT_REORDER, this.container)
];
this.invoke = function changeScrollbarStyles_invoke()
this.invoke = function changeScrollStyles_invoke()
{
var accTree =
{ SECTION: [] };
@@ -86,7 +86,7 @@
this.scrollAreaNode.style.overflow = "auto";
}
this.finalCheck = function changeScrollbarStyles_finalCheck()
this.finalCheck = function changeScrollStyles_finalCheck()
{
var accTree =
{ SECTION: [ // container
@@ -95,7 +95,7 @@
testAccessibleTree(this.container, accTree);
}
this.getID = function changeScrollbarStyles_getID()
this.getID = function changeScrollStyles_getID()
{
return "change scrollbar styles " + prettyName(aScrollAreaID);
}
@@ -114,7 +114,7 @@
gQueue = new eventQueue();
gQueue.push(new changeScrollRange("container", "scrollarea"));
gQueue.push(new changeScrollbarStyles("container2", "scrollarea2"));
gQueue.push(new changeScrollStyles("container2", "scrollarea2"));
gQueue.invoke(); // Will call SimpleTest.finish();
}
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-13
View File
@@ -35,19 +35,6 @@ a11y::PlatformInit()
nsWinUtils::MaybeStartWindowEmulation();
ia2AccessibleText::InitTextChangeData();
if (BrowserTabsRemoteAutostart()) {
mscom::InterceptorLog::Init();
UniquePtr<RegisteredProxy> regProxy(
mscom::RegisterProxy(L"ia2marshal.dll"));
gRegProxy = regProxy.release();
UniquePtr<RegisteredProxy> regAccTlb(
mscom::RegisterTypelib(L"oleacc.dll",
RegistrationFlags::eUseSystemDirectory));
gRegAccTlb = regAccTlb.release();
UniquePtr<RegisteredProxy> regMiscTlb(
mscom::RegisterTypelib(L"Accessible.tlb"));
gRegMiscTlb = regMiscTlb.release();
}
}
void
+3 -7
View File
@@ -33,15 +33,11 @@ SOURCES += [
'RootAccessibleWrap.cpp',
'ServiceProvider.cpp',
'TextLeafAccessibleWrap.cpp',
'XULListboxAccessibleWrap.cpp',
'XULMenuAccessibleWrap.cpp',
'XULTreeGridAccessibleWrap.cpp',
]
if CONFIG['MOZ_XUL']:
SOURCES += [
'XULListboxAccessibleWrap.cpp',
'XULMenuAccessibleWrap.cpp',
'XULTreeGridAccessibleWrap.cpp',
]
LOCAL_INCLUDES += [
'/accessible/base',
'/accessible/generic',
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
-2
View File
@@ -1,6 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* 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/. */
Vendored
-2
View File
@@ -21,12 +21,10 @@ builtin(include, build/autoconf/frameptr.m4)dnl
builtin(include, build/autoconf/compiler-opts.m4)dnl
builtin(include, build/autoconf/expandlibs.m4)dnl
builtin(include, build/autoconf/arch.m4)dnl
builtin(include, build/autoconf/android.m4)dnl
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) {
}
@@ -1,54 +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/. */
package org.mozilla.gecko.annotationProcessors;
/**
* Object holding annotation data. Used by GeneratableElementIterator.
*/
public class AnnotationInfo {
public enum ExceptionMode {
ABORT,
NSRESULT,
IGNORE;
String nativeValue() {
return "mozilla::jni::ExceptionMode::" + name();
}
}
public enum CallingThread {
GECKO,
UI,
ANY;
String nativeValue() {
return "mozilla::jni::CallingThread::" + name();
}
}
public enum DispatchTarget {
GECKO,
PROXY,
CURRENT;
String nativeValue() {
return "mozilla::jni::DispatchTarget::" + name();
}
}
public final String wrapperName;
public final ExceptionMode exceptionMode;
public final CallingThread callingThread;
public final DispatchTarget dispatchTarget;
public AnnotationInfo(String wrapperName, ExceptionMode exceptionMode,
CallingThread callingThread, DispatchTarget dispatchTarget) {
this.wrapperName = wrapperName;
this.exceptionMode = exceptionMode;
this.callingThread = callingThread;
this.dispatchTarget = dispatchTarget;
}
}
@@ -1,175 +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/. */
package org.mozilla.gecko.annotationProcessors;
import org.mozilla.gecko.annotationProcessors.classloader.AnnotatableEntity;
import org.mozilla.gecko.annotationProcessors.classloader.ClassWithOptions;
import org.mozilla.gecko.annotationProcessors.classloader.IterableJarLoadingURLClassLoader;
import org.mozilla.gecko.annotationProcessors.utils.GeneratableElementIterator;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
public class AnnotationProcessor {
public static final String GENERATED_COMMENT =
"// GENERATED CODE\n" +
"// Generated by the Java program at /build/annotationProcessors at compile time\n" +
"// from annotations on Java methods. To update, change the annotations on the\n" +
"// corresponding Java methods and rerun the build. Manually updating this file\n" +
"// will cause your build to fail.\n" +
"\n";
private static final StringBuilder headerFile = new StringBuilder(GENERATED_COMMENT);
private static final StringBuilder implementationFile = new StringBuilder(GENERATED_COMMENT);
private static final StringBuilder nativesFile = new StringBuilder(GENERATED_COMMENT);
public static void main(String[] args) {
// We expect a list of jars on the commandline. If missing, whinge about it.
if (args.length <= 2) {
System.err.println("Usage: java AnnotationProcessor outprefix jarfiles ...");
System.exit(1);
}
final String OUTPUT_PREFIX = args[0];
final String SOURCE_FILE = OUTPUT_PREFIX + "JNIWrappers.cpp";
final String HEADER_FILE = OUTPUT_PREFIX + "JNIWrappers.h";
final String NATIVES_FILE = OUTPUT_PREFIX + "JNINatives.h";
System.out.println("Processing annotations...");
// We want to produce the same output as last time as often as possible. Ordering of
// generated statements, therefore, needs to be consistent.
final String[] jars = Arrays.copyOfRange(args, 1, args.length);
Arrays.sort(jars);
// Start the clock!
long s = System.currentTimeMillis();
// Get an iterator over the classes in the jar files given...
Iterator<ClassWithOptions> jarClassIterator = IterableJarLoadingURLClassLoader.getIteratorOverJars(jars);
headerFile.append(
"#ifndef " + getHeaderGuardName(HEADER_FILE) + "\n" +
"#define " + getHeaderGuardName(HEADER_FILE) + "\n" +
"\n" +
"#include \"mozilla/jni/Refs.h\"\n" +
"\n" +
"namespace mozilla {\n" +
"namespace java {\n" +
"\n");
implementationFile.append(
"#include \"" + HEADER_FILE + "\"\n" +
"#include \"mozilla/jni/Accessors.h\"\n" +
"\n" +
"namespace mozilla {\n" +
"namespace java {\n" +
"\n");
nativesFile.append(
"#ifndef " + getHeaderGuardName(NATIVES_FILE) + "\n" +
"#define " + getHeaderGuardName(NATIVES_FILE) + "\n" +
"\n" +
"#include \"" + HEADER_FILE + "\"\n" +
"#include \"mozilla/jni/Natives.h\"\n" +
"\n" +
"namespace mozilla {\n" +
"namespace java {\n" +
"\n");
while (jarClassIterator.hasNext()) {
generateClass(jarClassIterator.next());
}
implementationFile.append(
"} /* java */\n" +
"} /* mozilla */\n");
headerFile.append(
"} /* java */\n" +
"} /* mozilla */\n" +
"#endif // " + getHeaderGuardName(HEADER_FILE) + "\n");
nativesFile.append(
"} /* java */\n" +
"} /* mozilla */\n" +
"#endif // " + getHeaderGuardName(NATIVES_FILE) + "\n");
writeOutputFile(SOURCE_FILE, implementationFile);
writeOutputFile(HEADER_FILE, headerFile);
writeOutputFile(NATIVES_FILE, nativesFile);
long e = System.currentTimeMillis();
System.out.println("Annotation processing complete in " + (e - s) + "ms");
}
private static void generateClass(final ClassWithOptions annotatedClass) {
// Get an iterator over the appropriately generated methods of this class
final GeneratableElementIterator methodIterator
= new GeneratableElementIterator(annotatedClass);
final ClassWithOptions[] innerClasses = methodIterator.getInnerClasses();
if (!methodIterator.hasNext() && innerClasses.length == 0) {
return;
}
final CodeGenerator generatorInstance = new CodeGenerator(annotatedClass);
generatorInstance.generateClasses(innerClasses);
// Iterate all annotated members in this class..
while (methodIterator.hasNext()) {
AnnotatableEntity aElementTuple = methodIterator.next();
switch (aElementTuple.mEntityType) {
case METHOD:
generatorInstance.generateMethod(aElementTuple);
break;
case NATIVE:
generatorInstance.generateNative(aElementTuple);
break;
case FIELD:
generatorInstance.generateField(aElementTuple);
break;
case CONSTRUCTOR:
generatorInstance.generateConstructor(aElementTuple);
break;
}
}
headerFile.append(generatorInstance.getHeaderFileContents());
implementationFile.append(generatorInstance.getWrapperFileContents());
nativesFile.append(generatorInstance.getNativesFileContents());
for (ClassWithOptions innerClass : innerClasses) {
generateClass(innerClass);
}
}
private static String getHeaderGuardName(final String name) {
return name.replaceAll("\\W", "_");
}
private static void writeOutputFile(final String name,
final StringBuilder content) {
FileOutputStream outStream = null;
try {
outStream = new FileOutputStream(name);
outStream.write(content.toString().getBytes());
} catch (IOException e) {
System.err.println("Unable to write " + name + ". Perhaps a permissions issue?");
e.printStackTrace(System.err);
} finally {
if (outStream != null) {
try {
outStream.close();
} catch (IOException e) {
System.err.println("Unable to close outStream due to "+e);
e.printStackTrace(System.err);
}
}
}
}
}
@@ -1,627 +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/. */
package org.mozilla.gecko.annotationProcessors;
import org.mozilla.gecko.annotationProcessors.classloader.AnnotatableEntity;
import org.mozilla.gecko.annotationProcessors.classloader.ClassWithOptions;
import org.mozilla.gecko.annotationProcessors.utils.Utils;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.HashSet;
public class CodeGenerator {
private static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];
// Buffers holding the strings to ultimately be written to the output files.
private final StringBuilder cpp = new StringBuilder();
private final StringBuilder header = new StringBuilder();
private final StringBuilder natives = new StringBuilder();
private final StringBuilder nativesInits = new StringBuilder();
private final Class<?> cls;
private final String clsName;
private AnnotationInfo.CallingThread callingThread = null;
private int numNativesInits;
private final HashSet<String> takenMethodNames = new HashSet<String>();
public CodeGenerator(ClassWithOptions annotatedClass) {
this.cls = annotatedClass.wrappedClass;
this.clsName = annotatedClass.generatedName;
final String unqualifiedName = Utils.getUnqualifiedName(clsName);
header.append(
"class " + clsName + " : public mozilla::jni::ObjectBase<" +
unqualifiedName + ">\n" +
"{\n" +
"public:\n" +
" static const char name[];\n" +
"\n" +
" explicit " + unqualifiedName + "(const Context& ctx) : ObjectBase<" +
unqualifiedName + ">(ctx) {}\n" +
"\n");
cpp.append(
"const char " + clsName + "::name[] =\n" +
" \"" + cls.getName().replace('.', '/') + "\";\n" +
"\n");
natives.append(
"template<class Impl>\n" +
"class " + clsName + "::Natives : " +
"public mozilla::jni::NativeImpl<" + unqualifiedName + ", Impl>\n" +
"{\n" +
"public:\n");
}
private String getTraitsName(String uniqueName, boolean includeScope) {
return (includeScope ? clsName + "::" : "") + uniqueName + "_t";
}
/**
* Return the C++ type name for this class or any class within the chain
* of declaring classes, if the target class matches the given type.
*
* Return null if the given type does not match any class searched.
*/
private String getMatchingClassType(final Class<?> type) {
Class<?> cls = this.cls;
String clsName = this.clsName;
while (cls != null) {
if (type.equals(cls)) {
return clsName;
}
cls = cls.getDeclaringClass();
clsName = clsName.substring(0, Math.max(0, clsName.lastIndexOf("::")));
}
return null;
}
private String getNativeParameterType(Class<?> type, AnnotationInfo info) {
final String clsName = getMatchingClassType(type);
if (clsName != null) {
return Utils.getUnqualifiedName(clsName) + "::Param";
}
return Utils.getNativeParameterType(type, info);
}
private String getNativeReturnType(Class<?> type, AnnotationInfo info) {
final String clsName = getMatchingClassType(type);
if (clsName != null) {
return Utils.getUnqualifiedName(clsName) + "::LocalRef";
}
return Utils.getNativeReturnType(type, info);
}
private void generateMember(AnnotationInfo info, Member member,
String uniqueName, Class<?> type, Class<?>[] argTypes) {
final StringBuilder args = new StringBuilder();
for (Class<?> argType : argTypes) {
args.append("\n " + getNativeParameterType(argType, info) + ",");
}
if (args.length() > 0) {
args.setLength(args.length() - 1);
}
header.append(
" struct " + getTraitsName(uniqueName, /* includeScope */ false) + " {\n" +
" typedef " + Utils.getUnqualifiedName(clsName) + " Owner;\n" +
" typedef " + getNativeReturnType(type, info) + " ReturnType;\n" +
" typedef " + getNativeParameterType(type, info) + " SetterType;\n" +
" typedef mozilla::jni::Args<" + args + "> Args;\n" +
" static constexpr char name[] = \"" +
Utils.getMemberName(member) + "\";\n" +
" static constexpr char signature[] =\n" +
" \"" + Utils.getSignature(member) + "\";\n" +
" static const bool isStatic = " + Utils.isStatic(member) + ";\n" +
" static const mozilla::jni::ExceptionMode exceptionMode =\n" +
" " + info.exceptionMode.nativeValue() + ";\n" +
" static const mozilla::jni::CallingThread callingThread =\n" +
" " + info.callingThread.nativeValue() + ";\n" +
" static const mozilla::jni::DispatchTarget dispatchTarget =\n" +
" " + info.dispatchTarget.nativeValue() + ";\n" +
" };\n" +
"\n");
cpp.append(
"constexpr char " + getTraitsName(uniqueName, /* includeScope */ true) +
"::name[];\n" +
"constexpr char " + getTraitsName(uniqueName, /* includeScope */ true) +
"::signature[];\n" +
"\n");
if (this.callingThread == null) {
this.callingThread = info.callingThread;
} else if (this.callingThread != info.callingThread) {
// We have a mix of calling threads, so specify "any" for the whole class.
this.callingThread = AnnotationInfo.CallingThread.ANY;
}
}
private String getUniqueMethodName(String basename) {
String newName = basename;
int index = 1;
while (takenMethodNames.contains(newName)) {
newName = basename + (++index);
}
takenMethodNames.add(newName);
return newName;
}
/**
* Generate a method prototype that includes return and argument types,
* without specifiers (static, const, etc.).
*/
private String generatePrototype(String name, Class<?>[] argTypes,
Class<?> returnType, AnnotationInfo info,
boolean includeScope, boolean includeArgName,
boolean isConst) {
final StringBuilder proto = new StringBuilder();
int argIndex = 0;
proto.append("auto ");
if (includeScope) {
proto.append(clsName).append("::");
}
proto.append(name).append('(');
for (Class<?> argType : argTypes) {
proto.append(getNativeParameterType(argType, info));
if (includeArgName) {
proto.append(" a").append(argIndex++);
}
proto.append(", ");
}
if (info.exceptionMode == AnnotationInfo.ExceptionMode.NSRESULT &&
!returnType.equals(void.class)) {
proto.append(getNativeReturnType(returnType, info)).append('*');
if (includeArgName) {
proto.append(" a").append(argIndex++);
}
proto.append(", ");
}
if (proto.substring(proto.length() - 2).equals(", ")) {
proto.setLength(proto.length() - 2);
}
proto.append(')');
if (isConst) {
proto.append(" const");
}
if (info.exceptionMode == AnnotationInfo.ExceptionMode.NSRESULT) {
proto.append(" -> nsresult");
} else {
proto.append(" -> ").append(getNativeReturnType(returnType, info));
}
return proto.toString();
}
/**
* Generate a method declaration that includes the prototype with specifiers,
* but without the method body.
*/
private String generateDeclaration(String name, Class<?>[] argTypes,
Class<?> returnType, AnnotationInfo info,
boolean isStatic) {
return (isStatic ? "static " : "") +
generatePrototype(name, argTypes, returnType, info,
/* includeScope */ false, /* includeArgName */ false,
/* isConst */ !isStatic) + ';';
}
/**
* Generate a method definition that includes the prototype with specifiers,
* and with the method body.
*/
private String generateDefinition(String accessorName, String name, Class<?>[] argTypes,
Class<?> returnType, AnnotationInfo info, boolean isStatic) {
final StringBuilder def = new StringBuilder(
generatePrototype(name, argTypes, returnType, info,
/* includeScope */ true, /* includeArgName */ true,
/* isConst */ !isStatic));
def.append("\n{\n");
// Generate code to handle the return value, if needed.
// We initialize rv to NS_OK instead of NS_ERROR_* because loading NS_OK (0) uses
// fewer instructions. We are guaranteed to set rv to the correct value later.
if (info.exceptionMode == AnnotationInfo.ExceptionMode.NSRESULT &&
returnType.equals(void.class)) {
def.append(
" nsresult rv = NS_OK;\n" +
" ");
} else if (info.exceptionMode == AnnotationInfo.ExceptionMode.NSRESULT) {
// Non-void return type
final String resultArg = "a" + argTypes.length;
def.append(
" MOZ_ASSERT(" + resultArg + ");\n" +
" nsresult rv = NS_OK;\n" +
" *" + resultArg + " = ");
} else {
def.append(
" return ");
}
// Generate a call, e.g., Method<Traits>::Call(a0, a1, a2);
def.append(accessorName).append("(")
.append(Utils.getUnqualifiedName(clsName) +
(isStatic ? "::Context()" : "::mCtx"));
if (info.exceptionMode == AnnotationInfo.ExceptionMode.NSRESULT) {
def.append(", &rv");
} else {
def.append(", nullptr");
}
// Generate the call argument list.
for (int argIndex = 0; argIndex < argTypes.length; argIndex++) {
def.append(", a").append(argIndex);
}
def.append(");\n");
if (info.exceptionMode == AnnotationInfo.ExceptionMode.NSRESULT) {
def.append(" return rv;\n");
}
return def.append("}").toString();
}
/**
* Append the appropriate generated code to the buffers for the method provided.
*
* @param annotatedMethod The Java method, plus annotation data.
*/
public void generateMethod(AnnotatableEntity annotatedMethod) {
// Unpack the tuple and extract some useful fields from the Method..
final Method method = annotatedMethod.getMethod();
final AnnotationInfo info = annotatedMethod.mAnnotationInfo;
final String uniqueName = getUniqueMethodName(info.wrapperName);
final Class<?>[] argTypes = method.getParameterTypes();
final Class<?> returnType = method.getReturnType();
if (method.isSynthetic()) {
return;
}
// Sanity check
if (info.dispatchTarget != AnnotationInfo.DispatchTarget.CURRENT) {
throw new IllegalStateException("Invalid dispatch target \"" +
info.dispatchTarget.name().toLowerCase() +
"\" for non-native method " + clsName + "::" + uniqueName);
}
generateMember(info, method, uniqueName, returnType, argTypes);
final boolean isStatic = Utils.isStatic(method);
header.append(
" " + generateDeclaration(info.wrapperName, argTypes,
returnType, info, isStatic) + "\n" +
"\n");
cpp.append(
generateDefinition(
"mozilla::jni::Method<" +
getTraitsName(uniqueName, /* includeScope */ false) + ">::Call",
info.wrapperName, argTypes, returnType, info, isStatic) + "\n" +
"\n");
}
/**
* Append the appropriate generated code to the buffers for the native method provided.
*
* @param annotatedMethod The Java native method, plus annotation data.
*/
public void generateNative(AnnotatableEntity annotatedMethod) {
// Unpack the tuple and extract some useful fields from the Method..
final Method method = annotatedMethod.getMethod();
final AnnotationInfo info = annotatedMethod.mAnnotationInfo;
final String uniqueName = getUniqueMethodName(info.wrapperName);
final Class<?>[] argTypes = method.getParameterTypes();
final Class<?> returnType = method.getReturnType();
// Sanity check
if (info.exceptionMode != AnnotationInfo.ExceptionMode.ABORT &&
info.exceptionMode != AnnotationInfo.ExceptionMode.IGNORE) {
throw new IllegalStateException("Invalid exception mode \"" +
info.exceptionMode.name().toLowerCase() +
"\" for native method " + clsName + "::" + uniqueName);
}
if (info.dispatchTarget != AnnotationInfo.DispatchTarget.CURRENT &&
returnType != void.class) {
throw new IllegalStateException(
"Must return void when not dispatching to current thread for native method " +
clsName + "::" + uniqueName);
}
generateMember(info, method, uniqueName, returnType, argTypes);
final String traits = getTraitsName(uniqueName, /* includeScope */ true);
if (nativesInits.length() > 0) {
nativesInits.append(',');
}
nativesInits.append(
"\n" +
"\n" +
" mozilla::jni::MakeNativeMethod<" + traits + ">(\n" +
" mozilla::jni::NativeStub<" + traits + ", Impl>\n" +
" ::template Wrap<&Impl::" + info.wrapperName + ">)");
numNativesInits++;
}
private String getLiteral(Object val, AnnotationInfo info) {
final Class<?> type = val.getClass();
if (type.equals(char.class) || type.equals(Character.class)) {
final char c = (char) val;
if (c >= 0x20 && c < 0x7F) {
return "'" + c + '\'';
}
return "u'\\u" + Integer.toHexString(0x10000 | (int) c).substring(1) + '\'';
} else if (type.equals(CharSequence.class) || type.equals(String.class)) {
final CharSequence str = (CharSequence) val;
final StringBuilder out = new StringBuilder("u\"");
for (int i = 0; i < str.length(); i++) {
final char c = str.charAt(i);
if (c >= 0x20 && c < 0x7F) {
out.append(c);
} else {
out.append("\\u").append(Integer.toHexString(0x10000 | (int) c).substring(1));
}
}
return out.append('"').toString();
}
return String.valueOf(val);
}
public void generateField(AnnotatableEntity annotatedField) {
final Field field = annotatedField.getField();
final AnnotationInfo info = annotatedField.mAnnotationInfo;
final String uniqueName = info.wrapperName;
final Class<?> type = field.getType();
// Handles a peculiar case when dealing with enum types. We don't care about this field.
// It just gets in the way and stops our code from compiling.
if (field.isSynthetic() || field.getName().equals("$VALUES")) {
return;
}
// Sanity check
if (info.dispatchTarget != AnnotationInfo.DispatchTarget.CURRENT) {
throw new IllegalStateException("Invalid dispatch target \"" +
info.dispatchTarget.name().toLowerCase() +
"\" for field " + clsName + "::" + uniqueName);
}
final boolean isStatic = Utils.isStatic(field);
final boolean isFinal = Utils.isFinal(field);
if (isStatic && isFinal && (type.isPrimitive() || type.equals(String.class))) {
Object val = null;
try {
field.setAccessible(true);
val = field.get(null);
} catch (final IllegalAccessException e) {
}
if (val != null && type.isPrimitive()) {
// For static final primitive fields, we can use a "static const" declaration.
header.append(
" static const " + Utils.getNativeReturnType(type, info) +
' ' + info.wrapperName + " = " + getLiteral(val, info) + ";\n" +
"\n");
return;
} else if (val != null && type.equals(String.class)) {
final String nativeType = "char16_t";
header.append(
" static const " + nativeType + ' ' + info.wrapperName + "[];\n" +
"\n");
cpp.append(
"const " + nativeType + ' ' + clsName + "::" + info.wrapperName +
"[] = " + getLiteral(val, info) + ";\n" +
"\n");
return;
}
// Fall back to using accessors if we encounter an exception.
}
generateMember(info, field, uniqueName, type, EMPTY_CLASS_ARRAY);
final Class<?>[] getterArgs = EMPTY_CLASS_ARRAY;
header.append(
" " + generateDeclaration(info.wrapperName, getterArgs,
type, info, isStatic) + "\n" +
"\n");
cpp.append(
generateDefinition(
"mozilla::jni::Field<" +
getTraitsName(uniqueName, /* includeScope */ false) + ">::Get",
info.wrapperName, getterArgs, type, info, isStatic) + "\n" +
"\n");
if (isFinal) {
return;
}
final Class<?>[] setterArgs = new Class<?>[] { type };
header.append(
" " + generateDeclaration(info.wrapperName, setterArgs,
void.class, info, isStatic) + "\n" +
"\n");
cpp.append(
generateDefinition(
"mozilla::jni::Field<" +
getTraitsName(uniqueName, /* includeScope */ false) + ">::Set",
info.wrapperName, setterArgs, void.class, info, isStatic) + "\n" +
"\n");
}
public void generateConstructor(AnnotatableEntity annotatedConstructor) {
// Unpack the tuple and extract some useful fields from the Method..
final Constructor<?> method = annotatedConstructor.getConstructor();
final AnnotationInfo info = annotatedConstructor.mAnnotationInfo;
final String wrapperName = "New";
final String uniqueName = getUniqueMethodName(wrapperName);
final Class<?>[] argTypes = method.getParameterTypes();
final Class<?> returnType = cls;
if (method.isSynthetic()) {
return;
}
// Sanity check
if (info.dispatchTarget != AnnotationInfo.DispatchTarget.CURRENT) {
throw new IllegalStateException("Invalid dispatch target \"" +
info.dispatchTarget.name().toLowerCase() +
"\" for constructor " + clsName + "::" + uniqueName);
}
generateMember(info, method, uniqueName, returnType, argTypes);
header.append(
" " + generateDeclaration(wrapperName, argTypes,
returnType, info, /* isStatic */ true) + "\n" +
"\n");
cpp.append(
generateDefinition(
"mozilla::jni::Constructor<" +
getTraitsName(uniqueName, /* includeScope */ false) + ">::Call",
wrapperName, argTypes, returnType, info, /* isStatic */ true) + "\n" +
"\n");
}
public void generateMembers(Member[] members) {
for (Member m : members) {
if (!Modifier.isPublic(m.getModifiers())) {
continue;
}
String name = Utils.getMemberName(m);
name = name.substring(0, 1).toUpperCase() + name.substring(1);
// Default for SDK bindings.
final AnnotationInfo info = new AnnotationInfo(name,
AnnotationInfo.ExceptionMode.NSRESULT,
AnnotationInfo.CallingThread.ANY,
AnnotationInfo.DispatchTarget.CURRENT);
final AnnotatableEntity entity = new AnnotatableEntity(m, info);
if (m instanceof Constructor) {
generateConstructor(entity);
} else if (m instanceof Method) {
generateMethod(entity);
} else if (m instanceof Field) {
generateField(entity);
} else {
throw new IllegalArgumentException(
"expected member to be Constructor, Method, or Field");
}
}
}
public void generateClasses(final ClassWithOptions[] classes) {
if (classes.length == 0) {
return;
}
for (final ClassWithOptions cls : classes) {
// Extract "Inner" from "Outer::Inner".
header.append(
" class " + Utils.getUnqualifiedName(cls.generatedName) + ";\n");
}
header.append('\n');
}
/**
* Get the finalised bytes to go into the generated wrappers file.
*
* @return The bytes to be written to the wrappers file.
*/
public String getWrapperFileContents() {
return cpp.toString();
}
/**
* Get the finalised bytes to go into the generated header file.
*
* @return The bytes to be written to the header file.
*/
public String getHeaderFileContents() {
if (this.callingThread == null) {
this.callingThread = AnnotationInfo.CallingThread.ANY;
}
header.append(
" static const mozilla::jni::CallingThread callingThread =\n" +
" " + this.callingThread.nativeValue() + ";\n" +
"\n");
if (nativesInits.length() > 0) {
header.append(
" template<class Impl> class Natives;\n");
}
header.append(
"};\n" +
"\n");
return header.toString();
}
/**
* Get the finalised bytes to go into the generated natives header file.
*
* @return The bytes to be written to the header file.
*/
public String getNativesFileContents() {
if (nativesInits.length() == 0) {
return "";
}
natives.append(
" static const JNINativeMethod methods[" + numNativesInits + "];\n" +
"};\n" +
"\n" +
"template<class Impl>\n" +
"const JNINativeMethod " + clsName + "::Natives<Impl>::methods[] = {" + nativesInits + '\n' +
"};\n" +
"\n");
return natives.toString();
}
}
-10
View File
@@ -1,10 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
include $(topsrcdir)/config/rules.mk
# Include Android specific java flags, instead of what's in rules.mk.
include $(topsrcdir)/config/android-common.mk
export:: annotationProcessors.jar
@@ -1,258 +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/. */
package org.mozilla.gecko.annotationProcessors;
import com.android.tools.lint.checks.ApiLookup;
import com.android.tools.lint.LintCliClient;
import org.mozilla.gecko.annotationProcessors.classloader.AnnotatableEntity;
import org.mozilla.gecko.annotationProcessors.classloader.ClassWithOptions;
import org.mozilla.gecko.annotationProcessors.classloader.IterableJarLoadingURLClassLoader;
import org.mozilla.gecko.annotationProcessors.utils.GeneratableElementIterator;
import org.mozilla.gecko.annotationProcessors.utils.Utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Properties;
import java.util.Scanner;
import java.util.Vector;
import java.net.URL;
import java.net.URLClassLoader;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
public class SDKProcessor {
public static final String GENERATED_COMMENT =
"// GENERATED CODE\n" +
"// Generated by the Java program at /build/annotationProcessors at compile time\n" +
"// from annotations on Java methods. To update, change the annotations on the\n" +
"// corresponding Javamethods and rerun the build. Manually updating this file\n" +
"// will cause your build to fail.\n" +
"\n";
private static ApiLookup sApiLookup;
private static int sMaxSdkVersion;
public static void main(String[] args) throws Exception {
// We expect a list of jars on the commandline. If missing, whinge about it.
if (args.length < 5) {
System.err.println("Usage: java SDKProcessor sdkjar classlistfile outdir fileprefix max-sdk-version");
System.exit(1);
}
System.out.println("Processing platform bindings...");
String sdkJar = args[0];
Vector classes = getClassList(args[1]);
String outdir = args[2];
String generatedFilePrefix = args[3];
sMaxSdkVersion = Integer.parseInt(args[4]);
LintCliClient lintClient = new LintCliClient();
sApiLookup = ApiLookup.get(lintClient);
// Start the clock!
long s = System.currentTimeMillis();
// Get an iterator over the classes in the jar files given...
// Iterator<ClassWithOptions> jarClassIterator = IterableJarLoadingURLClassLoader.getIteratorOverJars(args);
StringBuilder headerFile = new StringBuilder(GENERATED_COMMENT);
headerFile.append(
"#ifndef " + generatedFilePrefix + "_h__\n" +
"#define " + generatedFilePrefix + "_h__\n" +
"\n" +
"#include \"mozilla/jni/Refs.h\"\n" +
"\n" +
"namespace mozilla {\n" +
"namespace java {\n" +
"namespace sdk {\n" +
"\n");
StringBuilder implementationFile = new StringBuilder(GENERATED_COMMENT);
implementationFile.append(
"#include \"" + generatedFilePrefix + ".h\"\n" +
"#include \"mozilla/jni/Accessors.h\"\n" +
"\n" +
"namespace mozilla {\n" +
"namespace java {\n" +
"namespace sdk {\n" +
"\n");
// Used to track the calls to the various class-specific initialisation functions.
ClassLoader loader = null;
try {
loader = URLClassLoader.newInstance(new URL[] { new URL("file://" + sdkJar) },
SDKProcessor.class.getClassLoader());
} catch (Exception e) {
throw new RuntimeException(e.toString());
}
for (Iterator<String> i = classes.iterator(); i.hasNext(); ) {
String className = i.next();
System.out.println("Looking up: " + className);
generateClass(Class.forName(className, true, loader),
implementationFile,
headerFile);
}
implementationFile.append(
"} /* sdk */\n" +
"} /* java */\n" +
"} /* mozilla */\n");
headerFile.append(
"} /* sdk */\n" +
"} /* java */\n" +
"} /* mozilla */\n" +
"#endif\n");
writeOutputFiles(outdir, generatedFilePrefix, headerFile, implementationFile);
long e = System.currentTimeMillis();
System.out.println("SDK processing complete in " + (e - s) + "ms");
}
private static int getAPIVersion(Class<?> cls, Member m) {
if (m instanceof Method || m instanceof Constructor) {
return sApiLookup.getCallVersion(
cls.getName().replace('.', '/'),
Utils.getMemberName(m),
Utils.getSignature(m));
} else if (m instanceof Field) {
return sApiLookup.getFieldVersion(
Utils.getClassDescriptor(m.getDeclaringClass()), m.getName());
} else {
throw new IllegalArgumentException("expected member to be Method, Constructor, or Field");
}
}
private static Member[] sortAndFilterMembers(Class<?> cls, Member[] members) {
Arrays.sort(members, new Comparator<Member>() {
@Override
public int compare(Member a, Member b) {
return a.getName().compareTo(b.getName());
}
});
ArrayList<Member> list = new ArrayList<>();
for (Member m : members) {
// Sometimes (e.g. Bundle) has methods that moved to/from a superclass in a later SDK
// version, so we check for both classes and see if we can find a minimum SDK version.
int version = getAPIVersion(cls, m);
final int version2 = getAPIVersion(m.getDeclaringClass(), m);
if (version2 > 0 && version2 < version) {
version = version2;
}
if (version > sMaxSdkVersion) {
System.out.println("Skipping " + m.getDeclaringClass().getName() + "." + m.getName() +
", version " + version + " > " + sMaxSdkVersion);
continue;
}
// Sometimes (e.g. KeyEvent) a field can appear in both a class and a superclass. In
// that case we want to filter out the version that appears in the superclass, or
// we'll have bindings with duplicate names.
try {
if (m instanceof Field && !m.equals(cls.getField(m.getName()))) {
// m is a field in a superclass that has been hidden by
// a field with the same name in a subclass.
System.out.println("Skipping " + m.getName() +
" from " + m.getDeclaringClass());
continue;
}
} catch (final NoSuchFieldException e) {
}
list.add(m);
}
return list.toArray(new Member[list.size()]);
}
private static void generateClass(Class<?> clazz,
StringBuilder implementationFile,
StringBuilder headerFile) {
String generatedName = clazz.getSimpleName();
CodeGenerator generator = new CodeGenerator(new ClassWithOptions(clazz, generatedName));
generator.generateMembers(sortAndFilterMembers(clazz, clazz.getConstructors()));
generator.generateMembers(sortAndFilterMembers(clazz, clazz.getMethods()));
generator.generateMembers(sortAndFilterMembers(clazz, clazz.getFields()));
headerFile.append(generator.getHeaderFileContents());
implementationFile.append(generator.getWrapperFileContents());
}
private static Vector<String> getClassList(String path) {
Scanner scanner = null;
try {
scanner = new Scanner(new FileInputStream(path));
Vector lines = new Vector();
while (scanner.hasNextLine()) {
lines.add(scanner.nextLine());
}
return lines;
} catch (Exception e) {
System.out.println(e.toString());
return null;
} finally {
if (scanner != null) {
scanner.close();
}
}
}
private static void writeOutputFiles(String aOutputDir, String aPrefix, StringBuilder aHeaderFile,
StringBuilder aImplementationFile) {
FileOutputStream implStream = null;
try {
implStream = new FileOutputStream(new File(aOutputDir, aPrefix + ".cpp"));
implStream.write(aImplementationFile.toString().getBytes());
} catch (IOException e) {
System.err.println("Unable to write " + aOutputDir + ". Perhaps a permissions issue?");
e.printStackTrace(System.err);
} finally {
if (implStream != null) {
try {
implStream.close();
} catch (IOException e) {
System.err.println("Unable to close implStream due to "+e);
e.printStackTrace(System.err);
}
}
}
FileOutputStream headerStream = null;
try {
headerStream = new FileOutputStream(new File(aOutputDir, aPrefix + ".h"));
headerStream.write(aHeaderFile.toString().getBytes());
} catch (IOException e) {
System.err.println("Unable to write " + aOutputDir + ". Perhaps a permissions issue?");
e.printStackTrace(System.err);
} finally {
if (headerStream != null) {
try {
headerStream.close();
} catch (IOException e) {
System.err.println("Unable to close headerStream due to "+e);
e.printStackTrace(System.err);
}
}
}
}
}
@@ -1,62 +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/. */
package org.mozilla.gecko.annotationProcessors.classloader;
import org.mozilla.gecko.annotationProcessors.AnnotationInfo;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
/**
* Union type to hold either a method, field, or ctor. Allows us to iterate "The generatable stuff", despite
* the fact that such things can be of either flavour.
*/
public class AnnotatableEntity {
public enum ENTITY_TYPE {METHOD, NATIVE, FIELD, CONSTRUCTOR}
private final Member mMember;
public final ENTITY_TYPE mEntityType;
public final AnnotationInfo mAnnotationInfo;
public AnnotatableEntity(Member aObject, AnnotationInfo aAnnotationInfo) {
mMember = aObject;
mAnnotationInfo = aAnnotationInfo;
if (aObject instanceof Method) {
if (Modifier.isNative(aObject.getModifiers())) {
mEntityType = ENTITY_TYPE.NATIVE;
} else {
mEntityType = ENTITY_TYPE.METHOD;
}
} else if (aObject instanceof Field) {
mEntityType = ENTITY_TYPE.FIELD;
} else {
mEntityType = ENTITY_TYPE.CONSTRUCTOR;
}
}
public Method getMethod() {
if (mEntityType != ENTITY_TYPE.METHOD && mEntityType != ENTITY_TYPE.NATIVE) {
throw new UnsupportedOperationException("Attempt to cast to unsupported member type.");
}
return (Method) mMember;
}
public Field getField() {
if (mEntityType != ENTITY_TYPE.FIELD) {
throw new UnsupportedOperationException("Attempt to cast to unsupported member type.");
}
return (Field) mMember;
}
public Constructor<?> getConstructor() {
if (mEntityType != ENTITY_TYPE.CONSTRUCTOR) {
throw new UnsupportedOperationException("Attempt to cast to unsupported member type.");
}
return (Constructor<?>) mMember;
}
}
@@ -1,15 +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/. */
package org.mozilla.gecko.annotationProcessors.classloader;
public class ClassWithOptions {
public final Class<?> wrappedClass;
public final String generatedName;
public ClassWithOptions(Class<?> someClass, String name) {
wrappedClass = someClass;
generatedName = name;
}
}
@@ -1,75 +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/. */
package org.mozilla.gecko.annotationProcessors.classloader;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
/**
* A classloader which can be initialised with a list of jar files and which can provide an iterator
* over the top level classes in the jar files it was initialised with.
* classNames is kept sorted to ensure iteration order is consistent across program invocations.
* Otherwise, we'd forever be reporting the outdatedness of the generated code as we permute its
* contents.
*/
public class IterableJarLoadingURLClassLoader extends URLClassLoader {
LinkedList<String> classNames = new LinkedList<String>();
/**
* Create an instance and return its iterator. Provides an iterator over the classes in the jar
* files provided as arguments.
* Inner classes are not supported.
*
* @param args A list of jar file names an iterator over the classes of which is desired.
* @return An iterator over the top level classes in the jar files provided, in arbitrary order.
*/
public static Iterator<ClassWithOptions> getIteratorOverJars(String[] args) {
URL[] urlArray = new URL[args.length];
LinkedList<String> aClassNames = new LinkedList<String>();
for (int i = 0; i < args.length; i++) {
try {
urlArray[i] = (new File(args[i])).toURI().toURL();
Enumeration<JarEntry> entries = new JarFile(args[i]).entries();
while (entries.hasMoreElements()) {
JarEntry e = entries.nextElement();
String fName = e.getName();
if (!fName.endsWith(".class")) {
continue;
}
final String className = fName.substring(0, fName.length() - 6).replace('/', '.');
aClassNames.add(className);
}
} catch (IOException e) {
System.err.println("Error loading jar file \"" + args[i] + '"');
e.printStackTrace(System.err);
}
}
Collections.sort(aClassNames);
return new JarClassIterator(new IterableJarLoadingURLClassLoader(urlArray, aClassNames));
}
/**
* Constructs a classloader capable of loading all classes given as URLs in urls. Used by static
* method above.
*
* @param urls URLs for all classes the new instance shall be capable of loading.
* @param aClassNames A list of names of the classes this instance shall be capable of loading.
*/
protected IterableJarLoadingURLClassLoader(URL[] urls, LinkedList<String> aClassNames) {// Array to populate with URLs for each class in the given jars.
super(urls);
classNames = aClassNames;
}
}
@@ -1,84 +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/. */
package org.mozilla.gecko.annotationProcessors.classloader;
import java.util.Iterator;
/**
* Class for iterating over an IterableJarLoadingURLClassLoader's classes.
*
* This class is not thread safe: use it only from a single thread.
*/
public class JarClassIterator implements Iterator<ClassWithOptions> {
private IterableJarLoadingURLClassLoader mTarget;
private Iterator<String> mTargetClassListIterator;
private ClassWithOptions lookAhead;
public JarClassIterator(IterableJarLoadingURLClassLoader aTarget) {
mTarget = aTarget;
mTargetClassListIterator = aTarget.classNames.iterator();
}
@Override
public boolean hasNext() {
return fillLookAheadIfPossible();
}
@Override
public ClassWithOptions next() {
if (!fillLookAheadIfPossible()) {
throw new IllegalStateException("Failed to look ahead in next()!");
}
ClassWithOptions next = lookAhead;
lookAhead = null;
return next;
}
private boolean fillLookAheadIfPossible() {
if (lookAhead != null) {
return true;
}
if (!mTargetClassListIterator.hasNext()) {
return false;
}
String className = mTargetClassListIterator.next();
try {
Class<?> ret = mTarget.loadClass(className);
// Incremental builds can leave stale classfiles in the jar. Such classfiles will cause
// an exception at this point. We can safely ignore these classes - they cannot possibly
// ever be loaded as they conflict with their parent class and will be killed by
// Proguard later on anyway.
final Class<?> enclosingClass;
try {
enclosingClass = ret.getEnclosingClass();
} catch (IncompatibleClassChangeError e) {
return fillLookAheadIfPossible();
}
if (enclosingClass != null) {
// Anonymous inner class - unsupported.
// Or named inner class, which will be processed when we process the outer class.
return fillLookAheadIfPossible();
}
lookAhead = new ClassWithOptions(ret, ret.getSimpleName());
return true;
} catch (ClassNotFoundException e) {
System.err.println("Unable to enumerate class: " + className + ". Corrupted jar file?");
e.printStackTrace();
System.exit(2);
}
return false;
}
@Override
public void remove() {
throw new UnsupportedOperationException("Removal of classes from iterator not supported.");
}
}
-23
View File
@@ -1,23 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
jar = add_java_jar('annotationProcessors')
jar.sources += [
'AnnotationInfo.java',
'AnnotationProcessor.java',
'classloader/AnnotatableEntity.java',
'classloader/ClassWithOptions.java',
'classloader/IterableJarLoadingURLClassLoader.java',
'classloader/JarClassIterator.java',
'CodeGenerator.java',
'SDKProcessor.java',
'utils/AlphabeticAnnotatableEntityComparator.java',
'utils/GeneratableElementIterator.java',
'utils/Utils.java',
]
jar.extra_jars += [
CONFIG['ANDROID_TOOLS'] + '/lib/lint.jar',
CONFIG['ANDROID_TOOLS'] + '/lib/lint-checks.jar',
]
@@ -1,81 +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/. */
package org.mozilla.gecko.annotationProcessors.utils;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.util.Comparator;
public class AlphabeticAnnotatableEntityComparator<T extends Member> implements Comparator<T> {
@Override
public int compare(T aLhs, T aRhs) {
// Constructors, Methods, Fields.
boolean lIsConstructor = aLhs instanceof Constructor;
boolean rIsConstructor = aRhs instanceof Constructor;
boolean lIsMethod = aLhs instanceof Method;
boolean rIsField = aRhs instanceof Field;
if (lIsConstructor) {
if (!rIsConstructor) {
return -1;
}
} else if (lIsMethod) {
if (rIsConstructor) {
return 1;
} else if (rIsField) {
return -1;
}
} else {
if (!rIsField) {
return 1;
}
}
// Verify these objects are the same type and cast them.
if (aLhs instanceof Method) {
return compare((Method) aLhs, (Method) aRhs);
} else if (aLhs instanceof Field) {
return compare((Field) aLhs, (Field) aRhs);
} else {
return compare((Constructor) aLhs, (Constructor) aRhs);
}
}
// Alas, the type system fails us.
private static int compare(Method aLhs, Method aRhs) {
// Initially, attempt to differentiate the methods be name alone..
String lName = aLhs.getName();
String rName = aRhs.getName();
int ret = lName.compareTo(rName);
if (ret != 0) {
return ret;
}
// The names were the same, so we need to compare signatures to find their uniqueness..
lName = Utils.getSignature(aLhs);
rName = Utils.getSignature(aRhs);
return lName.compareTo(rName);
}
private static int compare(Constructor<?> aLhs, Constructor<?> aRhs) {
// The names will be the same, so we need to compare signatures to find their uniqueness..
String lName = Utils.getSignature(aLhs);
String rName = Utils.getSignature(aRhs);
return lName.compareTo(rName);
}
private static int compare(Field aLhs, Field aRhs) {
// Compare field names..
String lName = aLhs.getName();
String rName = aRhs.getName();
return lName.compareTo(rName);
}
}
@@ -1,267 +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/. */
package org.mozilla.gecko.annotationProcessors.utils;
import org.mozilla.gecko.annotationProcessors.AnnotationInfo;
import org.mozilla.gecko.annotationProcessors.classloader.AnnotatableEntity;
import org.mozilla.gecko.annotationProcessors.classloader.ClassWithOptions;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
/**
* Iterator over the methods in a given method list which have the WrappedJNIMethod
* annotation. Returns an object containing both the annotation (Which may contain interesting
* parameters) and the argument.
*/
public class GeneratableElementIterator implements Iterator<AnnotatableEntity> {
private final ClassWithOptions mClass;
private final Member[] mObjects;
private AnnotatableEntity mNextReturnValue;
private int mElementIndex;
private AnnotationInfo mClassInfo;
private boolean mIterateEveryEntry;
private boolean mSkipCurrentEntry;
public GeneratableElementIterator(ClassWithOptions annotatedClass) {
mClass = annotatedClass;
final Class<?> aClass = annotatedClass.wrappedClass;
// Get all the elements of this class as AccessibleObjects.
Member[] aMethods = aClass.getDeclaredMethods();
Member[] aFields = aClass.getDeclaredFields();
Member[] aCtors = aClass.getDeclaredConstructors();
// Shove them all into one buffer.
Member[] objs = new Member[aMethods.length + aFields.length + aCtors.length];
int offset = 0;
System.arraycopy(aMethods, 0, objs, 0, aMethods.length);
offset += aMethods.length;
System.arraycopy(aFields, 0, objs, offset, aFields.length);
offset += aFields.length;
System.arraycopy(aCtors, 0, objs, offset, aCtors.length);
// Sort the elements to ensure determinism.
Arrays.sort(objs, new AlphabeticAnnotatableEntityComparator<Member>());
mObjects = objs;
// Check for "Wrap ALL the things" flag.
for (Annotation annotation : aClass.getDeclaredAnnotations()) {
mClassInfo = buildAnnotationInfo(aClass, annotation);
if (mClassInfo != null) {
mIterateEveryEntry = true;
break;
}
}
if (mSkipCurrentEntry) {
throw new IllegalArgumentException("Cannot skip entire class");
}
findNextValue();
}
private Class<?>[] getFilteredInnerClasses() {
// Go through all inner classes and see which ones we want to generate.
final Class<?>[] candidates = mClass.wrappedClass.getDeclaredClasses();
int count = 0;
for (int i = 0; i < candidates.length; ++i) {
final GeneratableElementIterator testIterator
= new GeneratableElementIterator(new ClassWithOptions(candidates[i], null));
if (testIterator.hasNext()
|| testIterator.getFilteredInnerClasses() != null) {
count++;
continue;
}
// Clear out ones that don't match.
candidates[i] = null;
}
return count > 0 ? candidates : null;
}
public ClassWithOptions[] getInnerClasses() {
final Class<?>[] candidates = getFilteredInnerClasses();
if (candidates == null) {
return new ClassWithOptions[0];
}
int count = 0;
for (Class<?> candidate : candidates) {
if (candidate != null) {
count++;
}
}
final ClassWithOptions[] ret = new ClassWithOptions[count];
count = 0;
for (Class<?> candidate : candidates) {
if (candidate != null) {
ret[count++] = new ClassWithOptions(
candidate, mClass.generatedName + "::" + candidate.getSimpleName());
}
}
assert ret.length == count;
Arrays.sort(ret, new Comparator<ClassWithOptions>() {
@Override public int compare(ClassWithOptions lhs, ClassWithOptions rhs) {
return lhs.generatedName.compareTo(rhs.generatedName);
}
});
return ret;
}
private static <T extends Enum<T>> T getEnumValue(Class<T> type, String name)
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
try {
return Enum.valueOf(type, name.toUpperCase());
} catch (IllegalArgumentException e) {
Object[] values = (Object[]) type.getDeclaredMethod("values").invoke(null);
StringBuilder names = new StringBuilder();
for (int i = 0; i < values.length; i++) {
if (i != 0) {
names.append(", ");
}
names.append(values[i].toString().toLowerCase());
}
System.err.println("***");
System.err.println("*** Invalid value \"" + name + "\" for " + type.getSimpleName());
System.err.println("*** Specify one of " + names.toString());
System.err.println("***");
e.printStackTrace(System.err);
System.exit(6);
return null;
}
}
private AnnotationInfo buildAnnotationInfo(AnnotatedElement element, Annotation annotation) {
Class<? extends Annotation> annotationType = annotation.annotationType();
final String annotationTypeName = annotationType.getName();
if (!annotationTypeName.equals("org.mozilla.gecko.annotation.WrapForJNI")) {
return null;
}
String stubName = null;
AnnotationInfo.ExceptionMode exceptionMode = null;
AnnotationInfo.CallingThread callingThread = null;
AnnotationInfo.DispatchTarget dispatchTarget = null;
try {
final Method skipMethod = annotationType.getDeclaredMethod("skip");
skipMethod.setAccessible(true);
if ((Boolean) skipMethod.invoke(annotation)) {
mSkipCurrentEntry = true;
return null;
}
// Determine the explicitly-given name of the stub to generate, if any.
final Method stubNameMethod = annotationType.getDeclaredMethod("stubName");
stubNameMethod.setAccessible(true);
stubName = (String) stubNameMethod.invoke(annotation);
final Method exceptionModeMethod = annotationType.getDeclaredMethod("exceptionMode");
exceptionModeMethod.setAccessible(true);
exceptionMode = getEnumValue(
AnnotationInfo.ExceptionMode.class,
(String) exceptionModeMethod.invoke(annotation));
final Method calledFromMethod = annotationType.getDeclaredMethod("calledFrom");
calledFromMethod.setAccessible(true);
callingThread = getEnumValue(
AnnotationInfo.CallingThread.class,
(String) calledFromMethod.invoke(annotation));
final Method dispatchToMethod = annotationType.getDeclaredMethod("dispatchTo");
dispatchToMethod.setAccessible(true);
dispatchTarget = getEnumValue(
AnnotationInfo.DispatchTarget.class,
(String) dispatchToMethod.invoke(annotation));
} catch (NoSuchMethodException e) {
System.err.println("Unable to find expected field on WrapForJNI annotation. Did the signature change?");
e.printStackTrace(System.err);
System.exit(3);
} catch (IllegalAccessException e) {
System.err.println("IllegalAccessException reading fields on WrapForJNI annotation. Seems the semantics of Reflection have changed...");
e.printStackTrace(System.err);
System.exit(4);
} catch (InvocationTargetException e) {
System.err.println("InvocationTargetException reading fields on WrapForJNI annotation. This really shouldn't happen.");
e.printStackTrace(System.err);
System.exit(5);
}
// If the method name was not explicitly given in the annotation generate one...
if (stubName.isEmpty()) {
stubName = Utils.getNativeName(element);
}
return new AnnotationInfo(stubName, exceptionMode, callingThread, dispatchTarget);
}
/**
* Find and cache the next appropriately annotated method, plus the annotation parameter, if
* one exists. Otherwise cache null, so hasNext returns false.
*/
private void findNextValue() {
while (mElementIndex < mObjects.length) {
Member candidateElement = mObjects[mElementIndex];
mElementIndex++;
for (Annotation annotation : ((AnnotatedElement) candidateElement).getDeclaredAnnotations()) {
AnnotationInfo info = buildAnnotationInfo((AnnotatedElement)candidateElement, annotation);
if (info != null) {
mNextReturnValue = new AnnotatableEntity(candidateElement, info);
return;
}
}
if (mSkipCurrentEntry) {
mSkipCurrentEntry = false;
continue;
}
// If no annotation found, we might be expected to generate anyway
// using default arguments, thanks to the "Generate everything" annotation.
if (mIterateEveryEntry) {
AnnotationInfo annotationInfo = new AnnotationInfo(
Utils.getNativeName(candidateElement),
mClassInfo.exceptionMode,
mClassInfo.callingThread,
mClassInfo.dispatchTarget);
mNextReturnValue = new AnnotatableEntity(candidateElement, annotationInfo);
return;
}
}
mNextReturnValue = null;
}
@Override
public boolean hasNext() {
return mNextReturnValue != null;
}
@Override
public AnnotatableEntity next() {
AnnotatableEntity ret = mNextReturnValue;
findNextValue();
return ret;
}
@Override
public void remove() {
throw new UnsupportedOperationException("Removal of methods from GeneratableElementIterator not supported.");
}
}
-288
View File
@@ -1,288 +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/. */
package org.mozilla.gecko.annotationProcessors.utils;
import org.mozilla.gecko.annotationProcessors.AnnotationInfo;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.nio.ByteBuffer;
import java.util.HashMap;
/**
* A collection of utility methods used by CodeGenerator. Largely used for translating types.
*/
public class Utils {
// A collection of lookup tables to simplify the functions to follow...
private static final HashMap<String, String> NATIVE_TYPES = new HashMap<String, String>();
static {
NATIVE_TYPES.put("void", "void");
NATIVE_TYPES.put("boolean", "bool");
NATIVE_TYPES.put("byte", "int8_t");
NATIVE_TYPES.put("char", "char16_t");
NATIVE_TYPES.put("short", "int16_t");
NATIVE_TYPES.put("int", "int32_t");
NATIVE_TYPES.put("long", "int64_t");
NATIVE_TYPES.put("float", "float");
NATIVE_TYPES.put("double", "double");
}
private static final HashMap<String, String> NATIVE_ARRAY_TYPES = new HashMap<String, String>();
static {
NATIVE_ARRAY_TYPES.put("boolean", "mozilla::jni::BooleanArray");
NATIVE_ARRAY_TYPES.put("byte", "mozilla::jni::ByteArray");
NATIVE_ARRAY_TYPES.put("char", "mozilla::jni::CharArray");
NATIVE_ARRAY_TYPES.put("short", "mozilla::jni::ShortArray");
NATIVE_ARRAY_TYPES.put("int", "mozilla::jni::IntArray");
NATIVE_ARRAY_TYPES.put("long", "mozilla::jni::LongArray");
NATIVE_ARRAY_TYPES.put("float", "mozilla::jni::FloatArray");
NATIVE_ARRAY_TYPES.put("double", "mozilla::jni::DoubleArray");
}
private static final HashMap<String, String> CLASS_DESCRIPTORS = new HashMap<String, String>();
static {
CLASS_DESCRIPTORS.put("void", "V");
CLASS_DESCRIPTORS.put("boolean", "Z");
CLASS_DESCRIPTORS.put("byte", "B");
CLASS_DESCRIPTORS.put("char", "C");
CLASS_DESCRIPTORS.put("short", "S");
CLASS_DESCRIPTORS.put("int", "I");
CLASS_DESCRIPTORS.put("long", "J");
CLASS_DESCRIPTORS.put("float", "F");
CLASS_DESCRIPTORS.put("double", "D");
}
/**
* Get the C++ type corresponding to the provided type parameter.
*
* @param type Class to determine the corresponding JNI type for.
* @return C++ type as a String
*/
public static String getNativeParameterType(Class<?> type, AnnotationInfo info) {
final String name = type.getName().replace('.', '/');
if (NATIVE_TYPES.containsKey(name)) {
return NATIVE_TYPES.get(name);
}
if (type.isArray()) {
final String compName = type.getComponentType().getName();
if (NATIVE_ARRAY_TYPES.containsKey(compName)) {
return NATIVE_ARRAY_TYPES.get(compName) + "::Param";
}
return "mozilla::jni::ObjectArray::Param";
}
if (type.equals(String.class) || type.equals(CharSequence.class)) {
return "mozilla::jni::String::Param";
}
if (type.equals(Class.class)) {
// You're doing reflection on Java objects from inside C, returning Class objects
// to C, generating the corresponding code using this Java program. Really?!
return "mozilla::jni::Class::Param";
}
if (type.equals(Throwable.class)) {
return "mozilla::jni::Throwable::Param";
}
if (type.equals(ByteBuffer.class)) {
return "mozilla::jni::ByteBuffer::Param";
}
return "mozilla::jni::Object::Param";
}
public static String getNativeReturnType(Class<?> type, AnnotationInfo info) {
final String name = type.getName().replace('.', '/');
if (NATIVE_TYPES.containsKey(name)) {
return NATIVE_TYPES.get(name);
}
if (type.isArray()) {
final String compName = type.getComponentType().getName();
if (NATIVE_ARRAY_TYPES.containsKey(compName)) {
return NATIVE_ARRAY_TYPES.get(compName) + "::LocalRef";
}
return "mozilla::jni::ObjectArray::LocalRef";
}
if (type.equals(String.class)) {
return "mozilla::jni::String::LocalRef";
}
if (type.equals(Class.class)) {
// You're doing reflection on Java objects from inside C, returning Class objects
// to C, generating the corresponding code using this Java program. Really?!
return "mozilla::jni::Class::LocalRef";
}
if (type.equals(Throwable.class)) {
return "mozilla::jni::Throwable::LocalRef";
}
if (type.equals(ByteBuffer.class)) {
return "mozilla::jni::ByteBuffer::LocalRef";
}
return "mozilla::jni::Object::LocalRef";
}
/**
* Get the JNI class descriptor corresponding to the provided type parameter.
*
* @param type Class to determine the corresponding JNI descriptor for.
* @return Class descripor as a String
*/
public static String getClassDescriptor(Class<?> type) {
final String name = type.getName().replace('.', '/');
if (CLASS_DESCRIPTORS.containsKey(name)) {
return CLASS_DESCRIPTORS.get(name);
}
if (type.isArray()) {
// Array names are already in class descriptor form.
return name;
}
return "L" + name + ';';
}
/**
* Get the JNI signaure for a member.
*
* @param member Member to get the signature for.
* @return JNI signature as a string
*/
public static String getSignature(Member member) {
return member instanceof Field ? getSignature((Field) member) :
member instanceof Method ? getSignature((Method) member) :
getSignature((Constructor<?>) member);
}
/**
* Get the JNI signaure for a field.
*
* @param member Field to get the signature for.
* @return JNI signature as a string
*/
public static String getSignature(Field member) {
return getClassDescriptor(member.getType());
}
private static String getSignature(Class<?>[] args, Class<?> ret) {
final StringBuilder sig = new StringBuilder("(");
for (int i = 0; i < args.length; i++) {
sig.append(getClassDescriptor(args[i]));
}
return sig.append(')').append(getClassDescriptor(ret)).toString();
}
/**
* Get the JNI signaure for a method.
*
* @param member Method to get the signature for.
* @return JNI signature as a string
*/
public static String getSignature(Method member) {
return getSignature(member.getParameterTypes(), member.getReturnType());
}
/**
* Get the JNI signaure for a constructor.
*
* @param member Constructor to get the signature for.
* @return JNI signature as a string
*/
public static String getSignature(Constructor<?> member) {
return getSignature(member.getParameterTypes(), void.class);
}
/**
* Get the C++ name for a member.
*
* @param member Member to get the name for.
* @return JNI name as a string
*/
public static String getNativeName(Member member) {
final String name = getMemberName(member);
return name.substring(0, 1).toUpperCase() + name.substring(1);
}
/**
* Get the C++ name for a member.
*
* @param member Member to get the name for.
* @return JNI name as a string
*/
public static String getNativeName(Class<?> clz) {
final String name = clz.getName();
return name.substring(0, 1).toUpperCase() + name.substring(1);
}
/**
* Get the C++ name for a member.
*
* @param member Member to get the name for.
* @return JNI name as a string
*/
public static String getNativeName(AnnotatedElement element) {
if (element instanceof Class<?>) {
return getNativeName((Class<?>)element);
} else if (element instanceof Member) {
return getNativeName((Member)element);
} else {
return null;
}
}
/**
* Get the JNI name for a member.
*
* @param member Member to get the name for.
* @return JNI name as a string
*/
public static String getMemberName(Member member) {
if (member instanceof Constructor) {
return "<init>";
}
return member.getName();
}
public static String getUnqualifiedName(String name) {
return name.substring(name.lastIndexOf(':') + 1);
}
/**
* Determine if a member is declared static.
*
* @param member The Member to check.
* @return true if the member is declared static, false otherwise.
*/
public static boolean isStatic(final Member member) {
return Modifier.isStatic(member.getModifiers());
}
/**
* Determine if a member is declared final.
*
* @param member The Member to check.
* @return true if the member is declared final, false otherwise.
*/
public static boolean isFinal(final Member member) {
return Modifier.isFinal(member.getModifiers());
}
}
-376
View File
@@ -1,376 +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_ANDROID_NDK],
[
MOZ_ARG_WITH_STRING(android-cxx-stl,
[ --with-android-cxx-stl=VALUE
use the specified C++ STL (libstdc++, libc++)],
android_cxx_stl=$withval,
android_cxx_stl=libc++)
case "$target" in
*-android*|*-linuxandroid*)
dnl $android_platform will be set for us by Python configure.
CPPFLAGS="-idirafter $android_platform/usr/include $CPPFLAGS"
CFLAGS="-fno-short-enums -fno-exceptions $CFLAGS"
CXXFLAGS="-fno-short-enums -fno-exceptions $CXXFLAGS"
ASFLAGS="-idirafter $android_platform/usr/include -DANDROID $ASFLAGS"
dnl Add --allow-shlib-undefined, because libGLESv2 links to an
dnl undefined symbol (present on the hardware, just not in the
dnl NDK.)
LDFLAGS="-L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -Wl,--allow-shlib-undefined $LDFLAGS"
dnl Add -llog by default, since we use it all over the place.
LIBS="-llog $LIBS"
ANDROID_PLATFORM="${android_platform}"
AC_DEFINE(ANDROID)
AC_SUBST(ANDROID_PLATFORM)
;;
esac
])
AC_DEFUN([MOZ_ANDROID_CPU_ARCH],
[
if test "$OS_TARGET" = "Android"; then
case "${CPU_ARCH}-${MOZ_ARCH}" in
arm-armv7*)
ANDROID_CPU_ARCH=armeabi-v7a
;;
arm-*)
ANDROID_CPU_ARCH=armeabi
;;
x86-*)
ANDROID_CPU_ARCH=x86
;;
mips32-*) # When target_cpu is mipsel, CPU_ARCH is mips32
ANDROID_CPU_ARCH=mips
;;
aarch64-*)
ANDROID_CPU_ARCH=arm64-v8a
;;
esac
AC_SUBST(ANDROID_CPU_ARCH)
fi
])
AC_DEFUN([MOZ_ANDROID_STLPORT],
[
if test "$OS_TARGET" = "Android"; then
cpu_arch_dir="$ANDROID_CPU_ARCH"
# NDK r12 removed the arm/thumb library split and just made everything
# thumb by default. Attempt to compensate.
if test "$MOZ_THUMB2" = 1 -a -d "$cpu_arch_dir/thumb"; then
cpu_arch_dir="$cpu_arch_dir/thumb"
fi
if test -z "$STLPORT_CPPFLAGS$STLPORT_LIBS"; then
case "$android_cxx_stl" in
libstdc++)
# android-ndk-r8b and later
ndk_base="$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version"
ndk_libs_include="$ndk_base/libs/$ANDROID_CPU_ARCH"
ndk_libs="$ndk_base/libs/$cpu_arch_dir"
ndk_include="$ndk_base/include"
if ! test -e "$ndk_libs/libgnustl_static.a"; then
AC_MSG_ERROR([Couldn't find path to gnu-libstdc++ in the android ndk])
fi
STLPORT_LIBS="-L$ndk_libs -lgnustl_static"
STLPORT_CPPFLAGS="-I$ndk_include -I$ndk_include/backward -I$ndk_libs_include/include"
;;
libc++)
# android-ndk-r8b and later
ndk_base="$android_ndk/sources/cxx-stl"
cxx_base="$ndk_base/llvm-libc++"
cxx_libs="$cxx_base/libs/$cpu_arch_dir"
cxx_include="$cxx_base/libcxx/include"
cxxabi_base="$ndk_base/llvm-libc++abi"
cxxabi_include="$cxxabi_base/libcxxabi/include"
if ! test -e "$cxx_libs/libc++_static.a"; then
AC_MSG_ERROR([Couldn't find path to llvm-libc++ in the android ndk])
fi
STLPORT_LIBS="-L$cxx_libs -lc++_static"
# NDK r12 split the libc++ runtime libraries into pieces.
for lib in c++abi unwind android_support; do
if test -e "$cxx_libs/lib${lib}.a"; then
STLPORT_LIBS="$STLPORT_LIBS -l${lib}"
fi
done
# Add android/support/include/ for prototyping long double math
# functions, locale-specific C library functions, multibyte support,
# etc.
STLPORT_CPPFLAGS="-I$android_ndk/sources/android/support/include -I$cxx_include -I$cxxabi_include"
;;
*)
AC_MSG_ERROR([Bad value for --enable-android-cxx-stl])
;;
esac
fi
CXXFLAGS="$CXXFLAGS $STLPORT_CPPFLAGS"
fi
MOZ_ANDROID_CXX_STL=$android_cxx_stl
AC_SUBST([MOZ_ANDROID_CXX_STL])
AC_SUBST([STLPORT_LIBS])
])
AC_DEFUN([concat],[$1$2$3$4])
dnl Find a component of an AAR.
dnl Arg 1: variable name to expose, like ANDROID_SUPPORT_V4_LIB.
dnl Arg 2: path to component.
dnl Arg 3: if non-empty, expect and require component.
AC_DEFUN([MOZ_ANDROID_AAR_COMPONENT], [
ifelse([$3], ,
[
if test -e "$$1" ; then
AC_MSG_ERROR([Found unexpected exploded $1!])
fi
],
[
AC_MSG_CHECKING([for $1])
$1="$2"
if ! test -e "$$1" ; then
AC_MSG_ERROR([Could not find required exploded $1!])
fi
AC_MSG_RESULT([$$1])
AC_SUBST($1)
])
])
dnl Find an AAR and expose variables representing its exploded components.
dnl AC_SUBSTs ANDROID_NAME_{AAR,AAR_RES,AAR_LIB,AAR_INTERNAL_LIB}.
dnl Arg 1: name, like play-services-base
dnl Arg 2: version, like 7.8.0
dnl Arg 3: extras subdirectory, either android or google
dnl Arg 4: package subdirectory, like com/google/android/gms
dnl Arg 5: if non-empty, expect and require internal_impl JAR.
dnl Arg 6: if non-empty, expect and require assets/ directory.
AC_DEFUN([MOZ_ANDROID_AAR],[
define([local_aar_var_base], translit($1, [-a-z], [_A-Z]))
define([local_aar_var], concat(ANDROID_, local_aar_var_base, _AAR))
local_aar_var="$ANDROID_SDK_ROOT/extras/$3/m2repository/$4/$1/$2/$1-$2.aar"
AC_MSG_CHECKING([for $1 AAR])
if ! test -e "$local_aar_var" ; then
AC_MSG_ERROR([You must download the $1 AAR. Run the Android SDK tool and install the Android and Google Support Repositories under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $local_aar_var)])
fi
AC_SUBST(local_aar_var)
AC_MSG_RESULT([$local_aar_var])
if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $local_aar_var ; then
AC_MSG_ERROR([Could not explode $local_aar_var!])
fi
define([root], $MOZ_BUILD_ROOT/dist/exploded-aar/$1-$2/)
MOZ_ANDROID_AAR_COMPONENT(concat(local_aar_var, _LIB), concat(root, $1-$2-classes.jar), REQUIRED)
MOZ_ANDROID_AAR_COMPONENT(concat(local_aar_var, _RES), concat(root, res), REQUIRED)
MOZ_ANDROID_AAR_COMPONENT(concat(local_aar_var, _INTERNAL_LIB), concat(root, libs/$1-$2-internal_impl-$2.jar), $5)
MOZ_ANDROID_AAR_COMPONENT(concat(local_aar_var, _ASSETS), concat(root, assets), $6)
])
AC_DEFUN([MOZ_ANDROID_GOOGLE_PLAY_SERVICES],
[
if test -n "$MOZ_NATIVE_DEVICES" ; then
AC_SUBST(MOZ_NATIVE_DEVICES)
MOZ_ANDROID_AAR(play-services-base, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
MOZ_ANDROID_AAR(play-services-cast, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
MOZ_ANDROID_AAR(mediarouter-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support, REQUIRED_INTERNAL_IMPL)
fi
])
AC_DEFUN([MOZ_ANDROID_GOOGLE_CLOUD_MESSAGING],
[
if test -n "$MOZ_ANDROID_GCM" ; then
MOZ_ANDROID_AAR(play-services-base, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
MOZ_ANDROID_AAR(play-services-gcm, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
MOZ_ANDROID_AAR(play-services-measurement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
fi
])
AC_DEFUN([MOZ_ANDROID_INSTALL_TRACKING],
[
if test -n "$MOZ_INSTALL_TRACKING"; then
AC_SUBST(MOZ_INSTALL_TRACKING)
MOZ_ANDROID_AAR(play-services-ads, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
fi
])
dnl Configure an Android SDK.
dnl Arg 1: target SDK version, like 23.
dnl Arg 2: list of build-tools versions, like "23.0.3 23.0.1".
AC_DEFUN([MOZ_ANDROID_SDK],
[
MOZ_ARG_WITH_STRING(android-sdk,
[ --with-android-sdk=DIR
location where the Android SDK can be found (like ~/.mozbuild/android-sdk-linux)],
android_sdk_root=$withval)
android_sdk_root=${withval%/platforms/android-*}
case "$target" in
*-android*|*-linuxandroid*)
if test -z "$android_sdk_root" ; then
AC_MSG_ERROR([You must specify --with-android-sdk=/path/to/sdk when targeting Android.])
fi
# We were given an old-style
# --with-android-sdk=/path/to/sdk/platforms/android-*. We could warn, but
# we'll get compliance by forcing the issue.
if test -e "$withval"/source.properties ; then
AC_MSG_ERROR([Including platforms/android-* in --with-android-sdk arguments is deprecated. Use --with-android-sdk=$android_sdk_root.])
fi
android_target_sdk=$1
AC_MSG_CHECKING([for Android SDK platform version $android_target_sdk])
android_sdk=$android_sdk_root/platforms/android-$android_target_sdk
if ! test -e "$android_sdk/source.properties" ; then
AC_MSG_ERROR([You must download Android SDK platform version $android_target_sdk. Try |mach bootstrap|. (Looked for $android_sdk)])
fi
AC_MSG_RESULT([$android_sdk])
AC_MSG_CHECKING([for Android build-tools])
android_build_tools_base="$android_sdk_root"/build-tools
android_build_tools_version=""
for version in $2; do
android_build_tools="$android_build_tools_base"/$version
if test -d "$android_build_tools" -a -f "$android_build_tools/aapt"; then
android_build_tools_version=$version
AC_MSG_RESULT([$android_build_tools])
break
fi
done
if test "$android_build_tools_version" = ""; then
version=$(echo $2 | cut -d" " -f1)
AC_MSG_ERROR([You must install the Android build-tools version $version. Try |mach bootstrap|. (Looked for "$android_build_tools_base"/$version)])
fi
MOZ_PATH_PROG(ZIPALIGN, zipalign, :, [$android_build_tools])
MOZ_PATH_PROG(DX, dx, :, [$android_build_tools])
MOZ_PATH_PROG(AAPT, aapt, :, [$android_build_tools])
MOZ_PATH_PROG(AIDL, aidl, :, [$android_build_tools])
if test -z "$ZIPALIGN" -o "$ZIPALIGN" = ":"; then
AC_MSG_ERROR([The program zipalign was not found. Try |mach bootstrap|.])
fi
if test -z "$DX" -o "$DX" = ":"; then
AC_MSG_ERROR([The program dx was not found. Try |mach bootstrap|.])
fi
if test -z "$AAPT" -o "$AAPT" = ":"; then
AC_MSG_ERROR([The program aapt was not found. Try |mach bootstrap|.])
fi
if test -z "$AIDL" -o "$AIDL" = ":"; then
AC_MSG_ERROR([The program aidl was not found. Try |mach bootstrap|.])
fi
android_platform_tools="$android_sdk_root"/platform-tools
AC_MSG_CHECKING([for Android platform-tools])
if test -d "$android_platform_tools" -a -f "$android_platform_tools/adb"; then
AC_MSG_RESULT([$android_platform_tools])
else
AC_MSG_ERROR([You must install the Android platform-tools. Try |mach bootstrap|. (Looked for $android_platform_tools)])
fi
MOZ_PATH_PROG(ADB, adb, :, [$android_platform_tools])
if test -z "$ADB" -o "$ADB" = ":"; then
AC_MSG_ERROR([The program adb was not found. Try |mach bootstrap|.])
fi
android_tools="$android_sdk_root"/tools
AC_MSG_CHECKING([for Android tools])
if test -d "$android_tools" -a -f "$android_tools/emulator"; then
AC_MSG_RESULT([$android_tools])
else
AC_MSG_ERROR([You must install the Android tools. Try |mach bootstrap|. (Looked for $android_tools)])
fi
MOZ_PATH_PROG(EMULATOR, emulator, :, [$android_tools])
if test -z "$EMULATOR" -o "$EMULATOR" = ":"; then
AC_MSG_ERROR([The program emulator was not found. Try |mach bootstrap|.])
fi
ANDROID_TARGET_SDK="${android_target_sdk}"
ANDROID_SDK="${android_sdk}"
ANDROID_SDK_ROOT="${android_sdk_root}"
ANDROID_TOOLS="${android_tools}"
ANDROID_BUILD_TOOLS_VERSION="$android_build_tools_version"
AC_DEFINE_UNQUOTED(ANDROID_TARGET_SDK,$ANDROID_TARGET_SDK)
AC_SUBST(ANDROID_TARGET_SDK)
AC_SUBST(ANDROID_SDK_ROOT)
AC_SUBST(ANDROID_SDK)
AC_SUBST(ANDROID_TOOLS)
AC_SUBST(ANDROID_BUILD_TOOLS_VERSION)
MOZ_ANDROID_AAR(customtabs, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
MOZ_ANDROID_AAR(appcompat-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
MOZ_ANDROID_AAR(support-vector-drawable, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
MOZ_ANDROID_AAR(animated-vector-drawable, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
MOZ_ANDROID_AAR(cardview-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
MOZ_ANDROID_AAR(design, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
MOZ_ANDROID_AAR(recyclerview-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
MOZ_ANDROID_AAR(support-v4, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support, REQUIRED_INTERNAL_IMPL)
MOZ_ANDROID_AAR(palette-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
ANDROID_SUPPORT_ANNOTATIONS_JAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/support-annotations/$ANDROID_SUPPORT_LIBRARY_VERSION/support-annotations-$ANDROID_SUPPORT_LIBRARY_VERSION.jar"
AC_MSG_CHECKING([for support-annotations JAR])
if ! test -e $ANDROID_SUPPORT_ANNOTATIONS_JAR ; then
AC_MSG_ERROR([You must download the support-annotations lib. Run the Android SDK tool and install the Android Support Repository under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_SUPPORT_ANNOTATIONS_JAR)])
fi
AC_MSG_RESULT([$ANDROID_SUPPORT_ANNOTATIONS_JAR])
AC_SUBST(ANDROID_SUPPORT_ANNOTATIONS_JAR)
ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB=$ANDROID_SUPPORT_ANNOTATIONS_JAR
AC_SUBST(ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB)
;;
esac
MOZ_ARG_WITH_STRING(android-min-sdk,
[ --with-android-min-sdk=[VER] Impose a minimum Firefox for Android SDK version],
[ MOZ_ANDROID_MIN_SDK_VERSION=$withval ])
MOZ_ARG_WITH_STRING(android-max-sdk,
[ --with-android-max-sdk=[VER] Impose a maximum Firefox for Android SDK version],
[ MOZ_ANDROID_MAX_SDK_VERSION=$withval ])
if test -n "$MOZ_ANDROID_MIN_SDK_VERSION"; then
if test -n "$MOZ_ANDROID_MAX_SDK_VERSION"; then
if test $MOZ_ANDROID_MAX_SDK_VERSION -lt $MOZ_ANDROID_MIN_SDK_VERSION ; then
AC_MSG_ERROR([--with-android-max-sdk must be at least the value of --with-android-min-sdk.])
fi
fi
if test $MOZ_ANDROID_MIN_SDK_VERSION -gt $ANDROID_TARGET_SDK ; then
AC_MSG_ERROR([--with-android-min-sdk is expected to be less than $ANDROID_TARGET_SDK])
fi
AC_DEFINE_UNQUOTED(MOZ_ANDROID_MIN_SDK_VERSION, $MOZ_ANDROID_MIN_SDK_VERSION)
AC_SUBST(MOZ_ANDROID_MIN_SDK_VERSION)
fi
if test -n "$MOZ_ANDROID_MAX_SDK_VERSION"; then
AC_DEFINE_UNQUOTED(MOZ_ANDROID_MAX_SDK_VERSION, $MOZ_ANDROID_MAX_SDK_VERSION)
AC_SUBST(MOZ_ANDROID_MAX_SDK_VERSION)
fi
])
-12
View File
@@ -28,24 +28,12 @@ MOZ_ARG_WITH_STRING(arch,
if test -z "$MOZ_ARCH"; then
dnl Defaults
case "${CPU_ARCH}-${OS_TARGET}" in
arm-Android)
MOZ_THUMB=yes
MOZ_ARCH=armv7-a
MOZ_FPU=vfp
MOZ_FLOAT_ABI=softfp
MOZ_ALIGN=no
;;
arm-Darwin)
MOZ_ARCH=toolchain-default
;;
esac
fi
if test "$MOZ_ARCH" = "armv6" -a "$OS_TARGET" = "Android"; then
MOZ_FPU=vfp
MOZ_FLOAT_ABI=softfp
fi
MOZ_ARG_WITH_STRING(thumb,
[ --with-thumb[[=yes|no|toolchain-default]]]
[ Use Thumb instruction set (-mthumb)],
+8 -16
View File
@@ -16,7 +16,7 @@ dnl set DEVELOPER_OPTIONS early; MOZ_DEFAULT_COMPILER is usually the first non-s
DEVELOPER_OPTIONS=,
DEVELOPER_OPTIONS=1)
dnl Default to MSVC for win32 and gcc-4.2 for darwin
dnl Default to MSVC for win32
dnl ==============================================================
if test -z "$CROSS_COMPILE"; then
case "$target" in
@@ -176,8 +176,8 @@ if test "$GNU_CC"; then
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
fi
CFLAGS="$CFLAGS -fno-math-errno"
CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno"
CFLAGS="$CFLAGS -fno-math-errno -pipe"
CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno -pipe"
if test "$CPU_ARCH" = "x86" -o "$CPU_ARCH" = "x86_64"; then
CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
@@ -186,7 +186,8 @@ if test "$GNU_CC"; then
if test -z "$CLANG_CC"; then
case "$CC_VERSION" in
4.* | 5.*)
4.* | 5.* | 6.*)
AC_MSG_ERROR([Unsupported GCC version.])
;;
*)
# Lifetime Dead Store Elimination level 2 (default in GCC6+) breaks Gecko.
@@ -270,18 +271,9 @@ if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then
fi
fi
# bionic in Android < 4.1 doesn't support PIE
# On OSX, the linker defaults to building PIE programs when targetting OSX 10.7+,
# but not when targetting OSX < 10.7. OSX < 10.7 doesn't support running PIE
# programs, so as long as support for OSX 10.6 is kept, we can't build PIE.
# Even after dropping 10.6 support, MOZ_PIE would not be useful since it's the
# default (and clang says the -pie option is not used).
# On other Unix systems, some file managers (Nautilus) can't start PIE programs
if test -n "$gonkdir" && test "$ANDROID_VERSION" -ge 16; then
MOZ_PIE=1
else
MOZ_PIE=
fi
# On some Unix systems, some file managers (e.g. Nautilus) can't start PIE programs
# so don't enable it by default.
MOZ_PIE=
MOZ_ARG_ENABLE_BOOL(pie,
[ --enable-pie Enable Position Independent Executables],
+2 -6
View File
@@ -114,7 +114,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \
@@ -122,10 +122,6 @@ case $maybe_os in
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -1389,7 +1385,7 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -mingw32* | -mingw64* | -linux-gnu* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-5
View File
@@ -7,11 +7,6 @@ dnl disabling frame pointers in this architecture based on the configure
dnl options
AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [
case "$target" in
*android*)
unwind_tables="-funwind-tables"
;;
esac
if test "$GNU_CC"; then
MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer $unwind_tables"
MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer"
Loaded 100 of 46075 files, more files were not shown because too many files have changed in this diff. Show more