Commit Graph

11375 Commits

Author SHA1 Message Date
Tom Schuster 7498ed51d8 core: Font kerning is in points not pixels 2024-01-11 21:39:17 +01:00
Tom Schuster ae8c0148c2 core: Use sans instead of serif when missing a font 2024-01-11 10:35:47 +01:00
Kamil Jarosz 5feafb2ca3 avm1: Add support for onSetFocus & onKillFocus
Methods `onSetFocus` & `onKillFocus` are invoked when focus is changed
for `TextField`, `Button`, and `MovieClip`.
Multiple SWFs use these methods to listen to a focus change,
e.g. in order to implement placeholders for text fields.
2024-01-10 21:59:25 -05:00
Aaron Hill c01ab53d2e avm2: Stub flash.text.engine.GraphicElement 2024-01-10 21:29:33 -05:00
Aaron Hill db623a90e8 avm2: Stub TextField.getCharBoundaries 2024-01-10 20:35:29 -05:00
Aaron Hill 57f6963133
render: Implement PixelBender Operation::Select (renamed from Loop) (#14503) 2024-01-11 01:04:50 +00:00
sleepycatcoding aeedec19fa avm2: Implement XML.normalize 2024-01-11 01:30:47 +01:00
dependabot[bot] 46f95a9522 build(deps): bump follow-redirects from 1.15.2 to 1.15.4 in /web
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 01:12:54 +01:00
Tom Schuster 629e8f89ab tests: Add a test for optimized index access from the interpreter 2024-01-10 23:18:40 +01:00
Tom Schuster 82ce40af82 avm2: Optimize op_get_property index access on array-like 2024-01-10 23:18:40 +01:00
Tom Schuster 532279b4e6 avm2: Inline Avm2::peek 2024-01-10 23:18:40 +01:00
Nathan Adams d89e4536b3 core: Support Japanese font defaults 2024-01-10 23:15:26 +01:00
Aaron Hill 9a96941de9 avm2: Improve Graphics.drawGraphicsData stubs
We now produce stubs or clearer errors for unsupported argument
combinations, instead of unclear `RustError`s
2024-01-10 01:53:27 +01:00
Tom Schuster ba3d1bbf66 core: Don't treat known aliases as default fonts before trying to load them as device fonts 2024-01-10 00:41:31 +01:00
nosamu 4db454e933 web: Fix download link 2024-01-09 18:06:50 +01:00
Crowdin Bot 6e1e26e0e8 chore: Update translations from Crowdin 2024-01-08 23:28:34 +01:00
Tom Schuster 4db87a9643 desktop: define default fonts 2024-01-08 23:00:18 +01:00
Tom Schuster b34d3c9ad2 core: Explicitly match and use default fonts, before loading device fonts 2024-01-08 23:00:18 +01:00
Tom Schuster f47e15b68c tests: Add a device font test using Tinos 2024-01-08 23:00:18 +01:00
Tom Schuster 2a2bcbbfbc desktop: Load device fonts from system 2024-01-08 23:00:18 +01:00
Nathan Adams 7e4ac986f2 core: Add FontFace struct, for loading a Font from a file binary 2024-01-08 23:00:18 +01:00
nosamu d97314d315 extension: Bail if postMessage event has no data
Fixes #14486
2024-01-08 18:30:44 +01:00
Aaron Hill 6c2e28a08f Correctly handle zero-frame MovieClip
A MovieClip with zero frames can still have a child added
through ActionScript, which ticks normally.
2024-01-08 08:19:17 -05:00
Daniel Jacobs f8219a06e0 docs: Use new location for sponsor logos 2024-01-08 00:47:12 -05:00
Daniel Jacobs b43981f3d9 docs: Update README to point to the new logo SVG location 2024-01-08 00:47:12 -05:00
renovate[bot] a328deab11 fix(deps): update rust dependencies 2024-01-08 02:59:04 +01:00
Aaron Hill 47db84473a avm2: Improve handling of Stage3D profile
We now validate the passed in profile, and return the selected profile
from 'Context3D.profile'. We don't yet alter the available
registers/textures based on the profile.
2024-01-07 22:34:33 +01:00
Aaron Hill 3156bf31ce avm2: Throw correct errors in Graphics.[drawPath,drawGraphicsData]
This is pretty straightforward, except for the fact that Flash
completely ignores the provided commands when the 'data' vector
is empty (if 'data' has even a single entry, then Flash will validate
that all of the commands have the correct amount of data to run).

One SWF that I tested relies on this behavior.
2024-01-07 19:57:47 +01:00
Tom Schuster e0abe72da4 avm2: Stub more TextField getLine methods 2024-01-07 12:29:26 -05:00
TÖRÖK Attila 857c3af64f ci: Allow retrying Rust tests, when also running visual tests, temporarily
Because of a crash in the Ubuntu 22.04 graphics drivers.
2024-01-07 05:58:13 +01:00
TÖRÖK Attila 8215ff6fbf ci: Only check formatting and documentation on Linux
To speed up the rest of the runners - they were doing
duplicate work anyway.
2024-01-07 05:58:13 +01:00
TÖRÖK Attila 268a1f5d18 tests: Remove most uses of exclude_warp
They no longer seem necessary with cargo nextest.
2024-01-07 05:58:13 +01:00
TÖRÖK Attila 6876fe8226 ci: Switch to cargo nextest
- This will help avoid deadlocks with wgpu 0.18 (wgpu/#4885), as every
  test is run in a separate process.
- Similarly, WARP seems to be less sensitive to hanging this way.
- Run on 4 threads at once, to overlap CPU-bound and IO-bound work.
2024-01-07 05:58:13 +01:00
nosamu 95ad0f103f avm2: Stub flash.globalization.DateTimeFormatter
Closes #14577
2024-01-06 23:41:53 -05:00
Aaron Hill b96cfed6c7 avm2: Stub TextField.getCharIndexAtPoint 2024-01-06 23:11:43 -05:00
TÖRÖK Attila f0ed5c7211 chore: Upgrade gc-arena to 0.5.0 2024-01-06 09:45:35 +01:00
Crowdin Bot 1325181a59 chore: Update translations from Crowdin 2024-01-06 09:30:28 +01:00
Tom Schuster c28be7bb5f tests: Test XML attribute name handling 2024-01-06 09:16:04 +01:00
Tom Schuster 7da3411fd0 avm2: Revert XML get_property_local to using has_explicit_namespace
This partly reverts #13966. No new test failure, but makes the add test
for `xml["@attr"]` pass.
2024-01-06 09:16:04 +01:00
Tom Schuster 79e0e8b2ae avm2: XML::name() needs to mark attributes as such 2024-01-06 09:16:04 +01:00
Kamil Jarosz 47deaf50a2 core: Fix non-ASCII characters input in EditText
Casting the character to u8 and back to char caused some non-ASCII
non-control characters to be treated as control characters.
For instance the letter "ą" (U+0105) after casting to u8 and back
became ENQ (U+0005) which is a control character.
Some other letters worked, for instance the letter "ł" (U+0142)
became "B" (U+0042) and was not classified as a control character.

The test edittext_input was added to verify this behavior.
2024-01-05 13:03:43 -08:00
TÖRÖK Attila 217585daa8 chore: Delegate `[lints]` in `Cargo.toml` of all packages to the workspace 2024-01-05 11:28:19 +01:00
TÖRÖK Attila 60f01fd517 chore: Move lint configuration from `.cargo/config.toml` to `Cargo.toml`
This got stabilized in Rust 1.74.
2024-01-05 11:28:19 +01:00
Lord-McSweeney 89b7f7a6b8 avm2: Use correct null parameter error in `registerClassAlias` 2024-01-04 21:34:21 +01:00
Tom Schuster dd53b4e06b avm2: Reduce the size of Op on 64bit 2024-01-04 21:15:09 +01:00
Lord-McSweeney 0a6a95e6f1 tests: Add a test 2024-01-03 15:14:11 +01:00
Lord-McSweeney a7716bb744 avm2: Implement FP's logic for parsing XML with multiple nodes 2024-01-03 15:14:11 +01:00
Tom Schuster 8b414c48c7 avm2: Optimize Avm2::push/pop slightly 2024-01-02 20:37:05 +01:00
Tom Schuster c8901d43a4 avm2: Force inlining of do_next_opcode 2024-01-02 20:37:05 +01:00
renovate[bot] c47962fc71 fix(deps): update rust crate syn to 2.0.44 2024-01-01 04:29:05 +01:00