Commit Graph

11382 Commits

Author SHA1 Message Date
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
TÖRÖK Attila f9aa6dbea4 chore: Fix a beta clippy lint: `clippy::blocks_in_conditions` 2023-12-23 13:06:47 +01:00
TÖRÖK Attila 1569ecfeae chore: Fix a beta clippy lint in avm2: `clippy::ptr-arg` 2023-12-23 13:06:47 +01:00
TÖRÖK Attila 36c550b97f chore: Fix a beta lint in our `gc_arena` facade: `ambiguous_wide_pointer_comparisons`
As per our discussion with @kyren on Discord.
2023-12-23 13:06:47 +01:00
Tom Schuster 704bd7502e core: Do exact matching for device fonts first, because we might be able to load bold/italic variants 2023-12-22 13:47:48 +01:00
Tom Schuster e3d8a279ad core: load_device_font register function must be &mut 2023-12-22 13:47:48 +01:00
nosamu a5560587da tests: Add AVM1 SWFv5 string methods test 2023-12-20 10:38:17 -08:00
nosamu 4f62e7de47 avm1: Implement String.charCodeAt() SWFv5 behavior 2023-12-20 10:38:17 -08:00
nosamu 95851e6e9a avm1: Implement undocumented SWFv5 string split behavior 2023-12-20 10:38:17 -08:00
nosamu d443bd9def avm1: Correctly handle undefined delimiter in String.split() 2023-12-20 10:38:17 -08:00
Crowdin Bot ba6ba842d7 chore: Update translations from Crowdin 2023-12-18 23:28:34 +01:00
TÖRÖK Attila f5f8962ce1 chore: Update naga to 0.14.2, run `cargo update` 2023-12-18 17:07:16 -05:00
Aaron Hill 5c37533761 avm2: Avoid marking interface method definitions with VM_INTERNAL
Our asc.jar doesn't seem to apply a version suffix to namespaces for
interface method definitions. This was causing these methods to
get marked as VM_INTERNAL when we loaded playerglobals, preventing SWF
from invoking these methods through the interface (e.g. having a
variable of type `IEventDispatcher`, and calling `dispatchEvent` on it)
2023-12-18 21:50:34 +01:00
nosamu 98ebc339b4 core: Use i32 for font ascent and descent 2023-12-18 09:31:53 +01:00
renovate[bot] 0e5ef32654 fix(deps): update rust dependencies 2023-12-18 08:16:28 +01:00
nosamu 989988631f desktop: Fix egui scaling
Fixes #14413
2023-12-17 22:14:14 -08:00
Lord-McSweeney ecfb3b1c4c core/avm1: Improve some stubs
Add `Avm1Constructor` stub and use it in `NetConnection`; only log a stub warning in `run_inner_goto_frame` if movie is AVM2
2023-12-17 13:01:23 -08:00
friedkeenan 834e745652 swf: Make avm2 Writer::write_op public 2023-12-17 15:41:44 +01:00
friedkeenan c7966cea77 swf: Add test for avm2 Writer::write_op 2023-12-17 15:41:44 +01:00
zhenghaoz e89f458df8 avm2: Add missing property objectEncoding to SharedObject 2023-12-17 13:23:06 +01:00
Aaron Hill 287ca8801a avm2: Implement AIR playerglobal versioning
This builds on our existing playerglobal versioning support
to add in AIR versioning. We closely follow the avmplus implementation:

* When an SWF is loaded, we chose either a FlashPlayer or AIR
APIVersion for its SWF version, based on our configured player runtime.
* When loading playerglobals, we look at the player runtime. In AIR
  mode, we map FlashPlayer-versioned definitions to the closest AIR
  version. This ensures that all runtime APIVersions are in the
  same series (either AIR or FlashPlayer). In FlashPlayer mode,
  all AIR-versioned definitions get mapped to VM_INTERNAL, hiding
  them from user code.

Part of our existing api versioning code was implemented incorrectly.
Within playerglobals, we need to treat all unmarked namespaces as
VM_INTERNAL - this allows things like playerglobal script
initializer "initproperty" opcodes to see any VM_INTERNAL AIR
definitions (when we run under FlashPlayer mode). Previously, we
were using AllVersions, which would result in those VM_INTERNAL
definitions being hidden from other playerglobal code, which is
not correct.

Using this support, I've added a stub for the AIR-only
'flash.net.DatagramSocket'. I've also extended the test framework
with a new 'player_options.runtime' config option, which can be
set to "AIR" or "FlashPlayer" to configure the test runtime mode.

I've also added two new tests:
* 'air_hidden_lookup' runs under the FlashPlayer runtime, and verifies
  that a list of classes (currently just "DatagramSocket" are
  inacessible).
* 'air_datagram_socket', which uses `player_options.runtime = "AIR"`
  to construct an instance of `flash.net.DatagramSocket`. We can
  extend this test once we implement more of `DatagramSocket`

With this commit, we have all of the needed infrastructure to start
implementing and testing AIR-only classes and methods.
2023-12-16 19:11:50 -05:00
Lord-McSweeney 375c99e601 core: More mixed AVM fixes, improve test
This commit breaks mixed AVM without #13889.
2023-12-16 19:40:57 +01:00
Lord-McSweeney 7461c03049 core: More fixes for mixed AVM 2023-12-16 19:40:57 +01:00
Tom Schuster 8071a14d4d web/extension: Correct the version used for the Firefox extension 2023-12-16 18:16:52 +01:00