Tom Schuster
7de9135a3b
avm2: Throw special XML parsing error for empty namespace prefixes
2024-09-02 08:25:50 +02:00
TÖRÖK Attila
52eb5d6614
avm2: Add new feature tracy_avm, which emits tracy spans for AVM2 methods
2024-09-02 02:19:15 +02:00
Aaron Hill
a889bd85e5
avm2: Make Sprite.startDrag/stopDrag available to SWF 9
...
The versioning in playerglobal is incorrect - Flash Player
actually exposes this to SWF 9
2024-09-01 17:22:40 -04:00
Kamil Jarosz
898db260a3
core: Add support for wider range of key codes
...
This patch changes the definition of KeyCode from an enum,
which was constraining the possible key codes, to a struct with
a u32 field, which covers all possible cases of a key code.
Key codes in Flash are not related to the physical buttons,
but rather to logical button values.
For instance, typing a non-ASCII key produces a key code related
to that character, and using a non-ANSI keyboard or a layout different
from US QWERTY also produces results matching that assumption.
2024-09-01 21:02:34 +02:00
Lord-McSweeney
ad0d3f8fbf
avm2: Pass `arguments` to QName native initializer
...
avmplus test `e4x/QName/e13_3_2` now passes
2024-08-31 14:22:12 -07:00
Lord-McSweeney
b4b9c75118
avm2: Rename native instance initializer to super initializer
2024-08-31 14:22:12 -07:00
Lord-McSweeney
fc820b7710
avm2: Make several slot operations faster
...
- `get_slot` and `set_slot_no_coerce` now panic instead of returning Err
- `get_slot` is now inlined
2024-08-31 13:16:05 -07:00
Lord-McSweeney
7214440418
avm2: Switch `ScriptObjectData.slots` from `RefLock<Vec<Value>>` to `Vec<Lock<Value>>`
2024-08-31 13:16:05 -07:00
Lord-McSweeney
52e8534aba
avm2: Ensure global object always has correct vtable
2024-08-31 13:16:05 -07:00
MartySVK
ea85dd6dfc
avm2: Added missing `[API()]` to variables from the list
2024-08-31 21:05:29 +02:00
Tom Schuster
2fd8f600bc
avm2: Correctly set XML attribute with namespace
2024-08-31 00:35:12 +02:00
Tom Schuster
795fa0df27
avm2: Throw special XML parsing error for unmatched end tag at the root level
2024-08-31 00:20:01 +02:00
oad
9505da8438
core: use char slicing instead of byte slicing ( #17686 )
...
* core: use char slicing instead of byte slicing (close #17675 )
Fix a panic which can occur when pasting non-ASCII characters into a
textbox. Use char slicing instead of byte slicing when limiting the
length of the text being pasted in. This fixes issue #17675 .
* tests: Add test for issue 17675
* tests: fix incorrect output in test "avm2/issue_17675"
The output expected the text to be pasted at the end, even though it
will be pasted at the beginning, which is the correct behaviour here.
* core: use char length instead of byte length
Use char length instead of byte length for text pasting and setting the
current text selection.
* core: use WString for limiting text length and pasting text
Switch to WString from String for limiting text length and pasting text.
Done to ensure this code won't need to be fixed in the future. This does
not work properly with certain characters (e.g., 4-byte UTF-8 chars),
but that's due to how WString handles those characters.
* lint: fix clippy errors
---------
Co-authored-by: oad <48562304+oaddyk@users.noreply.github.com>
Co-authored-by: Adrian Wielgosik <adrian.wielgosik@gmail.com>
2024-08-30 23:49:50 +02:00
dependabot[bot]
aff78a5d8e
build(deps): bump the cargo-minor group across 1 directory with 8 updates
...
Bumps the cargo-minor group with 8 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [flate2](https://github.com/rust-lang/flate2-rs ) | `1.0.31` | `1.0.33` |
| [serde](https://github.com/serde-rs/serde ) | `1.0.208` | `1.0.209` |
| [bitstream-io](https://github.com/tuffy/bitstream-io ) | `2.5.0` | `2.5.3` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.125` | `1.0.127` |
| [quote](https://github.com/dtolnay/quote ) | `1.0.36` | `1.0.37` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.75` | `2.0.76` |
| [zip](https://github.com/zip-rs/zip2 ) | `2.1.6` | `2.2.0` |
| [reqwest](https://github.com/seanmonstar/reqwest ) | `0.12.6` | `0.12.7` |
Updates `flate2` from 1.0.31 to 1.0.33
- [Release notes](https://github.com/rust-lang/flate2-rs/releases )
- [Changelog](https://github.com/rust-lang/flate2-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.31...1.0.33 )
Updates `serde` from 1.0.208 to 1.0.209
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.208...v1.0.209 )
Updates `bitstream-io` from 2.5.0 to 2.5.3
- [Commits](https://github.com/tuffy/bitstream-io/compare/v2.5.0...v2.5.3 )
Updates `serde_json` from 1.0.125 to 1.0.127
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/1.0.125...1.0.127 )
Updates `quote` from 1.0.36 to 1.0.37
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.36...1.0.37 )
Updates `syn` from 2.0.75 to 2.0.76
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.75...2.0.76 )
Updates `zip` from 2.1.6 to 2.2.0
- [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.6...v2.2.0 )
Updates `reqwest` from 0.12.6 to 0.12.7
- [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.6...v0.12.7 )
---
updated-dependencies:
- dependency-name: flate2
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: bitstream-io
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: 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: zip
dependency-type: direct:production
update-type: version-update:semver-minor
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-08-26 14:04:51 +02:00
dependabot[bot]
1344fe5f90
build(deps): bump wasm-bindgen-futures in the wasm-bindgen group
...
Bumps the wasm-bindgen group with 1 update: [wasm-bindgen-futures](https://github.com/rustwasm/wasm-bindgen ).
Updates `wasm-bindgen-futures` from 0.4.42 to 0.4.43
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases )
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits )
---
updated-dependencies:
- dependency-name: wasm-bindgen-futures
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: wasm-bindgen
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 13:14:35 +02:00
Tom Schuster
102e58b551
avm2: Throw when using delete with XMLList operand (name)
2024-08-26 12:57:47 +02:00
Tom Schuster
a4f03173c2
avm2: Make XML [[Delete]] follow the spec more closely
2024-08-26 12:57:47 +02:00
MartySVK
6ddc28edc4
avm2: Added all missing [API()] to classes from the list
2024-08-24 21:27:18 +02:00
Crowdin Bot
bfd43297be
chore: Update translations from Crowdin
2024-08-24 00:52:55 +02:00
Tom Schuster
a10b31b118
avm2: For AIR report the correct OS in flash.system.Capabilities
2024-08-21 23:16:19 +02:00
crumblingstatue
73919c71c0
core: Make some avm1 object properties editable in debug ui ( #17279 )
2024-08-21 21:04:58 +00:00
Yaman Kassir
6d2644ed48
avm2: support CSS comments and fix whitespace issues ( #17502 )
2024-08-21 20:34:03 +00:00
Tom Schuster
130430e805
avm2: XMLList needs to override has_own_property_string to handle
...
attributes
2024-08-21 22:18:29 +02:00
Tom Schuster
5834f273e2
avm2: Implement XML.removeNamespace
2024-08-21 20:51:52 +02:00
Kamil Jarosz
56f092be2e
desktop: Add "Exit Full Screen" option to context menu
...
This option allows the user to exit full screen
without knowing the Esc shortcut.
2024-08-21 14:31:56 +02:00
TÖRÖK Attila
cd4eeb238f
avm2: Fix GraphicsPath.cubicCurveTo() [API()] version
...
Turns out, the docs were wrong again.
2024-08-20 22:17:22 +02:00
michiel2005
7178f3fd05
core: Refactor some code added in #15627
2024-08-20 19:51:17 +02:00
Moulins
3e215610ca
core: managed `AvmStringRepr`s can now point to a `&'static WStr`
...
This allows `&'static WStr`s to be converted into interned `AvmString`s
without moving the string data into an heap-allocated buffer.
2024-08-20 16:02:41 +02:00
dependabot[bot]
5b3c9722d5
build(deps): bump the cargo-minor group with 9 updates
...
Bumps the cargo-minor group with 9 updates:
| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap ) | `4.5.15` | `4.5.16` |
| [bytemuck](https://github.com/Lokathor/bytemuck ) | `1.16.3` | `1.17.0` |
| [serde](https://github.com/serde-rs/serde ) | `1.0.207` | `1.0.208` |
| [tokio](https://github.com/tokio-rs/tokio ) | `1.39.2` | `1.39.3` |
| [indexmap](https://github.com/indexmap-rs/indexmap ) | `2.3.0` | `2.4.0` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.124` | `1.0.125` |
| [fluent-templates](https://github.com/XAMPPRocky/fluent-templates ) | `0.9.4` | `0.10.1` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.74` | `2.0.75` |
| [reqwest](https://github.com/seanmonstar/reqwest ) | `0.12.5` | `0.12.6` |
Updates `clap` from 4.5.15 to 4.5.16
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.15...clap_complete-v4.5.16 )
Updates `bytemuck` from 1.16.3 to 1.17.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.3...v1.17.0 )
Updates `serde` from 1.0.207 to 1.0.208
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.207...v1.0.208 )
Updates `tokio` from 1.39.2 to 1.39.3
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.39.2...tokio-1.39.3 )
Updates `indexmap` from 2.3.0 to 2.4.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.3.0...2.4.0 )
Updates `serde_json` from 1.0.124 to 1.0.125
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.124...1.0.125 )
Updates `fluent-templates` from 0.9.4 to 0.10.1
- [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.4...fluent-templates-v0.10.1 )
Updates `syn` from 2.0.74 to 2.0.75
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.74...2.0.75 )
Updates `reqwest` from 0.12.5 to 0.12.6
- [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.5...v0.12.6 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: bytemuck
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: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: indexmap
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: fluent-templates
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: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 00:58:16 +02:00
Adrian Wielgosik
cde0ef593c
avm2: Add comment for weird trig consts
2024-08-18 21:38:45 +02:00
Adrian Wielgosik
db61726e5b
avm2: Implement Graphics::drawRoundRectComplex
2024-08-18 21:38:45 +02:00
MartySVK
f84fd985a8
avm2: Added all missing [API()] to methods from the list
2024-08-18 12:08:17 +02:00
Lord-McSweeney
0d37b3de8c
avm2: Ensure `bound_class` is set in `Activation::init_from_method` and remove special case for static methods in optimizer
2024-08-17 10:18:31 -07:00
Lord-McSweeney
7bea8c90ee
chore: appease clippy
2024-08-17 10:18:31 -07:00
Lord-McSweeney
cb5644bcb4
avm2: Fix some confusing naming of subclass and superclass
2024-08-17 10:18:31 -07:00
Lord-McSweeney
6507722f3e
avm2: Make Class class final
2024-08-17 10:18:31 -07:00
Lord-McSweeney
f68baf0f76
avm2: Fix many issues with supercalling methods
...
Supercalling on the global object now works;
supercalling in the class initializer now works; and
supercalling in static methods now uses the correct superclass.
2024-08-17 10:18:31 -07:00
MartySVK
24478ff43f
avm2: Add missing [API()] to flash.geom
2024-08-15 12:47:52 +02:00
Marco Bartoli
fdd86c1da2
avm2: avoid enqueuing Sound.play an infinite amount of times ( #17425 )
2024-08-13 15:57:22 +00:00
Aaron Hill
3b9d9cf230
avm2: Pass in `Gc<'gc, BytecodeMethod<'gc>>` to `optimize`
...
This allows us to pretty-print a method name from within
`optimize` using `display_function` (which needs to do
`Gc::ptr_eq`)
2024-08-12 21:23:33 -04:00
MartySVK
953c6732cc
Fix extra class flash.display
2024-08-12 18:05:56 -07:00
Aaron Hill
7ed2bdb8b6
avm2: Ignore debug opcodes when checking has_simple_scoping
...
Previously, swfs with debug opcodes would never be able to
use the `has_simple_scoping` optimization, since we would fail
to match the getlocal0/pushscope sequence.
We now allow any number of interleaved debug opcodes when checking
for this pattern.
2024-08-12 20:14:45 -04:00
Aaron Hill
79817f41d8
avm2: Add `[API("674")]` to Rectangle.copyFrom
...
This fixes old classes that extend Rectangle and define `copyFrom`
without marking it as an override
2024-08-12 19:36:47 -04:00
TÖRÖK Attila
9239cb8a5d
chore: A couple typo fixes in comments here and there
2024-08-12 21:36:51 +02:00
dependabot[bot]
f51dcf8d55
build(deps): bump the cargo-minor group with 8 updates
...
Bumps the cargo-minor group with 8 updates:
| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap ) | `4.5.13` | `4.5.15` |
| [serde](https://github.com/serde-rs/serde ) | `1.0.204` | `1.0.206` |
| [linkme](https://github.com/dtolnay/linkme ) | `0.3.27` | `0.3.28` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.122` | `1.0.124` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.72` | `2.0.74` |
| [fontdb](https://github.com/RazrFalcon/fontdb ) | `0.20.0` | `0.21.0` |
| [async-io](https://github.com/smol-rs/async-io ) | `2.3.3` | `2.3.4` |
| [tempfile](https://github.com/Stebalien/tempfile ) | `3.11.0` | `3.12.0` |
Updates `clap` from 4.5.13 to 4.5.15
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.13...v4.5.15 )
Updates `serde` from 1.0.204 to 1.0.206
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.206 )
Updates `linkme` from 0.3.27 to 0.3.28
- [Release notes](https://github.com/dtolnay/linkme/releases )
- [Commits](https://github.com/dtolnay/linkme/compare/0.3.27...0.3.28 )
Updates `serde_json` from 1.0.122 to 1.0.124
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.122...v1.0.124 )
Updates `syn` from 2.0.72 to 2.0.74
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.72...2.0.74 )
Updates `fontdb` from 0.20.0 to 0.21.0
- [Changelog](https://github.com/RazrFalcon/fontdb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/RazrFalcon/fontdb/compare/v0.20.0...v0.21.0 )
Updates `async-io` from 2.3.3 to 2.3.4
- [Release notes](https://github.com/smol-rs/async-io/releases )
- [Changelog](https://github.com/smol-rs/async-io/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/async-io/compare/v2.3.3...v2.3.4 )
Updates `tempfile` from 3.11.0 to 3.12.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Stebalien/tempfile/commits )
---
updated-dependencies:
- dependency-name: clap
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: linkme
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: fontdb
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: async-io
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: tempfile
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 16:45:39 +02:00
Aaron Hill
bf55f15913
avm2: Declare 'namespace AS3' and validate bytecode in playerglobals
...
In order for asc.jar to generate efficient bytecode
(a direct 'callproperty' instead of a dynamic namespace and method
lookup), we need to have 'namespace AS3' in each package where we
do a qualified 'obj.AS3::SomeMethod()' call.
I've adjusted `build_playerglobal` to scan all of our playerglobal
method bodies to ensure that we don't have the bad bytecode.
This uncovered several places where we were missing `namespace AS3'
Before this change, we were creating a new bound method within
all of our prototype methods in `XML/XMLList`, since they used
'self.AS3::SomeXmlMethod()' calls to delegate to the AS3 native
method.
This saves several hundred megabytes on
`https://s1106-r2game-sq.7road.net `, since we no longer create
bound `FunctionObject`s for all of the distinct XML/XMLList objects
that the swf creates.
2024-08-11 17:33:46 -04:00
Adrian Wielgosik
3b93ff941e
avm2: Intern XML node name
2024-08-11 09:56:02 +02:00
TÖRÖK Attila
c3529afe11
avm1: Math tests: Substitute some trivial expected values and add TODOs about @epsilon
2024-08-11 02:15:36 +02:00
TÖRÖK Attila
3573322c6d
avm1: Change expected values in `test_exp` math test to the exact ones returned by FP
...
And add some tolerance to make it pass with both current stable/beta and nightly rustc.
Thanks for figuring out the precise values, @kjarosh!
2024-08-11 02:15:36 +02:00
TÖRÖK Attila
056501ee75
avm1: Add a way to specify numeric tolerance `@epsilon` when comparing in `test_method!`
2024-08-11 02:15:36 +02:00
Moulins
47030b4f5b
core: remove UpdateContext's unused lifetime and reborrow method
2024-08-10 22:53:27 +02:00
Moulins
13cffa4c94
core: appease clippy
2024-08-10 22:53:27 +02:00
Moulins
d07437e30e
core: store 'gc borrows in UpdateContext, and `&mut UC` in Activation
...
This leaves the second UpdateContext lifetime unused and the `reborrow`
method useless, but they're kept to avoid an unnecessarily huge diff.
2024-08-10 22:53:27 +02:00
Moulins
d116ef82e9
core: rework the way the garbage-collected arena is entered in `Player`
...
Add `Player::enter_arena(_mut)` methods, giving more ergonomic access to
the GC'd arena by:
- handling the RefCell borrows for you;
- passing an extra `&(mut) Player` parameter into the closure;
- giving all borrows the same `'gc` lifetime (thanks to strategic `unsafe`).
2024-08-10 22:53:27 +02:00
Moulins
0b3395d21f
core: simplify callstack handling in Player
...
Grab the AVM2 callstack handle before constructing the GC root,
so that we can set it directly instead of modify the GC root once
constructed. This means we can remove an extra GcCell.
Also switch the callstack object from GcCell to GcRefLock.
2024-08-10 22:53:27 +02:00
Adrian Wielgosik
0097aea381
avm2: Make primitive coercions way cheaper
2024-08-10 17:24:31 +02:00
Tom Schuster
f202088bd8
avm2: Box E4XNamespace in E4XNodeData
2024-08-10 15:28:28 +02:00
Nathan Adams
637b1ccf4e
avm2: Save an alloc when calling Regexp effective_replacement with no replacement patterns
2024-08-10 01:53:01 +02:00
Nathan Adams
0023062c82
avm2: Short circuit the regexp replacement logic if it's a simple (no pattern) string
2024-08-10 01:53:01 +02:00
Nathan Adams
ef42bba20c
avm2: Don't realloc the same string in Regexp.replace_with_fn, if no match was found
2024-08-10 01:53:01 +02:00
Lord-McSweeney
863e621bbb
avm2: Make ScriptObjectData.vtable non-Optional
2024-08-07 14:57:17 -07:00
Lord-McSweeney
fa4df53831
avm2: Change the alignment assertion to use `ScriptObjectData` instead of `RefLock<ScriptObjectData>`
2024-08-07 11:58:05 -07:00
Lord-McSweeney
732775d08a
avm2: Use interior mutability in `ScriptObjectData`
2024-08-07 11:58:05 -07:00
Lord-McSweeney
117df6e3c2
avm2: Resolve review notes in `enum_trait_object` macro
2024-08-06 19:25:03 -07:00
Lord-McSweeney
53347ed088
core: Remove unnecessary defined `#[no_dynamic]` `proc_macro_attribute`
2024-08-06 19:25:03 -07:00
Lord-McSweeney
c98c173c6b
chore: Run `cargo fix`
2024-08-06 19:25:03 -07:00
Lord-McSweeney
806da319c0
avm2: Ensure alignment between *ObjectData and ScriptObjectData is the same
2024-08-06 19:25:03 -07:00
Lord-McSweeney
9c399da94a
avm2: Add a `#[no_dynamic]` attribute to specify functions in `enum_trait_object` that don't need dynamic dispatch
2024-08-06 19:25:03 -07:00
Lord-McSweeney
e58a82289a
avm2: Remove some dynamic-dispatch TObject logic (both on Object variants and defined on TObject)
...
This results in better codegen for `Object::get_slot` and `set_slot`
2024-08-06 19:25:03 -07:00
michiel2005
6350f5cb87
avm1: made the context menu work for all avm1 objects
2024-08-06 22:11:17 +02:00
TÖRÖK Attila
124310986f
render,desktop: Switch to `wgpu` `v22.1.0` and latest `egui` without `winit` 0.30
...
I opted to enable dithering in egui, because why not.
2024-08-06 15:00:38 +02:00
dependabot[bot]
e618c6862b
build(deps): bump the cargo-minor group with 9 updates
...
Bumps the cargo-minor group with 9 updates:
| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap ) | `4.5.11` | `4.5.13` |
| [bytemuck](https://github.com/Lokathor/bytemuck ) | `1.16.1` | `1.16.3` |
| [flate2](https://github.com/rust-lang/flate2-rs ) | `1.0.30` | `1.0.31` |
| [indexmap](https://github.com/indexmap-rs/indexmap ) | `2.2.6` | `2.3.0` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.121` | `1.0.122` |
| [regex](https://github.com/rust-lang/regex ) | `1.10.5` | `1.10.6` |
| [zip](https://github.com/zip-rs/zip2 ) | `2.1.5` | `2.1.6` |
| [tempfile](https://github.com/Stebalien/tempfile ) | `3.10.1` | `3.11.0` |
| [lru](https://github.com/jeromefroe/lru-rs ) | `0.12.3` | `0.12.4` |
Updates `clap` from 4.5.11 to 4.5.13
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.11...v4.5.13 )
Updates `bytemuck` from 1.16.1 to 1.16.3
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.1...v1.16.3 )
Updates `flate2` from 1.0.30 to 1.0.31
- [Release notes](https://github.com/rust-lang/flate2-rs/releases )
- [Commits](https://github.com/rust-lang/flate2-rs/commits )
Updates `indexmap` from 2.2.6 to 2.3.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.2.6...2.3.0 )
Updates `serde_json` from 1.0.121 to 1.0.122
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.121...v1.0.122 )
Updates `regex` from 1.10.5 to 1.10.6
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.10.5...1.10.6 )
Updates `zip` from 2.1.5 to 2.1.6
- [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.5...v2.1.6 )
Updates `tempfile` from 3.10.1 to 3.11.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0 )
Updates `lru` from 0.12.3 to 0.12.4
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.12.3...0.12.4 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: flate2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: indexmap
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: regex
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: tempfile
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: lru
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 17:49:09 +02:00
Crowdin Bot
3b482b176e
chore: Update translations from Crowdin
2024-08-05 13:37:33 +02:00
Kamil Jarosz
85c7370577
text: Fix laying out empty text boxes
...
This patch fixes how empty text boxes are laid out.
The empty boxes are now added during line fixup, and not after,
which ensures they are subjected to alignment and other adjustments.
2024-08-02 17:56:45 +02:00
Kamil Jarosz
8722642ed7
text: Reset max font size on newline
...
Before this patch, max font size (which claimed to be the highest font
size observed within the current line) was calculated for each span,
regardless of newlines.
2024-08-02 17:56:45 +02:00
Kamil Jarosz
fcbeb92406
text: Assume there's at least one layout box
...
That condition related to drawing a cursor when there are no boxes is
outdated, as currently it's guaranteed that there's at least one box.
FormatSpans.normalize() ensures that there's at least one span, and
LayoutContext.fixup_line() ensures that each line has at least one box.
2024-08-02 17:56:45 +02:00
Kamil Jarosz
2de9fb83b4
text: Ignore non-text boxes when calculating line bounds
2024-08-02 17:07:02 +02:00
Lord-McSweeney
6c233ed859
avm2: Annotate all object *Data structs with `#[repr(C)]`
...
This ensures that the ScriptObjectData common to every *Data is always at the same offset, which results in better codegen for TObject methods
2024-08-01 09:09:29 -07:00
Lord-McSweeney
c54de07382
avm2: Resolve review comments and use `activation.gc()` in some places
2024-08-01 09:09:29 -07:00
Lord-McSweeney
8f6736da74
avm2: Store a `DisplayObject` instead of `Option<DisplayObject>` in `StageObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
3ae53a6ef2
avm2: Use `Gc` instead of `GcCell` in `ScriptObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
c80bd7a55e
avm2: Use `Gc` instead of `GcCell` in `FunctionObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
336e10a535
avm2: Use `Gc` instead of `GcCell` in `XmlListObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
2ff8238bf0
avm2: Remove now-unnecessary `Mutation` argument in some LoaderInfo methods
2024-08-01 09:09:29 -07:00
Lord-McSweeney
49188bd5d7
avm2: Use `Gc` instead of `GcCell` in `LoaderInfoObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
fa759a06a4
avm2: Use `Gc` instead of `GcCell` in `EventObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
5ea9b5d80b
avm2: Use `Gc` instead of `GcCell` in `SoundChannelObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
458264a76a
avm2: Use `Gc` instead of `GcCell` in `SoundObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
4773591c42
avm2: Use `Gc` instead of `GcCell` in `ClassObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
42e0380e2e
avm2: Use `Gc` instead of `GcCell` in `DispatchObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
c551a365a3
avm2: Use `Gc` instead of `GcCell` in `PrimitiveObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
64261c8f06
avm2: Use `Gc` instead of `GcCell` in `RegExpObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
562be06fb1
avm2: Use `Gc` instead of `GcCell` in `VectorObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
b1acb17806
avm2: Use `Gc` instead of `GcCell` in `ArrayObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
7e82b3f425
avm2: Use `Gc` instead of `GcCell` in `XmlObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
a9ac849e56
avm2: Use `Gc` instead of `GcCell` in `NamespaceObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
ee4c08cc31
avm2: Use `Gc` instead of `GcCell` in `StageObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
3d80fc16c4
avm2: Use `Gc` instead of `GcCell` in `QNameObject` and `ErrorObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
bc5328892a
avm2: Use `Gc` instead of `GcCell` in `BitmapDataObject`
2024-08-01 09:09:29 -07:00
Lord-McSweeney
27d25a9442
avm2: Remove Mutation parameter from `TObject::as_bytearray_mut`
2024-08-01 09:09:29 -07:00