Commit Graph

11155 Commits

Author SHA1 Message Date
Nathan Adams 7e4ac986f2 core: Add FontFace struct, for loading a Font from a file binary 2024-01-08 23:00:18 +01:00
nosamu d97314d315 extension: Bail if postMessage event has no data
Fixes #14486
2024-01-08 18:30:44 +01:00
Aaron Hill 6c2e28a08f Correctly handle zero-frame MovieClip
A MovieClip with zero frames can still have a child added
through ActionScript, which ticks normally.
2024-01-08 08:19:17 -05:00
Daniel Jacobs f8219a06e0 docs: Use new location for sponsor logos 2024-01-08 00:47:12 -05:00
Daniel Jacobs b43981f3d9 docs: Update README to point to the new logo SVG location 2024-01-08 00:47:12 -05:00
renovate[bot] a328deab11 fix(deps): update rust dependencies 2024-01-08 02:59:04 +01:00
Aaron Hill 47db84473a avm2: Improve handling of Stage3D profile
We now validate the passed in profile, and return the selected profile
from 'Context3D.profile'. We don't yet alter the available
registers/textures based on the profile.
2024-01-07 22:34:33 +01:00
Aaron Hill 3156bf31ce avm2: Throw correct errors in Graphics.[drawPath,drawGraphicsData]
This is pretty straightforward, except for the fact that Flash
completely ignores the provided commands when the 'data' vector
is empty (if 'data' has even a single entry, then Flash will validate
that all of the commands have the correct amount of data to run).

One SWF that I tested relies on this behavior.
2024-01-07 19:57:47 +01:00
Tom Schuster e0abe72da4 avm2: Stub more TextField getLine methods 2024-01-07 12:29:26 -05:00
TÖRÖK Attila 857c3af64f ci: Allow retrying Rust tests, when also running visual tests, temporarily
Because of a crash in the Ubuntu 22.04 graphics drivers.
2024-01-07 05:58:13 +01:00
TÖRÖK Attila 8215ff6fbf ci: Only check formatting and documentation on Linux
To speed up the rest of the runners - they were doing
duplicate work anyway.
2024-01-07 05:58:13 +01:00
TÖRÖK Attila 268a1f5d18 tests: Remove most uses of exclude_warp
They no longer seem necessary with cargo nextest.
2024-01-07 05:58:13 +01:00
TÖRÖK Attila 6876fe8226 ci: Switch to cargo nextest
- This will help avoid deadlocks with wgpu 0.18 (wgpu/#4885), as every
  test is run in a separate process.
- Similarly, WARP seems to be less sensitive to hanging this way.
- Run on 4 threads at once, to overlap CPU-bound and IO-bound work.
2024-01-07 05:58:13 +01:00
nosamu 95ad0f103f avm2: Stub flash.globalization.DateTimeFormatter
Closes #14577
2024-01-06 23:41:53 -05:00
Aaron Hill b96cfed6c7 avm2: Stub TextField.getCharIndexAtPoint 2024-01-06 23:11:43 -05:00
TÖRÖK Attila f0ed5c7211 chore: Upgrade gc-arena to 0.5.0 2024-01-06 09:45:35 +01:00
Crowdin Bot 1325181a59 chore: Update translations from Crowdin 2024-01-06 09:30:28 +01:00
Tom Schuster c28be7bb5f tests: Test XML attribute name handling 2024-01-06 09:16:04 +01:00
Tom Schuster 7da3411fd0 avm2: Revert XML get_property_local to using has_explicit_namespace
This partly reverts #13966. No new test failure, but makes the add test
for `xml["@attr"]` pass.
2024-01-06 09:16:04 +01:00
Tom Schuster 79e0e8b2ae avm2: XML::name() needs to mark attributes as such 2024-01-06 09:16:04 +01:00
Kamil Jarosz 47deaf50a2 core: Fix non-ASCII characters input in EditText
Casting the character to u8 and back to char caused some non-ASCII
non-control characters to be treated as control characters.
For instance the letter "ą" (U+0105) after casting to u8 and back
became ENQ (U+0005) which is a control character.
Some other letters worked, for instance the letter "ł" (U+0142)
became "B" (U+0042) and was not classified as a control character.

The test edittext_input was added to verify this behavior.
2024-01-05 13:03:43 -08:00
TÖRÖK Attila 217585daa8 chore: Delegate `[lints]` in `Cargo.toml` of all packages to the workspace 2024-01-05 11:28:19 +01:00
TÖRÖK Attila 60f01fd517 chore: Move lint configuration from `.cargo/config.toml` to `Cargo.toml`
This got stabilized in Rust 1.74.
2024-01-05 11:28:19 +01:00
Lord-McSweeney 89b7f7a6b8 avm2: Use correct null parameter error in `registerClassAlias` 2024-01-04 21:34:21 +01:00
Tom Schuster dd53b4e06b avm2: Reduce the size of Op on 64bit 2024-01-04 21:15:09 +01:00
Lord-McSweeney 0a6a95e6f1 tests: Add a test 2024-01-03 15:14:11 +01:00
Lord-McSweeney a7716bb744 avm2: Implement FP's logic for parsing XML with multiple nodes 2024-01-03 15:14:11 +01:00
Tom Schuster 8b414c48c7 avm2: Optimize Avm2::push/pop slightly 2024-01-02 20:37:05 +01:00
Tom Schuster c8901d43a4 avm2: Force inlining of do_next_opcode 2024-01-02 20:37:05 +01:00
renovate[bot] c47962fc71 fix(deps): update rust crate syn to 2.0.44 2024-01-01 04:29:05 +01:00
renovate[bot] 098aa228d1 chore(deps): update dependency typedoc to ^0.25.5 2024-01-01 04:11:41 +01:00
renovate[bot] 6a0a35c370 fix(deps): update rust dependencies 2024-01-01 02:44:40 +01:00
renovate[bot] 1c4db4d315 chore(deps): update node.js dependencies 2024-01-01 02:12:37 +01:00
renovate[bot] 91d0520a43 fix(deps): update rust dependencies 2024-01-01 02:03:54 +01:00
Lord-McSweeney eac68a0647 tests: Add a test for accessing an unnamed Graphic 2023-12-31 07:06:08 +03:00
Lord-McSweeney 9f8c6bb703 avm1: Correctly handle a missing name when trying to lookup child of `ChildContainer` by that name 2023-12-31 07:06:08 +03:00
Daniel Jacobs 51254e16d1 web: Use unwrap_or_default for the PlayerRuntime instead or map_err 2023-12-30 17:58:36 -05:00
Daniel Jacobs 27849b5cdc web: Add playerRuntime option to config for air or flashPlayer 2023-12-30 17:58:36 -05:00
Aaron Hill 583327ff62 avm2: Properly set LoaderInfo.contentType from sniffed type 2023-12-29 18:40:25 -05:00
sleepycatcoding 41fb30a6a9 avm2: Do not set dispatched flag if dispatcher does not have a listener 2023-12-29 07:31:53 +03:00
Tom Schuster 28a3c7178a avm2: Check the text.engine.FontDescription properties before setting 2023-12-26 23:16:27 +01:00
TÖRÖK Attila 061b7f9904 chore: Run `cargo update` to bump patch versions in `Cargo.lock`
Changes:

    Updating git repository `https://github.com/gfx-rs/wgpu`
    Updating crates.io index
    Updating git repository `https://github.com/ruffle-rs/rust-flash-lso`
    Updating git repository `https://github.com/ruffle-rs/jpegxr`
    Updating git repository `https://github.com/ruffle-rs/nellymoser`
    Updating git repository `https://github.com/kyren/gc-arena`
    Updating git repository `https://github.com/ruffle-rs/h263-rs`
    Updating git repository `https://github.com/ruffle-rs/nihav-vp6`
    Updating crossbeam-channel v0.5.9 -> v0.5.10
    Updating crossbeam-epoch v0.9.16 -> v0.9.17
    Updating crossbeam-utils v0.8.17 -> v0.8.18
    Updating event-listener v4.0.0 -> v4.0.1
    Updating fdeflate v0.3.1 -> v0.3.2
    Updating linkme v0.3.19 -> v0.3.20
    Updating linkme-impl v0.3.19 -> v0.3.20
    Updating mach2 v0.4.1 -> v0.4.2
    Updating memmap2 v0.9.2 -> v0.9.3
    Removing memoffset v0.9.0
    Updating object v0.32.1 -> v0.32.2
    Updating openssl-sys v0.9.97 -> v0.9.98
    Updating pkg-config v0.3.27 -> v0.3.28
    Updating profiling v1.0.12 -> v1.0.13
    Updating profiling-procmacros v1.0.12 -> v1.0.13
    Updating self_cell v1.0.2 -> v1.0.3
    Updating serde_spanned v0.6.4 -> v0.6.5
    Updating thiserror v1.0.51 -> v1.0.52
    Updating thiserror-impl v1.0.51 -> v1.0.52
    Updating time v0.3.30 -> v0.3.31
    Updating time-macros v0.2.15 -> v0.2.16
    Updating winnow v0.5.28 -> v0.5.30
    Updating zerocopy v0.7.31 -> v0.7.32
    Updating zerocopy-derive v0.7.31 -> v0.7.32
2023-12-26 17:47:12 +01:00
Tom Schuster 973a81a40e avm2: Support more ElementFormat font options in TextBlock 2023-12-26 19:19:58 +03:00
Tom Schuster b44eed8350 avm2: Micro-optimize coerce_to_i32/u32 2023-12-26 18:50:08 +03:00
TÖRÖK Attila 2647c192d9 chore: Stop allowing, and fix lint `clippy::explicit_auto_deref` 2023-12-25 19:20:53 -05:00
TÖRÖK Attila badac4176c chore: Stop allowing previously buggy lint `clippy::extra_unused_type_parameters`
The corresponding Clippy issue was fixed long ago.
2023-12-25 19:20:53 -05:00
Aaron Hill f60ba00240 avm2: Show FunctionObject name in Debug impl 2023-12-25 12:49:32 -05:00
renovate[bot] 216a8f3b14 fix(deps): update rust dependencies 2023-12-25 10:09:07 +01:00
Lord-McSweeney a7145380ac avm2/core: Implement basic SWF-local `LocalConnection`
Also implement `LocalConnection.isSupported` (namespace versioned to SWFv10+)
2023-12-23 15:46:03 -05:00
Crowdin Bot 9523022cdd chore: Update translations from Crowdin 2023-12-23 13:26:37 +01:00