These symlinks' only purpose was to be copied into the rootfs along with
the rest of Base. Instead of storing symlinks to files that either
don't exist in the Base directory, or point to an absolute path outside
of the serenity folder, move these symlinks into the
build-root-filesystem.sh script.
Similar to the FontDatabase, this will be needed for Ladybird to find
emoji images. We now generate just the file name of emoji image in
LibUnicode, and look for that file in the specified path (defaulting to
/res/emoji) at runtime.
`consume_until(foo)` stops before foo, and so does
`ignore_until(Predicate)`, so let's make the other `ignore_until()`
overloads consistent with that so they're less confusing.
This commit moves the implementation of getopt into AK, and converts its
API to understand and use StringView instead of char*.
Everything else is caught in the crossfire of making
Option::accept_value() take a StringView instead of a char const*.
With this, we must now pass a Span<StringView> to ArgsParser::parse(),
applications using LibMain are unaffected, but anything not using that
or taking its own argc/argv has to construct a Vector<StringView> for
this method.
10ms (the default) is ridiculous and causes all kinds of glitches if we
actually want to have a low-latency queue.
<https://gitlab.com/qemu-project/qemu/-/issues/1076#note_996636777>
suggests 2ms (and no lower than 1ms). This improves audio glitch
resistance at our current 512 sample buffer size, but going lower is
still not possible.
Imported functions in Wasm may throw JS exceptions, and we need to
preserve these exceptions so we can pass them to the calling JS code.
This also adds a `assert_wasm_result()` API to Result for cases where
only Wasm traps or values are expected (e.g. internal uses) to avoid
making LibWasm (pointlessly) handle JS exceptions that will never show
up in reality.
This adds the condition member.type->is_string() to the if statement, so
that we now conditionally check the dictionary member is a new string
and associated with an optional constructor parameter.
The LibWeb fuzzer build is really slow, so for local builds it is useful
to disable it when you're not interested in running that fuzzer.
Co-authored-by: Andrew Kaster <akaster@serenityos.org>
At the moment, this processes the RIFF chunk structure and extracts
the ICCP chunk, so that `icc` can now print ICC profiles embedded
in webp files. (And are image files really more than containers
of icc profiles?)
It doesn't even decode image dimensions yet.
The lossy format is a VP8 video frame. Once we get to that, we
might want to move all the image decoders into a new LibImageDecoders
that depends on both LibGfx and LibVideo. (Other newer image formats
like heic and av1f also use video frames for image data.)
This picks up any upstream brew changes that haven't been pulled into
the default Azure VMs. For example, the ffmpeg dependency of qt is
currently broken in the 8 day old brew commit they are using.
Make sure that we set SERENITY_SOURCE_DIR in ctest, and make sure to
pass the test root to the CI job.
More overhaul of test-js 'test root' finding is needed however.
When a constructor has an optional dictionary as argument, and those
members are of type new string, make sure that we release_value()
setting the dictionary members.
The patch also contains modifications on several classes, functions or
files that are related to the `JPGLoader`.
Renaming include:
- JPGLoader{.h, .cpp}
- JPGImageDecoderPlugin
- JPGLoadingContext
- JPG_DEBUG
- decode_jpg
- FuzzJPGLoader.cpp
- Few string literals or texts
This makes use of the new [UseNewAKString] extended attribute. Using
Vector storage will make it easier to make this interface into an IDL
iterable. It seems the reason it didn't use Vector originally was due
to awkward DeprecatedString -> String conversions.
Adding the [UseNewAKString] extended attribute to an interface will
cause all IDL string types to use String instead of DeprecatedString.
This is done on an per interface level instead of per type/parameter
because:
- It's much simpler to implement, as the generators can already access
the interface's extended attributes. Doing it per type/parameter
would mean parsing and piping extended attributes for each type that
doesn't already take extended attributes, such as unions.
- Allows more incremental adoption of AK::String. For example, adding
[UseNewAKString] to BodyInit would require refactoring Request,
Response and XMLHttpRequest to AK::String in one swoop. Doing it on
the interface allows you to convert just XHR and its dependencies at
once, for example.
- Simple string return types (i.e. not parameterised or not in a union)
already accept any of the string types JS::PrimitiveString::create
accepts. For example, you can add [UseNewAKString] to DOMStringMap to
convert Element attributes to AK::String and still return AK::String
from get_attribute, without adding [UseNewAKString] to Element.
- Adding [UseNewAKString] to one function typically means adding it to
a bunch of other functions, if not the rest of them. For example,
adding [UseNewAKString] to the parameters FormData.append would
either mean converting AK::String to AK::DeprecatedString or storing
the AK::String as-is, making the other functions of FormData have to
convert back from AK::String or also support AK::String.
This includes an Error::create overload to create an Error from a UTF-8
StringView. If creating a String from that view fails, the factory will
return an OOM InternalError instead. VM::throw_completion can also make
use of this overload via its perfect forwarding.
The aarch64 processor is set up to trap on unaligned memory accesses, so
to enforce that the compiler correctly generates aligned accesses, the
-mstrict-align flag is needed. We also need the -Wno-cast-align as there
are some files in AK that don't build without the flag.