relrelb
801d95cdfa
avm2: Implement `flash.geom.Orientation3D`
2022-06-24 18:28:33 +03:00
relrelb
b38afb6c75
avm2: Implement `flash.geom.ColorTransform`
2022-06-24 18:28:33 +03:00
relrelb
668a25c404
avm2: Stub `uint` in ActionScript
2022-06-24 18:28:33 +03:00
dependabot[bot]
4872d11cf3
build(deps): bump got from 11.8.3 to 11.8.5 in /web
...
Bumps [got](https://github.com/sindresorhus/got ) from 11.8.3 to 11.8.5.
- [Release notes](https://github.com/sindresorhus/got/releases )
- [Commits](https://github.com/sindresorhus/got/compare/v11.8.3...v11.8.5 )
---
updated-dependencies:
- dependency-name: got
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-23 12:01:14 +03:00
Aaron Hill
6eb4b485f0
Merge pull request #7095 from adrian17/avm2-fix-bare-function-scope
...
avm2: Pull methods' scopes from vtable, not class
2022-06-23 00:10:17 -05:00
relrelb
dd4b615e82
tests: Expand and format `as3_parse_int`
2022-06-23 01:07:15 +03:00
relrelb
017e35a82f
avm2: Refactor `parseInt` implementation
...
Re-use some helper functions introduced in #7212 , and fix some
minor inaccuracies.
2022-06-23 01:07:15 +03:00
Adrian Wielgosik
97cfaff347
avm2: Refactor a (class,scope,method) tuple to a ClassBoundMethod
2022-06-23 00:03:07 +02:00
relrelb
06752646b8
swf: Extract `Twips` to a separate file
2022-06-22 09:49:32 +03:00
nosamu
680ffc3bbd
docs: Minor updates ( #7264 )
...
* docs: Minor updates to README.md
Extension builds are now output to a `dist` folder, just like all other web packages.
* docs: Minor updates to extension README
The Firefox instructions only work in Firefox Developer Edition or Nightly
* docs: Minor fixes for CONTRIBUTING.md
Omit the quotes in the RUST_LOG value, since they cause an error on Windows and are unnecessary on other platforms.
Also clarify which debugging features are activated by RUST_LOG and which are activated only when building Ruffle with `avm_debug`.
* docs: Add detail to build instructions
Add more detailed instructions for building the desktop app, as suggested by @coreybruce in #7251
2022-06-22 08:45:22 +03:00
Callum Thomson
1310f433f2
avm2: Implement escape() toplevel ( #7281 )
...
* AVM2: Implement escape()
* chore: Fix formatting
* avm2: Escape resolves non strings to null and use push to append
* chore: Fix nits
* avm2: Escape should coerce objects, add early returns
2022-06-22 08:43:22 +03:00
dependabot[bot]
87c3463510
build(deps): bump syn from 1.0.96 to 1.0.98
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.96 to 1.0.98.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.96...1.0.98 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 09:59:10 +03:00
dependabot[bot]
06d9a96b4a
build(deps): bump clap from 3.2.1 to 3.2.2
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.1 to 3.2.2.
- [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/clap_complete-v3.2.1...v3.2.2 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 09:54:39 +03:00
relrelb
335ce09cb1
core: Remove `indexmap` version restriction
...
Seems like the cyclic package dependency has been resolved in `1.9.0`,
so bring it back as usual.
2022-06-21 09:26:10 +03:00
dependabot[bot]
678ff2420d
build(deps): bump indexmap from 1.6.2 to 1.9.0
...
Bumps [indexmap](https://github.com/bluss/indexmap ) from 1.6.2 to 1.9.0.
- [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.6.2...1.9.0 )
---
updated-dependencies:
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 09:26:10 +03:00
dependabot[bot]
2d7af88f6b
build(deps): bump getrandom from 0.2.6 to 0.2.7
...
Bumps [getrandom](https://github.com/rust-random/getrandom ) from 0.2.6 to 0.2.7.
- [Release notes](https://github.com/rust-random/getrandom/releases )
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.6...v0.2.7 )
---
updated-dependencies:
- dependency-name: getrandom
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 09:21:25 +03:00
dependabot[bot]
a0823780f6
build(deps): bump crossbeam-channel from 0.5.4 to 0.5.5
...
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam ) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases )
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.4...crossbeam-channel-0.5.5 )
---
updated-dependencies:
- dependency-name: crossbeam-channel
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 09:08:14 +03:00
dependabot[bot]
65538839f5
build(deps): bump quote from 1.0.18 to 1.0.19
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.18 to 1.0.19.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.18...1.0.19 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 08:54:07 +03:00
dependabot[bot]
c37432fb30
build(deps): bump rfd from 0.8.4 to 0.9.1
...
Bumps [rfd](https://github.com/PolyMeilex/rfd ) from 0.8.4 to 0.9.1.
- [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.4...0.9.1 )
---
updated-dependencies:
- dependency-name: rfd
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 08:53:52 +03:00
dependabot[bot]
4fb6afd993
build(deps): bump enum-map from 2.3.0 to 2.4.0
...
Bumps [enum-map](https://github.com/xfix/enum-map ) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/xfix/enum-map/releases )
- [Changelog](https://github.com/xfix/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://github.com/xfix/enum-map/compare/v2.3.0...v2.4.0 )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 08:53:40 +03:00
relrelb
a3ac9a7064
tests: Have at most one image per test
...
Previously image tests had an image per platform (i.e. Linux, Windows).
However, due to containing the LLVM version in their name, which
constantly updates on CI, and the fact that those images are actually
identical, unify them into a single `expected.png` image.
2022-06-21 08:03:25 +03:00
relrelb
cc542e4aae
tests: Add `as3_parse_float_swf10`
...
To cover the bug compatibility of `parseFloat`.
2022-06-21 08:02:40 +03:00
relrelb
f7a0609b62
tests: Expand `as3_parse_float`
2022-06-21 08:02:40 +03:00
relrelb
0e0045425e
avm2: Re-implement `parseFloat`
...
The AVM2 `parseFloat` implementation used to call into the AVM1 one,
which was not 100% accurate. De-couple it as a new implementation,
based on `MathUtils::convertStringToDouble` in `avmplus`:
https://github.com/adobe/avmplus/blob/master/core/MathUtils.cpp#L1229-L1439
2022-06-21 08:02:40 +03:00
relrelb
f66159a387
wstr: Allow creating `Pattern` from `FnMut`
...
This aligns with Rust's standard `Pattern`:
https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html
Also rename `Predicate::is_match` to `matches` in order to appease
Clippy's `wrong-self-convention` lint, and anyway this is closer to
Rust's `MultiCharEq::matches`.
2022-06-21 08:02:40 +03:00
relrelb
b4bed3c931
docs: Improve `CONTRIBUTING.md`
...
Make some general adjustments, and better document how to compile
ActionScript tests.
2022-06-19 23:07:46 +03:00
relrelb
754579eb07
avm2: Port `AccessibilityProperties` to ActionScript
2022-06-18 20:00:56 +03:00
relrelb
786e8d92fb
avm2: Introduce ActionScript entry-points
...
Previously all the `.as` files compiled into `playerglobal.swf`
were detected automatically using `walkdir`. While this might be
convenient, it can cause unexpected results when untracked `.as`
files exist. So instead, introduce two entry points - `stubs.as`
and `globals.as`, which include all stub ActionScript definitions,
and actual class implementations, respectively. This also simplifies
the `playerglobal.swf` build script a bit.
2022-06-18 18:26:57 +03:00
relrelb
4978158638
chore: Resolve `clap` deprecation warnings
...
As suggested in https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#320---2022-06-13 .
2022-06-17 07:58:21 +03:00
dependabot[bot]
a3f5fda85d
build(deps): bump clap from 3.1.18 to 3.2.1
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.18 to 3.2.1.
- [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.18...clap_complete-v3.2.1 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 07:58:21 +03:00
Aaron Hill
21eac9364f
avm2: Use '.stub.as' suffix to indicate stub class
...
This removes the need for keeping an updating list in
'build_playerglobal', and made things easier for me
when porting classes to ActionScript.
2022-06-17 00:03:40 +03:00
relrelb
4e805bb109
avm2: Pass `-optimize` to `asc`
...
In order to reduce builtins size even further.
2022-06-16 23:09:36 +03:00
relrelb
f9596543c6
avm2: Remove unused `Rectangle` and `Point` classes/prototypes
...
They are now both implemented in pure ActionScript, and no Rust code
ever references them.
2022-06-16 22:42:50 +03:00
relrelb
a9915c71bc
avm2: Port `flash.geom.Rectangle` to ActionScript
...
`flash.geom.Rectangle` is a good candidate, since it doesn't have
any native function, and it depends only on `flash.geom.Point`,
which was already been ported to ActionScript in #7071 .
2022-06-16 22:42:50 +03:00
relrelb
036276dece
web: Run tests on Node.js 18
...
Which is the "current" release per https://nodejs.org/en/about/releases/ .
This is in order to be prepared for potentially incoming breaking changes.
2022-06-15 22:02:25 +03:00
Aaron Hill
f629a91e53
avm2: Allow implementing classes in ActionScript in custom `playerglobal`
...
This PR adds support for building a custom `playerglobal.swf`, which can be used
to implement builtin Flash classes in ActionScript. This file is embedded into Ruffle
using `include_bytes!`, and loaded during initialization.
As an example, the `Point` class is reimplemented
in ActionScript, and `flash.text.AntiAliasType` is added.
The ActionScript compilation process is performed by `core/build.rs`.
See that file, along with `core/src/avm2/globals/README.md`, for
more details.
2022-06-15 22:00:17 +03:00
dependabot[bot]
b8cdd59877
build(deps): bump bitstream-io from 1.3.0 to 1.5.0
...
Bumps [bitstream-io](https://github.com/tuffy/bitstream-io ) from 1.3.0 to 1.5.0.
- [Release notes](https://github.com/tuffy/bitstream-io/releases )
- [Commits](https://github.com/tuffy/bitstream-io/compare/v1.3.0...v1.5.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-06-13 23:54:10 +03:00
relrelb
bd88e5e95a
render: Remove unused `unmultiply_alpha_rgba`
2022-06-11 08:28:24 +03:00
Aaron Hill
3d84eb7d45
Remove now-unused `lowest_depth` method
2022-06-11 00:59:18 +03:00
Aaron Hill
6d9d155b15
avm2: Use render_list instead of depth_list in most cases
...
The `render_list` for a container always contains all of the children
under both AVM1 and AVM2 - howver, the depth_list may not contain
some children under AVM2.
When we're not performing some AVM1-specific operation
(e.g. `getInstanceAtDepth`, or dumping out AVM1 variables),
we should be using the render list.
2022-06-11 00:59:18 +03:00
Aaron Hill
cc90796d8a
avm2: More filter-related stubs
...
This stubs out BlurFilter, adds properties to GlowFilter,
and make the getter for DisplayObject.filters return
an empty array instead of Undefined.
This is all of the filter-related code that 'Solarmax'
needs in order to reach the main screen (combined with
other unrelated changes I have yet to submit)
2022-06-10 19:35:48 +03:00
Aaron Hill
bb5c9a1de5
swf: Handle incorrect 'PlaceObject3' tag
...
Fixes #7098
Some SWF appear to have a PlaceObject3 tag with
`HAS_CACHE_AS_BITMAP` set, but the tag ends without
including the corresponding 'is_bitmap_cached' byte.
2022-06-10 16:56:08 +03:00
Aaron Hill
dde21a2a60
chore: Fix latest Clippy warnings
2022-06-08 07:19:56 +03:00
Aaron Hill
487017e7c5
avm2: Properly handle Dictionary enumerants
...
Previously, there was an off-by-one bug in `get_enumerant_name`,
which caused us to produce a spurious 'null' as a key.
However, the 'dictionary_foreach' test only checked that certain
keys were present, so the presence of an additional key didn't break
the test.
This commit makes Dictionary enumerants behave in the same way as
Array enumerants - all of the object-specific enumerants
(in this case, the non-primitive dicitonar keys) come first,
followed by 'base' enumerants from ScriptObject (in this case,
primtive/String keys). Additionally, `setPropertyIsEnumerable` is now
ignored for `Dictionary`, consistent with Flash's behavior.
The `dictionary_foreach` test is updated to print out all of
the keys when inspecting the dictionary. Since the enumeration
order is unstable (under both Flash and Ruffle) due to the dependency
on pointer hashing, the test sorts the keys before printing them.
This ensures that we get stable output which is consistent between
Ruffle and Flash.
2022-06-07 00:39:42 +02:00
dependabot[bot]
b543e07df4
build(deps-dev): bump @typescript-eslint/eslint-plugin in /web
...
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin ) from 5.11.0 to 5.27.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases )
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md )
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.27.1/packages/eslint-plugin )
---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 22:43:45 +03:00
dependabot[bot]
0a88969e58
build(deps-dev): bump webpack from 5.72.1 to 5.73.0 in /web
...
Bumps [webpack](https://github.com/webpack/webpack ) from 5.72.1 to 5.73.0.
- [Release notes](https://github.com/webpack/webpack/releases )
- [Commits](https://github.com/webpack/webpack/compare/v5.72.1...v5.73.0 )
---
updated-dependencies:
- dependency-name: webpack
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 22:43:34 +03:00
Aaron Hill
a4b3dbed79
avm2: Allow accessing `stage.loaderInfo.loaderURL`
...
Flash Player allows this, and returns the path to the root SWF file.
The test only checks that the returned path contains 'test.swf',
to avoid depending on a platform-specific path.
2022-06-06 22:08:54 +03:00
dependabot[bot]
662df2a93e
build(deps-dev): bump @wdio/static-server-service in /web
...
Bumps [@wdio/static-server-service](https://github.com/webdriverio/webdriverio ) from 7.19.5 to 7.20.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases )
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md )
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.19.5...v7.20.0 )
---
updated-dependencies:
- dependency-name: "@wdio/static-server-service"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 21:50:23 +03:00
dependabot[bot]
82d6f63114
build(deps-dev): bump eslint from 8.12.0 to 8.17.0 in /web
...
Bumps [eslint](https://github.com/eslint/eslint ) from 8.12.0 to 8.17.0.
- [Release notes](https://github.com/eslint/eslint/releases )
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md )
- [Commits](https://github.com/eslint/eslint/compare/v8.12.0...v8.17.0 )
---
updated-dependencies:
- dependency-name: eslint
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 21:41:11 +03:00
dependabot[bot]
22c2551e6d
build(deps-dev): bump stylelint from 14.5.0 to 14.8.5 in /web
...
Bumps [stylelint](https://github.com/stylelint/stylelint ) from 14.5.0 to 14.8.5.
- [Release notes](https://github.com/stylelint/stylelint/releases )
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md )
- [Commits](https://github.com/stylelint/stylelint/compare/14.5.0...14.8.5 )
---
updated-dependencies:
- dependency-name: stylelint
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 21:40:56 +03:00