EmperorBale
16805a350b
avm2: Store stack information in activations
2022-11-23 17:28:28 -07:00
Moulins
c10244b0a4
core: Only unload D.O.s when they are removed from the render list
...
D.O.s removed by the timeline may only be removed from the depth list
(if they were manipulated by AS3 scripts), but their unload method
would still be called, which is wrong.
2022-11-23 16:44:38 -07:00
Moulins
53010544db
core: Simplify core::do::container::Lists bitflags into boolean enum
...
Callsites only ever used two values, as children in the display list are
always in the render list.
2022-11-23 16:44:38 -07:00
Moulins
58e39623a5
core: Make all ChildContainer's methods private
...
And also, remove some dead code
2022-11-23 16:44:38 -07:00
Aaron Hill
4b8cd45f4b
avm2: Partially implement StaticText ( #8343 )
...
This is linked to the legacy DisplayObject::Text, which can
only be created by Flash CS6 (but is allowed in AVM2 swfs).
The 'StaticText' class cannot be constructed from ActionScript.
To support this, I've added support for native initializers to
playerglobal. This allows us to throw an exception in the
ActionScript constructor in Test.as, and do nothing in the native
intiializer (so that we can construct it from a DisplayObject).
I've left StaticText.text unimplemented for now, since it will require
dealing with Glyphs
Co-authored-by: kmeisthax <dcrkid@yahoo.com>
2022-11-23 18:30:47 -05:00
Moulins
9529a1cbdb
avm1: address Scope nitpicks
2022-11-23 15:50:45 -07:00
Moulins
05e3e6434b
avm1: Remove all allocations in `Activation::from_nothing`
...
This is done by:
- using the global constant pool instead of a fresh empty one:
- OK, as no call-site is directly executing arbitrary bytecode that
could care about the contents of the constant pool.
- pre-allocating the global scope object in the `Avm1` context
- using the global scope directly instead of allocating a local scope:
- OK, because no call-site is directly defining locals on the
returned Activation's scope.
2022-11-23 15:50:45 -07:00
Moulins
5faba34eb2
avm1: remove 'globals' parameter from Activation::from_nothing
...
Across all invocations, this is always set to the global object so it
can be hard-coded inside the call.
2022-11-23 15:50:45 -07:00
Moulins
ea03aa04b8
avm1: make scope references immutable; they were never actually modified
...
Rewrite Scope::new_target_scope, as the previous approach is unusable
now that Scope doesn't have interior mutability anymore.
2022-11-23 15:50:45 -07:00
Moulins
8cb0b47d1f
avm1: make constant pool reference immutable; it was never actually modified
2022-11-23 15:50:45 -07:00
TÖRÖK Attila
a9c94513a0
avm2,audio: Implement leftPeak and rightPeak in SoundChannel
2022-11-23 15:38:41 -07:00
michiel2005
50724448c8
Update array.rs
2022-11-23 15:19:07 -07:00
michiel2005
7c5f2805ef
Avoid code duplication
...
Avoided code duplication in avm1 array.rs as asked
2022-11-23 15:19:07 -07:00
Moulins
2fa3d31732
Appease Clippy on nightly
2022-11-23 22:39:45 +01:00
Toad06
eb2ee06588
avm1: Fix `ExternalInterface.call` with blank strings in SWFv8
2022-11-22 16:51:59 -07:00
Aaron Hill
bdadb17a95
render: Don't use BitmapHandle in tessellator
...
Currently, we rely on ShapeTessellator being able to get a BitmapHandle
without a RenderBackend. With the upcoming BitmapData refactor,
we will always need a RenderBackend to get a BitmapHandle, which creates
borrow-checker issues in ShapeTessellator (which is stored in a
RenderBackend).
To solve this, we split BitmapSource.bitmap into two methods -
BitmapSource.bitmap and BitmapSource.bitmap_handle. ShapeTessellator
continues to use BitmapSource.bitmap, and uses the u16 bitmap id
instead of a BitmapHandle. The BitmapSource.bitmap_handle method
is used inside each render backend to convert the id to a BitmapHandle,
avoiding borrow-checker issues.
2022-11-21 21:04:40 -07:00
David Wendt
0aec23b468
chore: Upgrade deprecated timezone code.
...
This doesn't actually add any new places for code to panic, since the deprecated functions all `unwrap`'d internally.
2022-11-21 18:50:46 -07:00
David Wendt
bc3f6f2494
chore: Update Chrono to the version that complains
2022-11-21 18:50:46 -07:00
dependabot[bot]
1b6e91393e
build(deps): bump indexmap from 1.9.1 to 1.9.2
...
Bumps [indexmap](https://github.com/bluss/indexmap ) from 1.9.1 to 1.9.2.
- [Release notes](https://github.com/bluss/indexmap/releases )
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/bluss/indexmap/compare/1.9.1...1.9.2 )
---
updated-dependencies:
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 18:27:58 -07:00
dependabot[bot]
ccb1fa1b1b
build(deps): bump clap from 4.0.24 to 4.0.26
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.24 to 4.0.26.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.24...v4.0.26 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 18:07:28 -07:00
dependabot[bot]
6ab797b213
build(deps): bump rayon from 1.5.3 to 1.6.0
...
Bumps [rayon](https://github.com/rayon-rs/rayon ) from 1.5.3 to 1.6.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases )
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md )
- [Commits](https://github.com/rayon-rs/rayon/compare/v1.5.3...rayon-core-v1.6.0 )
---
updated-dependencies:
- dependency-name: rayon
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 17:43:05 -07:00
dependabot[bot]
25664778f3
build(deps): bump bitstream-io from 1.5.0 to 1.6.0
...
Bumps [bitstream-io](https://github.com/tuffy/bitstream-io ) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/tuffy/bitstream-io/releases )
- [Commits](https://github.com/tuffy/bitstream-io/compare/v1.5.0...v1.6.0 )
---
updated-dependencies:
- dependency-name: bitstream-io
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 17:16:38 -07:00
dependabot[bot]
cf8217f2ff
build(deps): bump serde_json from 1.0.87 to 1.0.88
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.87 to 1.0.88.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.87...v1.0.88 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 16:31:02 -07:00
dependabot[bot]
c2319da673
build(deps): bump gif from 0.11.4 to 0.12.0
...
Bumps [gif](https://github.com/image-rs/image-gif ) from 0.11.4 to 0.12.0.
- [Release notes](https://github.com/image-rs/image-gif/releases )
- [Changelog](https://github.com/image-rs/image-gif/blob/master/Changes.md )
- [Commits](https://github.com/image-rs/image-gif/compare/v0.11.4...v0.12.0 )
---
updated-dependencies:
- dependency-name: gif
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 16:12:02 -07:00
dependabot[bot]
78dac5e8ea
build(deps): bump insta from 1.21.0 to 1.21.1
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.21.0 to 1.21.1.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/commits/1.21.1 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 15:21:32 -07:00
Toad06
caecc519cd
avm1: Minimal implementation of `LoadVars.getBytesTotal` and `LoadVars.getBytesLoaded`
2022-11-20 22:00:36 -07:00
David Wendt
4c0099c39c
tests: Reduce the epsilons on `as3_edittext_getlinemetrics` and `gettextextent` to more reasonable values
2022-11-20 17:13:48 -07:00
David Wendt
ecdef4c6f4
core: Empty text lines should still have a height.
2022-11-20 17:13:48 -07:00
David Wendt
425bea45f8
avm1: `TextFormat.getTextExtent` uses the height of all boxes in the layout
2022-11-20 17:13:48 -07:00
David Wendt
728b198c9d
tests: Re-run the `gettextextent` in an environment that actually sees Noto Sans as a system font.
2022-11-20 17:13:48 -07:00
David Wendt
51d8a196a4
tests: `gettextextent` should be an approx test.
...
Also, yes, `TextFormat.getTextExtent` returns a bare object.
2022-11-20 17:13:48 -07:00
David Wendt
66bf03908b
avm1: Implement `TextFormat.getTextExtent`
2022-11-20 17:13:48 -07:00
David Wendt
83db53202e
core: Add empty boxes for empty lines *without* breaking multiple-format lines.
2022-11-20 17:13:48 -07:00
David Wendt
6590f58efe
tests: Make `edittext_getlinemetrics` an approximate test with a tolerance of a quarter pixel.
2022-11-20 17:13:48 -07:00
David Wendt
88c3cf0c72
core: The leading for a given line is stated using the text format's leading, not the font's leading.
2022-11-20 17:13:48 -07:00
David Wendt
59f01a40f1
core: Empty lines should also generate a layout box.
2022-11-20 17:13:48 -07:00
David Wendt
1952870ed1
tests: Include tests for empty newlines in the `as3_edittext_getlinemetrics` test.
2022-11-20 17:13:48 -07:00
David Wendt
5f7344259a
avm2: Impl `TextField.numLines` and `.getLineMetrics`
2022-11-20 17:13:48 -07:00
David Wendt
1efa29baa6
core: Add methods for introspecting text metrics on an `EditText`.
2022-11-20 17:13:48 -07:00
David Wendt
c0b6496b96
tests: Add tests for AVM1 `gettextextent` and AVM2 `TextField.getLineMetrics`.
2022-11-20 17:13:48 -07:00
Adrian Wielgosik
7e2b876ab3
avm2: Refactor context menu field bool checks into macro
2022-11-17 22:03:54 -05:00
Adrian Wielgosik
e840d1f71c
core: Support AVM2 context menu (sans callbacks)
2022-11-17 22:03:54 -05:00
Toad06
182c3b78e4
avm1: onData fails if the loaded data is an empty string
2022-11-17 20:51:11 -05:00
dependabot[bot]
b3debc96af
build(deps): bump clap from 4.0.22 to 4.0.24
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.22 to 4.0.24.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.22...v4.0.24 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 09:33:20 +02:00
dependabot[bot]
98aa6014de
build(deps): bump webbrowser from 0.8.1 to 0.8.2
...
Bumps [webbrowser](https://github.com/amodm/webbrowser-rs ) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/amodm/webbrowser-rs/releases )
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.8.1...v0.8.2 )
---
updated-dependencies:
- dependency-name: webbrowser
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 09:02:49 +02:00
dependabot[bot]
cdf8499685
build(deps): bump indicatif from 0.17.1 to 0.17.2
...
Bumps [indicatif](https://github.com/console-rs/indicatif ) from 0.17.1 to 0.17.2.
- [Release notes](https://github.com/console-rs/indicatif/releases )
- [Commits](https://github.com/console-rs/indicatif/compare/0.17.1...0.17.2 )
---
updated-dependencies:
- dependency-name: indicatif
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 08:32:44 +02:00
dependabot[bot]
4c34fa361d
build(deps): bump image from 0.24.4 to 0.24.5
...
Bumps [image](https://github.com/image-rs/image ) from 0.24.4 to 0.24.5.
- [Release notes](https://github.com/image-rs/image/releases )
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image/compare/v0.24.4...v0.24.5 )
---
updated-dependencies:
- dependency-name: image
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 08:12:38 +02:00
dependabot[bot]
99a4172e2b
build(deps): bump gc-arena from `081b688` to `24d8aea`
...
Bumps [gc-arena](https://github.com/ruffle-rs/gc-arena ) from `081b688` to `24d8aea`.
- [Release notes](https://github.com/ruffle-rs/gc-arena/releases )
- [Commits](081b6883a5...24d8aea5f0
)
---
updated-dependencies:
- dependency-name: gc-arena
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 22:48:13 +02:00
Toad06
1cb2678013
web: Add `has` and `ownKeys` methods to the `Reflect` polyfill
2022-11-14 21:31:08 +02:00
TÖRÖK Attila
08270efee7
avm2: Implement SoundMixer.computeSpectrum()
2022-11-10 19:11:29 -05:00