This pre-commit config is quite simple: all it does for now is running
the already existing Meta/lint-ci.sh script to ensure no changes that
won't pass the CI linting step are committed.
Consequently pass_filenames is set to false, as these scripts will
determine which files to check themselves - should this ever become a
performance bottleneck, we can update them to accept an optional list of
filenames.
It should be noted that using pre-commit for Serenity development is by
no means a requirement, but doing so may decrease the number of CI
builds failing due to forgotten license headers etc. - especially if
you're pushing to `master` directly, rather than going through pull
requests *hint hint*.
For info how to install & use pre-commit, see https://pre-commit.com/.
Fixes#2365.
The bug is that if you try to cp DIR_A to DIR_B where DIR_A and DIR_B
have the same parent directory and DIR_A's name is a prefix of DIR_B
(e.g. foo -> foo2, bar -> barbar), it thinks that it's a subdirectory
(since it checks if DIR_A's realpath is a prefix of DIR_B's realpath).
The easiest solution is to put a path delimiter at the end before the
comparison, since you can't have a / in the middle of a directory name.
For example if DIR_A is /home/anon/foo and DIR_B is /home/anon/foo2,
then DIR_A's realpath is a prefix of DIR_B's realpath even though DIR_B
is not inside DIR_A.
add_constructor() will already allocate an XMLHttpRequestConstructor and
update m_xhr_constructor accordingly, we don't have to do it ourselves.
This is now in line with how all the LibJS constructors work. Also make
the XHR constructor responsible for setting its "prototype" property
itself, for consistency and fail-proofing.
Previously we would only set it on the constructor we allocated manually
but which was then thrown away, leading to the property never being set
properly.
If loading the WindowServer config fails or we get a value other than
"simple", "center", "tile", or "scaled", DisplaySettings would crash
when changing the wallpaper image.
Fixes#4360.
This isn't entirely symmetrical with on_load_start as it will also fire
on reloads and back/forward navigations. However, it's good enough for
some basic use cases, and we can do more sophisticated notifications
later on when we need them.
Fixes#4345.
This was done in 54b453b in the name of "fixing event loop processing in
subshells", but I do not see how a new PGID is supposed to affect the event
loop.
This seems to have been done by mistake, let's see if any tests fail
because of this.
This uses the KMP algorithm to implement the search.
Also replaces the slow route of the normal memmem() with KMP, which
should be fairly faster (O(n + m) as opposed to O(n * m)) :^)
This was used for a feature where you could pass a vector of arguments
to enter_scope(). Since that way of passing arguments was not GC-aware
(as vectors use C++ heap storage), let's avoid using it and make sure
everything that needs to stay alive is either on the stack or in traced
storage instead.
TreeViews using FileSystemModels collapse whenever the file system is
changed in anyway. This includes creating, dragging, deleting or
pasting any files/folders. This commit updates the refresh_tree_view()
lambda, which seems to have stopped working at some point, and calls it
whenever any of the actions mentioned above are activated.
We were building up a vector with all the values in an object's indexed
property storage, and then iterating over the vector to mark values.
Instead of this, simply iterate over the property storage directly. :^)
Remove ACCURATE_GAMMA_ADJUSTMENT, since it makes the implementation
uglier, isn't guaranteed to make gamma adjustment accurate and is much
slower. gamma_accurate_blend4 should either be always used or not
exist based on compilation flags, so there is no need to have it in
its own function. Finally, we should use AK/SIMD.h instead of defining
our own f32x4 type.