Commit Graph

5868 Commits

Author SHA1 Message Date
relrelb 5de81d4729 html: Handle attribute errors gracefully
`quick-xml` returns an `Err` for invalid attributes (e.g. unquoted).
Handle such errors by ignoring the HTML completely and return an
empty string instead, as Flash does.

Fix #5789.
2021-12-05 08:40:04 +02:00
relrelb 0b6cd45415 swf: Fix reserved gradient values handling
* Map 3 to `GradientSpread::Pad`
* Map 2 and 3 to `GradientInterpolation::Rgb`

Fix #1505.
2021-12-04 21:32:47 +02:00
relrelb 7f7ecda8a9 core: Unify `define_bits_jpeg_3` and `define_bits_jpeg_4`
The only difference is the deblocking field, which is now read only
for DefineBitsJpeg4.
2021-12-04 21:32:16 +02:00
relrelb 00accf3e2a render: Rename `register_bitmap_jpeg_3` to `register_bitmap_jpeg_3_or_4`
It's actually used by both DefineBitsJpeg3 and DefineBitsJpeg4 tags.
2021-12-04 21:32:16 +02:00
TÖRÖK Attila 4b587edf7f chore: Bump winit to 0.26.0, run `cargo update` to resolve conflicts 2021-12-04 20:20:22 +02:00
dependabot[bot] 750e266194 build(deps-dev): bump prettier from 2.5.0 to 2.5.1 in /web
Bumps [prettier](https://github.com/prettier/prettier) from 2.5.0 to 2.5.1.
- [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.0...2.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-04 17:43:30 +02:00
dependabot[bot] a72ebd9ba3 build(deps-dev): bump @types/chrome from 0.0.165 to 0.0.166 in /web
Bumps [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome) from 0.0.165 to 0.0.166.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome)

---
updated-dependencies:
- dependency-name: "@types/chrome"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-04 17:12:12 +02:00
dependabot[bot] 963fa78f29 build(deps): bump weak-table from 0.3.0 to 0.3.2
Bumps [weak-table](https://github.com/tov/weak-table-rs) from 0.3.0 to 0.3.2.
- [Release notes](https://github.com/tov/weak-table-rs/releases)
- [Changelog](https://github.com/tov/weak-table-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tov/weak-table-rs/compare/0.3.0...v0.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-04 16:50:42 +02:00
dependabot[bot] d825c9d9cf build(deps-dev): bump eslint from 8.3.0 to 8.4.0 in /web
Bumps [eslint](https://github.com/eslint/eslint) from 8.3.0 to 8.4.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.3.0...v8.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-04 16:50:30 +02:00
relrelb 03aa31ec68 core: Fix a bug in `MorphShapeStatic::register_ratio`
The comparsion `start_change.move_to != end_change.move_to` doesn't
make sense, because even if they are identical, the positions need
to be updated.

Fix #2886.
2021-12-04 13:46:02 +02:00
relrelb fab4103932 chore: Appease clippy 2021-12-04 13:45:37 +02:00
Daniel Jacobs ed7a13ab05 Chore: Alphabetize regression tests 2021-12-04 13:45:22 +02:00
David Wendt 54fcfde1cc core: String equality should short-circuit on pointer equality 2021-12-02 16:33:56 -07:00
David Wendt 29d2df5f07 core: Hash the whole (byte-oriented) WStr without iterating it. 2021-12-02 16:33:56 -07:00
David Wendt dbecd03110 core: When hashing `WString`, optimize for the common case (bytestrings) 2021-12-02 16:33:56 -07:00
David Wendt 9f30a9d4a6 avm2: When passing namespaces around, use a `SmallVec` of one element for memory savings. 2021-12-02 16:30:21 -07:00
David Wendt 1302ea9986 avm2: Pass everything around as `SmallVec`s. 2021-12-02 16:30:21 -07:00
David Wendt 5e03382f5d avm2: Smallvec the property maps. 2021-12-02 16:30:21 -07:00
David Wendt a18faeb047 avm2: Also put definition scripts in a `PropertyMap` and query them the same way we do objects 2021-12-02 16:30:21 -07:00
David Wendt 92697c9f1e avm2: Use FNV hashing for all other parts of the VM. 2021-12-02 16:30:21 -07:00
David Wendt 3329e2a965 avm2: Use FNV hashes for property lookup. 2021-12-02 16:30:21 -07:00
David Wendt 769c45add5 avm2: Make `QName` a copy type. 2021-12-02 16:30:21 -07:00
David Wendt d53abfebf4 avm2: Also preresolve all class traits, too. 2021-12-02 16:30:21 -07:00
David Wendt 44162ae698 avm2: Don't clone the multiname set on each lookup 2021-12-02 16:30:21 -07:00
David Wendt 3a7dd48c81 avm2: Build a flattened traits list per class and use that in lieu of a full trait lookup. 2021-12-02 16:30:21 -07:00
David Wendt 722dd6aabf avm2: Refactor multiname resolution to take advantage of the new value storage structure. 2021-12-02 16:30:21 -07:00
David Wendt c99231b610 avm2: Index the property map by local name and bucket all namespaces together into a single list. 2021-12-02 16:30:21 -07:00
David Wendt 0bc2ddfc7b avm2: Remove prototype lookups from `resolve_any` 2021-12-02 16:30:21 -07:00
David Wendt d83a7c909c avm2: Don't scan the prototype for each multiname check. 2021-12-02 16:30:21 -07:00
Moulins 6bd3c62195 avm1: Remove unnecessary clones in shared_object::recursive_deserialize_json 2021-12-02 07:12:22 +02:00
dependabot[bot] 1ffcfae78a build(deps-dev): bump @types/chrome from 0.0.164 to 0.0.165 in /web
Bumps [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome) from 0.0.164 to 0.0.165.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome)

---
updated-dependencies:
- dependency-name: "@types/chrome"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-02 07:11:56 +02:00
dependabot[bot] 5db476657c build(deps-dev): bump @typescript-eslint/parser in /web
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.5.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-02 07:11:44 +02:00
dependabot[bot] e3dfeb5a44 build(deps-dev): update webpack-dev-server requirement in /web
Updates the requirements on [webpack-dev-server](https://github.com/webpack/webpack-dev-server) to permit the latest version.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 22:38:37 +02:00
dependabot[bot] 7b54e28545 build(deps-dev): update eslint-plugin-jsdoc requirement in /web
Updates the requirements on [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) to permit the latest version.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v37.0.3...v37.1.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 22:34:53 +02:00
dependabot[bot] 83a82628b6 build(deps-dev): bump @typescript-eslint/eslint-plugin in /web
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.5.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 22:34:33 +02:00
dependabot[bot] 7d1ac9d26b build(deps): bump syn from 1.0.81 to 1.0.82
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.81...1.0.82)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 23:04:42 +02:00
dependabot[bot] ea254b53b7 build(deps): bump futures from 0.3.17 to 0.3.18
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.17 to 0.3.18.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.17...0.3.18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 22:35:40 +02:00
David Wendt fa179dc63f avm2: Unpublish a bunch of primclass methods 2021-11-28 18:40:21 -07:00
David Wendt 6d48126124 avm2: And, finally, `uint`. 2021-11-28 18:40:21 -07:00
David Wendt 640763bfda avm2: Also do the same for `int` 2021-11-28 18:40:21 -07:00
David Wendt 593158cb04 avm2: Also allow calling `Number` methods on the prototype in the `public` namespace. 2021-11-28 18:40:21 -07:00
David Wendt 6bfca1af5f avm2: Expose `Boolean` methods in the `public` namespace via prototypes. 2021-11-28 18:40:21 -07:00
David Wendt 3e8f13b70a avm2: `Number.MIN_VALUE` is the machine epsilon, not the lowest possible finite value. 2021-11-28 18:40:21 -07:00
David Wendt 7569994f1f avm2: Impl `Boolean.toString` and `Boolean.valueOf`. 2021-11-28 18:40:21 -07:00
David Wendt aa01a682e1 avm2: Implement `uint`'s various formatting methods, too. 2021-11-28 18:40:21 -07:00
David Wendt e43d18f7b0 avm2: Impl `int` versions of `toFixed`, `toString`, `toExponential`, and `toPrecision` 2021-11-28 18:40:21 -07:00
David Wendt cabfe5e20c avm2: All documented primitive class methods are in the AS3 namespace. 2021-11-28 18:40:21 -07:00
David Wendt 9e62b05157 avm2: Implement `Number.AS3::toString` and `Number.AS3::valueOf`.
This method has an odd flaw that we don't emulate yet. Actually, two:

1. Precision limits that are specific to the chosen radix
2. Occasional and intermittent corruption in the resulting 0 padding; usually manifesting as `x`, `W`, or `°` characters

The first could be emulated, but I've chosen not to... because the second thing listed not only isn't really possible to emulate, but actively prohibits approx-testing the results. So I'm marking the test as ignored and hoping no movies actually rely on the precision limits in `toString`.
2021-11-28 18:40:21 -07:00
David Wendt 4a09dfa3d0 avm2: Implement `Number.toFixed` and `Number.toPrecision` 2021-11-28 18:40:21 -07:00
David Wendt 55a7a1882d avm2: Implement `Number.toExponential` 2021-11-28 18:40:21 -07:00