Commit Graph

11509 Commits

Author SHA1 Message Date
Lord-McSweeney 24d194a8b1 avm2: Propagate normal error for bad Multiname read in verifier 2024-03-06 07:21:28 -08:00
Lord-McSweeney 41bac2ce98 tests: Add another verification test 2024-03-06 07:21:28 -08:00
Lord-McSweeney 2ff4bf5634 tests: Improve verification test 2024-03-06 07:21:28 -08:00
Lord-McSweeney 9a1196a7a0 avm2: Fix bugs and resolve reviews 2024-03-06 07:21:28 -08:00
Lord-McSweeney c98d61c376 avm2: Add a `make_error_1021` function and use it 2024-03-06 07:21:28 -08:00
Lord-McSweeney f28928dbc9 avm2: Match verifier reading implementation with FP's 2024-03-06 07:21:28 -08:00
Kamil Jarosz c260a45603 core: Close sockets and timers when replacing the root movie
Turns out that the comment from `set_root_movie` was right all along!
`set_root_movie` should not be used when replacing the root movie,
because it will leave out unclosed resources.
This patch introduces `replace_root_movie`, which is dedicated to be
used when replacing (instead of just setting) the root movie.

The best solution would be to use RAII, e.g. destroy and recreate
the whole Player instance, but this patch is a first step towards
proper resource control.
2024-03-05 23:14:08 +01:00
Kamil Jarosz 3d04971ae4 desktop: Make WinitAsyncExecutor thread-safe and prevent deadlocks
Not thread-safe WinitAsyncExecutor was wrapped with a Mutex, making
any access to the instance exclusive. It was problematic, because
when a task was awoken from within another task, it resulted in
a deadlock, because the mutex was not reentrant.

This patch makes WinitAsyncExecutor thread-safe and changes how tasks
are locked. Specifically, instead of locking all tasks, only
the currently executed task is being locked. This allows waking any
other task from within it.
2024-03-05 23:14:08 +01:00
Crowdin Bot de8f63ec88 chore: Update translations from Crowdin 2024-03-05 22:56:34 +01:00
TÖRÖK Attila 18cda28f62 chore: Update cargo-deny configuration to version 2 2024-03-05 21:21:42 +01:00
Tom Schuster 587fdff1ac chore: Update `cpal` to `0.15.3`
This reduces the number of duplicate `nix` versions by one.
2024-03-05 14:24:29 +01:00
Nathan Adams 571f60abff desktop: Document preferences a little 2024-03-05 00:02:27 +01:00
Nathan Adams c713f56ac0 desktop: Allow changing the audio output device 2024-03-05 00:02:27 +01:00
Nathan Adams 09dfa6427e desktop: Allow changing the language in Preferences 2024-03-05 00:02:27 +01:00
Nathan Adams baa0c5c7cd desktop: Use custom (de)serialization for preferences, not serde 2024-03-05 00:02:27 +01:00
Nathan Adams ed56c70b55 desktop: Only show possibly-available backends for the current system 2024-03-05 00:02:27 +01:00
Nathan Adams d62963c2d4 desktop: Rename config.rs to preferences.rs 2024-03-05 00:02:27 +01:00
Nathan Adams 8b589a9620 desktop: If the preferred graphics backend is unavailable, pick another one and warn 2024-03-05 00:02:27 +01:00
Nathan Adams b9c6db1cb9 desktop: Add preferences dialog, allow setting of graphics backend/power 2024-03-05 00:02:27 +01:00
Nathan Adams 8df7efb662 desktop: Load graphics preferences from disk 2024-03-05 00:02:27 +01:00
Nathan Adams acd01e2eb0 desktop: Add GlobalPreferences struct, prep for storing preferences to disk 2024-03-05 00:02:27 +01:00
Nathan Adams 6136d14179 desktop: Add --save-directory 2024-03-05 00:02:27 +01:00
Nathan Adams 145275af86 desktop: Remove backwards compatibility code from 3 years ago 2024-03-05 00:02:27 +01:00
TÖRÖK Attila 1e7954c69d ci: Don't exclude .wasm files from Firefox extension reproducibility testing 2024-03-04 23:45:29 +01:00
TÖRÖK Attila c635124aad web: Put wasm-opt back into the extension builder Docker image 2024-03-04 23:45:29 +01:00
renovate[bot] 821469e87c chore(deps): update node.js dependencies 2024-03-04 22:46:01 +01:00
renovate[bot] fae1c458ec fix(deps): update rust dependencies 2024-03-04 22:18:19 +01:00
TÖRÖK Attila 2e52ee9f33 chore: Bump `js-sys` and `web-sys` to `v0.3.69` 2024-03-04 19:01:04 +01:00
TÖRÖK Attila 7f268bf50e chore: Update `wasm-bindgen` to `v0.2.92`, wasm-bindgen-futures to `v0.4.42` 2024-03-04 19:01:04 +01:00
TÖRÖK Attila 755fa6cded chore: Switch `fluent-templates` back from `master` to `v0.9.0` 2024-03-04 11:05:08 +01:00
TÖRÖK Attila 85dd258168 cleanup: Remove a stale workaround for a `generational-arena` bug 2024-03-03 21:18:39 +01:00
TÖRÖK Attila 1bc4d9fd84 doc: Remove `generational-arena` from LICENSE.md, update slotmap copyright year 2024-03-03 21:18:39 +01:00
TÖRÖK Attila 9e8c406cd9 desktop: Introduce a `TaskKey` type for the slotmap in `executor.rs` 2024-03-03 21:18:39 +01:00
TÖRÖK Attila 8764c08b01 cleanup: Define distinct key types for different kinds of slotmaps 2024-03-03 21:18:39 +01:00
TÖRÖK Attila 5bfd8af257 cleanup: Rename `Handle` in `loader.rs` to `LoaderHandle` to follow convention 2024-03-03 21:18:39 +01:00
Adrian Wielgosik 17c5b38bb1 avm2: Only construct type_error on error in astype, instanceof 2024-03-03 20:58:54 +01:00
MrCheeze a119e3e130 core: Improve placement of cursor when clicking in textbox
Currently when clicking in a textbox, the cursor will only be placed
correctly if you click exactly on top of a letter. The basic purpose of
this commit is to make it so that clicking in the surrounding margin
will put the cursor in the closest available position, as in Flash Player.

The logic is a bit complex because a single row of text can contain
multiple layout boxes, each with a different Y offset (but all with the
same Y extent). To be accurate, we need to treat each layout box in the
row "as if" it had the same Y offset that the tallest box in its row has.

This commit also contains a fix for an issue where lower_from_text_spans
was passing the wrong text strings and indexes to fixup_line for
newlines, which needed to be fixed in order to be able to click to place
the cursor in an empty row that was created by newlines.
2024-03-02 20:30:50 +01:00
Lv Yitian 556d16302b
avm2: Implement flash.media.ID3Info (#14916) 2024-03-02 19:13:31 +00:00
TÖRÖK Attila 5b920b8447 chore: Deduplicate the `fluent-templates` dependency 2024-03-02 19:54:00 +01:00
TÖRÖK Attila 55773f0205 chore: Replace `generational-arena` with `slotmap` 2024-03-02 19:42:11 +01:00
renovate[bot] 90bf13ebd2 fix(deps): update rust crate winit to 0.29.13 2024-03-02 19:17:37 +01:00
TÖRÖK Attila 5b7c48e43d web: No longer set the `web_sys_unstable_apis` config variable 2024-03-02 16:13:43 +01:00
renovate[bot] c2179e88db fix(deps): update rust dependencies 2024-03-02 10:05:43 +01:00
renovate[bot] 35d72115a4 fix(deps): update wasm-bindgen 2024-03-02 02:42:45 +01:00
renovate[bot] 8b8d028816 chore: Bump wgpu to 0.19.3, naga to 0.19.2 2024-03-01 23:58:50 +01:00
Kamil Jarosz bb79e8ad5d web: Close sockets properly
This patch ensures that sockets are closed properly.
Without it, when the application-end of the socket was closed,
the other end was left intact, and the socket was not closed.
2024-03-01 23:16:10 +01:00
renovate[bot] 6e84b05b66 fix(deps): update rust dependencies 2024-03-01 22:46:32 +01:00
TÖRÖK Attila 10fa4175c4 chore: Bump jpegxr and nellymoser-rs git references 2024-03-01 21:54:18 +01:00
Daniel Jacobs 9a7a92fd9e web: Don't panic on browsers without ReadableStreamDefaultController 2024-03-01 13:26:38 -05:00
Kamil Jarosz a0f2941a2e desktop: Update winit to 0.29.12
This fixes critical crashes on X11
2024-03-01 12:10:37 +01:00