Adrian Wielgosik
c6bad73cb2
avm2: Use ArrayObject::empty() instead of array.construct()
2023-09-06 23:53:22 +02:00
Aaron Hill
ee62044cad
avm2: Implement avmplus.describeTypeJSON and use it for describeType
...
Some SWFS (in particular, anything using Unity) call
avmplus.describeTypeJSON, and rely on the behavior of the various
flags.
This PR changes our internal implementation to implement
describeTypeJSON (producing an `Object` with dynamic fields).
We then convert this to XML in `describeType`, using an implementation
inspired by avmplus.
The existing describeType tests are passing - in a follow-up PR,
I'll add tests for describeTypeJSON
2023-09-06 23:53:22 +02:00
Lord-McSweeney
2ccd45a2af
avm2: Implement Array.insertAt
2023-09-06 23:03:57 +02:00
sleepycatcoding
db60964e2b
avm2: Bail early if character is smaller than range start
2023-09-06 23:01:34 +02:00
sleepycatcoding
936eb777e8
avm2: Implement isXMLName
2023-09-06 23:01:34 +02:00
Aaron Hill
62e9eb9d6f
avm2: Remove unnecessary '&mut self' from Object methods
2023-09-05 17:30:28 -04:00
renovate[bot]
dabc2d56b9
fix(deps): update rust dependencies
2023-09-04 10:25:24 +02:00
Lord-McSweeney
c454faf064
avm2: SharedObject::get_local should use URL of root movie
2023-08-31 19:58:53 -04:00
Lord-McSweeney
da402606e4
avm2: MovieClip::goto_frame should use the movie of the Abc method that called it
2023-08-31 19:58:53 -04:00
Lord-McSweeney
69cdb93d53
avm2: Store caller movie in Activation
2023-08-31 19:58:53 -04:00
Daniel Jacobs
d2c68350c9
avm2: Fix context parameter retrieval for Sound.load
2023-08-30 22:12:33 +02:00
Aaron Hill
24d46e7daa
avm2: Call Sound.load in constructor when passed a URLRequest
2023-08-30 21:02:41 +02:00
Abiel Deneke
0ed447b428
avm1: Set target clip to None if target is an undefined object
...
SetTarget currently sets the target clip to the base clip if the
target passed to tellTarget() is an undefined object. This causes
goto's to run on the base clip in Ruffle, when Adobe Flash Player
does not run the goto's at all.
Fixes #12389 and #12390
2023-08-29 01:23:52 +02:00
sleepycatcoding
4e6e28f78c
avm2: Correct comment
2023-08-29 00:48:48 +02:00
sleepycatcoding
430c20dd66
avm2: Small cleanup
2023-08-29 00:48:48 +02:00
sleepycatcoding
49e3546379
chore: Appease Clippy
2023-08-29 00:48:48 +02:00
sleepycatcoding
b60dd81d62
avm2: Remove parents from removed nodes
2023-08-29 00:48:48 +02:00
sleepycatcoding
80db9caf74
avm2: Implement XML.replace
2023-08-29 00:48:48 +02:00
sleepycatcoding
b3af4320e7
avm2: Add deep_copy method to XmlListObject
...
Also changes existing AS3 copy method to use that instead.
Moved as other code needs to do the same operation.
2023-08-29 00:48:48 +02:00
sleepycatcoding
fbaa02e295
avm2: Implement XML.insertChildAfter and XML.insertChildBefore
2023-08-29 00:48:48 +02:00
sleepycatcoding
aa28e51a94
avm2: Add error 1118
2023-08-29 00:48:48 +02:00
sleepycatcoding
4671122dee
avm2: Add a way to lookup E4XNode ancestors
2023-08-29 00:48:48 +02:00
renovate[bot]
4e75c3890a
fix(deps): update rust dependencies
2023-08-28 07:39:35 +02:00
Aaron Hill
2f6f00179b
avm2: Log an error when a symbol class lookup fails
...
This is almost guaranteed to cause problems, so it shouldn't
be a warning.
2023-08-27 21:15:34 -04:00
Aaron Hill
88acc96467
avm2: Fix XML/XMLDocument ignoreWhite handling for cdata
...
The ignoreWhite settings only affect text nodes, not cdata nodes.
Additionally, there should be no special case for empty text.
2023-08-27 20:28:20 -04:00
sleepycatcoding
33164d3f56
avm2: Preserve attribute flag when filling lazy multiname with QName
...
Fixes #12570
2023-08-27 19:40:00 -04:00
Aaron Hill
879dac347c
avm2: Handle child being removing from `Loader`
...
`Loader` override `removeChild` and `removeChildAt` to try to prevent
user code from removing the loaded content child. However, this can be
bypassed by calling `otherContainer.addChild(loader.content)`, which
actually removes the child from the loader. Stealth Hunter 2 relies
on this behavior.
To make this work, `Loader.content` needs to go through
`contentLoaderInfo`, instead of relying on a child being present.
2023-08-27 19:13:45 -04:00
Nathan Adams
19ad492eaa
avm2: Implement Graphics.cubicCurveTo and CUBIC_CURVE_TO
2023-08-27 20:17:43 +02:00
Nathan Adams
eb2afb19c4
render: Add DrawCommand::CubicCurveTo
2023-08-27 20:17:43 +02:00
Nathan Adams
076977cc75
render: Rename DrawCommand::CurveTo to DrawCommand::QuadraticCurveTo
2023-08-27 20:17:43 +02:00
Lord-McSweeney
04f93737c4
avm2: Make instance initialization functions variadic for int and uint
2023-08-26 13:38:33 +02:00
Lord-McSweeney
32599945bb
avm2: uint/int toPrecision/toFixed/toExponential should call Number's toPrecision/toFixed/toExponential methods. This deduplicates the methods across int and uint.
2023-08-26 13:38:33 +02:00
Lord-McSweeney
72c659fd0e
avm2: Add some static properties to Number
2023-08-26 13:38:33 +02:00
Lord-McSweeney
d366d19de6
avm2: Various (u)int/Number correctness fixes
2023-08-26 13:38:33 +02:00
SuchAFuriousDeath
40daa56f0b
avm2: partially implement Graphics.drawTriangles and drawGraphicsData ( #12559 )
2023-08-26 10:57:07 +00:00
nosamu
d25fda7cc8
avm2: Throw TypeError for null argument in TextField string property setters
2023-08-26 12:35:01 +02:00
Moulins
87437c1d6b
avm2: use `RefLock` instead of `GcCell` in avm2's scope chain
...
Also bumps gc-arena to be able to use `Write<Option<_>>::as_write`
2023-08-26 11:00:40 +02:00
Moulins
ecb5036d9e
avm1/2 use plain `RefCell` for `TextFormat` objects
...
`TextFormat` only contains static data and doesn't need write barriers
2023-08-26 11:00:40 +02:00
Moulins
c27728b7b2
avm1/2: use plain `Cell` in `Date` object
...
`Date` only contains static data, so write barrier management is
unnecessary.
2023-08-26 11:00:40 +02:00
Moulins
e2b73e80a5
avm2: use Lock instead of GcCell in BytecodeMethod
2023-08-26 11:00:40 +02:00
Moulins
9b915b7e4e
core: use GcLock instead of GcCell in FocusTracker
...
Slightly reorganizes `FocusTracker::set` to only trigger a write barrier
if the focus changed.
2023-08-26 11:00:40 +02:00
Moulins
88c7f69c57
avm1: use Lock instead of GcCell in MovieClipReference
2023-08-26 11:00:40 +02:00
sleepycatcoding
75566b92e0
avm2: XML/XMLList is converted to a string when set as attribute value
2023-08-25 11:20:51 +02:00
David Wendt
52d940b8de
core: Rename `init_buffer` to `reset_buffer`
2023-08-23 15:36:20 -06:00
David Wendt
51c8799b32
core: Rename `collect_sound_stream` to `cleanup_sound_stream`
2023-08-23 15:36:20 -06:00
David Wendt
6e3c468592
core: When reading part of a `Substream` slice for the tag reader, don't throw out the rest of it
2023-08-23 15:36:20 -06:00
David Wendt
046a1f0efc
core: When loading new data into a `NetStream` you must always clear the existing data out first.
...
`init_buffer` will remove all existing buffer state and prepare the `NetStream` to accept a new/different video.
2023-08-23 15:36:20 -06:00
David Wendt
3b90e75b17
core: AVM1 streams do not need to be attached to a movie clip in order to play audio
2023-08-23 15:36:20 -06:00
David Wendt
3fd31f1739
core: Fix #12502 .
...
This would ordinarily be a separate branch but the fix deadlocks without the new buffer type.
2023-08-23 15:36:20 -06:00
David Wendt
2d0815c013
tests: Add test cases for `SliceCursor`
2023-08-23 15:36:20 -06:00