relrelb
b405870005
canvas: Clamp alpha values
...
Values outside the range of 0 and 1 are ignored in canvas, unlike
Flash that clamps them.
2021-12-21 08:34:47 +02:00
relrelb
ccef61d076
tests: Unignore `edittext_html_roundtrip` and `as3_edittext_html_roundtrip`
2021-12-20 08:31:59 +02:00
relrelb
b1151b2ab2
html: Rewrite `FormatSpans::to_html`
...
The new implementation doesn't use the `xml` crate, nor `quick-xml`,
but rather just iterates the `TextSpan`s and builds the formatted HTML
string.
2021-12-20 08:31:59 +02:00
relrelb
2ad5c644b0
avm1: Make `ArrayObject` proto non-`Option`
...
It was always passed as `Some`, so there's no reason for allowing
`None`.
2021-12-18 13:39:22 +02:00
relrelb
9d87a34f25
html: Ignore tag errors
...
Flash stops parsing the XML in such cases, but still returns the
partially-processed text.
2021-12-18 11:34:31 +02:00
relrelb
c1404f6a3e
html: Expand empty elements
...
`quick-xml` has a feature to split empty elements into an `Open` and
a `Close` event. Use it to avoid duplicated code.
2021-12-18 11:34:31 +02:00
relrelb
7e20543578
html: Don't check end names
...
Flash permits mismatched closing tags (e.g. `<mytag></different_tag>`),
so turn-off this check.
2021-12-18 11:34:31 +02:00
Adrian Wielgosik
5d81a0ce64
avm2: Remove .clone() calls now that Index is Copy
2021-12-17 21:09:40 -07:00
Adrian Wielgosik
a8fb1c2b16
avm2: pass Multiname to resolve_type() by reference
2021-12-17 21:09:40 -07:00
Adrian Wielgosik
22a0711d85
avm2: Use TU's method cache for callstatic, newfunction opcodes
2021-12-17 21:09:40 -07:00
Adrian Wielgosik
4b23f4dfb7
avm2: Set correct value type in op_convert_u/i
2021-12-17 21:06:33 -07:00
TÖRÖK Attila
0a2767fcb4
video: Wire up DefineVideoStream smoothing flag to the renderer
...
With all the weird logic for when it actually takes effect
2021-12-17 21:03:57 -07:00
David Wendt
2aee3555ab
chore: Fix all new clippy lints added in latest Rust nightly
2021-12-17 20:53:26 -07:00
relrelb
a25a25adbc
web: Check `$CI` environment variable
2021-12-17 16:48:00 +02:00
relrelb
07c5330456
core: Introduce `InputManager`
...
`InputManager` encapsulates the common logic that previously the
`UiBackend`s used to implement.
2021-12-15 14:20:30 -08:00
Daniel Jacobs
5127e131bd
extension: Fix base for direct swf links
2021-12-15 14:00:02 -08:00
dependabot[bot]
678d4375bf
build(deps): bump clap from 3.0.0-beta.5 to 3.0.0-rc.4
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.0.0-beta.5 to 3.0.0-rc.4.
- [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.0.0-beta.5...clap_generate-v3.0.0-rc.4 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-12-15 13:42:50 -08:00
Adrian Wielgosik
726ec47f19
avm2: Support inheritance of protected traits
2021-12-15 22:26:41 +01:00
Adrian Wielgosik
11534a4b34
avm2: Implement parseInt, parseFloat
2021-12-15 22:16:49 +01:00
Adrian Wielgosik
49feb23649
avm2: Move toplevel functions to separate file
2021-12-15 22:16:49 +01:00
TÖRÖK Attila
95665bdc47
video: Extract software decoders (or glue) into their own modules, add screenvideo feature
2021-12-14 19:41:17 -07:00
TÖRÖK Attila
fdc448533d
video: Add Flash Screen Video (V1 only) decoder
...
Thanks a lot for the code and the help, Kostya!
2021-12-14 19:41:17 -07:00
Toad06
db98f0b42f
avm1: Use inner SWFs version number
2021-12-14 19:39:30 -07:00
Mike Welsh
eb6f744626
docs: Fix Movavi logo URL
2021-12-14 18:21:35 -08:00
Mike Welsh
45ee6501d1
docs: Add Movavi to sponsors
2021-12-14 18:17:47 -08:00
dependabot[bot]
c6dfcb4e37
build(deps): bump serde from 1.0.130 to 1.0.131
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.130 to 1.0.131.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.130...v1.0.131 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 23:23:13 +02:00
dependabot[bot]
b8ff8bb185
build(deps): bump jpeg-decoder from 0.2.0 to 0.2.1
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.2.0 to 0.2.1.
- [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.0...v0.2.1 )
---
updated-dependencies:
- dependency-name: jpeg-decoder
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 23:23:01 +02:00
dependabot[bot]
eb8dd4cfd4
build(deps): bump sha2 from 0.9.8 to 0.10.0
...
Bumps [sha2](https://github.com/RustCrypto/hashes ) from 0.9.8 to 0.10.0.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.9.8...sha2-v0.10.0 )
---
updated-dependencies:
- dependency-name: sha2
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 23:22:42 +02:00
dependabot[bot]
ef679d25c7
build(deps): bump encoding_rs from 0.8.29 to 0.8.30
...
Bumps [encoding_rs](https://github.com/hsivonen/encoding_rs ) from 0.8.29 to 0.8.30.
- [Release notes](https://github.com/hsivonen/encoding_rs/releases )
- [Commits](https://github.com/hsivonen/encoding_rs/compare/v0.8.29...v0.8.30 )
---
updated-dependencies:
- dependency-name: encoding_rs
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 23:22:28 +02:00
EmperorBale
30f2e0f8b1
avm2: Implement JSON ( #5172 )
...
* avm2: Implement JSON.parse
* avm2: Add AvmSerializer for serializing AVM values to JSON
* avm2: Add support for replacer objects
* avm2: use *const ObjectPtr for object stack
* avm2: Add support for space parameter is JSON.stringify
* avm2: Refactor AvmSerializer design
* avm2: Restrict spaces to a maximum of 10
* avm2: Refactor map_value
* tests: Add JSON.parse test
* chore: Appease clippy
* avm2: Check if value is undefined before inserting
* tests: Add test for JSON.stringify
* tests: Improve JSON.stringify test
* chore: Replace map_or with explicit match statements
* chore: Use QName::dynamic_name
* avm2: Use Object<'gc> instead of ObjectPtr
* chore: Use explicit match in deserialize_value
* Rebase fixes
Co-authored-by: Adrian Wielgosik <adrian.wielgosik@gmail.com>
2021-12-13 18:32:04 +01:00
Adrian Wielgosik
ad1442dbaa
avm2: Add a basic ContextMenu stub
2021-12-13 18:31:03 +01:00
TÖRÖK Attila
cc4853236e
web/extension: Allow 'data:' URLs as image src - needed by the canvas backend
2021-12-12 20:43:21 +01:00
TÖRÖK Attila
4057332e6b
web/canvas: Carry bitmap smoothing flag along with the pattern
2021-12-12 20:43:21 +01:00
TÖRÖK Attila
bf470f8a78
web/canvas: Add some TODO and NOTE comments
2021-12-12 20:43:21 +01:00
TÖRÖK Attila
7389b2b9ce
web/canvas: Convert CanvasPattern transformation matrix from Twips to regular numbers
...
The reason this did not cause problems so far was that it was far more
common to fall back to the SVG backend right before this piece of code.
2021-12-12 20:43:21 +01:00
TÖRÖK Attila
57838f882d
web/canvas: Respect the smoothing flag when rendering bitmaps
2021-12-12 20:43:21 +01:00
TÖRÖK Attila
d5df37afb3
web/canvas: Use a canvas element to store bitmaps from raw RGBA sources
...
To avoid PNG-encoding every frame of every video for example.
If it needs to be converted to a base64 "data:" URL anyway,
compute it lazily and cache it behind a RefCell.
Raw pixel manipulation can be done through temporary ImageData objects.
The potential to use an image element is retained, so the native JPEG
decoder of the browser can still be utilized.
2021-12-12 20:43:21 +01:00
Adrian Wielgosik
1f5979f168
chore: clippy
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
1311b0a3d0
avm2: refactor Domain::get_defining_script
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
0fb075a309
chore: cargo fmt
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
3d8f611651
avm2: Update comments.
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
b747541709
avm2: Panic upon encountering CallMethod opcode
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
1d8c556944
avm2: Handle TODOs, throw errors where applicable
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
24247dff0b
avm2: install_const_late always appends slots
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
b4d444175d
Update failing tests, drag one always-failing case to separate test
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
4bd12ae4b3
avm2: Get prototypes from classes without get_property()
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
49d16dea8b
avm2: Rip out `receiver` from get/set/call_property
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
ee0798b258
avm2: Cleanup slots/global initialization some more
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
21865edf9b
avm2: Support const slots, fill some TODOs
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
b272d8722e
avm2: Reword slot/disp_id assignment, remove Slot.
2021-12-11 20:48:09 +01:00