Commit graph

46343 commits

Author SHA1 Message Date
MacDue
681ed93a41 PixelPaint: Fix gradient tool clipping issues
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.
2023-01-27 18:05:19 +00:00
MacDue
efb2bed525 PixelPaint: Fix off-by-one in on_second_paint() clip rect
Previously the clip rect did not include the 1px border at the edges
of the rulers.
2023-01-27 18:05:19 +00:00
Timothy Flynn
5e29e04122 LibJS+LibLocale: Propagate errors from find_regional_values_for_locale
This had quite the footprint.
2023-01-27 18:00:17 +00:00
Timothy Flynn
b2097f4059 LibJS+LibLocale: Port Intl.DateTimeFormat to String 2023-01-27 18:00:17 +00:00
Timothy Flynn
970e9df245 LibLocale: Remove "else" after "if" statements that always return
Mostly just to keep clangd quiet.
2023-01-27 18:00:17 +00:00
Timothy Flynn
c35b1371a3 AK: Add an overload of String::find_byte_offset for StringView 2023-01-27 18:00:17 +00:00
Sam Atkins
38b4e938b7 WebContent: Implement more of WebDriver element-click algorithm
All this just for `<option>` elements. Other elements require a lot more
infrastructure that we don't have yet.
2023-01-27 17:30:46 +00:00
Sam Atkins
f64ba82944 WebContent: Bring existing WebDriver element-click code closer to spec
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.
2023-01-27 17:30:46 +00:00
Sam Atkins
27d4912f12 LibWeb: Make NodeFilter::Result an enum class 2023-01-27 17:30:46 +00:00
Sam Atkins
a078fad787 LibWeb: Expose the NodeFilter's whatToShow values to C++
These are required if we want to use the NodeIterator or TreeWalker APIs
from C++, which we do for WebDriver.
2023-01-27 17:30:46 +00:00
Sam Atkins
c43db5dae7 WebDriver+LibWeb: Rename "click" to "element_click"
This matches the name used in the spec, and is unambiguous.
2023-01-27 17:30:46 +00:00
Nico Weber
2f3eefe03b icc: Accept path to images in addition to path to ICC profile 2023-01-27 17:26:48 +00:00
Nico Weber
f4bc10c84a LibGfx: Make JPGLoader hand out embedded ICC bytes 2023-01-27 17:26:48 +00:00
Nico Weber
307712b398 LibGfx: Add a method to ImageDecoderPlugin for reading ICC data
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.
2023-01-27 17:26:48 +00:00
Sam Atkins
609a89cfb0 LibWeb: Correct logic in TreeWalker::next_node()
We were creating a new `result` variable here, when we should have been
assigning to the original one.
2023-01-27 15:20:41 +01:00
Timothy Flynn
ad8183beb4 Meta: Support running ladybird with arguments from serenity.sh
You may now, for example, run:

    ./Meta/serenity.sh run lagom ladybird https://serenityos.org
2023-01-27 08:14:24 -05:00
Timothy Flynn
9743445e44 Meta: Allow running Lagom tests with "serenity.sh run lagom <target>"
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.
2023-01-27 08:14:24 -05:00
Sam Atkins
a5db4a0551 Ladybird: Replace uses of JsonObject::get_deprecated() 2023-01-27 08:07:24 -05:00
Sam Atkins
95b1cf2dcd Shell: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
ba51e2dd3f Services: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
b592629fe5 Profiler: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
33ab3a212f Inspector: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
141aa37eda HackStudio: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
6fdfa9f313 SystemMonitor: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
2df57d5ae0 SystemMonitor: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
4b17cba074 Spreadsheet: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
c84e11c154 SpaceAnalyzer: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
74452ffc50 Presenter: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
c36de98223 PixelPaint: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
ecbe317413 NetworkSettings: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
3a48009022 KeyboardSettings: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
22b0089783 Browser: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
0716b2afdc Applets: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Nico Weber
87f1a0e957 LibGfx+icc: ICCProfile's primary_platform() should be optional
Found by running `icc` on a jpeg file produced by a Pixel phone
after #17195.
2023-01-27 12:01:58 +00:00
Poseydon42
3cd04f40e1 LibCpp: Parse 'using namespace' declarations
This gets us a little bit closer to a fully capable C++ parser.
2023-01-27 12:40:40 +01:00
Timon Kruiper
2896d7796d Kernel/aarch64: Set Access Permission (writable bit) on PageTableEntry
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.
2023-01-27 11:41:43 +01:00
Timon Kruiper
1d58663298 Kernel/aarch64: Implement switching page directories
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.
2023-01-27 11:41:43 +01:00
Timon Kruiper
1f30a5e4d9 Kernel/aarch64: Store and initialize TTBR0_EL1 in ThreadRegisters 2023-01-27 11:41:43 +01:00
Timon Kruiper
9e90932bfb Kernel/aarch64: Add helper to get the current TTBR0_EL1 2023-01-27 11:41:43 +01:00
Timon Kruiper
d9946c8e89 Kernel/aarch64: Keep track of root page table and kernel directory table 2023-01-27 11:41:43 +01:00
Timon Kruiper
697c5ca5e5 Kernel: Move Memory/PageDirectory.{cpp,h} to arch-specific directory
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.
2023-01-27 11:41:43 +01:00
Timon Kruiper
55d756a813 Kernel/aarch64: Implement initial page fault handling
The shared code is moved to a common PageFault.cpp file.
2023-01-27 11:41:43 +01:00
Timon Kruiper
a532d28905 Kernel/aarch64: Add stub for handle_safe_access_fault 2023-01-27 11:41:43 +01:00
Timon Kruiper
ade27fa6b9 Kernel: Refactor PageFault for use in the aarch64 port
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.
2023-01-27 11:41:43 +01:00
Timon Kruiper
fb10774862 Kernel: Factor our PreviousMode into RegisterState::previous_mode
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.
2023-01-27 11:41:43 +01:00
Timon Kruiper
247109cee6 Kernel/aarch64: Execute kernel with SP_EL1 instead of SP_EL0
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.
2023-01-27 11:41:43 +01:00
Timon Kruiper
05659debd1 Kernel/aarch64: Move exception handler to Interrupts.cpp
Also dump the registers in a nicer format.
2023-01-27 11:41:43 +01:00
Julian Offenhäuser
22b1e1076a LibGfx: Make OTF prefer Cmap tables of the Windows platform again
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.
2023-01-27 10:59:52 +01:00
Andreas Kling
ddbdeb3ca0 Ladybird: Add --dump-layout-tree mode that dumps layout tree and exits 2023-01-27 10:41:24 +01:00
Andreas Kling
90fee39290 Ladybird: Fire the WebContentView::on_load_finish hook if set 2023-01-27 10:33:18 +01:00