Commit Graph

7560 Commits

Author SHA1 Message Date
David Wendt 77dadd7844 tests: Test the default values for Normal antialiasing, too. 2022-10-16 14:55:07 -06:00
David Wendt ca8f9c1103 tests: Add tests for `TextField.antiAliasType` and related properties for AVM1 and AVM2. 2022-10-16 14:55:07 -06:00
relrelb 760f9e29df avm1: Migrate `BevelFilter` to `NativeObject` 2022-10-16 11:48:59 +03:00
relrelb 37f171de06 wgpu: Use `Depth32FloatStencil8` over `Depth24PlusStencil8`
Credit to @crumblingstatue.

Per `wgpu` documentation, the latter has wider support than the former.

Fixes #8295, #8296.
2022-10-15 23:35:44 +03:00
relrelb b1665c40c5 docs: Add Kongregate to sponsors 2022-10-15 23:20:38 +03:00
relrelb 1cbc906b04 avm1: Migrate `BlurFilter` to `NativeObject` 2022-10-15 16:00:30 +03:00
relrelb 178bf4fe24 chore: Extract Cargo `edition` to `[workspace.package]`
This is possible since Rust 1.64.0: https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#cargo-improvements-workspace-inheritance-and-multi-target-builds
2022-10-14 22:13:29 +03:00
relrelb 183b8adbf0 wgpu: Bump to `0.14.0`
Also bump `raw-window-handle` to `0.5`, as now required.
2022-10-14 21:49:40 +03:00
relrelb dbfd28e708 web: Bump `wasm-bindgen` to 0.2.83
This restores commit 084b252030.

As usual, also bump its helper crates (`js-sys`, `web-sys` and
`wasm-bindgen-futures`) to the latest versions.
2022-10-14 21:49:40 +03:00
David Wendt 81ed624c26 avm2: Loaders should not be opaque to mouse events. 2022-10-14 12:27:31 -05:00
Tal Hayon 052ec75e2a avm2: BitmapData.perlinNoise and DisplacementMapFilter 2022-10-14 11:22:26 -05:00
relrelb 5f1adc2bbf extension: Avoid some non-null assertions 2022-10-14 11:56:44 +03:00
relrelb acdb5ccb52 web: Remove `RufflePlayer` element existence-checks
They should always be present.
2022-10-14 11:56:44 +03:00
relrelb 29b661b366 web: Avoid deprecated `HTMLDocument` type
As suggested, use `Document` instead.
2022-10-14 11:56:44 +03:00
relrelb b0b0e55c24 swf: Extract read/write of filters to separate functions
Also unify the identical `GradientGlowFilter` and `GradientBevelFilter`
structs into `GradientFilter`.
2022-10-14 02:27:49 +03:00
relrelb bc73301592 avm1: Require some more prototypes
Since they are never `None`.
2022-10-14 00:23:12 +03:00
Aaron Hill 491ffbbf09 wgpu: Fix argument order when calling `BitmapSamplers.get_sampler` 2022-10-13 15:07:53 -05:00
Aaron Hill feda41d6c1 avm2: Add LoaderInfo.uncaughtErrorEvents
We don't currently fire any events, but we store the object
so that listeners will be correctly registered.
2022-10-12 17:26:14 -05:00
relrelb 4b334ce03a tests: Rewrite `Date` tests 2022-10-13 01:06:17 +03:00
relrelb 967ff56e3b avm1: Rewrite `Date` implementation
The new implementation is simpler, and supports many AVM1 quirks not
supported before.

In addition, migrate `Date` to `NativeObject`.
2022-10-13 00:49:50 +03:00
relrelb a59114d569 tests: Expand `primitive_type_globals`
Cover the now-correct `NaN.toString(x)` cases.
2022-10-13 00:05:25 +03:00
relrelb 21e24936b7 avm1: Correct `Number.toString` edge-case
`NaN` and large numbers are actually treated like `i32::MIN`. As described
in https://github.com/ruffle-rs/ruffle/issues/7772#issuecomment-1235977709,
Flash (at least 7+) fails to convert `i32::MIN` to a string due to a bug.
Since `i32::MIN` has no `i32` positive counterpart, digits extracted using
modulo are actually negative and characters before ASCII `'0'` are selected.

Flash 6- somehow return just `0` in those cases. This was Ruffle's behavior
up until this commit. This commit matches Ruffle behavior to latest Flash
Player, as we usually prefer. A `TODO` is still there in case we ever add
player version emulation.
2022-10-13 00:05:25 +03:00
relrelb f5dcbb883e swf: Extract filters to separate files
For better code organization.
2022-10-12 21:20:07 +03:00
relrelb f504804379 avm1: Require `fn_proto` in `FunctionObject::bare_function`
It was never `None`, except for 3 tests in `script_object.rs`,
which now use `activation.context.avm1.prototypes().function`.
2022-10-12 21:01:18 +03:00
relrelb 47a22070a4 desktop: Avoid deprecated `winit::EventLoop::with_user_event()`
Use `EventLoopBuilder::with_user_event().build()` instead, as suggested
by the deprecation warning.
2022-10-11 10:59:19 +03:00
dependabot[bot] 7817301cc4 build(deps): bump winit from 0.26.1 to 0.27.4
Bumps [winit](https://github.com/rust-windowing/winit) from 0.26.1 to 0.27.4.
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/v0.27.4/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.26.1...v0.27.4)

---
updated-dependencies:
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-11 10:59:19 +03:00
dependabot[bot] 1d3412cce0 build(deps): bump serde_json from 1.0.85 to 1.0.86
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.85 to 1.0.86.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.85...v1.0.86)

---
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-10-11 01:29:10 +03:00
dependabot[bot] ce3a8440e6 build(deps): bump simple_asn1 from 0.4.1 to 0.6.2
Bumps [simple_asn1](https://github.com/acw/simple_asn1) from 0.4.1 to 0.6.2.
- [Release notes](https://github.com/acw/simple_asn1/releases)
- [Commits](https://github.com/acw/simple_asn1/commits)

---
updated-dependencies:
- dependency-name: simple_asn1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-11 01:05:10 +03:00
dependabot[bot] 76f18cbc37 build(deps): bump clap from 4.0.9 to 4.0.12
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.9 to 4.0.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/v4.0.9...v4.0.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-10-11 00:32:53 +03:00
dependabot[bot] bdd7c27965 build(deps): bump syn from 1.0.101 to 1.0.102
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.101 to 1.0.102.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.101...1.0.102)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 23:42:49 +03:00
EmperorBale 35c9597032 chore: Appease clippy 2022-10-10 12:48:35 -07:00
EmperorBale bbeea8715c tests: Add test for SWZ parsing 2022-10-10 12:48:35 -07:00
EmperorBale d72ef587f2 avm2: Add digest property to URLRequest 2022-10-10 12:48:35 -07:00
EmperorBale 5c9bf3ffc0 swf: Support SWZ files 2022-10-10 12:48:35 -07:00
Adrian Wielgosik 10c19fef57
render: Bail on attempts on panicking recursive render. (#8248) 2022-10-09 14:33:57 -05:00
relrelb 84533e278d swf: De-duplicate code in `count_sbits_twips()`
Re-use `count_sbits()`, as already done in `count_fbits()`.
2022-10-09 14:18:50 +05:45
relrelb 2b9f0a6280 swf: Optimize `count_ubits()`
Use `u32::leading_zeros()` instead of manually counting bits.
2022-10-09 14:18:50 +05:45
relrelb bf0ace0b88 chore: Appease clippy 2022-10-09 13:46:28 +05:45
relrelb 5c94714363 avm2: Port `flash.ui.Keyboard` to ActionScript 2022-10-07 12:27:56 +03:00
David Wendt 066ca11cff tests: Add a test for AS3 `BitmapData.clone()` 2022-10-07 01:41:48 -05:00
David Wendt 23b5eb6d72 avm2: Implement `BitmapData.clone`. 2022-10-07 01:41:48 -05:00
David Wendt 1b0d23e569 core: Don't desync on frames with no audio blocks.
Fixes regression caused by me in 85cf383c84
2022-10-06 21:41:59 -06:00
Tal Hayon a8b96b676a avm2: Add More BitMapData methods
This also fixes a small bug in copyChannels
2022-10-06 18:53:06 -06:00
Tal Hayon 7d27a5acb5 webgl: vertex array, buffer and texture cleanup 2022-10-06 22:19:45 +03:00
Aaron Hill 4b2907ead5 avm2: Fix 'hasDefinition' and 'getDefinition' for ApplicationDomain
These methods were incorrectly treating the argument as a local name,
instead of a qualified name. Additionally, 'getDefinition' now throws
an AVM error.
2022-10-05 16:45:29 -05:00
relrelb a9dedf759a chore: Fix `clap` update
As described in https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#400---2022-09-28.
2022-10-05 21:33:34 +03:00
dependabot[bot] 32a370f803 build(deps): bump clap from 3.2.20 to 4.0.9
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.20 to 4.0.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.2.20...v4.0.9)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 21:33:34 +03:00
Aaron Hill 9b055645d3 avm2: Support calling 'new Function()' objects
This appears to create a dummy function, which ignores all
of its arguments and always returned `undefined`
2022-10-05 08:57:12 -05:00
dependabot[bot] 414e926e6a build(deps-dev): bump chromedriver from 104.0.0 to 106.0.1 in /web
Bumps [chromedriver](https://github.com/giggio/node-chromedriver) from 104.0.0 to 106.0.1.
- [Release notes](https://github.com/giggio/node-chromedriver/releases)
- [Commits](https://github.com/giggio/node-chromedriver/compare/104.0.0...106.0.1)

---
updated-dependencies:
- dependency-name: chromedriver
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 23:06:52 +03:00
Aaron Hill dc5cab0d03 web: Add `detect_chromedriver_version` to `web/.npmrc`
I've also removed 'web/packages/selfhosted/.npmrc', which
didn't seen to be doing anything on CI.

This should prevent CI failurse when Github updates Chrome on the
runner images.
2022-10-04 14:39:44 -05:00