1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00
Commit Graph

5501 Commits

Author SHA1 Message Date
Brian Smith efde4d468e 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-14 10:16:53 +08:00
Brian Smith eb2cca7242 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-14 10:16:37 +08:00
Brian Smith ffa0c4d864 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-14 10:16:19 +08:00
Moonchild c292f9ffdc [XPCOM] Win: Update executable extension list 2023-07-06 10:39:00 +08:00
Moonchild a299eaa965 [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-06 10:37:32 +08:00
Moonchild 96d1e2766f [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-06 10:25:09 +08:00
Brian Smith 2c0384c4a2 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-06 10:24:34 +08:00
Moonchild 81a3a92b04 [multiple] Update Intl tests. 2023-07-03 15:12:46 +08:00
Moonchild f9c39acaa6 Issue #1656 - Follow-up: Re-nuke the vim lines introduced in #2265 2023-07-03 15:12:01 +08:00
Martok 4400677afe 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-07-03 15:11:41 +08:00
Martok e01ff1c5f9 Issue #1819 - Further align Intl.Locale to spec
- Reference updates (UTS 35)
- variant subtag and transform extension canonicalisation
2023-07-03 15:11:09 +08:00
Martok 0b3079d8e6 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-07-03 15:10:37 +08:00
Martok 4ad4a82a10 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-07-03 15:10:02 +08:00
Martok c10a29d96f 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-07-03 15:09:21 +08:00
Martok 3ee2c9dcf1 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-07-03 15:08:53 +08:00
Martok cf7bd82328 Issue #2195 - Add support for hourCycle to Intl.DateTimeFormat
Based-on: m-c 1386146, 1430809
2023-07-03 15:08:24 +08:00
Martok e923c48f4f Issue #2259 - Improve ResolveLocale performance when initializing the default Intl objects
Based-on: m-c 1365650
2023-07-03 15:08:00 +08:00
Martok e3dbf7c5e7 Issue #2259 - Support Unicode extensions with multiple value subtags in BCP47 language tags
Based-on: m-c 1321789
2023-07-03 15:07:26 +08:00
Martok 8d97bd437a 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-07-03 15:07:03 +08:00
Martok 949f69ef4b Issue #2259 - Implement caseFirst option in Intl.Collator
Based-on: m-c 866473
2023-07-03 15:06:40 +08:00
Martok 85612accf2 Issue #2046 - Introduce mozIntl.DateTimeFormat with mozExtensions
Based-on: m-c 1329904
2023-07-03 15:06:04 +08:00
Martok 30157344fe 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-07-03 15:05:30 +08:00
Martok adffcb127a Issue #2259 - Introduce helper for self-hosted hasOwnProperty calls in intl 2023-07-03 15:04:42 +08:00
Martok a7d752deff 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-07-03 15:04:14 +08:00
Martok f8f7aed528 Issue #2259 - Add JS::StackGCVector and JS::RootedVector
Based-on: m-c 1521732/{1,3}, 1527881
2023-07-03 15:03:45 +08:00
Martok 4c2e378613 Issue #2259 - Add mozilla::Result<V, E> and JS::Result<> for fallible return values
Based-on: m-c 1283562, 1277368/1, 1324828
2023-07-03 15:03:29 +08:00
Martok 9914c06168 Issue #2259 - Add mozilla::Vector -> mozilla::Span implicit conversion
Based-on: part of m-c 1578339
2023-07-03 15:03:08 +08:00
Martok 7716602a20 Issue #2259 - Add missing IsAscii* helper functions in mozilla/TextUtils.h 2023-07-03 15:02:50 +08:00
Martok 5a531ea80c Issue #1969 Follow-Up: Error reporting arguments in RelativeTimeFormat/DateTimeFormat 2023-07-03 15:02:30 +08:00
Moonchild 890e1eb84d Fix debug builds 2023-07-03 14:59:18 +08:00
Moonchild 24b1a0f166 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-07-03 14:59:02 +08:00
Moonchild 95a1e4b7a3 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-07-03 14:58:44 +08:00
roytam1 661754041c moz.configure: add fix for VS2017 x64 ATLMFC lib path detection 2023-06-26 10:37:28 +08:00
roytam1 f191eae652 bump PM version as well 2023-06-26 09:14:35 +08:00
roytam1 c0c980e12f bump platform version for JPEG-XL import 2023-06-26 09:04:49 +08:00
FranklinDM 80c2062843 Issue #2061 - Follow-up: Silence compiler warnings for libjxl (MSVC) 2023-06-24 12:22:46 +08:00
FranklinDM 84dc161d55 Issue #2061 - Follow-up: Silence compiler warnings for libjxl 2023-06-24 12:22:33 +08:00
FranklinDM 06d2df29b4 Issue #1382 - Fix invalid assert for decoder type if JXL is not built on debug builds 2023-06-24 12:22:21 +08:00
Job Bautista 743d1f66d2 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>
2023-06-24 12:22:08 +08:00
Job Bautista b18114517b 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
2023-06-24 12:21:54 +08:00
Job Bautista 42543c12f0 Issue #2057 - Use gfxPackedPixel + WritePixels instead of WriteBuffer.
This means we no longer need the workarounds intended for #2033 and #2040!
2023-06-24 12:21:32 +08:00
lexx9999 8f09162893 Issue #2041 follow-up - fix macro condition 2023-06-24 12:21:20 +08:00
Moonchild 514ed1423c PR #2050 follow-up: add symbols to build shared on Windows. 2023-06-24 12:21:05 +08:00
Job Bautista 54e073511a 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.
2023-06-24 12:20:48 +08:00
Job Bautista 0bd6f00356 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.
2023-06-24 12:20:36 +08:00
Job Bautista 042b8f37ae Issue #2041 - Add animation support for JPEG-XL.
Based on Mozilla phab D122158, intended for bug 1709818.
2023-06-24 12:20:23 +08:00
Moonchild 9b4c0ef4e9 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.
2023-06-24 12:20:09 +08:00
Moonchild 8b4b6f8ebd fix whitespace. 2023-06-24 12:19:45 +08:00
Moonchild 77ca4ae9db 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)
2023-06-24 12:19:25 +08:00
Moonchild 7f87cc1276 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.
2023-06-24 12:19:10 +08:00