Commit Graph

6246 Commits

Author SHA1 Message Date
Lord-McSweeney 0c6a0e80af avm2: Add class call handlers for Boolean, Number, and (u)int 2023-10-21 11:41:57 -07:00
Lord-McSweeney 043f7cdea7 chore: appease clippy 2023-10-21 11:41:57 -07:00
Lord-McSweeney 901d84b2cf avm2: Fix defining const slots on global object 2023-10-21 11:41:57 -07:00
Lord-McSweeney 18c53694cb avm2: Implement Error 1070 2023-10-21 11:41:57 -07:00
Lord-McSweeney b1056311f0 avm2: Implement Error 1112 2023-10-21 11:41:57 -07:00
Lord-McSweeney 5d2d8e080a avm2: Pass around Mutation instead of Activation in some places 2023-10-21 11:41:57 -07:00
Aaron Hill 5d4e851a6e avm2: Throw ArgumentError when calling function with wrong arg count
Some SWFs rely on catching the error.

In order to reproduce Flash's error messages, we now store a `QName`
in `FunctionObject`, which is set when we make a bound method.
2023-10-21 00:18:50 -04:00
Crowdin Bot 94174b30fe chore: Update translations from Crowdin 2023-10-20 21:10:35 +02:00
sleepycatcoding c87ac6f5f5 avm2: Replace culling panic messages with stub messages
A stub message is good enough.
2023-10-20 20:45:45 +02:00
Nathan Adams feacbdc118 core: <font> tag in text should reset the style to Regular 2023-10-20 12:41:15 +02:00
Nathan Adams b2a43cb1f7 core: Add style to edittext debug UI 2023-10-20 12:41:15 +02:00
Nathan Adams 64385efe48 core: Use correct embedded font fallback order + tests 2023-10-20 12:41:15 +02:00
sleepycatcoding 8b5b135a2d avm2: Do not panic in XMLList call handler 2023-10-19 20:52:33 +02:00
sleepycatcoding 8021efaabc avm2: Do not panic in XML call handler
This panic occurred when the call handler was passed zero arguments.
2023-10-19 20:52:33 +02:00
sleepycatcoding 5da09c137e avm2: Implement QName call handler 2023-10-19 11:46:31 +02:00
Aaron Hill fd4d6921d8 avm2: Don't stop root movie clip, even if it doesn't extend `MovieClip`
Normally, Flash Player will ignores frames for a movie clip with
a symbol class that doesn't extend `MovieClip` (e.g. it extends
`Sprite`). However, the root movie appears to have frame run
unconditionally, even if it only extends `Sprite`. This can
be observed by adding a Graphics child in the second frame only -
the child will flicker in and out as the player switches between
frames, but only for the root movie clip.

Seedling relies on this behavior - it has `DoAbc2` tags in the second
frame, and has a main `Preloader` class that extends `Sprite`.
2023-10-18 09:28:50 -04:00
TÖRÖK Attila 627e8c8063 core: Switch dasp from a git revision to v0.11.0 2023-10-17 21:31:18 +02:00
Adrian Wielgosik a8ea913bf6 avm1: Store childNodes on the node itself 2023-10-16 11:25:48 +02:00
renovate[bot] b427940431 fix(deps): update rust dependencies 2023-10-16 09:51:22 +02:00
Nathan Adams d2541a7ff0 core: Rename Library::load_device_font to Library::get_or_load_device_font 2023-10-15 14:09:21 +02:00
Nathan Adams e768140a1f core: Cache the result of Library::default_font 2023-10-15 14:09:21 +02:00
Nathan Adams ec21ad8658 core: Add default_font feature which enables the fallback font 2023-10-15 14:09:21 +02:00
Nathan Adams 74a7ab5afe core: Implement device font lookup, and multiple default device fonts 2023-10-15 14:09:21 +02:00
Nathan Adams 909d33e12e core: Inline Player::load_device_font in Font tests, it's just testing one specific font 2023-10-15 14:09:21 +02:00
Lord-McSweeney 93aa3a493b avm2: Add back log_warn 2023-10-13 20:22:00 +02:00
Lord-McSweeney 4561fd3631 avm2: Move top-level functions and __ruffle__ stub functions to ActionScript 2023-10-13 20:22:00 +02:00
David Wendt cf3c594209 docs: Correct documentation of what `execute_seek` does 2023-10-10 18:49:09 -06:00
David Wendt 759aa1e469 core: Allow seeks to process on paused streams.
Our list of 'playing' streams is now a list of 'active' streams. This nomenclature change also indicates a rule change: streams are activated whenever there is work for them to do, and they are only ever deactivated by themselves when they're out of work to do. We no longer deactivate streams when they are paused as they may still have a queued seek to process.
2023-10-10 18:49:09 -06:00
David Wendt e5b59438f7 core: Swap order of parameters on `NetStream.Seek.Notify` event 2023-10-10 18:49:09 -06:00
David Wendt 4420dc8d23 core: Let each VM flag if it wants to send seek events or not 2023-10-10 18:49:09 -06:00
David Wendt c086a6da11 chore: Fix let statements holding unnecessary borrows, *grumble grumble* 2023-10-10 18:49:09 -06:00
David Wendt 78e41b5be5 avm1: Implement `NetStream.time` 2023-10-10 18:49:09 -06:00
David Wendt c23f346665 chore: Ensure all `NetStream` code is working in milliseconds.
AVM `NetStream` reports and accepts values in seconds, so all the unit conversions went there now.
2023-10-10 18:49:09 -06:00
David Wendt a0a762ccfc core: `NetStream` seeks are queued.
They do not execute until the next stream tick.

We also implement a few new status events, including some AVM2 exclusive ones.
2023-10-10 18:49:09 -06:00
David Wendt 3f13087d39 chore: Use `get_f64` for `NetStream.seek` 2023-10-10 18:49:09 -06:00
David Wendt 99de1ae154 avm2: Implement `NetStream.time` 2023-10-10 18:49:09 -06:00
David Wendt 0d886dd860 core: Add `NetStream.Pause.Notify` event 2023-10-10 18:49:09 -06:00
David Wendt 3566d7f43a core: Fire `NetStream.SeekStart.Notify` events 2023-10-10 18:49:09 -06:00
David Wendt 1f5947912d core: Defensively program against `flv` being broken 2023-10-10 18:49:09 -06:00
David Wendt 3be9ce4ac0 avm2: Implement `NetStream.seek` 2023-10-10 18:49:09 -06:00
David Wendt e440e175d9 avm1: Implement `seek` method 2023-10-10 18:49:09 -06:00
David Wendt bc6291898c core: Add a `seek` method 2023-10-10 18:49:09 -06:00
David Wendt 4867ff1210 core: Break type sniffing out into a separate fn. 2023-10-10 18:49:09 -06:00
renovate[bot] 18796a67fe fix(deps): update rust dependencies 2023-10-10 02:15:59 +02:00
Lord-McSweeney 7254cdeef9 avm2: Throw ArgumentError when trying to construct `new Worker()` 2023-10-10 01:20:06 +02:00
TÖRÖK Attila 602154b1b7 core,desktop: Switch to egui v0.23.0
Since it's compatible with wgpu 0.17.x.
2023-10-09 18:51:01 -04:00
sleepycatcoding 21a1e1f670 avm2: Small set_property_local fixup
Fixes a borrow panic and logic error.
2023-10-10 00:24:39 +02:00
sleepycatcoding 0b2771c23d avm2: Implement other XMLList set_property_local path 2023-10-10 00:24:39 +02:00
sleepycatcoding 917e70086b avm2: Throw Error 1089, if base list length bigger than 1
This is not mentioned in the E4X specification, but this is what avmplus
seems to be doing.
2023-10-10 00:24:39 +02:00
sleepycatcoding ca5ba4877c avm2: Implement one XMLList set_property path 2023-10-10 00:24:39 +02:00