As a demo, query the firmware version. `Meta/serenity.sh gdb aarch64`
can be used to observe that qemu puts 0x548E1 in x0 in response
to this mailbox message.
When using the IN6_IS_ADDR_V4MAPPED macro in Serenity's LibC it would
fail when compiling with the error message:
'invalid type argument of '->''.
This patch corrects the macro so that e.g. GLib port can compile again.
A weakly held XHR object is not guaranteed to remain alive after
running arbitrary JavaScript, so let's make sure we take a strong
reference in the ResourceLoader callbacks here.
The HTML spec tells has some special rules for <body> and <frameset>
elements' onfoo event handler attributes. In some cases, the implicitly
generated event listeners should end up on the relevant global object
instead of the element itself.
This patch implements the first part of that behavior.
This fixes a Kernel Panic where the lazy allocation triggers inside an
ISR and grabs a mutex, which isn't allowed when interrupts are
disabled. This also fixes a bug where the mapping for VirtIO device
BARs is never allocated. #9876
This logic was kept in the GlobalEventHandlers mixing for sharing
between Document and HTMLElement, but there are other interfaces who
need to support `onfoo` attribute event listeners as well.
Note: most systems now use a font's .notdef character for unknown
glyphs (commonly the tofu box) and reserve 0xFFFD for encoding
errors. Until Serenity supports tofu, 0xFFFD is a preferable, if
deprecated, alternative to '?' to reduce ambiguity.
The editor now unmasks fonts on load, mapping their glyphs to the
complete unicode character set, and masks them upon saving to
reduce disk space. This is a naive approach in terms of memory
usage and can be improved but whose immediate goal is to allow
editing any glyph without concern for range allocation.
Type has been replaced with a bit mask size whose value corresponds
to the number of u8 ranges of 256 characters per bit. Given 0x110000
possible glyphs in Unicode 13.0, its maximum size is currently 544
and can be expanded if needed.
Adds the 0xFFFD replacement character to Csilla/KaticaRegular fonts
and fixes dozens of alignment errors in the Latin character sets.
Removes the concept of Type enumeration in favor of a bitmask which
represents 544 potential byte ranges of 256 characters per bit,
supporting the current unicode code point set (0x0000-0x10FFFF).
Range positions are indexed in a vector for code point lookup and
conversion.
Co-authored-by: Lynn <lynn@foldr.moe>
Currently, writing anything to `/dev/mouse0` or `/dev/keyboard0` causes
the Kernel to panic. The reason for this is that
`[Mouse,Keyboard]Device::write` always returns 0, which is explicitly
prohibited by `VERIFY` macro in `Process::sys$write`. The fix seems
trivial; `write` should return EINVAL instead (as is the case with, for
example, `KCOVDevice`).
These API's are used in a variety of ways when building the die cache.
Each AbbreviationEntry has vector and other members, so avoid copying
it at all costs.
This algorithm is both iterative and recursive, so allocating on every
recursion, or when iterating each child is extremely costly.
Instead allow the on stack DIE to be re-initialized so it can be reused.
We were computing the padded rect of the box during every paint phase,
despite only needing it in the Overlay phase.
Since this is an expensive call, let's take care not to make it
unnecessarily.
If the next token isn't a TokenType::Colon (:), this can't possibly be a
labelled statement, so we can fail before having to save_state().
This improves parsing time on a large chunk of JS by ~12.5%.
By using the FlyString(StringView) constructor instead of the
FlyString(String) one, we can dodge a temporary String construction.
This improves parsing time on a large chunk of JS by ~1.6%.