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

5476 Commits

Author SHA1 Message Date
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
Moonchild f860413ed6 Issue #1769: Ensure MIME type is known in URIloader for jxl 2023-06-24 12:18:52 +08:00
Moonchild 1ef390db08 Issue #1769: Update symbols for libxul linkage 2023-06-24 12:18:35 +08:00
Job Bautista 4d78f53da1 Issue #1769 - Follow-up: Fix typo in MOZ_ARG_ENABLE_BOOL
Silly copy-paste mistake from AV1
2023-06-24 12:17:58 +08:00
Job Bautista 40f27cd35b Issue #1769 - Part 1 Follow-up: Use standard [[deprecated]] for JXL_DEPRECATED.
This fixes building with MSVC for Windows.
2023-06-24 12:17:33 +08:00
Job Bautista 134c5e94e8 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.
2023-06-24 12:17:19 +08:00
Job Bautista 00a5d64018 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.
2023-06-24 12:17:02 +08:00
Job Bautista 2df558509f 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.
2023-06-24 12:16:41 +08:00
Job Bautista 51ea0e4f3a Issue #1769 - Part 2: Implement JPEG-XL decoder and about:config and MIME plumbing.
Backported from Mozilla bug 1707590 whereever possible.
2023-06-24 12:16:27 +08:00
Job Bautista 7983f5d8ba 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: 1.0.2
libjxl version: 0.7.0
2023-06-24 12:16:12 +08:00
FranklinDM 6444835acd Issue #21 - Follow-up: Remove experiment category images 2023-06-23 16:07:46 +08:00
FranklinDM 341632f865 Issue #21 - Part 3: Remove experiments localization
This also removes bits from about:support that weren't removed in bf6bb142fc5bcb49b053788e06160af304f639e5.
2023-06-23 16:07:23 +08:00
FranklinDM 9f8aa81a87 Issue #21 - Part 2: Remove experiment extension assets and styling 2023-06-23 16:07:05 +08:00
FranklinDM 369e68a663 Issue #21 - Part 1: Remove experiments base code from the Add-ons Manager
The experiments manager was already removed in bf6bb142fc5bcb49b053788e06160af304f639e5 and this was imported dead code from Tycho AM.
2023-06-23 16:06:49 +08:00
Moonchild 8658452304 No issue - Update SQLite lib to 3.42.0 2023-06-23 16:06:33 +08:00
FranklinDM fe7244c016 Issue #1691 - Follow-up: Print leaking class name and remove crash reporter dependency 2023-06-23 16:05:54 +08:00
Moonchild c4d665a0d0 No issue - Set the default for incremental cycle collector to be off.
Negative performance impact if enabled.
2023-06-23 16:05:16 +08:00
Jeremy Andrews ccd69e165d Issue #1956 - Allow building with newer MSVC versions.
(P.S.: this rev is partly imported from upstream, without binaries. -Roy)
2023-06-23 16:03:03 +08:00
Moonchild 4b0e27bb4c [Pale-Moon] [SSUAO] Update chase.com override after breakage. 2023-06-02 10:39:13 +08:00
Moonchild 1768eb1930 [Pale-Moon] Issue #1925 - Follow-up: Throw errors on invalid values.
Uses defaults for negative values and caps upper limit.
2023-06-02 10:37:27 +08:00
Job Bautista 075eebec12 [Pale-Moon] Issue #1925 - Follow-up: Don't show link items when pref is less than 1.
A user setting the pref to 0 most likely wants to get rid of the items, so let's
allow that by simply not calling PlacesMenu.call at all in that case.
2023-06-02 10:37:01 +08:00
Moonchild e3d51b39b6 [Pale-Moon] Issue #1925 - Add pref to control history menu length.
Limits set are minimum 1 entry (0 would mean unlimited so this can't
be used to completely remove the history list from the menu) and maximum
50 which would overflow on most screens anyway. Default remains 15 if
undefined.

Resolves #1925
2023-06-02 10:36:16 +08:00
Moonchild 2a7ff7ce1a 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-02 10:35:31 +08:00
Moonchild 77bd81595d 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-06-02 10:35:08 +08:00
Brian Smith 106de86dc4 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-24 09:02:56 +08:00
FranklinDM adaf6c3221 Issue #1592 - Follow-up: Ensure topmost scope marker is cleaned up 2023-05-24 09:02:40 +08:00