Commit Graph

8690 Commits

Author SHA1 Message Date
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 38f897eff4 test: Even more tests 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 6f13276341 tests: Uniform test naming 2023-03-01 22:36:39 +01:00
CUB3D 11d76fc2c4 tests: Add more string paths tests 2023-03-01 22:36:39 +01:00
CUB3D c71070f015 tests: Add string paths keypress event test, add support for keydown in input.json 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 619dbe8566 test: Add test for clip constructors and timers 2023-03-01 22:36:39 +01:00
CUB3D 71a58db8a4 test: Add test for unload and variable scopes 2023-03-01 22:36:39 +01:00
CUB3D 03f5fd8154 test: Add test for string paths aliasing 2023-03-01 22:36:39 +01:00
CUB3D 87947976d3 test: Add test for basic string paths 2023-03-01 22:36:39 +01:00
CUB3D b43510535f test: Add button v5/v6 tests 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 c891a82440 web: Don't focus inside setTimeout on iOS and don't fire unneeded events 2023-03-01 08:15:58 +02:00
Daniel Jacobs 584cb4c1cf web/ui: Open the virtual keyboard when clicking an editable EditText 2023-03-01 08:15:58 +02:00
Daniel Jacobs b9b1fa4f8d web: Add context menu item to show virtual keyboard
Co-authored-by: n42k <pedro@amaro.sh>
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 93ce5e2328 tests: Extend loader_applicationDomain test 2023-02-28 13:04:24 -08:00