* The properties parameter is evaluated last. This is observable by
the order the `toString`/`valueOf` methods of the parameters are
called.
* Only `null` in the property list parameter configures all properties,
as opposed to `undefined`, `null`, numbers and booleans previously.
* Objects in the property list parameter are not handled specially.
Instead, they're also coerced to string and split by comma.
* Remove `buildProduction` as it was equivalent to `build`.
* Fix `build:avm_debug` and change it to `build:debug`, which also
disables Webpack optimizations.
Each function is reduced to just 3 opcodes on x86:
https://godbolt.org/z/n6q6zxnh6
WebAssembly benefits as well: https://godbolt.org/z/fcETE9GYn
This should improve load-time performance because read_f64_me is
used frequently (for each AVM1 double constant).
It seems that these two classes were totally equivalent, so simply
drop "active" and use only "menu_item".
Also, don't highlight disabled context menu items on hover.
i fully intended to press "run anyway" just to see what happened, and it was annoying that Ruffle took me to another page so i had to re-load the flash.. (from a page with 10 seconds worth of ads before playing the flash, even)
Let the `Reader` outlive outside the loop, so it tracks its own
position, instead of doing so manually.
Also move `read_from_file` outside and reuse it.
Change two cases to use `Reader::read_slice` instead of `self.input`.
Not only this avoids relying on an implementation detail, this also
raises an `UnexpectedEof` error if the read is beyond the SWF.
* tests: add tests for scroll
* avm1: implement scroll, maxscroll, bottomScroll
* chore: fmt
* docs: note that scroll is 1-based
* fix: non-word wrapped text with manual breaks is scrollable
* chore: move magic number to const
* chore: avoid mut with extra if
* chore: moving clamping behaviour into core
* refactor: eagerly compute line data
* fix: make scroll work when text is aligned right
* chore: clippy
* docs: add more information about line_data
* tests: add more test cases for scroll
The current version just doesn't make any sense.
The fixed version is akin to the `target.starts_with("_level") && target.len() > 6` line a bit earlier in this file.
* Extend from the recommended config.
* Remove the exclude field that doesn't contribute to the file
inclusion (include alone should be enough).
* Remove the esModuleInterop field that shouldn't be necessary.
* `eslint:recommended` is not needed in the each file as it already
appears in the root config.
* The default `@typescript-eslint/naming-convention` rule is preferred.
* Other formatting improvements.
Since #3111, `wasm-opt` became mandatory on GitHub Actions. But the
check whether we run on GitHub Actions is Bash-specific, and fails
on Windows. That means builds on Windows without `wasm-opt` always
fail.
As a workaround, use the trick from https://gist.github.com/prail/24acc95908e581722c0e9df5795180f6
to run the check only on Unix, and skip it on Windows:
```
echo ; [ \"$GITHUB_ACTIONS\" != true ] # > nul
```
On Unix, `echo` does nothing, the check runs, and the rest is
considered a comment.
On Windows, `echo` prints everything until the `> nul`, which
suppresses the print by redirection, making the whole statement
effectively a no-op.