relrelb
3fbadbe26f
avm1: Remove unnecessary gc_context parameters
...
`add_property_with_case`, `set_watcher` and `remove_watcher` already
take an `activation`, from which the `gc_context` can be retrieved.
2021-05-22 10:49:27 -07:00
Mike Welsh
bb22a5aba2
avm1: Remove extraneous self parameters from MovieClip methods
...
Previously these were used because the methods were on `MovieClipData`
instead of `MovieClip`, but now they are no longer necessary.
2021-05-21 17:50:25 -07:00
relrelb
7717b97027
avm1: Remove unnecessary calls to create_bare_object
...
In favor of ScriptObject::object and ScriptObject::array, which
always succeed.
2021-05-21 16:13:25 -07:00
relrelb
aeb8902f8c
avm1: Remove unused TObject::as_string
2021-05-21 15:27:35 -07:00
sn-o-w
41c4ac2834
i18n: Add Romanian
2021-05-19 14:49:01 -07:00
Mike Welsh
1dd669a0e3
canvas: Fix alpha calculation in canvas renderer
2021-05-18 16:20:45 -07:00
dependabot[bot]
30f088d16f
chore: Bump futures from 0.3.14 to 0.3.15
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.14 to 0.3.15.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.14...0.3.15 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 12:41:29 -07:00
Moulins
35b9fb7317
avm1: add property_decl::declare_properties! macro for defining built-ins
...
This allows for reduced boilerplate when defining native methods,
properties, and constants (but not values depending on other runtime
values, like built-ins objects and prototypes).
Also remove ScriptObject::force_set_function (replaced by DeclKind::Method)
2021-05-17 10:34:41 -07:00
dependabot[bot]
9c837c4b85
chore: Bump winit from 0.24.0 to 0.25.0
...
Bumps [winit](https://github.com/rust-windowing/winit ) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/rust-windowing/winit/releases )
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-windowing/winit/compare/v0.24.0...v0.25.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 10:27:54 -07:00
dependabot[bot]
00194e351e
chore: Bump serde from 1.0.125 to 1.0.126
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.125 to 1.0.126.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.125...v1.0.126 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 10:13:02 -07:00
dependabot[bot]
2be5f2bc7e
chore: Bump enum-map from 1.1.0 to 1.1.1
...
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map ) from 1.1.0 to 1.1.1.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags )
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master )
Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 10:11:31 -07:00
dependabot[bot]
1082d2fea7
chore: Bump isahc from 1.3.1 to 1.4.0
...
Bumps [isahc](https://github.com/sagebind/isahc ) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/sagebind/isahc/releases )
- [Commits](https://github.com/sagebind/isahc/compare/1.3.1...1.4.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 10:09:45 -07:00
Toad06
c5233ed172
web: Make `unmuteOverlay: "hidden"` resume audio without extra click
2021-05-16 23:34:11 -07:00
Toad06
0ee6b62517
web: Add a `none` value to completely disable the unmute overlay
2021-05-16 23:34:11 -07:00
Jmousy
27bf4c5ccc
i18n: Add Korean
2021-05-16 22:57:23 -07:00
Mike Welsh
f478ee7b2f
avm2: Properly implement Avm2Button::hit_test_shape and mouse_pick
...
The hit area is not a proper child of the Avm2Button, so manually
transform the test point into local space before passing it to the
hit area.
2021-05-16 17:53:07 -07:00
Mike Welsh
dfc8c32937
core: Do not include stage transform in DisplayObject::local_to_global_matrix
...
TODO: Eventually we may want to include the stage transform here,
and the deeper ActionScript APIs transform it to remove the stage
scaling.
2021-05-16 17:53:07 -07:00
Mike Welsh
7784d8c099
avm2: Remove some AVM1 leftovers from Avm2Button
2021-05-16 17:53:07 -07:00
Mike Welsh
9b58dac841
avm2: Fix up DisplayObject root and stage properties
...
Move `MovieClip::is_swf` flag to `DisplayObject::is_root`, and use
this flag to handle the behavior of `DisplayObject.root` crawling
upwards until it hits a top-most loaded SWF/Bitmap.
Simplify `root` and `stage` so that they don't have to consider
buttons. Instead, do some trickery to ensure the button's states
see the proper values of `parent`, `root`, and `stage` during
construction.
2021-05-16 17:53:07 -07:00
Mike Welsh
2176e30e22
avm2: Use define_public_builtin_instance_properties for SimpleButton
2021-05-16 17:53:07 -07:00
David Wendt
e555a6b488
avm2: Impl `SimpleButton.useHandCursor`
2021-05-16 17:53:07 -07:00
David Wendt
6f6e2c1b9f
avm2: Impl `SimpleButton.enabled`
2021-05-16 17:53:07 -07:00
David Wendt
514c51510c
avm2: Impl `SimpleButton.trackAsMenu`
2021-05-16 17:53:07 -07:00
David Wendt
b383aec78d
tests: Move the button tests into the new test directory.
2021-05-16 17:53:07 -07:00
David Wendt
71bb0c901a
avm2: Impl the constructor parameters for `SimpleButton`
2021-05-16 17:53:07 -07:00
David Wendt
a82e78b597
tests: Don't check the `exitFrame` or `frameConstructed` events in the nested test as it appears to fire the events redundantly
2021-05-16 17:53:07 -07:00
David Wendt
cfd95e3b3b
core: `root` and `stage` should yield `None` if an inactive state child of an `Avm2Button` is involved in the parent chain.
2021-05-16 17:53:07 -07:00
David Wendt
169a99397a
core: `stage` also yields the current context's stage if there isn't one in the parent chain and we aren't in a button
2021-05-16 17:53:07 -07:00
David Wendt
bfebc3c78f
core: AVM2Button does not set the parent of the movie until after it's constructors have run
2021-05-16 17:53:07 -07:00
David Wendt
6a9249e52f
core: Store the root of each loaded movie and use it as a last-ditch way to get the root
2021-05-16 17:53:07 -07:00
David Wendt
9ded256c23
core: Implement the AVM2 concept of `stage`.
2021-05-16 17:53:07 -07:00
David Wendt
39e9ef9dc5
core: Implement a separate `avm2_root` method that provides an AS3 notion of root
2021-05-16 17:53:07 -07:00
David Wendt
e4a6a10038
tests: Add tests for what children see as their parent when constructed or shuffled between movie clips and buttons
2021-05-16 17:53:07 -07:00
David Wendt
a9d7b30dc2
core: `Avm2Button` should unparent any added children
2021-05-16 17:53:07 -07:00
David Wendt
082ecb16cb
core: `avm2_parent` always returns a container, or nothing.
2021-05-16 17:53:07 -07:00
David Wendt
157ced3dc3
core: Split the parent accessor further into `parent` and `avm1_parent`.
...
`parent` is now a bare accessor, `avm1_parent` returns what AVM1 thinks the parent should be, and `avm2_parent` returns what AVM2 thinks the parent should be.
2021-05-16 17:53:07 -07:00
David Wendt
f90cfb3bd0
core: Ensure sprite children get linked up correctly
2021-05-16 17:53:07 -07:00
David Wendt
5274df11f7
core: `Shape` should always expose it's defining movie instead of punting to the parent clip
2021-05-16 17:53:07 -07:00
David Wendt
826b20e8e4
tests: Don't assert execution order of frame scripts within buttons
2021-05-16 17:53:07 -07:00
David Wendt
ef4de4d0d7
core: Order of events for child `Avm2Button` states is hit-up-down-over.
...
Ok, it's not *actually* that - all our tests actually have different, conflicting information. As far as I can tell there doesn't seem to be a single set order for these; so I'm going to just pick one and then stop testing the order in which states run.
2021-05-16 17:53:07 -07:00
David Wendt
c936ccd4b4
avm2: When constructing new `SimpleButton`s, make sure the display object sees it's AVM2 side, else we replace all it's contents with AVM1 objects somehow(?!)
2021-05-16 17:53:07 -07:00
David Wendt
208c191d88
core: `Avm2Button` always runs a frame on set children, even if it's not the current state
2021-05-16 17:53:07 -07:00
David Wendt
bf1fb93b83
core: Allow linking `Avm2Button`'s object
2021-05-16 17:53:07 -07:00
David Wendt
d7deaf5e00
tests: Add currently-failing tests for the `SimpleButton` constructor and order-of-events.
2021-05-16 17:53:07 -07:00
David Wendt
44e82ea480
core: `Avm2Button` fires off events in this order when you set one of it's children:
...
1. `added`/`addedToStage` on the new state
2. `removed` (presumably) on the old state
3. `frameConstructed` on the new state
4. Any frame scripts on the new state
5. `exitFrame` on the new state
This is a rough approximation; I have several tests that fail in weird and interesting ways. Also, this only happens if you set the *active* state; presumably these events are all fired when the state changes but I can't automate tests for that yet.
2021-05-16 17:53:07 -07:00
David Wendt
434563da2f
avm2: `SimpleButton` should build a button when constructed
2021-05-16 17:53:07 -07:00
David Wendt
67c7f156ac
avm2: `instanceof` accepts `null` and `undefined`
2021-05-16 17:53:07 -07:00
David Wendt
7f294f5209
avm2: Constructor-based symbol instantiation should also post-instantiate before constructing a frame
2021-05-16 17:53:07 -07:00
David Wendt
ea80d999da
tests: Add an almost-passing test for buttons with multiple levels of children
2021-05-16 17:53:07 -07:00
David Wendt
07513da3ba
core: State-constructed sprites in `Avm2Button` should be post-instantiated after everything else so they get their instance numbers later
2021-05-16 17:53:07 -07:00