Commit Graph

12580 Commits

Author SHA1 Message Date
Daniel Jacobs befe226f4a web: Fix issue with error checking in panic function 2024-07-17 13:49:37 +02:00
Daniel Jacobs f9312e6cd8 web: On pages with restrictive CSP show open in new tab option for SWF 2024-07-17 13:49:37 +02:00
Nathan Adams 259b95c178 web: Move some internal files to internal/ 2024-07-17 13:00:01 +02:00
Nathan Adams e613fb73dd web: Use eslint2021 as target, all our min browser versions support this 2024-07-17 13:00:01 +02:00
Lord-McSweeney bb49deecf8 avm2: Add test for unreachable exception 2024-07-16 23:03:30 +03:00
Lord-McSweeney d9ce8ef9ca avm2: Only look at valid Exceptions in verifier 2024-07-16 23:03:30 +03:00
Lord-McSweeney c0565d81e6 core: Log an error when a URLLoader load fails 2024-07-16 12:24:40 +02:00
Kamil Jarosz 53328c72f8 tests: Fix avm2/eventdispatcher_dispatchevent_cancel
This test was verifying cancellation using non-cancellable events.
2024-07-16 10:53:42 +03:00
Kamil Jarosz b8fe2b5cba avm2: Fix EventDispatcher.dispatchEvent return value
This fixes a regression introduced in 250bf64.
2024-07-16 10:53:42 +03:00
Aaron Hill 6e93927f63 web: Check for locked 'Player' mutex and reschedule with setTimeout
We use 'wasm-bindgen-futures' as our futures executor on web, which
in turn uses 'queueMicroTask'. This can result in the browser executing
one of our futures while we're still inside our `requestAnimationFrame`
callback (in particular, while we still have the `Player` mutex locked).

We now detect this condition by attempting the lock the Player mutex
inside of our `spawn_local` future. If this fails, we `await`
a `setTimeout`-based promise, which ensures that our code runs in
a new top-level `setTimeout` javascript 'task' (outside of our
`requestAnimationFrame` callback).
2024-07-15 22:46:22 +02:00
Adrian Wielgosik c9fedb2cf6 avm2: Add a fast path in coerce_s 2024-07-15 22:30:46 +02:00
Adrian Wielgosik 131b2c21f4 avm2: Use small string cache when stringifying ints < 10 2024-07-15 22:30:46 +02:00
Kamil Jarosz c62bd1cfe3 tests: Add mouse_double_click_events test 2024-07-15 21:51:18 +02:00
Kamil Jarosz 1c3128c8e1 avm2: Use click index for double click detection 2024-07-15 21:51:18 +02:00
Kamil Jarosz 0b64bc681a core: Add click index to ClipEvent::Release 2024-07-15 21:51:18 +02:00
Kamil Jarosz 6fa2f41eee tests: Add avm2/mouse_wheel_events test 2024-07-15 21:36:37 +02:00
Kamil Jarosz 4ec36d5b3a avm2: Dispatch mouseWheel event on mouse wheel 2024-07-15 21:36:37 +02:00
Kamil Jarosz 582f5dbf12 tests: Add tab_ordering_arrows test
This test verifies the behavior of keyboard navigation with arrows.
2024-07-15 21:19:21 +02:00
Kamil Jarosz 922e281395 core: Implement keyboard navigation
This patch implements keyboard navigation, i.e. changing focus using
arrows when an object is highlighted.
2024-07-15 21:19:21 +02:00
Kamil Jarosz fdf28ccc6e core: Refactor tab ordering code 2024-07-15 21:19:21 +02:00
TÖRÖK Attila af6dc9742d web/tools: Deduplicate an expression, fixing a formatting lint 2024-07-15 14:30:20 +02:00
dependabot[bot] f47fa38235 build(deps-dev): bump the npm-minor group in /web with 9 updates
Bumps the npm-minor group in /web with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.6.0` | `9.7.0` |
| [eslint](https://github.com/eslint/eslint) | `9.6.0` | `9.7.0` |
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | `48.5.2` | `48.7.0` |
| [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) | `0.4.7` | `0.4.8` |
| [prettier](https://github.com/prettier/prettier) | `3.3.2` | `3.3.3` |
| [stylelint](https://github.com/stylelint/stylelint) | `16.6.1` | `16.7.0` |
| [stylelint-prettier](https://github.com/prettier/stylelint-prettier) | `5.0.0` | `5.0.1` |
| [webpack](https://github.com/webpack/webpack) | `5.92.1` | `5.93.0` |
| [typedoc](https://github.com/TypeStrong/TypeDoc) | `0.26.3` | `0.26.4` |


Updates `@eslint/js` from 9.6.0 to 9.7.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.7.0/packages/js)

Updates `eslint` from 9.6.0 to 9.7.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.6.0...v9.7.0)

Updates `eslint-plugin-jsdoc` from 48.5.2 to 48.7.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.5.2...v48.7.0)

Updates `eslint-plugin-react-refresh` from 0.4.7 to 0.4.8
- [Release notes](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/releases)
- [Changelog](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.4.7...v0.4.8)

Updates `prettier` from 3.3.2 to 3.3.3
- [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.2...3.3.3)

Updates `stylelint` from 16.6.1 to 16.7.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.6.1...16.7.0)

Updates `stylelint-prettier` from 5.0.0 to 5.0.1
- [Changelog](https://github.com/prettier/stylelint-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/stylelint-prettier/compare/v5.0.0...v5.0.1)

Updates `webpack` from 5.92.1 to 5.93.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.92.1...v5.93.0)

Updates `typedoc` from 0.26.3 to 0.26.4
- [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.3...v0.26.4)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
- dependency-name: eslint
  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-minor
  dependency-group: npm-minor
- dependency-name: eslint-plugin-react-refresh
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
- dependency-name: stylelint-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: typedoc
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 14:30:20 +02:00
dependabot[bot] f887e96c70 build(deps): bump vergen from 8.3.1 to 8.3.2
Bumps [vergen](https://github.com/rustyhorde/vergen) from 8.3.1 to 8.3.2.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/commits)

---
updated-dependencies:
- dependency-name: vergen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 13:45:46 +02:00
dependabot[bot] 51e868d8ac build(deps): bump the cargo-minor group with 3 updates
Bumps the cargo-minor group with 3 updates: [clap](https://github.com/clap-rs/clap), [thiserror](https://github.com/dtolnay/thiserror) and [syn](https://github.com/dtolnay/syn).


Updates `clap` from 4.5.8 to 4.5.9
- [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.8...v4.5.9)

Updates `thiserror` from 1.0.61 to 1.0.62
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.61...1.0.62)

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

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: thiserror
  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
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 13:26:34 +02:00
dependabot[bot] a1539624bf build(deps-dev): bump typescript-eslint in /web
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.0.0-alpha.41 to 8.0.0-alpha.44.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/HEAD/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 12:59:58 +02:00
Lord-McSweeney bed5a2fd86 avm2: Add several AIR classes and version-gate `ImageDecodingPolicy` to SWF13+
`NativeProcess`, `NativeProcessStartupInfo`, and `File` classes
2024-07-14 23:25:57 +02:00
Lord-McSweeney 2a38a2caf2 avm2: Fix the globals ordering a little 2024-07-14 23:25:57 +02:00
Kamil Jarosz 5d42a78c47 desktop: Ignore input when the context menu is open
This matches FP's behavior: both keyboard and mouse input should be ignored.
2024-07-14 18:29:57 +02:00
Nathan Adams 10c52ce706 ci: Run browser tests in chrome/firefox/edge on CI 2024-07-14 18:04:14 +02:00
Nathan Adams 35fb095aa2 web: Add --browserstack for testing in the cloud 2024-07-14 18:04:14 +02:00
Nathan Adams e749a6436e web: Remove broken cors test, it hasn't run for years + technically fails if the whole thing is skipped, apparently 2024-07-14 18:04:14 +02:00
Nathan Adams 160460ef51 web: Replace switchToParentFrame with switchToFrame(null) for ios compatibility 2024-07-14 18:04:14 +02:00
Nathan Adams d037e5fa2a web: Add Edge testing, disable autoplay as edge autoplays and that messes up test order of operations slightly 2024-07-14 18:04:14 +02:00
Nathan Adams ed66cf036c web: Add firefox testing, + a fix for ExternalConnection on Firefox when called from the test harness
Turns out that an object isn't 'instanceof Object' in Firefox, if it was made from another window/process/tab/whatever. In this case, that meant that Ruffle always thought it was null because wasm-bindgen relies on 'instanceof Object'
2024-07-14 18:04:14 +02:00
Nathan Adams 504ac87e8d web: Start splitting up wdio config to enable different browsers or environments 2024-07-14 18:04:14 +02:00
Nathan Adams 0eaffcc785 web: Clean up wdio config; remove unused stuff, add typing 2024-07-14 18:04:14 +02:00
Lord-McSweeney ceebf2bf64 avm2: Add `flash.net::NetGroup` class 2024-07-14 17:28:27 +03:00
Adrian Wielgosik 48db0e23c4 core: Fix panic on unsetting self-referential masker 2024-07-12 22:35:07 +02:00
Adrian Wielgosik 261ba7374e avm2: Correct setting builtins' types on classes 2024-07-12 21:56:37 +02:00
Kamil Jarosz 92a16b5095 tests: Remove an obsolete comment from edittext_html_swf8 2024-07-12 16:30:21 +02:00
Kamil Jarosz 6685c987ac web: Do not show context menu when right click event is consumed 2024-07-12 15:41:08 +02:00
Kamil Jarosz 0c9f461227 desktop: Dispatch mouse up event on context menu close 2024-07-12 15:41:08 +02:00
Kamil Jarosz 732a31170e desktop: Do not show context menu when right click event is consumed 2024-07-12 15:41:08 +02:00
Kamil Jarosz 77d89bbf42 tests: Add avm2/mouse_click_events test 2024-07-12 15:41:08 +02:00
Kamil Jarosz cb958fd2c3 tests: Add possibility to assert on whether the event has been handled 2024-07-12 15:41:08 +02:00
Kamil Jarosz bd98f72b96 core: Return from handle_event() whether the event has been handled 2024-07-12 15:41:08 +02:00
Kamil Jarosz 7621553a34 avm2: Properly detect whether the event has been handled in event_dispatch_to_avm2 2024-07-12 15:41:08 +02:00
Kamil Jarosz 250bf64a92 avm2: Return whether the event has been handled from dispatch_event
Before that, dispatch_event returned whether the event has been
canceled, but the value has never been used.
It's possible to check whether the event has been canceled
by invoking is_cancelled() on the event.
2024-07-12 15:41:08 +02:00
Kamil Jarosz 57e90d947b avm2: Fire right & middle click events 2024-07-12 15:41:08 +02:00
Kamil Jarosz c7f1f33843 avm2: Add more specific mouse event constructors 2024-07-12 15:41:08 +02:00