Kornelius Rohrschneider
76d3cd95a4
tests: Add form loader encoding tests
...
Several form loader encoding tests have been added. They test whether
the form loader uses the correct encoding to decode text files with
different SWF versions and settings.
One test has been marked as known failure as it tests how Flash decodes
invalid UTF-8 characters (when decoding as UTF-8), which is not yet
implemented in Ruffle.
2024-06-26 02:37:44 +02:00
Kornelius Rohrschneider
4d6dd38616
core: Make the form loader use Windows-1252 if SWF version <= 5
...
The form loader now loads files using Windows-1252 if the SWF version is
smaller than 6. This roughly matches Flash's behaviour (Flash uses
Windows-1252 on Windows, on macOS a slightly different custom encoding
is used).
Previously, UTF-8 has been (wrongly) used for all SWF files if
System#useCodepage hasn't been set to true, leading to incorrectly
displayed characters.
2024-06-26 02:37:44 +02:00
Kornelius Rohrschneider
0b30b7fdda
core: Use HTTP response encoding if existing
...
If System#useCodepage has been set to true, the form loader now uses the
encoding specified in the HTTP response content type field, if existing,
to decode remote text files. chardetng is now (only) used if the HTTP
response doesn't specify any encoding or if the file is local.
2024-06-26 02:37:44 +02:00
Kornelius Rohrschneider
870bdae6fd
core: Add support of non-UTF-8 encodings to the form loader
...
Flash's form loader loads text files in the local system codepage if
System#useCodepage has been set to true. Previously, Ruffle always
(wrongly) used UTF-8, leading to incorrectly displayed characters.
This has been fixed. Ruffle now supports loading files with an encoding
other than UTF-8.
As Ruffle doesn't always have access to the system codepage and as it's
not reliably the correct encoding, the crate chardetng has been added.
It's used instead of the system codepage to detect the encoding, and the
data is converted into UTF-8.
2024-06-26 02:37:44 +02:00
TÖRÖK Attila
837c922b55
chore: web: Regenerate `package-lock.json`
...
Like this:
$ rm -rf package-lock.json node_modules/
$ npm update
$ npm install --save --save-dev --save-peer
2024-06-25 19:39:11 +02:00
Daniel Jacobs
38e48099d0
chore: Fix formatting
2024-06-24 20:17:34 -04:00
Daniel Jacobs
3b6cc37324
extension: On Chrome, adding permissions for a specific site adds many
2024-06-24 20:17:34 -04:00
Daniel Jacobs
11d73474b2
extension: If popup ping fails, re-send after 0.2 seconds
2024-06-24 20:17:34 -04:00
Daniel Jacobs
20d6e1d4cc
extension: Separate permission button from other buttons
2024-06-24 20:17:34 -04:00
Daniel Jacobs
8af4454012
extension: Reload the tab when non-<all_urls> host permission added
2024-06-24 20:17:34 -04:00
Daniel Jacobs
23d8e5617c
extension: Revert non-working check
2024-06-24 20:17:34 -04:00
Daniel Jacobs
cee3046216
extension: Address review comments
2024-06-24 20:17:34 -04:00
Daniel Jacobs
eb64cd530d
extension: Make onboarding page look nicer
2024-06-24 20:17:34 -04:00
Daniel Jacobs
9aa027311d
extension: Upgrade Firefox to Manifest V3
2024-06-24 20:17:34 -04:00
Crowdin Bot
e83e39ad27
chore: Update translations from Crowdin
2024-06-25 00:26:30 +02:00
dependabot[bot]
8877eebdb2
build(deps): bump the cargo-minor group across 1 directory with 4 updates
...
Bumps the cargo-minor group with 4 updates in the / directory: [bytemuck](https://github.com/Lokathor/bytemuck ), [syn](https://github.com/dtolnay/syn ), [proc-macro2](https://github.com/dtolnay/proc-macro2 ) and [libloading](https://github.com/nagisa/rust_libloading ).
Updates `bytemuck` from 1.16.0 to 1.16.1
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.0...v1.16.1 )
Updates `syn` from 2.0.66 to 2.0.68
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.66...2.0.68 )
Updates `proc-macro2` from 1.0.85 to 1.0.86
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.85...1.0.86 )
Updates `libloading` from 0.8.3 to 0.8.4
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.8.3...0.8.4 )
---
updated-dependencies:
- dependency-name: bytemuck
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: proc-macro2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: libloading
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-25 00:08:16 +02:00
dependabot[bot]
2f7fa169a9
build(deps-dev): bump the npm-minor group in /web with 3 updates
...
Bumps the npm-minor group in /web with 3 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin ), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser ) and [mocha](https://github.com/mochajs/mocha ).
Updates `@typescript-eslint/eslint-plugin` from 7.13.1 to 7.14.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases )
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md )
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.14.1/packages/eslint-plugin )
Updates `@typescript-eslint/parser` from 7.13.1 to 7.14.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases )
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md )
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.14.1/packages/parser )
Updates `mocha` from 10.4.0 to 10.5.0
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v10.4.0...v10.5.0 )
---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
- dependency-name: "@typescript-eslint/parser"
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 23:19:22 +02:00
Tom Schuster
fe754d7fed
avm2: Change map().unwrap_or() to map_or()
2024-06-24 16:36:25 +02:00
Tom Schuster
0a513f273e
avm2: Cleanup some Value::Object matching
2024-06-24 16:36:25 +02:00
dependabot[bot]
c4f478c30a
build(deps-dev): bump replace-in-file from 7.2.0 to 8.0.0 in /web
...
Bumps [replace-in-file](https://github.com/adamreisnz/replace-in-file ) from 7.2.0 to 8.0.0.
- [Release notes](https://github.com/adamreisnz/replace-in-file/releases )
- [Changelog](https://github.com/adamreisnz/replace-in-file/blob/main/CHANGELOG.md )
- [Commits](https://github.com/adamreisnz/replace-in-file/commits )
---
updated-dependencies:
- dependency-name: replace-in-file
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 15:43:04 +02:00
dependabot[bot]
f455037d34
build(deps): bump the npm-minor group in /web with 7 updates
...
Bumps the npm-minor group in /web with 7 updates:
| Package | From | To |
| --- | --- | --- |
| [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard ) | `36.0.0` | `36.0.1` |
| [typescript](https://github.com/Microsoft/TypeScript ) | `5.4.5` | `5.5.2` |
| [tsx](https://github.com/privatenumber/tsx ) | `4.15.6` | `4.15.7` |
| [chromedriver](https://github.com/giggio/node-chromedriver ) | `126.0.2` | `126.0.3` |
| [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha ) | `10.0.6` | `10.0.7` |
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc ) | `48.2.12` | `48.4.0` |
| [typedoc](https://github.com/TypeStrong/TypeDoc ) | `0.25.13` | `0.26.2` |
Updates `stylelint-config-standard` from 36.0.0 to 36.0.1
- [Release notes](https://github.com/stylelint/stylelint-config-standard/releases )
- [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md )
- [Commits](https://github.com/stylelint/stylelint-config-standard/compare/36.0.0...36.0.1 )
Updates `typescript` from 5.4.5 to 5.5.2
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml )
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.2 )
Updates `tsx` from 4.15.6 to 4.15.7
- [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.15.6...v4.15.7 )
Updates `chromedriver` from 126.0.2 to 126.0.3
- [Commits](https://github.com/giggio/node-chromedriver/compare/126.0.2...126.0.3 )
Updates `@types/mocha` from 10.0.6 to 10.0.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha )
Updates `eslint-plugin-jsdoc` from 48.2.12 to 48.4.0
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases )
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc )
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v48.2.12...v48.4.0 )
Updates `typedoc` from 0.25.13 to 0.26.2
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases )
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.25.13...v0.26.2 )
---
updated-dependencies:
- dependency-name: stylelint-config-standard
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: typescript
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-patch
dependency-group: npm-minor
- dependency-name: chromedriver
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: "@types/mocha"
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: eslint-plugin-jsdoc
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
- dependency-name: typedoc
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 15:12:48 +02:00
Kamil Jarosz
04dfd1f22f
avm2: Do not fire roll over events on focus change (yet)
...
This patch bypasses AVM2 conditionally when firing roll over events
triggered by a focus change until a proper support for AVM2 events
is implemented.
2024-06-23 13:30:27 +02:00
Kamil Jarosz
83ed478beb
wgpu: Do not use 'packed' as variable name in WGSL shaders
...
Turns out that 'packed' is a keyword in some GLSL shaders,
and naga currently preserves it, producing a syntax error.
As a workaround, this patch renames the variable to something else.
2024-06-23 09:51:04 +02:00
Nathan Adams
575481f9cc
web: Don't use direct eval, use indirect new Function(...) instead
2024-06-23 00:26:55 +02:00
sleepycatcoding
9979631f8c
frontend-utils: Replace async-net's `TcpStream` with tokio's
2024-06-23 00:40:24 +03:00
Lord-McSweeney
9271618185
avm2: Properly import stub_getter and stub_setter in Shader
2024-06-22 13:28:01 -07:00
riku
036839fb1f
extension: Fix 4399 CORS and Flash detection issue ( close #13943 ) ( #16750 )
...
Co-authored-by: Zhentao Lu <zhentaolu@microsoft.com>
2024-06-21 15:05:53 +00:00
Aaron Hill
dc03f541db
avm2: Match Flash behavior for DoAbc/SymbolClass script initializers
...
Flash Player handles SymbolClass tags and eager (non-lazy) DoAbc2 tags in an unusual way:
During the first time that a given frame is executed:
1. All SymbolClass tags are processed in order, triggering ClassObject loading (and the associated
script initializer execution, if it hasn't already been run)
2. All eager (non-lazy) DoAbc/DoAbc2 tags have their *final* script initializer executed.
To implement this, we now cache the needed `Script` and symbol class
data during preloading. The first time we execute a frame, we run
the symbolclass class lookup and assignment, followed by the final
script initializer for each DoAbc2 tag in the frame.
This fixes 'minidash' (and probably other crossbridge games as well).
2024-06-21 16:57:06 +02:00
Kamil Jarosz
adea7ae743
text: Refactor EditText.line_text
...
This refactor takes advantage of the
new layout structure to simplify code.
2024-06-21 16:41:56 +02:00
Kamil Jarosz
bfbd2dbd19
text: Refactor EditText.layout_metrics
...
This refactor takes advantage of the
new layout structure to simplify code.
2024-06-21 16:41:56 +02:00
Kamil Jarosz
50ade23779
text: Implement Layout.bounds
2024-06-21 16:41:56 +02:00
Kamil Jarosz
ba13386788
text: Restructure layout to include text lines
...
This patch removes `LineData` & `get_line_data` and incorporates
their logic into layout calculation adding `Layout` and `LayoutLine`.
The goal is to simplify operations on the layout, as now
line data is always present and integrated with the layout.
Specialized methods may be added to `Layout` and `LayoutLine`
in the future.
2024-06-21 16:41:56 +02:00
Kamil Jarosz
d2f5b78503
text: Move lower_from_text_spans to module level
2024-06-21 16:41:56 +02:00
Crowdin Bot
43b2cced0a
chore: Update translations from Crowdin
2024-06-21 10:17:03 +02:00
Lord-McSweeney
1164dd747a
avm2: Merge locals better
2024-06-20 17:02:13 -07:00
Lord-McSweeney
1389f5fa67
avm2: Record all jump sources in verifier
2024-06-20 17:02:13 -07:00
dependabot[bot]
f63641678c
build(deps): bump the npm-minor group in /web with 9 updates
...
Bumps the npm-minor group in /web with 9 updates:
| Package | From | To |
| --- | --- | --- |
| [@wdio/cli](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/wdio-cli ) | `8.38.2` | `8.39.0` |
| [@wdio/local-runner](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/wdio-local-runner ) | `8.38.2` | `8.39.0` |
| [@wdio/mocha-framework](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/wdio-mocha-framework ) | `8.38.2` | `8.39.0` |
| [@wdio/spec-reporter](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/wdio-spec-reporter ) | `8.38.2` | `8.39.0` |
| [@wdio/static-server-service](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/wdio-static-server-service ) | `8.38.2` | `8.39.0` |
| [webpack](https://github.com/webpack/webpack ) | `5.92.0` | `5.92.1` |
| [chromedriver](https://github.com/giggio/node-chromedriver ) | `126.0.1` | `126.0.2` |
| [wasm-feature-detect](https://github.com/GoogleChromeLabs/wasm-feature-detect ) | `1.6.1` | `1.6.2` |
| [webdriverio](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/webdriverio ) | `8.38.2` | `8.39.0` |
Updates `@wdio/cli` from 8.38.2 to 8.39.0
- [Release notes](https://github.com/webdriverio/webdriverio/releases )
- [Changelog](https://github.com/webdriverio/webdriverio/blob/v8.39.0/CHANGELOG.md )
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.39.0/packages/wdio-cli )
Updates `@wdio/local-runner` from 8.38.2 to 8.39.0
- [Release notes](https://github.com/webdriverio/webdriverio/releases )
- [Changelog](https://github.com/webdriverio/webdriverio/blob/v8.39.0/CHANGELOG.md )
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.39.0/packages/wdio-local-runner )
Updates `@wdio/mocha-framework` from 8.38.2 to 8.39.0
- [Release notes](https://github.com/webdriverio/webdriverio/releases )
- [Changelog](https://github.com/webdriverio/webdriverio/blob/v8.39.0/CHANGELOG.md )
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.39.0/packages/wdio-mocha-framework )
Updates `@wdio/spec-reporter` from 8.38.2 to 8.39.0
- [Release notes](https://github.com/webdriverio/webdriverio/releases )
- [Changelog](https://github.com/webdriverio/webdriverio/blob/v8.39.0/CHANGELOG.md )
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.39.0/packages/wdio-spec-reporter )
Updates `@wdio/static-server-service` from 8.38.2 to 8.39.0
- [Release notes](https://github.com/webdriverio/webdriverio/releases )
- [Changelog](https://github.com/webdriverio/webdriverio/blob/v8.39.0/CHANGELOG.md )
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.39.0/packages/wdio-static-server-service )
Updates `webpack` from 5.92.0 to 5.92.1
- [Release notes](https://github.com/webpack/webpack/releases )
- [Commits](https://github.com/webpack/webpack/compare/v5.92.0...v5.92.1 )
Updates `chromedriver` from 126.0.1 to 126.0.2
- [Commits](https://github.com/giggio/node-chromedriver/compare/126.0.1...126.0.2 )
Updates `wasm-feature-detect` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/GoogleChromeLabs/wasm-feature-detect/releases )
- [Commits](https://github.com/GoogleChromeLabs/wasm-feature-detect/commits/v1.6.2 )
Updates `webdriverio` from 8.38.2 to 8.39.0
- [Release notes](https://github.com/webdriverio/webdriverio/releases )
- [Changelog](https://github.com/webdriverio/webdriverio/blob/v8.39.0/CHANGELOG.md )
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.39.0/packages/webdriverio )
---
updated-dependencies:
- dependency-name: "@wdio/cli"
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
- dependency-name: "@wdio/local-runner"
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
- dependency-name: "@wdio/mocha-framework"
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
- dependency-name: "@wdio/spec-reporter"
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
- dependency-name: "@wdio/static-server-service"
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
- dependency-name: webpack
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: chromedriver
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: wasm-feature-detect
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: webdriverio
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-20 11:45:12 +02:00
Crowdin Bot
c16b03f010
chore: Update translations from Crowdin
2024-06-19 23:56:21 +02:00
Kamil Jarosz
8b2c9d8157
avm2: Add stub for winding behavior of drawing triangles in Graphics
...
Currently, even-odd winding rule is used to render triangles,
but FP uses non-zero.
2024-06-19 23:24:55 +02:00
Kamil Jarosz
f046263002
tests: Add avm2/graphics_draw_triangles test
...
This test verifies the behavior of drawing triangles using Graphics.
However, it will have to be updated when support for winding behavior
gets added.
2024-06-19 23:24:55 +02:00
Kamil Jarosz
14ac29e435
avm2: Handle wrong number of coords when drawing triangles in Graphics
...
FP throws an error when the number of coordinates is odd for the indexed
version, and when is not divisible by 6 for the non-indexed version.
2024-06-19 23:24:55 +02:00
Kamil Jarosz
86a3086808
avm2: Fix errors thrown when culling has wrong value in Graphics
...
The errors differ between Graphics.drawTriangles and GraphicsTrianglePath.
The former throws 2004, whereas the latter throws 2008.
2024-06-19 23:24:55 +02:00
Kamil Jarosz
64acc7b3ad
avm2: Ignore out of range and non-integer triangle indices in Graphics
...
This behavior imitates FP's behavior.
2024-06-19 23:24:55 +02:00
Kamil Jarosz
2b9289e1b2
avm2: Implement culling for drawing triangles in Graphics
2024-06-19 23:24:55 +02:00
Kamil Jarosz
4993d70594
avm2: Unify drawing triangles in graphics.rs
...
There were two implementations for drawing triangles: one for
Graphics.drawTriangles, and the other for GraphicsTrianglePath.
However, they behave almost identically, so this patch uses
draw_triangles_internal for both.
2024-06-19 23:24:55 +02:00
Kamil Jarosz
9e1248d130
avm2: Add make_error_1125
2024-06-19 23:24:55 +02:00
Nathan Adams
4d12e0e5b4
core: Implement LocalConnection
2024-06-19 21:54:25 +02:00
Kamil Jarosz
0a2528b4f9
tests: Add avm2/graphics_draw_path test
...
This test verifies the behavior of drawing paths using Graphics.
2024-06-19 20:58:33 +02:00
Kamil Jarosz
0f534c837f
avm2: Improve drawing paths in Graphics
...
This patch improves drawing paths in Graphics:
* no error is thrown when there are 0 commands,
* no error is thrown when there are missing data points,
* an error is thrown when the number of coordinates is odd,
* no error is thrown and command processing is stopped
when an unknown command is encountered,
* the vector with parsed commands is removed, as it's not needed.
2024-06-19 20:58:33 +02:00
Kamil Jarosz
fae1500cc6
avm2: Add make_error_2004
2024-06-19 20:58:33 +02:00