David Wendt
51401ae660
core: Remove AVM2 compatibility hacks surrounding place frame.
...
They are no longer needed, frame advance happens at enterframe time.
2022-08-25 19:24:56 -06:00
David Wendt
1eef8a47c9
core: Movie clips run all their tags at `enter_frame`, and place/remove actions are queued until later.
...
This prevents repeated place/remove actions at the same depth from resulting in repeated event dispatches.
2022-08-25 19:24:56 -06:00
David Wendt
963144e59c
core: Centralize all the various calls to `enter_frame`/`construct_frame` into a single method, `catchup_display_object_to_frame`.
...
The rationale for the catch-up logic is as follows:
* We must always enter-frame and construct objects, even if those respective display events haven't happened yet.
* Display objects created in event handlers still need to run catchup phases, otherwise they will tag-stream desync
* Frame scripts are never triggered by catchup phases
* `exit_frame` is not a catchup phase as it is *only* an event broadcast currently
2022-08-25 19:24:56 -06:00
David Wendt
0400d4dee4
core: `Player` should start in the `Idle` phase
2022-08-25 19:24:56 -06:00
David Wendt
f0ef8adb42
core: Add a new frame phase to represent non-frame work such as input event handlers.
2022-08-25 19:24:56 -06:00
David Wendt
ae530b5d6b
core: Track what part of the frame processing loop we're in
2022-08-25 19:24:56 -06:00
David Wendt
ee2454e09f
core: Frame actions should start with `enterFrame`; not `exitFrame`.
2022-08-25 19:24:56 -06:00
David Wendt
1f0b8bdda4
core: In AVM2, movie clips process `RemoveObject` before any other frame actions are done.
2022-08-25 19:24:56 -06:00
David Wendt
318b018da8
core: `enter_frame` should be an event that all display objects get and can respond to
2022-08-25 19:24:56 -06:00
David Wendt
beb0545b11
tests: Add tests for gotos interacting with frame scripts.
2022-08-25 19:24:56 -06:00
David Wendt
6569edda88
tests: Add a goto-and-stop test that inspects the children after the goto.
2022-08-25 19:24:56 -06:00
David Wendt
c3add3db93
tests: Ignore the `as3_simplebutton_constr_childevents` test as it is broken by fixes I moved to another PR
2022-08-25 19:24:56 -06:00
David Wendt
38f28ce80c
tests: Add a second, more thorough `clickgoto2` test
2022-08-25 19:24:56 -06:00
David Wendt
f16b76866a
tests: Add timeline and stage manipulation tests at user event time.
2022-08-25 19:24:56 -06:00
David Wendt
81eb5ed8ac
tests: Add tests for symbol instantiation in `enterFrame`, `exitFrame`, and `frameConstructed`
2022-08-25 19:24:56 -06:00
David Wendt
27d509f169
tests: Extend the goto tests with more non-looping jumps
2022-08-25 19:24:56 -06:00
David Wendt
4d3788bfe1
tests: Add tests for AS3 gotos during `enterFrame`, `frameConstructed`, and/or `exitFrame`
2022-08-25 19:24:56 -06:00
David Wendt
c10417ddb8
tests: `as3_movieclip_displayevents_timeline` should log events on the root movie clip too
2022-08-25 19:24:56 -06:00
David Wendt
f1d203311f
tests: `as3_movieclip_displayevents_looping` should have a `RemoveObject` in it
2022-08-25 19:24:56 -06:00
David Wendt
ee1f39bba7
tests: `as3_movieclip_displayevents_xyzframeplay` tests should also list what children are on the timeline
2022-08-25 19:24:56 -06:00
David Wendt
b3793f9b4c
tests: Oops, forgot to recompile the exitframe play test.
2022-08-25 19:24:56 -06:00
David Wendt
10955c3a03
tests: Add tests for playing and pausing a movie clip in `enterFrame`, `frameConstructed`, and `exitFrame`
2022-08-25 19:24:56 -06:00
David Wendt
795dafa46a
tests: Fix the test output for `as3_movieclip_displayevents_dblhandler`.
...
The test output for this test is sensitive to where we cut off each frame, because it doesn't stop all of it's handlers at the end of the test. Flash Player will just print lines forever so the end of the test is entirely arbitrary.
2022-08-25 19:24:56 -06:00
David Wendt
1a4b977325
tests: `as3_movieclip_displayevents_timeline` now explicitly winds a clip back and forth to better demonstrate a bug I ran into with frame numbering
2022-08-25 19:24:56 -06:00
David Wendt
0c18e8e99a
tests: Log `this.currentFrame` on every event watcher we can.
2022-08-25 19:24:56 -06:00
David Wendt
72f878bb9d
tests: Add a test for the order of events surrounding `gotoAndStop`
2022-08-25 19:24:56 -06:00
relrelb
d152cc3e64
avm2: Port `Math` to ActionScript
2022-08-25 16:03:08 -07:00
relrelb
4e9cc919a1
avm2: Fix bindings of empty namespace
...
Previously native functions defined inside a `package {}` block
(without a package name) would cause a syntax error by two consecutive
`::`.
2022-08-25 16:03:08 -07:00
Aaron Hill
91247f5779
tests: Only require `ruffle_render_wgpu` dependency with 'imgtests'
...
This should speed up developer workflows when working on non-image
related changes. CI will still run all image tests.
2022-08-25 15:11:18 -07:00
=
211a64b402
webgl: Replace Box<dyn Error> with actual Error enum
2022-08-25 23:43:21 +02:00
=
620820be9e
core: Replaced tag_utils Error with an actual Error enum
2022-08-25 23:43:21 +02:00
=
67eb34fbc5
core: Remove Error from player.rs, it wasn't needed
2022-08-25 23:43:21 +02:00
=
b7dcd26c38
core: Use Cow<str> for FullscreenError in UI backend, as it can't ever be anything else
2022-08-25 23:43:21 +02:00
=
1c7bfd8c5f
core: Use real Error enums for video backend
2022-08-25 23:43:21 +02:00
=
17f261fc1f
wgpu: Descriptors::new is infallible, removed error path
2022-08-25 23:43:21 +02:00
=
b29b30de58
wgpu: Pipelines::new is infallible, removed error path
2022-08-25 23:43:21 +02:00
=
201ed60d67
canvas: Removed generic error, was never actually used - just an Option worked better
2022-08-25 23:43:21 +02:00
=
461c977be0
render: unregister_bitmap is infallible, removed error path
2022-08-25 23:43:21 +02:00
=
03eb769a33
render: Made render use a real Error enum and not generic box<error>
2022-08-25 23:43:21 +02:00
=
726217c6c2
desktop: Use anyhow to replace generic errors with more meaningful ones
2022-08-25 23:43:21 +02:00
=
30e7d23cc0
desktop: Use anyhow errors for desktop audio errors
2022-08-25 23:43:21 +02:00
=
0084991e58
web: Replaced generic error in audio with JsError, as it's the only one thrown
2022-08-25 23:43:21 +02:00
=
5b5ee7d448
core: Made audio backend use actual real error enums, and not box<error>
2022-08-25 23:43:21 +02:00
=
2d2869f44f
core: Font::from_swf_tag is currently infallible, remove error path
2022-08-25 23:43:21 +02:00
=
1df8de5bac
core: set_text and set_html_text are currently infallible, remove error path
2022-08-25 23:43:21 +02:00
Mike Welsh
bea757cc92
tests: Adjust function_base_clip_removed test
...
Add test for #5645 .
2022-08-25 00:01:02 -07:00
Mike Welsh
78247a37ab
avm1: Load correct _root and _parent registers if base clip is removed
...
Normally a function closures also closes around its base clip.
If the base clip is removed, and then the function is executed, the
base clip then defaults to `this`.
However, Ruffle was incorrectly using the wrong base clip when
loading the `_root` and `_parent` registers in this case.
Fixes #5645 .
2022-08-25 00:01:02 -07:00
Roman Rogowski
66d144bbdd
core: Fix incorrect rendering of word-wrap text boxes ( close #1095 )
2022-08-24 22:51:51 -07:00
Aaron Hill
b5391c00f6
tests: Re-add per-platform image tests
...
Reverts #7267
The image tests for the upcoming 'DisplayObject.stageRect' support
differ between Linux and Windows, so we need this support again.
To avoid the Linux filename churn that we previously encountered,
we now only include the platform and graphics backend in the filename
(e.g. `expected-linux-Vulkan`). This may result in some unexpected
'mismatched image' test failures if GHA updates to a version of Lavapipe
that changes rendering output, but this should be relatively easy to
notice.
2022-08-24 21:29:53 -07:00
relrelb
a8edce8294
core: Remove unneeded `Box`
2022-08-24 22:36:20 +03:00