Commit Graph

527 Commits

Author SHA1 Message Date
CUB3D 206ac43703 avm1: Correct ToInteger for undefined, null and object inputs 2021-01-29 19:44:32 -08:00
Mike Welsh 477fa06daf avm1: Fix off-by-one error in String.lastIndexOf
Fixes #2873.

Co-authored-by: Toad06 <gd.productions@laposte.net>
2021-01-29 02:59:14 -08:00
Mike Welsh 92e4d781e7 tests: Add test for #2870 2021-01-28 16:36:42 -08:00
Mike Welsh 4c33464115 tests: Add test for Sound 2021-01-27 15:25:04 -08:00
paq c088c18517 chore: Remove Flash's recovery file and add it to .gitignore 2021-01-23 00:29:25 -08:00
CUB3D 0cf3a4abed core: Invert pixel fill order for BitmapData.noise 2021-01-22 13:16:19 -08:00
CUB3D d57fd172f9 core: More special casing for noise 2021-01-22 13:16:19 -08:00
CUB3D 00fe7b6468 avm1: Generate correct values for negative seeds for BitmapData.noise() 2021-01-22 13:16:19 -08:00
CUB3D 9ba38784ef avm1: Properly implement BitmapData.noise() for positive seeds 2021-01-22 13:16:19 -08:00
relrelb ab92bc1b98 tests: Add tests for target clip in SWF6 2021-01-21 14:52:52 -08:00
relrelb 286bf7ac3f tests: Add tests for target clip in SWF5 2021-01-21 14:52:52 -08:00
Mike Welsh 60a95f3ea0 core: Gracefully handle tag length past EOF 2021-01-21 14:04:46 -08:00
Mike Welsh 6e7e5395aa tests: Add test for subclassing a native type 2021-01-21 11:48:26 -08:00
Mike Welsh e8efe22dee tests: Add test for SWF5 string encoding 2021-01-20 15:02:31 -08:00
relrelb c284a2e47e tests: Add export_assets 2021-01-15 11:48:29 -08:00
Mike Welsh df82194823 tests: Add test for case insensitive Object.registerClass in SWF6 2021-01-13 15:38:38 -08:00
Moulins 26a2b6e4f7 core: Add test for `Object.registerClass` return values 2021-01-13 15:38:38 -08:00
Mike Welsh e93f3b5d3b tests: Add test for Object constructor 2021-01-12 09:13:24 -08:00
Mike Welsh 484ac03ca8 tests: Test removeMovieClip on non-movieclips 2021-01-09 18:31:04 -08:00
Mike Welsh 6638aebde8 tests: Add test verifying proper getBytesTotal value 2021-01-09 14:29:19 -08:00
CUB3D 01557fba5a core: Add flash.filters.GradientGlowFilter 2021-01-06 18:06:30 -08:00
CUB3D 0cab167e4c core: Add flash.filters.GradientBevelFilter + refactor existing filters 2021-01-06 18:06:30 -08:00
Moulins 02c591958e core/avm1: don't run onLoadInit handler if movie loading failed
Replace Loader::Movie::loader_complete flag by an enum to distinguish
between success and failure.

Fixes #2123
2021-01-06 16:00:58 -08:00
Callum Thomson 75081c8149
avm1: Implement flash.filters.ConvolutionFilter avm1 built-in 2021-01-04 18:26:11 -08:00
Mike Welsh 4c12f27e46 tests: Add tests for #1671 2021-01-02 16:19:08 -08:00
paq 72be136fb9 avm1: Implement unescape 2021-01-02 14:37:03 -08:00
CUB3D 03e69c5c0b core: Update DisplacementMapFilter tests 2021-01-02 03:12:07 -08:00
CUB3D 631d185014 core: Implmement flash.filters.DisplacementMapFilter 2021-01-02 03:12:07 -08:00
Mike Welsh 22ab8df8f5 tests: Add test for #2166 2020-12-31 20:01:05 -08:00
Mike Welsh caa2d8e383 tests: Add test for XML.ignoreWhite 2020-12-30 16:00:39 -08:00
Mike Welsh d736293425 avm1: Fix method calls with null/empty string name
`f[null]` should call `f["null"]`.
`f[undefined]`, `f[""]`, `f[o]` where o.toString returns the empty
string should call `f` directly.
2020-12-30 13:35:36 -08:00
CUB3D 5fb15c8f80 core: Support CallMethod with non-string method_name (fix #2160) 2020-12-30 13:35:36 -08:00
paq 4f980becb2 avm1: Implement escape 2020-12-30 12:42:03 -08:00
Callum Thomson 7b202bd2e7
avm1: Implement flash.filters.ColorMatrixFilter avm1 built-in 2020-12-29 03:10:46 -08:00
paq 8c86434e38 avm1: Implement Matrix.deltaTransformPoint 2020-12-28 01:17:00 -08:00
paq 8baa36e801 avm2: Implement isFinite 2020-12-27 23:02:39 -08:00
paq ce2d7efac3 avm2: Implement isNaN 2020-12-27 23:02:39 -08:00
paq 7bfe3f7177 avm1: Implement Matrix.transformPoint (ruffle-rs#303) 2020-12-27 14:27:04 -08:00
Sam Morrow 38bdb8b39a web/desktop: Add basic dialog handling (closes #1978) 2020-12-23 19:08:18 -08:00
Callum Thomson e38d559b1e
avm1: Implement flash.filters.DropShadowFilter
Implements the AVM object for DropShadowFilter. Actual rendering is still TODO.
2020-12-22 14:17:12 -08:00
David Wendt 19219ad0c1 avm2: Implement `dispatchEvent`.
Event dispatch is a surprisingly complicated procedure, so this makes sure to test:

1. Event dispatch on bare dispatchers
2. Event dispatch on hierarchial dispatchers (movieclips)
3. Event cancellation (which is reported by `dispatchEvent`)
4. The implicit `this` on unbound event handlers. I'm not yet sure if this is a special property of event dispatch or if all unbound functions inherit their global scope as `this`.
5. The execution order of handlers on both bare and hierarchial dispatchers
6. Delegation to hierarchial dispatchers
7. Modification of the dispatch list during dispatch of an event. Surprisingly enough, you can add handlers to the event you're handling and expect them to execute, *if* you added them to a further object in the order *or* you added a bubble handler in the capture phase.
2020-12-21 21:47:29 -08:00
David Wendt 87ff679898 avm2: Implement `EventDispatcher.willTrigger` 2020-12-21 21:47:29 -08:00
David Wendt be4e37a55c avm2: Implement `addEventListener`, `removeEventListener`, and `hasEventListener`. 2020-12-21 21:47:29 -08:00
Callum Thomson 69ab12fcc3
avm1: Add flash.filters.GlowFilter 2020-12-20 15:31:09 -08:00
Mike Welsh 9d6e711006 tests: Add test for #2030 2020-12-19 02:14:27 -08:00
Mike Welsh 981a4de9c9 tests: Uncomment arguments.caller avm1 test 2020-12-19 01:46:20 -08:00
Mike Welsh a3f18b80b6 tests: Add test for TextField.replaceSel 2020-12-19 00:35:26 -08:00
Mike Welsh 042e9a444b tests: Add parseFloat tests 2020-12-18 02:50:09 -08:00
Mike Welsh 72a24b9800 tests: Add tests for #1906 2020-12-17 18:07:01 -08:00
David Wendt 09f9e99fbb avm2: Implement `rest` parameters in function calls. 2020-12-17 13:21:44 -08:00
David Wendt 453e013c2c avm2: Implement `arguments`. 2020-12-17 13:21:44 -08:00
David Wendt 217890f4a6 avm2: Implement `Function.apply` 2020-12-17 13:21:44 -08:00
CUB3D 23a9c7143a core: Support failiable constructors 2020-12-15 00:04:51 -08:00
CUB3D b3dd5c0c0b core+renderer: Fix corner cases 2020-12-15 00:04:51 -08:00
CUB3D 74ab728cff core: Format 2020-12-15 00:04:51 -08:00
CUB3D 22a7b1d340 core: Add handling of invalid arguments for getColorBoundsRect/colorTransform 2020-12-15 00:04:51 -08:00
CUB3D 353d5a268b core: Add better handling of invalid arguments to BitmapData 2020-12-15 00:04:51 -08:00
CUB3D 9d46d67588 core+web+renderer: Add load/attach Bitmap and handling for invalid args with BitmapData 2020-12-15 00:04:51 -08:00
CUB3D 3c12fa6ee5 core: Implement BitmapData.floodFill and correct getPixel for invalid coordinates 2020-12-15 00:04:51 -08:00
CUB3D 3afd20063f core: Implement get/set pixel(32) functions 2020-12-15 00:04:51 -08:00
CUB3D e45e942a1f core: Start implementation for flash.display.BitmapData 2020-12-15 00:04:51 -08:00
David Wendt 8a787e6153 avm2: Implement `Event.toString` (which matches it's valueof behavior) 2020-12-14 16:46:33 -08:00
David Wendt d393a5f4f8 avm2: Implement `Event.preventDefault` and `Event.isDefaultPrevented` 2020-12-14 16:46:33 -08:00
David Wendt 8b9a804ae9 avm2: Implement `Event.formatToString`. 2020-12-14 16:46:33 -08:00
David Wendt 584c6c8b11 avm2: Implement `Event.clone` 2020-12-14 16:46:33 -08:00
David Wendt 90da20579c avm2: Implement `Event.bubbles`, `cancelable`, and `type`. 2020-12-14 16:46:33 -08:00
David Wendt 58f4470dc5 avm2: Add `Event` class, object type, and native representation 2020-12-14 16:46:33 -08:00
jmckiern cfd003de7a avm1: Implement TextField.backgroundColor 2020-12-14 12:45:45 -08:00
jmckiern 61e3214d0a avm1: Implement TextField.borderColor 2020-12-14 12:45:45 -08:00
Zeh Fernando 8e9de8e16b core: Implement MovieClip._lockroot in avm1
This also enables the (previously ignored) _lockroot tests.
2020-12-13 15:34:42 -08:00
David Wendt afd033898c avm2: Implement `hitTestObject` 2020-12-09 14:00:06 -08:00
David Wendt d9172780c5 avm2: Implement `hitTestPoint`. 2020-12-09 14:00:06 -08:00
David Wendt 06ba2f898a avm2: Implement `visible`. 2020-12-09 14:00:06 -08:00
David Wendt d489aca377 avm2: Expose `DisplayObject.root` 2020-12-09 14:00:06 -08:00
David Wendt 1b2a4708d6 avm2: Implement `DisplayObject.parent`. 2020-12-09 14:00:06 -08:00
David Wendt 852f26bdeb tests: Fix name test breaking with our half-working execution order 2020-12-09 14:00:06 -08:00
David Wendt c053f2c87c avm2: Expose DisplayObject `name` property 2020-12-09 14:00:06 -08:00
David Wendt 19f9e99954 avm2: Expose and test `rotation`. 2020-12-09 14:00:06 -08:00
David Wendt 29f96e76ab tests: Activate alpha test (since it seems to work fine) 2020-12-09 14:00:06 -08:00
David Wendt 200581e1e3 avm2: Expose `x` and `y` properties. 2020-12-09 14:00:06 -08:00
David Wendt 4784dc3c03 tests: Add more stringent height/width test that we're only accurate to within 1 twip. 2020-12-09 14:00:06 -08:00
David Wendt 69db45131b tests: Add inactive tests for `alpha`, `height`, `rotation`, `width`, `x`, and `y`. 2020-12-09 14:00:06 -08:00
jmckiern 3cab11d18e avm1: Implement TextField.textColor (close #1863) 2020-12-07 15:09:36 -08:00
Zeh Fernando c018ac065c tests: Add test for MovieClip._lockroot in avm1 2020-12-02 11:59:01 -08:00
David Wendt 9dde91e0fd core: Store named children on AVM2 movieclips as object properties 2020-11-27 13:23:34 -08:00
David Wendt 86e1037940 avm2: Implement `stopAllMovieClips` 2020-11-27 13:23:34 -08:00
David Wendt cad2c4ecee tests: Add a button child execution order test. 2020-11-27 13:23:34 -08:00
David Wendt e2e598edde avm2: Implement `swapChildren` and `swapChildrenAt`. 2020-11-27 13:23:34 -08:00
David Wendt 71cdbd7194 avm2: Implement `setChildIndex` 2020-11-27 13:23:34 -08:00
David Wendt cf0ab2d82f avm2: Implement `removeChildren`.
This also changes the underlying `DisplayObjectContainer` method to accept any type of range. Turns out enum trait objects aren't actually trait objects and don't need to worry about object safety!
2020-11-27 13:23:34 -08:00
David Wendt 38fd29ae5f avm2: Implement `removeChildAt` 2020-11-27 13:23:34 -08:00
David Wendt 759a590d76 avm2: Implement `getChildIndex` 2020-11-27 13:23:34 -08:00
David Wendt 2454287342 tests: Enable the `removeChild` test that tests timeline manipulation. 2020-11-27 13:23:34 -08:00
David Wendt 85fa8f327d avm2: Impl `contains` w/ test 2020-11-27 13:23:34 -08:00
David Wendt bcef9ef415 tests: Add a whole number of tests of depth/render list interaction from the AS3 side 2020-11-27 13:23:34 -08:00
David Wendt a5f09d3c09 avm2: Implement `removeChild`. 2020-11-27 13:23:34 -08:00
David Wendt a5ea9795f6 avm2: Implement `addChild` and `addChildAt`, with tests 2020-11-27 13:23:34 -08:00
David Wendt f748576927 avm2: Implement `getChildByName` 2020-11-27 13:23:34 -08:00
David Wendt d04f131cfe avm2: Implement `DisplayObjectContainer.getChildAt`.
This test doesn't work yet because it needs `avm2-domainscope` to get merged in.
2020-11-27 13:23:34 -08:00
Nathan Adams d8728bbf25 avm1: Made firstChild and lastChild ignore non-node children 2020-11-26 11:18:00 -08:00