Compare commits

...
Author SHA1 Message Date
Moonchild 3a4dc8de41 Issue #3020 - Clear currentScript after running microtasks
Per HTML spec:

`document.currentScript` Returns null if the Document is not currently
executing a script or SVG script element (e.g., because the running
script is an event handler, or a timeout), or if the currently executing
script or SVG script element represents a module script.

---

It's ambiguous about whether, for micro tasks, it should return null.
(This section is labelled as "non-normative", as well.)
However, mainstream browsers handle this differently and don't return
null after running microtasks, so we need to clear this and not assume
null persistently, and run the auto-updater for it, regardless if
it's a module or not.
2026-03-24 20:44:13 +01:00
Moonchild 18595b01b6 Issue #3020 - Update currentScript when dealing with shadow DOM.
`currentScript` should be null when evaluating scripts from shadow DOM.
2026-03-24 15:53:04 +01:00
Moonchild f7215fc685 Issue #3020 - document.currentScript should be null in modules
This is done correctly in `EvaluateScript`, but `CreateModuleScript` was
still setting currentScript to an element.
2026-03-24 15:50:34 +01:00
Moonchild 08521d4651 Merge pull request 'Remove Itanium/ia64 support from xpcom' (#3018) from Basilisk-Dev/UXP-contrib:xpcom-itanium-cleanup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3018
2026-03-24 11:18:04 +00:00
Moonchild 00b177d75f Merge pull request 'Fix Shadow DOM spellchecker crash' (#3014) from spellcheck-shadowdom-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3014
2026-03-23 23:48:49 +00:00
Moonchild a89a071049 Merge pull request 'implement TypedArray.prototype.with' (#3019) from Basilisk-Dev/UXP-contrib:typedarray-with into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3019
2026-03-23 15:18:47 +00:00
Basilisk-Dev f9dc8a091a Issue #2551 - implement TypedArray.prototype.with 2026-03-23 08:50:01 -04:00
Basilisk-Dev 944299ed6c Issue #3007 - Remove Itanium/ia64 support from xpcom 2026-03-23 08:15:51 -04:00
Moonchild 0e1441155c Merge pull request 'Issue #3016 - allow url.CanParse to use custom-scheme bases to match current spec' (#3017) from Basilisk-Dev/UXP-contrib:url-canparse-spec-compliance into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3017
2026-03-23 05:23:18 +00:00
Moonchild 7bf5dfe4e4 Merge pull request 'Modify valgrind logging in libavutil to require MOZ_VALGRIND' (#3010) from Basilisk-Dev/UXP-contrib:ffvpx-valgrind into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3010
Reviewed-by: Moonchild <moonchild@palemoon.org>
2026-03-22 21:23:00 +00:00
Basilisk-Dev d4c34fc9f7 Issue #3009 - updated libavutil to keep HAVE_VALGRIND_VALGRIND_H as the primary gate, with MOZ_VALGRIND added inside it 2026-03-22 16:57:34 -04:00
Basilisk-Dev 6811005551 Issue #3016 - allow url.CanParse to use custom-scheme bases to match current spec 2026-03-22 16:48:43 -04:00
Moonchild 464cefa127 Merge pull request 'Attempt to fix Cloudflare image resizing' (#3012) from wuggy/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3012
Reviewed-by: Moonchild <moonchild@palemoon.org>
2026-03-22 14:42:51 +00:00
Moonchild c94a1ab5d3 Merge pull request 'Issue #3007 - remove itanium support and references from webrtc' (#3015) from Basilisk-Dev/UXP-contrib:webrtc-itanium-cleanup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3015
2026-03-22 14:40:10 +00:00
Basilisk-Dev 8aa5b35605 Issue #3007 - remove itanium support and references from webrtc 2026-03-22 01:05:18 -04:00
Basilisk-Dev 25dd1fb31a Issue #3009 - restore valgrind functionality in libavutil and hide behind MOZ_VALGRIND instead 2026-03-21 22:52:25 -04:00
wuggy d8cf2c8b44 Cloudflare Image Resizing fix take 3 part 2 (all.js) 2026-03-21 13:28:57 +00:00
wuggy 938c5d08d4 Cloudflare Image Resizing fix take 3 part 1 (main fixup) 2026-03-21 13:26:34 +00:00
Moonchild 7fca2b8de3 Issue #2739 - Follow-up: remove missed configure bits.
We still accepted {en|dis}able-jxl as a valid old-configure option and
there were a few leftover pref conditionals.
2026-03-21 11:57:15 +01:00
wuggy ef19ad3ffd Cloudflare Image Resizing fix take 2
Better documentation and about:config pref controlled (network.url.cloudflare_image_resizing.enabled)
2026-03-20 19:02:52 +00:00
Moonchild ab88527fe6 Issue #3011 - Part 3: Handle edge case for spellchecking.
Make spellchecking work in Shadow DOM after anchor navigates away from it.
2026-03-20 17:07:55 +01:00
Moonchild 6c0ff1881a Issue #3011 - Part 2: Switch spellchecker root to Shadow DOM.
Set the root for spelling checker to shadow root if the contenteditable
nodes are in the shadow DOM. Bail if the position can't be set properly.
2026-03-20 14:45:11 +01:00
Moonchild 1e7f4c8474 Issue #3011 - Part 1: Add As{Text|Html}Editor() and AsEditorBase()
This adds helper functions to get specific types of content editors (if
possible) through the nsIEditor interface, as opposed to doing manual
casting and the ad hoc `GetHTMLEditor()` function.

Helper functions are spread out over multiple headers due to the
circular dependency issues that would be triggered otherwise.
2026-03-20 13:26:18 +01:00
wuggy fdf491d4ec Cloudflare Image Resizing fix 2026-03-20 10:18:45 +00:00
Basilisk-Dev 1f4cceca43 Issue #3009 - Remove valgrind logging in libavutil so that valgrind is no longer required at build time 2026-03-18 19:44:28 -04:00
Moonchild 542eaca577 Merge pull request 'LoongArch Support Followup - Do not hardcode jemalloc page size on LoongArch' (#3006) from Basilisk-Dev/UXP-contrib:loongarchpagesize into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3006
2026-03-18 23:02:13 +00:00
Basilisk-Dev 1cb6f56418 Issue #2897 followup - Do not hardcode jemalloc page size on LoongArch
Loongarch can run on either a 4k or 16k page size
2026-03-18 18:14:27 -04:00
Moonchild a503e883d9 Merge pull request 'Don't attempt on-stack replacement for TLA modules when interpreter loop encounters JSOP_LOOPENTRY' (#3002) from jobbautista9/UXP:2229-jsop_loopentry into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3002
2026-03-18 15:21:31 +00:00
Moonchild 347681c219 Merge pull request 'Implement array.prototype.toSpliced and array.prototype.with' (#3005) from Basilisk-Dev/UXP-contrib:arraybycopy into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3005
2026-03-17 20:31:34 +00:00
Basilisk-Dev 2984237f4f Issue #2551 - implement array.prototype.toSpliced 2026-03-16 14:33:50 -04:00
Basilisk-Dev 1c4a73de71 Issue #2551 - implement array.prototype.with 2026-03-16 14:27:02 -04:00
Job Bautista d27df4d88f Issue #2229 - Follow-up: Don't attempt on-stack replacement for TLA modules
When interpreter loop encounters JSOP_LOOPENTRY, we should not let TLA modules
enter baseline JIT.
2026-03-16 11:28:25 +08:00
Moonchild 9562888e77 Merge pull request 'Flatten nested CSS to standard CSS before parsing (fix sites using nested CSS)' (#2999) from Basilisk-Dev/UXP-contrib:nested-css into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2999
Reviewed-by: Moonchild <moonchild@palemoon.org>
2026-03-14 18:24:58 +00:00
Moonchild 5536b38401 Merge pull request 'Add AudioNode constructors' (#2988) from audionode-constructors-pr into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2988
2026-03-14 18:19:08 +00:00
Moonchild c011b271a1 Issue #3001 - Restore table reference frame call.
While the result value was only used for debug purposes, the function
`FindReferenceFrameFor` also updates the reference frame for use
outside of debug builds. The opaque double use of this function
was not clear from code inspection and it was erroneously removed.

Resolves #3001
2026-03-14 19:16:41 +01:00
Basilisk-Dev c21fb81d3e Issue #2862 - css nesting pref true by default 2026-03-14 13:23:54 -04:00
Basilisk-Dev 5a3dcf5939 Issue #2862 - Remove unused vars in CSS flattener 2026-03-14 13:22:59 -04:00
Moonchild 1d709fe942 Merge pull request 'Update expat source to 2.7.4 and apply local patches' (#2998) from jobbautista9/UXP:expat-2.7.4 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2998
2026-03-13 17:06:21 +00:00
Moonchild e55c16146f Issue #2993 - Follow-up: Clobber. 2026-03-13 16:19:56 +01:00
Basilisk-Dev 997a9a3e13 Issue #2862 - Change tests from lowering to flattening 2026-03-13 09:01:56 -04:00
Basilisk-Dev 008f38579c Issue #2862 - Change code references from CSS lowering to CSS flattening 2026-03-13 08:58:18 -04:00
Basilisk-Dev d943e86b28 Issue #2862 - handle more edge cases in css lowering 2026-03-12 08:44:03 -04:00
Basilisk-Dev 3f2d707a83 Issue #2862 - more tests files for nested css 2026-03-12 08:43:58 -04:00
Basilisk-Dev b145a93ad6 Issue #2862 - Split the css lowering functionality out to a separate file for easier maintenance 2026-03-12 08:43:53 -04:00
Basilisk-Dev 3056028db4 Issue #2862 - Fix a few nested selectors 2026-03-12 08:43:48 -04:00
Basilisk-Dev b4dac14720 Issue #2862 - Modify the css lowerer so that the lowering pass now recognizes bare type-selector nested rules and combinator-led cases 2026-03-12 08:43:42 -04:00
Basilisk-Dev 76694b956f Issue #2862 - add initial nested css test file 2026-03-12 08:43:33 -04:00
Basilisk-Dev 9fab5b3e3c Issue #2862 - Initial attempt at a css lowering 2026-03-12 08:43:23 -04:00
Job Bautista d54491fdd0 Issue #2997 - Update expat source to 2.7.4 and apply local patches. 2026-03-12 13:50:10 +08:00
Moonchild 00c3c3a546 Merge pull request 'Only use SVE instructions on Apple Silicon (disable on aarch64 Linux)' (#2994) from Basilisk-Dev/UXP-contrib:vpx-sve into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2994
2026-03-11 20:50:08 +00:00
Moonchild 1da5c344be Merge pull request 'Implement TypedArray.prototype.toReversed()' (#2996) from Basilisk-Dev/UXP-contrib:typed-toReversed into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2996
2026-03-11 20:28:21 +00:00
Moonchild 76d66b5dad Merge pull request 'Work around macOS WebGL crash on unconsumed vertex attrib arrays' (#2995) from Basilisk-Dev/UXP-contrib:webgl-crash into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2995
2026-03-11 20:23:20 +00:00
Basilisk-Dev e502735eb2 Issue #2993 - only use SVE instructions on Apple Silicon (disable on aarch64 Linux) 2026-03-11 15:07:09 -04:00
Basilisk-Dev edfebe1b99 Issue #2551 - Implement TypedArray.prototype.toReversed() 2026-03-11 15:04:16 -04:00
Moonchild 250e4f75da Merge pull request 'Avoid empty replacements in macro expansion.' (#2986) from 2978 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2986
2026-03-11 19:03:59 +00:00
Basilisk-Dev 53f1bdd9c2 Issue #2978 - Work around macOS WebGL crash on unconsumed vertex attrib arrays 2026-03-11 14:25:20 -04:00
Moonchild ade298d0a7 Merge pull request 'Issue #2990 - implement object.GroupBy' (#2991) from Basilisk-Dev/UXP-contrib:objectgroupby into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2991
2026-03-10 15:24:08 +00:00
Basilisk-Dev 387b01ce14 Issue #2990 - implement object.GroupBy 2026-03-10 10:45:54 -04:00
Moonchild 47d2094329 Merge pull request 'Issue #2926 - Tweak mimalloc performance tunables' (#2989) from Basilisk-Dev/UXP-contrib:mimalloc-tweaks into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2989
2026-03-10 13:48:48 +00:00
Basilisk-Dev 43f9a8e1f0 Issue #2926 - Tweak mimalloc performance tunables:
MI_DEFAULT_PURGE_DECOMMITS=0 - fewer costly kernel operations and fewer immediate recommit/zero-fill penalties on reuse.

MI_DEFAULT_PURGE_DELAY=500 - short-lived allocation bursts can reuse pages directly, avoiding purge/reclaim ping-pong.

MI_DEFAULT_GENERIC_COLLECT=50000 - lower background allocator housekeeping overhead on hot allocation paths.
2026-03-10 09:08:14 -04:00
Moonchild 30e287371f Issue #2987 - Part 19: Add MediaStreamAudioDestinationNode constructor. 2026-03-10 11:19:11 +01:00
Moonchild a9246d7b28 Issue #2987 - Part 18: Add MediaStreamAudioSourceNode constructor. 2026-03-10 11:19:05 +01:00
Moonchild db1d73f05d Issue #2987 - Part 17: Add MediaElementAudioSourceNode constructor. 2026-03-10 11:18:39 +01:00
Moonchild 72b14ea177 Issue #2987 - Part 16: Add AudioBuffer constructor. 2026-03-10 11:18:02 +01:00
Moonchild 430c4a3f79 Issue #2987 - Part 15: Add PeriodicWave constructor. 2026-03-10 11:17:57 +01:00
Moonchild 93ed92f63b Issue #2987 - Part 14: Add OscillatorNode constructor. 2026-03-10 11:17:53 +01:00
Moonchild 4a1312c060 Issue #2987 - Part 13: Add DynamicsCompressorNode constructor. 2026-03-10 11:17:47 +01:00
Moonchild 303e1ecf34 Issue #2987 - Part 12: Add ChannelMergerNode constructor. 2026-03-10 11:17:42 +01:00
Moonchild 57b0e4a65b Issue #2987 - Part 11: Add ChannelSplitterNode constructor. 2026-03-10 11:17:38 +01:00
Moonchild 804a301068 Issue #2987 - Part 10: Add ConvolverNode constructor. 2026-03-10 11:17:32 +01:00
Moonchild aedb8a4d08 Issue #2987 - Part 9: Add StereoPannerNode constructor. 2026-03-10 11:17:27 +01:00
Moonchild 93072ab51e Issue #2987 - Part 8: Add PannerNode constructor. 2026-03-10 11:17:22 +01:00
Moonchild ca11a325bd Issue #2987 - Part 7: Add WaveShaperNode constructor. 2026-03-10 11:17:17 +01:00
Moonchild 3b088af0b1 Issue #2987 - Part 6: Add IIRFilterNode constructor. 2026-03-10 11:17:12 +01:00
Moonchild 09e52646e9 Issue #2987 - Part 5: Add BiQuadFilterNode constructor. 2026-03-10 11:17:07 +01:00
Moonchild 26ca6f4fcc Issue #2987 - Part 4: Add DelayNode constructor. 2026-03-10 11:17:02 +01:00
Moonchild b467d710ac Issue #2987 - Part 3: Add GainNode constructor. 2026-03-10 11:16:56 +01:00
Moonchild f4f11fada8 Issue #2987 - Part 2: Add AudioBufferSourceNode constructor. 2026-03-10 11:16:49 +01:00
Moonchild 43b3b47426 Issue #2987 - Part 1: Add AnalyserNode constructor. 2026-03-10 11:16:43 +01:00
Moonchild 77f8cae06e Issue #2978 - Avoid empty replacements in macro expansion.
If the replacements array is empty, don't attempt to do any work on the
existing macro, and return. This should prevent infinite recursion in
some cases.
Order matters here: we're relying on the `if` statement shortcut so
`collectMacroArgs()` doesn't get called.
2026-03-09 16:04:57 +01:00
Moonchild daa31cfd59 No issue - Fix some fatal printing assertions.
- Turn a fatal assert into a warning if we can't guarantee a drawTarget.
  This should not be fatal since the DrawTarget is checked later.
- Remove a fatal assertion if a display table background is cross-document
  since non-display iframes may cause this situation without it being an
  error.
2026-03-09 11:30:38 +01:00
Moonchild b4ad4b7293 Issue #2981 - Add nullcheck in GetPointerCapabilities
Resolves #2981
2026-03-09 11:27:25 +01:00
Moonchild a2947909e8 Merge pull request 'Issue #2982 - Implement oklab/oklch' (#2983) from Basilisk-Dev/UXP-contrib:oklab-oklch into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2983
2026-03-08 07:27:26 +00:00
Moonchild bc2d0521e7 Merge pull request 'Implement ES2022 error.cause property' (#2984) from dbsoft/UXP:error-cause-2304 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2984
2026-03-07 21:17:22 +00:00
Moonchild 95ca42dd06 Merge pull request 'Handle special cases for certain MacOS system fonts.' (#2985) from dbsoft/UXP:mac-variation-fonts into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2985
2026-03-07 21:00:44 +00:00
Brian Smith 0c0dfca015 Issue #2304 - Part 5 - Add cause property when a cause is present.
I thought this was just to check whether it should be added, but is necessary.
2026-03-07 01:41:07 -06:00
Brian Smith 17cd2e4d07 Issue #2304 - Part 4 - Add xray support for the Error cause property.
https://bugzilla.mozilla.org/show_bug.cgi?id=1679653
2026-03-07 01:17:18 -06:00
Brian Smith f305547835 Issue #2304 - Part 3 - Implement the error cause proposal.
https://bugzilla.mozilla.org/show_bug.cgi?id=1679653
2026-03-07 00:41:42 -06:00
Brian Smith 5ee86104a8 Issue #2304 - Part 2 - Prerequisite: Teach GCPolicy about Maybe.
https://bugzilla.mozilla.org/show_bug.cgi?id=1377008
2026-03-06 23:47:55 -06:00
Basilisk-Dev 0ab247bee9 Issue #2982 - Fix regressions in the previous regression fix commit. 2026-03-06 16:27:12 -05:00
Basilisk-Dev 5370edc560 Issue #2982 - Fix regression in previous commit by handling possible floating point issues 2026-03-06 16:27:12 -05:00
Basilisk-Dev f27b6cbd21 Issue #2982 - clamp oklab/oklch to [0,1] before conversion to closer match spec 2026-03-06 16:27:12 -05:00
Basilisk-Dev de3485ed67 Issue #2982 - Make gradients work in oklch 2026-03-06 16:27:12 -05:00
Basilisk-Dev 7f8489bc11 Issue #2982 - Initial oklch test implementation 2026-03-06 16:27:07 -05:00
Brian Smith 8c1cf4cc02 Issue #2304 - Part 1 - Prerequisite: Make Handle<Maybe<>> more convenient.
This is required to implement JS::NothingHandleValue.
https://bugzilla.mozilla.org/show_bug.cgi?id=1631114
2026-03-06 13:13:21 -06:00
Moonchild b8fbac6365 Merge pull request 'Futureproof Internal ICU Whitespace' (#2980) from RealityRipple/UXP:alt-space-ex into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2980
2026-03-06 12:53:00 +00:00
Andy c7cc4ef650 Support All White Spaces in ICU Replacement from PR #2921
In case Unicode adds additional alternate spaces to formats in the future, the wsCompat argument will be ready.
I also switched over to the `u_isUWhiteSpace` alias, which is functionally identical to `UCHAR_WHITE_SPACE` at present, just in case the alias ever expands beyond the const.
2026-03-06 03:36:27 -08:00
Moonchild 9d1789b62f Merge pull request 'Stop exposing plugin preferences if support isn't built' (#2975) from 2879 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2975
2026-03-06 09:52:50 +00:00
Moonchild 9a1c99e1a2 Issue #2879 - Stop exposing additional prefs
This stops exposing some additional preferences that are NPAPI-only.
2026-03-06 09:44:41 +01:00
Moonchild abc435f18e Merge pull request 'Futureproof ParseDate Whitespace' (#2979) from RealityRipple/UXP:alt-space into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2979
2026-03-06 08:38:44 +00:00
Andy 2e6dab8672 Support Unicode White Spaces in ParseDate() 2026-03-05 17:32:10 -08:00
Moonchild e0b95b12da Merge pull request 'Implement ES2018 Proxy ownKeys duplicate-key invariant and update affected conformance tests.' (#2977) from Basilisk-Dev/UXP-contrib:es2018-proxy-updates into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2977
2026-03-04 17:19:08 +00:00
Basilisk-Dev 722ecd0d97 Issue #2976 - Implement ES2018 Proxy ownKeys duplicate-key invariant and update affected conformance tests. 2026-03-04 10:37:58 -05:00
Moonchild e72cc38641 Issue #2879 - Remove obsolete crash reporter prefs. 2026-03-04 15:31:41 +01:00
Moonchild ae227b8743 Issue #2879 - Do not expose plugin-specific prefs if support isn't built.
- Puts prefs behind conditional defines
- Removes obsolete plugin finder pref
- Removes obsolete unrestricted xpconnect plugin pref
2026-03-04 14:54:13 +01:00
Moonchild a268e57967 Merge pull request 'Issue #2957 - make WeakRefObject finalize on main thread (no background finalize)' (#2973) from Basilisk-Dev/UXP-contrib:weakref-crash into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2973
2026-03-04 11:11:57 +00:00
Moonchild 9f05dad78c Merge pull request 'Fix clang builds on 32-bit ARM Linux.' (#2972) from dbsoft/UXP:clang-arm-linux into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2972
2026-03-04 11:10:57 +00:00
Basilisk-Dev ba0112d574 Issue #2957 - make WeakRefObject finalize on main thread (no background finalize) 2026-03-02 00:01:39 -05:00
Moonchild 5b449bc031 Merge pull request 'Issue #2551 - toSorted followup to be 100% ECMA compliant' (#2971) from Basilisk-Dev/UXP-contrib:toSortedSpec into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2971
2026-03-01 21:54:23 +00:00
Basilisk-Dev b823c130c1 Issue #2551 - toSorted followup to be 100% ECMA compliant 2026-03-01 16:33:09 -05:00
Moonchild 437d9da605 Merge pull request 'Implement ES2023 array.Prototype.toReversed()' (#2970) from Basilisk-Dev/UXP-contrib:toReversed into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2970
2026-03-01 19:07:21 +00:00
Basilisk-Dev f49a57006f Issue #2551 - Implement ES2023 array.Prototype.toReversed() 2026-02-28 16:34:04 -05:00
Brian Smith 18096194f5 No Issue - Fix clang builds on 32-bit ARM Linux.
The clang integrated assembler can't handle these files.
2026-02-28 11:45:35 +00:00
Job Bautista 8ca0f22841 Issue #2903 - Follow-up: Make types consistent with method used.
Fixes inconsistent use of XML_Error, uint32_t and int32_t.
2026-02-27 18:48:06 +01:00
Brian Smith b4e9888d91 No Issue - Handle special cases for MacOS system fonts.
Work done by Jazzzny based on the following bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=1321031
https://bugzilla.mozilla.org/show_bug.cgi?id=1349308
Example page:
http://codepen.io/dangayle/pen/RpMVqY
2026-02-26 19:14:46 -06:00
Moonchild 30b01396b4 Merge pull request 'Update libtheora to 1.2.0' (#2966) from jobbautista9/UXP:theora-1.2.0 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2966
2026-02-26 21:29:17 +00:00
Moonchild 9343129fbb Merge pull request 'Follow up to address libvpx issues on older MacOS and PowerPC platforms.' (#2969) from dbsoft/UXP:libvpx-mac-fixes into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2969
2026-02-26 20:34:19 +00:00
Moonchild e79ddda9de No issue - Fix build issue.
Unified build deprot on some targets causing issues with the recently
added `mozilla:KnownNotNull` without this header.
2026-02-26 20:15:45 +01:00
Moonchild f84c92881d [parser] Account for some corner-case structural document issues. 2026-02-26 09:48:23 +01:00
Moonchild aeafa7fef8 [MFBT] Reduce size() calls in subspan. 2026-02-26 08:21:45 +01:00
Moonchild ff3db332fe [libjar] Throw when we know a file was truncated. 2026-02-26 07:51:57 +01:00
Brian Smith 68d53612af Issue #2925 - Follow-up: Fix Mac Intel and PowerPC 10.5-10.11 builds.
clock_gettime() is not available prior to 10.12, so use Mach's clock_get_time().
pthread_setname_np() is not available prior to MacOS 10.6, so guard that.
libvpx does not support big endian, so only use VPX acceleration on ppc64le.
2026-02-25 23:35:33 -06:00
Moonchild 0fb9b4abbf [WebAudio] Gracefully handle mid-stream audio changes. 2026-02-26 00:03:19 +01:00
Moonchild ab442f72b9 Merge pull request 'Issue #2925 followup 2 - Restore previous GlobalFree behavior from before SCTP upgrade in sctp_bsd_addr.c' (#2968) from Basilisk-Dev/UXP-contrib:sctp-followup-2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2968
2026-02-25 19:49:05 +00:00
Moonchild b85d16b615 [WebRTC] Ensure valid image size.
Extremely small encoded image sizes should be considered corrupt data.
Drive-by improvement: make sure to cast the encoded image data length
to uint32_t for use with `CreateEmptyFrame`
2026-02-25 20:01:52 +01:00
Moonchild cc7d9550bc No issue - Modernize nsWindowWatcher
Get rid of old hacky conditional code and use weak references.
2026-02-25 18:48:56 +01:00
Basilisk-Dev bc2d2edbef Issue #2925 followup 2 - Restore previous GlobalFree behavior from before SCTP upgrade in sctp_bsd_addr.c 2026-02-25 12:29:13 -05:00
Moonchild bc5c6c7563 [WASM] Make sure to assign module 2026-02-25 17:13:33 +01:00
Moonchild 0d971f0c5a [WASM] Improve WasmModuleObject handling in WasmJS.cpp 2026-02-25 16:45:20 +01:00
Moonchild 99d225ae7f Merge pull request 'Issue #2925 followup - Fix intermittent Windows crashes after SCTP upgrade' (#2967) from Basilisk-Dev/UXP-contrib:2925-sctp-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2967
2026-02-25 13:59:07 +00:00
Moonchild 4bb7951324 No issue - Don't assign non-live hash table entry.
The problem here is that we use move assignment on a hash table entry that
is not live. Although all entries are constructed by
`HashTable::createTable`, they may subsequently be destroyed by
`HashTableEntry::destroyStoredT()`.

Therefore it is not safe to call any methods on a non live entry.
This causes a problem for GC barrier wrappers which assume that the object
state is valid (and presumably anything that does more than just write the
assigned data into memory).

The fix is to construct a new entry in-place.

Based on work by Jon Coppeard <jcoppeard@mozilla.com> in Bug 2009608
2026-02-25 14:53:42 +01:00
Basilisk-Dev 20c29f74b4 Issue #2925 followup - Fix intermittent Windows crashes after SCTP upgrade 2026-02-25 08:30:18 -05:00
Job Bautista d9a4414ef0 Issue #2965 - Update libtheora to 1.2.0. 2026-02-25 20:55:00 +08:00
Moonchild 56be1ceaef Merge branch 'master' of https://repo.palemoon.org/MoonchildProductions/UXP 2026-02-24 20:28:44 +01:00
Moonchild fd0ddefa03 Merge pull request 'Issue #2925 - Uprade libvpx to 1.16.0' (#2963) from Basilisk-Dev/UXP-contrib:libvpx-upgrade into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2963
2026-02-24 19:27:39 +00:00
Brad Werth 00e3d12e1d [gfx] Use gzip stream total_out for SVG document parsing.
With this change, the assert is no longer necessary, because the stream
tells us how many elements to process.
2026-02-24 19:15:41 +01:00
Basilisk-Dev 3a81d02c0f Issue #2925 - Fix Windows x64 2026-02-24 09:34:18 -05:00
Basilisk-Dev 5fbb929250 Issue #2925 - Work around x86 bug in libvpx 2026-02-24 09:33:16 -05:00
Moonchild 4cb28647fe Merge pull request 'Text Cluster Optimization' (#2962) from RealityRipple/UXP:better-grapheme into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2962
2026-02-24 09:45:51 +00:00
Basilisk-Dev 002240592a Issue #2925 - Upgrade libvpx to 1.16.0 2026-02-23 16:10:38 -05:00
Andy 8f95d938d5 Optimize ClusterIterator::Next
This is based on BZ 1820504, which notes that running `GetEmojiPresentation()` before checking `prevWasZwj` adds load time to all text, as opposed to more efficiently making `prevWasZwj` the precursor to categorizing the character.
The original patch uses an enum for `baseIsEmojiStatus`; I figured I'd simplify things with numeric values (0 = unset, 1 = yes, 2 = no).
2026-02-23 11:02:02 -08:00
Moonchild c66294c51a Merge pull request 'Issue #2925 - Upgrade usrsctp library to latest version' (#2948) from Basilisk-Dev/UXP-contrib:sctp-upgrade into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2948
2026-02-22 15:50:40 +00:00
Moonchild abc96cf444 No issue - Fix cairo warnings
This fixes warning spew because warnings are thrown in case of mixed use
of cairo_status_t and cairo_int_status_t, which is a hack in cairo
because C99 doesn't support real enums (it's mapped to uint8 internally).
The "register" storage type is no longer a thing in C++17, which would
also warn; just letting the compiler decide is best, so just removing
the keyword is the proper solution in cairoint.h
2026-02-22 14:20:37 +01:00
Moonchild a3019dddc1 Merge pull request 'Implement HTMLFormElement.requestSubmit(element)' (#2956) from 2955 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2956
2026-02-22 09:46:55 +00:00
Moonchild bd03f965a3 Issue #186 - Follow-up: Remove AIX references from moz.build.
This should not be kept around because AIX is not a valid OS_TARGET.
2026-02-22 07:06:12 +01:00
Moonchild 358d39d4bf Merge pull request 'Remove remaining AIX specific code' (#2960) from 186 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2960
2026-02-22 05:59:51 +00:00
Moonchild 77571794a3 Merge pull request 'Remove iOS support' (#2959) from 190 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2959
2026-02-22 05:58:29 +00:00
Jeremy Andrews a935ef810c Issue #186 - Remove AIX references from moz.build.
This should not be kept around because AIX is not a valid OS_TARGET and I've seen mach fail at least once because of these. Meant to clean them up years ago.
2026-02-21 15:43:48 -06:00
Moonchild eb731d1377 Issue #186 - Remove various AIX leftovers in 1st party code. 2026-02-21 21:30:08 +01:00
Moonchild c275325fbf Issue #186 - Remove an ancient workaround for AIX.
This was missed before in a rather typical "do it 3/4 of the way" fashion.
2026-02-21 21:11:38 +01:00
Moonchild 84da3d4817 Issue #190 - Fix incorrectly applied patch.
For some reason the rebase removed the endif in the wrong place...
2026-02-21 19:23:42 +01:00
Jeremy Andrews c868ea1f58 Issue #190 - Remove MOZ_IOS conditional code and ios.m4 2026-02-21 18:58:35 +01:00
Jeremy Andrews d5e385dc73 Issue #190 - Remove UIKit conditional code. 2026-02-21 18:55:44 +01:00
Moonchild d49758ace1 Issue #2955 - Implement form.requestSubmit(element) 2026-02-20 09:57:46 +01:00
Moonchild f3ee6e294f Merge pull request 'Ensure decoding the first frame of a video always succeeds' (#2954) from jobbautista9/UXP:mFirstFrameTime into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2954
Reviewed-by: Moonchild <moonchild@palemoon.org>
2026-02-19 16:54:03 +00:00
Job Bautista dea96fe9d3 Issue #2949 - Part 2 Follow-up: Check if first frame has been decoded for software fallback.
Now that we can check if the first frame has been decoded thanks to Issue #2953
we should ensure that the first frame actually has not been decoded before
checking if the media errored out.
2026-02-20 00:23:31 +08:00
Job Bautista 29a5e8df12 Issue #2953 - Part 4: Don't attempt to skip to next keyframe if there are none.
Demuxers don't typically return an error when they don't have a future
keyframe, they return infinity.
2026-02-20 00:23:27 +08:00
Job Bautista 51941fd085 Issue #2953 - Part 3: Assert that no error can occur while an internal seek is pending.
An internal seek occurs when we've reached a data gap, EOS or a previous error got skipped.

During this time, the decoder has been either flushed or shut down.
2026-02-20 00:23:21 +08:00
Job Bautista 64ea5dd93a Issue #2953 - Part 2: Don't attempt to continue decoding if no next keyframe.
When we have no future keyframe and an error occurred, we can't skip over
anything and we shouldn't try to simply decode the next video frame; so we
abort early.
2026-02-20 00:23:15 +08:00
Job Bautista a42d420ee5 Issue #2953 - Part 1: Attempt to decode the first frame again if error occurred. 2026-02-20 00:23:00 +08:00
Basilisk-Dev 060995dfff Issue #2925 - Incorporate FreeBSD patch from dbsoft after usrsctp upgrade 2026-02-19 07:46:37 -05:00
Moonchild 991bd7b460 Merge pull request 'Update libjxl to 0.11.2 for security fixes and spot fix for Big Endian issue.' (#2951) from dbsoft/UXP:jxl-updates into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2951
2026-02-19 12:00:19 +00:00
Moonchild db503078d0 Merge pull request 'Allow fallback to software decoding when WMF VP9 hardware decoding fails' (#2950) from jobbautista9/UXP:wmf-vp9-blank-hwa-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2950
2026-02-19 08:42:52 +00:00
Job Bautista 8ee58d2591 Issue #2949 - Part 4: Don't attempt to use WMF VP9 decoder for profiles 1 and 3.
The Windows VP9 hardware decoder currently does not support anything else than
profiles 0 and 2 (YUV420) and return garbage when decoding.

We error on those streams allowing to fall back on the ffvp9 software decoder.
2026-02-19 14:31:47 +08:00
Job Bautista c340a1dcd2 Issue #2949 - Part 3: Add method to read a VP9 profile from a VP9 bitstream
We haven't moved BitReader out of stagefright yet (BZ 1417011), but the reader
there works.
2026-02-19 14:27:10 +08:00
Job Bautista 774a6aa4dd Issue #2949 - Part 2: When hardware decoding fails, fall back to software
Unlike the original patch we don't have the infrastructure provided by Mozilla
BZ 1363668 yet to determine if we've decoded the first frame. This is not
required for checking whether we've errored out on hardware decoding though.
2026-02-19 14:22:39 +08:00
Job Bautista b2566429fc Issue #2949 - Part 1: Add option to disable hardware decoding. 2026-02-19 14:20:23 +08:00
Basilisk-Dev f66bcb4f23 Issue #2925 - Upgrade usrsctp library to latest version 2026-02-18 18:34:59 -05:00
Brian Smith 0e7430735e Issue #2697 & #2051 - Follow-up: Spot fix a JPEG-XL big endian issue.
Rewrote the patch from the main branch because it requires newer Highway versions.
Original patch needs Highway Endian and ARM64 MulOdd() Vec128<int32_t> support.
2026-02-18 17:08:33 -06:00
Brian Smith 905c7e8785 Issue #2697 - Follow-up: Update libjxl to 0.11.2 for security updates.
Fix tile dimension in low memory rendering pipeline.
CVE-2025-12474 - https://www.cve.org/cverecord?id=CVE-2025-12474
Fix number of channels for gray-to-gray color transform.
CVE-2026-1837 - https://www.cve.org/cverecord?id=CVE-2026-1837
And one security fix without a CVE.
2026-02-18 15:33:19 -06:00
Moonchild 9d91a43142 Merge pull request 'Fix WMF hardware decoding for VP9 and enable it by default' (#2947) from jobbautista9/UXP:wmf-vp9-videomft-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2947
2026-02-17 08:23:02 +00:00
Job Bautista 53bac56f36 Issue #2946 - Enable WMF VP9 decoder by default. 2026-02-17 16:07:14 +08:00
Job Bautista e85fff2f10 Issue #2946 - Override sample duration if unknown.
Based on Mozilla bug 1371290's part 2.

The VP9 decoder doesn't properly set the sample duration, leading to all
samples being marked as having a zero duration. The compositor drops those
frames incorrectly.
2026-02-17 16:03:44 +08:00
Moonchild 839236c912 Merge pull request 'Manual Tibetan Word Wrap' (#2945) from RealityRipple/UXP:tibetan-wrap into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2945
Reviewed-by: Moonchild <moonchild@palemoon.org>
2026-02-17 07:57:34 +00:00
Moonchild 1e3fddbe14 Merge pull request 'Add Special Lithuanian Casing' (#2943) from RealityRipple/UXP:lithuanian-1322992 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2943
2026-02-17 07:56:04 +00:00
Andy b5576d1485 Remove Android from Mozilla Import 2026-02-16 14:55:34 -08:00
Andy 524b466197 Nit: Drop clang-format 2026-02-16 14:49:47 -08:00
Moonchild 7d1b245754 Merge pull request 'CLDR Pluralities' (#2944) from RealityRipple/UXP:plural-forms into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2944
Reviewed-by: Moonchild <moonchild@palemoon.org>
2026-02-16 22:31:37 +00:00
Andy 64a0846a1c Add Manual Tibetan Line Breaking
https://bugzilla.mozilla.org/show_bug.cgi?id=1647377
and
https://bugzilla.mozilla.org/show_bug.cgi?id=1736393
2026-02-16 12:57:03 -08:00
Andy 118bd414d4 Add Special Lithuanian Casing
https://bugzilla.mozilla.org/show_bug.cgi?id=1322992
2026-02-16 11:10:31 -08:00
Andy 3f319c5f29 Update CLDR Plural Forms
Move Macedonian to 15 - https://bugzilla.mozilla.org/show_bug.cgi?id=1415906
Add Shuar (17) - https://bugzilla.mozilla.org/show_bug.cgi?id=1396724
Add Welsh (18) - https://bugzilla.mozilla.org/show_bug.cgi?id=1428366
Add Slavic (19) - https://bugzilla.mozilla.org/show_bug.cgi?id=1533435
2026-02-16 00:58:32 -08:00
Jazzzny 8b06eaa8fc Issue #2051 - Follow-up: Reverse filter channel order on big-endian. 2026-02-15 17:58:31 +01:00
Moonchild e62bd7c533 Merge pull request 'Fix for runtime problems with Pale Moon and others on FreeBSD 15.' (#2942) from dbsoft/UXP:freebsd15-rpath-fix3 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2942
2026-02-14 19:58:49 +00:00
Brian Smith 0839a82f80 Issue Pale-Moon#2009 - Add $ORIGIN to the runtime path on FreeBSD.
Following what we do on Solaris, add $ORIGIN using MOZ_FIX_LINK_PATHS.
Also change the mode to copy from symbolic links so it finds the libs.
2026-02-14 11:40:45 -06:00
Moonchild 4cbaf927d9 Bump goanna version 2026-02-14 12:14:29 +01:00
Moonchild b4f364c385 Merge pull request 'Issue #2229 - Fix assertions in top-level await on x86_64' (#2941) from Basilisk-Dev/UXP-contrib:2229-x86-assert-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2941
2026-02-13 14:50:21 +00:00
Basilisk-Dev 6ede629146 Issue #2229 - Fix assertions in top-level await on x86_64 2026-02-13 09:06:59 -05:00
Moonchild c684599599 Merge pull request 'Restore MacOS 10.6 32-bit support, WebRTC support on 10.5 and other (Snow) Leopard fixes.' (#2940) from dbsoft/UXP:mac-leopard-fixes2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2940
2026-02-13 11:15:22 +00:00
Moonchild c9bfd79ae0 Merge pull request 'Issue #2229 - Fix debug builds when visiting pages that utilize top-level await' (#2939) from Basilisk-Dev/UXP-contrib:2229-fix-debug into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2939
2026-02-12 19:52:44 +00:00
Basilisk-Dev 6d3f71d200 Issue #2229 - Fix debug builds when visiting pages that utilize top-level await
Fix JSOP_AWAIT stack modeling for top‑level await in modules.
Ensure yield/await offsets are emitted for TLA scripts.
Allow interpreter prologue for resumed TLA module frames.
Fix MediaQueryList invariant for onchange handler.
2026-02-12 14:38:25 -05:00
Brian Smith 620e391be7 Issue #1829 - Follow-up Part 8: Add a pref to enable the resize grip/thumb.
MacOS prior to Lion 10.7 had an area in the bottom right of the window used for resizing.
With the resize indicator enabled, a grip or thumb is drawn in the corner over the contents.
This may or may not be desirable based on the application. So this preference allows the
application to choose the default which the user can override in about:config using the pref:
ui.mouse.resize_grip
2026-02-11 23:58:12 -06:00
Brian Smith 532a1355ce Issue #1829 - Follow-up Part 7: Restore support for scrollbar arrows on Leopard and Snow Leopard. 2026-02-11 18:02:20 -06:00
Brian Smith 03367d9c41 Issue #2051 - Follow-up Part 3: Fix ycbcr display issues on Big Endian. 2026-02-11 15:35:55 -06:00
Brian Smith 6ebd205c8e Issue #1829 - Follow-up Part 6: Fix font recursion problems on Leopard and Snow Leopard. 2026-02-11 15:35:55 -06:00
Brian Smith 7276ea00a7 Issue #1829 - Follow-up Part 5b: Remove Radeon X1000 from the block list.
This is reported working.
2026-02-11 15:35:55 -06:00
Brian Smith 7a5c56bc58 Issue #1829 - Follow-up Part 5a: Add Getforce FX to the MacOS block list. 2026-02-11 15:35:55 -06:00
Brian Smith 9e064c7045 Issue #1829 - Follow-up Part 5: Update driver blocklist handling for Leopard.
Disable WebGL on 10.5.
2026-02-11 15:35:55 -06:00
Brian Smith 6933bfe783 Issue #1829 - Follow-up Part 4: Restore draw in titlebar support for Leopard. 2026-02-11 15:35:55 -06:00
Brian Smith 5e81fb065a Issue #1829 - Follow-up Part 3: Restore WebRTC support for Leopard.
Restore QTKit based video capture for 10.5 which does not have AVFoundation.
Add -fpermissive to CXXFLAGS in the build system for Mac 32-bit PowerPC.
This works around a type issue with Atomic32 and AtomicWord.
These two types should be interchangeable.
2026-02-11 15:35:54 -06:00
Brian Smith f08b4276ea Issue #1829 - Follow-up Part 2: Restore 32-bit Intel Mac builds.
Add ffvpx configuration for 32-bit Intel Mac.
Replace PPC checks with 10.5 or 10.6 checks.
2026-02-11 15:11:10 -06:00
Brian Smith 45d7dda330 Issue #1829 - Follow-up Part 1: Restore MacOS 10.6 support.
Also update Leopard and Snow Leopard scrollbar handling.
Fixes menu icon scaling.
Hide the resize thumb on Leopard and Snow Leopard so it looks the same as Lion.
Fixes from Jazzzny.
2026-02-11 15:11:10 -06:00
Moonchild a8f1878ff3 Merge pull request 'Issue #2229 Followup - Handle re-entrant module instantiation/evaluation during async module loads' (#2938) from Basilisk-Dev/UXP-contrib:2229-top-level-await-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2938
2026-02-11 16:30:22 +00:00
Basilisk-Dev d0ec80aa86 Issue #2229 Followup - Handle re-entrant module instantiation/evaluation during async module loads 2026-02-11 09:46:46 -05:00
Moonchild a9257dea7d Merge pull request 'Implement pointer and hover @media queries' (#2935) from pointer-hover-mediaqueries into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2935
2026-02-10 21:19:31 +00:00
Moonchild af5d12a154 Merge pull request 'Implement top level await functionality' (#2937) from Basilisk-Dev/UXP-contrib:2229-top-level-await into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2937
2026-02-10 21:17:11 +00:00
Basilisk-Dev fb4ebd7838 Issue #2229 - Add top level await tests 2026-02-10 14:59:26 -05:00
Basilisk-Dev 7ace23060a Issue #2229 - Add comment regarding JIT to top level await code 2026-02-10 14:59:26 -05:00
Basilisk-Dev 19504eed91 Issue #2229 - add better comments on top level await code 2026-02-10 14:59:26 -05:00
Basilisk-Dev 7c72b41e2c Issue #2229 - Initial implementation of top level await functionality 2026-02-10 14:59:04 -05:00
Moonchild 6fc971d8c0 Issue #2909 - Fix build issues when targeting Windows 7.
Despite Windows 7 supporting Tablet Mode and screen orientation just fine
(I had a Win 7 tablet PC back when), Microsoft decided that starting with
the Windows SDK 10.0.22621.0, the enum and types for auto-rotation should
no longer be defined, so we have to define them ourselves.
2026-02-07 13:27:39 +01:00
Moonchild a410f9e553 Issue #2909 - Base implementation of media interaction features.
This implements `hover`, `pointer`, `any-hover` and `any-pointer` and
the values `course`/`fine` (pointer) and `hover`.
A best effort is made to get capabilities from the system but if unknown
always falls back to assuming a mouse is present.
2026-02-07 13:24:34 +01:00
Moonchild a00f48f894 Merge pull request 'Solve imgLoader crashes' (#2929) from imgLoader-crash-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2929
2026-02-07 08:31:08 +00:00
Moonchild 699d64c8f3 Merge pull request 'Ensure that CancelAndForgetObserver removes itself from the cache validator' (#2933) from mittorn/UXP:2932 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2933
2026-02-07 08:00:05 +00:00
mittorn c6bc9d5a8c Issue #2932 - Ensure that imgRequestProxy::CancelAndForgetObserver removes itself from the cache validator
https://hg-edge.mozilla.org/releases/mozilla-beta/rev/af82d0c33427
2026-02-06 23:14:54 +00:00
Moonchild e96431e1c1 Merge pull request 'Issue #2551 Part 1 - Implement ES2023 array.prototype.toSorted()' (#2931) from Basilisk-Dev/UXP-contrib:array-to-sorted into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2931
Reviewed-by: Moonchild <moonchild@palemoon.org>
2026-02-06 14:20:36 +00:00
Basilisk-Dev 773aa9dcc3 Issue #2551 - comment toSorted implementation 2026-02-06 06:54:54 -05:00
Moonchild 998086ca31 No Issue - Remove redundant OS check for toolkit/fonts
This is already guarded by MOZ_BUNDLED_FONTS one level higher and blocks
--enable-bundled-fonts from working on other OSes
2026-02-06 10:44:03 +01:00
Basilisk-Dev 7abbbc6cf4 Issue #2551 - Add toSorted test and do some final tweaks to toSorted to be compliant 2026-02-05 10:33:42 -05:00
Basilisk-Dev 1873f5df88 Issue #2551 - Ensure toSorted is 100% spec compliant per multiple tests 2026-02-05 09:53:39 -05:00
Moonchild f39980b4c7 Issue #2928 - Add extra checks to nsExpirationTracker.
Turn some asserts into early exits and add sanity checks.
Also check main thread access for the fake mutex and report.
2026-02-05 13:44:21 +01:00
Basilisk-Dev 40ac200988 Issue #2551 - Initial attempt at toSorted implementation 2026-02-04 09:55:14 -05:00
Moonchild 4344b62a3a Issue #2928 - Improve imgLoader cache queue handling.
- Convert the imgCacheQueue to nsTArray from Vector
- Avoid marking the queue dirty when element operations are performed
that don't upset the sort order. This should improve performance as well.
2026-02-04 09:40:22 +01:00
Moonchild 3267ae2ef7 Issue #2928 - Avoid searching the image cache queue for an entry after we just popped it off the queue. 2026-02-04 09:07:23 +01:00
Moonchild 1eb24b9f9c Issue #2928 - Always refresh dirty queue. 2026-02-03 10:17:19 +01:00
Moonchild a9e11bdca7 Issue #2928 - Re-order imgLoader::RemoveFromCache
Remove from tracker first before removing from cache, and if the cache
queue is dirty, refresh it (causes a re-heap) before manipulating further.
2026-02-03 08:51:06 +01:00
Moonchild 02fb8a4ca3 Issue #2928 - Check mCacheQueue size before removing entries.
Resolves #2928
2026-02-03 08:10:37 +01:00
Moonchild d62f6b37bf Revert "Issue #2928 - Check mCacheQueue size before removing entries."
This reverts commit aaae14d111.
2026-02-03 07:52:14 +01:00
Moonchild aaae14d111 Issue #2928 - Check mCacheQueue size before removing entries.
Resolves #2928
2026-02-02 18:43:28 +01:00
Moonchild 672c153d73 No issue - Enable performance observers by default in the platform.
Performance observers have shown to be stable in daily use, so we should
enable this by default. Any applications building on UXP can decide for
themselves whether to explicitly enable or disable this API.
2026-02-01 19:26:11 +01:00
Basilisk-Dev a1a2a6f9ce Issue #2403 - Implement SubmitEvent functionality (#2919)
# Summary

Added SubmitEvent support (constructor, submitter attribute) and wired form submit events to produce SubmitEvent instances.

Implemented SubmitEvent DOM class, WebIDL, and build hooks.

Added a test file (logs to console).

# Notes

Form submissions already carry the originating control in `InternalFormEvent::mOriginator`, so `SubmitEvent.submitter` can be populated directly from the existing event data without invasive changes to form submission logic.

`EventDispatcher` now returns `SubmitEvent` specifically for `eFormSubmit`, keeping other form events (e.g., reset) unchanged.

`event.submitter` is set for user-initiated submits via the originating submit control.

`new SubmitEvent("submit", { submitter })` returns the provided submitter (or `null` if omitted).

# Ways to test
Go to repo.palemoon.org. You will no longer see the message `This browser doesn't have "SubmitEvent" support, use a tricky method to polyfill` in the console. The site will work as expected without loading this polyfill anymore.

Go to GitHub. You will now be able to mark notifications as read.

Open the test file submitted in this PR. You will see the results of the test in the browser console.

Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2919
Co-authored-by: Basilisk-Dev <basiliskdev@protonmail.com>
Co-committed-by: Basilisk-Dev <basiliskdev@protonmail.com>
2026-01-29 00:40:09 +00:00
Moonchild 006caf963a Merge pull request 'More fixes for MacOS 10.5 and PowerPC' (#2907) from WolfReiser/UXP:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2907
2026-01-28 22:35:33 +00:00
Moonchild b314539aa8 Merge pull request 'Issue #2351 - Fix WebRTC video encode/decode on MacOS/Linux/Windows' (#2920) from Basilisk-Dev/UXP-contrib:webrtc-fix-video into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2920
2026-01-28 22:32:54 +00:00
Moonchild aac26aa7fa Merge pull request 'Return Standard Space to Formatted Times with Day Periods' (#2921) from RealityRipple/UXP:space-time into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2921
2026-01-28 22:24:32 +00:00
Andy aefe484468 Whitespace Compatibility for ICU 72+
ICU replaced the space prefixing the period with a narrow, non-breaking space, and occasionally, a thin space.
Until the rest of the world's scripts are ready to support this new convention, we un-replace these two whitespace characters with spaces again, but only in formatted dates and times.
This is not an ideal solution, as it could be possible that a custom format using one or both of these characters may be requested intentionally elsewhere in the string, but for now, this appears to be what other browsers do, so we're at least in parity with their edge case behavior.
2026-01-28 13:49:42 -08:00
Basilisk-Dev f9b633adcd MoonchildProductions/UXP#2351 - Fix webrtc for Windows and Linux based on MacOS fix 2026-01-28 09:15:19 -05:00
Basilisk-Dev a5f3d76fda MoonchildProductions/UXP#2351 - Fix webrtc video encoding on macos 2026-01-28 00:58:06 -05:00
Moonchild 2098629f2d Issue #2895 - Follow-up: Fix whitespace. (no code changes)
The Xoroshgiro128++ MFBT header file was initially committed with CRLF.
2026-01-27 11:45:55 +01:00
Moonchild c67dc90bb8 Issue #2895 - Implement 32-bit compatible Xoroshiro128++
This puts in a reduced-register version of Xoroshiro128++ which /just/
fits in our x86 7-register space by making use of an extra mState to
temporarily store the result to be passed back.

Resolves #2895
2026-01-27 11:43:43 +01:00
Moonchild 69945a779c Merge pull request 'Update eventPtr/eventEndPtr for XML_ParseBuffer' (#2918) from FranklinDM/UXP-contrib:work_expat-2_7_3-xmlparse-fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2918
2026-01-27 07:28:31 +00:00
Francis Dominic Fajardo f8de26bf0c Issue #2889 - Follow-up: Add patch for XML_ParseBuffer. 2026-01-26 23:43:21 +08:00
Francis Dominic Fajardo 603cc43e14 Issue #2889 - Follow-up: Update eventPtr/eventEndPtr for XML_ParseBuffer 2026-01-26 23:43:21 +08:00
Moonchild 4b4d734897 Merge pull request 'Restore the ability to set a default log level when using MOZ_LOG' (#2917) from FranklinDM/UXP-contrib:work_log-restore-default-log-level-support into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2917
2026-01-26 12:14:40 +00:00
Moonchild cb629d38aa Merge pull request 'Issue #2911 - Add optional mimalloc allocator support (build-time)' (#2910) from Basilisk-Dev/UXP-mimalloc:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2910
2026-01-26 12:14:04 +00:00
Francis Dominic Fajardo 07b05ebc21 Issue #2916 - Restore the ability to set a default log level when using MOZ_LOG 2026-01-26 19:04:37 +08:00
Moonchild 6debbcd228 Merge pull request 'Follow-up: Simplify rule node tracking and ensure rule walker state isn't reset for the first child processor' (#2915) from FranklinDM/UXP-contrib:work_css-simplify-rn-tracking-no-reset into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2915
2026-01-25 10:30:32 +00:00
Francis Dominic Fajardo 6258c24c8c Issue #2828 - Follow-up: Simplify rule node tracking and ensure rule walker state isn't reset for the first child processor
Styles contained in NAC shouldn't be tracked with their own rule node (as opposed to what was done in https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2859) because it causes precedence issues. This should now more closely imitate the original behavior where NAC and regular document styles (at least, the "unlayered" layer) are grouped together.

This also gets rid of the manual last rule node checks against null, since they are now consistently handled by the separate function.
2026-01-25 16:49:55 +08:00
Moonchild b5a5ea161a Issue #2895 - Follow-up: adjust jit on 32-bit platforms to use Xorshift
The jit assembly implementation of Xoroshiro128++ on 64-bit platforms is
unsuitable for 32-bit because it requires more registers than our jit
can reasonably provide (7 usable/8 total), causing run-time issues.
As a workaround for this, this commit splits the jit version of PRNG up
into Xorshift128+ for 32-bit targets and Xoroshiro128++ everywhere else.
The C++ version in MFBT remains Xoroshiro128++ on all platforms.

While not ideal, the PRNG on 32-bit will still be suitably performant and
with small enough deviations for all practical purposes in Math.random()
in JavaScript. Since this is a PRNG, there are no concerns about
reproducibility of results, only proper statistical distribution of values.

Also some drive-by corrections to comments in MFBT:
- Incorrect statement that the period is 2^256-1. It is 2^128-1
- More readable comments by using standard operator characters for power.

Resolves #2895 (again)
2026-01-24 14:50:57 +01:00
Moonchild 1462612e3c Issue #2914 - Explicitly allow mixed content websockets on localhost.
This carves out an exception for hard-coded loopback addresses to allow
`ws:` connections from `https:` to allow mixed-mode from secure pages.

Resolves #2914
2026-01-23 23:09:58 +01:00
Basilisk-Dev 75d0cedb1a Incorporate patch by dbsoft to fix mimalloc build on freebsd 2026-01-21 16:41:08 -05:00
Basilisk-Dev f660e617a3 Fix issues with Windows segfaulting when building with mimalloc 2026-01-19 00:15:52 -05:00
Basilisk-Dev a454e08683 Define MI_WIN_NOREDIRECT on Windows to avoid linker error 2026-01-16 22:08:13 -05:00
Basilisk-Dev 5bbc63d590 Update mimalloc readme 2026-01-16 22:06:14 -05:00
Basilisk-Dev b514d09a14 Fix segfaults when running with mimalloc on Linux 2026-01-16 16:42:19 -05:00
Basilisk-Dev d828b69cd1 Fix building mimalloc in Linux 2026-01-16 14:40:22 -05:00
Basilisk-Dev 067ec2edd4 Add mimalloc as optional allocator
Vendors mimalloc sources and adds --enable-mimalloc as a mutually exclusive alternative to jemalloc, wiring it through mozalloc/mozglue and build config.
2026-01-16 11:42:28 -05:00
Sergey Larin 01719ee5c5 Fix crash in nsContainerFrame::GetChildLists on 32-bit Big Endian platforms
Happens when going into fullscreen when playing a video.
There is a conflict between reinterpret_cast and memcpy
when using uint64_t as a storage. When memcpy'ing a pointer
into uint64_t value, and then reinterpret_cast'ing it back
on Big Endian, you'll get a null pointer value because
pointer was stored in top uint64_t bits, and reinterpret_cast
works on lower bits. Fix makes ReinterpretHelper public -
this is not a good practice to make implementation detail
accessible, but ForEach is already bad anyway providing raw
uint64_t value to the user. I don't think that
std::visit-like interface is possible because there's no
direct link between property and parameter stored. Also
upstream Firefox has this bug too.
2026-01-16 12:37:45 +02:00
Sergey Larin 5e4e7df657 Fix assertion failure in audiounit_close_stream on PPC MacOS
Happens when audiostream is destroyed, i.e. when sound
playback stops. This is because stm->mutex should be locked,
as this is checked inside audiounit_close_stream.
2026-01-16 12:37:42 +02:00
Sergey Larin 0c1671073e Fix crash in trackingAreaView on MacOS 10.5
Happens on exit when deallocating trackingAreaView.
Possibly after playing a video.
Fix from Mozilla upstream:
https://phabricator.services.mozilla.com/D212949
https://bugzilla.mozilla.org/show_bug.cgi?id=1880582
2026-01-16 12:37:40 +02:00
Sergey Larin 3a42d26c36 Use CoreGraphics backend on Big Endian MacOS 2026-01-16 12:37:20 +02:00
Moonchild fb1a7e64b5 [gfx] Add some additional sanity checks to cairo surface creation. 2026-01-15 11:20:10 +01:00
Moonchild fa7638a731 [XPCOM] Add hashkey helper classes for future use.
These aren't currently used but will be good to have in case we need them
for future porting from Mozilla.
2026-01-15 10:27:53 +01:00
Moonchild d9228b5517 Merge pull request 'MacOS PowerPC Support Fixes' (#2905) from dbsoft/UXP:macppc-fixes10 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2905
2026-01-14 22:04:29 +00:00
Moonchild b9e6492480 [NSS] Update NSS to 3.90.9 2026-01-14 22:30:19 +01:00
Moonchild 28e6fad462 [Auth] Only set GSS_C_DELEG_FLAG flag when we confirm server supports delegation. 2026-01-14 21:50:24 +01:00
Moonchild c2ae3266c2 [DOM] Check worker script size
Abort loading worker scripts if they are ridiculously huge.
2026-01-14 19:50:08 +01:00
Moonchild 195251fc12 [gfx] Fix typo in 9b52703451 2026-01-14 19:46:11 +01:00
Moonchild 9b52703451 [gfx] Use better types for cairo image surface manipulations. 2026-01-14 16:15:09 +01:00
Moonchild 84d42d8177 [gfx] Be more explicit when converting to cairo formats. 2026-01-14 15:01:37 +01:00
Brian Smith 5de43abff5 Issue #2051 - Follow-up Part 2j: Fix VPx rendering on Big Endian. 2026-01-13 22:30:11 -06:00
Moonchild 8112ed2e6c Issue #2895 - Follow-up: Fix JIT code generator for 32-bit targets.
Register64 isn't natively supported on 32-bit targets (ARM, MIPS32, x86)
so they require initializers with 2 32-bit register components.
Also, `rotateLeft64()` requires a temp register on 32-bit targets.
2026-01-13 20:24:41 +01:00
Brian Smith 25daa465a4 Issue #2051 - Follow-up Part 2i: Fix font problems with more TenFourFox code.
Add Phony Core Text header, and an old qcms function required by the older code.
Thank you Sergey Larin for doing this work.
2026-01-13 11:58:50 -06:00
Moonchild 4302ad6302 Merge pull request 'Remove Support for Gconf' (#2904) from trav90/UXP-contrib:remove-gconf into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2904
2026-01-13 13:49:28 +00:00
Brian Smith 9d1148e322 Issue #2051 - Follow-up Part 2h: Various MacPPC fixes.
Fix builing with optimization level 2 or higher.
Fix some mouse handling, in particular with the scollbars.
Fix keyboard input of normal characters. Thank you Sergey Larin.
2026-01-13 07:34:24 -06:00
Moonchild 42bb4f8ec8 Merge pull request 'Switch JavaScript PRNG to Xoroshiro128++' (#2901) from Xoroshiro128++ into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2901
2026-01-13 09:27:01 +00:00
Brian Smith bc4751b2e9 Issue #2051 - Follow-up Part 2g: Readd CoreGraphics support to native rendering.
This support was removed when SKIA was added, so it just bailed out.
Also add scrollbar drawing code from TenFourFox to support the old style.
2026-01-12 15:52:05 -06:00
Brian Smith 046b73ad98 Issue #2051 - Follow-up Part 2f: Miscellaneous fixes.
Fix compile issue with MacPorts GCC 14.
Fix null pointer dereference in OpenGL compositor.
Fix recurcursive font loading due to TenFourFox code drift.
Fix LazyScript size mismatch in debug builds.
Fix crash due to missing auto release pool in debug builds.
Fix keyboard input crash due to incorrect code disabling.
Fix mouse events never having button pressed state.
2026-01-12 15:52:04 -06:00
Brian Smith f12b423797 Issue #2051 & #2777 - Follow-up Part 3: Add MacOS PPC config.h file. 2026-01-12 15:52:03 -06:00
Brian Smith 81767f49a9 Issue #2051 - Follow-up Part 2e: Force fallback to raster with CoreGraphics. 2026-01-12 15:52:02 -06:00
Brian Smith cb7d1bff90 Issue #2051 - Follow-up Part 2d: Fix missing or misplaced #ifdefs.
Also handle missing modifierFlags selector on 10.5.
2026-01-12 15:52:01 -06:00
Brian Smith 65655a7ac6 Issue #2051 - Follow-up Part 2c: No IOSurface support on 10.5 so disable for PPC. 2026-01-12 15:52:00 -06:00
Brian Smith e61da23175 Issue #2051 - Follow-up Part 2b: Even more safety checks in the older font code. 2026-01-12 15:51:59 -06:00
Brian Smith 0065d53b4d Issue #2051 - Follow-up Part 2: Add additional safety checks in the older font code. 2026-01-12 15:51:58 -06:00
Brian Smith 179c73c90c Issue #2051 - Follow-up Part 1b: Fix building on later MacOS versions.
Clang complains about duplicate definition of GfxMatrixToCGAffineTransform().
CGFontGetGlyphPath() is non-public and removed in later MacOS versions.
CTFontCreatePathForGlyph() is the CoreText replacement in 10.5 and later.
2026-01-12 15:51:57 -06:00
Brian Smith 1653009fe5 Issue #2051 - Follow-up Part 1: Various fixes for Mac PowerPC support.
This commit gets Mac PowerPC to initialize and shows the menubar.
Hangs in font code before showing the window, but this is progress.
Remove workaround for a GCC structure packing bug, use fixed GCCs.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110044
Fix linking altivec code with some compiler versions.
Restore the old "CoreGraphics" GFX backend; SKIA unsupported 10.5.
https://bugzilla.mozilla.org/show_bug.cgi?id=1258751
Similarly restore code to display popups/panels with "CoreGraphics"
https://bugzilla.mozilla.org/show_bug.cgi?id=1274720
2026-01-12 15:51:56 -06:00
Moonchild 753dffd122 Merge branch 'master' into Xoroshiro128++ 2026-01-12 21:48:31 +01:00
Moonchild c05e5e4373 Merge pull request 'Properly vendor and update Expat to 2.7.3' (#2903) from jobbautista9/UXP:expat-2.7.3 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2903
2026-01-12 15:22:01 +00:00
trav90 93883d5823 Issue #1636 - Part 3 - Remove Gconf 2026-01-12 08:01:44 -06:00
Job Bautista a22613d3e0 Issue #2889 - Follow-up: Remove fix for BZ 569229.
Seems this workaround is no longer relevant for Expat 2.7.x, with upstream's
elimination of recursion.
2026-01-12 08:34:34 +08:00
Job Bautista 073378ec92 Issue #2889 - Follow-up: Adjust Expat 2.7.3 local patches for removal of 3rd patch. 2026-01-12 08:33:33 +08:00
Job Bautista a00c890a9d Merge branch 'expat-2.6.4' into expat-2.7.3 2026-01-12 08:31:49 +08:00
Job Bautista 8f57a215b5 Issue #2889 - Follow-up: Allow generate_hash_secret_salt to be used.
Part 1 erroneously imported the 3rd patch from Mozilla assuming that we're also
already generating our salt with XML_SetHashSalt in our nsExpatDriver. Turns out
this is not the case.
2026-01-12 07:53:34 +08:00
Moonchild 12821ae90a Issue #2895 - Part 1b: Update license block.
Adjust the BSD 2-clause license in `ExecutableAllocator.h` to reflect
multiple authors.
2026-01-11 21:24:53 +01:00
Job Bautista 112abdc25a Issue #2889 - Part 7: Apply patches to Expat 2.7.3. 2026-01-11 21:34:24 +08:00
Job Bautista 627fdf8fe4 Issue #2889 - Part 6: Import Expat 2.7.3 source. 2026-01-11 21:33:28 +08:00
Job Bautista 0f1faad9a3 Issue #2889 - Part 5: Rewrite patches for Expat 2.7.3.
- Skipped the fix for BZ 569229 because I don't know where to apply that; the
  processInternalEntity method no longer exists. Hopefully the bug doesn't re-
  appear.
- Previous fixes for 3rd and 13th patches have been merged to their respective
  patches as well.
- 15th patch is now a fix for the 13th and 14th since somewhere between 2.6.4
  and 2.7.3 has made use of a debugging method we don't want to use as well as
  a new boolean method called parserBusy which got mistakenly excluded as an
  unused API while rewriting the 14th patch.
2026-01-11 21:26:25 +08:00
Moonchild 66dbfca54a Issue #2895 - Part 3: Add manual test.
To visually verify random uniformity and make a quick check on performance.
2026-01-11 10:35:37 +01:00
Job Bautista 647a1ab5f0 Issue #2889 - Follow-up: void methods shouldn't return a value. 2026-01-11 16:10:10 +08:00
Job Bautista e284ffab6c Issue #2889 - Follow-up: Avoid conflicts with system version of libexpat 2026-01-11 16:04:00 +08:00
Job Bautista ef1532cab2 Issue #2889 - Part 4: Fix build and runtime issues.
- The 3rd patch causes MSVC to error out on an empty typedef struct.
- The 13th patch is causing the application to abort on startup.
- Fixed header issues as well as resolved the necessary symbols for gkmedias.
2026-01-11 15:07:33 +08:00
Job Bautista 2ae8833092 Issue #2889 - Part 3: Apply Mozilla's patches to Expat 2.6.4. 2026-01-11 14:47:35 +08:00
Job Bautista e7cacf4642 Issue #2889 - Part 2: Import Expat 2.6.4 source. 2026-01-11 14:47:18 +08:00
Job Bautista 6c7850482f Issue #2889 - Part 1: Prepare Mozilla's changes and extensions for Expat 2.6.4. 2026-01-11 13:47:55 +08:00
Job Bautista f93d0fadf2 Issue #2889 - Part 0: Relocate Mozilla-specific files from Expat source. 2026-01-11 11:40:13 +08:00
Moonchild 7ec3c640e7 Merge pull request 'Disable Gconf by default and always build gio with GTK' (#2900) from trav90/UXP-contrib:disable-gconf into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2900
2026-01-10 19:28:45 +00:00
Moonchild 97786271f9 Issue #2895 - Part 2: Remove incorrect debug asserts.
x86/x64 MacroAssembler front-end rotate functions had comparison asserts
that do not seem to be correct; values being the same doesn't mean the
same regs were used.
2026-01-10 15:37:34 +01:00
Moonchild c90df0c332 Issue #2895 - Part 1: Replace XorShift128+ with Xoroshiro128++
Surrounding structures remain the same because the bit width remains 128.
The more complicated algorithm requires more temp registers in LRandom
to account for intermediate result placeholders in the JITed version of
this algorithm.
2026-01-10 15:32:22 +01:00
trav90 f5a3099344 Issue #1636 - Part 2 - Disable Gconf by default 2026-01-09 10:31:53 -06:00
trav90 fe7ca5276f Issue #1636 - Part 1 - Decouple Gio from GConf and always build it with GTK
Also removes the ancient and unused --enable-gnomeui option.
2026-01-09 10:30:54 -06:00
Moonchild b439067975 Issue #2898 - Don't unroll to large stack probe loops.
Resolves #2898
2026-01-09 15:08:10 +01:00
Moonchild b2f2e54167 Merge pull request 'Implement Loongarch64 CPU Architecture Support' (#2899) from Basilisk-Dev/UXP-loongarch:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2899
2026-01-08 23:38:44 +00:00
Basilisk-Dev 55285b1c50 MoonchildProductions/UXP#2897: Undo mistakenly overwritten file in libavutil 2026-01-08 13:09:08 -05:00
Basilisk-Dev af96fc79e1 MoonchildProductions/UXP#2897: Import upstream libyuv fixes to fix Clang compilation on Loongarch64 2026-01-08 13:01:25 -05:00
Basilisk-Dev 1c9c79ef24 MoonchildProductions/UXP#2897: Modify webrtc to compile on loongarch64 2026-01-08 12:30:36 -05:00
Basilisk-Dev 741604f78d MoonchildProductions/UXP#2897: Specify 16k pagesize for loongarch64 in jemalloc 2026-01-08 11:49:17 -05:00
Basilisk-Dev 5cb08bb658 MoonchildProductions/UXP#2897: Added a loongarch atomic-ops implementation 2026-01-08 11:12:24 -05:00
Basilisk-Dev 969217dc2f MoonchildProductions/UXP#2897: backport upstream xptcinvoke and xptcstubs for Loongarch64 2026-01-08 10:27:45 -05:00
Basilisk-Dev fb438829b5 MoonchildProductions/UXP#2897: Fix ffvpx build on loongarch64 2026-01-07 17:49:32 -05:00
Basilisk-Dev d7c1f4a6b4 MoonchildProductions/UXP#2897: Add LA64 to webrtc build config 2026-01-07 14:46:33 -05:00
Basilisk-Dev e35267d62c MoonchildProductions/UXP#2897: Allow mfbt/double-conversion to compile on LA64 2026-01-07 14:46:15 -05:00
Basilisk-Dev 1779669120 MoonchildProductions/UXP#2897: Fix IPC to compile on LA64 2026-01-07 14:32:31 -05:00
Basilisk-Dev 97a4baf4bf MoonchildProductions/UXP#2897: Allow mach configure to pass on loongarch64 2026-01-07 14:22:05 -05:00
Moonchild 4aadf14fb0 Issue #2858 - keep type in line with definition.
Depending on target platform, `AddRef()` returns either `unsigned long` or
`uint32_t`. Make the resulting type match for better optimization.
2026-01-06 10:01:16 +01:00
Moonchild 64509fb557 Issue #2858 - Hack around the circular calls to nsPrincipal::Write()
This employs an ugly refcounting hack as a stop-gap measure. This isn't a
fix, but we avoid appcrashes in the meantime.
2026-01-05 23:44:11 +01:00
Moonchild 91c979623c Merge pull request 'Improve Extended_Pictographic Support in Clusters' (#2894) from RealityRipple/UXP:2871 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2894
2026-01-04 22:01:51 +00:00
Andy 95240de023 Issue #2871 - Addendum - Code Comments
https://www.unicode.org/reports/tr51/#Emoji_Properties_and_Data_Files
2026-01-04 13:54:15 -08:00
Andy 7f3970cc2d Issue #2871 - Restructure GetEmojiPresentation() for Extended_Pictographic clusters 2026-01-03 16:14:47 -08:00
Moonchild fa40bd3d05 Merge pull request 'Convert use of -moz-appearance to appearance in platform code' (#2892) from 2887 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2892
2026-01-02 19:24:06 +00:00
Moonchild 87ddc5d6bb Issue #2887 - Convert use of -moz-appearance to appearance 2026-01-02 19:46:40 +01:00
Moonchild d4fcc2899c Merge pull request 'Make clearing of passwords prefable, and disable by default.' (#2891) from 2856 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2891
2026-01-02 16:43:44 +00:00
Moonchild 95279d8e20 Issue #2856 - Make clearing of passwords prefable, and disable by default.
New pref to control clearing of domain passwords for "Forget about site"
privacy function.

Resolves #2856
2026-01-02 17:32:12 +01:00
Moonchild fc231d8c29 Merge pull request 'Leverage viewport-only logic to ensure overflow propagation.' (#2890) from 2853 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2890
2026-01-02 16:08:24 +00:00
Moonchild f8f288b1c6 Merge pull request 'Un-prefix -moz-appearance' (#2886) from unprefix-appearance into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2886
2026-01-02 16:08:03 +00:00
Moonchild f6b5a81bcf Merge pull request 'Minor CLDR Update Process Improvements' (#2888) from RealityRipple/UXP:auto-cldr into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2888
2025-12-30 15:22:46 +00:00
Moonchild 75cc3b1766 Issue #2853 - Leverage viewport-only logic to ensure overflow propagation.
Resolves #2853
2025-12-30 16:19:40 +01:00
Andy 2f4b425613 Sort replacements per language and per script to ensure the generated file has stable contents.
From BZ 1651032
2025-12-27 18:19:02 -08:00
Andy 97d35566cd Automatically determine current CLDR version when updating langtags.
From BZ 1642934
2025-12-27 18:05:54 -08:00
Moonchild ee673e2a51 Issue #1791 - Part 3: Add manual test for unprefixed appearance. 2025-12-25 16:27:41 +01:00
Moonchild a66233d638 Issue #1791 - Part 2: Stop force-styling checkboxes/radio buttons.
Unclear why this was done. Let websites choose their own style overrides
if they want to, in combination with `appearance: none`
2025-12-25 16:27:41 +01:00
Moonchild a208d718cf Issue #1791 - Part 1: Un-prefix -moz-appearance
Keep an alias (preffed) `-moz-appearance` for `appearance`
This should keep all previous behaviour intact.
2025-12-25 16:27:40 +01:00
Moonchild 9dae73cd9d Merge pull request 'Allow build on NetBSD/alpha' (#2885) from nia/UXP:alpha into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2885
2025-12-24 11:48:52 +00:00
nia fac94604c4 ffvpx: Add pregenerated config for Alpha. 2025-12-24 12:39:24 +01:00
Moonchild c64aa83a09 Issue #2857 - Implement inset-block and inset-inline CSS shorthand
Resolves #2857
2025-12-23 11:09:23 +01:00
Moonchild 55db23f665 Merge pull request 'Emoji 17.0 Support' (#2884) from RealityRipple/UXP:emoji-17.0 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2884
2025-12-22 18:03:44 +00:00
Andy 6d7da863a9 emoji-17.0 - Update Twemoji font to unicode 17.0.0 2025-12-22 09:50:51 -08:00
Moonchild a559de3cc6 Merge pull request 'Update ICU to v78.1' (#2878) from RealityRipple/UXP:icu-78 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2878
2025-12-22 14:22:41 +00:00
nia f48fc9774d Teach mozbuild that Alpha is 64-bit. 2025-12-22 00:41:21 +01:00
Andy 0d1a0a4460 Issue #2863 - Part 25 - Clobber 2025-12-20 01:41:20 -08:00
Andy 48310b0921 Issue #2863 - Part 24 - Remove special-casing for Etc/UCT
From BZ 1543641 Part 3
2025-12-20 01:07:52 -08:00
Andy 5a6008ba14 Issue #2863 - Part 23 - Update tzdata in Spidermonkey 2025-12-20 01:07:24 -08:00
Andy 19832cc0dd Issue #2863 - Part 22 - Update tzdata source to 2025c 2025-12-20 01:05:17 -08:00
Andy 70cb6fad3b Issue #2863 - Part 21 - Update Unicode property data in Gecko 2025-12-20 01:01:45 -08:00
Andy 1c12932f17 Issue #2863 - Part 20 - Update special casing in Gecko 2025-12-20 00:57:03 -08:00
Andy b8073ff355 Issue #2863 - Part 19 - Update CLDR to 48 2025-12-20 00:54:46 -08:00
Andy ad45885155 Issue #2863 - Part 18 - Update Unicode in Spidermonkey 2025-12-20 00:51:31 -08:00
Andy 7a3da8cc91 Issue #2863 - Part 17 - Update ICU source to 78.1 2025-12-20 00:43:40 -08:00
Andy c88f57529b Issue #2863 - Part 16 - Update locale canonicalization algorithm for changes from CLDR 39
From BZ 1718198
2025-12-19 02:18:04 -08:00
Andy e140607d40 Issue #2863 - Part 15 - Update special casing script 2025-12-19 02:17:50 -08:00
Andy c7d76b16e1 Issue #2863 - Part 14 - Update switch to handle new UNumberFormatFields entries. 2025-12-19 02:17:39 -08:00
Andy 42bd942380 Issue #2863 - Part 13 - Remove non-IANA Zones
Adapted from BZ 1673027
2025-12-19 02:17:32 -08:00
Andy b3f7187493 Issue #2863 - Part 12 - Filter SCRIPT_CODE extensions from CLDR 2025-12-19 02:17:26 -08:00
Andy 1e4d492d18 Issue #2863 - Part 11 - Remove no longer needed locale maximization when removing likely subtags.
Adapted from BZ 1686052 Part 9
2025-12-19 02:16:37 -08:00
Andy 186f1531c7 Issue #2863 - Part 10 - Add New Line Breaker Entries 2025-12-19 02:16:21 -08:00
Andy 513fc2034b Issue #2863 - Part 9 - Retain util_props.cpp 2025-12-19 02:16:11 -08:00
Andy b126de3dcd Issue #2863 - Part 8 - Add note to run make_intl_data.py langtags 2025-12-19 02:16:04 -08:00
Andy 6aad65b27a Issue #2863 - Part 7 - Don't delete files now that they're filtered 2025-12-19 02:15:49 -08:00
Andy 7ac730f424 Issue #2863 - Part 6 - Make ICU with multiple jobs for faster rebuilds.
Adapted from BZ 1533481
2025-12-19 02:15:37 -08:00
Andy 1c6748286c Issue #2863 - Part 5 - Update reading source objects
Adapted from BZ 1645779
2025-12-19 02:15:23 -08:00
Andy a3fea2c220 Issue #2863 - Part 4 - Use recommended ICU build options flags.
Adapted from BZ 1429776 and 1672353.
2025-12-19 02:15:05 -08:00
Andy 99691ee61a Issue #2863 - Part 3 - Patch in non-dll suppression
This is stupid, but more specific than a broad silencing directive.
2025-12-19 02:14:42 -08:00
Andy 44e1b7c01b Issue #2863 - Part 2 - Filter ICU data for build 2025-12-19 02:14:01 -08:00
Andy db4b354d9b Issue #2863 - Part 1 - Update patches for ICU 78.1 2025-12-19 02:13:38 -08:00
Moonchild 105d703629 Merge pull request 'Issue MoonchildProductions/UXP#2306: Implement WeakRef functionality' (#2881) from Basilisk-Dev/UXP-weakref:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2881
2025-12-19 08:51:44 +00:00
Basilisk-Dev 6ce83ee1f0 Issue MoonchildProductions/UXP#2306: Add test js 2025-12-18 21:13:06 -05:00
Basilisk-Dev d4c1ffda76 Issue MoonchildProductions/UXP#2306: Remove unneeded addition of streams_ in ContextOptions() 2025-12-17 18:40:39 -05:00
Basilisk-Dev 0ec21adf21 Issue MoonchildProductions/UXP#2306: Fix spacing 2025-12-17 16:56:25 -05:00
Basilisk-Dev 7533c4ede0 Issue MoonchildProductions/UXP#2306: Add pref-gated WeakRef with safe stub when disabled
* Add javascript.options.weakrefs and plumb it through context options, XPConnect, and workers
* Keep referents alive via strong tracing when the pref is off so deref() still returns the target
* Retain weak-edge semantics when the pref is enabled
2025-12-17 16:35:41 -05:00
Basilisk-Dev 0dc7782727 Issue MoonchildProductions/UXP#2306: Implement WeakRef functionality 2025-12-16 22:43:47 -05:00
Moonchild a17b54921c Merge pull request 'Issue Pale-Moon#2002 - Remove FreeBSD compat13x dependency on 15.x.' (#2880) from dbsoft/UXP:freebsd15fix into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2880
2025-12-16 20:50:42 +00:00
Moonchild 7dddd4282b Issue #2865 - Implement URL.canParse()
Implemented URL.canParse() static function for checking if a URL can be
parsed (instead of having to try wrap the constructor).

This avoids using an ErrorResult/Throws, since it is not in the spec,
and this makes it also more performant.

See https://github.com/whatwg/url/pull/763

Resolves #2865
2025-12-16 12:23:45 +01:00
Brian Smith 4a4ddda621 Issue Pale-Moon#2002 - Remove FreeBSD compat13x dependency on 15.x.
Remove the 2 libutil OS_LIBS and dynamically load libutil.so instead.
2025-12-16 01:26:00 -06:00
Moonchild 74398ca61c Update NSS version to 3.90.8 2025-12-15 20:32:01 +01:00
Moonchild 02abee0980 [NSS] Destroy certificate on error paths 2025-12-15 19:54:00 +01:00
Moonchild e518f846b3 [image] Use the TriggeringPrincipal if we have one, not the SystemPrincipal 2025-12-15 18:00:45 +01:00
Moonchild 0ec89257db [devtools] Further improve "Copy as cURL"
Don't escape unicode control characters. While these characters would
break commands if present (i.e. non functional cURL) and could potentially
be sanitized to spaces, that would likely just move the goalposts again.
Following Mozilla here.
2025-12-15 17:21:18 +01:00
Moonchild e2ddc59a8e [DOM] Add stride check for canvas tex conversion from blob. 2025-12-15 17:01:29 +01:00
Moonchild 0552fa9353 [js] Append InstSize factor for secondary range veneers.
Ensure branch padding is correct on ARM64/M*SoC
2025-12-15 16:26:33 +01:00
Moonchild d7ae6c9f06 [devtools] Further improve "Copy as cURL"
Collapse whitespaces.
2025-12-15 16:00:02 +01:00
Moonchild 0c1afdf111 Merge pull request 'Remove obsolete mention of DRM content playback in about:rights' (#2877) from jobbautista9/UXP:aboutrights-removedrm into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2877
2025-12-11 12:00:59 +00:00
Moonchild ccedf2d3cf Merge pull request 'Restore support for in-process NPAPI plugins in non-GTK3' (#2875) from jobbautista9/UXP:npapi-inprocess into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2875
2025-12-11 11:57:34 +00:00
Job Bautista ce7e4b4369 Issue #2876 - Remove obsolete mention of DRM content playback in about:rights
We've removed EME code in Issue #2346; UXP applications will never download
content decryption modules on their own.
2025-12-11 15:31:17 +08:00
Job Bautista 59ed319449 Issue #2861 - Part 2 Follow-up: nsIPluginHost.isPluginOOP should not always return true.
Actually restore the method as it was when it was added in Mozilla bug 1178896.
2025-12-10 11:08:59 +08:00
Job Bautista 37a95044bc Issue #2861 - Bring back forced OOPP for GTK3.
Per discussion in PR #2875 our NPAPI implementation doesn't support plugins
using GTK3 anyway so there's no point in keeping this footgun for a GTK3 setup.
2025-12-09 11:16:19 +08:00
Job Bautista 0e3a84fc2d Issue #2875 - Ensure OOP for plugins by default even if pref couldn't be found. 2025-12-09 10:56:42 +08:00
Moonchild 45efa06dc8 Merge pull request 'Don't let toolkit override colors of autofilled form elements.' (#2874) from jobbautista9/UXP:autofill-styling into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2874
2025-12-08 13:58:33 +00:00
Job Bautista af2315d588 Issue #2861 - Remove Mac-specific ifdefs.
macOS should now use the "dom.ipc.plugins.enabled" pref, like every other OS.
2025-12-07 20:24:06 +08:00
Job Bautista c3c0d6f8c3 Issue #2875 - Cleanup: Remove leading whitespace in nsPluginHost.cpp. 2025-12-06 20:20:55 +08:00
Job Bautista 1100ea5eba Issue #2861 - Remove checks that forcibly enable or disable OOP.
The pref should not be conditional on which plugin or GTK version is in use. If
Windows users want Flash in-process, or GTK3 users want in-process plugins, we
should let them. If it breaks, they at least have half a browser.

While at it the checks for accessibility hardware support have also been taken
out, because they're only relevant for Flash anyway. Being able to disable OOP
should not depend on whether you use a11y.
2025-12-06 16:53:38 +08:00
Job Bautista eda712503e Issue #2861 - Part 2: Restore nsIPluginHost.isPluginOOP.
This effectively reverts Part B of Mozilla bug 1194780.
2025-12-06 15:01:28 +08:00
Job Bautista b4743e3a3a Issue #2861 - Part 1: Allow nsNPAPIPlugin::RunPluginOOP to be made false.
This effectively reverts Part A of Mozilla bug 1194780.
2025-12-06 14:58:39 +08:00
Job Bautista da8387e80a Issue #2873 - Don't let toolkit override colors of autofilled form elements.
Currently there's no way for the toolkit's overrides to be removed by users and
websites. In the case of Issue #2872 our current colors also harshly clash with
the usual dark mode of webpages.

It's best to let them write their own CSS targetting the :autofill psuedo-class
of form elements if they want the indication.

This effectively makes Issue #2790 only implement :autofill and nothing else.
2025-12-05 13:05:36 +08:00
Moonchild 905b050aa1 Merge pull request 'ffvpx: sparc64: Fix for generated config.h' (#2870) from nia/UXP:ffvpx-sparc64 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2870
2025-11-23 10:42:35 +00:00
nia 349be237d7 ffvpx: sparc64: Fix for generated config.h
Turns out UXP needs an extra define which ffmpeg7 isn't
providing.

Signed-off-by: Nia Alarie <nia@NetBSD.org>
2025-11-23 11:32:23 +01:00
Moonchild b4fbbdc29a Issue #2869 - Make Purple Buffer additions check if cell is tenured.
This should avoid a CTD if `cell` is not tenured by moving this check to
CC instead of having it fatally fail at marking grey.

Resolves #2869
2025-11-22 17:46:36 +01:00
Moonchild 87bbdc0acd Merge pull request 'ffvpx: Add generated config for sparc64' (#2868) from nia/UXP:ffvpx-sparc64 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2868
2025-11-22 12:05:19 +00:00
nia 670b251652 ffvpx: Add generated config for sparc64
Related to #2584, but should work just as well on Solaris

Signed-off-by: Nia Alarie <nia@NetBSD.org>
2025-11-22 12:41:31 +01:00
Moonchild 49f4dad4fa Issue #2489 - Re-implement color-mix implementation with fixes.
This includes a hack to avoid fatal recursion when either color resolves
to NS_COLOR_CURRENTCOLOR, avoiding #2854

Resolves #2489
2025-10-27 23:08:41 +01:00
Moonchild da7dff0437 Issue #2847 - Update tests and toolkit CSS to account for windows-win11 2025-10-25 17:46:17 +02:00
Moonchild 2c321e2baf Issue #2847 - Extend -moz-os-version media query with win11. (re-land) 2025-10-25 15:53:23 +02:00
Moonchild 8b9323b330 [devtools] Remove newline kludge from "Copy as cURL" on Windows 2025-10-14 21:06:33 +02:00
Moonchild 94959894ba Merge pull request 'Fix rule node tracking for NAC' (#2859) from FranklinDM/UXP-contrib:work_css-fix-rn-tracking-for-nac into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2859
2025-10-14 07:53:10 +00:00
Francis Dominic Fajardo 3e88d97cbd Issue #2855 - Fix rule node tracking for NAC
This refactors rule node tracking code into an inline function and uses that for rules from NAC.
2025-10-11 19:20:38 +08:00
Moonchild 75a1d79076 Issue #2489 - Revert color-mix implementation
Resolves #2854
2025-10-02 21:19:54 +02:00
Moonchild fe301ae7ff No issue - Improve compiler compatibility.
Include <limits> in a few places.
2025-10-02 19:39:09 +02:00
Moonchild 4c53908cd2 No issue - Set title for about:logopage
See forum topic 32784
2025-10-01 18:22:45 +02:00
Moonchild b19387b292 Issue #2258 - Make sure we favor sniffing when the content-type header is empty. 2025-09-24 10:32:50 +02:00
Moonchild 206afa0642 Revert "Issue #2258 - Part 1: Support XCTO:nosniff when navigating."
This reverts commit f48c770701.
2025-09-23 18:17:52 +02:00
Moonchild 32be60a48f Revert "Issue #2258 - Part 2: Move XCTO:nosniff check into sniffers."
This reverts commit 51e1650d42.
2025-09-23 18:17:45 +02:00
Moonchild fd232c1468 Revert "Issue #2258 - Part 3: Allow sniffing with XCTO:nosniff + empty MIME type."
This reverts commit a56f978f70.
2025-09-23 18:17:39 +02:00
Moonchild bd475e1a66 Revert "Issue #2258 - Part 4: Clean up unused pointers."
This reverts commit 9e52953e54.
2025-09-23 18:17:33 +02:00
Moonchild 2ae979cdc7 Issue #2790 - Follow-up: Ensure both text and background are set.
The common issue of needing to set both foreground and background for dark
themes.
2025-09-19 21:03:13 +02:00
8561 changed files with 4623237 additions and 517459 deletions

No files matched your search

+1 -1
View File
@@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Clobber for CSS rule processor refactoring
Clobber for libvpx changes
+17 -8
View File
@@ -6,7 +6,7 @@
#include "Platform.h"
#include "nsIAccessibleEvent.h"
#include "nsIGConfService.h"
#include "nsIGSettingsService.h"
#include "nsIServiceManager.h"
#include "nsMai.h"
#include "AtkSocketAccessible.h"
@@ -360,13 +360,22 @@ dbus_done:
return sShouldEnable;
#endif
//check gconf-2 setting
#define GCONF_A11Y_KEY "/desktop/gnome/interface/accessibility"
nsresult rv = NS_OK;
nsCOMPtr<nsIGConfService> gconf =
do_GetService(NS_GCONFSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv) && gconf)
gconf->GetBool(NS_LITERAL_CSTRING(GCONF_A11Y_KEY), &sShouldEnable);
// check GSettings
#define GSETINGS_A11Y_INTERFACE "org.gnome.desktop.interface"
#define GSETINGS_A11Y_KEY "toolkit-accessibility"
nsCOMPtr<nsIGSettingsService> gsettings =
do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
nsCOMPtr<nsIGSettingsCollection> a11y_settings;
if (gsettings) {
gsettings->GetCollectionForSchema(NS_LITERAL_CSTRING(GSETINGS_A11Y_INTERFACE),
getter_AddRefs(a11y_settings));
if (a11y_settings) {
a11y_settings->GetBoolean(NS_LITERAL_CSTRING(GSETINGS_A11Y_KEY),
&sShouldEnable);
}
}
return sShouldEnable;
}
+3
View File
@@ -982,6 +982,9 @@ EOF
k1om:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
loongarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
+3
View File
@@ -375,6 +375,9 @@ def split_triplet(triplet):
elif cpu.startswith('aarch64'):
canonical_cpu = 'aarch64'
endianness = 'little'
elif cpu.startswith('loongarch64'):
canonical_cpu = 'loongarch64'
endianness = 'little'
else:
die('Unknown CPU type: %s' % cpu)
+34 -2
View File
@@ -11,9 +11,14 @@ def moz_jemalloc4(value):
option('--enable-jemalloc', env='MOZ_MEMORY',
help='Replace system memory allocator with jemalloc')
option('--enable-mimalloc',
help='Replace system memory allocator with mimalloc')
@depends('--enable-jemalloc', target, build_project, c_compiler)
def jemalloc(value, target, build_project, c_compiler):
@depends('--enable-jemalloc', '--enable-mimalloc', target, build_project,
c_compiler)
def jemalloc(value, mimalloc, target, build_project, c_compiler):
if value and mimalloc:
die('--enable-jemalloc and --enable-mimalloc cannot be used together')
if value.origin != 'default':
return bool(value) or None
@@ -30,11 +35,38 @@ def jemalloc(value, target, build_project, c_compiler):
if target.kernel == 'Linux':
return True
@depends('--enable-mimalloc', '--enable-jemalloc', target)
def mimalloc(value, jemalloc, target):
if value and jemalloc:
die('--enable-jemalloc and --enable-mimalloc cannot be used together')
if value.origin != 'default':
if not value:
return None
if target.kernel not in ('Darwin', 'WINNT', 'Linux', 'kFreeBSD', 'FreeBSD',
'NetBSD', 'OpenBSD', 'DragonFly'):
die('--enable-mimalloc is not supported on %s', target.kernel)
return True
@depends('--enable-mimalloc', '--enable-jemalloc')
def mimalloc_requires_disable(mimalloc, jemalloc):
if not mimalloc:
return
if jemalloc or jemalloc.origin not in ('command-line', 'mozconfig'):
die('--enable-mimalloc requires --disable-jemalloc to be passed explicitly')
set_config('MOZ_MEMORY', jemalloc)
set_define('MOZ_MEMORY', jemalloc)
add_old_configure_assignment('MOZ_MEMORY', jemalloc)
@depends(mimalloc)
def mimalloc_config(mimalloc):
return True if mimalloc else False
set_config('MOZ_MIMALLOC', mimalloc_config)
set_define('MOZ_MIMALLOC', mimalloc)
add_old_configure_assignment('MOZ_MIMALLOC', mimalloc_config)
# Because --enable-jemalloc doesn't use a default because of the dependency
# on the target, we can't use a js_option for it to propagate to js/src
-4
View File
@@ -127,7 +127,6 @@ def old_configure_options(*options):
'--enable-alsa',
'--enable-appcompat-guid',
'--enable-av1',
'--enable-jxl',
'--enable-b2g-bt',
'--enable-b2g-camera',
'--enable-b2g-ril',
@@ -153,10 +152,7 @@ def old_configure_options(*options):
'--enable-faststripe',
'--enable-feeds',
'--enable-gamepad',
'--enable-gconf',
'--enable-gczeal',
'--enable-gio',
'--enable-gnomeui',
'--enable-gold',
'--enable-hardware-aec-ns',
'--enable-icf',
+12
View File
@@ -464,6 +464,18 @@ nsPrincipal::Write(nsIObjectOutputStream* aStream)
rv = aStream->WriteStringZ(suffix.get());
NS_ENSURE_SUCCESS(rv, rv);
// This is an ugly hack to prevent re-entrancy calls into nsPrincipal::Write()
// because of repeat CSP processing.
// We refcount the context and if found 3+ refcounts on the same, skip writing
// the mCSP compound object.
// TODO: figure out exactly why this happens and fix the root cause.
nsCSPContext* CSPContext = static_cast<nsCSPContext*>(mCSP.get());
if(CSPContext) {
auto CSPDepth = CSPContext->AddRef();
CSPContext->Release();
if(CSPDepth > 2) return NS_OK;
}
rv = NS_WriteOptionalCompoundObject(aStream, mCSP,
NS_GET_IID(nsIContentSecurityPolicy),
true);
+20 -1
View File
@@ -18,20 +18,30 @@ sources = [
'/intl/icu/source/common/dictionarydata.cpp',
'/intl/icu/source/common/dtintrv.cpp',
'/intl/icu/source/common/edits.cpp',
'/intl/icu/source/common/emojiprops.cpp',
'/intl/icu/source/common/errorcode.cpp',
'/intl/icu/source/common/filteredbrk.cpp',
'/intl/icu/source/common/filterednormalizer2.cpp',
'/intl/icu/source/common/fixedstring.cpp',
'/intl/icu/source/common/loadednormalizer2impl.cpp',
'/intl/icu/source/common/localebuilder.cpp',
'/intl/icu/source/common/localematcher.cpp',
'/intl/icu/source/common/localeprioritylist.cpp',
'/intl/icu/source/common/locavailable.cpp',
'/intl/icu/source/common/locbased.cpp',
'/intl/icu/source/common/locdispnames.cpp',
'/intl/icu/source/common/locdistance.cpp',
'/intl/icu/source/common/locdspnm.cpp',
'/intl/icu/source/common/locid.cpp',
'/intl/icu/source/common/loclikely.cpp',
'/intl/icu/source/common/loclikelysubtags.cpp',
'/intl/icu/source/common/locmap.cpp',
'/intl/icu/source/common/locresdata.cpp',
'/intl/icu/source/common/locutil.cpp',
'/intl/icu/source/common/lsr.cpp',
'/intl/icu/source/common/lstmbe.cpp',
'/intl/icu/source/common/messagepattern.cpp',
'/intl/icu/source/common/mlbe.cpp',
'/intl/icu/source/common/normalizer2.cpp',
'/intl/icu/source/common/normalizer2impl.cpp',
'/intl/icu/source/common/normlzr.cpp',
@@ -51,6 +61,7 @@ sources = [
'/intl/icu/source/common/rbbitblb.cpp',
'/intl/icu/source/common/resbund.cpp',
'/intl/icu/source/common/resource.cpp',
'/intl/icu/source/common/restrace.cpp',
'/intl/icu/source/common/ruleiter.cpp',
'/intl/icu/source/common/schriter.cpp',
'/intl/icu/source/common/serv.cpp',
@@ -110,6 +121,8 @@ sources = [
'/intl/icu/source/common/uloc.cpp',
'/intl/icu/source/common/uloc_keytype.cpp',
'/intl/icu/source/common/uloc_tag.cpp',
'/intl/icu/source/common/ulocale.cpp',
'/intl/icu/source/common/ulocbuilder.cpp',
'/intl/icu/source/common/umapfile.cpp',
'/intl/icu/source/common/umath.cpp',
'/intl/icu/source/common/umutablecptrie.cpp',
@@ -151,6 +164,7 @@ sources = [
'/intl/icu/source/common/utext.cpp',
'/intl/icu/source/common/utf_impl.cpp',
'/intl/icu/source/common/util.cpp',
'/intl/icu/source/common/util_props.cpp',
'/intl/icu/source/common/utrace.cpp',
'/intl/icu/source/common/utrie.cpp',
'/intl/icu/source/common/utrie2.cpp',
@@ -190,7 +204,6 @@ other_sources = [
'/intl/icu/source/common/usc_impl.cpp',
'/intl/icu/source/common/ushape.cpp',
'/intl/icu/source/common/ustr_wcs.cpp',
'/intl/icu/source/common/util_props.cpp',
]
EXPORTS.unicode += [
'/intl/icu/source/common/unicode/appendable.h',
@@ -212,6 +225,8 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/icudataver.h',
'/intl/icu/source/common/unicode/icuplug.h',
'/intl/icu/source/common/unicode/idna.h',
'/intl/icu/source/common/unicode/localebuilder.h',
'/intl/icu/source/common/unicode/localematcher.h',
'/intl/icu/source/common/unicode/localpointer.h',
'/intl/icu/source/common/unicode/locdspnm.h',
'/intl/icu/source/common/unicode/locid.h',
@@ -259,6 +274,8 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/uiter.h',
'/intl/icu/source/common/unicode/uldnames.h',
'/intl/icu/source/common/unicode/uloc.h',
'/intl/icu/source/common/unicode/ulocale.h',
'/intl/icu/source/common/unicode/ulocbuilder.h',
'/intl/icu/source/common/unicode/umachine.h',
'/intl/icu/source/common/unicode/umisc.h',
'/intl/icu/source/common/unicode/umutablecptrie.h',
@@ -286,6 +303,8 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/utf32.h',
'/intl/icu/source/common/unicode/utf8.h',
'/intl/icu/source/common/unicode/utf_old.h',
'/intl/icu/source/common/unicode/utfiterator.h',
'/intl/icu/source/common/unicode/utfstring.h',
'/intl/icu/source/common/unicode/utrace.h',
'/intl/icu/source/common/unicode/utypes.h',
'/intl/icu/source/common/unicode/uvernum.h',
+22
View File
@@ -3,12 +3,15 @@
# 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/.
# Also see <http://www.icu-project.org/repos/icu/tags/latest/icu4c/readme.html#RecBuild> for the
# recommended build options when compiling ICU.
DEFINES.update(
# Don't use icu namespace automatically in client code.
U_USING_ICU_NAMESPACE = 0,
# Don't include obsolete header files.
U_NO_DEFAULT_INCLUDE_UTF_HEADERS = 1,
U_HIDE_OBSOLETE_UTF_OLD_H = 1,
# Remove chunks of the library that we don't need (yet).
UCONFIG_NO_LEGACY_CONVERSION = True,
@@ -17,6 +20,13 @@ DEFINES.update(
# We don't need to pass data to and from legacy char* APIs.
U_CHARSET_IS_UTF8 = True,
# Add 'explicit' keyword to UnicodeString constructors.
UNISTR_FROM_CHAR_EXPLICIT = 'explicit',
UNISTR_FROM_STRING_EXPLICIT = 'explicit',
# Disable dynamic loading of ICU data as a loadable library.
U_ENABLE_DYLOAD = 0,
)
if not CONFIG['HAVE_LANGINFO_CODESET']:
@@ -38,12 +48,24 @@ ALLOW_COMPILER_WARNINGS = True
# warnings that get triggered for every file.
if CONFIG['CLANG_CL']:
CFLAGS += [
'-Wno-c++20-compat',
'-Wno-comma',
'-Wno-implicit-const-int-float-conversion',
'-Wno-macro-redefined',
'-Wno-microsoft-include',
'-Wno-tautological-unsigned-enum-zero-compare',
'-Wno-unreachable-code-loop-increment',
'-Wno-unreachable-code-return',
]
CXXFLAGS += [
'-Wno-c++20-compat',
'-Wno-comma',
'-Wno-implicit-const-int-float-conversion',
'-Wno-macro-redefined',
'-Wno-microsoft-include',
'-Wno-tautological-unsigned-enum-zero-compare',
'-Wno-unreachable-code-loop-increment',
'-Wno-unreachable-code-return',
]
if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']:
+47 -5
View File
@@ -42,13 +42,14 @@ sources = [
'/intl/icu/source/i18n/decContext.cpp',
'/intl/icu/source/i18n/decimfmt.cpp',
'/intl/icu/source/i18n/decNumber.cpp',
'/intl/icu/source/i18n/displayoptions.cpp',
'/intl/icu/source/i18n/double-conversion-bignum-dtoa.cpp',
'/intl/icu/source/i18n/double-conversion-bignum.cpp',
'/intl/icu/source/i18n/double-conversion-cached-powers.cpp',
'/intl/icu/source/i18n/double-conversion-diy-fp.cpp',
'/intl/icu/source/i18n/double-conversion-double-to-string.cpp',
'/intl/icu/source/i18n/double-conversion-fast-dtoa.cpp',
'/intl/icu/source/i18n/double-conversion-string-to-double.cpp',
'/intl/icu/source/i18n/double-conversion-strtod.cpp',
'/intl/icu/source/i18n/double-conversion.cpp',
'/intl/icu/source/i18n/dtfmtsym.cpp',
'/intl/icu/source/i18n/dtitvfmt.cpp',
'/intl/icu/source/i18n/dtitvinf.cpp',
@@ -58,6 +59,10 @@ sources = [
'/intl/icu/source/i18n/ethpccal.cpp',
'/intl/icu/source/i18n/fmtable.cpp',
'/intl/icu/source/i18n/format.cpp',
'/intl/icu/source/i18n/formatted_string_builder.cpp',
'/intl/icu/source/i18n/formattedval_iterimpl.cpp',
'/intl/icu/source/i18n/formattedval_sbimpl.cpp',
'/intl/icu/source/i18n/formattedvalue.cpp',
'/intl/icu/source/i18n/fphdlimp.cpp',
'/intl/icu/source/i18n/fpositer.cpp',
'/intl/icu/source/i18n/gregocal.cpp',
@@ -65,16 +70,28 @@ sources = [
'/intl/icu/source/i18n/hebrwcal.cpp',
'/intl/icu/source/i18n/indiancal.cpp',
'/intl/icu/source/i18n/islamcal.cpp',
'/intl/icu/source/i18n/iso8601cal.cpp',
'/intl/icu/source/i18n/japancal.cpp',
'/intl/icu/source/i18n/listformatter.cpp',
'/intl/icu/source/i18n/measfmt.cpp',
'/intl/icu/source/i18n/measunit.cpp',
'/intl/icu/source/i18n/measunit_extra.cpp',
'/intl/icu/source/i18n/measure.cpp',
'/intl/icu/source/i18n/messageformat2.cpp',
'/intl/icu/source/i18n/messageformat2_arguments.cpp',
'/intl/icu/source/i18n/messageformat2_checker.cpp',
'/intl/icu/source/i18n/messageformat2_data_model.cpp',
'/intl/icu/source/i18n/messageformat2_errors.cpp',
'/intl/icu/source/i18n/messageformat2_evaluation.cpp',
'/intl/icu/source/i18n/messageformat2_formattable.cpp',
'/intl/icu/source/i18n/messageformat2_formatter.cpp',
'/intl/icu/source/i18n/messageformat2_function_registry.cpp',
'/intl/icu/source/i18n/messageformat2_parser.cpp',
'/intl/icu/source/i18n/messageformat2_serializer.cpp',
'/intl/icu/source/i18n/msgfmt.cpp',
'/intl/icu/source/i18n/nfrs.cpp',
'/intl/icu/source/i18n/nfrule.cpp',
'/intl/icu/source/i18n/nfsubs.cpp',
'/intl/icu/source/i18n/nounit.cpp',
'/intl/icu/source/i18n/number_affixutils.cpp',
'/intl/icu/source/i18n/number_asformat.cpp',
'/intl/icu/source/i18n/number_capi.cpp',
@@ -91,13 +108,16 @@ sources = [
'/intl/icu/source/i18n/number_modifiers.cpp',
'/intl/icu/source/i18n/number_multiplier.cpp',
'/intl/icu/source/i18n/number_notation.cpp',
'/intl/icu/source/i18n/number_output.cpp',
'/intl/icu/source/i18n/number_padding.cpp',
'/intl/icu/source/i18n/number_patternmodifier.cpp',
'/intl/icu/source/i18n/number_patternstring.cpp',
'/intl/icu/source/i18n/number_rounding.cpp',
'/intl/icu/source/i18n/number_scientific.cpp',
'/intl/icu/source/i18n/number_simple.cpp',
'/intl/icu/source/i18n/number_skeletons.cpp',
'/intl/icu/source/i18n/number_stringbuilder.cpp',
'/intl/icu/source/i18n/number_symbolswrapper.cpp',
'/intl/icu/source/i18n/number_usageprefs.cpp',
'/intl/icu/source/i18n/number_utils.cpp',
'/intl/icu/source/i18n/numfmt.cpp',
'/intl/icu/source/i18n/numparse_affixes.cpp',
@@ -107,14 +127,15 @@ sources = [
'/intl/icu/source/i18n/numparse_impl.cpp',
'/intl/icu/source/i18n/numparse_parsednumber.cpp',
'/intl/icu/source/i18n/numparse_scientific.cpp',
'/intl/icu/source/i18n/numparse_stringsegment.cpp',
'/intl/icu/source/i18n/numparse_symbols.cpp',
'/intl/icu/source/i18n/numparse_validators.cpp',
'/intl/icu/source/i18n/numrange_capi.cpp',
'/intl/icu/source/i18n/numrange_fluent.cpp',
'/intl/icu/source/i18n/numrange_impl.cpp',
'/intl/icu/source/i18n/numsys.cpp',
'/intl/icu/source/i18n/olsontz.cpp',
'/intl/icu/source/i18n/persncal.cpp',
'/intl/icu/source/i18n/pluralranges.cpp',
'/intl/icu/source/i18n/plurfmt.cpp',
'/intl/icu/source/i18n/plurrule.cpp',
'/intl/icu/source/i18n/quantityformatter.cpp',
@@ -133,6 +154,7 @@ sources = [
'/intl/icu/source/i18n/smpdtfst.cpp',
'/intl/icu/source/i18n/sortkey.cpp',
'/intl/icu/source/i18n/standardplural.cpp',
'/intl/icu/source/i18n/string_segment.cpp',
'/intl/icu/source/i18n/stsearch.cpp',
'/intl/icu/source/i18n/taiwncal.cpp',
'/intl/icu/source/i18n/timezone.cpp',
@@ -157,6 +179,10 @@ sources = [
'/intl/icu/source/i18n/uitercollationiterator.cpp',
'/intl/icu/source/i18n/ulistformatter.cpp',
'/intl/icu/source/i18n/umsg.cpp',
'/intl/icu/source/i18n/units_complexconverter.cpp',
'/intl/icu/source/i18n/units_converter.cpp',
'/intl/icu/source/i18n/units_data.cpp',
'/intl/icu/source/i18n/units_router.cpp',
'/intl/icu/source/i18n/unum.cpp',
'/intl/icu/source/i18n/unumsys.cpp',
'/intl/icu/source/i18n/upluralrules.cpp',
@@ -245,6 +271,7 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/datefmt.h',
'/intl/icu/source/i18n/unicode/dcfmtsym.h',
'/intl/icu/source/i18n/unicode/decimfmt.h',
'/intl/icu/source/i18n/unicode/displayoptions.h',
'/intl/icu/source/i18n/unicode/dtfmtsym.h',
'/intl/icu/source/i18n/unicode/dtitvfmt.h',
'/intl/icu/source/i18n/unicode/dtitvinf.h',
@@ -253,6 +280,8 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/fieldpos.h',
'/intl/icu/source/i18n/unicode/fmtable.h',
'/intl/icu/source/i18n/unicode/format.h',
'/intl/icu/source/i18n/unicode/formattednumber.h',
'/intl/icu/source/i18n/unicode/formattedvalue.h',
'/intl/icu/source/i18n/unicode/fpositer.h',
'/intl/icu/source/i18n/unicode/gender.h',
'/intl/icu/source/i18n/unicode/gregocal.h',
@@ -260,6 +289,12 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/measfmt.h',
'/intl/icu/source/i18n/unicode/measunit.h',
'/intl/icu/source/i18n/unicode/measure.h',
'/intl/icu/source/i18n/unicode/messageformat2.h',
'/intl/icu/source/i18n/unicode/messageformat2_arguments.h',
'/intl/icu/source/i18n/unicode/messageformat2_data_model.h',
'/intl/icu/source/i18n/unicode/messageformat2_data_model_names.h',
'/intl/icu/source/i18n/unicode/messageformat2_formattable.h',
'/intl/icu/source/i18n/unicode/messageformat2_function_registry.h',
'/intl/icu/source/i18n/unicode/msgfmt.h',
'/intl/icu/source/i18n/unicode/nounit.h',
'/intl/icu/source/i18n/unicode/numberformatter.h',
@@ -276,6 +311,7 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/scientificnumberformatter.h',
'/intl/icu/source/i18n/unicode/search.h',
'/intl/icu/source/i18n/unicode/selfmt.h',
'/intl/icu/source/i18n/unicode/simplenumberformatter.h',
'/intl/icu/source/i18n/unicode/simpletz.h',
'/intl/icu/source/i18n/unicode/smpdtfmt.h',
'/intl/icu/source/i18n/unicode/sortkey.h',
@@ -297,8 +333,11 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/udat.h',
'/intl/icu/source/i18n/unicode/udateintervalformat.h',
'/intl/icu/source/i18n/unicode/udatpg.h',
'/intl/icu/source/i18n/unicode/udisplayoptions.h',
'/intl/icu/source/i18n/unicode/ufieldpositer.h',
'/intl/icu/source/i18n/unicode/uformattable.h',
'/intl/icu/source/i18n/unicode/uformattednumber.h',
'/intl/icu/source/i18n/unicode/uformattedvalue.h',
'/intl/icu/source/i18n/unicode/ugender.h',
'/intl/icu/source/i18n/unicode/ulistformatter.h',
'/intl/icu/source/i18n/unicode/ulocdata.h',
@@ -306,12 +345,15 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/unirepl.h',
'/intl/icu/source/i18n/unicode/unum.h',
'/intl/icu/source/i18n/unicode/unumberformatter.h',
'/intl/icu/source/i18n/unicode/unumberoptions.h',
'/intl/icu/source/i18n/unicode/unumberrangeformatter.h',
'/intl/icu/source/i18n/unicode/unumsys.h',
'/intl/icu/source/i18n/unicode/upluralrules.h',
'/intl/icu/source/i18n/unicode/uregex.h',
'/intl/icu/source/i18n/unicode/uregion.h',
'/intl/icu/source/i18n/unicode/ureldatefmt.h',
'/intl/icu/source/i18n/unicode/usearch.h',
'/intl/icu/source/i18n/unicode/usimplenumberformatter.h',
'/intl/icu/source/i18n/unicode/uspoof.h',
'/intl/icu/source/i18n/unicode/utmscale.h',
'/intl/icu/source/i18n/unicode/utrans.h',
+1 -1
View File
@@ -8,4 +8,4 @@
# Referenced by milestone.py.
#--------------------------------------------------------
6.8.0
6.8.1
-4
View File
@@ -348,11 +348,7 @@ ifdef SHARED_LIBRARY
ifdef IS_COMPONENT
EXTRA_DSO_LDOPTS += -bundle
else
ifdef MOZ_IOS
_LOADER_PATH := @rpath
else
_LOADER_PATH := @executable_path
endif
EXTRA_DSO_LDOPTS += -dynamiclib -install_name $(_LOADER_PATH)/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module
endif
endif
-3
View File
@@ -424,7 +424,6 @@ fstream
fstream.h
ft2build.h
fts.h
gconf/gconf-client.h
Gdiplus.h
gdk/gdk.h
gdk/gdkkeysyms.h
@@ -1050,9 +1049,7 @@ hunspell.hxx
#if MOZ_SYSTEM_BZ2==1
bzlib.h
#endif
#ifdef MOZ_ENABLE_GIO
gio/gio.h
#endif
sys/event.h
#ifdef MOZ_ENABLE_LIBPROXY
proxy.h
+1 -1
View File
@@ -78,7 +78,7 @@ html, body {
}
select {
-moz-appearance: none;
appearance: none;
background-color: var(--theme-toolbar-background);
background-image: var(--viewport-selection-arrow);
background-position: 100% 50%;
+10 -6
View File
@@ -427,7 +427,8 @@ const CurlUtils = {
.replace(/[`$]/g, "\\$&")
// Then escape all characters we are not sure about with ^ to ensure it
// gets to the MS CRT parser safely.
.replace(/[^a-zA-Z0-9\s_\-:=+~\/.',?;()*\$&\\{}\"`]/g, "^$&")
// Note: Do not escape unicode control non-printable characters (0000-001f + 007f-009f)
.replace(/[^a-zA-Z0-9\s_\-:=+~\/.',?;()*\$&\\{}\"`\u0000-\u001f\u007f-\u009f]/g, "^$&")
// The % character is special because MS CRT parser will try and look for
// ENV variables and fill them in its place. We cannot escape them with %
// and cannot escape them with ^ (because it's cmd.exe's escape not MS CRT
@@ -436,14 +437,17 @@ const CurlUtils = {
// This ensures we do not try and double escape another ^ if it was placed
// by the previous replace.
.replace(/%(?=[a-zA-Z0-9_])/g, "%^")
// We replace \r and \r\n with \n, this allows to consistently escape all new
// lines in the next replace
.replace(/\r\n?/g, "\n")
// All other whitespace characters are replaced with a single space, as there
// is no way to enter their literal values in a command line, and they do break
// the command sequence, allowing for injection.
// Since want to keep line breaks, we need to exclude them in the regex (`[^\r\n]`),
// and use double negations to get the other whitespace chars (`[^\S]` translates
// to "not not whitespace")
.replace(/[^\S\r\n]/g, " ")
// Lastly we replace new lines with ^ and TWO new lines because the first
// new line is there to enact the escape command the second is the character
// to escape (in this case new line).
// The extra " enables escaping new lines with ^ within quotes in cmd.exe.
.replace(/\n/g, '"^\r\n\r\n"')
.replace(/\r?\n|\r/g, "^\n\n")
+ encapsChars
);
}
@@ -188,7 +188,7 @@ body {
}
#timeline-rate select.devtools-button {
-moz-appearance: none;
appearance: none;
text-align: center;
font-family: inherit;
color: var(--theme-body-color);
+4 -4
View File
@@ -34,7 +34,7 @@
}
#developer-toolbar {
-moz-appearance: none;
appearance: none;
padding: 0;
min-height: 32px;
background-color: var(--gcli-background-color);
@@ -42,7 +42,7 @@
}
#developer-toolbar > toolbarbutton {
-moz-appearance: none;
appearance: none;
border: none;
background-color: transparent;
margin: 0;
@@ -122,7 +122,7 @@ html|*#gcli-output-frame {
#gcli-tooltip {
border-width: 0;
background-color: transparent;
-moz-appearance: none;
appearance: none;
}
.gclitoolbar-input-node,
@@ -140,7 +140,7 @@ html|*#gcli-output-frame {
}
.gclitoolbar-input-node {
-moz-appearance: none;
appearance: none;
color: var(--gcli-input-color);
background-color: var(--gcli-input-background);
background-repeat: no-repeat;
+7 -7
View File
@@ -70,7 +70,7 @@ html|button, html|select {
}
.devtools-autocomplete-listbox {
-moz-appearance: none !important;
appearance: none !important;
background-color: transparent;
border-width: 0px !important;
margin: 0;
@@ -243,7 +243,7 @@ checkbox:-moz-focusring {
.devtools-menulist,
.devtools-toolbarbutton,
.devtools-button {
-moz-appearance: none;
appearance: none;
background: transparent;
min-height: 18px;
text-shadow: none;
@@ -334,7 +334,7 @@ checkbox:-moz-focusring {
/* Menu button styles (eg. web console filters) */
.devtools-toolbarbutton[type=menu-button] > .toolbarbutton-menubutton-button {
-moz-appearance: none;
appearance: none;
color: inherit;
border-width: 0;
-moz-box-orient: horizontal;
@@ -351,7 +351,7 @@ checkbox:-moz-focusring {
}
.devtools-menulist > .menulist-dropmarker {
-moz-appearance: none;
appearance: none;
display: -moz-box;
list-style-image: url("chrome://devtools/skin/images/dropmarker.svg");
-moz-box-align: center;
@@ -360,7 +360,7 @@ checkbox:-moz-focusring {
.devtools-toolbarbutton[type=menu] > .toolbarbutton-menu-dropmarker,
.devtools-toolbarbutton[type=menu-button] > .toolbarbutton-menubutton-dropmarker {
-moz-appearance: none !important;
appearance: none !important;
list-style-image: url("chrome://devtools/skin/images/dropmarker.svg");
-moz-box-align: center;
padding: 0 3px;
@@ -491,7 +491,7 @@ checkbox:-moz-focusring {
* @TODO : Fix when https://bugzilla.mozilla.org/show_bug.cgi?id=1255116 lands
*/
.menu-filter-button {
-moz-appearance: none;
appearance: none;
background: rgba(128,128,128,0.1);
border: none;
border-radius: 2px;
@@ -519,7 +519,7 @@ checkbox:-moz-focusring {
.devtools-textinput,
.devtools-searchinput,
.devtools-filterinput {
-moz-appearance: none;
appearance: none;
margin: 1px 3px;
border: 1px solid;
border-radius: 2px;
+2 -2
View File
@@ -61,7 +61,7 @@
/* Firebug theme uses breakpoint icon istead of a checkbox */
.theme-firebug #sources-pane .dbg-breakpoint-checkbox .checkbox-check {
-moz-appearance: none;
appearance: none;
border: none;
background: url(chrome://devtools/skin/images/firebug/breakpoint.svg) no-repeat 50% 50%;
}
@@ -326,7 +326,7 @@
}
.dbg-expression-button {
-moz-appearance: none;
appearance: none;
border: none;
background: none;
text-decoration: underline;
+1 -1
View File
@@ -18,7 +18,7 @@
.devtools-eyedropper-panel {
pointer-events: none;
-moz-appearance: none;
appearance: none;
width: 156px;
height: 120px;
background-color: transparent;
@@ -7,7 +7,7 @@
well as any overflow: scroll elements within the page, while excluding
<select>. */
*|*:not(html|select) > scrollbar {
-moz-appearance: none !important;
appearance: none !important;
position: relative;
background-color: transparent;
background-image: none;
@@ -37,14 +37,14 @@
*|*:not(html|select) > scrollbar thumb {
background-color: rgba(170, 170, 170, .2) !important; /* --toolbar-tab-hover */
-moz-appearance: none !important;
appearance: none !important;
border-width: 0px !important;
border-radius: 3px !important;
}
*|*:root[platform="mac"] > scrollbar slider,
*|*:root[platform="mac"] *|*:not(html|select) > scrollbar slider {
-moz-appearance: none !important;
appearance: none !important;
}
*|*:root[platform="win"] > scrollbar scrollbarbutton,
@@ -7,7 +7,7 @@
well as any overflow: scroll elements within the page, while excluding
<select>. */
*|*:not(html|select) > scrollbar {
-moz-appearance: none !important;
appearance: none !important;
position: relative;
background-color: transparent;
background-image: none;
@@ -31,11 +31,11 @@
}
*|*:not(html|select) > scrollbar slider {
-moz-appearance: none !important;
appearance: none !important;
}
*|*:not(html|select) > scrollbar thumb {
-moz-appearance: none !important;
appearance: none !important;
background-color: rgba(0,0,0,0.2);
border-width: 0px !important;
border-radius: 3px !important;
+1 -1
View File
@@ -148,7 +148,7 @@
}
.requests-menu-header-button {
-moz-appearance: none;
appearance: none;
background-color: transparent;
border-image: linear-gradient(transparent 15%,
var(--theme-splitter-color) 15%,
@@ -11,13 +11,13 @@
}
.arrow {
-moz-appearance: treetwisty;
appearance: treetwisty;
width: 20px;
height: 20px;
}
.arrow[open] {
-moz-appearance: treetwistyopen;
appearance: treetwistyopen;
}
.arrow[invisible] {
+11 -11
View File
@@ -16,7 +16,7 @@
}
.devtools-responsiveui-toolbar {
-moz-appearance: none;
appearance: none;
background: transparent;
/* text color is textColor from dark theme, since no theme is applied to
* the responsive toolbar.
@@ -29,7 +29,7 @@
}
.devtools-responsiveui-textinput {
-moz-appearance: none;
appearance: none;
background: #333;
color: #fff;
border: 1px solid #111;
@@ -46,7 +46,7 @@
.devtools-responsiveui-menulist,
.devtools-responsiveui-toolbarbutton {
-moz-appearance: none;
appearance: none;
-moz-box-align: center;
min-width: 32px;
min-height: 22px;
@@ -60,12 +60,12 @@
}
.devtools-responsiveui-menulist .menulist-editable-box {
-moz-appearance: none;
appearance: none;
background-color: transparent;
}
.devtools-responsiveui-menulist html|*.menulist-editable-input {
-moz-appearance: none;
appearance: none;
color: inherit;
text-align: center;
}
@@ -124,7 +124,7 @@
}
.devtools-responsiveui-menulist > .menulist-dropmarker {
-moz-appearance: none;
appearance: none;
display: -moz-box;
background-color: transparent;
list-style-image: url("chrome://devtools/skin/images/dropmarker.svg");
@@ -134,7 +134,7 @@
}
.devtools-responsiveui-toolbarbutton[type=menu-button] > .toolbarbutton-menubutton-button {
-moz-appearance: none;
appearance: none;
color: inherit;
border-width: 0;
border-inline-end: 1px solid hsla(210,8%,5%,.45);
@@ -152,7 +152,7 @@
.devtools-responsiveui-toolbarbutton[type=menu] > .toolbarbutton-menu-dropmarker,
.devtools-responsiveui-toolbarbutton[type=menu-button] > .toolbarbutton-menubutton-dropmarker {
-moz-appearance: none !important;
appearance: none !important;
list-style-image: url("chrome://devtools/skin/images/dropmarker.svg");
-moz-box-align: center;
padding: 0 3px;
@@ -266,7 +266,7 @@
}
.devtools-responsiveui-hardware-buttons {
-moz-appearance: none;
appearance: none;
padding: 20px;
border: 1px solid #FFFFFF;
@@ -288,7 +288,7 @@
.devtools-responsiveui-sleep-button {
-moz-user-focus: ignore;
-moz-appearance: none;
appearance: none;
/* compensate browserStack top padding */
margin-top: -67px;
margin-right: 10px;
@@ -316,7 +316,7 @@
.devtools-responsiveui-volume-up-button,
.devtools-responsiveui-volume-down-button {
-moz-user-focus: ignore;
-moz-appearance: none;
appearance: none;
border: 1px solid red;
min-width: 8px;
height: 40px;
+2 -2
View File
@@ -28,7 +28,7 @@
}
.side-menu-widget-item-checkbox {
-moz-appearance: none;
appearance: none;
opacity: 0;
transition: opacity .15s ease-out 0s;
}
@@ -43,7 +43,7 @@
}
.side-menu-widget-item-checkbox .checkbox-check {
-moz-appearance: none;
appearance: none;
background-image: url(images/item-toggle.svg);
background-color: transparent;
width: 16px;
+1 -1
View File
@@ -32,7 +32,7 @@
.devtools-horizontal-splitter,
.devtools-side-splitter {
-moz-appearance: none;
appearance: none;
background-image: none;
border: 0;
border-style: solid;
+5 -5
View File
@@ -45,7 +45,7 @@
/* Toolbars */
.devtools-toolbar,
.devtools-sidebar-tabs tabs {
-moz-appearance: none;
appearance: none;
padding: 0;
border-width: 0;
border-bottom-width: 1px;
@@ -91,13 +91,13 @@
/* In-tools sidebar */
.devtools-sidebar-tabs {
-moz-appearance: none;
appearance: none;
margin: 0;
height: 100%;
}
.devtools-sidebar-tabs > tabpanels {
-moz-appearance: none;
appearance: none;
background: transparent;
padding: 0;
border: 0;
@@ -116,7 +116,7 @@
}
.devtools-sidebar-alltabs {
-moz-appearance: none;
appearance: none;
height: 24px;
line-height: 24px;
padding: 0 4px;
@@ -136,7 +136,7 @@
}
.devtools-sidebar-tabs tabs > tab {
-moz-appearance: none;
appearance: none;
/* We want to match the height of a toolbar with a toolbarbutton
* First, we need to replicated the padding of toolbar (4px),
* then we need to take the border of the buttons into account (1px).
+3 -3
View File
@@ -41,7 +41,7 @@
/* Toolbox tabbar */
.devtools-tabbar {
-moz-appearance: none;
appearance: none;
min-height: 24px;
border: 0px solid;
border-bottom-width: 1px;
@@ -67,7 +67,7 @@
/* Toolbox tabs */
.devtools-tab {
-moz-appearance: none;
appearance: none;
-moz-binding: url("chrome://global/content/bindings/general.xml#control-item");
-moz-box-align: center;
min-width: 32px;
@@ -224,7 +224,7 @@
#toolbox-controls > button,
#toolbox-dock-buttons > button {
-moz-appearance: none;
appearance: none;
border: none;
margin: 0 4px;
min-width: 16px;
+1 -1
View File
@@ -108,7 +108,7 @@
}
.tooltip-xul-wrapper {
-moz-appearance: none;
appearance: none;
background: transparent;
overflow: visible;
border-style: none;
+1 -1
View File
@@ -125,7 +125,7 @@ text {
.web-audio-inspector .error {
background-image: url(images/alerticon-warning.png);
background-size: 13px 12px;
-moz-appearance: none;
appearance: none;
opacity: 0;
transition: opacity .5s ease-out 0s;
}
+1 -1
View File
@@ -424,7 +424,7 @@ a {
padding: 0;
padding-inline-start: 20px;
margin: 0;
-moz-appearance: none;
appearance: none;
background-color: transparent;
}
+3 -3
View File
@@ -122,7 +122,7 @@
.scrollbutton-up,
.scrollbutton-down {
-moz-appearance: none;
appearance: none;
background: transparent;
box-shadow: none;
border: none;
@@ -133,7 +133,7 @@
.scrollbutton-up > .toolbarbutton-icon,
.scrollbutton-down > .toolbarbutton-icon {
-moz-appearance: none;
appearance: none;
width: 7px;
height: 16px;
background-size: 14px 16px;
@@ -190,7 +190,7 @@
.breadcrumbs-widget-item {
background-color: transparent;
-moz-appearance: none;
appearance: none;
min-height: 24px;
min-width: 65px;
margin: 0;
@@ -7223,6 +7223,26 @@ exports.CSS_PROPERTIES = {
"unset"
]
},
"inset-block": {
"isInherited": false,
"subproperties": [
"inset-block-start",
"inset-block-end"
],
"supports": [
6,
8
],
"values": [
"-moz-calc",
"auto",
"calc",
"inherit",
"initial",
"revert",
"unset"
]
},
"inset-block-end": {
"isInherited": false,
"subproperties": [
@@ -7261,6 +7281,26 @@ exports.CSS_PROPERTIES = {
"unset"
]
},
"inset-inline": {
"isInherited": false,
"subproperties": [
"inset-inline-start",
"inset-inline-end"
],
"supports": [
6,
8
],
"values": [
"-moz-calc",
"auto",
"calc",
"inherit",
"initial",
"revert",
"unset"
]
},
"inset-inline-end": {
"isInherited": false,
"subproperties": [
+4 -3
View File
@@ -17,6 +17,7 @@
#include "mozilla/dom/MessageEventBinding.h"
#include "mozilla/dom/nsCSPContext.h"
#include "mozilla/dom/nsCSPUtils.h"
#include "mozilla/dom/nsMixedContentBlocker.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/WorkerPrivate.h"
#include "mozilla/dom/WorkerRunnable.h"
@@ -1604,10 +1605,10 @@ WebSocketImpl::Init(JSContext* aCx,
mInnerWindowID);
}
// Don't allow https:// to open ws://
// Don't allow https:// to open ws://, except when explicitly preffed or a loopback address.
if (!mIsServerSide && !mSecure &&
!Preferences::GetBool("network.websocket.allowInsecureFromHTTPS",
false)) {
!Preferences::GetBool("network.websocket.allowInsecureFromHTTPS", false) &&
!nsMixedContentBlocker::IsPotentiallyTrustworthyLoopbackHost(mAsciiHost)) {
// Confirmed we are opening plain ws:// and want to prevent this from a
// secure context (e.g. https).
nsCOMPtr<nsIPrincipal> principal;
+3
View File
@@ -101,6 +101,8 @@ GK_ATOM(animations, "animations")
GK_ATOM(anonid, "anonid")
GK_ATOM(anonlocation, "anonlocation")
GK_ATOM(any, "any")
GK_ATOM(any_hover, "any-hover")
GK_ATOM(any_pointer, "any-pointer")
GK_ATOM(applet, "applet")
GK_ATOM(applyImports, "apply-imports")
GK_ATOM(applyTemplates, "apply-templates")
@@ -1533,6 +1535,7 @@ GK_ATOM(patternContentUnits, "patternContentUnits")
GK_ATOM(patternTransform, "patternTransform")
GK_ATOM(patternUnits, "patternUnits")
GK_ATOM(pc, "pc")
GK_ATOM(pointer, "pointer")
GK_ATOM(pointer_events, "pointer-events")
GK_ATOM(points, "points")
GK_ATOM(pointsAtX, "pointsAtX")
+1
View File
@@ -16,6 +16,7 @@
#include "mozilla/CORSMode.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventListenerManager.h"
#include "mozilla/HTMLEditor.h"
#include "mozilla/InternalMutationEvent.h"
#include "mozilla/Likely.h"
#include "mozilla/MemoryReporting.h"
+1
View File
@@ -111,3 +111,4 @@ MSG_DEF(MSG_PMO_INVALID_MEMBERS, 0, JSEXN_TYPEERR, "PerformanceMeasureOptions ca
MSG_DEF(MSG_PMO_CONSTRUCTOR_INACCESSIBLE, 0, JSEXN_TYPEERR, "Can't access PerformanceMark constructor, performance is null.")
MSG_DEF(MSG_PMO_UNEXPECTED_START_TIME, 0, JSEXN_TYPEERR, "Expected startTime >= 0.")
MSG_DEF(MSG_PMO_INVALID_ATTR_FOR_NON_GLOBAL, 1, JSEXN_TYPEERR, "Cannot get PerformanceTiming attribute values for non-Window global object. Given: {0}.")
MSG_DEF(MSG_NOT_SUBMIT_BUTTON, 0, JSEXN_TYPEERR, "The submitter is not a submit button.")
+11
View File
@@ -308,6 +308,17 @@ TexUnpackBlob::ConvertIfNeeded(WebGLContext* webgl, const char* funcName,
if (!rowLength || !rowCount)
return true;
auto minSrcStride =
CheckedInt<size_t>(WebGLTexelConversions::TexelBytesForFormat(srcFormat)) * rowLength;
auto minDstStride =
CheckedInt<size_t>(WebGLTexelConversions::TexelBytesForFormat(dstFormat)) * rowLength;
if (srcStride <= 0 || dstStride <= 0 || !minSrcStride.isValid() ||
!minDstStride.isValid() || size_t(srcStride) < minSrcStride.value() ||
size_t(dstStride) < minDstStride.value()) {
webgl->ErrorInvalidOperation("Invalid stride.");
return false;
}
const auto& dstIsPremult = webgl->mPixelStore_PremultiplyAlpha;
const auto srcOrigin = (webgl->mPixelStore_FlipY ? gl::OriginPos::TopLeft
: gl::OriginPos::BottomLeft);
+76 -14
View File
@@ -9,6 +9,7 @@
#include "mozilla/CheckedInt.h"
#include "mozilla/UniquePtrExtensions.h"
#include "nsPrintfCString.h"
#include "WebGLActiveInfo.h"
#include "WebGLBuffer.h"
#include "WebGLContextUtils.h"
#include "WebGLFramebuffer.h"
@@ -27,6 +28,30 @@ namespace mozilla {
// For a Tegra workaround.
static const int MAX_DRAW_CALLS_SINCE_FLUSH = 100;
static uint8_t
NumUsedLocationsByElemTypeForDraw(GLenum elemType)
{
switch (elemType) {
case LOCAL_GL_FLOAT_MAT2:
case LOCAL_GL_FLOAT_MAT2x3:
case LOCAL_GL_FLOAT_MAT2x4:
return 2;
case LOCAL_GL_FLOAT_MAT3x2:
case LOCAL_GL_FLOAT_MAT3:
case LOCAL_GL_FLOAT_MAT3x4:
return 3;
case LOCAL_GL_FLOAT_MAT4x2:
case LOCAL_GL_FLOAT_MAT4x3:
case LOCAL_GL_FLOAT_MAT4:
return 4;
default:
return 1;
}
}
////////////////////////////////////////
class ScopedResolveTexturesForDraw
@@ -331,6 +356,7 @@ class ScopedDrawHelper final
{
WebGLContext* const mWebGL;
bool mDidFake;
std::vector<GLuint> mDisabledUnusedAttribs;
public:
ScopedDrawHelper(WebGLContext* webgl, const char* funcName, uint32_t firstVertex,
@@ -367,11 +393,43 @@ public:
}
mDidFake = true;
const auto& linkInfo = mWebGL->mActiveProgramLinkInfo;
#ifdef XP_MACOSX
if (mWebGL->gl->WorkAroundDriverBugs()) {
std::vector<bool> isActiveAttrib(mWebGL->mBoundVertexArray->mAttribs.Length(),
false);
for (const auto& progAttrib : linkInfo->attribs) {
const auto loc = progAttrib.mLoc;
if (loc < 0) {
continue;
}
const auto usedLocs =
NumUsedLocationsByElemTypeForDraw(progAttrib.mActiveInfo->mElemType);
for (uint32_t i = 0; i < usedLocs; ++i) {
const auto usedLoc = static_cast<uint32_t>(loc) + i;
if (usedLoc < isActiveAttrib.size()) {
isActiveAttrib[usedLoc] = true;
}
}
}
for (uint32_t i = 0; i < mWebGL->mBoundVertexArray->mAttribs.Length(); ++i) {
const auto& attrib = mWebGL->mBoundVertexArray->mAttribs[i];
if (!attrib.mEnabled || isActiveAttrib[i]) {
continue;
}
mWebGL->gl->fDisableVertexAttribArray(i);
mDisabledUnusedAttribs.push_back(i);
}
}
#endif
////
// Check UBO sizes.
const auto& linkInfo = mWebGL->mActiveProgramLinkInfo;
for (const auto& cur : linkInfo->uniformBlocks) {
const auto& dataSize = cur->mDataSize;
const auto& binding = cur->mBinding;
@@ -477,6 +535,10 @@ public:
if (mDidFake) {
mWebGL->UndoFakeVertexAttrib0();
}
for (const auto loc : mDisabledUnusedAttribs) {
mWebGL->gl->fEnableVertexAttribArray(loc);
}
}
};
@@ -607,12 +669,12 @@ WebGLContext::DrawArraysInstanced(GLenum mode, GLint first, GLsizei vertCount,
return;
MakeContextCurrent();
if (vertCount > mMaxVertIdsPerDraw) {
ErrorOutOfMemory(
"Context's max vertCount is %u, but %u requested. [webgl.max-vert-ids-per-draw]", mMaxVertIdsPerDraw, vertCount);
return;
}
if (vertCount > mMaxVertIdsPerDraw) {
ErrorOutOfMemory(
"Context's max vertCount is %u, but %u requested. [webgl.max-vert-ids-per-draw]", mMaxVertIdsPerDraw, vertCount);
return;
}
bool error = false;
ScopedResolveTexturesForDraw scopedResolve(this, funcName, &error);
@@ -855,12 +917,12 @@ WebGLContext::DrawElementsInstanced(GLenum mode, GLsizei vertCount, GLenum type,
return;
MakeContextCurrent();
if (vertCount > mMaxVertIdsPerDraw) {
ErrorOutOfMemory(
"Context's max vertCount is %u, but %u requested. [webgl.max-vert-ids-per-draw]", mMaxVertIdsPerDraw, vertCount);
return;
}
if (vertCount > mMaxVertIdsPerDraw) {
ErrorOutOfMemory(
"Context's max vertCount is %u, but %u requested. [webgl.max-vert-ids-per-draw]", mMaxVertIdsPerDraw, vertCount);
return;
}
bool error = false;
ScopedResolveTexturesForDraw scopedResolve(this, funcName, &error);
+7
View File
@@ -40,6 +40,7 @@
#include "mozilla/dom/ScrollAreaEvent.h"
#include "mozilla/dom/SimpleGestureEvent.h"
#include "mozilla/dom/StorageEvent.h"
#include "mozilla/dom/SubmitEvent.h"
#include "mozilla/dom/TimeEvent.h"
#include "mozilla/dom/TouchEvent.h"
#include "mozilla/dom/TransitionEvent.h"
@@ -1066,6 +1067,12 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
case eAnimationEventClass:
return NS_NewDOMAnimationEvent(aOwner, aPresContext,
aEvent->AsAnimationEvent());
case eFormEventClass:
if (aEvent->mMessage == eFormSubmit) {
return NS_NewDOMSubmitEvent(aOwner, aPresContext,
aEvent->AsFormEvent());
}
return NS_NewDOMEvent(aOwner, aPresContext, aEvent);
default:
// For all other types of events, create a vanilla event object.
return NS_NewDOMEvent(aOwner, aPresContext, aEvent);
+64
View File
@@ -0,0 +1,64 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 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/. */
#include "mozilla/dom/SubmitEvent.h"
#include "mozilla/ContentEvents.h"
#include "nsIContent.h"
namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_INHERITED(SubmitEvent, Event, mSubmitter)
NS_IMPL_ADDREF_INHERITED(SubmitEvent, Event)
NS_IMPL_RELEASE_INHERITED(SubmitEvent, Event)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SubmitEvent)
NS_INTERFACE_MAP_END_INHERITING(Event)
SubmitEvent::SubmitEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
InternalFormEvent* aEvent)
: Event(aOwner, aPresContext, aEvent)
{
if (aEvent) {
nsIContent* originator = aEvent->mOriginator;
if (originator && originator->IsHTMLElement()) {
mSubmitter = static_cast<::nsGenericHTMLElement*>(originator);
}
}
}
already_AddRefed<SubmitEvent>
SubmitEvent::Constructor(const GlobalObject& aGlobal,
const nsAString& aType,
const SubmitEventInit& aParam,
ErrorResult& aRv)
{
nsCOMPtr<EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
RefPtr<SubmitEvent> e = new SubmitEvent(t, nullptr, nullptr);
bool trusted = e->Init(t);
e->InitEvent(aType, aParam.mBubbles, aParam.mCancelable);
e->mSubmitter = aParam.mSubmitter;
e->SetTrusted(trusted);
e->SetComposed(aParam.mComposed);
return e.forget();
}
} // namespace dom
} // namespace mozilla
using namespace mozilla;
using namespace mozilla::dom;
already_AddRefed<SubmitEvent>
NS_NewDOMSubmitEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
InternalFormEvent* aEvent)
{
RefPtr<SubmitEvent> it = new SubmitEvent(aOwner, aPresContext, aEvent);
return it.forget();
}
+61
View File
@@ -0,0 +1,61 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 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/. */
#ifndef mozilla_dom_SubmitEvent_h_
#define mozilla_dom_SubmitEvent_h_
#include "mozilla/dom/Event.h"
#include "mozilla/dom/SubmitEventBinding.h"
#include "mozilla/EventForwards.h"
class nsGenericHTMLElement;
namespace mozilla {
namespace dom {
class SubmitEvent final : public Event
{
public:
SubmitEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
InternalFormEvent* aEvent);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SubmitEvent, Event)
// Forward to base class
NS_FORWARD_TO_EVENT
static already_AddRefed<SubmitEvent> Constructor(const GlobalObject& aGlobal,
const nsAString& aType,
const SubmitEventInit& aParam,
ErrorResult& aRv);
::nsGenericHTMLElement* GetSubmitter() const
{
return mSubmitter;
}
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
{
return SubmitEventBinding::Wrap(aCx, this, aGivenProto);
}
protected:
~SubmitEvent() {}
private:
RefPtr<::nsGenericHTMLElement> mSubmitter;
};
} // namespace dom
} // namespace mozilla
already_AddRefed<mozilla::dom::SubmitEvent>
NS_NewDOMSubmitEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
mozilla::InternalFormEvent* aEvent);
#endif // mozilla_dom_SubmitEvent_h_
+2
View File
@@ -65,6 +65,7 @@ EXPORTS.mozilla.dom += [
'ScrollAreaEvent.h',
'SimpleGestureEvent.h',
'StorageEvent.h',
'SubmitEvent.h',
'TextClause.h',
'Touch.h',
'TouchEvent.h',
@@ -115,6 +116,7 @@ UNIFIED_SOURCES += [
'ScrollAreaEvent.cpp',
'SimpleGestureEvent.cpp',
'StorageEvent.cpp',
'SubmitEvent.cpp',
'TextClause.cpp',
'TextComposition.cpp',
'Touch.cpp',
+1
View File
@@ -170,6 +170,7 @@ skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
skip-if = toolkit == 'android' #TIMED_OUT
[test_eventctors.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_submit_event.html]
[test_eventhandler_scoping.html]
[test_eventTimeStamp.html]
[test_focus_disabled.html]
+80
View File
@@ -0,0 +1,80 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for SubmitEvent and submitter</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<pre id="test">
<script type="application/javascript">
var hasSimpleTest = typeof SimpleTest !== "undefined";
function finishIfPossible() {
if (hasSimpleTest) {
SimpleTest.finish();
}
}
function okMaybe(cond, msg) {
if (hasSimpleTest) {
ok(cond, msg);
} else {
console.log((cond ? "OK: " : "FAIL: ") + msg);
}
}
function isMaybe(a, b, msg) {
if (hasSimpleTest) {
is(a, b, msg);
} else {
console.log((a === b ? "OK: " : "FAIL: ") + msg + " (got " + a + " expected " + b + ")");
}
}
if (hasSimpleTest) {
SimpleTest.waitForExplicitFinish();
}
function testConstructor() {
okMaybe("SubmitEvent" in window, "SubmitEvent constructor exists");
var button = document.createElement("button");
var ev = new SubmitEvent("submit", { submitter: button, bubbles: true, cancelable: true });
isMaybe(ev.type, "submit", "constructor type matches");
okMaybe(!ev.isTrusted, "constructed SubmitEvent is not trusted");
isMaybe(ev.submitter, button, "constructor submitter matches");
var ev2 = new SubmitEvent("submit");
isMaybe(ev2.submitter, null, "default submitter is null");
}
function testDispatch() {
var form = document.createElement("form");
var button = document.createElement("button");
button.type = "submit";
button.textContent = "Submit";
form.appendChild(button);
document.body.appendChild(form);
form.addEventListener("submit", function(e) {
okMaybe(e instanceof SubmitEvent, "submit event is SubmitEvent");
isMaybe(e.submitter, button, "submitter is the clicked button");
e.preventDefault();
form.remove();
finishIfPossible();
});
if (hasSimpleTest) {
SimpleTest.executeSoon(function() {
button.click();
});
} else {
setTimeout(function() {
button.click();
}, 0);
}
}
testConstructor();
testDispatch();
</script>
</pre>
</body>
</html>
+35
View File
@@ -276,6 +276,41 @@ HTMLFormElement::Submit()
return rv.StealNSResult();
}
// https://html.spec.whatwg.org/multipage/forms.html#dom-form-requestsubmit
void
HTMLFormElement::RequestSubmit(nsGenericHTMLElement* aSubmitter,
ErrorResult& aRv) {
// 1. If submitter is not null, then:
if (aSubmitter) {
nsCOMPtr<nsIFormControl> fc = do_QueryObject(aSubmitter);
// 1.1. If submitter is not a submit button, then throw a TypeError.
if (!fc || !fc->IsSubmitControl()) {
aRv.ThrowTypeError<MSG_NOT_SUBMIT_BUTTON>();
return;
}
// 1.2. If submitter's form owner is not this form element, then throw a
// "NotFoundError" DOMException.
if (fc->GetFormElement() != this) {
aRv.Throw(NS_ERROR_DOM_NOT_FOUND_ERR);
return;
}
}
// 2. Otherwise, set submitter to this form element.
// 3. Submit this form element, from submitter.
// We go through the presShell here for the corner case a submit event
// is pending while the window is being destroyed.
InternalFormEvent event(true, eFormSubmit);
event.mOriginator = aSubmitter;
nsEventStatus status = nsEventStatus_eIgnore;
nsCOMPtr<nsIPresShell> presShell = GetComposedDoc()->GetShell();
if (MOZ_LIKELY(presShell)) {
presShell->HandleDOMEventWithTarget(this, &event, &status);
}
}
NS_IMETHODIMP
HTMLFormElement::Reset()
{
+13
View File
@@ -391,6 +391,19 @@ public:
void Submit(ErrorResult& aRv);
/**
* Requests to submit the form. Unlike submit(), this method includes
* interactive constraint validation and firing a submit event,
* either of which can cancel submission.
*
* @param aSubmitter The submitter argument can be used to point to a specific
* submit button.
* @param aRv An ErrorResult.
* @see
* https://html.spec.whatwg.org/multipage/forms.html#dom-form-requestsubmit
*/
void RequestSubmit(nsGenericHTMLElement* aSubmitter, ErrorResult& aRv);
// XPCOM Reset() is OK
bool CheckValidity()
+51 -11
View File
@@ -371,6 +371,9 @@ MediaFormatReader::DecoderFactory::DoCreateDecoder(TrackType aTrack)
case TrackType::kVideoTrack: {
// Decoders use the layers backend to decide if they can use hardware decoding,
// so specify LAYERS_NONE if we want to forcibly disable it.
using Option = CreateDecoderParams::Option;
using OptionSet = CreateDecoderParams::OptionSet;
data.mDecoder = mOwner->mPlatform->CreateDecoder({
ownerData.mInfo
? *ownerData.mInfo->GetAsVideoInfo()
@@ -383,7 +386,10 @@ MediaFormatReader::DecoderFactory::DoCreateDecoder(TrackType aTrack)
mOwner->mCrashHelper,
#endif
ownerData.mIsBlankDecode,
&result
&result,
OptionSet(ownerData.mHardwareDecodingDisabled
? Option::HardwareDecoderNotAllowed
: Option::Default)
});
break;
}
@@ -921,6 +927,8 @@ MediaFormatReader::NotifyNewOutput(TrackType aTrack, MediaData* aSample)
decoder.mOutput.AppendElement(aSample);
decoder.mNumSamplesOutput++;
decoder.mNumOfConsecutiveError = 0;
// We have decoded our first frame, we can now start to skip future errors.
decoder.mFirstFrameTime.reset();
ScheduleUpdate(aTrack);
}
@@ -1415,7 +1423,7 @@ MediaFormatReader::Update(TrackType aTrack)
RefPtr<MediaData> output = decoder.mOutput[0];
decoder.mOutput.RemoveElementAt(0);
decoder.mSizeOfQueue -= 1;
decoder.mLastSampleTime =
decoder.mLastDecodedSampleTime =
Some(TimeInterval(TimeUnit::FromMicroseconds(output->mTime),
TimeUnit::FromMicroseconds(output->GetEndTime())));
decoder.mNumSamplesOutputTotal++;
@@ -1463,14 +1471,14 @@ MediaFormatReader::Update(TrackType aTrack)
LOG("Rejecting %s promise: EOS", TrackTypeToStr(aTrack));
decoder.RejectPromise(NS_ERROR_DOM_MEDIA_END_OF_STREAM, __func__);
} else if (decoder.mWaitingForData) {
if (wasDraining && decoder.mLastSampleTime &&
if (wasDraining && decoder.mLastDecodedSampleTime &&
!decoder.mNextStreamSourceID) {
// We have completed draining the decoder following WaitingForData.
// Set up the internal seek machinery to be able to resume from the
// last sample decoded.
LOG("Seeking to last sample time: %lld",
decoder.mLastSampleTime.ref().mStart.ToMicroseconds());
InternalSeek(aTrack, InternalSeekTarget(decoder.mLastSampleTime.ref(), true));
decoder.mLastDecodedSampleTime.ref().mStart.ToMicroseconds());
InternalSeek(aTrack, InternalSeekTarget(decoder.mLastDecodedSampleTime.ref(), true));
}
if (!decoder.mReceivedNewData) {
LOG("Rejecting %s promise: WAITING_FOR_DATA", TrackTypeToStr(aTrack));
@@ -1506,24 +1514,52 @@ MediaFormatReader::Update(TrackType aTrack)
if (decoder.mError && !decoder.HasFatalError()) {
decoder.mDecodePending = false;
bool needsNewDecoder = decoder.mError.ref() == NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER;
MOZ_RELEASE_ASSERT(!decoder.HasInternalSeekPending(),
"No error can occur while an internal seek is pending");
nsCString error;
bool firstFrameDecodingFailedWithHardware =
decoder.mFirstFrameTime &&
decoder.mError.ref() == NS_ERROR_DOM_MEDIA_DECODE_ERR &&
decoder.mDecoder && decoder.mDecoder->IsHardwareAccelerated(error) &&
!decoder.mHardwareDecodingDisabled;
bool needsNewDecoder =
decoder.mError.ref() == NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER ||
firstFrameDecodingFailedWithHardware;
if (!needsNewDecoder && ++decoder.mNumOfConsecutiveError > decoder.mMaxConsecutiveError) {
NotifyError(aTrack, decoder.mError.ref());
return;
}
if (firstFrameDecodingFailedWithHardware) {
decoder.mHardwareDecodingDisabled = true;
}
decoder.mError.reset();
LOG("%s decoded error count %d", TrackTypeToStr(aTrack),
decoder.mNumOfConsecutiveError);
if (needsNewDecoder) {
LOG("Error: Need new decoder");
decoder.ShutdownDecoder();
}
if (decoder.mFirstFrameTime) {
TimeInterval seekInterval = TimeInterval(decoder.mFirstFrameTime.ref(),
decoder.mFirstFrameTime.ref());
InternalSeek(aTrack, InternalSeekTarget(seekInterval, false));
return;
}
media::TimeUnit nextKeyframe;
if (aTrack == TrackType::kVideoTrack && !decoder.HasInternalSeekPending() &&
NS_SUCCEEDED(decoder.mTrackDemuxer->GetNextRandomAccessPoint(&nextKeyframe))) {
if (needsNewDecoder) {
decoder.ShutdownDecoder();
}
SkipVideoDemuxToNextKeyFrame(decoder.mLastSampleTime.refOr(TimeInterval()).Length());
NS_SUCCEEDED(decoder.mTrackDemuxer->GetNextRandomAccessPoint(&nextKeyframe)) &&
!nextKeyframe.IsInfinite()) {
SkipVideoDemuxToNextKeyFrame(decoder.mLastDecodedSampleTime.refOr(TimeInterval()).Length());
return;
} else if (aTrack == TrackType::kAudioTrack) {
decoder.Flush();
} else {
// We can't recover from this error.
NotifyError(aTrack, NS_ERROR_DOM_MEDIA_FATAL_ERR);
}
}
@@ -1664,6 +1700,7 @@ MediaFormatReader::ResetDecode(TrackSet aTracks)
if (HasVideo() && aTracks.contains(TrackInfo::kVideoTrack)) {
mVideo.ResetDemuxer();
mVideo.mFirstFrameTime = Some(media::TimeUnit());
Reset(TrackInfo::kVideoTrack);
if (mVideo.HasPromise()) {
mVideo.RejectPromise(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
@@ -1672,6 +1709,7 @@ MediaFormatReader::ResetDecode(TrackSet aTracks)
if (HasAudio() && aTracks.contains(TrackInfo::kAudioTrack)) {
mAudio.ResetDemuxer();
mVideo.mFirstFrameTime = Some(media::TimeUnit());
Reset(TrackInfo::kAudioTrack);
if (mAudio.HasPromise()) {
mAudio.RejectPromise(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
@@ -2030,6 +2068,7 @@ MediaFormatReader::OnVideoSeekCompleted(media::TimeUnit aTime)
LOGV("Video seeked to %lld", aTime.ToMicroseconds());
mVideo.mSeekRequest.Complete();
mVideo.mFirstFrameTime = Some(aTime);
mPreviousDecodedKeyframeTime_us = sNoPreviousDecodedKeyframe;
SetVideoDecodeThreshold();
@@ -2111,6 +2150,7 @@ MediaFormatReader::OnAudioSeekCompleted(media::TimeUnit aTime)
MOZ_ASSERT(OnTaskQueue());
LOGV("Audio seeked to %lld", aTime.ToMicroseconds());
mAudio.mSeekRequest.Complete();
mAudio.mFirstFrameTime = Some(aTime);
mPendingSeekTime.reset();
mSeekPromise.Resolve(aTime, __func__);
}
+11 -3
View File
@@ -235,6 +235,7 @@ private:
, mDrainComplete(false)
, mNumOfConsecutiveError(0)
, mMaxConsecutiveError(aNumOfMaxError)
, mFirstFrameTime(Some(media::TimeUnit()))
, mNumSamplesInput(0)
, mNumSamplesOutput(0)
, mNumSamplesOutputTotal(0)
@@ -243,6 +244,7 @@ private:
, mIsHardwareAccelerated(false)
, mLastStreamSourceID(UINT32_MAX)
, mIsBlankDecode(false)
, mHardwareDecodingDisabled(false)
{}
MediaFormatReader* mOwner;
@@ -316,6 +318,11 @@ private:
uint32_t mNumOfConsecutiveError;
uint32_t mMaxConsecutiveError;
// Set when we haven't yet decoded the first frame.
// Cleared once the first frame has been decoded.
// This is used to determine, upon error, if we should try again to decode
// the frame, or skip to the next keyframe.
Maybe<media::TimeUnit> mFirstFrameTime;
Maybe<MediaResult> mError;
bool HasFatalError() const
@@ -341,8 +348,8 @@ private:
// Used for internal seeking when a change of stream is detected or when
// encountering data discontinuity.
Maybe<InternalSeekTarget> mTimeThreshold;
// Time of last sample returned.
Maybe<media::TimeInterval> mLastSampleTime;
// Time of last decoded sample returned.
Maybe<media::TimeInterval> mLastDecodedSampleTime;
// Decoded samples returned my mDecoder awaiting being returned to
// state machine upon request.
@@ -405,7 +412,7 @@ private:
mDraining = false;
mDrainComplete = false;
mTimeThreshold.reset();
mLastSampleTime.reset();
mLastDecodedSampleTime.reset();
mOutput.Clear();
mNumSamplesInput = 0;
mNumSamplesOutput = 0;
@@ -437,6 +444,7 @@ private:
Maybe<media::TimeUnit> mFirstDemuxedSampleTime;
// Use BlankDecoderModule or not.
bool mIsBlankDecode;
bool mHardwareDecodingDisabled;
};
+1
View File
@@ -7,6 +7,7 @@
#define GMP_DEVICE_BINDING_h_
#include <string>
#include <cstdint>
namespace mozilla {
namespace gmp {
@@ -10,6 +10,7 @@
#include "ImageContainer.h"
#include "MediaDecoderReader.h"
#include "MediaInfo.h"
#include "mozilla/EnumSet.h"
#include "mozilla/MozPromise.h"
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/layers/KnowsCompositor.h"
@@ -47,6 +48,13 @@ struct MOZ_STACK_CLASS CreateDecoderParams final {
: mConfig(aConfig)
{}
enum class Option
{
Default,
HardwareDecoderNotAllowed,
};
using OptionSet = EnumSet<Option>;
template <typename T1, typename... Ts>
CreateDecoderParams(const TrackInfo& aConfig, T1&& a1, Ts&&... args)
: mConfig(aConfig)
@@ -85,6 +93,7 @@ struct MOZ_STACK_CLASS CreateDecoderParams final {
RefPtr<GMPCrashHelper> mCrashHelper;
#endif
bool mUseBlankDecoder = false;
OptionSet mOptions = OptionSet(Option::Default);
private:
void Set(TaskQueue* aTaskQueue) { mTaskQueue = aTaskQueue; }
@@ -96,6 +105,7 @@ private:
void Set(GMPCrashHelper* aCrashHelper) { mCrashHelper = aCrashHelper; }
#endif
void Set(bool aUseBlankDecoder) { mUseBlankDecoder = aUseBlankDecoder; }
void Set(OptionSet aOptions) { mOptions = aOptions; }
void Set(layers::KnowsCompositor* aKnowsCompositor) { mKnowsCompositor = aKnowsCompositor; }
template <typename T1, typename T2, typename... Ts>
void Set(T1&& a1, T2&& a2, Ts&&... args)
@@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "VPXDecoder.h"
#include "mp4_demuxer/BitReader.h"
#include "gfx2DGlue.h"
#include "nsError.h"
#include "TimeUnits.h"
@@ -383,5 +384,32 @@ VPXDecoder::GetFrameSize(Span<const uint8_t> aBuffer, Codec aCodec)
return nsIntSize(si.w, si.h);
}
/* static */
int
VPXDecoder::GetVP9Profile(Span<const uint8_t> aBuffer)
{
if (aBuffer.Length() < 2) {
// Can't be good.
return -1;
}
mp4_demuxer::BitReader br(aBuffer.Elements(), aBuffer.Length() * 8);
uint32_t frameMarker = br.ReadBits(2); // frame_marker
if (frameMarker != 2) {
// That's not a valid vp9 header.
return -1;
}
uint32_t profile = br.ReadBits(1); // profile_low_bit
profile |= br.ReadBits(1) << 1; // profile_high_bit
if (profile == 3) {
profile += br.ReadBits(1); // reserved_zero
if (profile > 3) {
// reserved_zero wasn't zero.
return -1;
}
}
return profile;
}
} // namespace mozilla
#undef LOG
@@ -53,6 +53,10 @@ public:
// Return the frame dimensions for a sample for the specified codec.
static nsIntSize GetFrameSize(Span<const uint8_t> aBuffer, Codec aCodec);
// Return the VP9 profile as per https://www.webmproject.org/vp9/profiles/
// Return negative value if error.
static int GetVP9Profile(Span<const uint8_t> aBuffer);
private:
void ProcessDecode(MediaRawData* aSample);
MediaResult DoDecode(MediaRawData* aSample);
@@ -40,11 +40,7 @@ AppleVTDecoder::AppleVTDecoder(const VideoInfo& aConfig,
, mMaxRefFrames(mp4_demuxer::H264::ComputeMaxRefFrames(aConfig.mExtraData))
, mImageContainer(aImageContainer)
, mIsShutDown(false)
#ifdef MOZ_WIDGET_UIKIT
, mUseSoftwareImages(true)
#else
, mUseSoftwareImages(false)
#endif
, mIsFlushing(false)
, mMonitor("AppleVideoDecoder")
, mFormat(nullptr)
@@ -356,7 +352,6 @@ AppleVTDecoder::OutputFrame(CVPixelBufferRef aImage,
// Unlock the returned image data.
CVPixelBufferUnlockBaseAddress(aImage, kCVPixelBufferLock_ReadOnly);
} else {
#ifndef MOZ_WIDGET_UIKIT
IOSurfacePtr surface = MacIOSurfaceLib::CVPixelBufferGetIOSurface(aImage);
MOZ_ASSERT(surface, "Decoder didn't return an IOSurface backed buffer");
@@ -373,9 +368,6 @@ AppleVTDecoder::OutputFrame(CVPixelBufferRef aImage,
aFrameRef.is_sync_point,
aFrameRef.decode_timestamp.ToMicroseconds(),
visible);
#else
MOZ_ASSERT_UNREACHABLE("No MacIOSurface on iOS");
#endif
}
if (!data) {
+6 -5
View File
@@ -91,11 +91,12 @@ WMFDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams)
return nullptr;
}
nsAutoPtr<WMFVideoMFTManager> manager(
new WMFVideoMFTManager(aParams.VideoConfig(),
aParams.mKnowsCompositor,
aParams.mImageContainer,
sDXVAEnabled));
nsAutoPtr<WMFVideoMFTManager> manager(new WMFVideoMFTManager(
aParams.VideoConfig(),
aParams.mKnowsCompositor,
aParams.mImageContainer,
sDXVAEnabled && !aParams.mOptions.contains(
CreateDecoderParams::Option::HardwareDecoderNotAllowed)));
if (!manager->Init()) {
return nullptr;
+16 -1
View File
@@ -576,6 +576,16 @@ WMFVideoMFTManager::Input(MediaRawData* aSample)
return E_FAIL;
}
if (mStreamType == VP9 && aSample->mKeyframe) {
// Check the VP9 profile. the VP9 MFT can only handle correctly profile 0
// and 2 (yuv420 8/10/12 bits)
int profile =
VPXDecoder::GetVP9Profile(MakeSpan(aSample->Data(), aSample->Size()));
if (profile != 0 && profile != 2) {
return E_FAIL;
}
}
HRESULT hr = mDecoder->CreateInputSample(aSample->Data(),
uint32_t(aSample->Size()),
aSample->mTime,
@@ -990,7 +1000,12 @@ WMFVideoMFTManager::Output(int64_t aStreamOffset,
aOutData = frame;
// Set the potentially corrected pts and duration.
aOutData->mTime = pts.ToMicroseconds();
aOutData->mDuration = duration.ToMicroseconds();
// The VP9 decoder doesn't provide a valid duration. AS VP9 doesn't have a
// concept of pts vs dts and have no latency. We can as such use the last
// known input duration.
aOutData->mDuration = (mStreamType == VP9 && duration == media::TimeUnit())
? mLastDuration
: duration.ToMicroseconds();
if (mNullOutputCount) {
mGotValidOutputAfterNullOutput = true;
+39
View File
@@ -100,6 +100,45 @@ public:
uint32_t mChunksToProcess = 0;
};
/* static */ already_AddRefed<AnalyserNode>
AnalyserNode::Create(AudioContext& aAudioContext,
const AnalyserOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<AnalyserNode> analyserNode = new AnalyserNode(&aAudioContext);
analyserNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
analyserNode->SetFftSize(aOptions.mFftSize, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
analyserNode->SetMinDecibels(aOptions.mMinDecibels, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
analyserNode->SetMaxDecibels(aOptions.mMaxDecibels, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
analyserNode->SetSmoothingTimeConstant(aOptions.mSmoothingTimeConstant, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
return analyserNode.forget();
}
AnalyserNode::AnalyserNode(AudioContext* aContext)
: AudioNode(aContext,
1,
+15 -4
View File
@@ -14,16 +14,26 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct AnalyserOptions;
class AnalyserNode final : public AudioNode
{
public:
explicit AnalyserNode(AudioContext* aContext);
static already_AddRefed<AnalyserNode>
Create(AudioContext& aAudioContext, const AnalyserOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
static already_AddRefed<AnalyserNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const AnalyserOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
void GetFloatFrequencyData(const Float32Array& aArray);
void GetByteFrequencyData(const Uint8Array& aArray);
void GetFloatTimeDomainData(const Float32Array& aArray);
@@ -61,10 +71,9 @@ public:
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
~AnalyserNode() {}
private:
~AnalyserNode() = default;
friend class AnalyserNodeEngine;
void AppendChunk(const AudioChunk& aChunk);
bool AllocateBuffer();
@@ -73,6 +82,8 @@ private:
void GetTimeDomainData(float* aData, size_t aLength);
private:
explicit AnalyserNode(AudioContext* aContext);
FFTBlock mAnalysisBlock;
nsTArray<AudioChunk> mChunks;
double mMinDecibels;
+18
View File
@@ -178,6 +178,24 @@ AudioBuffer::~AudioBuffer()
mozilla::DropJSObjects(this);
}
/* static */ already_AddRefed<AudioBuffer>
AudioBuffer::Constructor(const GlobalObject& aGlobal,
AudioContext& aAudioContext,
const AudioBufferOptions& aOptions,
ErrorResult& aRv)
{
if (!aOptions.mNumberOfChannels) {
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;
}
float sampleRate = aOptions.mSampleRate.WasPassed()
? aOptions.mSampleRate.Value()
: aAudioContext.SampleRate();
return Create(&aAudioContext, aOptions.mNumberOfChannels, aOptions.mLength,
sampleRate, aRv);
}
void
AudioBuffer::ClearJSChannels()
{
+5 -1
View File
@@ -24,6 +24,7 @@ class ThreadSharedFloatArrayBufferList;
namespace dom {
struct AudioBufferOptions;
class AudioContext;
/**
@@ -56,6 +57,10 @@ public:
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AudioBuffer)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AudioBuffer)
static already_AddRefed<AudioBuffer>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const AudioBufferOptions& aOptions, ErrorResult& aRv);
nsPIDOMWindowInner* GetParentObject() const
{
nsCOMPtr<nsPIDOMWindowInner> parentObject = do_QueryReferent(mOwnerWindow);
@@ -134,4 +139,3 @@ protected:
} // namespace mozilla
#endif
+22 -2
View File
@@ -607,10 +607,30 @@ AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* aContext)
mStream->AddMainThreadListener(this);
}
AudioBufferSourceNode::~AudioBufferSourceNode()
/* static */ already_AddRefed<AudioBufferSourceNode>
AudioBufferSourceNode::Create(JSContext* aCx, AudioContext& aAudioContext,
const AudioBufferSourceOptions& aOptions,
ErrorResult& aRv)
{
}
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<AudioBufferSourceNode> audioNode = new AudioBufferSourceNode(&aAudioContext);
if (aOptions.mBuffer.WasPassed()) {
MOZ_ASSERT(aCx);
audioNode->SetBuffer(aCx, aOptions.mBuffer.Value());
}
audioNode->Detune()->SetValue(aOptions.mDetune);
audioNode->SetLoop(aOptions.mLoop);
audioNode->SetLoopEnd(aOptions.mLoopEnd);
audioNode->SetLoopStart(aOptions.mLoopStart);
audioNode->PlaybackRate()->SetValue(aOptions.mPlaybackRate);
return audioNode.forget();
}
void
AudioBufferSourceNode::DestroyMediaStream()
{
+16 -8
View File
@@ -12,13 +12,16 @@
namespace mozilla {
namespace dom {
struct AudioBufferSourceOptions;
class AudioParam;
class AudioBufferSourceNode final : public AudioNode,
public MainThreadMediaStreamListener
class AudioBufferSourceNode final : public AudioNode
, public MainThreadMediaStreamListener
{
public:
explicit AudioBufferSourceNode(AudioContext* aContext);
static already_AddRefed<AudioBufferSourceNode>
Create(JSContext* aCx, AudioContext& aAudioContext,
const AudioBufferSourceOptions& aOptions, ErrorResult& aRv);
void DestroyMediaStream() override;
@@ -33,6 +36,13 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioBufferSourceNode, AudioNode)
static already_AddRefed<AudioBufferSourceNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const AudioBufferSourceOptions& aOptions, ErrorResult& aRv)
{
return Create(aGlobal.Context(), aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
void Start(double aWhen, double aOffset,
@@ -98,10 +108,10 @@ public:
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~AudioBufferSourceNode();
private:
explicit AudioBufferSourceNode(AudioContext* aContext);
~AudioBufferSourceNode() = default;
friend class AudioBufferSourceNodeEngine;
// START is sent during Start().
// STOP is sent during Stop().
@@ -129,7 +139,6 @@ private:
void SendBufferParameterToStream(JSContext* aCx);
void SendOffsetAndDurationParametersToStream(AudioNodeStream* aStream);
private:
double mLoopStart;
double mLoopEnd;
double mOffset;
@@ -145,4 +154,3 @@ private:
} // namespace mozilla
#endif
+49 -166
View File
@@ -11,10 +11,26 @@
#include "mozilla/OwningNonNull.h"
#include "mozilla/dom/AnalyserNode.h"
#include "mozilla/dom/AnalyserNodeBinding.h"
#include "mozilla/dom/AudioBufferSourceNodeBinding.h"
#include "mozilla/dom/AudioContextBinding.h"
#include "mozilla/dom/BiquadFilterNodeBinding.h"
#include "mozilla/dom/ChannelMergerNodeBinding.h"
#include "mozilla/dom/ChannelSplitterNodeBinding.h"
#include "mozilla/dom/ConvolverNodeBinding.h"
#include "mozilla/dom/DelayNodeBinding.h"
#include "mozilla/dom/DynamicsCompressorNodeBinding.h"
#include "mozilla/dom/GainNodeBinding.h"
#include "mozilla/dom/IIRFilterNodeBinding.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "mozilla/dom/MediaElementAudioSourceNodeBinding.h"
#include "mozilla/dom/MediaStreamAudioSourceNodeBinding.h"
#include "mozilla/dom/OfflineAudioContextBinding.h"
#include "mozilla/dom/OscillatorNodeBinding.h"
#include "mozilla/dom/PannerNodeBinding.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/StereoPannerNodeBinding.h"
#include "mozilla/dom/WaveShaperNodeBinding.h"
#include "AudioBuffer.h"
#include "AudioBufferSourceNode.h"
@@ -245,13 +261,9 @@ bool AudioContext::CheckClosed(ErrorResult& aRv)
already_AddRefed<AudioBufferSourceNode>
AudioContext::CreateBufferSource(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<AudioBufferSourceNode> bufferNode =
new AudioBufferSourceNode(this);
return bufferNode.forget();
return AudioBufferSourceNode::Create(nullptr, *this,
AudioBufferSourceOptions(),
aRv);
}
already_AddRefed<ConstantSourceNode>
@@ -303,18 +315,8 @@ bool IsValidBufferSize(uint32_t aBufferSize) {
already_AddRefed<MediaStreamAudioDestinationNode>
AudioContext::CreateMediaStreamDestination(ErrorResult& aRv)
{
if (mIsOffline) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<MediaStreamAudioDestinationNode> node =
new MediaStreamAudioDestinationNode(this);
return node.forget();
return MediaStreamAudioDestinationNode::Create(*this, AudioNodeOptions(),
aRv);
}
already_AddRefed<ScriptProcessorNode>
@@ -344,181 +346,93 @@ AudioContext::CreateScriptProcessor(uint32_t aBufferSize,
already_AddRefed<AnalyserNode>
AudioContext::CreateAnalyser(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<AnalyserNode> analyserNode = new AnalyserNode(this);
return analyserNode.forget();
return AnalyserNode::Create(*this, AnalyserOptions(), aRv);
}
already_AddRefed<StereoPannerNode>
AudioContext::CreateStereoPanner(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<StereoPannerNode> stereoPannerNode = new StereoPannerNode(this);
return stereoPannerNode.forget();
return StereoPannerNode::Create(*this, StereoPannerOptions(), aRv);
}
already_AddRefed<MediaElementAudioSourceNode>
AudioContext::CreateMediaElementSource(HTMLMediaElement& aMediaElement,
ErrorResult& aRv)
{
if (mIsOffline) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
MediaElementAudioSourceOptions options;
options.mMediaElement = aMediaElement;
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<DOMMediaStream> stream =
aMediaElement.CaptureAudio(aRv, mDestination->Stream()->Graph());
if (aRv.Failed()) {
return nullptr;
}
return MediaElementAudioSourceNode::Create(this, stream, aRv);
return MediaElementAudioSourceNode::Create(*this, options, aRv);
}
already_AddRefed<MediaStreamAudioSourceNode>
AudioContext::CreateMediaStreamSource(DOMMediaStream& aMediaStream,
ErrorResult& aRv)
{
if (mIsOffline) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
MediaStreamAudioSourceOptions options;
options.mMediaStream = aMediaStream;
if (CheckClosed(aRv)) {
return nullptr;
}
return MediaStreamAudioSourceNode::Create(this, &aMediaStream, aRv);
return MediaStreamAudioSourceNode::Create(*this, options, aRv);
}
already_AddRefed<GainNode>
AudioContext::CreateGain(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<GainNode> gainNode = new GainNode(this);
return gainNode.forget();
return GainNode::Create(*this, GainOptions(), aRv);
}
already_AddRefed<WaveShaperNode>
AudioContext::CreateWaveShaper(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<WaveShaperNode> waveShaperNode = new WaveShaperNode(this);
return waveShaperNode.forget();
return WaveShaperNode::Create(*this, WaveShaperOptions(), aRv);
}
already_AddRefed<DelayNode>
AudioContext::CreateDelay(double aMaxDelayTime, ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
if (aMaxDelayTime > 0. && aMaxDelayTime < 180.) {
RefPtr<DelayNode> delayNode = new DelayNode(this, aMaxDelayTime);
return delayNode.forget();
}
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
DelayOptions options;
options.mMaxDelayTime = aMaxDelayTime;
return DelayNode::Create(*this, options, aRv);
}
already_AddRefed<PannerNode>
AudioContext::CreatePanner(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<PannerNode> pannerNode = new PannerNode(this);
mPannerNodes.PutEntry(pannerNode);
return pannerNode.forget();
return PannerNode::Create(*this, PannerOptions(), aRv);
}
already_AddRefed<ConvolverNode>
AudioContext::CreateConvolver(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<ConvolverNode> convolverNode = new ConvolverNode(this);
return convolverNode.forget();
return ConvolverNode::Create(nullptr, *this, ConvolverOptions(), aRv);
}
already_AddRefed<ChannelSplitterNode>
AudioContext::CreateChannelSplitter(uint32_t aNumberOfOutputs, ErrorResult& aRv)
{
if (aNumberOfOutputs == 0 ||
aNumberOfOutputs > WebAudioUtils::MaxChannelCount) {
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;
}
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<ChannelSplitterNode> splitterNode =
new ChannelSplitterNode(this, aNumberOfOutputs);
return splitterNode.forget();
ChannelSplitterOptions options;
options.mNumberOfOutputs = aNumberOfOutputs;
return ChannelSplitterNode::Create(*this, options, aRv);
}
already_AddRefed<ChannelMergerNode>
AudioContext::CreateChannelMerger(uint32_t aNumberOfInputs, ErrorResult& aRv)
{
if (aNumberOfInputs == 0 ||
aNumberOfInputs > WebAudioUtils::MaxChannelCount) {
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;
}
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<ChannelMergerNode> mergerNode =
new ChannelMergerNode(this, aNumberOfInputs);
return mergerNode.forget();
ChannelMergerOptions options;
options.mNumberOfInputs = aNumberOfInputs;
return ChannelMergerNode::Create(*this, options, aRv);
}
already_AddRefed<DynamicsCompressorNode>
AudioContext::CreateDynamicsCompressor(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<DynamicsCompressorNode> compressorNode =
new DynamicsCompressorNode(this);
return compressorNode.forget();
return DynamicsCompressorNode::Create(*this, DynamicsCompressorOptions(), aRv);
}
already_AddRefed<BiquadFilterNode>
AudioContext::CreateBiquadFilter(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<BiquadFilterNode> filterNode =
new BiquadFilterNode(this);
return filterNode.forget();
return BiquadFilterNode::Create(*this, BiquadFilterOptions(), aRv);
}
already_AddRefed<IIRFilterNode>
@@ -526,47 +440,16 @@ AudioContext::CreateIIRFilter(const mozilla::dom::binding_detail::AutoSequence<d
const mozilla::dom::binding_detail::AutoSequence<double>& aFeedback,
mozilla::ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
if (aFeedforward.Length() == 0 || aFeedforward.Length() > 20) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
if (aFeedback.Length() == 0 || aFeedback.Length() > 20) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
bool feedforwardAllZeros = true;
for (size_t i = 0; i < aFeedforward.Length(); ++i) {
if (aFeedforward.Elements()[i] != 0.0) {
feedforwardAllZeros = false;
}
}
if (feedforwardAllZeros || aFeedback.Elements()[0] == 0.0) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return nullptr;
}
RefPtr<IIRFilterNode> filterNode =
new IIRFilterNode(this, aFeedforward, aFeedback);
return filterNode.forget();
IIRFilterOptions options;
options.mFeedforward = aFeedforward;
options.mFeedback = aFeedback;
return IIRFilterNode::Create(*this, options, aRv);
}
already_AddRefed<OscillatorNode>
AudioContext::CreateOscillator(ErrorResult& aRv)
{
if (CheckClosed(aRv)) {
return nullptr;
}
RefPtr<OscillatorNode> oscillatorNode =
new OscillatorNode(this);
return oscillatorNode.forget();
return OscillatorNode::Create(*this, OscillatorOptions(), aRv);
}
already_AddRefed<PeriodicWave>
+2 -2
View File
@@ -316,6 +316,8 @@ public:
IMPL_EVENT_HANDLER(mozinterruptbegin)
IMPL_EVENT_HANDLER(mozinterruptend)
bool CheckClosed(ErrorResult& aRv);
private:
void DisconnectFromWindow();
void RemoveFromDecodeQueue(WebAudioDecodeJob* aDecodeJob);
@@ -326,8 +328,6 @@ private:
friend struct ::mozilla::WebAudioDecodeJob;
bool CheckClosed(ErrorResult& aRv);
nsTArray<MediaStream*> GetAllStreams() const;
private:
+22
View File
@@ -71,6 +71,28 @@ AudioNode::~AudioNode()
}
}
void
AudioNode::Initialize(const AudioNodeOptions& aOptions, ErrorResult& aRv)
{
if (aOptions.mChannelCount.WasPassed()) {
SetChannelCount(aOptions.mChannelCount.Value(), aRv);
if (NS_WARN_IF(aRv.Failed())) {
return;
}
}
if (aOptions.mChannelCountMode.WasPassed()) {
SetChannelCountModeValue(aOptions.mChannelCountMode.Value(), aRv);
if (NS_WARN_IF(aRv.Failed())) {
return;
}
}
if (aOptions.mChannelInterpretation.WasPassed()) {
SetChannelInterpretationValue(aOptions.mChannelInterpretation.Value());
}
}
size_t
AudioNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
+3
View File
@@ -250,6 +250,9 @@ private:
bool DisconnectFromOutputIfConnected(uint32_t aOutputIndex, uint32_t aInputIndex);
protected:
// Helper for the Constructors for nodes.
void Initialize(const AudioNodeOptions& aOptions, ErrorResult& aRv);
// Helpers for sending different value types to streams
void SendDoubleParameterToStream(uint32_t aIndex, double aValue);
void SendInt32ParameterToStream(uint32_t aIndex, int32_t aValue);
+22 -1
View File
@@ -262,8 +262,29 @@ BiquadFilterNode::BiquadFilterNode(AudioContext* aContext)
aContext->Graph());
}
BiquadFilterNode::~BiquadFilterNode()
/* static */ already_AddRefed<BiquadFilterNode>
BiquadFilterNode::Create(AudioContext& aAudioContext,
const BiquadFilterOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<BiquadFilterNode> audioNode = new BiquadFilterNode(&aAudioContext);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
audioNode->SetType(aOptions.mType);
audioNode->Q()->SetValue(aOptions.mQ);
audioNode->Detune()->SetValue(aOptions.mDetune);
audioNode->Frequency()->SetValue(aOptions.mFrequency);
audioNode->Gain()->SetValue(aOptions.mGain);
return audioNode.forget();
}
size_t
+14 -5
View File
@@ -14,15 +14,25 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct BiquadFilterOptions;
class BiquadFilterNode final : public AudioNode
{
public:
explicit BiquadFilterNode(AudioContext* aContext);
static already_AddRefed<BiquadFilterNode>
Create(AudioContext& aAudioContext, const BiquadFilterOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(BiquadFilterNode, AudioNode)
static already_AddRefed<BiquadFilterNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const BiquadFilterOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
BiquadFilterType Type() const
@@ -63,10 +73,10 @@ public:
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~BiquadFilterNode();
private:
explicit BiquadFilterNode(AudioContext* aContext);
~BiquadFilterNode() = default;
BiquadFilterType mType;
RefPtr<AudioParam> mFrequency;
RefPtr<AudioParam> mDetune;
@@ -78,4 +88,3 @@ private:
} // namespace mozilla
#endif
+23 -2
View File
@@ -74,8 +74,30 @@ ChannelMergerNode::ChannelMergerNode(AudioContext* aContext,
aContext->Graph());
}
ChannelMergerNode::~ChannelMergerNode()
/* static */ already_AddRefed<ChannelMergerNode>
ChannelMergerNode::Create(AudioContext& aAudioContext,
const ChannelMergerOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
if (aOptions.mNumberOfInputs == 0 ||
aOptions.mNumberOfInputs > WebAudioUtils::MaxChannelCount) {
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;
}
RefPtr<ChannelMergerNode> audioNode =
new ChannelMergerNode(&aAudioContext, aOptions.mNumberOfInputs);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
return audioNode.forget();
}
JSObject*
@@ -86,4 +108,3 @@ ChannelMergerNode::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
} // namespace dom
} // namespace mozilla
+15 -6
View File
@@ -12,15 +12,24 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct ChannelMergerOptions;
class ChannelMergerNode final : public AudioNode
{
public:
ChannelMergerNode(AudioContext* aContext,
uint16_t aInputCount);
static already_AddRefed<ChannelMergerNode>
Create(AudioContext& aAudioContext, const ChannelMergerOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
static already_AddRefed<ChannelMergerNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const ChannelMergerOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
uint16_t NumberOfInputs() const override { return mInputCount; }
@@ -35,10 +44,11 @@ public:
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}
protected:
virtual ~ChannelMergerNode();
private:
ChannelMergerNode(AudioContext* aContext,
uint16_t aInputCount);
~ChannelMergerNode() = default;
const uint16_t mInputCount;
};
@@ -46,4 +56,3 @@ private:
} // namespace mozilla
#endif
+23 -2
View File
@@ -65,8 +65,30 @@ ChannelSplitterNode::ChannelSplitterNode(AudioContext* aContext,
aContext->Graph());
}
ChannelSplitterNode::~ChannelSplitterNode()
/* static */ already_AddRefed<ChannelSplitterNode>
ChannelSplitterNode::Create(AudioContext& aAudioContext,
const ChannelSplitterOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
if (aOptions.mNumberOfOutputs == 0 ||
aOptions.mNumberOfOutputs > WebAudioUtils::MaxChannelCount) {
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;
}
RefPtr<ChannelSplitterNode> audioNode =
new ChannelSplitterNode(&aAudioContext, aOptions.mNumberOfOutputs);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
return audioNode.forget();
}
JSObject*
@@ -77,4 +99,3 @@ ChannelSplitterNode::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProt
} // namespace dom
} // namespace mozilla
+15 -6
View File
@@ -12,15 +12,24 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct ChannelSplitterOptions;
class ChannelSplitterNode final : public AudioNode
{
public:
ChannelSplitterNode(AudioContext* aContext,
uint16_t aOutputCount);
static already_AddRefed<ChannelSplitterNode>
Create(AudioContext& aAudioContext, const ChannelSplitterOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
static already_AddRefed<ChannelSplitterNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const ChannelSplitterOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
uint16_t NumberOfOutputs() const override { return mOutputCount; }
@@ -35,10 +44,11 @@ public:
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}
protected:
virtual ~ChannelSplitterNode();
private:
ChannelSplitterNode(AudioContext* aContext,
uint16_t aOutputCount);
~ChannelSplitterNode() = default;
const uint16_t mOutputCount;
};
@@ -46,4 +56,3 @@ private:
} // namespace mozilla
#endif
+27 -2
View File
@@ -203,8 +203,34 @@ ConvolverNode::ConvolverNode(AudioContext* aContext)
aContext->Graph());
}
ConvolverNode::~ConvolverNode()
/* static */ already_AddRefed<ConvolverNode>
ConvolverNode::Create(JSContext* aCx, AudioContext& aAudioContext,
const ConvolverOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<ConvolverNode> audioNode = new ConvolverNode(&aAudioContext);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
// This must be done before setting the buffer.
audioNode->SetNormalize(!aOptions.mDisableNormalization);
if (aOptions.mBuffer.WasPassed()) {
MOZ_ASSERT(aCx);
audioNode->SetBuffer(aCx, aOptions.mBuffer.Value(), aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
}
return audioNode.forget();
}
size_t
@@ -291,4 +317,3 @@ ConvolverNode::SetNormalize(bool aNormalize)
} // namespace dom
} // namespace mozilla
+17 -6
View File
@@ -12,14 +12,26 @@
namespace mozilla {
namespace dom {
class AudioContext;
struct ConvolverOptions;
class ConvolverNode final : public AudioNode
{
public:
explicit ConvolverNode(AudioContext* aContext);
static already_AddRefed<ConvolverNode>
Create(JSContext* aCx, AudioContext& aAudioContext,
const ConvolverOptions& aOptions, ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ConvolverNode, AudioNode);
static already_AddRefed<ConvolverNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const ConvolverOptions& aOptions, ErrorResult& aRv)
{
return Create(aGlobal.Context(), aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
AudioBuffer* GetBuffer(JSContext* aCx) const
@@ -27,7 +39,7 @@ public:
return mBuffer;
}
void SetBuffer(JSContext* aCx, AudioBuffer* aBufferi, ErrorResult& aRv);
void SetBuffer(JSContext* aCx, AudioBuffer* aBuffer, ErrorResult& aRv);
bool Normalize() const
{
@@ -61,10 +73,10 @@ public:
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~ConvolverNode();
private:
explicit ConvolverNode(AudioContext* aContext);
~ConvolverNode() = default;
RefPtr<AudioBuffer> mBuffer;
bool mNormalize;
};
@@ -74,4 +86,3 @@ private:
} //end namespace mozilla
#endif
+23 -1
View File
@@ -205,8 +205,30 @@ DelayNode::DelayNode(AudioContext* aContext, double aMaxDelay)
aContext->Graph());
}
DelayNode::~DelayNode()
/* static */ already_AddRefed<DelayNode>
DelayNode::Create(AudioContext& aAudioContext,
const DelayOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
if (aOptions.mMaxDelayTime <= 0. || aOptions.mMaxDelayTime >= 180.) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
RefPtr<DelayNode> audioNode = new DelayNode(&aAudioContext,
aOptions.mMaxDelayTime);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
audioNode->DelayTime()->SetValue(aOptions.mDelayTime);
return audioNode.forget();
}
size_t
+14 -6
View File
@@ -13,15 +13,25 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct DelayOptions;
class DelayNode final : public AudioNode
{
public:
DelayNode(AudioContext* aContext, double aMaxDelay);
static already_AddRefed<DelayNode>
Create(AudioContext& aAudioContext, const DelayOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DelayNode, AudioNode)
static already_AddRefed<DelayNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const DelayOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
AudioParam* DelayTime() const
@@ -37,13 +47,12 @@ public:
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~DelayNode();
private:
DelayNode(AudioContext* aContext, double aMaxDelay);
~DelayNode() = default;
friend class DelayNodeEngine;
private:
RefPtr<AudioParam> mDelay;
};
@@ -51,4 +60,3 @@ private:
} // namespace mozilla
#endif
+23 -1
View File
@@ -204,8 +204,30 @@ DynamicsCompressorNode::DynamicsCompressorNode(AudioContext* aContext)
aContext->Graph());
}
DynamicsCompressorNode::~DynamicsCompressorNode()
/* static */ already_AddRefed<DynamicsCompressorNode>
DynamicsCompressorNode::Create(AudioContext& aAudioContext,
const DynamicsCompressorOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<DynamicsCompressorNode> audioNode =
new DynamicsCompressorNode(&aAudioContext);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
audioNode->Attack()->SetValue(aOptions.mAttack);
audioNode->Knee()->SetValue(aOptions.mKnee);
audioNode->Ratio()->SetValue(aOptions.mRatio);
audioNode->GetRelease()->SetValue(aOptions.mRelease);
audioNode->Threshold()->SetValue(aOptions.mThreshold);
return audioNode.forget();
}
size_t
+14 -5
View File
@@ -13,15 +13,25 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct DynamicsCompressorOptions;
class DynamicsCompressorNode final : public AudioNode
{
public:
explicit DynamicsCompressorNode(AudioContext* aContext);
static already_AddRefed<DynamicsCompressorNode>
Create(AudioContext& aAudioContext, const DynamicsCompressorOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DynamicsCompressorNode, AudioNode)
static already_AddRefed<DynamicsCompressorNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const DynamicsCompressorOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
AudioParam* Threshold() const
@@ -69,10 +79,10 @@ public:
mReduction = aReduction;
}
protected:
virtual ~DynamicsCompressorNode();
private:
explicit DynamicsCompressorNode(AudioContext* aContext);
~DynamicsCompressorNode() = default;
RefPtr<AudioParam> mThreshold;
RefPtr<AudioParam> mKnee;
RefPtr<AudioParam> mRatio;
@@ -85,4 +95,3 @@ private:
} // namespace mozilla
#endif
+17 -1
View File
@@ -128,8 +128,24 @@ GainNode::GainNode(AudioContext* aContext)
aContext->Graph());
}
GainNode::~GainNode()
/* static */ already_AddRefed<GainNode>
GainNode::Create(AudioContext& aAudioContext,
const GainOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<GainNode> audioNode = new GainNode(&aAudioContext);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
audioNode->Gain()->SetValue(aOptions.mGain);
return audioNode.forget();
}
size_t
+14 -5
View File
@@ -13,15 +13,25 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct GainOptions;
class GainNode final : public AudioNode
{
public:
explicit GainNode(AudioContext* aContext);
static already_AddRefed<GainNode>
Create(AudioContext& aAudioContext, const GainOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(GainNode, AudioNode)
static already_AddRefed<GainNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const GainOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
AudioParam* Gain() const
@@ -37,10 +47,10 @@ public:
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~GainNode();
private:
explicit GainNode(AudioContext* aContext);
~GainNode() = default;
RefPtr<AudioParam> mGain;
};
@@ -48,4 +58,3 @@ private:
} // namespace mozilla
#endif
+41 -3
View File
@@ -138,8 +138,8 @@ private:
};
IIRFilterNode::IIRFilterNode(AudioContext* aContext,
const mozilla::dom::binding_detail::AutoSequence<double>& aFeedforward,
const mozilla::dom::binding_detail::AutoSequence<double>& aFeedback)
const Sequence<double>& aFeedforward,
const Sequence<double>& aFeedback)
: AudioNode(aContext,
2,
ChannelCountMode::Max,
@@ -173,8 +173,46 @@ IIRFilterNode::IIRFilterNode(AudioContext* aContext,
aContext->Graph());
}
IIRFilterNode::~IIRFilterNode()
/* static */ already_AddRefed<IIRFilterNode>
IIRFilterNode::Create(AudioContext& aAudioContext,
const IIRFilterOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
if (aOptions.mFeedforward.Length() == 0 || aOptions.mFeedforward.Length() > 20) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
if (aOptions.mFeedback.Length() == 0 || aOptions.mFeedback.Length() > 20) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
bool feedforwardAllZeros = true;
for (size_t i = 0; i < aOptions.mFeedforward.Length(); ++i) {
if (aOptions.mFeedforward.Elements()[i] != 0.0) {
feedforwardAllZeros = false;
}
}
if (feedforwardAllZeros || aOptions.mFeedback.Elements()[0] == 0.0) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return nullptr;
}
RefPtr<IIRFilterNode> audioNode =
new IIRFilterNode(&aAudioContext, aOptions.mFeedforward, aOptions.mFeedback);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
return audioNode.forget();
}
size_t
+18 -10
View File
@@ -14,18 +14,25 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct IIRFilterOptions;
class IIRFilterNode final : public AudioNode
{
public:
explicit IIRFilterNode(AudioContext* aContext,
const mozilla::dom::binding_detail::AutoSequence<double>& aFeedforward,
const mozilla::dom::binding_detail::AutoSequence<double>& aFeedback);
static already_AddRefed<IIRFilterNode>
Create(AudioContext& aAudioContext, const IIRFilterOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
static already_AddRefed<IIRFilterNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const IIRFilterOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
void GetFrequencyResponse(const Float32Array& aFrequencyHz,
const Float32Array& aMagResponse,
@@ -39,16 +46,17 @@ public:
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~IIRFilterNode();
private:
nsTArray<double> mFeedback;
nsTArray<double> mFeedforward;
IIRFilterNode(AudioContext* aContext,
const Sequence<double>& aFeedforward,
const Sequence<double>& aFeedback);
~IIRFilterNode() = default;
nsTArray<double> mFeedback;
nsTArray<double> mFeedforward;
};
} // namespace dom
} // namespace mozilla
#endif
+25
View File
@@ -262,6 +262,9 @@ public:
}
void operator=(SpeexResamplerState* aResampler)
{
if (mResampler) {
speex_resampler_destroy(mResampler);
}
mResampler = aResampler;
}
@@ -400,6 +403,28 @@ MediaDecodeTask::FinishDecode()
while ((mediaData = mAudioQueue.PopFront())) {
RefPtr<AudioData> audioData = mediaData->As<AudioData>();
audioData->EnsureAudioBuffer(); // could lead to a copy :(
if (audioData->mChannels != channelCount) {
if (audioData->mChannels > channelCount) {
MOZ_LOG(gMediaDecoderLog,
LogLevel::Error,
("MediaDecodeTask: Channel count increased from %u to %u mid-stream; "
"this is fatal, stopping decode", channelCount, audioData->mChannels));
ReportFailureOnMainThread(WebAudioDecodeJob::InvalidContent);
return;
}
MOZ_LOG(gMediaDecoderLog,
LogLevel::Verbose,
("MediaDecodeTask: Channel count changed from %u to %u mid-stream, reinitializing resampler",
channelCount, audioData->mChannels));
channelCount = audioData->mChannels;
if (sampleRate != destSampleRate) {
resampler = speex_resampler_init(channelCount, sampleRate, destSampleRate,
SPEEX_RESAMPLER_QUALITY_DEFAULT, nullptr);
speex_resampler_skip_zeros(resampler);
}
}
AudioDataValue* bufferData = static_cast<AudioDataValue*>
(audioData->mAudioBuffer->Data());
@@ -15,13 +15,29 @@ MediaElementAudioSourceNode::MediaElementAudioSourceNode(AudioContext* aContext)
}
/* static */ already_AddRefed<MediaElementAudioSourceNode>
MediaElementAudioSourceNode::Create(AudioContext* aContext,
DOMMediaStream* aStream, ErrorResult& aRv)
MediaElementAudioSourceNode::Create(AudioContext& aAudioContext,
const MediaElementAudioSourceOptions& aOptions,
ErrorResult& aRv)
{
RefPtr<MediaElementAudioSourceNode> node =
new MediaElementAudioSourceNode(aContext);
if (aAudioContext.IsOffline()) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
node->Init(aStream, aRv);
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<MediaElementAudioSourceNode> node =
new MediaElementAudioSourceNode(&aAudioContext);
RefPtr<DOMMediaStream> stream =
aOptions.mMediaElement->CaptureAudio(aRv, aAudioContext.Destination()->Stream()->Graph());
if (aRv.Failed()) {
return nullptr;
}
node->Init(stream, aRv);
if (aRv.Failed()) {
return nullptr;
}
@@ -11,11 +11,23 @@
namespace mozilla {
namespace dom {
class AudioContext;
struct MediaElementAudioSourceOptions;
class MediaElementAudioSourceNode final : public MediaStreamAudioSourceNode
{
public:
static already_AddRefed<MediaElementAudioSourceNode>
Create(AudioContext* aContext, DOMMediaStream* aStream, ErrorResult& aRv);
Create(AudioContext& aAudioContext,
const MediaElementAudioSourceOptions& aOptions,
ErrorResult& aRv);
static already_AddRefed<MediaElementAudioSourceNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const MediaElementAudioSourceOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
@@ -15,7 +15,7 @@
namespace mozilla {
namespace dom {
class AudioDestinationTrackSource :
class AudioDestinationTrackSource final :
public MediaStreamTrackSource
{
public:
@@ -49,7 +49,7 @@ public:
}
private:
virtual ~AudioDestinationTrackSource() {}
~AudioDestinationTrackSource() = default;
RefPtr<MediaStreamAudioDestinationNode> mNode;
};
@@ -101,8 +101,29 @@ MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode(AudioContext* a
mPort = outputStream->AllocateInputPort(mStream, AudioNodeStream::AUDIO_TRACK);
}
MediaStreamAudioDestinationNode::~MediaStreamAudioDestinationNode()
/* static */ already_AddRefed<MediaStreamAudioDestinationNode>
MediaStreamAudioDestinationNode::Create(AudioContext& aAudioContext,
const AudioNodeOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.IsOffline()) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<MediaStreamAudioDestinationNode> audioNode =
new MediaStreamAudioDestinationNode(&aAudioContext);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
return audioNode.forget();
}
size_t
@@ -11,14 +11,26 @@
namespace mozilla {
namespace dom {
class AudioContext;
struct AudioNodeOptions;
class MediaStreamAudioDestinationNode final : public AudioNode
{
public:
explicit MediaStreamAudioDestinationNode(AudioContext* aContext);
static already_AddRefed<MediaStreamAudioDestinationNode>
Create(AudioContext& aAudioContext, const AudioNodeOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaStreamAudioDestinationNode, AudioNode)
static already_AddRefed<MediaStreamAudioDestinationNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const AudioNodeOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
uint16_t NumberOfOutputs() const final override
@@ -41,10 +53,10 @@ public:
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~MediaStreamAudioDestinationNode();
private:
explicit MediaStreamAudioDestinationNode(AudioContext* aContext);
~MediaStreamAudioDestinationNode() = default;
RefPtr<DOMMediaStream> mDOMStream;
RefPtr<MediaInputPort> mPort;
};
@@ -44,13 +44,23 @@ MediaStreamAudioSourceNode::MediaStreamAudioSourceNode(AudioContext* aContext)
}
/* static */ already_AddRefed<MediaStreamAudioSourceNode>
MediaStreamAudioSourceNode::Create(AudioContext* aContext,
DOMMediaStream* aStream, ErrorResult& aRv)
MediaStreamAudioSourceNode::Create(AudioContext& aAudioContext,
const MediaStreamAudioSourceOptions& aOptions,
ErrorResult& aRv)
{
RefPtr<MediaStreamAudioSourceNode> node =
new MediaStreamAudioSourceNode(aContext);
if (aAudioContext.IsOffline()) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
node->Init(aStream, aRv);
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<MediaStreamAudioSourceNode> node =
new MediaStreamAudioSourceNode(&aAudioContext);
node->Init(aOptions.mMediaStream, aRv);
if (aRv.Failed()) {
return nullptr;
}
@@ -14,6 +14,9 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct MediaStreamAudioSourceOptions;
class MediaStreamAudioSourceNodeEngine final : public AudioNodeEngine
{
public:
@@ -45,11 +48,19 @@ class MediaStreamAudioSourceNode : public AudioNode,
{
public:
static already_AddRefed<MediaStreamAudioSourceNode>
Create(AudioContext* aContext, DOMMediaStream* aStream, ErrorResult& aRv);
Create(AudioContext& aContext, const MediaStreamAudioSourceOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaStreamAudioSourceNode, AudioNode)
static already_AddRefed<MediaStreamAudioSourceNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const MediaStreamAudioSourceOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
void DestroyMediaStream() override;
+28 -1
View File
@@ -425,8 +425,35 @@ OscillatorNode::OscillatorNode(AudioContext* aContext)
mStream->AddMainThreadListener(this);
}
OscillatorNode::~OscillatorNode()
/* static */ already_AddRefed<OscillatorNode>
OscillatorNode::Create(AudioContext& aAudioContext,
const OscillatorOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<OscillatorNode> audioNode = new OscillatorNode(&aAudioContext);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
audioNode->SetType(aOptions.mType, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
audioNode->Frequency()->SetValue(aOptions.mFrequency);
audioNode->Detune()->SetValue(aOptions.mDetune);
if (aOptions.mPeriodicWave.WasPassed()) {
audioNode->SetPeriodicWave(aOptions.mPeriodicWave.Value());
}
return audioNode.forget();
}
size_t
+14 -6
View File
@@ -15,16 +15,26 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct OscillatorOptions;
class OscillatorNode final : public AudioNode,
public MainThreadMediaStreamListener
{
public:
explicit OscillatorNode(AudioContext* aContext);
static already_AddRefed<OscillatorNode>
Create(AudioContext& aAudioContext, const OscillatorOptions& aOptions,
ErrorResult& aRv);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(OscillatorNode, AudioNode)
static already_AddRefed<OscillatorNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const OscillatorOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
void DestroyMediaStream() override;
@@ -81,14 +91,13 @@ public:
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~OscillatorNode();
private:
explicit OscillatorNode(AudioContext* aContext);
~OscillatorNode() = default;
void SendTypeToStream();
void SendPeriodicWaveToStream();
private:
OscillatorType mType;
RefPtr<PeriodicWave> mPeriodicWave;
RefPtr<AudioParam> mFrequency;
@@ -100,4 +109,3 @@ private:
} // namespace mozilla
#endif
+32 -1
View File
@@ -329,6 +329,38 @@ PannerNode::~PannerNode()
}
}
/* static */ already_AddRefed<PannerNode>
PannerNode::Create(AudioContext& aAudioContext,
const PannerOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<PannerNode> audioNode = new PannerNode(&aAudioContext);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
audioNode->SetPanningModel(aOptions.mPanningModel);
audioNode->SetDistanceModel(aOptions.mDistanceModel);
audioNode->SetPosition(aOptions.mPositionX, aOptions.mPositionY,
aOptions.mPositionZ);
audioNode->SetOrientation(aOptions.mOrientationX, aOptions.mOrientationY,
aOptions.mOrientationZ);
audioNode->SetRefDistance(aOptions.mRefDistance);
audioNode->SetMaxDistance(aOptions.mMaxDistance);
audioNode->SetRolloffFactor(aOptions.mRolloffFactor);
audioNode->SetConeInnerAngle(aOptions.mConeInnerAngle);
audioNode->SetConeOuterAngle(aOptions.mConeOuterAngle);
audioNode->SetConeOuterGain(aOptions.mConeOuterGain);
return audioNode.forget();
}
void PannerNode::SetPanningModel(PanningModelType aPanningModel)
{
mPanningModel = aPanningModel;
@@ -784,4 +816,3 @@ PannerNode::SendDopplerToSourcesIfNeeded()
} // namespace dom
} // namespace mozilla
+15 -5
View File
@@ -19,13 +19,24 @@ namespace dom {
class AudioContext;
class AudioBufferSourceNode;
struct PannerOptions;
class PannerNode final : public AudioNode,
public SupportsWeakPtr<PannerNode>
{
public:
static already_AddRefed<PannerNode>
Create(AudioContext& aAudioContext, const PannerOptions& aOptions,
ErrorResult& aRv);
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(PannerNode)
explicit PannerNode(AudioContext* aContext);
static already_AddRefed<PannerNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const PannerOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
@@ -229,10 +240,10 @@ public:
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~PannerNode();
private:
explicit PannerNode(AudioContext* aContext);
~PannerNode();
friend class AudioListener;
friend class PannerNodeEngine;
enum EngineParameters {
@@ -292,4 +303,3 @@ private:
} // namespace mozilla
#endif
+26 -1
View File
@@ -43,6 +43,32 @@ PeriodicWave::PeriodicWave(AudioContext* aContext,
mCoefficients->SetData(1, nullptr, free, buffer+aLength);
}
/* static */ already_AddRefed<PeriodicWave>
PeriodicWave::Constructor(const GlobalObject& aGlobal,
AudioContext& aAudioContext,
const PeriodicWaveOptions& aOptions,
ErrorResult& aRv)
{
if (!aOptions.mReal.WasPassed() || !aOptions.mImag.WasPassed() ||
aOptions.mReal.Value().Length() != aOptions.mImag.Value().Length() ||
aOptions.mReal.Value().Length() == 0) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
RefPtr<PeriodicWave> wave =
new PeriodicWave(&aAudioContext, aOptions.mReal.Value().Elements(),
aOptions.mImag.Value().Elements(),
aOptions.mReal.Value().Length(),
aOptions.mDisableNormalization,
aRv);
if (aRv.Failed()) {
return nullptr;
}
return wave.forget();
}
size_t
PeriodicWave::SizeOfExcludingThisIfNotShared(MallocSizeOf aMallocSizeOf) const
{
@@ -70,4 +96,3 @@ PeriodicWave::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
} // namespace dom
} // namespace mozilla
+8 -1
View File
@@ -16,6 +16,9 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct PeriodicWaveOptions;
class PeriodicWave final : public nsWrapperCache
{
public:
@@ -29,6 +32,10 @@ public:
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(PeriodicWave)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(PeriodicWave)
static already_AddRefed<PeriodicWave>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const PeriodicWaveOptions& aOptions, ErrorResult& aRv);
AudioContext* GetParentObject() const
{
return mContext;
@@ -55,7 +62,7 @@ public:
size_t SizeOfIncludingThisIfNotShared(MallocSizeOf aMallocSizeOf) const;
private:
~PeriodicWave() {}
~PeriodicWave() = default;
RefPtr<AudioContext> mContext;
RefPtr<ThreadSharedFloatArrayBufferList> mCoefficients;
+17 -1
View File
@@ -182,8 +182,24 @@ StereoPannerNode::StereoPannerNode(AudioContext* aContext)
aContext->Graph());
}
StereoPannerNode::~StereoPannerNode()
/* static */ already_AddRefed<StereoPannerNode>
StereoPannerNode::Create(AudioContext& aAudioContext,
const StereoPannerOptions& aOptions,
ErrorResult& aRv)
{
if (aAudioContext.CheckClosed(aRv)) {
return nullptr;
}
RefPtr<StereoPannerNode> audioNode = new StereoPannerNode(&aAudioContext);
audioNode->Initialize(aOptions, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
audioNode->Pan()->SetValue(aOptions.mPan);
return audioNode.forget();
}
size_t
+15 -5
View File
@@ -13,12 +13,23 @@ namespace mozilla {
namespace dom {
class AudioContext;
struct StereoPannerOptions;
class StereoPannerNode final : public AudioNode
{
public:
static already_AddRefed<StereoPannerNode>
Create(AudioContext& aAudioContext, const StereoPannerOptions& aOptions,
ErrorResult& aRv);
MOZ_DECLARE_REFCOUNTED_TYPENAME(StereoPannerNode)
explicit StereoPannerNode(AudioContext* aContext);
static already_AddRefed<StereoPannerNode>
Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
const StereoPannerOptions& aOptions, ErrorResult& aRv)
{
return Create(aAudioContext, aOptions, aRv);
}
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
@@ -55,10 +66,10 @@ public:
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
protected:
virtual ~StereoPannerNode();
private:
explicit StereoPannerNode(AudioContext* aContext);
~StereoPannerNode() = default;
RefPtr<AudioParam> mPan;
};
@@ -66,4 +77,3 @@ private:
} // namespace mozilla
#endif
Loaded 100 of 8561 files, more files were not shown because too many files have changed in this diff. Show more