Chris Midgley
e0b2288005
dev: Set Firefox min version to try to help with signing
...
* dev: set min Firefox version to 91.1.0
* Revert "dev: don't even try to sign firefox ext"
2021-10-17 11:31:03 -07:00
Mike Welsh
60f5dc2477
avm2: Implement SoundChannel.position
...
Fix various issues with `SoundChannel`:
* Change `avm2::Object::as_sound_instance` to `as_sound_channel`.
* Cache sound position in `SoundChannelObject`.
* `SoundInfo::in_sample` is in units of 44100Hz.
* Clamp `num_loops` to 1.
2021-10-16 22:53:25 -07:00
Mike Welsh
6034b4a3af
avm1: Sound.position and duration are not version-gated
...
Even though they were added in SWFv6, they will be available when
playing a v5 SWF in Flash Player 6 and higher.
See #340 for an example in the wild.
2021-10-16 22:53:25 -07:00
Mike Welsh
04d84a3386
web: Implement WebAudioBackend::get_sound_position
2021-10-16 22:53:25 -07:00
Mike Welsh
105c889f5f
desktop: Implement AudioBackend::get_sound_position
2021-10-16 22:53:25 -07:00
Mike Welsh
bca31b2c51
audio: Grab Sound.position from audio backend
...
* Change `AudioBackend::get_sound_position` to return `f64` to
match `AudioBackend::get_sound_duration`.
* Wire up `AudioBackend::get_sound_position` to `Sound.position`.
* Remove unimplmeneted warning from `Sound.position`.
2021-10-16 22:53:25 -07:00
relrelb
e9efc2841b
avm1: Store depth in `SuperObject`
...
This is a temporary hack to calculate depth from `base_proto` and
`this`, so that changing `this.__proto__` will affect `super`.
In the future, `depth` should be passed instead of `base_proto`.
2021-10-16 11:14:38 -07:00
relrelb
7816938e9b
tests: Expand avm1 `SuperObject` tests
2021-10-16 11:14:38 -07:00
relrelb
299b7a778c
avm1: Correct `base_proto` for method calls
...
In case the method is found directly on `this` (normally it shouldn't
because it's usually defined on `this.__proto__`), it seems like the
`super` object behaves identically as-if the method was found on
the object's prototype.
2021-10-16 11:14:38 -07:00
relrelb
7008f9bacc
avm1: Correct `base_proto` for constructions
...
Previously constructions had `base_proto` set to the newly-created
object (`this`). However this doesn't match the `base_proto` of method
calls, which is `this.__proto__` (or more precisely where the function
is found on the prototype chain). This caused wrong behavior when using
the `super` object from within constructors.
Change `base_proto` in that case to be `this.__proto__`, which aligns
with method calls.
In order to keep things working, `SuperObject::call` needs to look-up
one level less than before.
An alternative can be changing `base_proto` for method calls instead,
but that seems to be harder because this would require `search_prototype`
to return the before-last visited object in the prototype chain.
2021-10-16 11:14:38 -07:00
relrelb
1772def6e6
avm1: Fix `SuperObject::get_local_stored`
...
It should return `None` in order to continue further walking on the
prototype chain.
2021-10-16 11:14:38 -07:00
Chris Midgley
c5ad8e76ee
audio: Fail to create invalid ADPCM decoder
2021-10-13 23:12:32 -07:00
Mike Welsh
af244c1c66
tests: Add test for function w/ removed base clip
2021-10-12 17:23:01 -07:00
Mike Welsh
219d3af284
avm1: Function base clip defaults to `this` if clip no longer exists
...
When a function is defined, the base clip is stored in the function
object, and used when the function is called in SWFv6+. This
affects the target clip for GotoFrame and other actions.
However, if that base clip no longer exists when the function is
called, the base clip should default to the `this` display object.
Previously Ruffle would still use the previously unloaded base clip.
2021-10-12 17:23:01 -07:00
Chris Midgley
f37730153a
dev: only try to push demo, docs and aur on base repo
2021-10-12 17:22:34 -07:00
relrelb
c0021204c6
Revert "core: Fix clip depth handling in `MovieClip::mouse_pick`"
...
This reverts commit 37e3f0903e
.
2021-10-12 22:42:11 +03:00
dependabot[bot]
72e50bd3c6
build(deps): bump quote from 1.0.9 to 1.0.10
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.9 to 1.0.10.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.9...1.0.10 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 17:14:42 -07:00
dependabot[bot]
60ef1ba38b
build(deps): bump console_error_panic_hook from 0.1.6 to 0.1.7
...
Bumps [console_error_panic_hook](https://github.com/rustwasm/console_error_panic_hook ) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/rustwasm/console_error_panic_hook/releases )
- [Commits](https://github.com/rustwasm/console_error_panic_hook/commits )
---
updated-dependencies:
- dependency-name: console_error_panic_hook
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 15:31:25 -07:00
dependabot[bot]
7d54161100
build(deps): bump thiserror from 1.0.29 to 1.0.30
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.29 to 1.0.30.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.29...1.0.30 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 15:30:48 -07:00
dependabot[bot]
ce70dbb52e
build(deps): bump png from 0.17.1 to 0.17.2
...
Bumps [png](https://github.com/image-rs/image-png ) from 0.17.1 to 0.17.2.
- [Release notes](https://github.com/image-rs/image-png/releases )
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image-png/commits )
---
updated-dependencies:
- dependency-name: png
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 15:30:20 -07:00
dependabot[bot]
fd64530288
build(deps): bump syn from 1.0.78 to 1.0.80
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.78 to 1.0.80.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.78...1.0.80 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 15:29:29 -07:00
relrelb
37e3f0903e
core: Fix clip depth handling in `MovieClip::mouse_pick`
2021-10-10 18:51:59 -07:00
Mike Welsh
f008fc4474
tests: Add test for avm2 self-goto execution order
2021-10-10 18:27:30 -07:00
Mike Welsh
0786350a6f
avm2: Defer self-gotos to end of frame script execution
...
If a movieclip calls a seek operation like `gotoAndStop` on
itself while executing a frame script, this goto is not executed
until the frame script has completed. In contrast, calling a goto
on other clips will execute the goto immediately.
2021-10-10 18:27:30 -07:00
Mike Welsh
279834a499
tests: Add test for default null-ish slot values
2021-10-10 14:01:36 -07:00
Mike Welsh
57be2397ef
avm2: Initialize slots to appropriate values when no default given
...
Slots and const traits should initialize to an appropriate value
for their type if no default is specified. Remove the `Option`
from `default_value`, and always set it to an appropriate null-ish
value (`0` for ints, `NaN` for `Number`, `null` for objects, etc.)
2021-10-10 14:01:36 -07:00
EmperorBale
2b77fff8f7
tests: Add test for vector enumeration
2021-10-10 11:02:42 -07:00
EmperorBale
34ecb32b85
avm2: Add custom implementations for get_enumerant_name and property_is_enumerable for VectorObject
2021-10-10 11:02:42 -07:00
EmperorBale
9bca63375f
tests: Add test for array enumeration
2021-10-10 11:02:42 -07:00
EmperorBale
6eea0f2067
avm2: Add custom get_enumerant_name & property_is_enumerable implementations for ArrayObject
2021-10-10 11:02:42 -07:00
Chris Midgley
b0e3698c44
desktop: correct error when passing an invalid absolute windows filepath
2021-10-09 11:26:45 -07:00
Chris Midgley
2dfaa33282
chore: fmt
2021-10-09 10:10:03 -07:00
Chris Midgley
c9e67d31dc
core: move avm_type from display object to update context
2021-10-09 10:10:03 -07:00
Chris Midgley
b0fec2c2cb
dev: don't even try to sign firefox ext
2021-10-09 18:06:47 +02:00
relrelb
54df49f96e
core: Random SWF-related cleanups
2021-10-08 13:22:45 -07:00
relrelb
d069b8dcd6
swf: Avoid one usage of `Reader::pos`
2021-10-08 13:22:45 -07:00
relrelb
4fcf0907ac
core: Remove `SwfSlice` usage from `MovieClip::new`
2021-10-08 13:22:45 -07:00
relrelb
b8152f431e
core: Use `SwfSlice::read_from`
2021-10-08 13:22:45 -07:00
relrelb
693f49904f
swf: Extract `BitReader::new`
2021-10-08 13:22:45 -07:00
Moulins
4ad6e1e698
avm1: Propagate AvmString<'gc>s to all methods on Object
...
Some frequently-used Object methods have an Into<impl AvmString<'gc>>
parameter to reduce the size of the changes.
2021-10-06 19:47:35 -06:00
Moulins
9aa601d43b
core: Store AvmString<'gc>s in avm1::PropertyMap
2021-10-06 19:47:35 -06:00
Daniel Jacobs
a1fb368401
demo: Show overlay when dragging over file input
2021-10-06 18:17:59 -07:00
TÖRÖK Attila
525dfcba05
chore: Bump h263-rs and h263-rs-yuv git refs
2021-10-05 10:58:46 -07:00
TÖRÖK Attila
3869950578
video/vp6: Add VP6[A] video decoding support
...
Gated behind the "vp6" feature, enabled by default.
Utilizing a heavily stripped-down version of the NihAV project,
retaining only the VP6 decoder, relicensed under MIT.
Including VP6WithAlpha decoding, proper FrameDependency reporting,
and cropping the unwanted encoded pixels on the right/bottom manually.
2021-10-04 22:33:06 -07:00
dependabot[bot]
cd9206f08d
build(deps): bump pretty_assertions from 0.7.2 to 1.0.0
...
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions ) from 0.7.2 to 1.0.0.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases )
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md )
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v0.7.2...v1.0.0 )
---
updated-dependencies:
- dependency-name: pretty_assertions
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 15:02:30 -07:00
dependabot[bot]
006275632c
build(deps): bump syn from 1.0.77 to 1.0.78
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.77 to 1.0.78.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.77...1.0.78 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 15:01:47 -07:00
dependabot[bot]
3d754a5d7d
build(deps): bump smallvec from 1.6.1 to 1.7.0
...
Bumps [smallvec](https://github.com/servo/rust-smallvec ) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases )
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.6.1...v1.7.0 )
---
updated-dependencies:
- dependency-name: smallvec
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 15:01:36 -07:00
David Wendt
ee9341cb1c
avm2: Remove `is_boxed_primitive`, as we are no longer accepting boxed primitives on the stack.
2021-10-03 15:57:43 -07:00
David Wendt
71c953b6ac
avm2: Automatically unbox any boxed primitives that happen to make their way onto the stack.
...
This particular occurance is unlikely in practice, but could become far more common as more primitive constructors are implemented.
2021-10-03 15:57:43 -07:00
TÖRÖK Attila
8cf39f3001
Allow the if_then_panic clippy lint in one more place
2021-10-03 15:50:54 -07:00