Commit Graph

12831 Commits

Author SHA1 Message Date
Nathan Adams e67cc08da5 web: Remove ruffleIndexError as a global thing on Error, make our own Error classes 2024-07-04 13:39:06 +02:00
Nathan Adams a8b146df3e web: Move PanicError enum to its own file 2024-07-04 13:39:06 +02:00
Nathan Adams b254b19be2 web: Remove PanicError.JavascriptConfiguration from rust loading - doesn't happen anymore 2024-07-04 13:39:06 +02:00
Nathan Adams 20a8d7be8a web: Move the actual creation of panic error/actions into panic.tsx 2024-07-04 13:39:06 +02:00
Nathan Adams 5ebf876348 web: Move the creation of the github report url to panic.tsx 2024-07-04 13:39:06 +02:00
Nathan Adams f96ca66f82 web: Simplify the actual creation of the panic screen 2024-07-04 13:39:06 +02:00
Nathan Adams 1603dfb016 web: Simplify panic action links a bit, use tsx 2024-07-04 13:39:06 +02:00
Nathan Adams 024d056418 web: Move PanicLinkInfo and createErrorFooter to own file 2024-07-04 13:39:06 +02:00
Nathan Adams ff3d8744f0 web: Use tsx in ruffle-core, convert context menu to use tsx as proof of concept 2024-07-04 13:39:06 +02:00
Nathan Adams 01903f6aee web: Use 'foo as X' instead of '<X>foo' 2024-07-04 13:39:06 +02:00
TÖRÖK Attila 4dd77f903e desktop: Update `egui` to `v0.28.0` 2024-07-04 11:32:48 +02:00
Nathan Adams 02ba384245 ci: Make the crowdin PR with the rufflebuild user 2024-07-03 23:57:16 +02:00
Aaron Hill c65033aa37 avm2: Ignore errors when setting properties in amf deserializer
Flash Player *traces* any errors that occur during setting properties
on the newly-constructed object durting AMf deserialization, and
continues deserializing.
2024-07-03 17:42:02 -04:00
Crowdin Bot e9ec441ef7 chore: Update translations from Crowdin 2024-07-03 23:13:58 +02:00
Kamil Jarosz 5aaff966aa text: Render caret using lines
This patch makes the caret be drawn using lines.
This ensures that the width of the caret is always 1px.

Additionally, it improves caret positioning, so that it's closer to FP.
2024-07-03 15:09:31 +02:00
Daniel Jacobs 772518d25a extension: Switch to declarativeNetRequestWithHostAccess 2024-07-03 13:35:59 +02:00
Daniel Jacobs a6e1bb2f57 actions: Update KSXGitHub/github-actions-deploy-aur 2024-07-03 09:43:48 +02:00
Dave Nicolson 803a8c427a
docs: Make underlines between sponsor icons disappear in README.md 2024-07-02 21:58:34 +00:00
Crowdin Bot ac6f78f8a8 chore: Update translations from Crowdin 2024-07-02 23:56:16 +02:00
Kamil Jarosz 03518e5d9b tests: Add FIXME to text/auto_size/return
This test produces vastly different results compared to FP.
2024-07-02 23:40:50 +02:00
Kamil Jarosz bfbb6c6f83 tests: Add visual/edittext/edittext_border_transform test 2024-07-02 23:40:50 +02:00
Kamil Jarosz 5ed2dc1880 tests: Add visual/edittext/edittext_background_basic_scale2 test
This test verifies the basic rendering of text field's backgrounds
at zoom 200%.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 289b5a72e6 tests: Add visual/edittext/edittext_background_basic test
This test verifies the basic rendering of text field's backgrounds.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 111e081906 tests: Add visual/edittext/edittext_border_filters test
This test checks whether text fields with filters are rendered correctly.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 465e7b4f42 tests: Add visual/edittext/edittext_border_basic_scale2 test
This test checks whether text field borders are rendered properly
at zoom 200%.
2024-07-02 23:40:50 +02:00
Kamil Jarosz ec22df0407 tests: Add visual/edittext/edittext_border_basic test
This test checks whether text field borders are rendered properly.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 59c0bcf073 core: Improve EditText's border and background rendering
This patch removes the drawing used for rendering the border and
the background and renders them using primitives instead.

It provides two methods for drawing the border and the background:
* draw_device_text_box -- when device fonts are used,
* draw_text_box -- when fonts are embedded.

Updated expected images in tests as they are closer to FP now:
* text/auto_size/height,
* text/auto_size/return,
* text/auto_size/width,
* visual/shumway_acid_tests/acid_color_0.

For the test avm2/stage3d_texture it's hard to say whether the current
output is closer to FP or not, as FP renders it with a different scale.
However, I have confirmed that there exists a scale at which FP renders
the text fields exactly as Ruffle after this patch.
2024-07-02 23:40:50 +02:00
Kamil Jarosz d86d69f791 render: Implement drawing lines using canvas
This patch provides an efficient implementation of draw_line
and draw_line_rect for canvas using strokes.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 2ba5e47b59 render: Implement drawing lines using WebGL
This patch provides an efficient implementation of draw_line
and draw_line_rect for WebGL using Gl::LINE_STRIP.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 9ba6569a2e render: Implement drawing lines using wgpu
This patch provides an efficient implementation of draw_line
and draw_line_rect for wgpu using PrimitiveTopology::LineStrip.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 7dd4d2006e render: Add primitives for drawing lines
This patch adds draw_line and draw_line_rect methods to CommandHandler,
providing empty impls to be overridden by corresponding backends.

The ability to draw lines is described using a new bitflags struct
RenderBackendFeatures, which contains a set of features
supported by the given render backend.
Currently, it contains a DRAW_LINES flag, which informs whether
the backend supports drawing lines as primitives.
2024-07-02 23:40:50 +02:00
Kamil Jarosz cff1b14409 render: Emulate drawing lines using quads 2024-07-02 23:40:50 +02:00
Kamil Jarosz 23931ed863 render: Refactor chunk_blends to use CommandHandler
This refactor simplifies code, gets rid of the large number of
parameters, and allows calling other rendering methods from themselves.
The latter is useful for emulating lines on Dx12.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 23f01e0dd9 render: Add Matrix::create_box_with_rotation
This patch splits the current method of create_box into
1. create_box -- without rotation, and
2. create_box_with_rotation -- with rotation.

The reason for that refactor is that create_box was often used without
rotation, and always passing 0.0 as rotation and having
a dedicated condition for 0.0 was superfluous.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 78b2d84fa7 swf: Add ColorTransform::multiply_from
This method is used to instantiate ColorTransform with its
multiplicative component equal to the given color.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 2d6eefd622 swf: Add rounding methods to Twips 2024-07-02 23:40:50 +02:00
Kamil Jarosz 4302fe2e70 swf: Add Twips::HALF
Twips::HALF represents 10 twips, i.e. 0.5 pixels.
This constant is useful when calculating exact positions of lines
to be drawn, as they are often drawn on whole pixels.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 28b86490cc render: Draw quads using Gl::TRIANGLE_FAN for WebGL
This patch changes the mode of drawing quads to Gl::TRIANGLE_FAN.
This makes the buffers smaller, as we need only 4 vertices instead of 6,
and allows them to be reused for rendering lines.
2024-07-02 23:40:50 +02:00
Kamil Jarosz 07df84a486 render: Add WebGlRenderBackend::draw_quad
Moving draw_rect to draw_quad prevents code duplication when
methods related to drawing lines are added.
2024-07-02 23:40:50 +02:00
Marco Bartoli fe08638d26
Implement ImportAssets/ImportAssets2 (#16420) 2024-07-02 11:41:48 +00:00
Aaron Hill 617cb3330d avm2: Ignore ClassObject call receiver
This allows a class to be used with `callproplex`
2024-07-02 07:18:22 -04:00
Lord-McSweeney 0c4080386d tests: Add test for reusing Loader 2024-07-02 06:58:37 +03:00
Lord-McSweeney 83d0316ac3 avm2: Add stub notices for reusing Loader 2024-07-02 06:58:37 +03:00
Lord-McSweeney d2e3de4cc4 avm2: Unload the contents of a Loader before `load` and `loadBytes` 2024-07-02 06:58:37 +03:00
Aaron Hill ebab349458 avm2: Stub Stage.mouseLock 2024-07-01 23:13:02 -04:00
Crowdin Bot 2093d950e5 chore: Update translations from Crowdin 2024-07-02 01:21:48 +02:00
dependabot[bot] 28aa2e65a9 build(deps): bump the cargo-minor group across 1 directory with 7 updates
Bumps the cargo-minor group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.7` | `4.5.8` |
| [bitflags](https://github.com/bitflags/bitflags) | `2.5.0` | `2.6.0` |
| [log](https://github.com/rust-lang/log) | `0.4.21` | `0.4.22` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.117` | `1.0.120` |
| [num-bigint](https://github.com/rust-num/num-bigint) | `0.4.5` | `0.4.6` |
| [id3](https://github.com/polyfloyd/rust-id3) | `1.13.1` | `1.14.0` |
| [either](https://github.com/rayon-rs/either) | `1.12.0` | `1.13.0` |



Updates `clap` from 4.5.7 to 4.5.8
- [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.7...v4.5.8)

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

Updates `log` from 0.4.21 to 0.4.22
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.21...0.4.22)

Updates `serde_json` from 1.0.117 to 1.0.120
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.117...v1.0.120)

Updates `num-bigint` from 0.4.5 to 0.4.6
- [Changelog](https://github.com/rust-num/num-bigint/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-bigint/compare/num-bigint-0.4.5...num-bigint-0.4.6)

Updates `id3` from 1.13.1 to 1.14.0
- [Changelog](https://github.com/polyfloyd/rust-id3/blob/main/CHANGELOG.md)
- [Commits](https://github.com/polyfloyd/rust-id3/compare/v1.13.1...v1.14.0)

Updates `either` from 1.12.0 to 1.13.0
- [Commits](https://github.com/rayon-rs/either/compare/1.12.0...1.13.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: log
  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: num-bigint
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: id3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: either
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 01:04:52 +02:00
dependabot[bot] 353fa41a7f build(deps): bump the npm-minor group in /web with 10 updates
Bumps the npm-minor group in /web with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `7.14.1` | `7.15.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.14.1` | `7.15.0` |
| [mocha](https://github.com/mochajs/mocha) | `10.5.0` | `10.5.2` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.5.2` | `5.5.3` |
| [tsx](https://github.com/privatenumber/tsx) | `4.15.7` | `4.16.0` |
| [chromedriver](https://github.com/giggio/node-chromedriver) | `126.0.3` | `126.0.4` |
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | `48.4.0` | `48.5.0` |
| [replace-in-file](https://github.com/adamreisnz/replace-in-file) | `8.0.0` | `8.0.1` |
| [typedoc](https://github.com/TypeStrong/TypeDoc) | `0.26.2` | `0.26.3` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.3.1` | `5.3.2` |


Updates `@typescript-eslint/eslint-plugin` from 7.14.1 to 7.15.0
- [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.15.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 7.14.1 to 7.15.0
- [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.15.0/packages/parser)

Updates `mocha` from 10.5.0 to 10.5.2
- [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.5.0...v10.5.2)

Updates `typescript` from 5.5.2 to 5.5.3
- [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.5.2...v5.5.3)

Updates `tsx` from 4.15.7 to 4.16.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.15.7...v4.16.0)

Updates `chromedriver` from 126.0.3 to 126.0.4
- [Commits](https://github.com/giggio/node-chromedriver/compare/126.0.3...126.0.4)

Updates `eslint-plugin-jsdoc` from 48.4.0 to 48.5.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.4.0...v48.5.0)

Updates `replace-in-file` from 8.0.0 to 8.0.1
- [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)

Updates `typedoc` from 0.26.2 to 0.26.3
- [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.26.2...v0.26.3)

Updates `vite` from 5.3.1 to 5.3.2
- [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.2/packages/vite)

---
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-patch
  dependency-group: npm-minor
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: tsx
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
- dependency-name: chromedriver
  dependency-type: direct:production
  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: replace-in-file
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: typedoc
  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-patch
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 22:46:01 +02:00
Lord-McSweeney 67c9936bf4 avm2: Use proper coercion in XMLList prototype methods 2024-07-01 18:40:47 +02:00
Crowdin Bot 4b849cd52a chore: Update translations from Crowdin 2024-07-01 01:17:52 +02:00