Tom Schuster
8ec203a227
avm2: Add Function.prototype.toString and toLocaleString
2024-03-13 10:14:27 +01:00
Tom Schuster
a72d56c3ad
tests: Test AVM2 toString on primitive objects
2024-03-12 21:00:26 -07:00
Tom Schuster
0466605b62
tests: Test RegExp toString behavior
2024-03-10 21:27:39 +01:00
Aaron Hill
7752c32c8e
avm2: Stub GameInput.getDeviceAt and GameInputControl ( #15409 )
2024-03-09 22:01:10 +00:00
Tom Schuster
f27d11443b
tests: Test avm2 Stage.stage3Ds vector-ness
2024-03-07 19:33:09 +01:00
renovate[bot]
a916369f21
fix(deps): update rust dependencies
2024-03-06 21:58:40 +01:00
Lord-McSweeney
95b5c700f5
avm2: Fix a minor optimizer bug
2024-03-06 07:21:28 -08:00
Lord-McSweeney
41bac2ce98
tests: Add another verification test
2024-03-06 07:21:28 -08:00
Lord-McSweeney
2ff4bf5634
tests: Improve verification test
2024-03-06 07:21:28 -08:00
Nathan Adams
09dfa6427e
desktop: Allow changing the language in Preferences
2024-03-05 00:02:27 +01:00
MrCheeze
a119e3e130
core: Improve placement of cursor when clicking in textbox
...
Currently when clicking in a textbox, the cursor will only be placed
correctly if you click exactly on top of a letter. The basic purpose of
this commit is to make it so that clicking in the surrounding margin
will put the cursor in the closest available position, as in Flash Player.
The logic is a bit complex because a single row of text can contain
multiple layout boxes, each with a different Y offset (but all with the
same Y extent). To be accurate, we need to treat each layout box in the
row "as if" it had the same Y offset that the tallest box in its row has.
This commit also contains a fix for an issue where lower_from_text_spans
was passing the wrong text strings and indexes to fixup_line for
newlines, which needed to be fixed in order to be able to click to place
the cursor in an empty row that was created by newlines.
2024-03-02 20:30:50 +01:00
Lv Yitian
556d16302b
avm2: Implement flash.media.ID3Info ( #14916 )
2024-03-02 19:13:31 +00:00
renovate[bot]
c2179e88db
fix(deps): update rust dependencies
2024-03-02 10:05:43 +01:00
Kamil Jarosz
cc8b0aa5dd
core: Use async channels in NavigatorBackend
...
This has several advantages:
1. it allows using async variants of send and recv,
2. it adds consistency as until now Receiver was async,
and Sender was not.
2024-02-28 19:42:54 +01:00
TÖRÖK Attila
e288375543
tests: Add a failing test for Timer.setDelay changing ID
2024-02-27 23:56:33 +01:00
renovate[bot]
9cdb2f31cc
fix(deps): update rust dependencies
2024-02-26 08:14:26 +01:00
renovate[bot]
6b89737093
fix(deps): update rust dependencies
2024-02-19 11:32:22 +01:00
Tom Schuster
ba7c9a4e31
avm2: Always serialize as ECMAArray, which produces an AMF0 MixedArray
2024-02-19 10:13:18 +01:00
Nathan Adams
8d9b50d4f4
tests: Port remainder of shumway tests over
2024-02-18 18:01:28 +01:00
Nathan Adams
0eab4405f6
tests: When a test is known_failure but doesn't have an expected.png, don't mark it as now-passing
2024-02-18 18:01:28 +01:00
Nathan Adams
50961bd684
tests: Don't test NaN output in amf_vector
2024-02-16 01:33:22 +01:00
Aaron Hill
1a1ce91e98
core: Only report socket connected just before we fire 'connect'
...
Platform Racing 3 relies on 'Socket.connected' reporting 'false'
immediately after calling 'Socket.connect' - it internally buffers
data made when 'Socket.connected' is false
2024-02-16 01:10:57 +01:00
svitkin
b55db7083c
tests: Add test for flash.net.navigateToURL
2024-02-12 17:14:11 +01:00
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
ec403e614d
tests: Test TextField::getLineText
2024-02-07 20:34:43 +01:00
David Wendt
e1bfd6f360
tests: Fix text failures caused by improper `output.txt` contents
...
For some reason, FP8 doesn't show the events anymore on its test output, even though the test it has clearly outputs both the connection status and events.
Also, the AVM2 test needs a trailing newline like all the others.
2024-02-07 19:46:39 +01:00
David Wendt
2e0dbba1b4
tests: AVM2 should also test to make sure `NetConnection.connected` works
2024-02-07 19:46:39 +01:00
David Wendt
d7583289c9
avm1: Make `NetConnection.isConnected`'s stub more functional
2024-02-07 19:46:39 +01:00
Tom Schuster
95f5701072
tests: Verify the URLRequest method setter can throw
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
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
Kamil Jarosz
50b5f29c0a
text: Make enter add a new line in multiline fields
2024-02-03 13:40:07 +01:00
Nathan Adams
50dedc3cb9
avm1: Invalidate cacheAsBitmaps when using Color API
2024-02-01 19:27:33 +01:00
Tom Schuster
120394ca7c
tests: Add test for focusIn FocusEvent on a TextField
2024-02-01 12:52:10 +01:00
renovate[bot]
3737725a21
fix(deps): update rust dependencies
2024-01-30 09:23:15 +01:00
Lord-McSweeney
a756970072
tests: Add a test for AVM2 verification
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
Aaron Hill
5b685d411f
chore: Fix nightly Clippy lints
2024-01-28 16:03:29 -05:00
Tom Schuster
40c0f90105
tests: Test all remaining FileReference properties
2024-01-28 17:14:10 +01:00
Nathan Adams
f678d13ca8
tests: Throw an Err, not panic, in Approximations::compare
2024-01-26 18:59:06 +01:00
Nathan Adams
aee051fa45
tests: Split test running into tick/test phases. This is enough to make it work on web.
2024-01-26 18:59:06 +01:00
Nathan Adams
b6614d9705
tests: Turn Test::run() into Test::create_test_runner() - handle running externally
2024-01-26 18:59:06 +01:00
Nathan Adams
1b8d3f7392
tests: Output comparison is part of the TestRunner
2024-01-26 18:59:06 +01:00
Nathan Adams
7c4e345905
tests: Make Environment::create_renderer only make one renderer, not N amount
2024-01-26 18:59:06 +01:00
Nathan Adams
bd64ee2942
tests: Extract out Test::movie()
2024-01-26 18:59:06 +01:00
Nathan Adams
5040bf3aff
tests: Extract out a TestRunner struct
2024-01-26 18:59:06 +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
31e69c51b5
test: Rewrite AVM filter tests and regroup them in a single file
...
This uncovers some bugs in our implementation, so mark the test as a
known failure for now.
2024-01-26 18:40:06 +01:00