Commit Graph

5076 Commits

Author SHA1 Message Date
Mike Welsh 10b014bf18 tests: Move utils.js out of polyfill folder 2021-04-23 16:58:24 -07:00
Mike Welsh 0c5951da52 tests: Add tests for Ruffle JS API
Add some basic scaffolding for testing the JS API. Adds a test for
`RufflePlayer.load` and `RufflePlayer.metadata`.
2021-04-23 16:58:24 -07:00
Mike Welsh d34b72cc47 web: Expose SWF metadata to JavaScript
Add `RufflePlayer.metadata` that exposes the SWF header fields to
JavaScript.

Add `RufflePlayer.readyState` and fire a `loadedmetadata` event
once the metadata is available, mimicking the HTML5 media APIs.
2021-04-23 16:58:24 -07:00
relrelb 488e4421e9 extension: Lint after TypeScript migration 2021-04-23 16:58:13 -07:00
relrelb cfc57a2e1d extension: Complete TypeScript migration 2021-04-23 16:58:13 -07:00
relrelb b0c6cfe1d3 extension: Initial TypeScript migration 2021-04-23 16:58:13 -07:00
Mike Welsh 33a73c5262 tests: Bump test script timeout 2021-04-23 16:57:28 -07:00
Mike Welsh d58bc9b5c5 core: Disable script timeout in debug builds 2021-04-23 16:57:28 -07:00
dependabot-preview[bot] 91c3c6cbac build(deps): bump dirs from 3.0.1 to 3.0.2
Bumps [dirs](https://github.com/soc/dirs-rs) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-23 16:39:29 -07:00
Mike Welsh 35d380f48c chore: Switch to new cargo resolver 2021-04-23 12:44:27 -07:00
David Wendt f33976f4c0 avm2: Store symbol / class relationships using the class constructor, not the prototype. 2021-04-23 00:26:10 -07:00
David Wendt 0ee9e0f820 tests: Add a test for constructing symbol classes in AVM2 2021-04-23 00:26:10 -07:00
David Wendt aa6dc600c0 avm2: Treat construction of symbol classes as symbol instantiation. 2021-04-23 00:26:10 -07:00
David Wendt 815d0fb540 core: Add `DisplayObject` method for setting the AVM2 side of a display object 2021-04-23 00:26:10 -07:00
David Wendt 9b19cc1570 Store the movie associated with a given symbol being constructed. 2021-04-23 00:26:10 -07:00
David Wendt 282508a281 core: Make the AVM2 constructor registry global 2021-04-23 00:26:10 -07:00
David Wendt b1be111a4e core: Store constructor prototypes in the constructor registry when defining symbols 2021-04-23 00:26:10 -07:00
David Wendt 555d97006a core: Add an AVM2 constructor registry 2021-04-23 00:26:10 -07:00
David Wendt 68c270e7c0 avm2: Impl `Eq`, `Hash` for `Object` using ptr values 2021-04-23 00:26:10 -07:00
relrelb a157d7ab72 extension: Avoid script injection in XML documents 2021-04-22 18:05:18 -07:00
dependabot-preview[bot] f0bdb57996 build(deps): bump embed-resource from 1.6.1 to 1.6.2
Bumps [embed-resource](https://github.com/nabijaczleweli/rust-embed-resource) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/nabijaczleweli/rust-embed-resource/releases)
- [Commits](https://github.com/nabijaczleweli/rust-embed-resource/compare/v1.6.1...v1.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-22 12:19:52 -07:00
relrelb 2b71786b8b extension: Convert manifest to JSON5
JSON5 is a more flexible superset of JSON. It supports comments,
trailing commas and more nice features that JSON doesn't support.
2021-04-21 19:03:19 -07:00
relrelb 0fa24b4ce0 web: Migrate file-loader to asset modules
file-loader is deprecated and asset modules are the recommended
alternative.
2021-04-21 19:03:19 -07:00
relrelb 201c4f5db0 web: Use relative paths for webpack entries
Only output.path needs to be absolute.
2021-04-21 19:03:19 -07:00
relrelb 5527973d48 web: Update package-lock.json 2021-04-21 19:03:19 -07:00
TÖRÖK Attila 3f583088a2 core/avm1: Coerce Rectangle and Point parameter fields to f64 first 2021-04-21 18:46:03 -07:00
TÖRÖK Attila 22306cc8d9 core/avm1: Switch to i32 in BitmapData.merge(), clamp *_mult parameters 2021-04-21 18:46:03 -07:00
TÖRÖK Attila 40eedb6405 core/avm1: Implement BitmapData.merge() 2021-04-21 18:46:03 -07:00
dependabot-preview[bot] 63e8c0c88a build(deps): bump syn from 1.0.69 to 1.0.70
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.69 to 1.0.70.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.69...1.0.70)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-21 18:31:39 -07:00
Adrian Wielgosik 8176e0a633
avm2: minor changes to domain memory
* Do not use as_bytearray_mut when we don't need mutability
* Set default domain memory size to 1024b.
2021-04-21 15:08:13 -07:00
CUB3D 9812fab9f8 chore: Format and fix clippy lints 2021-04-21 00:33:11 -07:00
CUB3D 7c4eb0d7ff avm2: Implement ApplicationDomain.domainMemory 2021-04-21 00:33:11 -07:00
CUB3D b3b1e69fc2 avm2: Store ByteArrayObject in Domain rather than ByteArrayStorage 2021-04-21 00:33:11 -07:00
CUB3D 4dc1210b37 avm2: Use try_into for converting slice->array 2021-04-21 00:33:11 -07:00
CUB3D 98d9bd06b6 avm2: Remove more unused code from test 2021-04-21 00:33:11 -07:00
CUB3D d6a3b5bfda avm2: Remove unused code from test 2021-04-21 00:33:11 -07:00
CUB3D 397ceed33c avm2: Dont panic when domain memory not available 2021-04-21 00:33:11 -07:00
CUB3D 136add866a chore: Fix clippy lints 2021-04-21 00:33:11 -07:00
CUB3D 63120806bf avm2: Correct Sxi8 and Sxi16 2021-04-21 00:33:11 -07:00
CUB3D 6d2339b151 avm2: Add tests for Op::Sxi1 2021-04-21 00:33:11 -07:00
CUB3D f34579926c chore: Format 2021-04-21 00:33:11 -07:00
CUB3D 99edb5ab2b avm2: Implement Op::Sxi1 2021-04-21 00:33:11 -07:00
CUB3D 9ffa4f1f50 avm2: Implement Op::Lf64 2021-04-21 00:33:11 -07:00
CUB3D b4736413fa avm2: Implement Op::Sf64 2021-04-21 00:33:11 -07:00
CUB3D 2b4becf41f avm2: Implement Op::Lf32 2021-04-21 00:33:11 -07:00
CUB3D 509392db8e avm2: Implement Op::Sf32 2021-04-21 00:33:11 -07:00
CUB3D dce2626482 avm2: Use from/to_le_bytes 2021-04-21 00:33:11 -07:00
CUB3D 35d7c5a7e3 chore: Format 2021-04-21 00:33:11 -07:00
CUB3D ae9d5fd328 avm2: Implement Op::Li32 2021-04-21 00:33:11 -07:00
CUB3D 951d557a90 avm2: Implement Op::Si32 2021-04-21 00:33:11 -07:00