Commit Graph

7279 Commits

Author SHA1 Message Date
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
Lord-McSweeney 313c384d41 avm2: Use `Gc` instead of `GcCell` in `ByteArrayObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney a5d2b613ac avm2: Use `Gc` instead of `GcCell` in `DomainObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 19bf1d7dcb avm2: Use `Gc` instead of `GcCell` in `DictionaryObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney e4499c2ed2 avm2: Use `Gc` instead of `GcCell` in `ProxyObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 86b8f3fe61 avm2: Use `Gc` instead of `GcCell` in `ResponderObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney fb168f46b3 avm2: Use `Gc` instead of `GcCell` in `FontObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 4e15bcb9b7 avm2: Use `Gc` instead of `GcCell` in `LocalConnectionObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 895c13d65b avm2: Use `Gc` instead of `GcCell` in `NetStreamObject` 2024-08-01 09:09:29 -07:00
sleepycatcoding 5806e6577e debug_ui: Add a tab for AVM2 array contents 2024-07-31 00:47:11 +02:00
Kamil Jarosz c54b1b5b4a desktop: Add View menu 2024-07-30 23:42:39 +02:00
Kamil Jarosz 3ea4af481d core: Add respect_forced parameter to set_scale_mode 2024-07-30 23:42:39 +02:00
Kamil Jarosz ee5dce4c86 core: Use layout lines in screen_position_to_index
This refactor makes it possible for layout boxes in the same line to
have different extents, and it does not change the method's behavior.
2024-07-30 19:28:24 +02:00
Adrian Wielgosik 6f56016079 avm2: Support recursive Vector<Vector<T>> lookups 2024-07-30 18:45:45 +02:00
dependabot[bot] fef1cba495 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.9` | `4.5.11` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.38.1` | `1.39.2` |
| [quick-xml](https://github.com/tafia/quick-xml) | `0.36.0` | `0.36.1` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.120` | `1.0.121` |
| [enumset](https://github.com/Lymia/enumset) | `1.1.4` | `1.1.5` |
| [toml_edit](https://github.com/toml-rs/toml) | `0.22.16` | `0.22.17` |
| [gilrs](https://gitlab.com/gilrs-project/gilrs) | `0.10.8` | `0.10.9` |
| [env_logger](https://github.com/rust-cli/env_logger) | `0.11.3` | `0.11.5` |
| [toml](https://github.com/toml-rs/toml) | `0.8.15` | `0.8.16` |


Updates `clap` from 4.5.9 to 4.5.11
- [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.9...clap_complete-v4.5.11)

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

Updates `quick-xml` from 0.36.0 to 0.36.1
- [Release notes](https://github.com/tafia/quick-xml/releases)
- [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md)
- [Commits](https://github.com/tafia/quick-xml/compare/v0.36.0...v0.36.1)

Updates `serde_json` from 1.0.120 to 1.0.121
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.120...v1.0.121)

Updates `enumset` from 1.1.4 to 1.1.5
- [Changelog](https://github.com/Lymia/enumset/blob/main/RELEASES.md)
- [Commits](https://github.com/Lymia/enumset/compare/v1.1.4...v1.1.5)

Updates `toml_edit` from 0.22.16 to 0.22.17
- [Commits](https://github.com/toml-rs/toml/compare/v0.22.16...v0.22.17)

Updates `gilrs` from 0.10.8 to 0.10.9
- [Commits](https://gitlab.com/gilrs-project/gilrs/compare/v0.10.8...v0.10.9)

Updates `env_logger` from 0.11.3 to 0.11.5
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.11.3...v0.11.5)

Updates `toml` from 0.8.15 to 0.8.16
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.15...toml-v0.8.16)

---
updated-dependencies:
- dependency-name: clap
  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-minor
  dependency-group: cargo-minor
- dependency-name: quick-xml
  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: enumset
  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: gilrs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: env_logger
  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-07-29 16:39:55 +02:00
Nathan Adams 3de0279149 avm2: ByteArray should implement IDataInput2 and IDataOutput2. For some reason. 2024-07-29 10:32:45 +02:00
Nathan Adams 892c39f24d avm2: TouchEvent.getSamples and isToolButtonDown are AIR only 2024-07-29 10:32:45 +02:00
Nathan Adams de8e9b60f6 avm2: IME _private fields should be private 2024-07-29 10:32:45 +02:00
Nathan Adams bcba6250b9 avm2: NetStream.preloadEmbeddedData and setDRMAuthenticationCredentials are AIR only 2024-07-29 10:32:45 +02:00
Nathan Adams f804cf4689 avm2: FocusEvent.direction is AIR only 2024-07-29 10:32:45 +02:00
Nathan Adams dade26e93f avm2: Event.SUSPEND is AIR only 2024-07-29 10:32:45 +02:00
Nathan Adams ce9b2337f2 avm2: TextRenderer _private fields should be private 2024-07-29 10:32:45 +02:00
Nathan Adams 0f91196ad0 avm2: FileReference requestPermission and uploadUnencoded are AIR only 2024-07-29 10:32:45 +02:00
Nathan Adams b7e78f4ca6 avm2: MouseCursorData _private fields should be private 2024-07-29 10:32:45 +02:00