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
Mike Welsh
4a38d36cd7
wgpu: Output premultiplied alpha
2022-04-17 08:33:51 -07:00
Mike Welsh
70b7222d20
webgl: Output premultiplied alpha
2022-04-17 08:33:51 -07:00
relrelb
87e85e16da
render: Make `rgb5_component` a lambda
...
This way the `compressed` parameter becomes implicit.
2022-04-16 13:52:59 -07:00
relrelb
8feeadf578
render: Use `std::borrow::Cow`
...
Also apply some nearby refactors.
2022-04-16 13:52:59 -07:00
relrelb
eeaec947b3
render: Remove unneeded `pub`s
...
And remove the dead `glue_swf_jpeg_to_tables` function.
2022-04-16 13:52:59 -07:00
relrelb
9b4108444f
render: Strip 16-bit PNG samples to 8-bit
...
PNGs with 16-bit samples were not being normalized to 8-bit, screwing up their
appearance.
Add the `STRIP_16` transformation using `Transformations::normalize_to_color8()`,
which is equivalent to `Transformations::EXPAND | Transformations::STRIP_16`.
Also warn in case `png` outputs a color type other than `Rgb` and `Rgba`.
Due to the `EXPAND` transformation, this may be only `Grayscale` or
`GrayscaleAlpha`. `Indexed` is converted to either `Rgb` or `Rgba`.
Fixes #6662 .
2022-04-16 12:45:55 -07:00
Mike Welsh
bce9398c0d
avm1: Add Accessibility stub
2022-04-16 09:05:16 -07:00
Mike Welsh
b83879c392
tests: Update reference images
2022-04-15 14:52:33 -07:00
Mike Welsh
2d43ace225
wgpu: Don't create intermediate render targets when unnecessary
2022-04-15 14:52:33 -07:00
Mike Welsh
f4d72dcc2d
wgpu: Disable depth writes
2022-04-15 14:52:33 -07:00
Mike Welsh
9c11870a08
wgpu: Use linear color render target
...
Always use a non-sRGB texture as the render target so that color
and alpha blending are in sRGB space, matching Flash behavior.
If the surface format requires sRGB, render to an intermediate
linear buffer and copy to the surface as a final render step.
2022-04-15 14:52:33 -07:00
Mike Welsh
00419c6959
wgpu: Use BlendState::ALPHA_BLENDING const
2022-04-15 14:52:33 -07:00
Toad06
65d58f4733
tests: Add tests for `Add`, `Equals`, `Less` and `GetProperty` actions
2022-04-13 22:00:25 -07:00
Toad06
b2b1b5fa25
avm1: Correct `Add`, `Equals`, `Less` and `GetProperty` actions
2022-04-13 22:00:25 -07:00
David Wendt
036aa2b369
chore: Prevent language servers from scanning the Safari stub binary on Windows
2022-04-12 22:14:22 -07:00
David Wendt
7418c4e788
chore: Prevent any compiler access to the Safari stub binary outside of macOS
2022-04-12 22:14:22 -07:00
David Wendt
b825bf6e34
chore: cargo fmt on the stub binary
2022-04-12 22:14:22 -07:00
David Wendt
399614f598
build: Build and package the Safari stub binary for macOS.
2022-04-12 22:14:22 -07:00
David Wendt
79ebcc6dd3
web: Add a crate for a stub binary that builds a Safari Web Extension
2022-04-12 22:14:22 -07:00
David Wendt
9b083d8be4
build: Subpackages need `--deep` codesigning
2022-04-12 22:14:22 -07:00
David Wendt
58ce66e1a3
web: Package the extension as a Safari Web Extension in the desktop build.
2022-04-12 22:14:22 -07:00
Mike Welsh
e1fbcc70f8
canvas: Handle gradient/bitmap strokes
2022-04-11 22:50:40 -07:00
Mike Welsh
e5a7dc94ba
wgpu/webgl: Handle gradient/bitmap strokes
2022-04-11 22:50:40 -07:00
Mike Welsh
146b8adc68
swf: Clean up LineStyle
...
* Remove LineStyle::color, instead using fill_style with
FillStyle::Color to indicate solid color.
* Store `flags` in the struct instead of separate bools/values.
* Add getters/setters for ease of use.
* Add builder-style methods for setting LineStyle properties.
* Fix misnamed ALLOW_CLOSE flag to NO_CLOSE.
2022-04-11 22:50:40 -07:00
Mike Welsh
99d8a5bff3
ci: Run clippy with all features
2022-04-11 20:15:13 -07:00
Mike Welsh
78e8578414
chore: Avoid error when using wgpu feature on web
...
Avoid compilation error when running clippy on the web package
without a `wasm32` arch.
2022-04-11 20:15:13 -07:00
Mike Welsh
c0dff98d84
chore: Fix len_zero warning in symphonia Mp3Decoder
2022-04-11 20:15:13 -07:00
Mike Welsh
24f00238a7
audio: Fix symphonia feature
...
This feature stopped building with the bump to symphonia 0.5, which
added a `Sync` bound to its traits.
* Add `Sync` bounds to our own internal audio traits to match.
* nellymoser::Decoder was also tweaked to add a Sync bound.
* Lock the nellymoser dependency to a specific git commit.
2022-04-11 15:25:15 -07:00
dependabot[bot]
a5f7fccca2
build(deps): bump quote from 1.0.17 to 1.0.18
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.17 to 1.0.18.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.17...1.0.18 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 13:51:20 -07:00
dependabot[bot]
5973ecc7d9
build(deps): bump flate2 from 1.0.22 to 1.0.23
...
Bumps [flate2](https://github.com/rust-lang/flate2-rs ) from 1.0.22 to 1.0.23.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases )
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.22...1.0.23 )
---
updated-dependencies:
- dependency-name: flate2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 13:51:09 -07:00
Toad06
c6c1f553d5
avm1: Correct `Action::RandomNumber`
2022-04-11 11:02:08 -07:00