ec6debb changed item_index_at to return -1 when hovering over a
separator. The intent was to not send the separator to clients for
MenuItemEntered.
However, this had the unintented consequence of not closing the submenu
when you hover over a separator. Submenus ignore when the item index is
-1 in order to leave the menu open when you move the mouse outside. This
ends up leaving the submenu open without the highlight to show what menu
item the submenu belongs to.
A slightly less severe consequence is that pressing the up or down arrow
key in such a situation would now go the top or bottom of the menu
rather than the item above or below the separator.
We now push the special casing of separators into set_hovered_index so
that the rest of the code behaves as it did before ec6debb.
Several test262 tests rely on creating phony RegExp objects that do not
have the internal slots used to test for a valid RegExp object. To allow
these tests to run (and because the spec doesn't require real RegExp
objects in these methods), do not attempt to downcast where it isn't
needed.
This was previously used as a wrapper for Regex::match when that method
was invoked by multiple RegExp.prototype implementations. But now all
implementations go through the RegExpExec abstraction, so this helper
is not needed. Remove it to discourage its usage.
Also update a comment about using dynamic properties for lastIndex; this
is no longer a FIXME.
The RegExp specification dictates that the internal implementation of
RegExp.prototype.exec must go through the RegExpBuiltinExec abstraction.
Note there is currently no functional difference in this commit. However
this now allows other RegExp.prototype methods to use RegExpExec rather
than calling RegExp.prototype.exec. Then, if JavaScript in the wild has
overwritten exec, RegExpExec has some protections to defer to
RegExpBuiltinExec.
ImageViewer window kept growing while zooming in, which causes out of
memory error and crashes the application. Now, only the image content
is rescaled and the window size is preserved.
We also open the display window as the same size as the image, which may
cause a similar issue for very large image files. This is prevented by
limiting the maximum window size to be the screen size.
Previously, this mode would flash flush/repaint rects in yellow for
however it long it took for the compositor to replace the yellow with
the final image instead.
Now we usleep() for 10 ms when flashing, so you get a chance to see
the yellow. This immediately makes "flash flush" mode super useful. :^)
These were an ad-hoc way to implement special behaviour when reading or
writing to specific object properties. Because these were effectively
replaced by the abillity to override the internal methods of Object,
they are no longer needed.
This is not a functional change, the exposed (incorrect) behaviour is
the same as it was before, this simply removes the last user of
NativeProperties, allowing us to remove them completely from LibJS.
Previously, we assumed that the `.text` segment was loaded at vaddr 0 in
all dynamic libraries, so we used the dynamic object's base address with
`msyscall`. This did not work with the LLVM toolchain, as it likes to
shuffle these segments around.
This now also handles the case when there are multiple text segments for
some reason correctly.
`.text` segments with non-aligned offsets had their lengths applied to
the first page's base address. This meant that in some cases the last
PAGE_SIZE - 1 bytes weren't mapped. Previously, it did not cause any
problems as the GNU ld insists on aligning everything; but that's not
the case with the LLVM toolchain.
This is often needed in ArrayPrototype when getting items with indices
above 2**32-1 is possible since length is at most 2**53-1.
This also fixes a number of these cases in ArrayPrototype where the type
was not big enough to hold the potential values.
Unfortunately this fast path leads to problems if Array.prototype is
changed. We probably need to find out some way to optimize these methods
by detecting changes to the prototype or other mechanisms.
The ProtectedDataMutationScope cannot blindly assume that there is only
exactly one thread at a time that may want to unprotect the Process.
Most of the time the big lock guaranteed this, but there are some cases
such as finalization (among others) where this is not necessarily
guaranteed.
This fixes random panics due to access violations when the
ProtectedDataMutationScope protects the Process instance while another
is still modifying it.
Fixes#8512
This class acts like a combined ref-count as well as a spin-lock
(only when adding the first or removing the last reference), allowing
to run a specific action atomically when adding the first or dropping
the last reference.
Previously calculating multiline text width would return invalid value,
this change makes it so that we are returning the longest line width.
We are now also reusing same width() implementation for both UTF-8 and
UTF-32 strings.
Just like the initial Temporal.TimeZone commit, this patch adds the
Instant object itself, its constructor and prototype (currently empty),
and two required abstract operations.
The issue was that the desktop IconView has Gfx::FrameShape::NoFrame as
its frame shape, but with a non-zero frame_thickness().
This caused us to not render a frame, but to include one in the
selection boundary calculations.
Fix this by setting the desktop icon view's frame thickness to 0.
Fixes#8525.
Now that pthread_cond_t works correctly thanks to Sergey, we can use
them to wake up the BackgroundAction worker thread instead of making
a Unix pipe. :^)