relrelb
0e3168f99e
desktop: Small event-related cleanups
...
* Use `match state` for `MouseInput` events.
* Remove `ReceivedCharacter` handling from `DesktopUiBackend::handle_event`.
2021-11-25 07:35:33 +02:00
relrelb
a4b2e38f4d
web: Track `keys_down` by `KeyCode`
...
This makes `WebUiBackend::is_key_down` a simple one-line check.
2021-11-25 07:35:33 +02:00
relrelb
cbce91365c
desktop: Track `keys_down` by `KeyCode`
...
This makes `DesktopUiBackend::is_key_down` a simple one-line check.
Also unify the handling code of `ElementState::Pressed` and `ElementState::Released`,
which had a lot of common code.
2021-11-25 07:35:33 +02:00
Adrian Wielgosik
da4ed75bc8
avm2: Compare QNames by local name first
2021-11-22 17:59:00 -07:00
Adrian Wielgosik
c2d521df41
avm2: refactor: Merge has-setter-and-no-getter into one lookup
2021-11-22 17:59:00 -07:00
Adrian Wielgosik
370186dc3c
avm2: refactor: Make trait lookups return a single item
2021-11-22 17:59:00 -07:00
Chris Midgley
cf1d0e7624
web: remove firefox extension version restriction
2021-11-22 21:47:37 +02:00
TÖRÖK Attila
0e4d2d48f5
video/vp6: Don't throw an error on skip frames, reuse the last frame instead
2021-11-22 17:08:31 +01:00
Adrian Wielgosik
a305b80789
swf: Support font layout without swf-v7 fields
2021-11-20 22:48:36 +01:00
relrelb
ff2ef47159
canvas: Fill using the even-odd rule
...
Flash always uses the even-odd fill rule, whereas canvas defaults to
nonzero.
Specify the fill rule explicitly in both `swf_shape_to_canvas_commands`
and `swf_shape_to_svg`.
2021-11-20 22:48:37 +02:00
relrelb
8fb77b34d6
tests: Add `bitmap_data_compare`
2021-11-20 14:11:14 +02:00
relrelb
56b5183262
avm1: Refactor and fix `BitmapData::compare`
2021-11-20 14:11:14 +02:00
bbb651
687069ba7d
avm1: Added BitmapData::compare
2021-11-20 14:11:14 +02:00
relrelb
3760e0e275
core: De-duplicate `round_to_even` function
...
Put a single implementation in `ecma_conversions.rs`.
Need to consider what to do with the similar implementation in `matrix.rs`.
2021-11-20 13:36:06 +02:00
relrelb
7c6d006862
avm2: Correct `TextFormat` properties coercion
2021-11-20 13:36:06 +02:00
relrelb
10b7c69719
avm1: Correct `TextFormat` properties coercion
2021-11-20 13:36:06 +02:00
David Wendt
068e7acc6f
avm2: Remove the need for `lazy_static`
2021-11-19 20:43:53 -07:00
David Wendt
dda8a73899
avm2: Refactor so we don't need to rebox and unbox the numbers into values.
...
Also, use an actual constant table for the ellipsises.
2021-11-19 20:43:53 -07:00
David Wendt
4665a6c210
avm2: None of `Graphics`' methods need to be `pub`.
2021-11-19 20:43:53 -07:00
David Wendt
c719e69693
avm2: Also implement `drawEllipse` using `drawRoundRect`.
2021-11-19 20:43:53 -07:00
David Wendt
ef46d780ba
avm2: Implement `Graphics.drawCircle` using `drawRoundRect`
2021-11-19 20:43:53 -07:00
David Wendt
b318eb9969
avm2: Implement `Graphics.drawRoundRect`
2021-11-19 20:43:53 -07:00
relrelb
ae189c5a0d
tests: Fix image tests
...
Seems like CI was upgraded to use LLVM 13.
Rename image tests (currently only color) to match it.
2021-11-19 21:40:30 +02:00
relrelb
24db13ae1e
html: Handle self-closing tags
...
"br" and "sbr" tags can appear in a self-closing form (i.e. `<br />`).
Commit 3cab464026
forgot to handle this.
2021-11-15 23:28:51 +02:00
relrelb
855bc721a8
html: Restore handling of "br" tags
...
This fully reverts commit 2119ce9
.
Seems like Flash does handle "br" tags, but ignores them under some
unknown circumstances (e.g. setting `htmlText` in AVM1).
For now handle "br" tags unconditionally.
2021-11-15 23:28:51 +02:00
dependabot[bot]
60c2a14363
build(deps): bump isahc from 1.5.1 to 1.6.0
...
Bumps [isahc](https://github.com/sagebind/isahc ) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/sagebind/isahc/releases )
- [Commits](https://github.com/sagebind/isahc/compare/1.5.1...1.6.0 )
---
updated-dependencies:
- dependency-name: isahc
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 23:27:05 +02:00
Daniel Jacobs
d86bf69a04
i18n: Add spanish tranlation for swf download option
2021-11-15 23:12:27 +02:00
Daniel Jacobs
d3a5561e8f
web: Give toggleable option to download swfs in extension/selfhosted
2021-11-15 23:12:27 +02:00
relrelb
2083d77100
tests: Expand `sound`
...
Add cases of `Sound.setVolume()` and `Sound.setPan()` with no arguments.
Also correct `Sound` to `sound` in traces.
2021-11-14 20:25:45 +02:00
relrelb
2e5a8922ae
tests: Uncomment `Sound.getDuration` tests
...
`NullAudioBackend` returns real durations by now.
2021-11-14 20:25:45 +02:00
relrelb
73f5982cad
avm1: Fix `Sound.setVolume()` and `Sound.setPan()` with no arguments
...
Instead of coercing `undefined` into `f64` (which results `NaN` in SWF7+),
treat the missing value argument as `0`.
2021-11-14 20:25:45 +02:00
relrelb
df514f319a
html: Restore handling of "sbr" tags
...
This partially reverts commit 2119ce9821
,
only restoring "sbr" tags handling because Flash seems to ignore only
"br" tags.
2021-11-13 12:11:48 +02:00
relrelb
2119ce9821
html: Remove handling of "br" and "sbr" tags
...
Seems like Flash just ignores them.
2021-11-13 10:21:41 +02:00
relrelb
12e8d3a82f
html: Fix typo
2021-11-13 10:21:41 +02:00
David Wendt
19f9c11854
tests: Add test for `Function`'s type.
2021-11-11 17:12:49 -07:00
David Wendt
c0874f445d
avm2: Functions are functions.
2021-11-11 17:12:49 -07:00
David Wendt
7dd9776d40
avm2: Implement `uint`, `Number`, and `Boolean`'s constructors, too.
2021-11-11 16:34:11 -07:00
David Wendt
e89d85c3f6
tests: Add tests for the four remaining primitive constructors
2021-11-11 16:34:11 -07:00
David Wendt
7cc7f0fe7f
avm2: Impl `int`'s instance initializer.
2021-11-11 16:34:11 -07:00
David Wendt
be3e126ebb
avm2: Stub the `Sprite` constructor as just creating a `MovieClip`.
2021-11-11 16:33:33 -07:00
Tal Hayon
7ed38850fd
core: implement displayState for Stage in avm1/2
2021-11-11 16:20:05 -07:00
relrelb
7b95441874
core: Re-use `EditText::html_text` in `EditText::propagate_text_binding`
2021-11-11 08:05:33 +02:00
relrelb
cf05137c1f
core: `EditText::html_text` cannot fail
2021-11-11 08:05:33 +02:00
relrelb
848b721165
xml: Remove `XmlNode::walk`
2021-11-11 08:05:33 +02:00
relrelb
c4729d733c
core: Avoid one usage of `FormatSpans::replace_text`
...
Use `FormatSpans::from_text` instead.
2021-11-11 08:05:33 +02:00
relrelb
3cab464026
core: Use `quick-xml` directly when creating `FormatSpans`
2021-11-11 08:05:33 +02:00
relrelb
8c64951b15
core: Remove unused `EditText::document`
2021-11-11 08:05:33 +02:00
relrelb
a900aae63e
core: Make `EditText::set_html_text` accept a `&str`
2021-11-11 08:05:33 +02:00
relrelb
0787662079
core: Make `EditText::set_text` accept a `&str`
2021-11-11 08:05:33 +02:00
David Wendt
c4b680fef9
tests: Add test for `EventDispatcher.toString`
2021-11-10 18:16:26 -07:00