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