Commit Graph

7314 Commits

Author SHA1 Message Date
dependabot[bot] b9d246b2a5 build(deps): bump the cargo-minor group with 4 updates
Bumps the cargo-minor group with 4 updates: [proc-macro2](https://github.com/dtolnay/proc-macro2), [toml_edit](https://github.com/toml-rs/toml), [zip](https://github.com/zip-rs/zip2) and [toml](https://github.com/toml-rs/toml).


Updates `proc-macro2` from 1.0.84 to 1.0.85
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.84...1.0.85)

Updates `toml_edit` from 0.22.13 to 0.22.14
- [Commits](https://github.com/toml-rs/toml/compare/v0.22.13...v0.22.14)

Updates `zip` from 2.1.1 to 2.1.2
- [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.1...v2.1.2)

Updates `toml` from 0.8.13 to 0.8.14
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.13...toml-v0.8.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-03 23:21:12 +02:00
Adrian Wielgosik 224edfe06f core: Unify WStr::MAX_LEN range checks 2024-06-02 23:00:23 +02:00
Adrian Wielgosik 6a75def83a avm2: Fix panic on substr(i, len>usize::MAX) 2024-06-02 23:00:23 +02:00
sleepycatcoding 83cc8cf294 avm2: Implement a few avmplus XML edge cases 2024-06-02 01:52:52 +03:00
Tom Schuster 1402a59a20 avm2: :Implement FLV Date to Avm2Value conversion 2024-06-02 00:35:36 +02:00
Tom Schuster cdbc6d289c avm2: Implement the abstract equality comparison for QName 2024-06-01 20:52:17 +02:00
dependabot[bot] febbfe8f42 build(deps): bump the cargo-minor group with 4 updates
Bumps the cargo-minor group with 4 updates: [tokio](https://github.com/tokio-rs/tokio), [regress](https://github.com/ridiculousfish/regress), [fontdb](https://github.com/RazrFalcon/fontdb) and [zip](https://github.com/zip-rs/zip2).


Updates `tokio` from 1.37.0 to 1.38.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0)

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

Updates `fontdb` from 0.17.0 to 0.18.0
- [Changelog](https://github.com/RazrFalcon/fontdb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/fontdb/compare/v0.17.0...v0.18.0)

Updates `zip` from 2.1.0 to 2.1.1
- [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.0...v2.1.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: regress
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: fontdb
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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-01 17:46:28 +02:00
Nathan Adams 618e061564 core: Expand on audio related error messages 2024-06-01 14:08:54 +02:00
Kamil Jarosz f4a517dbd1 text: Invalidate bitmap cache on scroll
This patch fixes scrolling text fields when filters are applied.
2024-05-31 22:24:34 +02:00
sleepycatcoding 2fd5dfde9c avm2: Implement XMLList.normalize 2024-05-31 22:09:17 +02:00
Tom Schuster d98e3d9b99 avm2: Parse XML namespace declaration and make ToXMLString output them
This does not implement any of the XML API functions that interact with
namespaces.

Fixes #16340
2024-05-30 21:14:06 +02:00
TÖRÖK Attila b282d1325a core: Pass on H.264 packets from FLV streams to the video backend 2024-05-30 20:22:33 +02:00
sleepycatcoding 007a532717 avm2: Implement XMLList.contains 2024-05-30 00:43:45 +03:00
Tom Schuster 1fe1b8d67d avm2: Introduce an E4XNamespace type (NFCI) 2024-05-29 22:37:40 +02:00
Kamil Jarosz c32b27c294 core: Fix stop() when executing attachMovie in DoInitAction
This fixes a bug where the code in the first frame of a movie clip
could have been executed after the second frame
(so that instructions like stop did not work properly).

That is because when the first frame was executed in preload
(e.g. for a sprite attached using attachMovie), the actions were queued,
the second frame was executed in run_frame, and then the actions from
the first frame were executed.

Ensuring that all actions are executed after preload fixes this issue.
2024-05-28 23:57:13 +02:00
Adrian Wielgosik 2532d7e927 avm2: Refactor Executable->BoundMethod, introduce freestanding exec() 2024-05-28 23:32:21 +02:00
Kamil Jarosz 3bb47db5f9 avm1: Move FunctionObject's base to FunctionObjectData
This shrinks AVM1's Object (from 24 to 16 bytes on x64), and
allows future shrinkage of AVM1's Value (e.g. from 24 to 16 bytes
on x64 after putting all strings behind a Gc pointer).
2024-05-28 23:18:11 +02:00
Kamil Jarosz 658e800dfc core: Drop the focus when it's made invisible
When an object has focus and is made invisible,
the focus should be dropped.
2024-05-28 23:01:12 +02:00
Kamil Jarosz 23c1d32990 core: Pass UpdateContext to set_visible 2024-05-28 23:01:12 +02:00
dependabot[bot] a6a683ffa1 build(deps): bump the cargo-minor group with 2 updates
Bumps the cargo-minor group with 2 updates: [serde](https://github.com/serde-rs/serde) and [proc-macro2](https://github.com/dtolnay/proc-macro2).


Updates `serde` from 1.0.202 to 1.0.203
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203)

Updates `proc-macro2` from 1.0.83 to 1.0.84
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.83...1.0.84)

---
updated-dependencies:
- dependency-name: serde
  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
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 00:48:13 +02:00
sleepycatcoding cd24b91a82 avm2: Implement XMLList to XML proxy methods 2024-05-27 21:47:22 +02:00
sleepycatcoding ab0792904b avm2: Stub XML.add/set/removeNamespace 2024-05-27 21:47:22 +02:00
Nathan Adams 381b0897c9 avm2: Implement ExternalInterface.objectID 2024-05-26 23:00:33 +02:00
Kamil Jarosz 1bf9756b4e text: Allow selecting text by dragging
This patch allows selecting text by pressing and dragging the mouse.
2024-05-26 12:38:16 +02:00
Adrian Wielgosik bafc5d250e tests: Add a depdendent string test, with test-only AS3 2024-05-26 12:14:30 +02:00
Adrian Wielgosik d6dbc5e767 core: Support dependent strings for concatenation 2024-05-26 12:14:30 +02:00
dependabot[bot] f712c9212c build(deps): bump syn from 2.0.65 to 2.0.66 in the cargo-minor group
Bumps the cargo-minor group with 1 update: [syn](https://github.com/dtolnay/syn).


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

---
updated-dependencies:
- 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-05-25 17:35:23 +02:00
Aaron Hill f8e97808e4 core: Store MovieClip avm2_class in MovieClipStatic
This is preparation for allowing a class to be linked
to the root movie clip and instantiated.
2024-05-25 10:14:44 -04:00
Kamil Jarosz 0edb7d6890 core: KeyPress events have precedence over tabbing
When there's a button that handles KeyPress "Tab" event (code 18),
the tabbing should not be performed.
2024-05-25 01:12:43 +02:00
Kamil Jarosz 277390aab4 core: Render EditText's selection when filters are present
This patch ensures that the selection in EditText is rendered even when
filters are present (so that cache as bitmap is enabled).
This is done by invalidating the cached bitmap on selection change.
2024-05-24 23:52:03 +02:00
Kamil Jarosz 8ac7a58d4e debug_ui: Improve EditText tab
This patch adds multiple properties and controls to EditText tab.
This includes for instance:
* border, border color,
* background, background color,
* editable, selectable, word wrap properties,
* autosize, max chars, restrict, etc.
2024-05-24 09:07:21 -04:00
Kamil Jarosz 6c67e7485e core: Invalidate EditText's bitmap when border is disabled
This patch makes sure that the bitmap is invalidated not only when
a border or background was enabled, but also when both were disabled
and the drawing has only been cleared.
2024-05-24 09:07:21 -04:00
sleepycatcoding 671be1a810 avm2: Fix a few XML prototype method signatures 2024-05-21 23:51:35 +02:00
Tom Schuster 3949110f6b avm2: request_from_url_request should fail when the url property is null 2024-05-21 20:45:20 +02:00
Tom Schuster f54e3fdbd0 avm2: Introduce the make_error_2007 helper 2024-05-21 20:45:20 +02:00
sleepycatcoding a5c3474bbc avm2: Implement Namespace enumeration 2024-05-21 20:26:35 +02:00
Nathan Adams b9947a2d1c avm2: Add more Namespace tests and fixed some other cases 2024-05-21 19:57:39 +02:00
Nathan Adams 3692cbbb2e avm2: Implement Namespace constructor and prefix 2024-05-21 19:57:39 +02:00
TÖRÖK Attila 2dec49941a chore: Refer to a specific git hash of jpegxr instead of a branch 2024-05-21 18:38:29 +02:00
dependabot[bot] c0b0b8257f
build(deps): bump the cargo-minor group with 6 updates
----
updated-dependencies:
- dependency-name: anyhow
  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
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: crossbeam-channel
  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-minor
  dependency-group: cargo-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:56:02 +00:00
Aaron Hill f301b23f6e core: Treat NaN rotation as 0.0 when setting scaleX/scaleY
The `rotation` value is still reported to ActionScript as `NaN`,
but we treat it as 0.0 when computing the new matrix in the
scaleX/scaleY setters.
2024-05-19 09:52:07 -07:00
Lord-McSweeney 78e9426ba9 avm2: Add some comments for clarification 2024-05-18 17:01:49 -07:00
Lord-McSweeney c93873a7a2 avm2: Add a note on the `FindProp(Strict)` to `GetScriptGlobals` optimization 2024-05-18 17:01:49 -07:00
Lord-McSweeney a88d9dc07b avm2: Simple scoping is not required to optimize GetGlobalScope and GetGlobalSlot 2024-05-18 17:01:49 -07:00
Lord-McSweeney 267e3693ca Appease clippy 2024-05-18 17:01:49 -07:00
Lord-McSweeney 3fb549f1b5 avm2: Handle lazy multiname in findprop optimization 2024-05-18 17:01:49 -07:00
Lord-McSweeney eb27151af7 avm2: Don't call global init in optimizer 2024-05-18 17:01:49 -07:00
Lord-McSweeney 12174b5219 avm2: Propagate types from getslot, getglobalscope, and getglobalslot in optimizer 2024-05-18 17:01:49 -07:00
Lord-McSweeney 92de618261 avm2: Fix some very minor bugs with findprop optimization 2024-05-18 17:01:49 -07:00
Lord-McSweeney 796dda1ae0 avm2: Remove `fork_vtable` hack 2024-05-18 17:01:49 -07:00
Lord-McSweeney 767b7b4e44 avm2: Optimize findproperty and findpropstrict to getouterscope, getscopeobject, and getscriptglobals when possible 2024-05-18 17:01:49 -07:00
Lord-McSweeney f50b68abfd avm2: Split `GetLex` into `FindPropStrict` and `GetProperty` 2024-05-18 17:01:49 -07:00
Colin f573f7b141 avm1: Make clip have correct properties when the target of loadClip 2024-05-17 23:07:44 +02:00
dependabot[bot] 5fbf39fd7a 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 |
| --- | --- | --- |
| [async-channel](https://github.com/smol-rs/async-channel) | `2.3.0` | `2.3.1` |
| [serde](https://github.com/serde-rs/serde) | `1.0.201` | `1.0.202` |
| [either](https://github.com/rayon-rs/either) | `1.11.0` | `1.12.0` |
| [syn](https://github.com/dtolnay/syn) | `2.0.63` | `2.0.64` |
| [toml_edit](https://github.com/toml-rs/toml) | `0.22.12` | `0.22.13` |
| [insta](https://github.com/mitsuhiko/insta) | `1.38.0` | `1.39.0` |
| [toml](https://github.com/toml-rs/toml) | `0.8.12` | `0.8.13` |



Updates `async-channel` from 2.3.0 to 2.3.1
- [Release notes](https://github.com/smol-rs/async-channel/releases)
- [Changelog](https://github.com/smol-rs/async-channel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/async-channel/compare/v2.3.0...v2.3.1)

Updates `serde` from 1.0.201 to 1.0.202
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.201...v1.0.202)

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

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

Updates `toml_edit` from 0.22.12 to 0.22.13
- [Commits](https://github.com/toml-rs/toml/compare/v0.22.12...v0.22.13)

Updates `insta` from 1.38.0 to 1.39.0
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.38.0...1.39.0)

Updates `toml` from 0.8.12 to 0.8.13
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.12...toml-v0.8.13)

---
updated-dependencies:
- dependency-name: async-channel
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: either
  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
- dependency-name: toml_edit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-17 01:41:44 +02:00
Nathan Adams b25fe69bac avm1: Implement StyleSheet.load 2024-05-17 00:37:39 +02:00
Nathan Adams c1e197189d avm1: Implement most of StyleSheet 2024-05-17 00:37:39 +02:00
TÖRÖK Attila 331d1789da render,core,desktop: Port to `wgpu` `v0.20.0`, switch to `egui` `master` 2024-05-17 01:19:01 +03:00
Nathan Adams b8c1263f9e avm1: Expose NativeObjects through SuperObject - fixes g2conline 2024-05-17 00:02:45 +02:00
Nathan Adams dfd9a26a7b avm1: Implement NetConnection, more or less 2024-05-17 00:02:45 +02:00
Kamil Jarosz aeabe3cbb5 core: Implement proper automatic tab ordering
This patch implements proper automatic tab ordering that
behaves exactly the same as in FP.

The automatic order depends only on the position of
the top-left highlight bound corner, referred to as `(x,y)`.
It does not depend on object's size or other corners.

The value of `6y+x` is used to order objects by it.
This means that the next object to be tabbed is the next one
that touches the line `y=-(x-p)/6` (with the smallest `p`).

When two objects have the same value of `6y+x`
(i.e. when the line touches two objects at the same time),
only one of them is included.

This behavior is similar to the naive approach of
"left-to-right, top-to-bottom", but (besides being sometimes
seen as random jumps) takes into account the fact that
the next object to the right may be positioned slightly higher.
This is especially true for objects placed by hand or objects with
different heights (as FP uses the top left corner instead of the center).

This behavior has been discovered experimentally by placing
tabbable objects randomly and bisecting one of their
coordinates to find a difference in behavior.
2024-05-16 21:40:56 +02:00
sleepycatcoding be8cbd64d6 core/render/web: Make FromStr exclusively for snake_case 2024-05-16 01:14:42 +03:00
Nathan Adams 519de0e230 avm1: Implement __resolve 2024-05-15 22:45:56 +02:00
Aaron Hill 932f2d410b debug_ui: Render bitmap in new 'Bitmap' display object tab
This lets us view a bitmap directly from the debug ui.
We cache an egui texture handle on the `BitmapData` itself,
and invalidate it whenever the BitmapData gets changed.
2024-05-15 15:19:52 -04:00
Aaron Hill 4d2b2893ae avm2: Prevent loader mouse pick from targeting direct child
Loaders have a similar behavior to the main stage - if a mouse pick
would target their direct child (the root movieclip in the stage case,
and the loaded MovieClip in the Loader case), the Stage/Loader is
targeted instead.
2024-05-15 13:41:17 -04:00
Aaron Hill 60000d6930 avm2: Skip mouse pick for all mask children
We were previosuly only checking 'clip_depth', but we should
also check 'maskee()'
2024-05-15 12:30:51 -04:00
Nathan Adams b5948a883a avm2: Simplify string comparison in stylesheet a bit 2024-05-14 21:03:37 +02:00
Nathan Adams 4691d0c798 avm2: Call transform from StyleSheet.setStyle() 2024-05-14 21:03:37 +02:00
Nathan Adams 7309e457d5 avm2: Transform css properties from with-dashes to snakeCase 2024-05-14 21:03:37 +02:00
Nathan Adams 24b01b8f89 avm2: Implement StyleSheet.transform() 2024-05-14 21:03:37 +02:00
Nathan Adams 7e1bc84bdf avm2: Implement most of StyleSheet 2024-05-14 21:03:37 +02:00
Kamil Jarosz 8eb8673122 core: Update a comment related to custom tab ordering
Turns out the existing implementation was right.
2024-05-14 18:33:46 +02:00
Kamil Jarosz 5dcb87c727 debug_ui: Add stage focus rect 2024-05-13 20:48:48 +02:00
Kamil Jarosz f713c90cca core: Add possibility to set tab_enabled in AVM1
This makes it possible to set it from the debug UI.
2024-05-13 20:48:48 +02:00
Kamil Jarosz 0c3ab81671 debug_ui: Fix a positioning issue in Stage tab 2024-05-13 20:48:48 +02:00
Kamil Jarosz a5b7933c26 debug_ui: Add a tab for interactive objects 2024-05-13 20:48:48 +02:00
Kamil Jarosz 4253525f8b core: Add InteractiveObject.tab_enabled_default
This patch removes two methods:
* `tab_enabled_avm1`, and
* `tab_enabled_avm2_default`,
and replaces them with `tab_enabled_default`.

This refactor makes the code more readable and simple.
2024-05-13 20:48:48 +02:00
dependabot[bot] 819abe8420 build(deps): bump the cargo-minor group with 14 updates
Bumps the cargo-minor group with 14 updates:

| Package | From | To |
| --- | --- | --- |
| [async-channel](https://github.com/smol-rs/async-channel) | `2.2.1` | `2.3.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.200` | `1.0.201` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.59` | `1.0.60` |
| [linkme](https://github.com/dtolnay/linkme) | `0.3.25` | `0.3.26` |
| [bitstream-io](https://github.com/tuffy/bitstream-io) | `2.2.0` | `2.3.0` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.116` | `1.0.117` |
| [ttf-parser](https://github.com/RazrFalcon/ttf-parser) | `0.20.0` | `0.21.1` |
| [num-bigint](https://github.com/rust-num/num-bigint) | `0.4.4` | `0.4.5` |
| [syn](https://github.com/dtolnay/syn) | `2.0.60` | `2.0.63` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.81` | `1.0.82` |
| [fontdb](https://github.com/RazrFalcon/fontdb) | `0.16.2` | `0.17.0` |
| [unic-langid](https://github.com/zbraniecki/unic-locale) | `0.9.4` | `0.9.5` |
| [zip](https://github.com/zip-rs/zip2) | `1.2.0` | `1.2.3` |
| [libtest-mimic](https://github.com/LukasKalbertodt/libtest-mimic) | `0.7.2` | `0.7.3` |


Updates `async-channel` from 2.2.1 to 2.3.0
- [Release notes](https://github.com/smol-rs/async-channel/releases)
- [Changelog](https://github.com/smol-rs/async-channel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/async-channel/compare/v2.2.1...v2.3.0)

Updates `serde` from 1.0.200 to 1.0.201
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.200...v1.0.201)

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

Updates `linkme` from 0.3.25 to 0.3.26
- [Release notes](https://github.com/dtolnay/linkme/releases)
- [Commits](https://github.com/dtolnay/linkme/compare/0.3.25...0.3.26)

Updates `bitstream-io` from 2.2.0 to 2.3.0
- [Commits](https://github.com/tuffy/bitstream-io/compare/v2.2.0...v2.3.0)

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

Updates `ttf-parser` from 0.20.0 to 0.21.1
- [Changelog](https://github.com/RazrFalcon/ttf-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/ttf-parser/compare/v0.20.0...v0.21.1)

Updates `num-bigint` from 0.4.4 to 0.4.5
- [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.4...num-bigint-0.4.5)

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

Updates `proc-macro2` from 1.0.81 to 1.0.82
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.81...1.0.82)

Updates `fontdb` from 0.16.2 to 0.17.0
- [Changelog](https://github.com/RazrFalcon/fontdb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/fontdb/compare/v0.16.2...v0.17.0)

Updates `unic-langid` from 0.9.4 to 0.9.5
- [Release notes](https://github.com/zbraniecki/unic-locale/releases)
- [Commits](https://github.com/zbraniecki/unic-locale/commits)

Updates `zip` from 1.2.0 to 1.2.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/v1.2.0...v1.2.3)

Updates `libtest-mimic` from 0.7.2 to 0.7.3
- [Release notes](https://github.com/LukasKalbertodt/libtest-mimic/releases)
- [Changelog](https://github.com/LukasKalbertodt/libtest-mimic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/LukasKalbertodt/libtest-mimic/compare/v0.7.2...v0.7.3)

---
updated-dependencies:
- dependency-name: async-channel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: serde
  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: linkme
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: bitstream-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: ttf-parser
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: num-bigint
  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: fontdb
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: unic-langid
  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
- dependency-name: libtest-mimic
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 15:49:29 +02:00
Jacob Greenfield 272c07ea3b
avm2: Implement `describeType(null)` stub (#16235) 2024-05-10 22:06:56 +00:00
Kamil Jarosz b1b7ccfbd2 avm1: Highlight buttons using their hit bounds
Buttons are always highlighted using their hit bounds.
I guess it does have some sense to it, because their bounds
usually change on hover (children are swapped out),
which would cause the automatic tab order to change during tabbing.
That could potentially create a loop in the tab ordering
(soft locking the tab).
2024-05-10 23:52:01 +02:00
Kamil Jarosz 1e5439ab68 core: Add InteractiveObject.highlight_bounds() method
This method returns the world bounds of
the focus highlight for the interactive object.
2024-05-10 23:52:01 +02:00
Kamil Jarosz da9c9527e5 core: Allow pressing buttons with keyboard
This patch allows the keyboard to be used (Enter/Space) to press buttons.
2024-05-10 22:42:03 +02:00
Kamil Jarosz 18d9035685 core: Fire button event handlers only when highlight is active
It seems that button event handlers not only require focus to be fired,
but also an active highlight.
2024-05-10 22:42:03 +02:00
Kamil Jarosz 97a454cc36 core: Refactor a common condition to should_fire_button_event_handlers
This condition is identical for buttons and movie clips.
2024-05-10 22:42:03 +02:00
Kamil Jarosz bfb7e57277 debug_ui: Improve highlight display, add re-focus button
Since highlight has 3 states now, it's better represented by
describing the state instead of having a checkbox.
A re-focus button has been added to compensate for the fact
that the highlight cannot be automatically enabled anymore.
2024-05-10 22:42:03 +02:00
Kamil Jarosz df714d35bd core: Differentiate between active and visible highlight
Some button events (e.g. KeyUp/KeyDown) seem to require a state when
the highlight is not visible, but is active (i.e. a focus is selected).
That is why this patch introduces a third possible state of
the highlight: ActiveHidden.
2024-05-10 22:42:03 +02:00
TÖRÖK Attila 11c1120364 core: Invalidate cached bitmap on every newly decoded video frame
Not just when seeking manually. And request rendering to be sure.
2024-05-10 09:56:47 +02:00
Lord-McSweeney 8eaede1c2c avm2: Try to speed up domain memory ops 2024-05-09 16:41:12 -07:00
Lord-McSweeney 8ab19054aa avm2: Create bad branch errors lazily in verifier 2024-05-09 16:41:12 -07:00
Lord-McSweeney 4df7722aab avm2: Add fast path for setting array property 2024-05-09 16:41:12 -07:00
Kamil Jarosz ed037214b1 core: Always fire KeyPress after KeyDown for buttons
Button events are actually handled twofold:
1. KeyPress for printable characters is handled on TextInput,
2. KeyPress for special characters (e.g. enter, arrows)
   is handled on KeyDown.

Before this patch, KeyPress was fired too early, so that for
special characters (2) it fired BEFORE KeyDown.
This was not a problem for printable characters, as they
fired on TextInput, which always fired separately after KeyDown.

This patch ensures that KeyPress is fired always in the proper order.
2024-05-09 21:13:13 +02:00
Kamil Jarosz 5541daa105 debug_ui: Add interactive tab order list 2024-05-09 20:57:53 +02:00
Kamil Jarosz baa87ff016 core: Add FocusTracker::tab_order method
This method returns the current tab order as a list of objects.
2024-05-09 20:57:53 +02:00
Kamil Jarosz ccf6b3edb5 debug_ui: Add possibility to clear current focus 2024-05-09 20:57:53 +02:00
Kamil Jarosz ab62b740a7 debug_ui: Use open_display_object_button for focus 2024-05-09 20:57:53 +02:00
Kamil Jarosz 4e39598da4 debug_ui: Exclude hidden objects properly when searching
The option "Include Hidden" was not working properly,
as it did not exclude all hidden objects when disabled.
An object is hidden also when its ancestor is not visible.
2024-05-09 08:12:59 -07:00
Kamil Jarosz ece156e478 core: Use draw_rect_outline for focus highlight
This ensures that highlight does not become outdated
(e.g. when the highlighted content moves).
Additionally, it makes the highlight have 3px independently of zoom.
2024-05-09 00:40:25 +02:00
Kamil Jarosz 07bfa0c3e2 core: Use draw_rect_outline for debug rects
This improves debug rect rendering so that debug rects
do not have missing corners as before.
2024-05-09 00:40:25 +02:00
Kamil Jarosz eabf76dae8 core: Add RenderContext::draw_rect_outline
This method may be used to efficiently draw a simple rectangle outline
for debug rects and focus rects.
2024-05-09 00:40:25 +02:00
Kamil Jarosz bc4ed4c5a1 core: Improve performance of round_to_even
This patch improves performance of ecma_conversions::round_to_even():
1. by using f64::round_ties_even(), which has been stable
   since 1.77.0, instead of a custom algorithm; and
2. by removing an unnecessary comparison to i32::MIN,
   as casting a float to an integer automatically saturates
   values smaller than the minimum integer value to the minimum
   value of the integer type.
2024-05-08 22:16:40 +02:00
Kamil Jarosz 8eaf844cdc core: Add tests for round_to_even 2024-05-08 22:16:40 +02:00
Kamil Jarosz b551d14a59 avm2: Ensure the focus is dropped when it's removed
The logic of dropping the focus when it's removed
applies not only to TextFields but for every InteractiveObject.
This patch ensures that any focus is dropped when its parent is removed.
2024-05-07 22:56:25 +02:00
Kamil Jarosz 428688e7e7 core: Add DisplayObject.on_parent_removed method
This method prevents code duplication performed when overwriting
set_parent to inject some behavior when the parent is removed.
2024-05-07 22:56:25 +02:00
Kamil Jarosz 8d50d1fead core: Move has_focus to InteractiveObject
All the interactive objects had the has_focus flag in their concrete
implementations (even AVM2 button, which did not use it at all).
This patch moves it to InteractiveObject (as a bit flag), making it
easier to manage and use through the has_focus, set_has_focus methods.

Additionally, the operation of setting the current focus to None
when an object was having it was popular enough that it warranted its
own method of drop_focus.
2024-05-07 22:56:25 +02:00
Adrian Wielgosik 120bfa2b30 avm2: Send ADDED_TO_STAGE in SimpleButton at correct time 2024-05-07 22:42:52 +02:00
Kamil Jarosz 8e6e71b2f7 web: Download the file on FileReference.save
This patch adds support for saving files on web using FileReference.
When writing data, a download is triggered with the default file name.
Currently, there's no dialog that lets the user select save destination.

This patch also ensures that all implementations of FileDialogResult
behave the same way: desktop, web, and tests.
The methods `write` and `refresh` have been merged into one:
`write_and_refresh`, which allows the tests and web implementations
behave the same way as desktop.
2024-05-07 22:26:30 +02:00
Kamil Jarosz 64df0368fd avm2: Fix TextField.selectedText 2024-05-06 22:17:41 +02:00
_Mads 901a88db29 avm2: Implement selectedText in class flash.text.TextField 2024-05-06 22:17:41 +02:00
J0sh0nat0r 0c38cc9e28 avm2: share binding skip optimization with `call_method` 2024-05-06 22:02:45 +02:00
Polo 0910df8307
avm2: Implement XML.contains (#16206)
* avm2: XML.contains() implemented

* tests: XMLList known_failure removed

* avm2: XML manual checks removed

* avm2: XMLList.contains() behavior fixed

* avm2: XML contains method moved to xml.rs

* avm2: Empty line removed in xml.rs

* avm2: XML contains args name renamed to value
2024-05-06 17:40:03 +00:00
Kamil Jarosz 42c26f61d1 core: Call focus handlers on every object
Before this patch, focus handlers were called from on_focus_changed,
only for selected objects. It seems that they should be called for
every object by default.
2024-05-04 17:05:24 -07:00
Kamil Jarosz f5a0751557 avm2: Do not highlight Stage on focus
Stage is never highlightable, even if there's a focus on it.
2024-05-04 17:05:24 -07:00
Crowdin Bot aa006f0e8f chore: Update translations from Crowdin 2024-05-02 18:07:40 +02:00
Kamil Jarosz 8ee514e62f avm2: Handle setting tabIndex to -1
Despite throwing an error that `tabIndex` cannot be negative,
the value of -1 is allowed, and it means that `tabIndex` is unset.
2024-04-30 14:23:45 +02:00
Kamil Jarosz f40cb6435f code: Unset tabIndex upon assigning -1
The value of -1 for tabIndex always means that it's unset,
even in AVM1 where tabIndex may have a value of `undefined`.
2024-04-30 14:23:45 +02:00
Crowdin Bot 054d0aab29 chore: Update translations from Crowdin 2024-04-30 01:14:39 +02:00
Kamil Jarosz ec2aaa0549 avm2: Implement InteractiveObject.focusRect 2024-04-29 23:41:40 +02:00
dependabot[bot] 6191984dd6 build(deps): bump the cargo-minor group with 4 updates
Bumps the cargo-minor group with 4 updates: [flate2](https://github.com/rust-lang/flate2-rs), [hashbrown](https://github.com/rust-lang/hashbrown), [gilrs](https://gitlab.com/gilrs-project/gilrs) and [zip](https://github.com/Pr0methean/zip).


Updates `flate2` from 1.0.29 to 1.0.30
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.29...1.0.30)

Updates `hashbrown` from 0.14.3 to 0.14.5
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.14.3...v0.14.5)

Updates `gilrs` from 0.10.6 to 0.10.7
- [Commits](https://gitlab.com/gilrs-project/gilrs/compare/v0.10.6...v0.10.7)

Updates `zip` from 1.1.1 to 1.1.2
- [Release notes](https://github.com/Pr0methean/zip/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Pr0methean/zip/compare/1.1.1...v1.1.2)

---
updated-dependencies:
- dependency-name: flate2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: hashbrown
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: gilrs
  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-04-29 23:18:44 +02:00
Kamil Jarosz 0479259fb9 avm2: Implement DisplayObjectContainer.tabChildren 2024-04-29 21:54:06 +02:00
Kamil Jarosz e3bc63f2bf core: Add possibility to set tab_children for containers 2024-04-29 21:54:06 +02:00
Kamil Jarosz 39b6c9d096 avm2: Implement InteractiveObject.tabEnabled 2024-04-29 21:54:06 +02:00
Kamil Jarosz 1ecdaea392 avm2: Implement InteractiveObject.tabIndex 2024-04-29 21:54:06 +02:00
Kamil Jarosz 14f7665912 core: Allow setting tabEnabled for AVM2
The field tab_enabled in AVM1 is effectively read-only as
tabEnabled is not a built-in property of objects.
That is not the case in AVM2, where tab_enabled is native.

This patch covers both of these cases by introducing methods:
* tab_enabled,
* set_tab_enabled,
* tab_enabled_avm1,
* tab_enabled_avm2_default.
2024-04-29 21:54:06 +02:00
Kamil Jarosz 036b898122 avm2: Call focus handler in AVM2 buttons
The focus handler should also be called for AVM2 buttons when
the focus is being changed.
2024-04-29 21:54:06 +02:00
Kamil Jarosz 02091e590d avm1: Move tab_index to InteractiveObject and make it i32
The i32/u32 discrepancy is only a data presentation issue,
as the value is treated as i32 in every case.
2024-04-29 21:54:06 +02:00
Kamil Jarosz e7eaf2a640 avm2: Override inapplicable properties in TextLine
Some inherited properties of `TextLine` are inapplicable.
They always return the default value and throw an error when set.
2024-04-29 21:18:08 +02:00
Lord-McSweeney b0443b3b5f avm2: Simplify uses of `GcCell<'gc, Class<'gc>>` 2024-04-27 08:29:10 -07:00
Adrian Wielgosik 868ab45c98 avm2: Add Stage.softKeyboardRect 2024-04-24 20:33:13 +02:00
Kamil Jarosz 953a741943 core: Update focus highlight reset logic for SWF9+
SWF versions 9 onwards reset the highlight only on
left mouse button down, whereas older versions also
reset it on other mouse events.
2024-04-24 00:49:37 +02:00
Kamil Jarosz 83d5d18a20 avm2: Add missing overrides to Stage
Stage overrides some properties from its super classes.
Some of them are currently identical in Ruffle,
but in FP they are used for e.g. security checks.
2024-04-23 23:13:02 +02:00
Kamil Jarosz f01cb99d1a avm2: Remove unnecessary imports in AS 2024-04-23 23:13:02 +02:00
Kamil Jarosz ccd2922973 avm2: Stub DisplayObjectContainer.textSnapshot 2024-04-23 23:13:02 +02:00
Kamil Jarosz 19cc8e5873 avm2: Add a stub for flash.text.TextSnapshot 2024-04-23 23:13:02 +02:00
Adrian Wielgosik 09e932163b xml: Add TODO comment in deepCopy() 2024-04-22 22:08:40 +02:00
Adrian Wielgosik 43f27b80ce avm2: Also conditionally set IS_QNAME in 'new QName()' 2024-04-22 22:08:40 +02:00
Adrian Wielgosik 464ccb6eb6 avm2: Update comment for QName struct 2024-04-22 22:08:40 +02:00
Adrian Wielgosik fd281cc715 avm2: Add IS_QNAME flag to Multiname, improve XML name matching 2024-04-22 22:08:40 +02:00
dependabot[bot] c6bfaf8fae build(deps): bump the cargo-minor group with 4 updates
Bumps the cargo-minor group with 4 updates: [thiserror](https://github.com/dtolnay/thiserror), [fluent-templates](https://github.com/XAMPPRocky/fluent-templates), [toml_edit](https://github.com/toml-rs/toml) and [reqwest](https://github.com/seanmonstar/reqwest).


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

Updates `fluent-templates` from 0.9.2 to 0.9.4
- [Release notes](https://github.com/XAMPPRocky/fluent-templates/releases)
- [Changelog](https://github.com/XAMPPRocky/fluent-templates/blob/master/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/fluent-templates/compare/fluent-templates-v0.9.2...fluent-templates-v0.9.4)

Updates `toml_edit` from 0.22.9 to 0.22.12
- [Commits](https://github.com/toml-rs/toml/compare/v0.22.9...v0.22.12)

Updates `reqwest` from 0.12.3 to 0.12.4
- [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.3...v0.12.4)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: fluent-templates
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: toml_edit
  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-04-22 20:33:27 +02:00
Lord-McSweeney 15c076fe0c avm2: Remove "namespace not matching" message
This was getting spammed after #16069
2024-04-21 16:12:54 -07:00
Kamil Jarosz b9e9a3e1f2 core: Dispatch rollOut/rollOver events on focus change and Tab
When focus changes, rollOut/rollOver events should be dispatched.
This includes onRollOut/onRollOver handlers, but also button actions.
2024-04-22 00:53:20 +02:00
Kamil Jarosz e20341f0a3 core: Skip updating mouse hover when not necessary
Since objects may be hovered using Tab, mouse hover update cannot happen
every time, because it would always reset the hover set by Tab.

This is why mouse hover is skipped when the following are true:
1. the mouse has not moved,
2. no mouse button has been pressed,
3. there was a hover,
4. the hovered object did not disappear.
2024-04-22 00:53:20 +02:00
Kamil Jarosz 9987519608 core: Make FocusTracker operate on InteractiveObjects
Originally, FocusTracker operated on DisplayObjects. However, in both
AVM1 and AVM2, all objects that are focusable are InteractiveObjects.
Switching FocusTracker to operate on InteractiveObjects simplifies code
in the long run.
2024-04-22 00:53:20 +02:00
Kamil Jarosz f94a31c5c2 core: Add FocusTracker.get_as_edit_text method
This is a utility method which simplifies getting the current focus
as an EditText object, which is being done frequently throughout Ruffle.
2024-04-22 00:53:20 +02:00
Kamil Jarosz 31c9be3a35 core: Ensure all changes made to UpdateContext are applied
UpdateContext.mouse_over_object and UpdateContext.mouse_down_object
were treated differently from other properties. Changes made to them
were required to be applied manually after using the context.
However, when reborrowing the context, all changes made to these
properties were dropped, as they were not applied after reborrow.
Applying them after reborrow would be difficult (RAII, concurrency
problems), that's why they were replaced with mutable references.

MouseData struct was introduced to make the code more readable and
adhere to the convention of UpdateContext to contain mutable references
to higher level objects.
2024-04-22 00:53:20 +02:00
Kamil Jarosz e28712f111 avm1: Use Avm1::run_stack_frame_for_method for focus handlers
Using Avm1::run_stack_frame_for_method for calling focus handlers
simplifies code and prevents duplication.
2024-04-22 00:53:20 +02:00
Kamil Jarosz 47758e1fb3 core: Make objects focusable by default
Since is_focusable has been moved to InteractiveObject,
it may now return true by default, because non-interactive objects
do not implement this method anymore.
2024-04-22 00:53:20 +02:00
Kamil Jarosz 5173fa4118 core: Move focus-related methods to InteractiveObject
Only interactive objects may be focusable, so keeping these methods
in all display objects makes matters more difficult, as they also
has to be implemented for non-interactive objects.

Moving these to InteractiveObject simplifies code in the long run.
2024-04-22 00:53:20 +02:00
Lord-McSweeney ca4da9e5ee avm2: Fix regression from classes not being registered in order from the constant pool 2024-04-21 14:27:16 -07:00
Lord-McSweeney 8a4946fa03 avm2: Store Class instead of QName as superclass of Class 2024-04-20 15:23:44 -07:00
turicfr 3f5582ed94 avm1: Correct `getBounds` properties order
This affects the order of the properties when enumerating the
returned object (via `Enumerate2` etc.)
2024-04-20 21:58:32 +02:00
jarca0123 7e349d9190 avm2: Add support for sparse arrays 2024-04-20 21:41:33 +02:00
TÖRÖK Attila 3ca7cc821e nit: Silence nightly `dead_code` lint 2024-04-20 17:39:54 +02:00
TÖRÖK Attila b8ec3a8089 nit: Silence nightly `clippy::legacy_numeric_constants` lint 2024-04-20 17:39:54 +02:00
Lord-McSweeney 955d03885e avm2: Remove outdated TODO comments 2024-04-19 15:03:53 -07:00
Tom Schuster cdf587c5a5 avm2: Fix two bugs that caused wrong query parameters with navigateToURL 2024-04-19 18:56:25 +02:00
dependabot[bot] 5c1fcb9f26 build(deps): bump the cargo-minor group with 4 updates
Bumps the cargo-minor group with 4 updates: [serde](https://github.com/serde-rs/serde), [serde_json](https://github.com/serde-rs/json), [syn](https://github.com/dtolnay/syn) and [proc-macro2](https://github.com/dtolnay/proc-macro2).


Updates `serde` from 1.0.197 to 1.0.198
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.198)

Updates `serde_json` from 1.0.115 to 1.0.116
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116)

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

Updates `proc-macro2` from 1.0.80 to 1.0.81
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.80...1.0.81)

---
updated-dependencies:
- dependency-name: serde
  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: 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
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-18 17:30:02 +02:00
Adrian Wielgosik a69b80b4bb avm2: Allow splice() on a Vector with fixed=true 2024-04-18 00:56:22 +02:00
Aaron Hill 899fe54477 debug_ui: Show mouseEnabled/mouseChildren/doubleClickEnabled
This helps with debugging mouse-pick bugs
2024-04-17 14:36:34 -04:00
StevenMia 899c0bb157 chore: fix some typos in comments
Signed-off-by: StevenMia <flite@foxmail.com>
2024-04-16 09:31:00 +02:00
dependabot[bot] d3cc9d5fa5 build(deps): bump the cargo-minor group with 11 updates
Bumps the cargo-minor group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.81` | `1.0.82` |
| [async-channel](https://github.com/smol-rs/async-channel) | `2.2.0` | `2.2.1` |
| [chrono](https://github.com/chronotope/chrono) | `0.4.37` | `0.4.38` |
| [encoding_rs](https://github.com/hsivonen/encoding_rs) | `0.8.33` | `0.8.34` |
| [fluent-templates](https://github.com/XAMPPRocky/fluent-templates) | `0.9.1` | `0.9.2` |
| [either](https://github.com/rayon-rs/either) | `1.10.0` | `1.11.0` |
| [quote](https://github.com/dtolnay/quote) | `1.0.35` | `1.0.36` |
| [syn](https://github.com/dtolnay/syn) | `2.0.58` | `2.0.59` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.79` | `1.0.80` |
| [webbrowser](https://github.com/amodm/webbrowser-rs) | `0.8.14` | `0.8.15` |
| [libtest-mimic](https://github.com/LukasKalbertodt/libtest-mimic) | `0.7.0` | `0.7.2` |


Updates `anyhow` from 1.0.81 to 1.0.82
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82)

Updates `async-channel` from 2.2.0 to 2.2.1
- [Release notes](https://github.com/smol-rs/async-channel/releases)
- [Changelog](https://github.com/smol-rs/async-channel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/async-channel/compare/v2.2.0...v2.2.1)

Updates `chrono` from 0.4.37 to 0.4.38
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.37...v0.4.38)

Updates `encoding_rs` from 0.8.33 to 0.8.34
- [Commits](https://github.com/hsivonen/encoding_rs/compare/v0.8.33...v0.8.34)

Updates `fluent-templates` from 0.9.1 to 0.9.2
- [Release notes](https://github.com/XAMPPRocky/fluent-templates/releases)
- [Changelog](https://github.com/XAMPPRocky/fluent-templates/blob/master/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/fluent-templates/compare/fluent-templates-v0.9.1...fluent-templates-v0.9.2)

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

Updates `quote` from 1.0.35 to 1.0.36
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.35...1.0.36)

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

Updates `proc-macro2` from 1.0.79 to 1.0.80
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.79...1.0.80)

Updates `webbrowser` from 0.8.14 to 0.8.15
- [Release notes](https://github.com/amodm/webbrowser-rs/releases)
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.8.14...v0.8.15)

Updates `libtest-mimic` from 0.7.0 to 0.7.2
- [Release notes](https://github.com/LukasKalbertodt/libtest-mimic/releases)
- [Changelog](https://github.com/LukasKalbertodt/libtest-mimic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/LukasKalbertodt/libtest-mimic/commits)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: async-channel
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: encoding_rs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: fluent-templates
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: either
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: quote
  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: webbrowser
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: libtest-mimic
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-15 23:34:51 +02:00
Lord-McSweeney 1f4eebfd8d avm2: Add SetSlotNoCoerce and ReturnValueNoCoerce ops for SetSlot and ReturnValue without coercion when type is guaranteed to be not coerced 2024-04-14 22:10:37 -07:00
Lord-McSweeney daaf274245 avm2: Fill in all ops in optimizer 2024-04-14 22:10:37 -07:00
Lord-McSweeney efe878211a avm2: Pre-pool multinames for several ops
`CallPropLex`, `GetSuper`, `SetSuper`, `CallSuper`, `CallSuperVoid`, `GetDescendants`
2024-04-14 22:10:37 -07:00
Lord-McSweeney a7021f4fee avm2: Use already stored param types in optimizer 2024-04-14 22:10:37 -07:00
Lord-McSweeney e05f405888 avm2: Remove unneeded zero code length check in `run_actions` 2024-04-14 22:10:37 -07:00
Lord-McSweeney 9dcf0a7d70 avm2: Resolve function argument types once when calling function for the first time 2024-04-14 22:10:37 -07:00
Lord-McSweeney 9870754b5e avm2: Support optimization of `CallPropVoid` and virtual setters
This requires adding a custom field to the `CallMethod` op
2024-04-14 22:10:37 -07:00
Adrian Wielgosik 9d2664f752 wstr: Fix parsing of '+' 2024-04-14 13:24:42 +02:00
Nick 752ced391c
avm1: use correct coordinates for hitTest (#15894) 2024-04-09 17:11:21 +00:00
Nathan Adams 62867729de core: Removed now-unused Player::swf() method 2024-04-09 00:01:59 +02:00
dependabot[bot] ae10b76431 build(deps): bump the cargo-minor group with 6 updates
Bumps the cargo-minor group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [image](https://github.com/image-rs/image) | `0.25.0` | `0.25.1` |
| [downcast-rs](https://github.com/marcianx/downcast-rs) | `1.2.0` | `1.2.1` |
| [regress](https://github.com/ridiculousfish/regress) | `0.9.0` | `0.9.1` |
| [syn](https://github.com/dtolnay/syn) | `2.0.55` | `2.0.58` |
| [webbrowser](https://github.com/amodm/webbrowser-rs) | `0.8.13` | `0.8.14` |
| [getrandom](https://github.com/rust-random/getrandom) | `0.2.12` | `0.2.14` |


Updates `image` from 0.25.0 to 0.25.1
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.25.0...v0.25.1)

Updates `downcast-rs` from 1.2.0 to 1.2.1
- [Changelog](https://github.com/marcianx/downcast-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/marcianx/downcast-rs/compare/v1.2.0...v1.2.1)

Updates `regress` from 0.9.0 to 0.9.1
- [Release notes](https://github.com/ridiculousfish/regress/releases)
- [Commits](https://github.com/ridiculousfish/regress/compare/v0.9.0...v0.9.1)

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

Updates `webbrowser` from 0.8.13 to 0.8.14
- [Release notes](https://github.com/amodm/webbrowser-rs/releases)
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.8.13...v0.8.14)

Updates `getrandom` from 0.2.12 to 0.2.14
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.12...v0.2.14)

---
updated-dependencies:
- dependency-name: image
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: downcast-rs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: regress
  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: webbrowser
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: getrandom
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-08 23:44:16 +02:00
Kamil Jarosz 741c53994c core: Add focus tracker to debug UI 2024-04-08 23:19:29 +02:00
Kamil Jarosz 497eaba6c5 core: Add DisplayObject.is_highlightable method
This is added for convenience so that it's not required
to cast an object to InteractiveObject when checking for a highlight.

This also gets rid of InteractiveObject.focus_rect_supported,
as `is_highlightable` may be now overridden.
2024-04-08 23:19:29 +02:00
Kamil Jarosz 43266f2d5d avm1: Fix onKeyUp and onKeyDown events for Button
These two events were not firing properly when a key was pressed
and the button had focus.
2024-04-08 22:16:50 +02:00
Kamil Jarosz e57b371a3d core: Add support for NumLock
This patch adds support for NumLock, which was missing.
Now NumLock (144) may be used as a parameter in methods
from the Key class.
2024-04-08 20:14:07 +02:00
Lord-McSweeney c1b6aa48a2 avm2: Fix unknown jump sources mixing with known jump sources 2024-04-05 00:34:50 +02:00
Lord-McSweeney 1727b946c4 avm2: Ensure exception targets are noted as possible jump targets 2024-04-05 00:34:50 +02:00
Lord-McSweeney 1a9ea0c9b1 avm2: Merge properly when the target is right after a block-terminating op 2024-04-05 00:34:50 +02:00
Lord-McSweeney fbef4c342e avm2: Add basic state merging for forward jumps to optimizer 2024-04-05 00:34:50 +02:00
Kamil Jarosz e564803ec0 core: Ignore non-tabbable objects from tab ordering
These objects include:
* invisible objects along with their children,
* non-editable text fields.

The method `is_tab_enabled` is renamed to `is_tabbable`, as it no
longer represents the `tabEnabled` property value, but also
incorporates other logic.
2024-04-04 22:53:19 +02:00
dependabot[bot] 163aa9edf6 build(deps): bump web-time from 0.2.4 to 1.1.0
Bumps [web-time](https://github.com/daxpedda/web-time) from 0.2.4 to 1.1.0.
- [Release notes](https://github.com/daxpedda/web-time/releases)
- [Changelog](https://github.com/daxpedda/web-time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/daxpedda/web-time/compare/v0.2.4...v1.1.0)

---
updated-dependencies:
- dependency-name: web-time
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 21:41:04 +02:00
Nathan Adams b7c9c870bb chore: Use workspace version for walkdir 2024-04-04 17:29:00 +02:00
Nathan Adams 19c914c5a8 chore: Use workspace version for url 2024-04-04 17:29:00 +02:00
Nathan Adams 45a2ab69c0 chore: Use workspace version for thiserror 2024-04-04 17:29:00 +02:00
Nathan Adams 9d665ce448 chore: Use workspace version for serde 2024-04-04 17:29:00 +02:00
Nathan Adams 80758cbaeb chore: Use workspace version for num-traits 2024-04-04 17:29:00 +02:00
Nathan Adams a7404e7506 chore: Use workspace version for num-derive 2024-04-04 17:29:00 +02:00
Nathan Adams d8fec1cabc chore: Use workspace version for image 2024-04-04 17:29:00 +02:00
Nathan Adams 2036d85a95 chore: Use workspace version for futures 2024-04-04 17:29:00 +02:00
Nathan Adams 2bd1ef47b7 chore: Use workspace version for flate2 2024-04-04 17:29:00 +02:00
Nathan Adams c3711e3953 chore: Use workspace version for enum-map 2024-04-04 17:29:00 +02:00
Nathan Adams 6cca9bb3b7 chore: Use workspace version for clap 2024-04-04 17:29:00 +02:00
Nathan Adams 26df7d78c4 chore: Use workspace version for chrono 2024-04-04 17:29:00 +02:00
Nathan Adams 937664e737 chore: Use workspace version for bytemuck 2024-04-04 17:29:00 +02:00
Nathan Adams 4e3cd75c30 chore: Use workspace version for bitflags 2024-04-04 17:29:00 +02:00
Nathan Adams 8a390163d6 chore: Use workspace version for async-channel 2024-04-04 17:29:00 +02:00
Kamil Jarosz 53f49eb480 avm2: Update comments related to stageFocusRect
Although full AVM2 support is not there yet, stageFocusRect is
not ignored anymore.
2024-04-04 10:58:42 +02:00
Kamil Jarosz 84d24fdd50 core: Use focus_rect to control highlight rendering
The field `focus_rect` is available for each interactive object,
and its value is used to control highlight rendering.
The notable exception is the TextField, which despite having a focus,
is incapable of rendering a highlight.
That is why the `focus_rect_supported` field has been added
to control this behavior.
2024-04-04 10:58:42 +02:00
Kamil Jarosz 76b8b5e438 avm1: Add support for _focusrect property
The property `_focusrect` allows specifying whether an object should be
highlighted by keyboard focus. For SWF <=5 that was possible globally,
and since SWF 6 the global option only has been the default,
which may be overridden using a local `_focusrect` property.
2024-04-04 10:58:42 +02:00
Kamil Jarosz da9ee141dc avm1: Mark applicable Object properties as SWF6+
Some of the Object properties are available only in SWF6+.
2024-04-04 10:58:42 +02:00
sleepycatcoding 92f437ec15 desktop: Add storage backend preference 2024-04-03 23:44:27 +02:00
sleepycatcoding e1f9b5e5df desktop: add UI for bookmarks 2024-04-03 22:20:55 +02:00
TÖRÖK Attila 9822e96b41 chore: Bump `egui` to `v0.27.2` 2024-04-03 08:01:53 +02:00
Kamil Jarosz d4b74db133 core: Default value logic for MovieClip.tabEnabled
The default value of `MovieClip.tabEnabled` is neither trivial
nor well-documented. This patch implements the logic behind
the default value of `MovieClip.tabEnabled` and covers it with tests.
2024-04-02 00:31:34 +02:00
Kamil Jarosz 6d08d2afb0 core: Make the default value lazy in get_avm1_boolean_property 2024-04-02 00:31:34 +02:00
Kamil Jarosz 95983bf4f3 core: Render yellow highlight on keyboard focus
This patch implements rendering of the yellow rectangle around
a focused element after pressing Tab. Focus tracker which is responsible
for keeping track of the current focus is now also responsible
for keeping track of the highlight and rendering thereof.
2024-04-01 23:38:59 +02:00
Kamil Jarosz 1a250f0144 core: Move FocusTracker to Stage 2024-04-01 23:38:59 +02:00
Kamil Jarosz b12bf31c6e core: Improve order of automatic tab ordering
This patch improves the order of automatic tab ordering,
and makes it behave more like in FP.
The order after this patch is far from being exactly
the same as in FP, but is close enough.
2024-04-01 22:48:59 +02:00
Tom Schuster 1552059c9f avm2: Stub DisplayObject.metaData 2024-04-01 12:31:59 +02:00
Kamil Jarosz 1883daff22 avm1: Support `MovieClip.tabChildren`
The property `MovieClip.tabChildren` allows changing the behavior of
tab ordering hierarchically. When set to `false`, it excludes the whole
subtree represented by the movie clip from tab ordering.
2024-03-30 00:15:45 +01:00
Kamil Jarosz 9ba7bb8629 core: Reverse tab order on Shift+Tab
When pressing Shift+Tab or Ctrl+Shift+Tab,
elements are tabbed in reverse.
2024-03-29 23:20:15 +01:00
Kamil Jarosz 208aae78ee core: Use either crate instead of a custom implementation 2024-03-29 23:20:15 +01:00
TÖRÖK Attila a59ec413ad chore: Update `egui` to `v0.27.1` 2024-03-29 14:46:25 +01:00
TÖRÖK Attila 5b4f808769 chore: Update `egui` to `v0.27.0` 2024-03-29 10:02:52 +01:00
Kamil Jarosz 9d18bcdd06 avm1: Add support for tabEnabled and tabIndex 2024-03-27 00:40:24 +01:00
Kamil Jarosz c7b16f4642 core: Add basic support for Tab key behavior
The Tab key is used to cycle through focusable elements in stage.
It supports two tab orderings: automatic and custom.
This patch adds basic support for this behavior.
2024-03-27 00:40:24 +01:00
Kamil Jarosz e6e23fc758 core: Simplify handling clip events in Player 2024-03-27 00:40:24 +01:00
Lord-McSweeney 1a9a36c1ed avm2: Properly push coerced value back to stack in optimizer for Coerce op 2024-03-26 10:43:13 -07:00
renovate[bot] 9dfc6dc224 fix(deps): update rust dependencies 2024-03-26 13:56:59 +01:00
sleepycatcoding 1b41abf3a3 chore: Remove unused dependencies 2024-03-25 17:45:26 +01:00
renovate[bot] 98cbe9cf31 fix(deps): update rust dependencies 2024-03-25 02:47:32 +01:00
Crowdin Bot 9793e3968d chore: Update translations from Crowdin 2024-03-24 22:55:51 +01:00
Tom Schuster 1d4fd1575b avm2: Make URLStream fire the HTTP_STATUS event 2024-03-24 12:42:12 +01:00
Tom Schuster 403f6eb511 avm2: Add URLStream.connected 2024-03-24 12:42:12 +01:00
Lord-McSweeney 0adac8f69d core: Remove `Collect` from `Color` and `DirtyState` as it was unnecessary 2024-03-23 21:18:02 -07:00
Lord-McSweeney 530319ce93 avm2: Add many more ops to optimizer 2024-03-23 20:17:41 -07:00
Lord-McSweeney 9f44281a52 avm2: Remove unnecessary range checks on local-modifying ops in optimizer 2024-03-23 20:17:41 -07:00
Lord-McSweeney dec9f07f5f avm2: Better optimizer handling for `FindProperty` and `FindPropStrict` 2024-03-23 20:17:41 -07:00
Lord-McSweeney 2646fcf148 avm2: Add more domain memory ops to optimizer 2024-03-23 20:17:41 -07:00
Lord-McSweeney 3c39acc2ae avm2: Increase number of actions before timeout check from 2000 to 64000 2024-03-23 20:17:41 -07:00
Lord-McSweeney 407314686e avm2: Verify `getouterscope` op 2024-03-23 20:17:41 -07:00
TÖRÖK Attila 156e4eb2ed core: Make sure that streams progress even with many small-dt ticks 2024-03-24 01:07:10 +01:00
Adrian Wielgosik 08157a056e build: Fix redundant import warnings 2024-03-23 19:23:18 +01:00
Lord-McSweeney ab254c93c6 avm2: Activation class is now guaranteed in `op_new_activation` 2024-03-22 18:55:23 -07:00
Lord-McSweeney af19d6f385 avm2: Fix `newactivation` in script initializer
This works the same as in a normal function
2024-03-22 18:55:23 -07:00
renovate[bot] d70560cb82 fix(deps): update rust dependencies 2024-03-22 11:10:59 +01:00
TÖRÖK Attila d9f17dac44 chore: Bump `image` to `v0.25`, without the `dxt` feature 2024-03-19 00:14:48 +01:00
michiel2005 28048e9b81 avm1: added the onScroller listener 2024-03-18 22:17:32 +01:00
michiel2005 5fc2505c07 core: made text fields scrollable 2024-03-18 22:17:32 +01:00
michiel2005 ec99bedcf8 avm1: added mouse_wheel_enabled to text fields 2024-03-18 22:17:32 +01:00
Adrian Wielgosik 3c2d629e0d core: Cull text under textfield 2024-03-18 22:00:34 +01:00
TÖRÖK Attila 7a269c054d fix(deps): update rust dependencies 2024-03-18 12:21:47 +01:00
Crowdin Bot 8345ace97e chore: Update translations from Crowdin 2024-03-18 11:49:48 +01:00
Lord-McSweeney e7924e564b avm2: Fix some parameter types and signatures for XML 2024-03-17 20:01:19 -07:00
Adrian Wielgosik 27cd08deeb avm2: Provide an option to disable the optimizer 2024-03-16 22:40:15 +01:00
soonsouth abf7d3fa20 chore: remove repetitive words
Signed-off-by: soonsouth <cuibuwei@163.com>
2024-03-15 21:10:53 +01:00
Adrian Wielgosik 69ba551f0d avm2: Add extra type propagation to astype 2024-03-14 22:32:48 +01:00
Adrian Wielgosik 88e5f9a898 avm2: unify abstract type propagation 2024-03-14 22:32:48 +01:00
renovate[bot] 3f9f19b7ac fix(deps): update rust dependencies 2024-03-14 16:45:29 +01:00
sleepycatcoding c7a34bb7dd avm2: Set default for XML.elements `name` argument in AS
This makes it consistent with other methods on XML and XMLList.
2024-03-14 15:38:49 +01:00
sleepycatcoding 2a70f45423 avm2: Implement XMLList.elements 2024-03-14 15:38:49 +01:00
Tom Schuster eabf7a0d58 avm2: Add Namespace.prototype.toString 2024-03-13 22:26:47 +01:00
Tom Schuster 623dba6f1f avm2: Remove all to_string implementations except Object and Class.
Turns out the Vector to_string function that I added (#15562) was just duplicating what the
default implementation did. The Namespace one was just plain wrong.

Fixes #15474
2024-03-13 22:26:47 +01:00
Tom Schuster 09a7bd61b5 avm2: Fix Object.prototype.toString applied to Vector 2024-03-13 20:16:49 +01:00
Tom Schuster 8ec203a227 avm2: Add Function.prototype.toString and toLocaleString 2024-03-13 10:14:27 +01:00
Tom Schuster 3f17523879 avm2: Fix toString for primitive objects 2024-03-12 21:00:26 -07:00
Adrian Wielgosik dce71fdfcb avm2: Make Activation::from_builtin non-Result 2024-03-10 23:08:04 +01:00
Adrian Wielgosik 064cc14905 avm2: Reduce memcpy overhead in BytecodeMethod calls 2024-03-10 23:08:04 +01:00
Tom Schuster 53aee62c38 avm2: Re-implement RegExp.prototype.toString
Also remove the TObject to_string implementation that isn't necessary.
2024-03-10 21:27:39 +01:00
Lord-McSweeney 788c3da4aa avm2: Add a `make_error_1014` function and use it 2024-03-10 09:49:24 -07:00
Lord-McSweeney f76117a2be avm2: Better target class and target variable name handling for exceptions
Lookup on the target class and variable name is now done in the verifier.
2024-03-10 09:49:24 -07:00
Lord-McSweeney b5f7fa0cd0 swf: `CallMethod` takes a `disp_id`, not any sort of `Index` 2024-03-10 09:49:24 -07:00
Lord-McSweeney 028a61e744 avm2: Pre-pool multiname for `FindDef` 2024-03-10 09:49:24 -07:00
Lord-McSweeney fdf92a9f2d avm2: Also early lookup classes for `IsType` and `AsType` 2024-03-10 09:49:24 -07:00
Lord-McSweeney 51b9dcfb1d avm2: Pool strings in verifier 2024-03-10 09:49:24 -07:00
Lord-McSweeney b69eabfcdc avm2: Lookup multinames in verifier and store them in `Op` 2024-03-10 09:49:24 -07:00
Aaron Hill 7752c32c8e
avm2: Stub GameInput.getDeviceAt and GameInputControl (#15409) 2024-03-09 22:01:10 +00:00
Tom Schuster ed4bb00115 avm2: Stage.stage3Ds must return a vector
Fixes #15472
2024-03-07 19:33:09 +01:00
Lord-McSweeney 12ffc8a347 avm2: Remove unused and unnecessary `init_slot` 2024-03-06 20:49:19 -08:00
Nathan Adams 1a6b73f496 avm2: Use chrono's new Duration::try_ methods 2024-03-06 21:58:40 +01:00
renovate[bot] a916369f21 fix(deps): update rust dependencies 2024-03-06 21:58:40 +01:00
Lord-McSweeney 95b5c700f5 avm2: Fix a minor optimizer bug 2024-03-06 07:21:28 -08:00
Lord-McSweeney 24d194a8b1 avm2: Propagate normal error for bad Multiname read in verifier 2024-03-06 07:21:28 -08:00
Lord-McSweeney 9a1196a7a0 avm2: Fix bugs and resolve reviews 2024-03-06 07:21:28 -08:00
Lord-McSweeney c98d61c376 avm2: Add a `make_error_1021` function and use it 2024-03-06 07:21:28 -08:00
Lord-McSweeney f28928dbc9 avm2: Match verifier reading implementation with FP's 2024-03-06 07:21:28 -08:00
Kamil Jarosz c260a45603 core: Close sockets and timers when replacing the root movie
Turns out that the comment from `set_root_movie` was right all along!
`set_root_movie` should not be used when replacing the root movie,
because it will leave out unclosed resources.
This patch introduces `replace_root_movie`, which is dedicated to be
used when replacing (instead of just setting) the root movie.

The best solution would be to use RAII, e.g. destroy and recreate
the whole Player instance, but this patch is a first step towards
proper resource control.
2024-03-05 23:14:08 +01:00
Nathan Adams 09dfa6427e desktop: Allow changing the language in Preferences 2024-03-05 00:02:27 +01:00
renovate[bot] fae1c458ec fix(deps): update rust dependencies 2024-03-04 22:18:19 +01:00
TÖRÖK Attila 7f268bf50e chore: Update `wasm-bindgen` to `v0.2.92`, wasm-bindgen-futures to `v0.4.42` 2024-03-04 19:01:04 +01:00
TÖRÖK Attila 755fa6cded chore: Switch `fluent-templates` back from `master` to `v0.9.0` 2024-03-04 11:05:08 +01:00
TÖRÖK Attila 85dd258168 cleanup: Remove a stale workaround for a `generational-arena` bug 2024-03-03 21:18:39 +01:00
TÖRÖK Attila 8764c08b01 cleanup: Define distinct key types for different kinds of slotmaps 2024-03-03 21:18:39 +01:00
TÖRÖK Attila 5bfd8af257 cleanup: Rename `Handle` in `loader.rs` to `LoaderHandle` to follow convention 2024-03-03 21:18:39 +01:00
Adrian Wielgosik 17c5b38bb1 avm2: Only construct type_error on error in astype, instanceof 2024-03-03 20:58:54 +01:00
MrCheeze a119e3e130 core: Improve placement of cursor when clicking in textbox
Currently when clicking in a textbox, the cursor will only be placed
correctly if you click exactly on top of a letter. The basic purpose of
this commit is to make it so that clicking in the surrounding margin
will put the cursor in the closest available position, as in Flash Player.

The logic is a bit complex because a single row of text can contain
multiple layout boxes, each with a different Y offset (but all with the
same Y extent). To be accurate, we need to treat each layout box in the
row "as if" it had the same Y offset that the tallest box in its row has.

This commit also contains a fix for an issue where lower_from_text_spans
was passing the wrong text strings and indexes to fixup_line for
newlines, which needed to be fixed in order to be able to click to place
the cursor in an empty row that was created by newlines.
2024-03-02 20:30:50 +01:00
Lv Yitian 556d16302b
avm2: Implement flash.media.ID3Info (#14916) 2024-03-02 19:13:31 +00:00
TÖRÖK Attila 55773f0205 chore: Replace `generational-arena` with `slotmap` 2024-03-02 19:42:11 +01:00
renovate[bot] c2179e88db fix(deps): update rust dependencies 2024-03-02 10:05:43 +01:00
renovate[bot] 35d72115a4 fix(deps): update wasm-bindgen 2024-03-02 02:42:45 +01:00
renovate[bot] 6e84b05b66 fix(deps): update rust dependencies 2024-03-01 22:46:32 +01:00
TÖRÖK Attila 10fa4175c4 chore: Bump jpegxr and nellymoser-rs git references 2024-03-01 21:54:18 +01:00
Tom Schuster 0cea5a0a9e core: Introduce gamepad button mapping support 2024-02-28 21:21:09 +01:00
Kamil Jarosz f6907a5c73 desktop: Add tests for connect_socket
Add tests for ExternalNavigatorBackend::connect_socket.
2024-02-28 19:42:54 +01:00
Kamil Jarosz cc8b0aa5dd core: Use async channels in NavigatorBackend
This has several advantages:
1. it allows using async variants of send and recv,
2. it adds consistency as until now Receiver was async,
   and Sender was not.
2024-02-28 19:42:54 +01:00
Aaron Hill 3e99dd3999 core: Use latest fluent-templates `master` for reproducible builds 2024-02-27 21:36:28 -05:00
Aaron Hill 900a8407d6 core: Implement lazy decoding of bitmaps
We hit a pathological case in House
(https://github.com/ruffle-rs/ruffle/issues/15154),
where eagerly decoding bitmaps during preloading results in
over 10GB of ram being used.

With this PR, we store the compressed bitmap, and only decode it
each time we instantiate it. In order to support bitmap fills,
we store the decoded width/height and a lazily-initialized GPU handle
in `Character::Bitmap`
2024-02-27 21:18:18 -05:00
TÖRÖK Attila ee0c1f42ff core,avm2: Make Timer.setDelay not change the timer ID. Fix #15005. 2024-02-27 23:56:33 +01:00
renovate[bot] 9cdb2f31cc fix(deps): update rust dependencies 2024-02-26 08:14:26 +01:00
Lord-McSweeney 11d5a8f7df avm2: Resolve reviews (no functional changes) 2024-02-25 21:52:24 -08:00
Lord-McSweeney 8542edf10c avm2: Handle lazy multinames in optimizer 2024-02-25 21:52:24 -08:00
Lord-McSweeney b637e5f108 avm2: Add a `popn` function to `Stack` and use it 2024-02-25 21:52:24 -08:00
Lord-McSweeney 4d8c98af0d avm2: Don't use a `Class`'s first `ClassObject` for its VTable if more than one `ClassObject` had been constructed for the class 2024-02-25 21:52:24 -08:00
Lord-McSweeney a763842b1b avm2: Extract optimizer logic into a different file 2024-02-25 21:52:24 -08:00
Lord-McSweeney ba9a975685 avm2: Add `push_raw` for faster stack pushes 2024-02-25 21:52:24 -08:00
Lord-McSweeney b07c0a99ea avm2: Also optimize `CallProperty` to `CallMethod` when possible 2024-02-25 21:52:24 -08:00
Lord-McSweeney 22117e3eb5 avm2: Add more ops to optimizer and let it use resolved argument types 2024-02-25 21:52:24 -08:00
Lord-McSweeney 4da708edb8 chore: appease clippy 2024-02-25 21:52:24 -08:00
Lord-McSweeney e227576093 chore: cleanup 2024-02-25 21:52:24 -08:00
Lord-McSweeney d7cebd020b avm2: Support type inference for chained `GetProperty`s 2024-02-25 21:52:24 -08:00
Lord-McSweeney 8b19012123 avm2: Handle more ops in abstract optimizer 2024-02-25 21:52:24 -08:00
Lord-McSweeney 0cb0d4a6da avm2: More advanced optimizer 2024-02-25 21:52:24 -08:00
renovate[bot] 6b89737093 fix(deps): update rust dependencies 2024-02-19 11:32:22 +01:00
Crowdin Bot 29821e9c84 chore: Update translations from Crowdin 2024-02-19 10:38:26 +01:00
Tom Schuster ba7c9a4e31 avm2: Always serialize as ECMAArray, which produces an AMF0 MixedArray 2024-02-19 10:13:18 +01:00
Adrian Wielgosik fe2ed81d8a avm2: Implement JS->AS3 Object deserialization 2024-02-16 15:25:55 +01:00
renovate[bot] 1651b7a5b0 desktop: chore: Update `egui` to 0.26.2 2024-02-16 01:52:41 +01:00
Aaron Hill 1a1ce91e98 core: Only report socket connected just before we fire 'connect'
Platform Racing 3 relies on 'Socket.connected' reporting 'false'
immediately after calling 'Socket.connect' - it internally buffers
data made when 'Socket.connected' is false
2024-02-16 01:10:57 +01:00
Tom Schuster 49b3b9d7de avm2: Stub all flash.sampler methods 2024-02-14 14:10:41 +01:00
svitkin b55db7083c tests: Add test for flash.net.navigateToURL 2024-02-12 17:14:11 +01:00
svitkin 5028f66608 avm2: parse data for flash.net.navigateToURL (closes #13898) 2024-02-12 17:14:11 +01:00
Marco Bartoli 50a8815a50
avm2: Deserialize AMF dictionary (#15169) 2024-02-09 00:06:08 +01:00
Aaron Hill 71f828a3fd avm2: Use playerglobals domain as parent for `new ApplicationDomain()`
We were incorrectly using the stage domain as the parent, which caused
classes to be incorrectly shared between domains.
2024-02-07 20:13:23 -05:00
Tom Schuster d7c7716c34 avm2: Implement TextField::getLineText 2024-02-07 20:34:43 +01:00
David Wendt d7583289c9 avm1: Make `NetConnection.isConnected`'s stub more functional 2024-02-07 19:46:39 +01:00
Tom Schuster cadae9303f avm2: Verify the URLRequest method 2024-02-06 17:52:08 +01:00
sleepycatcoding 4c6f2ba973 avm2: Fix `in` operator not handling attributes in XML object 2024-02-05 21:09:39 +01:00
Tom Schuster ecda68b81c avm2: has_property should do proto.has_property instead of
has_own_property
2024-02-05 19:34:09 +01:00
TÖRÖK Attila 28c380cfac desktop: Update egui to 0.26.0 2024-02-05 19:05:10 +01:00
renovate[bot] 477440d387 fix(deps): update rust dependencies 2024-02-05 07:56:07 +01:00
Kamil Jarosz f3f8a4522e text: Add support for relative font sizes in HTML 2024-02-04 22:01:32 +01:00
_Mads b5d0c965f0
avm2: Implement TimerEvent.toString 2024-02-03 21:54:52 +00:00
Kamil Jarosz 50b5f29c0a text: Make enter add a new line in multiline fields 2024-02-03 13:40:07 +01:00
Aaron Hill b02a96373b debug_ui: Show ClassObjects for domain class
This re-uses our existing infrastructure for displaying
AVM2 Class objector. One minor limitation of this approach
is the inability to view a `Class` that hasn't yet had its
`ClassObject` created - however, this should be rare in practice.

We show a collapsing header with all of the ClassObjects associated
with the given Class.
2024-02-02 19:24:36 -08:00
Lord-McSweeney 603a76bab0 avm2: Add fast path for `Value::abstract_lt`-ing two integers 2024-02-01 17:03:57 -08:00
Nathan Adams 71c9de410d core: Clarify CPU vs GPU branch in BitmapData.draw 2024-02-02 00:59:45 +01:00
Nathan Adams bac78442fc core: Don't do bmd.draw() on cpu if it exists on gpu 2024-02-02 00:59:45 +01:00
Nathan Adams 70fbb4a7ac render: Move away from SyncHandle.retrieve_offscreen_texture to RenderBackend::resolve_sync_handle 2024-02-02 00:59:45 +01:00
Marco Bartoli 5ae3be3ac9
avm2: Ignore version marks in non-playerglobal namespaces 2024-02-01 21:50:26 +00:00
Kamil Jarosz 4154a0945d text: Implement advanced horizontal text controls for EditText 2024-02-01 20:18:29 +01:00
Kamil Jarosz 0657d2daa2 text: Add advanced horizontal text control codes 2024-02-01 20:18:29 +01:00
Kamil Jarosz b39919951b wstr: Add UTF-8/UTF-16 index mapping
Methods `utf8_index` and `utf16_index` from `WStrToUtf8`
may be used to map code unit indices between UTF-8 (str)
and UTF-16 (WStr) strings.
2024-02-01 20:18:29 +01:00
Nathan Adams 50dedc3cb9 avm1: Invalidate cacheAsBitmaps when using Color API 2024-02-01 19:27:33 +01:00
Lord-McSweeney 2ccad62378
core: Implement `focusIn` `FocusEvent` for AVM2 (#14723) 2024-02-01 08:22:36 +00:00
Aaron Hill 78873e3670 avm2: Add new 'stub-report' binary crate
This writes the AVM2 stub report to the specified path.
2024-01-31 20:22:06 -05:00
Nathan Adams 25b5c7b4e2 avm2: Track progress of avm2 and generate an implementation.json 2024-01-31 20:22:06 -05:00
Robert Setter abc8815445 avm1: Match random behaviour to avm2 2024-02-01 00:19:21 +01:00
Lord-McSweeney e656ebf6ac avm2: Stub `flash.system::MessageChannel` 2024-01-31 09:24:42 -08:00
Adrian Wielgosik 4971f5be2d avm2: Prevent chained dependent strings 2024-01-30 23:21:37 +01:00
Adrian Wielgosik ecbb0f92f1 avm2: Add small string store to interner, expand use 2024-01-30 23:21:37 +01:00
Adrian Wielgosik 7aa95fe463 avm2: Dependent strings POC 2024-01-30 23:21:37 +01:00
Aaron Hill 12c47047b8 debug_ui: Display 'Movie' button on 'Class Info' panel 2024-01-30 17:26:05 +01:00
renovate[bot] 3737725a21 fix(deps): update rust dependencies 2024-01-30 09:23:15 +01:00
Lord-McSweeney dbc1015ef5 avm2: Resolve review comments and fix verifier brokenness 2024-01-29 22:48:00 -08:00
Lord-McSweeney 8b29ceaafa avm2: Write a `make_error_1032` function and use it 2024-01-29 22:48:00 -08:00
Lord-McSweeney c1c3351654 avm2: `Op::Coerce` should not accept a 0-index `Multiname` 2024-01-29 22:48:00 -08:00
Lord-McSweeney fcf83d7dd9 avm2: Properly verify constant pool lookups for `Op::Coerce` and `Op::AsType` 2024-01-29 22:48:00 -08:00
Lord-McSweeney 442391ea60 avm2: Fix a minor bug where `CoerceD` was removed after `Inc`/`DecLocal` 2024-01-29 22:48:00 -08:00
Lord-McSweeney 7b853a8cd9 avm2: One more lazy multiname fix 2024-01-29 22:48:00 -08:00
Lord-McSweeney ce41362b1e avm2: Fix some potentially-failing unwraps and broken code in the verifier 2024-01-29 22:48:00 -08:00
Lord-McSweeney 50b752c35b avm2: Add longer comment to logic to determine register types 2024-01-29 22:48:00 -08:00
Lord-McSweeney dd35e4862f avm2: Fix crash when `Coerce`/`AsType` used a lazy multiname 2024-01-29 22:48:00 -08:00
Lord-McSweeney dd82126448 avm2: Optimize unnecessary `Coerce` when it comes after `PushString`, `NewArray`, and `NewFunction` 2024-01-29 22:48:00 -08:00
Lord-McSweeney f99c5621ee avm2: Add more ops that are guaranteed to not throw errors to `verify::ops_can_throw_error`
This requires a minor change to `Activation::op_lookup_switch`
2024-01-29 22:48:00 -08:00
Lord-McSweeney 6be4918d77 avm2: Resolve reviews 2024-01-29 22:48:00 -08:00
Lord-McSweeney e6c5ba51e4 avm2: Optimize `Coerce` out when it comes right after another `Coerce` pointing to the same cpool entry 2024-01-29 22:48:00 -08:00
Lord-McSweeney 28edee498b avm2: Make `verify_code_starting_from` use a worklist instead of running recursively
This fixes a stack overflow on one test.
2024-01-29 22:48:00 -08:00
Lord-McSweeney b4f016c1cd avm2: Add `CoerceU` op optimizations 2024-01-29 22:48:00 -08:00
Lord-McSweeney 30f99bcd19 avm2: Add optimizations for `Coerce` and `AsType` after `PushNull`, fix `optimize` panicking when out-of-bounds local registers are mentioned 2024-01-29 22:48:00 -08:00
Lord-McSweeney 3f76b248e9 avm2: Remove `Label` op since it is only relevant to the verifier, inline `CoerceA` and `Nop` 2024-01-29 22:48:00 -08:00
Lord-McSweeney 8e997f0131 avm2: Optimize a GetProperty after a GetLocal0 to GetSlot or CallMethod 2024-01-29 22:48:00 -08:00
Lord-McSweeney 8d3847b216 avm2: Add default xml namespace handling opcodes since several SWFs mention them but don't actually use them 2024-01-29 22:48:00 -08:00
Lord-McSweeney c4a3b3f49f avm2: Implement simple Op::CoerceX optimizations 2024-01-29 22:48:00 -08:00
Lord-McSweeney f9fb739460 avm2: Record all possible jump targets, remove Convert-B/D/I/U opcodes since those are equivalent to the corresponding CoerceX opcodes 2024-01-29 22:48:00 -08:00
Lord-McSweeney 2022321a03 avm2: Add an `Op` enum to AVM2; pre-pool double/uint/ints for `pushX` opcodes 2024-01-29 22:48:00 -08:00
Lord-McSweeney 65848104a6 avm2: Implement verifier based off Adrian's initial work 2024-01-29 22:48:00 -08:00
Aaron Hill 1cf669c75e avm2: Convert invalid rectangle to zero rectangle in getBounds 2024-01-29 13:25:16 -05:00
Aaron Hill f31d9bc491 avm2: Make Math.random() more closely match Flash Player
See the comments for details. Our previous implementation
was 'too good', and broke Bloons Tower Defense 5 by
generating `Number`s that Flash Player would never generate.
2024-01-28 22:46:19 -05:00
Fancy2209 f2880975ba
avm2: Report OS as Windows instead of Linux for now (#14985) 2024-01-28 22:10:54 +00:00
Aaron Hill 5b685d411f chore: Fix nightly Clippy lints 2024-01-28 16:03:29 -05:00
Tom Schuster b8d8aafe89 avm2: Implement the remaining flash.net.FileReference properties 2024-01-28 17:14:10 +01:00
Adrian Wielgosik 4981cbd89b avm2: Avoid double lookup in setPropertyIsEnumerable 2024-01-27 16:51:17 +01:00
Crowdin Bot 4769a45999 chore: Update translations from Crowdin 2024-01-26 22:54:04 +01:00
Tom Schuster 7a73dd0661 avm2: Only use embedded CFF fonts for TLF 2024-01-26 21:57:48 +01:00
sleepycatcoding 36fc30e283 debug_ui: Do not render container as collapsible if it has no children 2024-01-26 20:34:49 +01:00
Moulins ac7086528f avm1: Implement proper behavior for Gradient***Filter array setters
Among other things:
- resizing `colors` should also resize `alphas` and `ratios`
- shrinking `ratios` should also shrink `colors` and `alphas`, but
  growing it doesn't change the size
2024-01-26 18:40:06 +01:00
Moulins 19ff294e60 avm1: Follow FP 32 (not FP 11) behavior for ColorMatrix/ConvolutionFilter 2024-01-26 18:40:06 +01:00
Moulins bd2165bd0f swf: Properly read/write ConvolutionFilters; these contain f32s, not Fixed16s 2024-01-26 18:40:06 +01:00
Moulins 659917bff2 avm1: Fix inaccuracies in DisplacementMapFilter
- `mode` should reject non-lowercased values
- `mapPoint` should reset to `(0, 0)` when set to an invalid value
2024-01-26 18:40:06 +01:00
Moulins 5ef911abc9 avm1: Don't overwrite alpha when setting the color field on BitmapFilters 2024-01-26 18:40:06 +01:00
Kamil Jarosz ec345d20a5 core: Improve HTML handling for EditText and add support for SWF 6,7
This patch improves the logic of parsing and formatting HTML
for EditText, and adds support for SWF versions 6 and 7.

Examples of bugs fixed:
* invalid HTML: When generating HTML, Ruffle sometimes generated
  mismatched tags, e.g. tried to close a tag which was never opened.
* text outside of tags: sometimes, especially in case of multiline
  fields with multiple paragraphs, Ruffle generated proper tags,
  but the text was placed outside of them.
* BR/SBR closing issues: When opened, Ruffle waited for a close tag
  and ignored every other closing tag. BR/SBR do not need to be closed,
  so Ruffle often waited indefinitely.
* P/LI behavior: P and LI have a very peculiar behavior, but a very
  important one, because it influences the number of paragraphs/bullets
  and thus newlines for multiline fields.

Support for SWF 6,7:
* whitespace in SWF 6,7: SWF versions 6,7 ignore witespace-only text.
  This significantly influences the behavior of newlines and paragraphs.
* kerning in SWF 6,7: Enabling kerning in `<font>` works only for SWF 8+.
* multiline in SWF 6: FP 6 defines the `multiline` property, but it
  completely ignores it, and the field behaves as if it's always multiline.
2024-01-26 18:20:06 +01:00
Kamil Jarosz 5422792eb7 core: Add font and style structures for TextSpan
They make operating on text spans more natural, e.g. easy comparison.
2024-01-26 18:20:06 +01:00
Daniel Jacobs 119a093c27
web: Add allowFullscreen embed/object option (part of #4258) 2024-01-26 10:06:29 +00:00
Kamil Jarosz 62a46c7b60 core: Ignore font style in default TextFormat for HTML fields
It seems that font styles in the default text format
are ignored when dealing with an HTML field.

This patch revisits the fix from feacbdc1 (#13615),
which assumed that `<font>` resets font style.
That does not seem to be the case, but rather the bug
was caused by the invalid default text format,
which forced the text to be bold, due to the bold
variant of the font being linked to the text field.

This patch reverts 2f84d468 (#1201), which assumed that
the default color for a text span has 100% alpha.
The test added here contradicts it and it seems that
the default color is in fact rgba(0,0,0,0).
Testing the original SWF suggests that the underlying problem
has been fixed since that time.
2024-01-26 08:37:24 +01:00
David Wendt 4031659c9e core: Use the last processed tag time for stream time in case of buffer underruns. 2024-01-25 23:24:09 -07:00
David Wendt 56c14be708 core: Buffer overruns should not pause the stream unless we are actually at the end of the video. 2024-01-25 23:24:09 -07:00
David Wendt 14dec5dcce avm1: `bytesTotal` should actually get `bytesTotal` 2024-01-25 23:24:09 -07:00
David Wendt 092e20a1be core: Adding data to the buffer should reactivate the stream. 2024-01-25 23:24:09 -07:00
David Wendt 899e02fd82 core: Inform `NetStream` of the expected stream length.
`NetStream` uses this information to reserve stream buffer capacity. It also exposes this information to AVM via `bytesTotal`.
2024-01-25 23:24:09 -07:00
David Wendt 006c3af4b8 core: Add backend method for getting the expected length of a response. 2024-01-25 23:24:09 -07:00
David Wendt 08ee3ea638 core: Load all `NetStream` data in chunks. 2024-01-25 23:24:09 -07:00