Commit Graph

13090 Commits

Author SHA1 Message Date
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 d80246f85a desktop: Move icon.svg to packages/linux
Currently, the SVG icon is used only in Linux packages and moving it
to packages/linux makes it easier to package downstream.
Additionally it makes it possible to adapt it for Linux desktop
specifically.
2024-09-05 11:29:20 +02:00
Kamil Jarosz b56d9234ff desktop: Add ruffle to conflicts in PKGBUILD
This ensures that the package conflicts with every
other package providing ruffle.
2024-09-05 11:29:20 +02:00
Kamil Jarosz b18d21261e chore: Move PKGBUILD to desktop/packages 2024-09-05 11:29:20 +02:00
Kamil Jarosz 8dac02bf95 chore: Fix clippy errors on beta 2024-09-05 08:14:14 +02:00
Crowdin Bot f538f67a17 chore: Update translations from Crowdin 2024-09-04 23:22:12 +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 d75d6da39e ci: Enable doctests
Unfortunately nextest does not support doc tests yet, they need to be
run using cargo test.
2024-09-04 22:28:12 +02:00
Kamil Jarosz 7d5059ab45 ci: Remove duplicated steps for running tests
The environment variable FEATURES sets the set of features used
while testing, that makes it possible to have just one step
and prevent code duplication.
2024-09-04 22:28:12 +02:00
Kamil Jarosz a38ae27703 ci: Improve OS condition on step disabling start-stop-gc
The syntax used for modifying an environment variable did
nothing on Windows (PowerShell).
2024-09-04 22:28:12 +02: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 fc84ae1c3f tests: Add a test for recomputed tick time when changing Timer.delay 2024-09-04 21:18:50 +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
Kamil Jarosz 6d577f50e4 desktop: Use MessageDialog for messages
This commit replaces rfd's MessageDialog with our custom MessageDialog
written using egui.
2024-09-04 20:59:31 +02:00
Kamil Jarosz fc13643cc8 desktop: Implement MessageDialog in egui
The implemented MessageDialog is meant to replace the rfd MessageDialog
in order to be consistent with other UI elements.
2024-09-04 20:59:31 +02:00
Kamil Jarosz 5cdf4c8030 desktop: Add OpenDialog event for opening dialogs
This event replaces AskToOpenUrl and is more generic, because
it may open any dialog (specified as an argument).
2024-09-04 20:59:31 +02:00
Kamil Jarosz b4422bffc4 desktop: Add LocalizableText struct
This structure allows specifying localizable text when there's no locale
available, but it will be available in the future (e.g. when rendering).
It has several advantages over specifying bare labels:

1. labels cannot be easily mixed with non-localizable text,
2. it's easy to find labels in use by looking for enum variant usages.

It's also better than providing a function of locale which requires
complicated type definitions and dynamic dispatch.
2024-09-04 20:59:31 +02:00
Kamil Jarosz 646ab4e5bc desktop: Add show_ prefix to appropriate methods from Dialogs 2024-09-04 20:59:31 +02:00
Crowdin Bot f82f58f28a chore: Update translations from Crowdin 2024-09-04 10:24:56 +02:00
dependabot[bot] 48afad257f build(deps): bump quinn-proto from 0.11.3 to 0.11.8
Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.11.3 to 0.11.8.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.3...quinn-proto-0.11.8)

---
updated-dependencies:
- dependency-name: quinn-proto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-04 01:01:37 +02:00
Crowdin Bot 5efe609dbc chore: Update translations from Crowdin 2024-09-03 17:44:43 +02:00
dependabot[bot] 4c59f5e49d build(deps): bump regress from 0.10.0 to 0.10.1 in the cargo-minor group
Bumps the cargo-minor group with 1 update: [regress](https://github.com/ridiculousfish/regress).


Updates `regress` from 0.10.0 to 0.10.1
- [Release notes](https://github.com/ridiculousfish/regress/releases)
- [Commits](https://github.com/ridiculousfish/regress/compare/v0.10.0...v0.10.1)

---
updated-dependencies:
- dependency-name: regress
  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 22:45:10 +02:00
dependabot[bot] 43c6307d25 build(deps-dev): bump typescript-eslint in /web in the npm-minor group
Bumps the npm-minor group in /web with 1 update: [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `typescript-eslint` from 8.3.0 to 8.4.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.4.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 22:31:08 +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
dependabot[bot] decc00fe69 build(deps-dev): bump the npm-minor group in /web with 6 updates
Bumps the npm-minor group in /web with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [stylelint](https://github.com/stylelint/stylelint) | `16.8.2` | `16.9.0` |
| [tsx](https://github.com/privatenumber/tsx) | `4.18.0` | `4.19.0` |
| [postcss](https://github.com/postcss/postcss) | `8.4.41` | `8.4.44` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.3.4` | `18.3.5` |
| [axios](https://github.com/axios/axios) | `1.7.5` | `1.7.7` |
| [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) | `4.3.18` | `4.3.19` |


Updates `stylelint` from 16.8.2 to 16.9.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.8.2...16.9.0)

Updates `tsx` from 4.18.0 to 4.19.0
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](https://github.com/privatenumber/tsx/compare/v4.18.0...v4.19.0)

Updates `postcss` from 8.4.41 to 8.4.44
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.41...8.4.44)

Updates `@types/react` from 18.3.4 to 18.3.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `axios` from 1.7.5 to 1.7.7
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.5...v1.7.7)

Updates `@types/chai` from 4.3.18 to 4.3.19
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
- dependency-name: tsx
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: axios
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: "@types/chai"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 15:02:45 +02:00
dependabot[bot] b770d9310f build(deps): bump KSXGitHub/github-actions-deploy-aur
Bumps [KSXGitHub/github-actions-deploy-aur](https://github.com/ksxgithub/github-actions-deploy-aur) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/ksxgithub/github-actions-deploy-aur/releases)
- [Commits](https://github.com/ksxgithub/github-actions-deploy-aur/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: KSXGitHub/github-actions-deploy-aur
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 14:49:51 +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
Nathan Adams 038a714dbf desktop: Use demangling in tracy 2024-09-02 02:19:15 +02:00
Nathan Adams 2d6d4bc8f5 desktop: Update tracy and bump profiling 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
Crowdin Bot 556fd7306d chore: Update translations from Crowdin 2024-08-31 11:49:48 +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
zhoufanjin 76ee654812 chore: fix some comments
Signed-off-by: zhoufanjin <shuangcui@live.cn>
2024-08-30 11:17:22 -04:00
Kamil Jarosz a227b51a27 desktop: Use Open URL dialog instead of rfd for opening URLs 2024-08-30 13:13:03 +02:00
Kamil Jarosz 25570ef374 desktop: Add Open URL dialog 2024-08-30 13:13:03 +02:00
Kamil Jarosz 263ef4696e frontend_utils: Replace confirm_website_navigation with navigate_to_website of NavigatorInterface
This makes it possible to implement "Open URL" dialogs asynchronously.
2024-08-30 13:13:03 +02:00
Kamil Jarosz c9839a36f5 desktop: Rename RfdNavigatorInterface to DesktopNavigatorInterface
The interface does not have to necessarily use rfd.
2024-08-30 13:13:03 +02:00