This ensures that the gradient does not paint over the rulers at
any zoom level, and also shows the guidelines/handles even when the
gradient is clipped.
The main change here is to implement and use the "container for element"
algorithm. But also, adjust the errors we return. Errors thrown by
`scroll_element_into_view()` are not related to the scrolling itself,
so should not claim to be. `UnsupportedOperation` is more accurate than
`InvalidArgument` when we're expressing that the operation isn't fully
implemented.
This probably won't be the final API for getting color spaces
from images, since some formats just store an "is sRGB?" flag
instead of a full profile. Instead, once everything works,
we probably want to give every Bitmap a pointer to some
color space abstraction.
But we can always change this later, once things are further along
and better understood.
After 5ac57f9, we could no longer run "serenity.sh run lagom TestString"
because the TestString binary now lives in a subdirectory under
Build/lagom. Thus the existing method of running "$BUILD_DIR/TestString"
could not work.
This adds a "run-lagom-target" custom target to Lagom, to run a command
and pass arguments to that invocation. It turns out there really isn't a
"pretty" way of doing this with CMake or Ninja. But we can pass these as
environment variables for CMake to interpret. We just must be careful to
massage arguments into a CMake list.
This will cause page faults to be generated. Since the previous commits
introduced the handling of page faults, we can now actually correctly
handle page faults.
The code in PageDirectory.cpp now keeps track of the registered page
directories, and actually sets the TTBR0_EL1 to the page table base of
the currently executing thread. When context switching, we now also
change the TTBR0_EL1 to the page table base of the thread that we
context switch into.
The handling of page tables is very architecture specific, so belongs
in the Arch directory. Some parts were already architecture-specific,
however this commit moves the rest of the PageDirectory class into the
Arch directory.
While we're here the aarch64/PageDirectory.{h,cpp} files are updated to
be aarch64 specific, by renaming some members and removing x86_64
specific code.
The class used to look at the x86_64 specific exception code to figure
out what kind of page fault happend, however this refactor allows
aarch64 to use the same class.
Various places in the kernel were manually checking the cs register for
x86_64, however to share this with aarch64 a function in RegisterState
is added, and the call-sites are updated. While we're here the
PreviousMode enum is renamed to ExecutionMode.
Until now the kernel was always executing with SP_EL0, as this made the
initial dropping to EL1 a bit easier. This commit changes this behaviour
to use the corresponding SP_ELx for each exception level.
To make sure that the execution of the C++ code can continue, the
current stack pointer is copied into the corresponding SP_ELx just
before dropping an exception level.
As the different Cmap encoding records are guaranteed to be sorted by
their platform ID, we would previously prefer the Macintosh platform
because of its lower ID value. However, this platform is split up into
a lot of encoding formats for different languages, and usually only
English is included. This meant that we could not handle most unicode
characters anymore.
The Windows platform now takes precedence again, as it can handle
arbitrary code points in its supported encodings.
This solution is still far from perfect, but it makes this regression
disappear for now.