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
Kamil Jarosz
687e049dc1
debug_ui: Add option to draw layout boxes for EditText
2024-06-19 20:12:43 +02:00
dependabot[bot]
e4a37efddf
build(deps): bump the cargo-minor group across 1 directory with 2 updates
...
Bumps the cargo-minor group with 2 updates in the / directory: [url](https://github.com/servo/rust-url ) and [reqwest](https://github.com/seanmonstar/reqwest ).
Updates `url` from 2.5.1 to 2.5.2
- [Release notes](https://github.com/servo/rust-url/releases )
- [Commits](https://github.com/servo/rust-url/compare/v2.5.1...v2.5.2 )
Updates `reqwest` from 0.12.4 to 0.12.5
- [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.4...v0.12.5 )
---
updated-dependencies:
- dependency-name: url
dependency-type: direct:production
update-type: version-update:semver-patch
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-06-19 00:40:39 +02:00
Kamil Jarosz
b36a6b792b
web: Implement pasting text using Clipboard API
...
Ruffle does not have direct clipboard access on web, so the current
paste implementation from the context menu does not work.
This patch intercepts the paste context menu callback,
and uses the Clipboard API to ask the browser for the clipboard
and update it before calling the callback.
When the Clipboard API is not available or the user denies
clipboard permission, a modal informing the user about
cut, copy, paste shortcuts is displayed.
2024-06-19 00:15:07 +02:00
Kamil Jarosz
60ee0379b7
web: Add clipboard modal informing about shortcuts
...
This modal informs the user that they can use shortcuts
for copy, cut, and paste instead of using the context menu.
This modal is meant to be displayed when the browser
does not support reading the clipboard,
or the user denies permission to the clipboard.
2024-06-19 00:15:07 +02:00
Kamil Jarosz
c2777db656
web: Support async onClick callbacks for context menus
...
The current implementation was synchronous only, so that when
an async callback was used, the menu was being disposed prematurely.
This patch ensures that in case of asynchronous callbacks,
the menu will be disposed after they finish.
2024-06-19 00:15:07 +02:00
Kamil Jarosz
e086ca0719
ci: Enable web_sys_unstable_apis for nightly
...
The custom RUSTFLAGS from CI overrides .cargo/config.toml.
2024-06-19 00:15:07 +02:00
Kamil Jarosz
e75851f4fa
Revert "web: No longer set the `web_sys_unstable_apis` config variable"
...
This reverts commit 5b7c48e43d
.
Co-authored-by: TÖRÖK Attila <torokati44@gmail.com>
2024-06-19 00:15:07 +02:00
TÖRÖK Attila
35f5227e2d
core,desktop: Update `wgpu` to `v0.20.1`, bump `egui`
2024-06-18 23:10:43 +02:00
Lord-McSweeney
e8339088a7
tests: Add a test case for setting `dataFormat` after calling `load`
2024-06-18 20:56:50 +02:00
Lord-McSweeney
9c8e4d7dce
core: Remove `DataFormat` for `URLLoader` loads since we can just check the string field
...
Also, don't set the data as variables if there is no data to set.
2024-06-18 20:56:50 +02:00
Lord-McSweeney
7a1ee0e109
core: `URLLoader` should check the data format after loading finishes, not when starting a load
2024-06-18 20:56:50 +02:00
TÖRÖK Attila
4448e37d98
ci: Release and test with Rust 1.78 instead of stable
...
Co-authored-by: Kamil Jarosz <kjarosh256@gmail.com>
2024-06-18 13:59:57 -04:00
dependabot[bot]
c8fdc59bfc
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 [@types/firefox-webext-browser](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/firefox-webext-browser ).
Updates `@typescript-eslint/eslint-plugin` from 7.13.0 to 7.13.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.13.1/packages/eslint-plugin )
Updates `@typescript-eslint/parser` from 7.13.0 to 7.13.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.13.1/packages/parser )
Updates `@types/firefox-webext-browser` from 120.0.3 to 120.0.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/firefox-webext-browser )
---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: "@typescript-eslint/parser"
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: "@types/firefox-webext-browser"
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: npm-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 23:43:26 +02:00
dependabot[bot]
0cb9e8003a
build(deps): bump chromedriver from 125.0.3 to 126.0.1 in /web
...
Bumps [chromedriver](https://github.com/giggio/node-chromedriver ) from 125.0.3 to 126.0.1.
- [Commits](https://github.com/giggio/node-chromedriver/compare/125.0.3...126.0.1 )
---
updated-dependencies:
- dependency-name: chromedriver
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 19:07:47 +02:00
dependabot[bot]
6d9e1e7d20
build(deps-dev): bump the npm-minor group in /web with 5 updates
...
Bumps the npm-minor group in /web with 5 updates:
| Package | From | To |
| --- | --- | --- |
| [prettier](https://github.com/prettier/prettier ) | `3.3.1` | `3.3.2` |
| [webpack](https://github.com/webpack/webpack ) | `5.91.0` | `5.92.0` |
| [tsx](https://github.com/privatenumber/tsx ) | `4.14.0` | `4.15.6` |
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc ) | `48.2.9` | `48.2.12` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite ) | `5.2.13` | `5.3.1` |
Updates `prettier` from 3.3.1 to 3.3.2
- [Release notes](https://github.com/prettier/prettier/releases )
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md )
- [Commits](https://github.com/prettier/prettier/compare/3.3.1...3.3.2 )
Updates `webpack` from 5.91.0 to 5.92.0
- [Release notes](https://github.com/webpack/webpack/releases )
- [Commits](https://github.com/webpack/webpack/compare/v5.91.0...v5.92.0 )
Updates `tsx` from 4.14.0 to 4.15.6
- [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.14.0...v4.15.6 )
Updates `eslint-plugin-jsdoc` from 48.2.9 to 48.2.12
- [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.9...v48.2.12 )
Updates `vite` from 5.2.13 to 5.3.1
- [Release notes](https://github.com/vitejs/vite/releases )
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md )
- [Commits](https://github.com/vitejs/vite/commits/v5.3.1/packages/vite )
---
updated-dependencies:
- dependency-name: prettier
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: webpack
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: eslint-plugin-jsdoc
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: npm-minor
- dependency-name: vite
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 18:55:14 +02:00
Crowdin Bot
a731b82b54
chore: Update translations from Crowdin
2024-06-17 14:57:20 +02:00
Adrian Wielgosik
cacfb5a6a4
avm2: Fix and unify converting SWF's 1-based to 0-based slot indexing
2024-06-16 16:11:17 -07:00
Tom Schuster
ff322eb19a
avm2: Test more namespace related properties/methods in XMLNode
...
We skip the weird xml: namespace special case for now.
2024-06-15 22:26:57 +02:00
Tom Schuster
4463a69c87
avm2: Implement namespace support for flash.xml
2024-06-15 22:26:57 +02:00
David Wendt
404081876c
swf: Bump version to 0.2.1 in preparation for new package publication
2024-06-15 07:49:59 +02:00
Kamil Jarosz
30cc299ed6
wgpu: Prevent random crashes on desktop by handling SurfaceErrors properly
...
This patch adds proper handling for SurfaceErrors that may happen
when calling get_current_texture(), instead of always panicking.
This fixes random crashes, e.g. when the GPU took too long to
render a frame, or when the surface has unexpectedly changed.
2024-06-14 23:55:50 +02:00
Crowdin Bot
8fb214ea71
chore: Update translations from Crowdin
2024-06-14 22:41:19 +02:00
Daniel Jacobs
22c73e9536
extension: Use nodenext target for tools instead of commonjs
2024-06-13 19:24:46 -04:00
Daniel Jacobs
f4fd851298
extension: Fix zip tool by adding import.meta.url back
2024-06-13 19:24:46 -04:00
Lord-McSweeney
5ce882da9c
tests: Add a test for calling `newclass` twice on the same `Class`
2024-06-13 23:49:52 +02:00
Lord-McSweeney
18c50df838
avm2: Don't get the `Class` class by using `instance_of` in `into_finished_class`
2024-06-13 23:49:52 +02:00
Lord-McSweeney
1705870951
avm2: Class initializers will be called twice when constructing two `ClassObject`s for one `Class`
2024-06-13 23:49:52 +02:00
Lord-McSweeney
7e7032d908
avm2: Remove `constructor`, `native_constructor`, and `call_handler` fields from `ClassObject`
...
They were already present on `Class`
2024-06-13 23:49:52 +02:00
dependabot[bot]
52404bc3aa
build(deps): bump the cargo-minor group with 6 updates
...
Bumps the cargo-minor group with 6 updates:
| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap ) | `4.5.4` | `4.5.7` |
| [url](https://github.com/servo/rust-url ) | `2.5.0` | `2.5.1` |
| [linkme](https://github.com/dtolnay/linkme ) | `0.3.26` | `0.3.27` |
| [regex](https://github.com/rust-lang/regex ) | `1.10.4` | `1.10.5` |
| [zip](https://github.com/zip-rs/zip2 ) | `2.1.2` | `2.1.3` |
Updates `clap` from 4.5.4 to 4.5.7
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.4...v4.5.7 )
Updates `url` from 2.5.0 to 2.5.1
- [Release notes](https://github.com/servo/rust-url/releases )
- [Commits](https://github.com/servo/rust-url/compare/v2.5.0...v2.5.1 )
Updates `linkme` from 0.3.26 to 0.3.27
- [Release notes](https://github.com/dtolnay/linkme/releases )
- [Commits](https://github.com/dtolnay/linkme/compare/0.3.26...0.3.27 )
Updates `regex` from 1.10.4 to 1.10.5
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.10.4...1.10.5 )
Updates `zip` from 2.1.2 to 2.1.3
- [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.2...v2.1.3 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: url
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: linkme
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: quick-xml
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: regex
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-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-13 01:05:26 +02:00
Crowdin Bot
4fa5853f88
chore: Update translations from Crowdin
2024-06-13 00:44:49 +02:00
Nathan Adams
c3f1a18d20
web: SocketProxy doesn't need serde
2024-06-13 00:22:33 +02:00