Commit Graph

6776 Commits

Author SHA1 Message Date
dependabot[bot] 46328d5582 build(deps): bump num-traits from 0.2.14 to 0.2.15
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.14 to 0.2.15.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.14...num-traits-0.2.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 13:33:04 -07:00
dependabot[bot] a2043d94e1 build(deps): bump log from 0.4.16 to 0.4.17
Bumps [log](https://github.com/rust-lang/log) from 0.4.16 to 0.4.17.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits/0.4.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 13:32:40 -07:00
Daniel Jacobs 254a4a9175 demo: Fix styling on mobile devices 2022-05-09 10:07:16 -07:00
relrelb bce4075c69 core: Remove `url_from_relative_path`
The remaining caller was `SwfMovie::from_path`, which is now changed
to be simpler, and a little stricter (panics if `Url::from_file_path`
fails, though it shouldn't happen with canonicalized paths).
2022-05-09 10:06:52 -07:00
nosamu f39537f984 docs: Correct issue number in code comment 2022-05-08 14:27:15 +03:00
relrelb b46134dc43 avm1: Tiny cleanup in `Activation::set_target`
Use `Option::filter`.
2022-05-07 22:46:35 -07:00
Mike Welsh f20f53f555 avm1: Grab SWF version from executing clip
Remove the `swf_version` parameter from `Activation` constructors,
because this was incorrectly using the global or root SWF version
most times.

Instead, grab the SWF version for the activation directly from the
base clip.
2022-05-07 10:25:10 -07:00
Mike Welsh 1e9c464d94 avm1: Add version to MovieClip properties 2022-05-07 10:25:10 -07:00
Mike Welsh cc8a88a570 tests: Add tests for ASSetPropFlags version gating 2022-05-07 10:25:10 -07:00
Mike Welsh 4fa4c6ca84 avm1: Implement property version checking
Check SWF version of AVM1 properties and return undefined if they
are gated to a later version.
2022-05-07 10:25:10 -07:00
Mike Welsh e6cadf7de4 avm1: Use u16 for Property::attributes 2022-05-07 10:25:10 -07:00
relrelb bcd35d6ad7 tests: Expand and cleanup `xml_namespaces`
Merge the `xml_node_namespaceuri` and `xml_node_weirdnamespace` tests
into `xml_namespaces`, cleanup, and expand it along the way.
2022-05-07 10:24:45 -07:00
relrelb 401f423ffa xml: Remove `XmlAttributesObject`
Use a bare `ScriptObject` instead. This matches Flash's behavior in
many aspects:
* Attribute values can now store arbitrary AVM1 values, rather than
just strings. These are coerced to string lazily on demand (e.g.
when coercing the whole XML node to a string).
* Attributes iteration order is the same as their definition order,
not sorted by their name.

Also fix some bugs in `XmlNode::lookup_namespace_uri` (renamed from
`lookup_uri_for_namespace`):
* Iterate attributes by their definition order, so the first matching
one is returned.
* The empty prefix matches every attribute that starts with "xmlns"
(with/without a colon).

And inline `XmlNode::lookup_namespace_for_uri` into `get_prefix_for_namespace`,
and fix some bugs in there as well:
* Iterate attributes by their definition order, so the first matching
one is returned.
* Match any attribute that start with "xmlns" (with/without a colon).
2022-05-07 10:24:45 -07:00
Mike Welsh 5730c8db94 core: Clamp color values in DefineBitsJPEG3 (fix #6893)
The colors in a DefineBitsJPEG3 tag should be premultiplied alpha,
but in some SWFs they are incorrectly not premultiplied. Flash
Player clamps the color values to the alpha in this case to allow
these images to work more as expected.

Fixes #6893.
2022-05-07 09:46:44 -07:00
relrelb 87ce0f56b7 core: Remove `NavigatorBackend::resolve_relative_url`
The resolved URL only used by `NavigatorBackend::fetch`. So simply
inline `NavigatorBackend::resolve_relative_url` into `NavigatorBackend::fetch`,
per implementation.
2022-05-07 09:06:53 -07:00
relrelb ea665d91f2 core: Introduce and use `Response::url` 2022-05-07 09:06:53 -07:00
relrelb 2517d8de4b core: Introduce struct `Response`
Currently it's a trivial wrapper around `Vec<u8>`, but more fields
will be added in the future (e.g. response URL, HTTP status code).
2022-05-07 09:06:53 -07:00
Mike Welsh 85e98cc1cc ci: Don't test web build on Windows
For unknown reasons, tests on the Windows web build continue to be
flaky on GitHub CI. Disable them for now. Tests continue to be run
on Ubuntu.
2022-05-06 14:20:47 -07:00
Mike Welsh 82ed6fcba7 core: Cleanup PlaceObject comments 2022-05-06 11:33:52 -07:00
Mike Welsh 0833bd0d18 core: Clip events can only be set on initial placement 2022-05-06 11:33:52 -07:00
Mike Welsh 8bf0114fdf core: DisplayObject clip depth can only be set on initial placement 2022-05-06 11:33:52 -07:00
Mike Welsh 32252b2ed4 core: DisplayObject name can only be set on initial placement 2022-05-06 11:33:52 -07:00
Mike Welsh aa66c31d6c core: Add comment about rewind behavior of is_visible 2022-05-06 11:33:52 -07:00
Mike Welsh b46c07830e core: Stub DisplayObject::background_color 2022-05-06 11:33:52 -07:00
Mike Welsh f8698d1cc9 core: Stub DisplayObject::blend_mode 2022-05-06 11:33:52 -07:00
Mike Welsh 402e072707 swf: Implement Default for BlendMode 2022-05-06 11:33:52 -07:00
Mike Welsh 2cebd47ad2 core: Stub DisplayObject:is_bitmap_cached 2022-05-06 11:33:52 -07:00
Daniel Jacobs 57659a1f44 demo: Add an area to say the file name 2022-05-06 10:43:20 -07:00
Daniel Jacobs f94a76a248 demo: Style the local file selector and sample file select 2022-05-06 10:43:20 -07:00
relrelb 4ae5e89ea7 web: Enforce ESLint's `eqeqeq` rule 2022-05-06 10:40:58 -07:00
relrelb f6153ff7c1 chore: Appease clippy 2022-05-06 10:36:38 -07:00
relrelb d1d6b56615 avm1: Remove a stale TODO
Forgotten in #6785.
2022-05-03 10:22:43 -07:00
relrelb bb0b56cff6 tests: Uncomment `array_sort` tests
They pass now.
2022-05-03 09:47:38 -07:00
relrelb beee6cb067 avm1: Correct and cleanup `Array.sort` and `Array.sortOn`
* Mimic Flash's quicksort algorithm, rather than using Rust's
`sort_unstable_by`.
* Rename `flags` to `options`, as they are named in AS2 reference.
* Organize different sorting options using 3 simple functions:
`sort_compare`, `sort_compare_custom` and `sort_on_compare`.
2022-05-03 09:47:38 -07:00
dependabot[bot] 6375927d72 build(deps): bump serde_json from 1.0.79 to 1.0.80
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.79 to 1.0.80.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.79...v1.0.80)

---
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-05-02 14:48:57 -07:00
dependabot[bot] fcc199b0e5 build(deps): bump jpeg-decoder from 0.2.4 to 0.2.5
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases)
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/image-rs/jpeg-decoder/compare/v0.2.4...v0.2.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 14:48:42 -07:00
dependabot[bot] e68f88d37e build(deps): bump syn from 1.0.91 to 1.0.92
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.91 to 1.0.92.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.91...1.0.92)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 14:48:25 -07:00
dependabot[bot] c7ca4e099f build(deps): bump thiserror from 1.0.30 to 1.0.31
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.30 to 1.0.31.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.30...1.0.31)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 14:48:12 -07:00
dependabot[bot] c1bcc98668 build(deps): bump image from 0.24.1 to 0.24.2
Bumps [image](https://github.com/image-rs/image) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/commits/v0.24.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 14:48:00 -07:00
dependabot[bot] 7ab8c340fa build(deps): bump clap from 3.1.12 to 3.1.15
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.12 to 3.1.15.
- [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.12...v3.1.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 14:47:37 -07:00
dependabot[bot] 7c230f0bc9 build(deps): bump isahc from 1.7.0 to 1.7.1
Bumps [isahc](https://github.com/sagebind/isahc) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/sagebind/isahc/releases)
- [Commits](https://github.com/sagebind/isahc/compare/1.7.0...1.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 13:41:45 -07:00
dependabot[bot] 86e3f6c82a build(deps): bump serde from 1.0.136 to 1.0.137
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.136 to 1.0.137.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.136...v1.0.137)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 13:41:28 -07:00
dependabot[bot] 4f1dec79e3 build(deps): bump webbrowser from 0.7.0 to 0.7.1
Bumps [webbrowser](https://github.com/amodm/webbrowser-rs) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/amodm/webbrowser-rs/releases)
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.7.0...v0.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 13:41:15 -07:00
dependabot[bot] 6c5a35d1bc build(deps-dev): bump mocha from 9.2.1 to 10.0.0 in /web
Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.1 to 10.0.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.2.1...v10.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 16:16:53 -07:00
dependabot[bot] 03618554fd build(deps): bump async from 2.6.3 to 2.6.4 in /web
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 15:30:55 -07:00
dependabot[bot] eec37d4510 build(deps-dev): bump @wdio/spec-reporter from 7.19.1 to 7.19.5 in /web
Bumps [@wdio/spec-reporter](https://github.com/webdriverio/webdriverio) from 7.19.1 to 7.19.5.
- [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.1...v7.19.5)

---
updated-dependencies:
- dependency-name: "@wdio/spec-reporter"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 15:08:48 -07:00
dependabot[bot] 407715b2cb build(deps-dev): bump prettier from 2.5.1 to 2.6.2 in /web
Bumps [prettier](https://github.com/prettier/prettier) from 2.5.1 to 2.6.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.5.1...2.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 14:42:07 -07:00
dependabot[bot] e4088a28d7 build(deps-dev): bump ts-loader from 9.2.6 to 9.3.0 in /web
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.2.6 to 9.3.0.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.2.6...v9.3.0)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 14:41:56 -07:00
dependabot[bot] 75a9313864 build(deps): bump ejs from 3.1.6 to 3.1.7 in /web
Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.7.
- [Release notes](https://github.com/mde/ejs/releases)
- [Changelog](https://github.com/mde/ejs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mde/ejs/compare/v3.1.6...v3.1.7)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 14:26:49 -07:00
dependabot[bot] 0d85a7e40f build(deps-dev): bump @wdio/local-runner from 7.19.3 to 7.19.5 in /web
Bumps [@wdio/local-runner](https://github.com/webdriverio/webdriverio) from 7.19.3 to 7.19.5.
- [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.3...v7.19.5)

---
updated-dependencies:
- dependency-name: "@wdio/local-runner"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 14:26:40 -07:00