Commit Graph

1725 Commits

Author SHA1 Message Date
sleepycatcoding 83cc8cf294 avm2: Implement a few avmplus XML edge cases 2024-06-02 01:52:52 +03:00
Tom Schuster cdbc6d289c avm2: Implement the abstract equality comparison for QName 2024-06-01 20:52:17 +02:00
Kamil Jarosz f0c41cdc4f tests: Rename cache_as_bitmap/edittext_selection_filters
The _filters prefix is superfluous, as we are already
in the cache_as_bitmap directory.
2024-05-31 22:24:34 +02:00
Kamil Jarosz a561945fae tests: Add cache_as_bitmap/edittext_scroll test
This test verifies that the edittext is scrollable when cached as bitmap.
2024-05-31 22:24:34 +02:00
Kamil Jarosz 4b8d6f5990 tests: Add AutomatedEvent::MouseWheel
This event allows testing mouse scrolling.
2024-05-31 22:24:34 +02:00
sleepycatcoding 2fd5dfde9c avm2: Implement XMLList.normalize 2024-05-31 22:09:17 +02:00
Tom Schuster 0b2881c8a6 tests: A simple test for ToXMLString with namespaces 2024-05-30 21:14:06 +02:00
TÖRÖK Attila 42ea1331c1 tests: Add a visual test for H.264 video decoding
Featuring the legendary Big Buck Bunny.
2024-05-30 20:22:33 +02:00
TÖRÖK Attila b7a100337e tests: Make H.264 videos work in visual tests 2024-05-30 20:22:33 +02:00
sleepycatcoding 007a532717 avm2: Implement XMLList.contains 2024-05-30 00:43:45 +03:00
Daniel Jacobs bb00d7a8ab chore: Remove inaccurate syntax comment from another AS file 2024-05-29 09:36:04 -04:00
Daniel Jacobs 7a36473f0f chore: Remove inaccurate syntax comment from AS file 2024-05-29 09:36:04 -04:00
Kamil Jarosz fe4e180adf tests: Add attach_movie_stop test
This test verifies that stop() works properly for a movie clip
attached with attachMovie in DoInitAction.
2024-05-28 23:57:13 +02:00
Kamil Jarosz 2ee5d522bf tests: Add focus_visibility_change test
This test verifies the behavior of focus when its visibility is changed.
2024-05-28 23:01:12 +02:00
Kamil Jarosz 133ea462ba tests: Update focus_remove test
Make sure that focus change is logged even if the focus is removed.
That additionally verifies that handlers are properly called.
2024-05-28 23:01:12 +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 f195b5b38a tests: Add edittext_drag_select test
This test verifies that text in ExitText may be selected by dragging.
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
Kamil Jarosz 1080c8bffa tests: Add button_keypress_vs_tab test
This test verifies that the KeyPress event handling
has precedence over tabbing.
2024-05-25 01:12:43 +02:00
Kamil Jarosz 3aa7c07e95 tests: Add edittext_selection_filter test
This test verifies that selection is rendered when filters are present.
2024-05-24 23:52:03 +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
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
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
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 710232ee69 tests: Add tab_ordering_automatic_advanced test
This test verifies the exact behavior of the automatic tab order.
2024-05-16 21:40:56 +02:00
Kamil Jarosz f4fb689c7b tests: Fix tab_ordering_automatic_order_same_position
This test was passing totally by accident.

It contained two objects that were lying on the same y=-(x-p)/6 line.
Using the automatic order, only one of these objects should be tabbable,
however in output.txt we can see them both (clipInner2 and clip5b).
That's because the test was performed in FP with a zoom less than 100%,
which apparently changed how FP sees coordinates.
2024-05-16 21:40:56 +02:00
Nathan Adams 519de0e230 avm1: Implement __resolve 2024-05-15 22:45:56 +02: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 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 94bd9be4b8 tests: Add tab_ordering_custom_duplicate_index test
This test verifies the custom tab ordering when multiple objects
have the same tab index.
2024-05-14 18:33:46 +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
Kamil Jarosz 636011e95e tests: Add focus_highlight_avm1_button test
This test verifies how the highlight behaves for AVM1 buttons.
2024-05-10 23:52:01 +02:00
Kamil Jarosz b4cbac6964 tests: Add button_keypress_vs_press test
This test ensures that button key press events take precedence
over pressing focused buttons with keyboard.
2024-05-10 22:42:03 +02:00
Kamil Jarosz df5e5e6035 tests: Add focus_keyboard_press test
This test verifies the behavior of pressing buttons with a keyboard.
2024-05-10 22:42:03 +02:00
Kamil Jarosz ea3ac098dd tests: Add avm1/button_key_events_special test
This test verifies the behavior of button events when
special characters are pressed.
2024-05-09 21:13:13 +02:00
Kamil Jarosz fb2d8222eb tests: Add avm1/button_keypress_vs_textinput test
This test ensures that button key press events take precedence
over text input.
2024-05-09 21:13:13 +02:00
Kamil Jarosz cc3316188a tests: Add focus_highlight_move test
This test verifies the behavior of focus hightlight when the
focused element is transformed; additionally, it verifies how
the active highlight behaves when _focusrect is set to false.
2024-05-09 00:40:25 +02:00
Kamil Jarosz 45dca764c6 tests: Add avm2/focus_remove test
This test verifies the behavior of stage.focus
when the focus is removed from the stage.
2024-05-07 22:56:25 +02:00
Kamil Jarosz b3091ec785 tests: Add avm1/focus_remove test
This test verifies the behavior of Selection.getFocus()
when the focus is removed.
2024-05-07 22:56:25 +02:00
Adrian Wielgosik 19b7cc9025 avm2: Add extra failing tests for button child events 2024-05-07 22:42:52 +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 d852c74b3a tests: Add avm2/filereference_save_and_load test
This test ensures that the error 2037 is thrown
when load is called after save.

It's currently a known failure as Ruffle is not as strict as FP
regarding throwing the error 2037.
2024-05-07 22:26:30 +02:00
Kamil Jarosz 6ea64c92f4 tests: Add avm2/filereference_save_and_browse test
This test verifies how FileReference behaves when a browse (and load)
operations are triggered after save.

Additionally, it marks the commented out code related to reporting
file size as FIXME, because the current implementation reports
the size at all times, instead of only after saving.
2024-05-07 22:26:30 +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 0f1c647c1c tests: Add avm2/edittext_selected_text test 2024-05-06 22:17:41 +02:00
Kamil Jarosz eef694e9da tests: Add missing text control codes 2024-05-06 22:17:41 +02:00
Kamil Jarosz e09e199eb3 tests: Fix text control codes mapping 2024-05-06 22:17:41 +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 8a9d4f52c4 tests: Add avm2/focus_stage test
This test verifies the behavior of focus and focus highlight
for the stage object.
2024-05-04 17:05:24 -07:00
Colin d970c32ac0 tests: add avm1/mcl_loadclip_onload_target 2024-05-02 17:37:20 +02:00
Kamil Jarosz e89869660f tests: Add avm1/tab_ordering_custom_m1
This test verifies the behavior of tabIndex = -1.
2024-04-30 14:23:45 +02:00
Kamil Jarosz 8f288b5e97 tests: Update avm2/tab_ordering_properties
Add a case with tabIndex = -1.
2024-04-30 14:23:45 +02:00
Kamil Jarosz 71bcaae3fc tests: Add avm2/focusrect test
This test verifies when the highlight is rendered depending on
the value of `focusRect` and `stageFocusRect` in AVM2.
2024-04-29 23:41:40 +02:00
Kamil Jarosz e2738a6980 tests: Add avm2/focusrect_property test
This test verifies the behavior of InteractiveObject.focusRect
property in AVM2.
2024-04-29 23:41:40 +02:00
Kamil Jarosz 4715c2d459 tests: Fix matching tests with test kinds
libtest_mimic adds test kind as a prefix (e.g. `[kind] test`
instead of `test`), which has to be taken into account when
filtering for possible test candidates. This patch ensures
compatibility with libtest_mimic when using test kinds.
2024-04-29 22:45:16 +02:00
Kamil Jarosz e40374c403 tests: Improve test lookup on exact match
Regression tests were looked up using full directory walk
regardless of whether there was an exact match or not.
This patch looks up the test on exact match without
scanning for all tests. This improvement is important
due to how nextest executes tests: one by one using exact matches.
2024-04-29 22:45:16 +02:00
Kamil Jarosz 7006b08095 tests: Add avm2/tab_ordering_properties
This is an AVM2 version of avm1/tab_ordering_properties
2024-04-29 21:54:06 +02:00
Kamil Jarosz b915b21622 tests: Add avm2/tab_ordering_children test
This test verifies the behavior of tabChildren.
2024-04-29 21:54:06 +02:00
Kamil Jarosz 9e751824ff tests: Add avm2/tab_ordering_automatic_basic
This is an AVM2 version of avm1/tab_ordering_automatic_basic
2024-04-29 21:54:06 +02:00
Kamil Jarosz 1624cc9c98 tests: Add avm2/tab_ordering_custom_basic
This is an AVM2 version of avm1/tab_ordering_custom_basic
2024-04-29 21:54:06 +02:00
Kamil Jarosz 566590ac1f tests: Add avm2/tab_ordering_tabbable
This is an AVM2 version of avm1/tab_ordering_tabbable
2024-04-29 21:54:06 +02:00
Kamil Jarosz 40bc787fd7 tests: Add tab_ordering_custom_i32_vs_u32 test
This test verifies the behavior of i32/u32 discrepancy
in tabIndex in AVM1.
2024-04-29 21:54:06 +02:00
Kamil Jarosz 712ab7fce1 tests: Update avm1/tab_ordering_properties
Add a case of a non-editable text field.
2024-04-29 21:54:06 +02:00
Kamil Jarosz 0c03aacb59 tests: Update avm1/tab_ordering_tabbable
Add a case of a dynamic text field with tab enabled.
2024-04-29 21:54:06 +02:00
Kamil Jarosz 86c0a30166 tests: Add textline_inapplicable_properties test
This test verifies the behavior of inapplicable
properties of `TextLine`.
2024-04-29 21:18:08 +02:00
Kamil Jarosz 31d8d98a10 tests: Add focusrect_mouse_swf8 test
This test verifies the behavior of focus highlight when
mouse is moved and mouse buttons are clicked for SWF8.
2024-04-24 00:49:37 +02:00
Kamil Jarosz a594d8d9ac tests: Add focusrect_mouse_swf9 test
This test verifies the behavior of focus highlight when
mouse is moved and mouse buttons are clicked for SWF9.
2024-04-24 00:49:37 +02:00
Kamil Jarosz 9bc5735d0d tests: Add stage_properties2 test 2024-04-23 23:13:02 +02:00
Adrian Wielgosik fd281cc715 avm2: Add IS_QNAME flag to Multiname, improve XML name matching 2024-04-22 22:08:40 +02:00
Kamil Jarosz 1f5d19971b tests: Add avm1/tab_ordering_events_mouse test
This test verifies how the behavior of tabbing is integrated with
the mouse with respect to rollOut/rollOver events.
2024-04-22 00:53:20 +02:00
Kamil Jarosz f3c9a84058 tests: Add avm1/tab_ordering_events test
This test verifies events produced by various interactive objects
while tabbing.
2024-04-22 00:53:20 +02:00
Kamil Jarosz d4bab66979 tests: Update avm1/selection_handlers test
Extend this test to cover rollOut/rollOver events too.
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
turicfr 41bba9d5a5 tests: Update `movieclip_getbounds` test
This now enumerates the returned object using `Enumerate2` to match
the order of the stored properties.
2024-04-20 21:58:32 +02:00
Adrian Wielgosik 6ce88f24de avm2: Add an extra test for sparse arrays 2024-04-20 21:41:33 +02:00
jarca0123 7e349d9190 avm2: Add support for sparse arrays 2024-04-20 21:41:33 +02:00
Tom Schuster 02148b2891 tests: Test null data 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
Kamil Jarosz 93cd772b20 tests: Fix a typo in tab_ordering_tabbable 2024-04-17 11:20:52 -07: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
Nick 752ced391c
avm1: use correct coordinates for hitTest (#15894) 2024-04-09 17:11:21 +00:00
Kamil Jarosz fc37555f66 tests: Add button_key_events test
This test verifies that all key-related events are properly firing
when a key is pressed and a button is focused.
2024-04-08 22:16:50 +02:00
Lord-McSweeney acd2d36790 tests: Add a test for a lookupswitch edge case 2024-04-05 00:34:50 +02:00
Lord-McSweeney 41100a9111 avm2: Add test for checking that exception targets are considered 2024-04-05 00:34:50 +02:00
Kamil Jarosz 686790409b tests: Add tab_ordering_tabbable test
This test verifies what objects are tabbable by default
and after setting tabEnable & tabIndex. This test includes:
* invisible objects,
* objects with 0x0 size,
* object outside of visible window bound,
* objects within invisible containers,
* non-selectable texts,
* non-editable texts.
2024-04-04 22:53:19 +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 9d665ce448 chore: Use workspace version for serde 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 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 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
Nathan Adams 8e4127aef6 chore: Use workspace version for anyhow 2024-04-04 17:29:00 +02:00
Kamil Jarosz 7f3c046a76 tests: Add focusrect_swf5 test
This test verifies the behavior of _focusrect for SWF5.
2024-04-04 10:58:42 +02:00
Kamil Jarosz cebd7f0e5c tests: Add focusrect_swf6 test
This test verifies the behavior of _focusrect for SWF6.
2024-04-04 10:58:42 +02:00
Kamil Jarosz 254cdabaf3 tests: Add focusrect_property_swf5 test
This test verifies the behavior of _focusrect for SWF 5.
2024-04-04 10:58:42 +02:00
Kamil Jarosz 7510780c67 tests: Add focusrect_property_swf6 test
This test verifies the behavior of _focusrect for SWF 6.
2024-04-04 10:58:42 +02:00
Kamil Jarosz fe43e1aa6a tests: Add focusrect_property_swf7 test
This test verifies the behavior of _focusrect for SWF 7.
2024-04-04 10:58:42 +02:00
Kamil Jarosz 501b42c63f tests: Add tab_ordering_movieclip_enabled_default test
This test verifies the logic behind the default value of
`MovieClip.tabEnabled` when it's undefined.
2024-04-02 00:31:34 +02:00
Kamil Jarosz a150fb3e69 tests: Add focus_highlight/focus_highlight_render 2024-04-01 23:38:59 +02:00
Kamil Jarosz 04eedcd4b4 tests: Add focus_highlight/focus_highlight_basic 2024-04-01 23:38:59 +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 f30824bf06 tests: Add tab_ordering_automatic_order_same_position test
This test verifies the behavior of duplicate (x,y) positions of objects.
Turns out, FP actually ignores other objects with the same position,
retaining only the first one.
2024-04-01 22:48:59 +02:00
Kamil Jarosz 12ff34d536 tests: Add tab_ordering_automatic_order_grid test
This test tests a grid with randomized (x,y) positions,
depths, and SWF tag positions.
It proves that mainly the position on the screen
determines the automatic order.
2024-04-01 22:48:59 +02:00
TÖRÖK Attila 36413a70f2 chore: Remove or ignore any unused deps detected by cargo-machete 2024-04-01 22:29:38 +02:00
Tom Schuster a8c917a788 tests: Add a test for DisplayObject.metaData 2024-04-01 12:31:59 +02:00
Kamil Jarosz d0e2483bc7 tests: Add tab_ordering_children test
This test verifies the behavior of `tabChildren`: how it affects
automatic and custom tabbing, and how it behaves in a hierarchy.
2024-03-30 00:15:45 +01:00
Kamil Jarosz c3843d2bf9 tests: Add tab_ordering_reverse test 2024-03-29 23:20:15 +01:00
Kamil Jarosz bc9aa18d6f tests: Add AutomatedEvent::KeyUp 2024-03-29 23:20:15 +01:00
Kamil Jarosz 67a04dcc75 tests: Add tab_ordering_properties_tab_index_edge_case test
This test covers the edge case of MovieClip.tabIndex,
where setting it to a string at the start returns this string
instead of a numerical value.
2024-03-27 00:40:24 +01:00
Kamil Jarosz 14820e59bf tests: Add tab_ordering_properties test
This test verifies the behavior of properties related to tab ordering.
2024-03-27 00:40:24 +01:00
Kamil Jarosz cc800da878 tests: Add tab_ordering_custom_basic test
This test checks the basic support of tab ordering
and its custom mode.
2024-03-27 00:40:24 +01:00
Kamil Jarosz 7e872a1b00 tests: Add tab_ordering_automatic_basic test
This test checks the basic support of tab ordering
and its automatic mode.
2024-03-27 00:40:24 +01:00
renovate[bot] 9dfc6dc224 fix(deps): update rust dependencies 2024-03-26 13:56:59 +01:00
renovate[bot] 98cbe9cf31 fix(deps): update rust dependencies 2024-03-25 02:47:32 +01: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 ec99bedcf8 avm1: added mouse_wheel_enabled to text fields 2024-03-18 22:17:32 +01:00
TÖRÖK Attila 7a269c054d fix(deps): update rust dependencies 2024-03-18 12:21:47 +01:00
renovate[bot] 3f9f19b7ac fix(deps): update rust dependencies 2024-03-14 16:45:29 +01:00
Tom Schuster a3a83ab1b8 tests: Test Object.prototype.toString when called on Vectors 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 a72d56c3ad tests: Test AVM2 toString on primitive objects 2024-03-12 21:00:26 -07:00
Tom Schuster 0466605b62 tests: Test RegExp toString behavior 2024-03-10 21:27:39 +01:00
Aaron Hill 7752c32c8e
avm2: Stub GameInput.getDeviceAt and GameInputControl (#15409) 2024-03-09 22:01:10 +00:00
Tom Schuster f27d11443b tests: Test avm2 Stage.stage3Ds vector-ness 2024-03-07 19:33:09 +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 41bac2ce98 tests: Add another verification test 2024-03-06 07:21:28 -08:00
Lord-McSweeney 2ff4bf5634 tests: Improve verification test 2024-03-06 07:21:28 -08:00
Nathan Adams 09dfa6427e desktop: Allow changing the language in Preferences 2024-03-05 00:02:27 +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
renovate[bot] c2179e88db fix(deps): update rust dependencies 2024-03-02 10:05:43 +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
TÖRÖK Attila e288375543 tests: Add a failing test for Timer.setDelay changing ID 2024-02-27 23:56:33 +01:00
renovate[bot] 9cdb2f31cc fix(deps): update rust dependencies 2024-02-26 08:14:26 +01:00
renovate[bot] 6b89737093 fix(deps): update rust dependencies 2024-02-19 11:32:22 +01:00
Tom Schuster ba7c9a4e31 avm2: Always serialize as ECMAArray, which produces an AMF0 MixedArray 2024-02-19 10:13:18 +01:00
Nathan Adams 8d9b50d4f4 tests: Port remainder of shumway tests over 2024-02-18 18:01:28 +01:00
Nathan Adams 0eab4405f6 tests: When a test is known_failure but doesn't have an expected.png, don't mark it as now-passing 2024-02-18 18:01:28 +01:00
Nathan Adams 50961bd684 tests: Don't test NaN output in amf_vector 2024-02-16 01:33:22 +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
svitkin b55db7083c tests: Add test for flash.net.navigateToURL 2024-02-12 17:14:11 +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 ec403e614d tests: Test TextField::getLineText 2024-02-07 20:34:43 +01:00
David Wendt e1bfd6f360 tests: Fix text failures caused by improper `output.txt` contents
For some reason, FP8 doesn't show the events anymore on its test output, even though the test it has clearly outputs both the connection status and events.

Also, the AVM2 test needs a trailing newline like all the others.
2024-02-07 19:46:39 +01:00
David Wendt 2e0dbba1b4 tests: AVM2 should also test to make sure `NetConnection.connected` works 2024-02-07 19:46:39 +01:00
David Wendt d7583289c9 avm1: Make `NetConnection.isConnected`'s stub more functional 2024-02-07 19:46:39 +01:00
Tom Schuster 95f5701072 tests: Verify the URLRequest method setter can throw 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
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
Kamil Jarosz 50b5f29c0a text: Make enter add a new line in multiline fields 2024-02-03 13:40:07 +01:00
Nathan Adams 50dedc3cb9 avm1: Invalidate cacheAsBitmaps when using Color API 2024-02-01 19:27:33 +01:00
Tom Schuster 120394ca7c tests: Add test for focusIn FocusEvent on a TextField 2024-02-01 12:52:10 +01:00
renovate[bot] 3737725a21 fix(deps): update rust dependencies 2024-01-30 09:23:15 +01:00
Lord-McSweeney a756970072 tests: Add a test for AVM2 verification 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
Aaron Hill 5b685d411f chore: Fix nightly Clippy lints 2024-01-28 16:03:29 -05:00
Tom Schuster 40c0f90105 tests: Test all remaining FileReference properties 2024-01-28 17:14:10 +01:00
Nathan Adams f678d13ca8 tests: Throw an Err, not panic, in Approximations::compare 2024-01-26 18:59:06 +01:00
Nathan Adams aee051fa45 tests: Split test running into tick/test phases. This is enough to make it work on web. 2024-01-26 18:59:06 +01:00
Nathan Adams b6614d9705 tests: Turn Test::run() into Test::create_test_runner() - handle running externally 2024-01-26 18:59:06 +01:00
Nathan Adams 1b8d3f7392 tests: Output comparison is part of the TestRunner 2024-01-26 18:59:06 +01:00
Nathan Adams 7c4e345905 tests: Make Environment::create_renderer only make one renderer, not N amount 2024-01-26 18:59:06 +01:00
Nathan Adams bd64ee2942 tests: Extract out Test::movie() 2024-01-26 18:59:06 +01:00
Nathan Adams 5040bf3aff tests: Extract out a TestRunner struct 2024-01-26 18:59:06 +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 31e69c51b5 test: Rewrite AVM filter tests and regroup them in a single file
This uncovers some bugs in our implementation, so mark the test as a
known failure for now.
2024-01-26 18:40:06 +01:00
Kamil Jarosz 225f42db2a tests: Test EditText's HTML behavior for SWF version 6 2024-01-26 18:20:06 +01:00
Kamil Jarosz ed59195ad1 tests: Test EditText's HTML behavior for SWF version 7 2024-01-26 18:20:06 +01:00
Kamil Jarosz 03b88259ca tests: Test EditText's HTML behavior for SWF version 8 2024-01-26 18:20:06 +01: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 006c3af4b8 core: Add backend method for getting the expected length of a response. 2024-01-25 23:24:09 -07:00
David Wendt 91dd9563bb core: Add method to read downloads in chunks instead of all-at-once. 2024-01-25 23:24:09 -07:00
David Wendt 06eb2e1ee8 core: `Request` is now a trait. Body download is deferred to a second async method. 2024-01-25 23:24:09 -07:00
Tom Schuster 70b6f62eab tests: Add tests for FileReferenceList browse 2024-01-25 19:10:56 +01:00
Aaron Hill bb9e7c04f7 avm2: Fix handling of Loader.loadBytes for images
I've switched back to the original code for creating
the bitmap/bitmapdata, rather than relying on custom
initialization logic that we only used in loader.

To make sure that the Bitmap/BitmapData are only exposed
to ActionScript at the correct time, I've added a new flag
to control when 'LoaderInfo.content' becomes non-null
2024-01-25 10:35:28 -05:00
Aaron Hill 820e7e828a wgpu: Allow Stage3D texture upload where source is smaller than dest
Fancy Pants World 4 relies on this behavior.
2024-01-25 00:30:10 +01:00
Aaron Hill 1cb24b41b0 render: Support PixelBender ByteArray/Vector.<Number> input/output
When ActionScript uses a ByteArray/Vector.<Number> as a shader input
or target, we create a temporary Rgba32Float texture, and copy the
input float32 bytes to/from the texture.

Unfortunately, wgpu doesn't seem to support an Rgb32Float (3-channel)
texture. When the shader uses 3 channels, we use a Rgba32Float
(4-channel) texture, and manually insert/remove padding for the
alpha channels. This isn't very efficient, but it's the simplest
solution.

The temporary textures themselves aren't cached anywhere - if this
becomes a performance issue, we could look into using some of our
existing wgpu texture/buffer pooling code.
2024-01-24 08:31:52 -05:00
Tom Schuster fbab0f6521 avm2: FileReference save test 2024-01-23 18:43:36 +01:00
Tom Schuster e4e0996fa1 avm2: FileReference load test 2024-01-23 18:43:36 +01:00
Tom Schuster 601748a987 avm2: FileReference browse select test 2024-01-23 18:43:36 +01:00