David Wendt
1c308551ae
chore: App bundle also needs a Resources directory.
2022-03-18 15:55:11 -06:00
relrelb
b31e826ee6
core: Simplify `SwfMovie` parsing in `Loader`
...
This also slightly changes behavior: Previously `SwfMovie::from_data`
errors were propagated as `FetchError` and `display_root_movie_download_failed_message`
was called, offering the user to sidestep CORS by opening the SWF
in a new tab. But that wouldn't help, obviously, because no network
error is involved. Now, these errors are propagated as `InvalidSwf`,
and `display_root_movie_download_failed_message` is not called.
2022-03-17 20:31:59 -07:00
relrelb
ad944800be
core: Perfer `Loader`'s `FetchError`
...
`NetworkError` and `NetworkUnavailable` were rarely used, and they
were very similar to `FetchError`.
2022-03-17 20:31:59 -07:00
relrelb
bf32fc8576
core: Remove unused `Loader` types
2022-03-17 20:31:59 -07:00
dependabot[bot]
d56377b166
build(deps): bump quote from 1.0.15 to 1.0.16
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.15 to 1.0.16.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.15...1.0.16 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 20:29:26 -07:00
relrelb
7e3c85b0c1
web: Cleanup `web-sys` features
...
Remove unused ones, sort them alphabetically and wrap to 120 columns
per line.
2022-03-18 03:57:20 +02:00
David Wendt
f7af4af818
Since we are building an app bundle now, the macOS packager needs to clone the repo, too
2022-03-17 19:48:17 -06:00
David Wendt
e5b6e8c8b7
Specify Ruffle's accent color on macOS.
2022-03-17 17:15:14 -06:00
David Wendt
4e0253ebf0
Package the nightly builds as a MacOS app bundle.
2022-03-17 17:15:14 -06:00
dependabot[bot]
50bdb40914
build(deps): bump syn from 1.0.87 to 1.0.88
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.87 to 1.0.88.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.87...1.0.88 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 01:00:16 +02:00
dependabot[bot]
7fc6a7c000
build(deps): bump syn from 1.0.87 to 1.0.88
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.87 to 1.0.88.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.87...1.0.88 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 00:21:26 +02:00
relrelb
8a17d88c77
core: Remove `NavigatorBackend::time_since_launch`
...
`core` already depends on the `instant` crate which abstracts
`std::instant::Instant` and polyfills it on Web. Use it to replace
`NavigatorBackend::time_since_launch` in order to make `NavigatorBackend`
a little smaller and more simple.
2022-03-17 00:08:44 +02:00
dependabot[bot]
f282e93778
build(deps): bump crossbeam-channel from 0.5.2 to 0.5.3
...
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam ) from 0.5.2 to 0.5.3.
- [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.2...crossbeam-channel-0.5.3 )
---
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-03-17 00:07:03 +02:00
relrelb
031126a1b8
core: Remove `LocaleBackend`
...
Previously there were 3 implementations of `LocaleBackend`:
`DesktopLocaleBackend`, `WebLocaleBackend` and `NullLocaleBackend`.
While `DesktopLocaleBackend`, `WebLocaleBackend` were identical,
`NullLocaleBackend` always returned a fixed date/time for tests
determinism.
Unify them in a single file, and use `cfg!(test)` and a new dedicated
`deterministic` feature to decide whether to mock date/time or not.
This should not cause any behavioral changes.
2022-03-16 19:57:53 +02:00
relrelb
1db29217eb
chore: Appease clippy
2022-03-16 18:51:39 +02:00
relrelb
5da7149aaf
desktop: Access `App` fields directly
...
I think older Rust versions couldn't handle this, but I may be wrong.
Anyway, now it works and is more straight-forward.
2022-03-16 18:49:59 +02:00
relrelb
e45810f585
webgl: Avoid clamp assertion
...
If `gl.drawingBufferWidth` returns `0`, then a `clamp` in
`WebGlRenderBackend::set_viewport_dimensions` hits an assertion that
`1 <= self.gl.drawing_buffer_width()` is `false`. I was able to
reproduce this on Chrome by creating many dummy WebGL contexts until
Ruffle's one is lost, and then resize the Ruffle player, but this may
happen in other cases as well.
Fix this by allowing `renderbuffer_width` and `renderbuffer_height`
to be `0`. From basic testing, this seems harmless.
2022-03-16 13:53:34 +02:00
Aaron Hill
e87ad52deb
avm2: Add initial implementation of `Matrix`
...
This implements the `a, b, c, d, tx, ty` properties,
as well as the constructor, `identity`, and `scale` methods.
2022-03-16 13:52:58 +02:00
relrelb
e9167cf43c
swf: Add minimal offset table enforcement in `DefineFont2/3`
...
Previously, the offset table and code table offset were completely
ignored. But as it seems, Flash does look into these offsets in
order to avoid exceedingly reading glyph shapes. For now, avoid
exceedingly reading empty and 1-byte glyph shapes, and add debug
assertions that verify the correctness of the offset table and code
table offset, to help diagnosing related bugs in the future.
2022-03-14 22:50:24 +02:00
dependabot[bot]
50ab1e6130
build(deps): bump pretty_assertions from 1.1.0 to 1.2.0
...
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions ) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases )
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md )
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/commits )
---
updated-dependencies:
- dependency-name: pretty_assertions
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 22:35:54 +02:00
dependabot[bot]
8d7000cd67
build(deps): bump syn from 1.0.86 to 1.0.87
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.86 to 1.0.87.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.86...1.0.87 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 22:26:58 +02:00
dependabot[bot]
969b450589
build(deps): bump isahc from 1.6.0 to 1.7.0
...
Bumps [isahc](https://github.com/sagebind/isahc ) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/sagebind/isahc/releases )
- [Commits](https://github.com/sagebind/isahc/compare/1.6.0...1.7.0 )
---
updated-dependencies:
- dependency-name: isahc
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 22:26:32 +02:00
relrelb
3e51b7d95b
webgl: Remove parameters of `build_msaa_buffers`
...
Use `self.renderbuffer_{width,height}` instead.
2022-03-14 22:17:43 +02:00
relrelb
02812c7878
webgl: Inline `build_matrices` into `set_viewport_dimensions`
...
And remove the `view_{width,height}` fields, because they're now
used as locals.
2022-03-14 22:17:43 +02:00
relrelb
d2bf6302fc
webgl: De-duplicate code in `register_bitmap`
2022-03-14 22:17:43 +02:00
relrelb
32f5cd22a4
desktop: Split `movie` and `movie_url`
...
This makes the code a little more readble.
2022-03-14 21:59:16 +02:00
relrelb
83287e4d48
desktop: Store only `bool` instead of `SwfMovie`
...
Because it was only used as such.
2022-03-14 21:59:16 +02:00
relrelb
a3f858c510
desktop: Turn `load_from_file_dialog` into `pick_file`
...
This deduplicates some code (the calls to `parse_url` and `load_movie`),
plus makes the path choosing flow more linear.
2022-03-14 21:59:16 +02:00
relrelb
d22186c088
desktop: Extract `parse_url` from `load_movie_from_path`
...
And change `load_movie_from_path` to `load_movie`.
2022-03-14 21:59:16 +02:00
relrelb
8ad8122b68
desktop: Change return type of `App::run` to `!`
...
The never type is already stable for function return types.
2022-03-14 21:59:16 +02:00
relrelb
7a591b885c
desktop: Remove `loop` from `App::run`
...
`winit::event_loop::EventLoop::run` never returns, so there's no
point calling it over and over again.
2022-03-14 21:59:16 +02:00
relrelb
f8f2764ac7
chore: Stop using traits available in prelude
...
This commit does the same as 36353df7f7
,
cleaning up any leftovers and new code added since.
2022-03-14 01:16:00 +02:00
relrelb
9c9335dbb8
core: Small cleanup in `Font::measure`
2022-03-13 19:11:06 +02:00
relrelb
95a0ef993b
tests: Merge `roots_and_levels` into `stage_object_children`
...
And add some more cases along the way.
2022-03-12 16:48:55 +02:00
relrelb
3d08f31fa7
avm1: Correct `StageObject::get_level_by_path`
...
Resolving `_levelN` had some inconsistencies with Flash:
1. `_flash` can be a prefix too.
2. The level ID parsing cannot fail; non-digit characters are ignored,
the value wraps around at `i32::MAX`, and negative values are valid.
This logic is relevant also for the `GetUrl` and `GetUrl2` opcodes.
For now only add TODOs for this.
2022-03-12 16:48:55 +02:00
relrelb
b59638935f
xml: Remove constant `process_entity` parameter
2022-03-12 16:11:39 +02:00
Aaron Hill
3bcb409bd8
Add more AVM2 'flash.' class stubs
...
This PR adds the following class stubs:
* 'flash.display.Loader'
* 'flash.net.URLRequest'
* 'flash.ui.Keyboard'
* 'flash.utils.Timer'
These are needed for 'This is the Only Level TOO' (though we'll need
actual implementations to get this game past the loading screen).
2022-03-12 15:09:41 +01:00
relrelb
efc60094a5
tests: Expand `transform`
2022-03-12 15:59:05 +02:00
relrelb
b0a73d5638
avm1: Remove `TransformObject::construct`
...
`constructor` in `core/src/avm1/globals/transform.rs` should do
the same, as in other built-in classes.
2022-03-12 15:59:05 +02:00
relrelb
5a1e417526
avm1: Simplify `TDisplayObject::avm1_root()`
...
Make it infailable.
2022-03-10 01:22:52 +02:00
elliot
355bd35935
web: Add specific error message for disabled WASM on Microsoft Edge ( #6423 )
...
* web: Add specific error message for disabled WASM on Microsoft Edge
Related to #6395
* web: Update Microsoft Edge WASM error message conditional
Co-Authored-By: Daniel Jacobs <danielhunterjacobs@gmail.com>
* web: Update "More Information" link for Microsoft Edge WASM error
Co-authored-by: Daniel Jacobs <danielhunterjacobs@gmail.com>
2022-03-09 23:12:21 +02:00
dependabot[bot]
697ad92db5
build(deps): bump bytemuck from 1.7.3 to 1.8.0
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.7.3 to 1.8.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.7.3...v1.8.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-03-07 23:59:40 +02:00
dependabot[bot]
e3336566e6
build(deps): bump embed-resource from 1.6.5 to 1.7.1
...
Bumps [embed-resource](https://github.com/nabijaczleweli/rust-embed-resource ) from 1.6.5 to 1.7.1.
- [Release notes](https://github.com/nabijaczleweli/rust-embed-resource/releases )
- [Commits](https://github.com/nabijaczleweli/rust-embed-resource/compare/v1.6.5...v1.7.1 )
---
updated-dependencies:
- dependency-name: embed-resource
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 23:59:28 +02:00
dependabot[bot]
448b11cc92
build(deps): bump rfd from 0.8.0 to 0.8.1
...
Bumps [rfd](https://github.com/PolyMeilex/rfd ) from 0.8.0 to 0.8.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.0...0.8.1 )
---
updated-dependencies:
- dependency-name: rfd
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 23:59:13 +02:00
dependabot[bot]
71758be08b
build(deps): bump png from 0.17.4 to 0.17.5
...
Bumps [png](https://github.com/image-rs/image-png ) from 0.17.4 to 0.17.5.
- [Release notes](https://github.com/image-rs/image-png/releases )
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image-png/compare/v0.17.4...v0.17.5 )
---
updated-dependencies:
- dependency-name: png
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 23:59:02 +02:00
dependabot[bot]
56ef543f16
build(deps): bump clap from 3.1.3 to 3.1.6
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.3 to 3.1.6.
- [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.3...v3.1.6 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 23:58:51 +02:00
Aaron Hill
f4bb6fc43c
Change property definition from `loaderUrl` to `loaderURL`
...
The actual property name is `loaderURL` - it looks like
a typo was made when this was originally defined in Ruffle.
2022-03-07 09:24:01 +02:00
relrelb
d8df22fab0
tests: Add `is_finite`
...
Based on `as3_is_finite`.
2022-03-06 23:15:18 +01:00
relrelb
88f6856723
avm1: Fix `isFinite()` for SWF<7
...
Previously, `isFinite()` with no arguments on SWF<7 incorrectly
returned `true`, as `undefined` coerced to `f64` is `0.0`, which
is finite. Fix this by not defaulting to `undefined`, similarly to
the `isNaN()` implementation.
2022-03-06 23:15:18 +01:00
Aaron Hill
8d58c6974c
Display `Muliname` when trying to lookup a non-public property
...
This will make these errors easier to debug.
2022-03-06 22:56:23 +01:00