Lord-McSweeney
7254cdeef9
avm2: Throw ArgumentError when trying to construct `new Worker()`
2023-10-10 01:20:06 +02:00
TÖRÖK Attila
602154b1b7
core,desktop: Switch to egui v0.23.0
...
Since it's compatible with wgpu 0.17.x.
2023-10-09 18:51:01 -04:00
sleepycatcoding
21a1e1f670
avm2: Small set_property_local fixup
...
Fixes a borrow panic and logic error.
2023-10-10 00:24:39 +02:00
sleepycatcoding
0b2771c23d
avm2: Implement other XMLList set_property_local path
2023-10-10 00:24:39 +02:00
sleepycatcoding
917e70086b
avm2: Throw Error 1089, if base list length bigger than 1
...
This is not mentioned in the E4X specification, but this is what avmplus
seems to be doing.
2023-10-10 00:24:39 +02:00
sleepycatcoding
ca5ba4877c
avm2: Implement one XMLList set_property path
2023-10-10 00:24:39 +02:00
sleepycatcoding
709306be81
avm2: Implement resolveValue
2023-10-10 00:24:39 +02:00
sleepycatcoding
4285d998dc
avm2: Add target property to XMLListObject
2023-10-10 00:24:39 +02:00
Nathan Adams
a3b95d9534
avm2: Fix missing stub imports in TextRenderer.as
2023-10-09 23:54:58 +02:00
Lord-McSweeney
b877a39c47
avm2: Implement SharedObject.setProperty
2023-10-07 23:49:36 +02:00
Tom Schuster
278a6ddf53
avm2: Use the localName in XMLDocument::_convertXmlNode
2023-10-07 23:46:40 +02:00
sleepycatcoding
ce2862dd45
avm2: Fix KeyboardEvent clone
...
also adds missing commandKey property.
2023-10-07 08:57:34 +02:00
Aaron Hill
3a658f5dec
avm2: Implement BitmapData.copyPixelsToByteArray
...
This basically just re-uses the implementation of getPixels
2023-10-05 17:35:54 -04:00
sleepycatcoding
5992f6b3c7
avm2: Fix handling of XMLList when set as attribute value
...
Fixes test `e11_6_1` when combined #13255 .
2023-10-05 21:26:41 +02:00
sleepycatcoding
80ccc1d8a3
avm2: Implement some obscure SWFv9 XML behavior
...
This affects appendChild, prependChild, insertChildBefore, insertChildAfter.
2023-10-05 16:12:43 +02:00
Aaron Hill
a5b4b63edc
avm2: Stub Matrix3D.pointAt
...
Unfortunately, the OpenFL implementation has a TODO
noting that their implementation doesn't match Flash,
so getting this to work will require figuring out
how Flash does things.
2023-10-04 22:27:55 -04:00
Aaron Hill
ddefac322a
avm2: Run DoAbc/DoAbc2/SymbolClass as part of their frame
...
We previously ran these tags during preloading - however,
they are actually run as part of frame execution. This is observable
by ActionScript - a SWF can load in a class from a stop()'d MoveClip,
and then advance the clip to a frame with a SymbolClass referencing
the loaded class.
2023-10-04 22:00:22 -04:00
renovate[bot]
428e89af73
fix(deps): update rust dependencies
2023-10-04 19:19:51 -04:00
Tom Schuster
6d51bc3964
avm2: Namespace support for XML.name()
2023-10-01 19:26:07 +02:00
Tom Schuster
30614bdd2f
avm2: QName constructor improvements
2023-10-01 19:26:07 +02:00
Aaron Hill
4c8f8829cb
avm2: Implement Sound.loadCompressedDataFromByteArray
2023-09-30 21:03:37 -04:00
Lord-McSweeney
bdc0985276
avm2: Correctly fire `textureReady` event for asynchronous Texture uploads
2023-09-30 16:43:38 -04:00
Aaron Hill
c5abed07c4
Fix BitmapData.clone accidentally re-using GPU texture
...
This caused the clone to be linked to the original, instead of
being a completely independent BitmapData object.
2023-09-30 09:38:38 -04:00
sleepycatcoding
f140e7a14b
core: Place jpegxr texture support behind feature flag ( #13348 )
2023-09-29 18:46:54 -04:00
Aaron Hill
ec7a8ac645
avm2: Add support for Stage3D bytearray/compressed textures ( #13180 )
2023-09-28 03:03:30 +00:00
renovate[bot]
7e4e4d4c5b
fix(deps): update rust dependencies
2023-09-25 11:14:39 +02:00
Lord-McSweeney
9833a2d19d
avm2: Resolve review comments
2023-09-24 12:11:24 +02:00
Lord-McSweeney
1adde21a9b
avm2, tests: Improve String.substr; add a complex test
2023-09-24 12:11:24 +02:00
Lord-McSweeney
6a1d0e32de
avm2: Minor fix to string_wrapping_index
...
This improves the ecma3/String/substr test.
2023-09-24 12:11:24 +02:00
Aaron Hill
c20b7b37fe
Adjust behavior
2023-09-23 14:11:24 +02:00
Aaron Hill
bb4410e387
avm2: Skip nested 'goto' frame for SWF 9
...
This fixes 'who_killed_travolta', and unblocks DeathvsMonstars and
NeoPets Lost City Lanes once some additional button fixes are merged.
This isn't 100% correct (as shown by the disabled test), but it brings
us closer to what Flash Player does.
2023-09-23 14:11:24 +02:00
nosamu
e8bbb21554
avm1: tellTarget on an undefined object targets the base clip in SWF6-
2023-09-23 13:42:03 +02:00
Tom Schuster
dc53758488
avm2: Implement support for indexes in xml.child()
2023-09-22 21:28:20 +02:00
Tom Schuster
fe8390760a
avm2: Support node namespace in XML.namespace
2023-09-21 22:12:51 +02:00
Crowdin Bot
695c2ff9f5
chore: Update translations from Crowdin
2023-09-18 00:03:15 +02:00
renovate[bot]
37e2c06034
fix(deps): update rust dependencies
2023-09-18 00:00:45 +02:00
Lord-McSweeney
98cfa60832
avm2: Namespace improvements
2023-09-17 22:22:50 +02:00
Lord-McSweeney
6eddd3532e
avm2: Support Error 1089
2023-09-17 22:03:05 +02:00
Lord-McSweeney
613c21a5d2
avm2: Minor Video improvements
...
Throw RangeError when Video is initialized with negative height or width
Stub Video.clear
2023-09-16 22:55:03 +02:00
sleepycatcoding
6028505f8c
avm2: Small XML code cleanup
2023-09-15 20:20:12 +02:00
sleepycatcoding
ecbf325d41
avm2: Improve XML set_property_local implementation ( #13041 )
...
* avm2: Add error 1087
* avm2: Add deep_copy method to XmlObject
Changes existing AS3 copy method to use this instead
* avm2: Add a few utility methods to E4XNode
* avm2: Change XML.replace impl to use new utility methods
* avm2: allow setting XML/XMLList as a element
* avm2: Fix `xml_namespaced_property` test failure
* chore: fmt
* chore: Appease clippy
* avm2: Add test for XML/XMLList as element
2023-09-14 21:33:32 +00:00
Ikko Eltociear Ashimine
67f2d85e38
core: fix typo in movie_clip.rs
...
occured -> occurred
2023-09-13 23:03:14 +02:00
sleepycatcoding
b5fdd9142f
avm2: Coerce value in set slot opcode
...
This was causing a bunch of implicit conversion test failures.
2023-09-13 23:02:44 +02:00
Lord-McSweeney
53199a5116
avm2: Fix a stub message ( #13140 )
2023-09-11 17:51:55 -04:00
Nathan Adams
f092fa5809
core: Make a glyph shape handle Optional, for ie whitespace
2023-09-09 00:01:20 +02:00
Nathan Adams
bcf47622f0
core: Don't make Font/GlyphSource Clone, it's super wasteful if something did actually clone it
2023-09-09 00:01:20 +02:00
Nathan Adams
8d71ab3436
core: Make Font ascent and descent i16, as it can technically be negative
2023-09-09 00:01:20 +02:00
Nathan Adams
3758f27490
core: Move kerning info to GlyphSource
2023-09-09 00:01:20 +02:00
Nathan Adams
b8ce4e9249
core: Extract out GlyphSource from FontData
2023-09-09 00:01:20 +02:00
Nathan Adams
2cd10f614e
core: Split up Drawing's registration of the shape vs rendering of the shape
2023-09-09 00:01:20 +02:00
Nathan Adams
4d4e9b55a2
core: Refactor Glyph's internal Shape a bit, and make it not contain two duplicate shapes
2023-09-09 00:01:20 +02:00
Nathan Adams
e8e7e91584
core: Store advance separately in Glyph
2023-09-09 00:01:20 +02:00
Aaron Hill
981dedafd2
avm2: Fix avmplus.describeTypeJSON bugs and add test
2023-09-08 17:52:12 -04:00
Aaron Hill
34fb2e4f48
avm2: Fix some Object method signature definitions
...
This is exposed by avmplus.describeTypeJSON
2023-09-08 17:52:12 -04:00
nosamu
a4a9653ecd
avm2: Fix a RangeError message
2023-09-08 09:57:07 -04:00
Aaron Hill
a3e0a84a3d
core: Convert two unused doc comments to normal comments
...
This fixes Nightly warnings
2023-09-07 19:36:23 -04:00
Aaron Hill
1c0ae0b6d8
render: Bump wgpu to 0.17 and naga to 0.13
2023-09-07 18:49:59 -04:00
Lord-McSweeney
20db9f8326
avm2: Implement XML.setName ( #12979 )
...
* avm2/tests: Implement XML.setName; add a test
* avm2: Basic support for QNames in XML.setName (no namespace support yet)
* avm2: Reorder order of Attribute/Element/PI checks in XML.setName
* avm2: Throw error #1117 when the name passed to XML.setName is not a valid XML name
2023-09-07 21:47:02 +02:00
sleepycatcoding
9c7eb90d69
avm2: Implement XML.prependChild
2023-09-07 01:13:16 +02:00
Kornelius Rohrschneider
53ba75d587
Move logarithmic volume transformation to AudioMixer
...
Previously, the volume transformation to adapt the volume for
logarithmic hearing has been performed in the VolumeControls Rust struct
and TypeScript class each.
Since this calculation is the same on desktop and web and should be
implemented in the audio backend, it has been moved into the
AudioMixer::mix_audio method.
The VolumeControls struct and class now only calculate the linear volume
out of the checkbox and the slider.
Player::set_volume and Player::volume now don't take and return the
adapted volume, but use the linear volume (which gets saved internally).
2023-09-07 00:51:58 +02:00
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