Differentiates between normal minimization and hidden windows. A window
which is hidden is still minimized, but can be seen as another stage
of being minimized.
Specifically, this now explicitly takes the length, adds missing
exceptions checks to calls with user-supplied lengths, takes and uses
the prototype argument, and fixes some spec non-conformance in
ArrayConstructor and its native functions around the use of ArrayCreate
In the past Hack Studio had the ability to design GUI widgets via `.frm`
files. We now use the GML playground for this purpose, and the old code
can be removed. `.frm` files are now treated as plain text files.
This commit also fixes a crash when opening `.frm` files.
`m_form_inner_container` was never instantiated, and caused a null
pointer dereference.
Using fstatat() allows the kernel to do relative path resolution as
opposed to absolute path resolution, which is significantly faster
and allows us to build the path cache sooner. :^)
Result classes now return their bitmap via a virtual Gfx::Bitmap*
getter. This effectively makes bitmap fetching lazier, since only
results that end up on screen actually get asked for their bitmap.
This drastically reduces the amount of work done by the FileProvider
background worker.
When the root path of a DirIterator ends with '/', we don't need to
add another '/' before appending the file name.
Fixes an issue where files found by Assistant had 2 leading slashes.
Also, make it return a reference as aside from only three special
situations (creating, destroying, and moving a window between stacks)
a window should always be on a window stack. Any access during those
brief situations would be a bug, so we should VERIFY this.
This solves two problems:
* A window was sometimes deemed occluded when the window rect was
entirely covered by other rectangles, transparent or opaque. This
caused a window to stop rendering even if a small portion was still
visible, e.g. when it was merely covered by a window shadow.
* The window switcher is interested in window updates even when a
window is entirely covered by another one, or when it is on another
desktop. This forces windows to be not occluded in those cases.
When using the Super+Tab hotkey then all windows will be displayed,
and we will switch to another virtual desktop if needed.
When using the Alt+Tab hotkey then only the windows on the current
desktop will be displayed.
This also adds the ability to query how many virtual desktops are
set up, and for the Taskbar to be notified when the active virtual
desktop has changed.
This creates a 2-dimensional array of WindowStack instances, one for
each virtual desktop. The main desktop 0,0 is the main desktop, which
is the desktop used for all stationary windows (e.g. taskbar, desktop).
When adding windows to a desktop, stationary windows are always added
to the main desktop.
When composing the desktop, there are usually two WindowStacks
involved. For stationary windows, the main desktop will be traversed,
and for everything else the current virtual desktop will be iterated.
Iteration is interweaved to preserve the correct order. During the
transition animation, two WindowStacks will be iterated at the same
time.
This patch implements spec-compliant runtime semantics for the following
constructs:
- super.property
- super[property]
The MakeSuperPropertyReference AO is added to support this. :^)
When creating uninitialized storage for variables, we need to make sure
that the alignment is correct. Fixes a KUBSAN failure when running
kernels compiled with Clang.
In `Syscalls/socket.cpp`, we can simply use local variables, as
`sockaddr_un` is a POD type.
Along with moving the `alignas` specifier to the correct member,
`AK::Optional`'s internal buffer has been made non-zeroed by default.
GCC emitted bogus uninitialized memory access warnings, so we now use
`__builtin_launder` to tell the compiler that we know what we are doing.
This might disable some optimizations, but judging by how GCC failed to
notice that the memory's initialization is dependent on `m_has_value`,
I'm not sure that's a bad thing.
ResolveBinding now matches the spec, while the non-conforming parts
are moved to GetIdentifierReference.
Implementing this properly requires variable bindings.
This implements StringUtils::find_any_of() and uses it in
String::find_any_of() and StringView::find_any_of(). All uses of
find_{first,last}_of have been replaced with find_any_of(), find() or
find_last(). find_{first,last}_of have subsequently been removed.
This removes StringView::find_first_of(char) and find_last_of(char) and
replaces all its usages with find and find_last respectively. This is
because those two methods are functionally equivalent.
find_{first,last}_of should only be used if searching for multiple
different characters, which is never the case with the char argument.
This also adds the [[nodiscard]] to the remaining find_{first,last}_of
methods.
This is used by VM::call_internal() and VM::construct() which roughly
map to function objects' [[Call]] and [[Construct]] slots in the spec.
Reorganizing this code revealed something weird: NativeFunction gets
its strictness by checking VM::in_strict_mode(). In other words,
it inherits the strict flag from the caller context. This is quite
weird, but many test-js tests rely on it, so let's preserve it until
we can think of something nicer.