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
Adrian Wielgosik
4d8999c012
avm2: Make all prototypes ScriptObjects; also cleanup vector enumeration, Proxy
2021-12-11 20:48:09 +01:00
Adrian Wielgosik
3706db86d2
avm2: move properties from instances to vtable
2021-12-11 20:48:09 +01:00
relrelb
d3fe4ea59a
avm1: Split `XML` and `XMLNode` definitions
...
This reduces the file size of the previous `xml.rs` file, and makes
the code a bit more organized.
2021-12-11 20:28:37 +02:00
Adrian Wielgosik
6594d4159d
avm2: Use Vec instead of HashMap for loaded constants
2021-12-11 10:03:29 +01:00
relrelb
e5617de4aa
web: Suppress Webpack's size limit for .wasm files
...
Webpack warns on assets larger than 250KB by default. Our WebAssembly
module exceeds this limit by far (it's a few MBs).
2021-12-10 22:50:45 +02:00
relrelb
ca3b215561
chore: Appease clippy
2021-12-10 21:06:38 +02:00
relrelb
e801ab234e
tests: Expand `as3_trace`
2021-12-10 19:54:35 +02:00
relrelb
6e70379054
tests: Add `trace`
2021-12-10 19:54:35 +02:00
relrelb
7966d850dd
core: Normalize `\r` to `\n` in `avm_trace`
...
Fixes #3120 .
2021-12-10 19:54:35 +02:00
Chris Midgley
f0b29cc5d0
web: allow entering fullscreen after using escape to exit ( #5714 )
...
* web: allow entering fullscreen after using escape to exit
* chore: fmt
* web: fix fullscreen for Safari too
* web: dedupe methods and always set fullscreen
* chore: fmt
* web: use isFullscreen method
2021-12-10 19:54:22 +02:00
relrelb
eacf34d80a
avm1: Remove `Function.prototype.toString`
...
`Function.prototype` doesn't have its own `toString` method, but
rather inherts it from `Object.prototype`. So remove `Function.prototype.toString`
and move its logic to `Object.prototype.toString`.
2021-12-10 11:36:39 +02:00
relrelb
ce2eff8b25
render: Stub L16 JPEG pixel format
...
16-bit luminance (grayscale) images are very rare, so it's hard to
tell what the expected behavior should be.
2021-12-10 00:28:45 +02:00
dependabot[bot]
8007f21ffe
build(deps): bump jpeg-decoder from 0.1.22 to 0.2.0
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.1.22 to 0.2.0.
- [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.1.22...v0.2.0 )
---
updated-dependencies:
- dependency-name: jpeg-decoder
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-12-10 00:28:45 +02:00
Adrian Wielgosik
d28dd3bd05
avm1: Fix up attributes of some builtins' protos
2021-12-10 00:28:21 +02:00
EmperorBale
0a25ebbc32
chore: Remove more explicit clones
2021-12-08 22:14:45 +01:00
EmperorBale
d6b7d0c915
chore: Fix formatting
2021-12-08 22:14:45 +01:00
EmperorBale
a192fbb113
chore: Remove explicit clones in avm2
2021-12-08 22:14:45 +01:00
EmperorBale
847a4fb61a
chore: Remove explicit clones in value
2021-12-08 22:14:45 +01:00
EmperorBale
1709ea94e7
chore: Remove explicit clones in object
2021-12-08 22:14:45 +01:00
EmperorBale
8ea41bc151
chore: Remove explicit clones in slot
2021-12-08 22:14:45 +01:00
EmperorBale
15378bcfde
chore: Remove explicit clones from vector
2021-12-08 22:14:45 +01:00
EmperorBale
2f71360c3b
chore: Remove explicit clones from primitive_object
2021-12-08 22:14:45 +01:00
EmperorBale
a7f86e679c
chore: Remove explicit clones from uint
2021-12-08 22:14:45 +01:00
EmperorBale
0a8b964754
chore: Remove explicit clones from number
2021-12-08 22:14:45 +01:00
EmperorBale
8f27196356
chore: Remove explicit clones in int
2021-12-08 22:14:45 +01:00
EmperorBale
a0bbc96b4a
chore: Remove explicit clones in function
2021-12-08 22:14:45 +01:00
EmperorBale
7027046588
chore: Remove explicit clones in shape
2021-12-08 22:14:45 +01:00
EmperorBale
51f909691f
chore: Remove explicit clones in movieclip
2021-12-08 22:14:45 +01:00