Commit Graph

4312 Commits

Author SHA1 Message Date
David Wendt e795da0358 avm2: Impl `LoaderInfo.frameRate` 2021-04-05 16:18:37 -06:00
David Wendt cbd167fd6c avm2: Stub `LoaderInfo.contentType` 2021-04-05 16:18:37 -06:00
David Wendt 76c563146d tests: Grab `contentType` on frame two 2021-04-05 16:18:37 -06:00
David Wendt 7b7d250ce9 avm2: This is a getter, not a method 2021-04-05 16:18:37 -06:00
David Wendt 2a01260f52 avm2: `bytesLoaded` etc reports the compressed file length, not the uncompressed length 2021-04-05 16:18:37 -06:00
David Wendt d0ad894f70 avm2: Impl `LoaderInfo.content` 2021-04-05 16:18:37 -06:00
David Wendt b4cb01d2c9 avm2: Impl `LoaderInfo.bytesTotal`, and `.bytesLoaded`
`bytesLoaded` is currently aliased to `bytesTotal` as we do not yet support streaming loads
2021-04-05 16:18:37 -06:00
David Wendt 55e448ebaa avm2: Impl `LoaderInfo.applicationDomain` 2021-04-05 16:18:37 -06:00
David Wendt c156cd2a16 tests: Add tests for properties that are only accessible on frame 2 2021-04-05 16:18:37 -06:00
David Wendt 12dcfe7c62 avm2: Impl `LoaderInfo.actionScriptVersion` 2021-04-05 16:18:37 -06:00
David Wendt 1a7b33a1af avm2: Impl `ActionScriptVersion` 2021-04-05 16:18:37 -06:00
David Wendt a492c4db4d tests: Add a test for `LoaderInfo`'s properties 2021-04-05 16:18:37 -06:00
David Wendt fc26c26d1d avm2: Allow access to `loaderInfo` on root movies 2021-04-05 16:18:37 -06:00
David Wendt 60c92dde49 avm2: Add Loader Info class & object type 2021-04-05 16:18:37 -06:00
CUB3D e2f124ee34 avm2: Rename current_position -> instruction_start 2021-04-03 16:37:47 -06:00
CUB3D c22ebc1de3 chore: Format on stable 2021-04-03 16:37:47 -06:00
CUB3D d5c2e5559b avm2: Don't mutably borrow for pos() 2021-04-03 16:37:47 -06:00
CUB3D 96f89a1643 avm2: Implement Op::LookupSwitch 2021-04-03 16:37:47 -06:00
relrelb 2d37f4d23e avm1: Migrate `search_prototype` to primitive prototype 2021-04-03 12:40:05 -06:00
relrelb bbded90697 avm1: Rename proto_value to proto 2021-04-01 17:06:07 -06:00
relrelb 89679bba65 avm1: Delete proto and set_proto
In favor of the new proto_value and set_proto_value pair.
In the next commit proto_value and set_proto_value will be renamed
to proto and set_proto.
2021-04-01 17:06:07 -06:00
relrelb 2c1dfea3ce avm1: Migrate Player to proto_value 2021-04-01 17:06:07 -06:00
relrelb 76d80061a7 avm1: Migrate Object to proto_value 2021-04-01 17:06:07 -06:00
relrelb e712a4fd59 avm1: Migrate FunctionObject to proto_value 2021-04-01 17:06:07 -06:00
relrelb dc174b9d9f avm1: Migrate StageObject to proto_value 2021-04-01 17:06:07 -06:00
relrelb be60aa5941 avm1: Migrate XmlIdMapObject to proto_value 2021-04-01 17:06:07 -06:00
relrelb ea52562d06 avm1: Migrate XmlAttributesObject to proto_value 2021-04-01 17:06:07 -06:00
relrelb 161db474a2 avm1: Migrate SuperObject to proto_value 2021-04-01 17:06:07 -06:00
relrelb 766a5db31c avm1: Migrate ScriptObject to proto_value 2021-04-01 17:06:07 -06:00
relrelb 18a32424bd amv1: Migrate custom_object.rs to proto_value 2021-04-01 17:06:07 -06:00
CUB3D 209b9cec36 chore: Format 2021-03-31 18:36:24 -06:00
CUB3D ecbf6118bb avm2: Update tests 2021-03-31 18:36:24 -06:00
CUB3D 9453743f9f avm2: Add test for Op::EscXElem 2021-03-31 18:36:24 -06:00
CUB3D 0ea564f75c avm2: Implement Op::EscXAttr and Op::EscXElem 2021-03-31 18:36:24 -06:00
relrelb e453cbf0ef tests: Expand object_prototypes 2021-03-31 18:04:52 -06:00
relrelb e5660bc0c7 avm1: Allow primitive prototypes
Prototypes can be primitive, not just objects. However, TObject's
proto() and set_proto() work with Object and not Value. To allow
easier and more incremental migration from Object to Value, this
commit introduces a new pair of proto_value/set_proto_value functions
in TObject, preserving the existing proto/set_proto functions.
Both pairs have default implementations, so it's enough to implement
only one pair in each TObject implementation.
For now only ScriptObject uses the new pair, which fixes the behavior
of incorrectly coercing __proto__ to object.

Follow-up migration plan:
1. Replace all old proto/set_proto implementations by the new
proto_value/set_proto_value in all TObject implementations on a
one-by-one basis.
2. After proto/set_proto become unused, delete them and rename
proto_value/set_proto_value to proto/set_proto for more concise code.
2021-03-31 18:04:52 -06:00
relrelb 014e85b1f0 tests: Expand funky_function_calls 2021-03-31 17:59:58 -06:00
relrelb 5beb0164dd tests: Cleanup funky_function_calls 2021-03-31 17:59:58 -06:00
relrelb a3727e0727 avm1: Fix "this" argument conversion in Function.prototype.{call,apply}
The "this" argument should fall-back to the global object only for
undefined or null. Other primitives should be coerced to an object
rather than falling-back to the global object.

As a drive-by replace `Vec::new` by `Vec::with_capacity` in
`Function.prototype.apply` to minimize unnecessary reallocations.
2021-03-31 17:59:58 -06:00
dependabot-preview[bot] 5cefaa16d2 build(deps-dev): bump @wdio/cli from 7.2.1 to 7.2.3 in /web
Bumps [@wdio/cli](https://github.com/webdriverio/webdriverio) from 7.2.1 to 7.2.3.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.2.1...v7.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-29 23:55:47 -07:00
CUB3D 8d68dcb562 avm2: Update tests 2021-03-29 20:46:02 -06:00
CUB3D 68527c13da avm2: Implement flash.utils.getTimer 2021-03-29 20:46:02 -06:00
relrelb 0063f40af9 webgl: Use bytemuck
This avoids unsafe code, and reduces code size a bit.
2021-03-27 01:59:02 -07:00
dependabot-preview[bot] 23af83f923 build(deps): bump syn from 1.0.64 to 1.0.65
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.64 to 1.0.65.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.64...1.0.65)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-27 01:40:26 -07:00
relrelb 7e1acce150 core: Fix build without default features
Previously `cargo build --no-default-features` failed because then
neither implementation of `Mp3Decoder` is chosen.
Fix that by not handling mp3 sounds at all in that case.
2021-03-27 01:40:11 -07:00
Mike Welsh d0c7aa0dff web: Fix fullscreen sizing on Safari
When Ruffle would go fullscreen on Safari, the content would often
not fill the viewport because Ruffle's width/height CSS would
override the :-webkit-full-screen CSS that Safari adds.

Add our own :-webkit-full-screen CSS with !important to force 100%
dimensions in fullscreen.
2021-03-25 16:26:37 -07:00
Suhao Jeffrey Huang ce72277a07 web: Hide navigation bar in fullscreen on Android (fix #1698) 2021-03-25 16:26:37 -07:00
Mike Welsh f96a414036 avm2: Lazily initialize Graphics object
Initialize a Sprite/Shape's Graphics object on the first access,
so that `shape.graphics == shape.graphics` is `true`.
2021-03-24 13:18:06 -07:00
Mike Welsh 040da925e4 avm2: Fix incorrect color in drawing API 2021-03-24 13:18:06 -07:00
Mike Welsh 9a08b9ae4f avm2: flash.display.Graphics is final 2021-03-24 13:18:06 -07:00