Moulins
68fc567f7f
core: add `AvmAtom` to represent interned strings
...
Makes `AvmString`s grow from 2 to 3 usizes, but this
will be reverted later.
2023-04-27 00:17:31 +02:00
Moulins
011cdd96ba
core: don't keep strong references to interned strings in the interner.
...
This is done by implementing a simple WeakSet which clears its stale
entries during tracing.
2023-04-27 00:17:31 +02:00
Moulins
889a9bd009
avm2: Intern strings in constant pools
...
Strings belonging to multinames are interned too, but
the multinames themselves aren't.
2023-04-27 00:17:31 +02:00
Moulins
09c729074c
avm1: Intern strings in constant pools
2023-04-27 00:17:31 +02:00
Moulins
27521e145c
avm1: Thread GcContext through all globals initialization
2023-04-27 00:17:31 +02:00
Moulins
c40fd2b17a
core: Add (very) simple AvmString interner
...
Pass it to AVM1/2 initilization functions *via* the new `GcContext` type.
2023-04-27 00:17:31 +02:00
Moulins
cfde53cde2
core: replace `string::decode_swf_str` by a `SwfStrExt` extention trait
2023-04-26 23:49:18 +02:00
Moulins
34f2c45441
core: add `string::decode_swf_str` for SwfStr -> WString conversions
2023-04-26 23:49:18 +02:00
Nathan Adams
b12db0ac3a
avm2: Support data, method and content-type in URLLoader by reusing code from Loader
2023-04-26 13:44:46 -05:00
relrelb
1c0c25b521
avm1: Make `AsBroadcaster` a function
...
Previously, `AsBroadcaster` was defined as a plain object. However,
it seems like in Flash it is defined as an empty function instead.
This means expressions like `new AsBroadcaster()` should return a
newly-created object. This is in opposition to the documentation
that says there is no constructor function for the `AsBroadcaster`
class.
Fixes #10673 .
2023-04-26 21:21:57 +03:00
Lord-McSweeney
4a50f9f31e
avm2: Add make_error_2008() function and use it
2023-04-26 18:49:35 +03:00
Nathan Adams
cc731a78ee
avm2: Respect data, method and contentType in Loader.load()
2023-04-26 12:46:23 +02:00
Lord-McSweeney
f412f62127
avm2/tests: use try_get_object in JSON/Add test for undefined receiver
2023-04-26 00:17:44 +02:00
Lord-McSweeney
319886587d
avm2: Use ParametersExt in JSON
2023-04-26 00:17:44 +02:00
Lord-McSweeney
58212ec280
avm2: Throw AVM errors for JSON operations (and add tests)
2023-04-26 00:17:44 +02:00
Aaron Hill
6eba8d07ee
avm2: Implement MorphShape class and use it for MorphShape displayobject
2023-04-25 18:43:43 +02:00
Toad06
45795c9d24
desktop/web: Add a mouse enter event
2023-04-25 18:01:49 +02:00
Toad06
1ca1435dc7
core: Detect when the mouse moves out of the stage
2023-04-25 18:01:49 +02:00
Toad06
ad4dc943fa
avm1: Fix some issues with buttons
2023-04-25 17:50:25 +02:00
Aaron Hill
4432c45eb3
avm2: Mark 'callee' property as non-enumerable on 'arguments' array
...
Some SWFs iterate over the 'arguments' array, and the 'callee' property
should not get enumerated.
2023-04-25 17:29:20 +02:00
relrelb
ff7c458739
core: Accept borrowed strings in `NavigatorBackend::navigate_to_url`
...
This avoids some unnecessary clones.
2023-04-24 22:06:47 +03:00
nosamu
3cde3482f4
core: Add frame rate config option
2023-04-24 14:01:37 +02:00
relrelb
808a0fd26e
core: Clamp various `BitmapData` thresholds to `u8`
2023-04-24 08:35:59 +03:00
Tom Schuster
886244478e
avm2: Complete the implementation of XML abstract equality
2023-04-23 22:07:54 -05:00
renovate[bot]
3b3c08a354
chore(deps): lock file maintenance rust dependencies
2023-04-24 01:22:07 +02:00
Aaron Hill
15af946cf1
avm2: Stop after first frame when movieclip doesn't extend MovieClip
...
It's possible to have a DefineSprite tag with multiple frames,
but with a corresponding SymbolClass that directly extends
`Sprite` (and therefore does *not* extend `MovieClip`). When this
happens, Flash Player stops after the first frame.
2023-04-23 16:48:38 -05:00
Aaron Hill
33e9713279
avm2: Fix get_super and set_super with normal methods
...
Doing `super.someNonGetter` gives you back a function object.
We were previously attempting to call normal methods as though
they were getters. Additionally, we were failing to properly
get the property from the superclass vtable.
2023-04-23 16:28:59 -05:00
Lord-McSweeney
292e068e48
avm2: Take a MutationContext instead of an...
...
...Activation in ClassObject.install_class_vtable_and_slots
2023-04-22 20:21:16 +03:00
Lord-McSweeney
3c2ce683fb
avm2: Take a MutationContext instead of an Activation in PropertyClass::name
2023-04-22 17:38:19 +02:00
relrelb
1e2139a3e4
core: Use `BitFlags::iter`
...
Instead of manually shifting bits.
2023-04-22 12:42:51 +02:00
Lord-McSweeney
8fd6224d90
avm2: Add flash.display.GraphicsShaderFill class
2023-04-22 08:16:08 +02:00
Lord-McSweeney
932aa8cd90
avm2: Make TObject.install_instance_slots take a MutationContext instead of an Activation
2023-04-22 08:04:52 +02:00
Lord-McSweeney
34156cc6d1
avm2: Throw AVM error for invalid frame labels
2023-04-22 08:52:19 +03:00
Lord-McSweeney
bc0bbeca92
avm2: Throw AVM error for validate_remove_operation...
...
...in DisplayObjectContainer.
2023-04-21 17:15:43 +02:00
Moulins
60f34f8056
avm1: put an assert to ensure that `avm::Value`'s size doesn't grow again
2023-04-21 16:59:55 +02:00
Moulins
bb08d356b1
avm1: shrink `Value` by boxing `MovieClipReference`s
...
This doesn't actually cost an extra allocation as we can replace an inner
`Gc<Vec<_>>` by a `Box<[_]>` directly.
2023-04-21 16:59:55 +02:00
Aaron Hill
22040552b8
avm2: Take UpdateContext instead of Activation in Object::is_of_type
2023-04-21 16:41:06 +02:00
Toad06
36e71882e7
core: Fix avm2 code interfering with avm1
2023-04-21 15:38:21 +02:00
Lord-McSweeney
5702b272db
avm2: Add flash.text.engine stubs
2023-04-21 15:16:02 +02:00
Moulins
be67761a22
chore: appease (beta) clippy
2023-04-21 14:44:15 +02:00
Adrian Wielgosik
4e9cdc338f
avm2: Support `newcatch` with finally-scopes
2023-04-18 22:15:57 +02:00
Lord-McSweeney
2bab9022b4
avm2: Show detailed error message...
...
...while loading ABC files.
2023-04-18 21:28:38 +02:00
Aaron Hill
78b386d775
avm2: Stub URLLoader.close
2023-04-17 15:58:46 -07:00
Lord-McSweeney
f25398898a
avm2: stageWidth/Height should be of int type ( #10712 )
2023-04-16 21:58:32 +02:00
AllinolCP
d367f38eb4
avm2: stub xml.normalize() ( #10709 )
...
* avm2: stub xml.normalize()
2023-04-16 12:41:52 -04:00
Lord-McSweeney
fef7eeed90
avm2: Stub TextField.useRichTextClipboard
2023-04-13 22:09:11 +02:00
nosamu
a6c659945e
core: Allow focusing selectable EditText fields
2023-04-13 21:48:40 +02:00
Tom Schuster
aca4329dbf
avm2: Implement XMLList.child
2023-04-11 14:49:32 -04:00
Nathan Adams
35f3a21110
core: Fix bitmapdata.floodFill() replacing X with X + test. Fixes #10642
2023-04-11 10:40:57 -04:00
Mike Welsh
7cfd4470b1
avm2: Use proper scale for `Graphics.beginBitmapFill` ( fix #10628 )
2023-04-11 11:36:49 +02:00