Adrian Wielgosik
1ba3ec0bf0
avm2: Implement BitmapData.getVector
2023-03-03 12:47:54 +01:00
Aaron Hill
a07ff36726
avm2: Implement describeType
...
This includes all of the XML elements described in 'describeType' docs.
Unfortunately, the order of elements produced by Flash depends on
the iteration order of internal hashtables. As a result, the test
manually stringifies an XML object, sorting the stringified children,
to produce consistent output between Flash and Ruffle.
2023-03-02 20:37:59 -06:00
Lord-McSweeney
a2150cbbbf
avm2: Implement IExternalizable interface
2023-03-02 01:32:43 -06:00
Nathan Adams
fcaa17308c
avm2: Workaround haxe calling addChild(this) before super()
2023-03-02 00:38:24 +01:00
Nathan Adams
bcc4e63144
core: Inline to_un_multiplied_alpha_accurate
2023-03-01 23:24:35 +01:00
Nathan Adams
6bcb64e52a
core: Use slightly more accurate to_un_multiplied_alpha version in copy_pixels to fix tests
2023-03-01 23:24:35 +01:00
Nathan Adams
6e5e8b13fc
core: Use a lookup table in Color::to_un_multiplied_alpha to match Flash's output
2023-03-01 23:24:35 +01:00
CUB3D
ceda614add
avm1: Don't use stack_push when the pushed value can't be an Object
2023-03-01 22:36:39 +01:00
CUB3D
4723c0414b
avm1: Remove resolved todos, add comment and test about known reference launder issue
2023-03-01 22:36:39 +01:00
CUB3D
af9810c22e
avm1: More scope fixes
2023-03-01 22:36:39 +01:00
CUB3D
6a5eb43274
avm1: Fix getVariable when path is an object+var and object is a clip
2023-03-01 22:36:39 +01:00
CUB3D
ca0e2488cb
avm1: Dont double borrow the cache, update test output
2023-03-01 22:36:39 +01:00
CUB3D
ae9538c3c7
avm1: Fix beta clippy
2023-03-01 22:36:39 +01:00
CUB3D
6d4c04c1c3
avm1: Cleanup todos, add even more tests
2023-03-01 22:36:39 +01:00
CUB3D
0d5258fa2a
avm1: Remove some mc todos
2023-03-01 22:36:39 +01:00
CUB3D
6ba75d6045
avm1: Refactor movieclip path logic
2023-03-01 22:36:39 +01:00
CUB3D
693e29a82d
avm1: Fix test failures
2023-03-01 22:36:39 +01:00
CUB3D
d1d38091ff
avm1: Fixup clippy lints and formatting
2023-03-01 22:36:39 +01:00
CUB3D
c6ff8a801b
avm1: Fallback to resolving properties on _root when the are not in the current scope
2023-03-01 22:36:39 +01:00
CUB3D
3d3f279160
avm1: In swfv5, resolving a non MovieClip path, should resolve to the first MovieClip parent
2023-03-01 22:36:39 +01:00
CUB3D
611c86df94
avm1: Temporary fix, block events when clips are removed
2023-03-01 22:36:39 +01:00
CUB3D
a282d06ab7
avm1: Locals on removed DisplayObjects can't be accessed, should be undef
2023-03-01 22:36:39 +01:00
CUB3D
a67976f601
avm1: Fix add2 coerce
2023-03-01 22:36:39 +01:00
CUB3D
1fdd8f1a82
avm1: Timers attached to clips don't fire when the clip is removed
2023-03-01 22:36:39 +01:00
CUB3D
9b850e7615
avm1: Correctly invalidate cache on clip removal
2023-03-01 22:36:39 +01:00
CUB3D
cb3d9f99a7
avm1: Cache MovieClips in Value::MovieClip, this is required to correctly handle changing DO._name and for perf
2023-03-01 22:36:39 +01:00
CUB3D
6a9e13814a
avm1: Don't convert SuperObjects to Value::MovieClip, or you break classes
2023-03-01 22:36:39 +01:00
CUB3D
de86a51edd
avm1: AS-instantiated clips with unload handlers need to have delayed removal, fixes mochi preloader
2023-03-01 22:36:39 +01:00
CUB3D
f3cb1fc79e
avm1: Treat MovieClips as strings in add2
2023-03-01 22:36:39 +01:00
CUB3D
e6d3a99d80
avm1: MovieClips are indirectly referenced by string paths
2023-03-01 22:36:39 +01:00
Nathan Adams
6a8846ef19
chore: Appease clippy
2023-03-01 21:25:19 +01:00
Nathan Adams
e33fdfb765
core: Add test to assert that *.foo.example.com matches foo.example.com
2023-03-01 21:25:19 +01:00
Nathan Adams
07ac03eb6c
core: Add names to compatibility rulesets
2023-03-01 21:25:19 +01:00
Nathan Adams
ca9749d1f2
core: Change from regex to custom domain matching in swf compatibility rewrites
2023-03-01 21:25:19 +01:00
Nathan Adams
b10d4876d3
web: Add compatibilityRules config option to disable all compatibility rules
2023-03-01 21:25:19 +01:00
Nathan Adams
ef42a391f5
core: Add default_compatibility_rules as a feature, and document when we add rules
2023-03-01 21:25:19 +01:00
Nathan Adams
1aedb7ff8d
core: Add CompatibilityRules struct for on-the-fly replacements for compatibility. Initially konggames -> kongregate.com rules
2023-03-01 21:25:19 +01:00
Aaron Hill
f282331204
core: Call `overwrite_cpu_pixels_from_gpu` just before we draw
...
If we bail out early, we want to preserve the current GPU -> CPU
sync.
2023-03-01 12:30:22 -06:00
Aaron Hill
076016b1be
avm2: Get XMLList 'filter' syntax working
...
This requires the ability to do a limited 'set_property',
as well as `get_enumerant_value`.
To prevent modification of XMLLists derived from queries,
I've introduced a `target` field on `XMLList`. This is
`None` for lists created with `new XMLList()`, and `Some`
when the list was derived from a query on an existing `XML`
/`XMLList`. We only allow `set_property` when `target` is `None`:
this is enough for filtering to work, and prevents silent incorrect
execution when trying to modify an existing node.
2023-03-01 12:04:02 -06:00
Aaron Hill
44a301e16a
avm2: Add `attribute` and `attributes` methods to `XML/XMLList`
2023-03-01 10:51:21 -06:00
Aaron Hill
1099218fdd
avm2: Stub Mouse.supportsCursor and Mouse.supportsNativeCursor
...
Since these are static properties, Ruffle previously (correctly)
returned `undefined` for SWFs that tried to access them, intead
of throwing an error.
2023-03-01 09:30:10 -06:00
Aaron Hill
78c9de7b8f
avm2: Fix constructing empty XMLList
...
A default empty text node should only be created for XML.
2023-03-01 15:57:34 +01:00
Daniel Jacobs
584cb4c1cf
web/ui: Open the virtual keyboard when clicking an editable EditText
2023-03-01 08:15:58 +02:00
Aaron Hill
61a664fec6
core: Produce an error when BitmapData.draw call is unsupported
2023-02-28 18:20:53 -06:00
EmperorBale
9338f1daa8
avm2: Fix default domain when loading movieclip
2023-02-28 13:04:24 -08:00
Marty_SVK
9c844678b5
avm2: Stub TextField.condenseWhite
2023-02-28 21:25:01 +01:00
relrelb
203788c1c8
core: Move `F64Extension` to `avm1`
...
Since it's only used there. Also rename the trait to `Clamp`.
2023-02-28 19:22:37 +02:00
relrelb
fe23eb0553
core: Introduce and use `F64Extension::clamp_to_i32`
...
Previously there were multiple implementations scattered across the
codebase. Unify them to a single place, in a more "Rusty" way (now
it's called via dot notation, rather than as a free function).
2023-02-28 19:22:37 +02:00
relrelb
b3fd1a47c6
core: Require `SwfMovie::url`
2023-02-28 19:05:20 +02:00
Lord-McSweeney
c01edc90bc
avm2: Stub `flash.text.StyleSheet` ( #9747 )
2023-02-28 16:35:47 +00:00
relrelb
cf0c32bd70
core: Remove some unused `RenderContext` fields
2023-02-28 17:48:57 +02:00
Nathan Adams
91a54f9e41
avm2: Use flags.set(foo) instead of |= foo
2023-02-28 16:25:12 +01:00
Nathan Adams
545193b098
swf: Deduplicate GradientFilter again
2023-02-28 16:25:12 +01:00
Nathan Adams
07d441a750
core: Don't impl FilterAvm2Ext for individual Filter structs
2023-02-28 16:25:12 +01:00
Nathan Adams
f79015e201
render: Use swf Filter types where possible. Gradient types had to be split into duplicate classes to allow for different trait impls based on which gradient filter type it is.
2023-02-28 16:25:12 +01:00
Nathan Adams
b8f7c66980
core: map_point in DisplacementMapFilter is i32 not u32
2023-02-28 16:25:12 +01:00
Nathan Adams
30a114a441
tests: Add avm2/convolution_filter test for swf->core->avm2 and avm2->core->avm2 testing
2023-02-28 16:25:12 +01:00
Nathan Adams
3777210117
core: Angle from swf tag is in radians, convert it to degrees
2023-02-28 16:25:12 +01:00
Nathan Adams
acc3180db7
core: Strength in filters is a f32, not u8
2023-02-28 16:25:12 +01:00
Nathan Adams
fc00ae8eb6
core: Load filters from PlaceObject tag
2023-02-28 16:25:12 +01:00
Nathan Adams
1408252ca3
core: Switch DisplayObjectBase::filters from avm2 objects to Vec<Filter>
2023-02-28 16:25:12 +01:00
Nathan Adams
e39fbe871d
render: Add Filter::GradientGlowFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
bb38a7fa55
render: Add Filter::GradientBevelFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
c8030d047d
render: Add Filter::GlowFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
c9656c429e
render: Add Filter::DropShadowFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
dbe2efff00
render: Add Filter::DisplacementMapFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
f9c7303f01
render: Add Filter::ConvolutionFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
9c1f6ea129
render: Add Filter::BevelFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
5ee3a4b512
avm2: Extract out the Value -> Filter logic into a trait
2023-02-28 16:25:12 +01:00
Aaron Hill
54eb6e33ca
avm2: Ignore XML comments and processing instructions by default
...
This matches the default value of the settings on XML.
2023-02-27 15:53:39 -06:00
EmperorBale
4adb7853b7
avm2: Add concurrent classes
2023-02-27 12:27:37 -08:00
EmperorBale
d166295ee1
avm2: Add Telemetry class
2023-02-27 12:13:16 -08:00
Aaron Hill
82d03b4062
avm2: Ignore XML declaration and doctype
...
These are completely ignored by AVM2
2023-02-27 13:41:18 -06:00
Aaron Hill
c04b463f1f
avm2: Implement XML.children, XMLList.children, and related methods
2023-02-27 13:25:16 -06:00
Aaron Hill
7f58b92348
avm2: Implement encodeURI and encodeURIComponent
2023-02-27 12:40:39 -06:00
Nathan Adams
cfcd257932
avm2: Xml(foo) converts foo to string
2023-02-27 17:37:28 +01:00
Nathan Adams
38d1478ffa
avm2: Implement Sprite.hitArea
2023-02-27 16:28:14 +01:00
renovate[bot]
71e24eedba
fix(deps): update rust dependencies
2023-02-27 11:48:53 +02:00
relrelb
dc9ec40d31
chore: Allow `clippy::bool_to_int_with_if`
...
Seems like Clippy no longer complains about it.
2023-02-26 13:23:38 +02:00
Lord-McSweeney
6630222ba9
avm2: Stub flash.profiler.showRedrawRegions ( #9732 )
2023-02-25 19:52:45 -05:00
Aaron Hill
f9fc4b3179
avm2: Store interfaces from superclases/superinterfaces in ClassObject ( #9728 )
2023-02-25 23:57:50 +00:00
Aaron Hill
c7709dffec
avm2: Handle Event::CData when parsing XML
2023-02-25 17:26:31 -06:00
Adrian Wielgosik
55c59da6ac
avm2: Convert TextFormat to AS
2023-02-25 23:55:43 +01:00
Adrian Wielgosik
35120e9fdc
avm2: Convert Graphics to AS
2023-02-25 23:55:43 +01:00
Adrian Wielgosik
b9dc8a4d52
avm2: Do not box primitives when doing AS-level coercions
2023-02-25 23:31:17 +01:00
Adrian Wielgosik
e063d5b5a8
avm2: Fix coerce_to_boolean on boxed primitives
2023-02-25 23:31:17 +01:00
Lord-McSweeney
16b724246c
Remove stub mention from BitmapData
2023-02-25 23:12:39 +01:00
Lord-McSweeney
f14ef0a4dd
Cleanup globals.as
2023-02-25 23:12:39 +01:00
Lord-McSweeney
9c8f99e9ce
Use AvmError instead of RustError when throwing argumentError in Stage.
2023-02-25 23:12:39 +01:00
Lord-McSweeney
91ae3ae31e
Port Stage overrides to ActionScript
...
And throw IllegalOperationError s.
2023-02-25 23:12:39 +01:00
Lord-McSweeney
e72a935f1b
Move IllegalOperationError up so Stage can use it
2023-02-25 23:12:39 +01:00
Aaron Hill
b26f2fd6fb
avm2: Initial incomplete implementation of XML ( #9647 )
2023-02-25 20:06:36 +00:00
Aaron Hill
dfee80e981
avm2: Mention interfaces in globals.as ordering comment
2023-02-24 16:08:29 -06:00
Aaron Hill
82a3f473d9
avm2: Move some class definitions after playerglobal is loaded
2023-02-24 16:08:29 -06:00
Aaron Hill
62767213a6
avm2: Use 'flash.events' internal namespace for EventDispatcher
2023-02-24 16:08:29 -06:00
Aaron Hill
24e231ae06
avm2: Convert TextField to AS
2023-02-24 16:08:29 -06:00
Aaron Hill
337149ff0e
avm2: Add TextFormat AS stub
2023-02-24 16:08:29 -06:00
Aaron Hill
bc240db517
avm2: Convert SimpleButton to AS
2023-02-24 16:08:29 -06:00
Aaron Hill
d31c686360
avm2: Convert MovieClip to AS
2023-02-24 16:08:29 -06:00
Aaron Hill
aa7dc52b82
avm2: Convert Sprite to AS
2023-02-24 16:08:28 -06:00