David Wendt
90da579835
tests: Tests should process events after a frame runs, otherwise we miss some at the start.
2022-04-25 16:29:07 -06:00
David Wendt
d4dc440bb6
tests: Add a basic test for mouse clicks on AS2.
2022-04-25 16:29:07 -06:00
David Wendt
4c8443a464
tests: Add support for `input.json` files next to tests.
...
If the file is missing we treat it as if the file has no events to inject.
2022-04-25 16:29:07 -06:00
David Wendt
06410e97ba
tests: Input files should be `Debug`
2022-04-25 16:29:07 -06:00
David Wendt
e28ecbb647
tests: `InputInjector.next` must actually move up it's position index
2022-04-25 16:29:07 -06:00
David Wendt
952fee4ac0
tests: Add `InputInjector` type for opening and iterating an input file.
2022-04-25 16:29:07 -06:00
David Wendt
ac86dee3a6
tests: Add a library defining the file format for Ruffle test input.
...
I intend to share this code across both Ruffle and FlashTAS (another project that allows running input tests on Flash Player), hence why it's a separate library from Ruffle's tests crate.
2022-04-25 16:29:07 -06:00
dependabot[bot]
aed5c85edb
build(deps): bump webbrowser from 0.6.0 to 0.7.0
...
Bumps [webbrowser](https://github.com/amodm/webbrowser-rs ) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/amodm/webbrowser-rs/releases )
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.6.0...v0.7.0 )
---
updated-dependencies:
- dependency-name: webbrowser
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 13:41:42 -07:00
dependabot[bot]
1aafd5c62b
build(deps): bump clap from 3.1.9 to 3.1.12
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.9 to 3.1.12.
- [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/v3.1.9...v3.1.12 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 13:41:09 -07:00
David Wendt
155672d482
core: Remove AS3-related `coerce_to_object` calls in `MovieClip`
2022-04-24 16:54:19 -07:00
David Wendt
fe50e98f87
avm2: Remove `coerce_to_object` calls in `flash.text.TextField`
2022-04-24 16:54:19 -07:00
David Wendt
afdae1f6c6
avm2: Remove `coerce_to_object` calls in `flash.media.Sound`
2022-04-24 16:54:19 -07:00
David Wendt
818526069e
avm2: Remove `coerce_to_object` calls in `flash.events.MouseEvent`
2022-04-24 16:54:19 -07:00
David Wendt
5dc5ca06e3
avm2: Remove `coerce_to_object` calls in `flash.events.EventDispatcher`
2022-04-24 16:54:19 -07:00
David Wendt
4c736094c1
avm2: Remove `coerce_to_object` calls in `flash.display.Stage`
2022-04-24 16:54:19 -07:00
David Wendt
cbc9937fcf
avm2: Remove `coerce_to_object` calls in `flash.display.SimpleButton`
2022-04-24 16:54:19 -07:00
David Wendt
40ecae28d0
avm2: Remove `coerce_to_object` in `flash.display.MovieClip`
2022-04-24 16:54:19 -07:00
David Wendt
85b598a8da
avm2: Remove `coerce_to_object` calls in `flash.display.DisplayObjectContainer`
2022-04-24 16:54:19 -07:00
David Wendt
7e7ee14d3b
avm2: Remove `coerce_to_object` calls in `flash.display.DisplayObject`.
2022-04-24 16:54:19 -07:00
David Wendt
5f5f98ecdc
avm2: Remove `coerce_to_object` calls in `flash.display.Bitmap`
2022-04-24 16:54:19 -07:00
David Wendt
5b5313bf95
avm2: Remove `coerce_to_object` calls in `String` impls
2022-04-24 16:54:19 -07:00
David Wendt
e851b73570
avm2: Remove calls to `coerce_to_object` in `JSON` impls
2022-04-24 16:54:19 -07:00
David Wendt
88f4ebc2a3
avm2: Remove calls to `coerce_to_object` in `Function` impls
2022-04-24 16:54:19 -07:00
David Wendt
26e65368df
avm2: Remove `coerce_to_object` calls in `Array` where possible, and replace with more descriptive error messages otherwise
2022-04-24 16:54:19 -07:00
David Wendt
1383901a94
avm2: Remove unnecessary usage of `coerce_to_object` in `avm2::globals`.
2022-04-24 16:54:19 -07:00
David Wendt
90b239f30d
avm2: Add descriptive error messages for when `Vector` methods encounter `null`/`undefined`.
2022-04-24 16:54:19 -07:00
David Wendt
e486efb4c6
avm2: Remove unnecessary usage of `coerce_to_object` in `ClassObject`.
2022-04-24 16:54:19 -07:00
David Wendt
0f2b77c138
avm2: Alter basic object operations to use more descriptive error messages.
2022-04-24 16:54:19 -07:00
David Wendt
4185acc5a8
avm2: Remove unnecessary usage of `coerce_to_object` in `avm2::events`.
2022-04-24 16:54:19 -07:00
David Wendt
bb70086238
avm2: Replace a number of `coerce_to_object` calls with the previous commits' new messages as appropriate
2022-04-24 16:54:19 -07:00
David Wendt
bea6744682
avm2: Add methods to `Value` and `Activation` for performing common coercions and returning a relevant error if they fail.
...
Those methods are:
* `Value.coerce_to_receiver`: coerce to object for receivers
* `Value.as_callable`: as_object for callables
* `Activation.superclass_object`: get superclass of currently-called object
* `Activation.resolve_class`: resolve scope value, unwrap `ClassObject`, and error out if either step fails
This accounts for ~80% of coercion-related errors in `Activation`.
2022-04-24 16:54:19 -07:00
David Wendt
2ec606c5cb
avm2: Add utilities for formatting `Multiname`s and class instances' names.
2022-04-24 16:54:19 -07:00
nosamu
e8d5274a18
web: Fix compatibility with Rocket Loader
...
Cloudflare's Rocket Loader script [prevents the DOMContentLoaded event from firing](https://dev.to/hollowman6/solution-to-missing-domcontentloaded-event-when-enabling-both-html-auto-minify-and-rocket-loader-in-cloudflare-5ch8 ), which was preventing Ruffle's public API from initializing. Work around this by also listening for the `load` event.
Fixes #2254 and #6583 .
2022-04-23 19:46:32 -07:00
relrelb
3dbde841df
avm1: Remove `TObject::type_of`
...
It can be simply determined in `Value::type_of`.
2022-04-23 17:55:48 -07:00
David Wendt
052cb40113
build: `actions/download-artifact` puts the ZIP file in the root of the project for some reason, breaking the Safari extension
2022-04-23 00:08:32 -07:00
relrelb
d27f1fb811
tests: Fix image tests
...
CI was upgraded to use LLVM 14.
Rename image tests (currently only color) to match it.
2022-04-23 00:07:56 -07:00
Daniel Jacobs
aa92c3c1bc
core: scale_mode -> window_mode for set_window_mode
2022-04-22 19:31:23 +03:00
Mike Welsh
e2e7ad0df2
avm2: Implement `flash.ui.Keyboard`
...
Add `Keyboard` key code constants and stub out other properties.
2022-04-21 21:40:04 -07:00
Mike Welsh
1cb3d389e8
core: Add some KeyCode variants
2022-04-21 21:40:04 -07:00
TÖRÖK Attila
7cbba5bc8f
avm2: Stub flash.accessibility.AccessibilityProperties
2022-04-19 09:55:09 -07:00
Mike Welsh
91c1a408fb
web: Don't set container bgcolor in transparent wmode
...
If a Flash embed set both the `bgcolor` param and transparent
`wmode`, the Ruffle polyfill would incorrectly set the container
to use the background color. Keep the background transparent instead.
2022-04-19 01:57:15 -07:00
relrelb
25d47da528
render: Improve CMYK to RGB conversion
...
Use integer arithmetic, which is more accurate and efficient.
2022-04-18 22:00:48 -07:00
dependabot[bot]
c1b74f1b01
build(deps): bump rfd from 0.8.1 to 0.8.2
...
Bumps [rfd](https://github.com/PolyMeilex/rfd ) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/PolyMeilex/rfd/releases )
- [Changelog](https://github.com/PolyMeilex/rfd/blob/master/CHANGELOG.md )
- [Commits](https://github.com/PolyMeilex/rfd/compare/0.8.1...0.8.2 )
---
updated-dependencies:
- dependency-name: rfd
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 15:25:31 -07:00
dependabot[bot]
073e5a3820
build(deps): bump rayon from 1.5.1 to 1.5.2
...
Bumps [rayon](https://github.com/rayon-rs/rayon ) from 1.5.1 to 1.5.2.
- [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/commits )
---
updated-dependencies:
- dependency-name: rayon
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 14:59:40 -07:00
dependabot[bot]
e6576df298
build(deps): bump clap from 3.1.8 to 3.1.9
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.8 to 3.1.9.
- [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/v3.1.8...v3.1.9 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 14:59:23 -07:00
nosamu
20d4149fe4
extension: Check for all octet-stream MIME types
...
When a server returns a `.swf` file with an octet-stream MIME type, Ruffle should treat it as an SWF. Right now the extension checks specifically for the `application/octet-stream` MIME type, which leaves out servers like [MaxGames](https://farm.maxgames.com/soldier-diary-13469MTU5MA==.swf ) that use the `binary/octet-stream` type instead. Check if the MIME type ends with `octet-stream` to handle both cases.
2022-04-18 09:01:10 -07:00
Mike Welsh
cc9bdaaadb
tests: Add test for sortOn with proto and virtual properties
2022-04-18 08:34:04 -07:00
Mike Welsh
cdccc2a2db
avm1: Array.sortOn does not inspect proto or virtual properties
...
`Array.sortOn` only looks at raw properties and does not inspect
the prototype chain or call virtual properties.
2022-04-18 08:34:04 -07:00
Mike Welsh
3305ac69c4
web: Support wmode parameter
2022-04-17 08:33:51 -07:00
Mike Welsh
8131a4f3cc
web: Allow transparent stage
2022-04-17 08:33:51 -07:00