relrelb
0e65617d4a
avm2: Small cleanup in `RegExp::effective_replacement`
...
`char_indicies()` isn't really needed because the position is never
used.
So use the simpler `chars()` method instead.
2022-07-18 10:53:18 +03:00
Adrian Wielgosik
22d2810ef9
avm2: Migrate ContextMenu-related classes to AS
2022-07-17 11:05:37 -07:00
relrelb
cad3cd8dbf
avm2: Inline `Activation::run_stack_frame_for_script`
...
This reduces some complexity.
2022-07-15 17:15:14 -05:00
Aaron Hill
af4f181856
avm2: Implement support for native methods in `playerglobal`
...
This commit adds support for marking methods as `native`
in ActionScript classes defined in playerglobal. The
`build_playerglobal` now checks for native methods, and
generates Rust code linking them to a corresponding Rust
function definition in the codebase.
To test this functionality, I've reimplemented several
functions as native methods (and moved related code to
pure ActionScript).
2022-07-15 11:43:49 -05:00
EmperorBale
41bfc028d2
tests: Add test for special unicode characters and characters that need padding
2022-07-15 15:29:55 +03:00
EmperorBale
95809f8a9b
avm2: Make escape output for unicode characters, as well as characters that need padding
2022-07-15 15:29:55 +03:00
nosamu
245b55a832
chore: Fix lint
2022-07-13 20:36:52 -07:00
nosamu
7c55a14c36
demo: Update swfs.json example
2022-07-13 20:36:52 -07:00
nosamu
320f84dc88
demo: Improve Sample SWF dropdown
2022-07-13 20:36:52 -07:00
dowgird
cfc9f51c5d
avm2: implement $ patterns in regex replace
2022-07-13 15:48:25 -06:00
relrelb
13a0eb3d92
scanner: Fix `path-slash` update
...
As mentioned in the [CHANGELOG.md](https://github.com/rhysd/path-slash/blob/master/CHANGELOG.md#v020---05-jul-2022 ),
`to_slash_lossy` now returns `Cow<'_, str>` instead of `String`.
2022-07-12 00:24:50 +03:00
dependabot[bot]
c3a8d11e39
build(deps): bump path-slash from 0.1.5 to 0.2.0
...
Bumps [path-slash](https://github.com/rhysd/path-slash ) from 0.1.5 to 0.2.0.
- [Release notes](https://github.com/rhysd/path-slash/releases )
- [Changelog](https://github.com/rhysd/path-slash/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rhysd/path-slash/compare/v0.1.5...v0.2.0 )
---
updated-dependencies:
- dependency-name: path-slash
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-12 00:24:50 +03:00
dependabot[bot]
80dd295748
build(deps): bump lyon from 0.17.10 to 1.0.0
...
Bumps [lyon](https://github.com/nical/lyon ) from 0.17.10 to 1.0.0.
- [Release notes](https://github.com/nical/lyon/releases )
- [Changelog](https://github.com/nical/lyon/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nical/lyon/commits )
---
updated-dependencies:
- dependency-name: lyon
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 23:36:39 +03:00
dependabot[bot]
90ecdfaff5
build(deps): bump serde from 1.0.138 to 1.0.139
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.138 to 1.0.139.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.138...v1.0.139 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 23:35:30 +03:00
nosamu
a31dd2e101
Revert "web: Add a loading screen"
...
This reverts commit bec0710175
.
2022-07-11 19:05:52 +02:00
nosamu
47d9c5220a
Revert "web: Workaround sometimes overwitten remove method"
...
This reverts commit ed4f0b98b2
.
2022-07-11 19:05:52 +02:00
nosamu
478c69f846
Revert "web: Completely remove exact px values from preloader"
...
This reverts commit 2c067fe5dd
.
2022-07-11 19:05:52 +02:00
nosamu
d79e45e49e
Revert "web: Add meaningless loading animation to preloader"
...
This reverts commit c48ca2874b
.
2022-07-11 19:05:52 +02:00
nosamu
7c522f2d66
Revert "web: Make preloader position relative"
...
This reverts commit ded77ab46a
.
2022-07-11 19:05:52 +02:00
Rafał Dowgird
80d1a8449a
avm2: implement string.split for regex ( #7363 )
...
* avm2: implement string.split for regex
* Compressed the testing for regexp and unwrapping thereof
* * Moved the split logic into the regex object
* Factored out a method for utf-16 matching
* Added tests
* formatting
* * replaced manual counting with storage.length()
* clippy cleanup
* Address review comments
* fix import path for WString
* remove redundant variable in return statement
* error passing via '?' instead of unwrap()
2022-07-11 19:47:05 +03:00
Daniel Jacobs
ded77ab46a
web: Make preloader position relative
2022-07-10 13:30:42 -07:00
Daniel Jacobs
c48ca2874b
web: Add meaningless loading animation to preloader
2022-07-10 13:30:42 -07:00
Daniel Jacobs
2c067fe5dd
web: Completely remove exact px values from preloader
2022-07-10 13:30:42 -07:00
Daniel Jacobs
ed4f0b98b2
web: Workaround sometimes overwitten remove method
2022-07-10 13:30:42 -07:00
Daniel Jacobs
bec0710175
web: Add a loading screen
2022-07-10 13:30:42 -07:00
relrelb
9856a03797
avm1: Inline `apply_to_display_object`
2022-07-10 07:29:38 +03:00
relrelb
78ebf06f55
avm2: Extract `MethodFlags` enum
2022-07-09 20:34:53 +03:00
relrelb
afd24cad12
desktop: Tiny cleanup
2022-07-09 11:06:39 +03:00
relrelb
f643048c1c
core: Introduce `Request`
...
Which holds both a URL and what was `RequestOptions` formerly.
2022-07-09 09:43:42 +03:00
relrelb
115f15806e
chore: Fix `needless_borrow` clippy lints
...
Though https://github.com/rust-lang/rust-clippy/pull/8355 has been
merged, it seems to still report false-positives on nightly channel.
For now just fix the instances reported by stable clippy, and keep
`needless_borrow` allowed.
2022-07-08 14:14:30 +03:00
nosamu
7fa35f2a82
web: Construct relative SWF URLs using document base
2022-07-07 08:58:04 +03:00
relrelb
c0e84e646e
wstr: Implement `ToOwned` for `WStr`
...
Similarly to how `str` implements `ToOwned`, and `From<&str> for String`
forwards to `to_owned()`.
This will allow defining `Cow<WStr>`.
2022-07-06 09:19:12 +03:00
relrelb
2f4e31c6be
avm1: Avoid allocation of some static strings
...
Prefer creating a static `AvmString` over allocating an owned one.
2022-07-06 09:19:12 +03:00
relrelb
9c1a05aaaf
avm2: Re-use code in `coerce_to_number`
...
Use `string_to_f64` and `string_to_int`, as [`MathUtils::convertStringToNumber`](858d034a3b/core/MathUtils.cpp (L453-L466)
)
in avmplus does.
2022-07-06 09:04:15 +03:00
dependabot[bot]
265dcd2e8d
build(deps): bump serde_json from 1.0.81 to 1.0.82
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.81...v1.0.82 )
---
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-07-05 09:09:03 +03:00
dependabot[bot]
55e985da8c
build(deps): bump serde from 1.0.137 to 1.0.138
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.137 to 1.0.138.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.137...v1.0.138 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-05 08:43:27 +03:00
dependabot[bot]
cfe3d37905
build(deps): bump bytemuck from 1.9.1 to 1.10.0
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.9.1...v1.10.0 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 23:55:22 +03:00
dependabot[bot]
8cbb5cc4eb
build(deps): bump embed-resource from 1.7.2 to 1.7.3
...
Bumps [embed-resource](https://github.com/nabijaczleweli/rust-embed-resource ) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/nabijaczleweli/rust-embed-resource/releases )
- [Commits](https://github.com/nabijaczleweli/rust-embed-resource/compare/v1.7.2...v1.7.3 )
---
updated-dependencies:
- dependency-name: embed-resource
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 23:55:09 +03:00
dependabot[bot]
7675c2a869
build(deps): bump path-slash from 0.1.4 to 0.1.5
...
Bumps [path-slash](https://github.com/rhysd/path-slash ) from 0.1.4 to 0.1.5.
- [Release notes](https://github.com/rhysd/path-slash/releases )
- [Changelog](https://github.com/rhysd/path-slash/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rhysd/path-slash/compare/v0.1.4...v0.1.5 )
---
updated-dependencies:
- dependency-name: path-slash
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 23:54:54 +03:00
dependabot[bot]
52bc7a39b4
build(deps): bump smallvec from 1.8.1 to 1.9.0
...
Bumps [smallvec](https://github.com/servo/rust-smallvec ) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases )
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.8.1...v1.9.0 )
---
updated-dependencies:
- dependency-name: smallvec
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 23:32:26 +03:00
dependabot[bot]
16a403832b
build(deps): bump gc-arena from `4931b3b` to `4882182`
...
Bumps [gc-arena](https://github.com/ruffle-rs/gc-arena ) from `4931b3b` to `4882182`.
- [Release notes](https://github.com/ruffle-rs/gc-arena/releases )
- [Commits](4931b3bc25...4882182850
)
---
updated-dependencies:
- dependency-name: gc-arena
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 23:32:12 +03:00
Mike Welsh
49e8f4e939
tests: Add test for register preload order
2022-07-03 12:51:07 -07:00
Mike Welsh
1963e47392
avm1: Increment register when preloading super ( fix #7338 )
...
The register index was not being increment when preloading the
`super` register which would cause issues when multiple registers
were preloaded.
Fixes #7338 .
2022-07-03 12:51:07 -07:00
relrelb
a4fbd11cf5
tests: Expand `parse_float`
...
And make it non-approx, since Ruffle now traces the exact output.
2022-07-02 18:08:08 -07:00
relrelb
f0db6d8c60
avm1: Correct `parseFloat()`
...
Rewrite the implementation of `string_to_f64()` to match Flash behavior.
This affects `parseFloat()` as well as any `Value` to `f64` coercion.
2022-07-02 18:08:08 -07:00
relrelb
0148fde852
tests: Expand `as3_parse_int` and `as3_parse_float` a little
2022-07-02 17:48:19 -07:00
relrelb
10af9435ae
avm2: Minor `parseInt()/parseFloat()` tweaks
...
Alongside comment wordings, fix handling of non-`u8` characters by
replacing `as u8` conversions with `u8::try_from()`, that doesn't
wrap around, but rather fails gracefully.
2022-07-02 17:48:19 -07:00
Mike Welsh
d3c64d4eb7
webgl/wgpu: Omit strokes when drawing a mask stencil
...
Adjust `common_tess` to add an additional `mask_index_count` to
draws. This is used to not render strokes when drawing a shape as
a mask stencil.
Fixes #7027 .
2022-07-02 16:57:53 -07:00
Mike Welsh
b39d54de2c
wgpu: Update exporter for wgpu 0.13
2022-07-02 16:44:37 -07:00
Mike Welsh
cb70d6e612
wgpu: Prefer linear surface formats
...
wgpu 0.13 added `Surface::get_supported_formats`, so we can check
if a non-sRGB surface format is supported on the current platform.
Because Flash colors and blending are in sRGB space, we want a
linear surface when possible to prevent the colors from being
fiddled with by the GPU.
2022-07-02 16:44:37 -07:00