Commit Graph

9336 Commits

Author SHA1 Message Date
relrelb 544e445d2f render: Use `swf::Point<Twips>` in `DrawCommand::LineTo` 2023-05-14 22:48:41 +03:00
relrelb e5c7d70f3f render: Use `swf::Point<Twips>` in `DrawCommand::MoveTo` 2023-05-14 22:48:41 +03:00
Lord-McSweeney 3079ae30a5 avm2: Stub SharedObject.setProperty 2023-05-14 19:01:24 +03:00
Nathan Adams a9ba46594f chore: Updated translations from Crowdin 2023-05-14 13:31:32 +02:00
Lord-McSweeney 017a44084f avm2: nit: Provide error number (2025) in error message for validate_remove_operation 2023-05-13 21:30:47 +03:00
Toad06 9671b9b824
web: Download all sols as single .zip 2023-05-13 19:19:00 +03:00
Aaron Hill 729d5a2c65 avm2: Don't overwrite existing entry in `export_class`
This makes the behavior consistent with `export_definition`
2023-05-13 11:15:54 +03:00
Aaron Hill 3c6820c6e1 avm2: Check length and copy vector in Matrix3D constructor 2023-05-13 11:00:31 +03:00
Daniel Jacobs fd07c80ea6 docs: Update Contributing.md TOC 2023-05-13 10:49:41 +03:00
iwannabethedev a023e11098 render: Clean-up. 2023-05-12 22:42:44 +02:00
iwannabethedev 476ff4aeef core: Fix drawing on cpu with color transform.
Taken directly from this commit, credits to Dinnerbone:
9b76090e1f
2023-05-12 22:42:44 +02:00
iwannabethedev 77e1cc96c2 render: Fix of panic in #10955. 2023-05-12 22:42:44 +02:00
Toad06 2e972b8f32 avm1: `button.useHandCursor` can hold any value 2023-05-12 01:13:28 +03:00
iwannabethedev 93450b28b0 avm2: Add 'static length' for most types. 2023-05-11 22:16:55 +02:00
Toad06 94ad41dfd4 web: Update source string 2023-05-11 09:36:06 +03:00
relrelb 660acac427 swf: Use `PointDelta<Twips>` in `ShapeRecord` 2023-05-11 08:55:44 +03:00
relrelb b93a32af0f swf: Use `Point<Twips>` in `StyleChangeData::move_to`
No functionality change.
2023-05-11 08:55:44 +03:00
relrelb e01b613a78 web: Fix another instance of "Unable to lock Ruffle core"
After a panic, `Ruffle::renderer_debug_info()` cannot be called since
it tries to immutably borrow the underlying `Player`, but `Ruffle::tick()`
already holds it mutably.

As a fix, simply use the `_cachedDebugInfo` which is fetched in
advance, before any panic occurs. Rename it to just `rendererDebugInfo`
(without "cache" in its name), because now it's mandated.
2023-05-11 08:33:33 +03:00
relrelb 5b8e0df83f web: Move `Ruffle::destroy()` logic to `RuffleInstance::drop()` 2023-05-11 08:33:33 +03:00
relrelb 942d030dc7 web: Slight cleanups around panicking 2023-05-11 08:33:33 +03:00
Aaron Hill e488cc9f7a wgpu: Allow unaligned writes to IndexBuffer3D
wgpu requires buffer copy sizes and offsets to be 4-byte aligned.
Unfortunately, ActionScript can perform 2-byte aligned uploads
into an IndexBuffer3D.

To support this, we now keep a copy of the IndexBuffer3D on the CPU.
When performing an upload to the buffer, we round the offset down
and the size up to the nearest 4-byte aligned value. The cpu buffer
is used to fill out the write with existing data, so that we don't
corrupt the contents of the GPU buffer.

To avoid introducing a new RefCell, I've changed IndexBuffer3D
to use a `Box` instead of an `Rc` to store the trait object.
This allows us to pass a mutable reference down to the backend.
2023-05-10 18:20:29 -05:00
Daniel Jacobs ea78bf2d39
web: Make isTouch locally scoped to showContextMenu 2023-05-10 17:31:07 +03:00
Huw Pritchard b79b192a58 avm2: Implement PrintJobOptions 2023-05-09 20:51:44 -05:00
Nathan Adams fc96fdf1cc chore: Update translations from Crowdin 2023-05-10 00:29:13 +02:00
Rasmus M d15d64e86e
desktop: Add volume option to CLI 2023-05-09 06:29:46 +00:00
Nathan Adams 72769eeefa web: Localise text inside shadow template 2023-05-09 00:06:49 +02:00
Nathan Adams a29f1f75dc web: Localise the 'cant embed' message 2023-05-09 00:06:49 +02:00
Nathan Adams 1db72a0ffd web: Localise error messages 2023-05-09 00:06:49 +02:00
Nathan Adams 2430cf192e web: Localise fullscreen toggle 2023-05-09 00:06:49 +02:00
Nathan Adams d70faeec04 web: Localise save manager prompts 2023-05-09 00:06:49 +02:00
Nathan Adams 9be198212b web: Translate various button texts 2023-05-09 00:06:49 +02:00
Nathan Adams b7794749d8 web: Localise the unsupported avm2 message 2023-05-09 00:06:49 +02:00
Nathan Adams ecab2e2b2b chore: Update crowdin.yml with new source locations 2023-05-09 00:06:49 +02:00
Nathan Adams 07dea7b164 web: Add localisation to web 2023-05-09 00:06:49 +02:00
Nathan Adams fd5a7cdbc2 core: Rename text to core_text just to avoid confusion if used from another crate with its own text methods 2023-05-09 00:06:49 +02:00
Nathan Adams 9c2e77c88f desktop: Use system preferred language 2023-05-09 00:06:49 +02:00
Nathan Adams 3402f3f4dc web: Use browsers preferred language 2023-05-09 00:06:49 +02:00
Nathan Adams e6ea074a3f core: Made context menu items translatable 2023-05-09 00:06:49 +02:00
Nathan Adams 229c301e18 core: Add i18n module using Fluent 2023-05-09 00:06:49 +02:00
Daniel Jacobs 01a69b60bc web: Remove ContextMenu.TouchOnly as it is unlikely to be useful 2023-05-08 23:53:31 +03:00
Daniel Jacobs e7877706ef web: Use typeof to simplify check for usage of deprecated contextMenu 2023-05-08 23:53:31 +03:00
Daniel Jacobs 4790ea7304 web: Combine contextMenu with touchContextMenu 2023-05-08 23:53:31 +03:00
Daniel Jacobs 68f493336a web: Configuration to disable context menu on touch 2023-05-08 23:53:31 +03:00
Aaron Hill 1908d85f65 avm2: Initialize `Object` instance vtable before other classes
Early class construction is tricky - `Object` defines properties
that need to get copied into subclass instance vtables, but `Class`
defines `prototype`, which needs to be copied into the *class* vtable
of `Object`.

To accomplish this, I've split out instance vtable initialization
into a separate `init_instance_vtable`. We call
`object_class.init_instance_vtable` before
`class_class.init_instance_vtable`, but do things in the opposite
order for `into_finished_class` (`class_class.into_finished_class` is
called before `object_class.into_finished_class`)
2023-05-07 07:46:30 -05:00
iwannabethedev 724df48186 avm2: Add AS 'length()' to XML. 2023-05-06 12:02:06 -05:00
relrelb 97483fed7b web: Fix "Unable to lock Ruffle core" console spam after panic
Upon panic, `Ruffle::destroy()` attempts to mutably borrow the
thread-local `instances`. However, when a panic occurs, `instances`
is already immutably borrowed by `Ruffle::with_core_mut()`. This
causes the cleanup logic in `Ruffle::destroy()` to be skipped
altogether, and as a consequence the animation handler continues
to be fired, ultimately failing to borrow `instances` repeatedly.
Each time a borrow fails, a console error is logged.

Fortunately the fix is extremely easy - `Ruffle::with_core{,_mut}`
used to `drop(instance)` before running any potentially-panicking
logic, exactly for the reason explained above. But those functions
don't `drop(instances)`, which is subject to the same double-borrow
risk. So as a fix simply add `drop(instances)` in both functions.

With this fix, "Unable to lock Ruffle core" is logged on panic only
twice. These logs require further research, and will be avoided in
a future PR.
2023-05-06 10:09:52 +03:00
Lord-McSweeney 4b9430c2cb avm2: Stub flash.system.fscommand 2023-05-06 09:52:30 +03:00
Toad06 8377fe0233 web: Support copying to clipboard 2023-05-05 21:58:41 +02:00
Nathan Adams 2b6829692c wgpu: Resize textures if they're bigger than the system supports 2023-05-05 19:03:15 +02:00
Aaron Hill 22c13d41da wgpu: Use Context3DCommand by value 2023-05-05 11:43:43 -05:00