Aaron Hill
71f828a3fd
avm2: Use playerglobals domain as parent for `new ApplicationDomain()`
...
We were incorrectly using the stage domain as the parent, which caused
classes to be incorrectly shared between domains.
2024-02-07 20:13:23 -05:00
Tom Schuster
d7c7716c34
avm2: Implement TextField::getLineText
2024-02-07 20:34:43 +01:00
David Wendt
d7583289c9
avm1: Make `NetConnection.isConnected`'s stub more functional
2024-02-07 19:46:39 +01:00
Tom Schuster
cadae9303f
avm2: Verify the URLRequest method
2024-02-06 17:52:08 +01:00
sleepycatcoding
4c6f2ba973
avm2: Fix `in` operator not handling attributes in XML object
2024-02-05 21:09:39 +01:00
Tom Schuster
ecda68b81c
avm2: has_property should do proto.has_property instead of
...
has_own_property
2024-02-05 19:34:09 +01:00
TÖRÖK Attila
28c380cfac
desktop: Update egui to 0.26.0
2024-02-05 19:05:10 +01:00
renovate[bot]
477440d387
fix(deps): update rust dependencies
2024-02-05 07:56:07 +01:00
Kamil Jarosz
f3f8a4522e
text: Add support for relative font sizes in HTML
2024-02-04 22:01:32 +01:00
_Mads
b5d0c965f0
avm2: Implement TimerEvent.toString
2024-02-03 21:54:52 +00:00
Kamil Jarosz
50b5f29c0a
text: Make enter add a new line in multiline fields
2024-02-03 13:40:07 +01:00
Aaron Hill
b02a96373b
debug_ui: Show ClassObjects for domain class
...
This re-uses our existing infrastructure for displaying
AVM2 Class objector. One minor limitation of this approach
is the inability to view a `Class` that hasn't yet had its
`ClassObject` created - however, this should be rare in practice.
We show a collapsing header with all of the ClassObjects associated
with the given Class.
2024-02-02 19:24:36 -08:00
Lord-McSweeney
603a76bab0
avm2: Add fast path for `Value::abstract_lt`-ing two integers
2024-02-01 17:03:57 -08:00
Nathan Adams
71c9de410d
core: Clarify CPU vs GPU branch in BitmapData.draw
2024-02-02 00:59:45 +01:00
Nathan Adams
bac78442fc
core: Don't do bmd.draw() on cpu if it exists on gpu
2024-02-02 00:59:45 +01:00
Nathan Adams
70fbb4a7ac
render: Move away from SyncHandle.retrieve_offscreen_texture to RenderBackend::resolve_sync_handle
2024-02-02 00:59:45 +01:00
Marco Bartoli
5ae3be3ac9
avm2: Ignore version marks in non-playerglobal namespaces
2024-02-01 21:50:26 +00:00
Kamil Jarosz
4154a0945d
text: Implement advanced horizontal text controls for EditText
2024-02-01 20:18:29 +01:00
Kamil Jarosz
0657d2daa2
text: Add advanced horizontal text control codes
2024-02-01 20:18:29 +01:00
Kamil Jarosz
b39919951b
wstr: Add UTF-8/UTF-16 index mapping
...
Methods `utf8_index` and `utf16_index` from `WStrToUtf8`
may be used to map code unit indices between UTF-8 (str)
and UTF-16 (WStr) strings.
2024-02-01 20:18:29 +01:00
Nathan Adams
50dedc3cb9
avm1: Invalidate cacheAsBitmaps when using Color API
2024-02-01 19:27:33 +01:00
Lord-McSweeney
2ccad62378
core: Implement `focusIn` `FocusEvent` for AVM2 ( #14723 )
2024-02-01 08:22:36 +00:00
Aaron Hill
78873e3670
avm2: Add new 'stub-report' binary crate
...
This writes the AVM2 stub report to the specified path.
2024-01-31 20:22:06 -05:00
Nathan Adams
25b5c7b4e2
avm2: Track progress of avm2 and generate an implementation.json
2024-01-31 20:22:06 -05:00
Robert Setter
abc8815445
avm1: Match random behaviour to avm2
2024-02-01 00:19:21 +01:00
Lord-McSweeney
e656ebf6ac
avm2: Stub `flash.system::MessageChannel`
2024-01-31 09:24:42 -08:00
Adrian Wielgosik
4971f5be2d
avm2: Prevent chained dependent strings
2024-01-30 23:21:37 +01:00
Adrian Wielgosik
ecbb0f92f1
avm2: Add small string store to interner, expand use
2024-01-30 23:21:37 +01:00
Adrian Wielgosik
7aa95fe463
avm2: Dependent strings POC
2024-01-30 23:21:37 +01:00
Aaron Hill
12c47047b8
debug_ui: Display 'Movie' button on 'Class Info' panel
2024-01-30 17:26:05 +01:00
renovate[bot]
3737725a21
fix(deps): update rust dependencies
2024-01-30 09:23:15 +01:00
Lord-McSweeney
dbc1015ef5
avm2: Resolve review comments and fix verifier brokenness
2024-01-29 22:48:00 -08:00
Lord-McSweeney
8b29ceaafa
avm2: Write a `make_error_1032` function and use it
2024-01-29 22:48:00 -08:00
Lord-McSweeney
c1c3351654
avm2: `Op::Coerce` should not accept a 0-index `Multiname`
2024-01-29 22:48:00 -08:00
Lord-McSweeney
fcf83d7dd9
avm2: Properly verify constant pool lookups for `Op::Coerce` and `Op::AsType`
2024-01-29 22:48:00 -08:00
Lord-McSweeney
442391ea60
avm2: Fix a minor bug where `CoerceD` was removed after `Inc`/`DecLocal`
2024-01-29 22:48:00 -08:00
Lord-McSweeney
7b853a8cd9
avm2: One more lazy multiname fix
2024-01-29 22:48:00 -08:00
Lord-McSweeney
ce41362b1e
avm2: Fix some potentially-failing unwraps and broken code in the verifier
2024-01-29 22:48:00 -08:00
Lord-McSweeney
50b752c35b
avm2: Add longer comment to logic to determine register types
2024-01-29 22:48:00 -08:00
Lord-McSweeney
dd35e4862f
avm2: Fix crash when `Coerce`/`AsType` used a lazy multiname
2024-01-29 22:48:00 -08:00
Lord-McSweeney
dd82126448
avm2: Optimize unnecessary `Coerce` when it comes after `PushString`, `NewArray`, and `NewFunction`
2024-01-29 22:48:00 -08:00
Lord-McSweeney
f99c5621ee
avm2: Add more ops that are guaranteed to not throw errors to `verify::ops_can_throw_error`
...
This requires a minor change to `Activation::op_lookup_switch`
2024-01-29 22:48:00 -08:00
Lord-McSweeney
6be4918d77
avm2: Resolve reviews
2024-01-29 22:48:00 -08:00
Lord-McSweeney
e6c5ba51e4
avm2: Optimize `Coerce` out when it comes right after another `Coerce` pointing to the same cpool entry
2024-01-29 22:48:00 -08:00
Lord-McSweeney
28edee498b
avm2: Make `verify_code_starting_from` use a worklist instead of running recursively
...
This fixes a stack overflow on one test.
2024-01-29 22:48:00 -08:00
Lord-McSweeney
b4f016c1cd
avm2: Add `CoerceU` op optimizations
2024-01-29 22:48:00 -08:00
Lord-McSweeney
30f99bcd19
avm2: Add optimizations for `Coerce` and `AsType` after `PushNull`, fix `optimize` panicking when out-of-bounds local registers are mentioned
2024-01-29 22:48:00 -08:00
Lord-McSweeney
3f76b248e9
avm2: Remove `Label` op since it is only relevant to the verifier, inline `CoerceA` and `Nop`
2024-01-29 22:48:00 -08:00
Lord-McSweeney
8e997f0131
avm2: Optimize a GetProperty after a GetLocal0 to GetSlot or CallMethod
2024-01-29 22:48:00 -08:00
Lord-McSweeney
8d3847b216
avm2: Add default xml namespace handling opcodes since several SWFs mention them but don't actually use them
2024-01-29 22:48:00 -08:00
Lord-McSweeney
c4a3b3f49f
avm2: Implement simple Op::CoerceX optimizations
2024-01-29 22:48:00 -08:00
Lord-McSweeney
f9fb739460
avm2: Record all possible jump targets, remove Convert-B/D/I/U opcodes since those are equivalent to the corresponding CoerceX opcodes
2024-01-29 22:48:00 -08:00
Lord-McSweeney
2022321a03
avm2: Add an `Op` enum to AVM2; pre-pool double/uint/ints for `pushX` opcodes
2024-01-29 22:48:00 -08:00
Lord-McSweeney
65848104a6
avm2: Implement verifier based off Adrian's initial work
2024-01-29 22:48:00 -08:00
Aaron Hill
1cf669c75e
avm2: Convert invalid rectangle to zero rectangle in getBounds
2024-01-29 13:25:16 -05:00
Aaron Hill
f31d9bc491
avm2: Make Math.random() more closely match Flash Player
...
See the comments for details. Our previous implementation
was 'too good', and broke Bloons Tower Defense 5 by
generating `Number`s that Flash Player would never generate.
2024-01-28 22:46:19 -05:00
Fancy2209
f2880975ba
avm2: Report OS as Windows instead of Linux for now ( #14985 )
2024-01-28 22:10:54 +00:00
Aaron Hill
5b685d411f
chore: Fix nightly Clippy lints
2024-01-28 16:03:29 -05:00
Tom Schuster
b8d8aafe89
avm2: Implement the remaining flash.net.FileReference properties
2024-01-28 17:14:10 +01:00
Adrian Wielgosik
4981cbd89b
avm2: Avoid double lookup in setPropertyIsEnumerable
2024-01-27 16:51:17 +01:00
Crowdin Bot
4769a45999
chore: Update translations from Crowdin
2024-01-26 22:54:04 +01:00
Tom Schuster
7a73dd0661
avm2: Only use embedded CFF fonts for TLF
2024-01-26 21:57:48 +01:00
sleepycatcoding
36fc30e283
debug_ui: Do not render container as collapsible if it has no children
2024-01-26 20:34:49 +01:00
Moulins
ac7086528f
avm1: Implement proper behavior for Gradient***Filter array setters
...
Among other things:
- resizing `colors` should also resize `alphas` and `ratios`
- shrinking `ratios` should also shrink `colors` and `alphas`, but
growing it doesn't change the size
2024-01-26 18:40:06 +01:00
Moulins
19ff294e60
avm1: Follow FP 32 (not FP 11) behavior for ColorMatrix/ConvolutionFilter
2024-01-26 18:40:06 +01:00
Moulins
bd2165bd0f
swf: Properly read/write ConvolutionFilters; these contain f32s, not Fixed16s
2024-01-26 18:40:06 +01:00
Moulins
659917bff2
avm1: Fix inaccuracies in DisplacementMapFilter
...
- `mode` should reject non-lowercased values
- `mapPoint` should reset to `(0, 0)` when set to an invalid value
2024-01-26 18:40:06 +01:00
Moulins
5ef911abc9
avm1: Don't overwrite alpha when setting the color field on BitmapFilters
2024-01-26 18:40:06 +01:00
Kamil Jarosz
ec345d20a5
core: Improve HTML handling for EditText and add support for SWF 6,7
...
This patch improves the logic of parsing and formatting HTML
for EditText, and adds support for SWF versions 6 and 7.
Examples of bugs fixed:
* invalid HTML: When generating HTML, Ruffle sometimes generated
mismatched tags, e.g. tried to close a tag which was never opened.
* text outside of tags: sometimes, especially in case of multiline
fields with multiple paragraphs, Ruffle generated proper tags,
but the text was placed outside of them.
* BR/SBR closing issues: When opened, Ruffle waited for a close tag
and ignored every other closing tag. BR/SBR do not need to be closed,
so Ruffle often waited indefinitely.
* P/LI behavior: P and LI have a very peculiar behavior, but a very
important one, because it influences the number of paragraphs/bullets
and thus newlines for multiline fields.
Support for SWF 6,7:
* whitespace in SWF 6,7: SWF versions 6,7 ignore witespace-only text.
This significantly influences the behavior of newlines and paragraphs.
* kerning in SWF 6,7: Enabling kerning in `<font>` works only for SWF 8+.
* multiline in SWF 6: FP 6 defines the `multiline` property, but it
completely ignores it, and the field behaves as if it's always multiline.
2024-01-26 18:20:06 +01:00
Kamil Jarosz
5422792eb7
core: Add font and style structures for TextSpan
...
They make operating on text spans more natural, e.g. easy comparison.
2024-01-26 18:20:06 +01:00
Daniel Jacobs
119a093c27
web: Add allowFullscreen embed/object option (part of #4258 )
2024-01-26 10:06:29 +00:00
Kamil Jarosz
62a46c7b60
core: Ignore font style in default TextFormat for HTML fields
...
It seems that font styles in the default text format
are ignored when dealing with an HTML field.
This patch revisits the fix from feacbdc1
(#13615 ),
which assumed that `<font>` resets font style.
That does not seem to be the case, but rather the bug
was caused by the invalid default text format,
which forced the text to be bold, due to the bold
variant of the font being linked to the text field.
This patch reverts 2f84d468
(#1201 ), which assumed that
the default color for a text span has 100% alpha.
The test added here contradicts it and it seems that
the default color is in fact rgba(0,0,0,0).
Testing the original SWF suggests that the underlying problem
has been fixed since that time.
2024-01-26 08:37:24 +01:00
David Wendt
4031659c9e
core: Use the last processed tag time for stream time in case of buffer underruns.
2024-01-25 23:24:09 -07:00
David Wendt
56c14be708
core: Buffer overruns should not pause the stream unless we are actually at the end of the video.
2024-01-25 23:24:09 -07:00
David Wendt
14dec5dcce
avm1: `bytesTotal` should actually get `bytesTotal`
2024-01-25 23:24:09 -07:00
David Wendt
092e20a1be
core: Adding data to the buffer should reactivate the stream.
2024-01-25 23:24:09 -07:00
David Wendt
899e02fd82
core: Inform `NetStream` of the expected stream length.
...
`NetStream` uses this information to reserve stream buffer capacity. It also exposes this information to AVM via `bytesTotal`.
2024-01-25 23:24:09 -07:00
David Wendt
006c3af4b8
core: Add backend method for getting the expected length of a response.
2024-01-25 23:24:09 -07:00
David Wendt
08ee3ea638
core: Load all `NetStream` data in chunks.
2024-01-25 23:24:09 -07:00
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
TÖRÖK Attila
36210c9f20
avm2: Add AIR-only constant `flash.ui.KeyLocation.D_PAD`
2024-01-25 22:44:41 +01:00
TÖRÖK Attila
67674ba089
avm2: Add constant `flash.ui.GameInputDevice.MAX_BUFFER_SIZE`
2024-01-25 22:44:41 +01:00
TÖRÖK Attila
8b9e490d2d
avm2: Add remaining `StageVideoEvent` constants
2024-01-25 22:44:41 +01:00
TÖRÖK Attila
6f5cf27d55
avm2: Add undocumented `IOErrorEvent` constants
2024-01-25 22:44:41 +01:00
TÖRÖK Attila
c7b7f24a19
avm2: Add remaining, AIR-only `IOErrorEvent` constants
2024-01-25 22:44:41 +01:00
TÖRÖK Attila
bb0c30a686
avm2: Add `flash.events.ActivityEvent.ACTIVITY` constant
2024-01-25 22:44:41 +01:00
TÖRÖK Attila
97c5394600
avm2: Add remaining `ClipboardFormats` constants
2024-01-25 22:44:41 +01:00
moulins
727a9a8334
avm2: Don't forget to set the state in `Avm2Button::set_state`
...
Fixes #14922 . Also removes a redundant line. These regressed in #14820 .
2024-01-25 21:20:25 +00:00
Tom Schuster
499dfc8990
avm2: Partially implement FileReferenceList with a single FileReference
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
Lord-McSweeney
38d58552f2
nit: Fix some minor capitalization mistakes
2024-01-25 08:05:48 +01: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
Moulins
5f83b45692
avm2: Add `Avm2Button::all_state_children` to centralize button child ordering
2024-01-23 22:43:13 +01:00
Moulins
e014d7c023
avm2: Use inner mutability instead of `GcCell` in `Avm2Button`
2024-01-23 22:43:13 +01:00
Moulins
d1cbe46e25
avm1: Use inner mutability instead of `GcCell` in `Avm1Button`
2024-01-23 22:43:13 +01:00
Tom Schuster
07afb04896
avm2: Fix FileFilter description getter
2024-01-23 18:43:36 +01:00
Tom Schuster
3ddf0aec28
avm2: Implement FileReference save
2024-01-23 18:43:36 +01:00
Tom Schuster
9101ab322e
avm2: Implement flash.net.FileReference size
2024-01-23 18:43:36 +01:00
Tom Schuster
c73be131f0
avm2: Implement flash.net.FileReference name
2024-01-23 18:43:36 +01:00
Tom Schuster
fff841a22e
avm2: Implement FileReference browse
2024-01-23 18:43:36 +01:00
Tom Schuster
e7b8b75d07
avm2: Basic FileReference object boilerplate
2024-01-23 18:43:36 +01:00
Aaron Hill
dbcefd060f
debug_ui: Add 'Show Domains' menu to view domains and classes
...
This opens a searchable list (similar to what we have for display
objects), which shows a tree of Domains and their associated classes.
Currently, clicking on the domain/class buttons doesn't do anything.
In a follow-up, I'm planning to add additional windows to display
information about a class.
2024-01-23 11:34:14 +01:00
Lv Yitian
bebadb450f
avm2: Make `flash.system.Capabilities#playerType` return "Desktop" within the AIR runtime
...
Unless the SWF is loaded by an HTML page.
2024-01-23 07:45:11 +00:00
Aaron Hill
c1fce1106f
swf: Parse string as Vec<u8> instead of String in SWF
...
Some obfuscated SWFs may have invalid strings in their constant
pool - trying to immediately parse them as a utf-8 String throws
away information. Instead, we now store a `Vec<u8>`, which we
then use to construct an `AvmString` (or with `String::from_utf8_lossy`
for debug printing).
2024-01-22 21:50:45 -05:00
Aaron Hill
8dbcfe26f9
core: Display image load when using Loader.loadBytes
...
The handling of images in Loader.loaderBytes is similar to
the handling of SWFs - some of the data is exposed immediately
following the 'Loader.loadBytes' call, but the DisplayObject isn't
loaded until later.
2024-01-22 19:35:08 -05:00
Tom Schuster
173efbb77a
avm2: Stub flash.desktop.Clipboard
2024-01-22 23:37:22 +01:00
sleepycatcoding
1804c23b93
avm2: Fix `Error.toString` regression
...
This was introduced by #14897 , and to make sure this won't happen again I added a test.
Fixes #14901 .
2024-01-22 19:34:12 +01:00
sleepycatcoding
2057417824
avm2: Implement `Error.prototype.toString`
...
And remove `ErrorObject::to_string` implementation. This fixes a few avmplus tests.
2024-01-22 15:09:55 +01:00
renovate[bot]
262dff83a4
fix(deps): update rust dependencies
2024-01-22 03:09:33 +01:00
cmdocmd
c6331113ed
avm2: Stub `flash.text.engine.TextLine.getAtomIndexAtCharIndex`
2024-01-21 22:09:39 +01:00
Tom Schuster
ab99eb3e09
avm2: Only lookup own properties in flash.net.getClassByAlias
2024-01-21 17:23:29 +01:00
cmdocmd
5cf9e00f9c
avm2: Stub XML::inScopeNamespaces
2024-01-20 14:27:27 -08:00
nosamu
379bed891f
core: Invalidate cached bitmap on state change in AVM2Button
2024-01-20 11:53:19 +01:00
nosamu
284489b721
avm2: Stub Stage colorCorrection and colorCorrectionSupport
2024-01-20 11:35:28 +01:00
Tom Schuster
c9c1326d13
avm2: Allow TLF to use embedded fonts when requested
2024-01-19 23:14:58 +01:00
Tom Schuster
0a6cf92a53
core: Implement DefineFont4
2024-01-19 23:14:58 +01:00
Tom Schuster
e0f5b8906d
desktop: Support device font with a non-zero index
2024-01-19 19:21:48 +01:00
Adrian Wielgosik
11fe70ab65
avm2: Fix possible overflow in address calculations
2024-01-18 23:35:03 +01:00
Tom Schuster
28b20322f0
avm2: Assume we have the default public namespace when matching XML names
2024-01-18 16:31:00 +01:00
TÖRÖK Attila
9aff953163
core: Make `Player::mutate_with_update_context` public
2024-01-18 09:00:40 +01:00
TÖRÖK Attila
d153290fd6
nits: Fix a whole bunch of typos all over the place
2024-01-17 23:59:19 +01:00
Daniel Jacobs
8f2292c2c7
core: Add error for loading invalid SWF files and display as appropriate
2024-01-17 17:38:47 -05:00
Daniel Jacobs
5765177ba7
web: Properly panic when loading invalid SWF files ( fix #14665 )
2024-01-17 17:38:47 -05:00
Aaron Hill
97f868b8d5
avm2: Don't hold GcCell read ref open for Loader.loadBytes
...
We were holding this open while dispatching an event,
leading to a panic if anything attempted to modify the
ByteArray.
2024-01-17 17:05:52 -05:00
Tom Schuster
b54a807b37
avm2: Handle explicitly imported/used namespace for XML lookup
...
Fixes #14792
2024-01-17 21:11:25 +01:00
Aaron Hill
6c420fa5d5
avm2: Run most of Loader.loadBytes immediately
...
This requires moving `set_root_movie` into `UpdateContext`.
Now, we preload the entire movieclip immediately - Flash Player
does this regardless of the size of the SWF.
The 'Loader::load_complete' is delayed to the end of the frame
(which is when the root class is constructed for the loaded clip).
2024-01-17 00:53:08 +01:00
Nathan Adams
f65060e8c9
desktop: Update winit to 0.29.10 and egui to 0.25.0
2024-01-16 21:10:36 +01:00
zhenghaoz
5169d9db3d
avm2: Fix multiply with overflow in `string_to_f64`
2024-01-15 23:44:14 -05:00
Lord-McSweeney
9637682216
avm1: Correctly access topmost `LoaderDisplay` or `Stage` instead of accessing the parent of `avm1_root`
...
This fixes a case where `lockRoot` is involved.
2024-01-15 17:15:36 -08:00
Tom Schuster
1b5eb2e8e2
avm2: Stub XML::namespaceDeclarations
...
Improves #14734
2024-01-15 19:50:09 -05:00
renovate[bot]
3c115238fd
fix(deps): update rust dependencies
2024-01-16 01:13:38 +01:00
sleepycatcoding
5b19ecec97
avm2: Implement XML.setLocalName
2024-01-15 23:53:17 +01:00
renovate[bot]
e0a22b56ce
fix(deps): update wasm-bindgen
2024-01-15 17:24:02 -05:00
Abiel Deneke
df3a033b77
avm2: Stub Accelerometer.isSupported
2024-01-15 22:10:58 +01:00
Kamil Jarosz
5bd643cd4f
core: Improve caret blinking behavior
...
Caret now blinks only when idle.
2024-01-15 08:20:22 +01:00
nosamu
a638715bd8
avm2: Throw null param error in navigateToURL
...
Fixes #14733
2024-01-14 20:17:31 +01:00
Aaron Hill
3cbfbdd4a6
avm2: Add weird parse-as-uint special case to Object keys
...
When handling dynamic properties, avmplus will always try to
parse the string key name as a uint. If it succeeds, then the
key will be stored internally as a integer (via Atom), which is
observable by property iteration. The intention appears to have
been to support `obj[25] = someVal`, but it causes `obj["25"]`
and `obj[25]` to map to the same key (though iterating over the
object's keys will always produce a `number`).
2024-01-13 19:47:58 -05:00
TÖRÖK Attila
55cdfab3d3
avm2: Add API versioning to DisplayObjectContainer
2024-01-13 19:35:54 +01:00
TÖRÖK Attila
4c1d59c4a3
avm2: Cleanup: Make `Domain::get_class` not return a `Result`
...
As it was always the `Ok` variant anyway.
2024-01-13 11:53:35 -05:00
Aaron Hill
195822885e
avm2: Stub all remaining TextField methods and properties
2024-01-12 20:42:18 -05:00
Aaron Hill
639d17d259
Apply 'xml["@myattr"]' logic when setting/deleting properties
...
We previously only applied this when getting properties.
2024-01-12 19:13:35 -05:00
sleepycatcoding
2775c917bf
avm2: Correctly handle `@*` in string_to_multiname
2024-01-13 00:27:28 +02:00
Tom Schuster
79c5112f45
core: Provide a better fallback for Ming typefaces
2024-01-12 21:59:20 +01:00
Kamil Jarosz
70486465e8
core: Support TextField.restrict when pasting
2024-01-11 23:22:49 +01:00
Kamil Jarosz
2ef63d3a61
avm2: Implement TextField.restrict
2024-01-11 23:22:49 +01:00
Kamil Jarosz
1c15cd55b9
avm1: Implement TextField.restrict
2024-01-11 23:22:49 +01:00
Kamil Jarosz
43d4c26b77
core: Implement restrict for EditText
...
EditTextRestrict models the `restrict` property, which is used
to specify which characters the user is allowed to type.
2024-01-11 23:22:49 +01:00
Kamil Jarosz
5ece6981ce
core: Fix caret and selection rendering
...
This commit fixes issues with caret and selection rendering:
1. They had the wrong height and were rendered lower than expected
for some fonts and sizes.
2. The caret was not being rendered at all when there was no text,
but only when the text was set earlier and then deleted.
3. The selection was rendered with translate_x=-1,
which caused overlap over some glyphs.
2024-01-11 23:04:02 +01:00