Commit Graph

7376 Commits

Author SHA1 Message Date
TÖRÖK Attila 490c02bb58 core,desktop: Update to `winit` `v0.30.5` and latest `egui` from git 2024-09-11 13:24:14 +02:00
Lord-McSweeney 0adbf65490 avm2: Remove "Display object container has no child with name" warning 2024-09-10 22:46:42 -07:00
Lord-McSweeney c9a994fb47 core: Remove "Registering export for non-movie clip" warning log 2024-09-10 22:46:42 -07:00
Adrian Wielgosik aded790672 xml: Cache regex in custom_unescape 2024-09-10 18:04:25 +02:00
Adrian Wielgosik 176b70b1cd avm2: Cache method body index on Method 2024-09-09 23:45:33 +02:00
Lord-McSweeney ee996cd433 avm2: Use SystemClassDefs to look up builtin classes in a few more places 2024-09-08 14:46:28 -07:00
Lord-McSweeney 96a8fe65b3 avm2: Move some graphics classes from SystemClasses to SystemClassDefs 2024-09-08 14:46:28 -07:00
Aaron Hill 51f004f171 core: Allow clicking on a non-interactive AVM2 child of a Loader 2024-09-08 12:01:49 -04:00
Mestery b616f559e7 avm2: Stub desktop AIR APIs 2024-09-08 10:38:54 +02:00
Adrian Wielgosik 7d07eb2b52 avm2: Skip attempting to serialize methods 2024-09-07 13:36:25 +02:00
Tom Schuster 9fb669a343 avm2: Implement Date using ActionScript 2024-09-06 17:32:00 +02:00
TÖRÖK Attila b4c1f57f25 core: fix: Revert an accidental condition negation in AVM2 stub reporting 2024-09-06 07:24:59 -07:00
Crowdin Bot 92686b10b2 chore: Update translations from Crowdin 2024-09-06 09:02:25 +02:00
Moulins 5550443fdb avm2: Do not allocate for `Namespace::any()`
`Namespace` now holds a `Option<Gc<_>>` internally, with `None`
representing the Any namespace.
2024-09-05 19:23:09 +02:00
TÖRÖK Attila 9e18f66125 chore: Bump `rust-flash-lso` dependency to latest `master`
To pull in https://github.com/ruffle-rs/rust-flash-lso/pull/66.
2024-09-05 13:43:38 +02:00
Kamil Jarosz 8dac02bf95 chore: Fix clippy errors on beta 2024-09-05 08:14:14 +02:00
Lord-McSweeney 2e4085fcb3 avm2: Test for namespace in E4X equality check 2024-09-04 14:00:38 -07:00
Lord-McSweeney 243c6b8ba5 avm2: Remove redundant traits parameter of VTable::init_vtable 2024-09-04 14:00:38 -07:00
Lord-McSweeney 8d25be4639 avm2: Some fixes to Vector.concat
- Properly error when passing non-Objects to Vector.concat
- Implement SWFv10 behavior
- Properly error when appending Vector.<A> to Vector.<B> where A and B are both subclasses of Object
2024-09-04 14:00:38 -07:00
Kamil Jarosz a80a0ab525 core: Fix failing doctests 2024-09-04 22:28:12 +02:00
Nathan Adams 0fb5640e5d core: Truncate socket host by null bytes 2024-09-04 21:48:22 +02:00
TÖRÖK Attila 1b17cbb9b9 core: Recompute next tick time of timers when they are reset 2024-09-04 21:18:50 +02:00
Crowdin Bot 5efe609dbc chore: Update translations from Crowdin 2024-09-03 17:44:43 +02:00
dependabot[bot] 2006171721 build(deps): bump the cargo-minor group with 4 updates
Bumps the cargo-minor group with 4 updates: [bytemuck](https://github.com/Lokathor/bytemuck), [tokio](https://github.com/tokio-rs/tokio), [indexmap](https://github.com/indexmap-rs/indexmap) and [syn](https://github.com/dtolnay/syn).


Updates `bytemuck` from 1.17.0 to 1.17.1
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.17.0...v1.17.1)

Updates `tokio` from 1.39.3 to 1.40.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.39.3...tokio-1.40.0)

Updates `indexmap` from 2.4.0 to 2.5.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.4.0...2.5.0)

Updates `syn` from 2.0.76 to 2.0.77
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.76...2.0.77)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 15:21:27 +02:00
Tom Schuster 7de9135a3b avm2: Throw special XML parsing error for empty namespace prefixes 2024-09-02 08:25:50 +02:00
TÖRÖK Attila 52eb5d6614 avm2: Add new feature tracy_avm, which emits tracy spans for AVM2 methods 2024-09-02 02:19:15 +02:00
Aaron Hill a889bd85e5 avm2: Make Sprite.startDrag/stopDrag available to SWF 9
The versioning in playerglobal is incorrect - Flash Player
actually exposes this to SWF 9
2024-09-01 17:22:40 -04:00
Kamil Jarosz 898db260a3 core: Add support for wider range of key codes
This patch changes the definition of KeyCode from an enum,
which was constraining the possible key codes, to a struct with
a u32 field, which covers all possible cases of a key code.

Key codes in Flash are not related to the physical buttons,
but rather to logical button values.
For instance, typing a non-ASCII key produces a key code related
to that character, and using a non-ANSI keyboard or a layout different
from US QWERTY also produces results matching that assumption.
2024-09-01 21:02:34 +02:00
Lord-McSweeney ad0d3f8fbf avm2: Pass `arguments` to QName native initializer
avmplus test `e4x/QName/e13_3_2` now passes
2024-08-31 14:22:12 -07:00
Lord-McSweeney b4b9c75118 avm2: Rename native instance initializer to super initializer 2024-08-31 14:22:12 -07:00
Lord-McSweeney fc820b7710 avm2: Make several slot operations faster
- `get_slot` and `set_slot_no_coerce` now panic instead of returning Err
- `get_slot` is now inlined
2024-08-31 13:16:05 -07:00
Lord-McSweeney 7214440418 avm2: Switch `ScriptObjectData.slots` from `RefLock<Vec<Value>>` to `Vec<Lock<Value>>` 2024-08-31 13:16:05 -07:00
Lord-McSweeney 52e8534aba avm2: Ensure global object always has correct vtable 2024-08-31 13:16:05 -07:00
MartySVK ea85dd6dfc avm2: Added missing `[API()]` to variables from the list 2024-08-31 21:05:29 +02:00
Tom Schuster 2fd8f600bc avm2: Correctly set XML attribute with namespace 2024-08-31 00:35:12 +02:00
Tom Schuster 795fa0df27 avm2: Throw special XML parsing error for unmatched end tag at the root level 2024-08-31 00:20:01 +02:00
oad 9505da8438
core: use char slicing instead of byte slicing (#17686)
* core: use char slicing instead of byte slicing (close #17675)

Fix a panic which can occur when pasting non-ASCII characters into a
textbox. Use char slicing instead of byte slicing when limiting the
length of the text being pasted in. This fixes issue #17675.

* tests: Add test for issue 17675

* tests: fix incorrect output in test "avm2/issue_17675"

The output expected the text to be pasted at the end, even though it
will be pasted at the beginning, which is the correct behaviour here.

* core: use char length instead of byte length

Use char length instead of byte length for text pasting and setting the
current text selection.

* core: use WString for limiting text length and pasting text

Switch to WString from String for limiting text length and pasting text.
Done to ensure this code won't need to be fixed in the future. This does
not work properly with certain characters (e.g., 4-byte UTF-8 chars),
but that's due to how WString handles those characters.

* lint: fix clippy errors

---------

Co-authored-by: oad <48562304+oaddyk@users.noreply.github.com>
Co-authored-by: Adrian Wielgosik <adrian.wielgosik@gmail.com>
2024-08-30 23:49:50 +02:00
dependabot[bot] aff78a5d8e build(deps): bump the cargo-minor group across 1 directory with 8 updates
Bumps the cargo-minor group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [flate2](https://github.com/rust-lang/flate2-rs) | `1.0.31` | `1.0.33` |
| [serde](https://github.com/serde-rs/serde) | `1.0.208` | `1.0.209` |
| [bitstream-io](https://github.com/tuffy/bitstream-io) | `2.5.0` | `2.5.3` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.125` | `1.0.127` |
| [quote](https://github.com/dtolnay/quote) | `1.0.36` | `1.0.37` |
| [syn](https://github.com/dtolnay/syn) | `2.0.75` | `2.0.76` |
| [zip](https://github.com/zip-rs/zip2) | `2.1.6` | `2.2.0` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.6` | `0.12.7` |



Updates `flate2` from 1.0.31 to 1.0.33
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Changelog](https://github.com/rust-lang/flate2-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.31...1.0.33)

Updates `serde` from 1.0.208 to 1.0.209
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.208...v1.0.209)

Updates `bitstream-io` from 2.5.0 to 2.5.3
- [Commits](https://github.com/tuffy/bitstream-io/compare/v2.5.0...v2.5.3)

Updates `serde_json` from 1.0.125 to 1.0.127
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/1.0.125...1.0.127)

Updates `quote` from 1.0.36 to 1.0.37
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.36...1.0.37)

Updates `syn` from 2.0.75 to 2.0.76
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.75...2.0.76)

Updates `zip` from 2.1.6 to 2.2.0
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v2.1.6...v2.2.0)

Updates `reqwest` from 0.12.6 to 0.12.7
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.6...v0.12.7)

---
updated-dependencies:
- dependency-name: flate2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: bitstream-io
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: quote
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: zip
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 14:04:51 +02:00
dependabot[bot] 1344fe5f90 build(deps): bump wasm-bindgen-futures in the wasm-bindgen group
Bumps the wasm-bindgen group with 1 update: [wasm-bindgen-futures](https://github.com/rustwasm/wasm-bindgen).


Updates `wasm-bindgen-futures` from 0.4.42 to 0.4.43
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: wasm-bindgen-futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: wasm-bindgen
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 13:14:35 +02:00
Tom Schuster 102e58b551 avm2: Throw when using delete with XMLList operand (name) 2024-08-26 12:57:47 +02:00
Tom Schuster a4f03173c2 avm2: Make XML [[Delete]] follow the spec more closely 2024-08-26 12:57:47 +02:00
MartySVK 6ddc28edc4 avm2: Added all missing [API()] to classes from the list 2024-08-24 21:27:18 +02:00
Crowdin Bot bfd43297be chore: Update translations from Crowdin 2024-08-24 00:52:55 +02:00
Tom Schuster a10b31b118 avm2: For AIR report the correct OS in flash.system.Capabilities 2024-08-21 23:16:19 +02:00
crumblingstatue 73919c71c0
core: Make some avm1 object properties editable in debug ui (#17279) 2024-08-21 21:04:58 +00:00
Yaman Kassir 6d2644ed48
avm2: support CSS comments and fix whitespace issues (#17502) 2024-08-21 20:34:03 +00:00
Tom Schuster 130430e805 avm2: XMLList needs to override has_own_property_string to handle
attributes
2024-08-21 22:18:29 +02:00
Tom Schuster 5834f273e2 avm2: Implement XML.removeNamespace 2024-08-21 20:51:52 +02:00
Kamil Jarosz 56f092be2e desktop: Add "Exit Full Screen" option to context menu
This option allows the user to exit full screen
without knowing the Esc shortcut.
2024-08-21 14:31:56 +02:00
TÖRÖK Attila cd4eeb238f avm2: Fix GraphicsPath.cubicCurveTo() [API()] version
Turns out, the docs were wrong again.
2024-08-20 22:17:22 +02:00