Commit graph

48140 commits

Author SHA1 Message Date
Aliaksandr Kalenik
a9f8d4eada LibWeb+LibWebView+WebContent+Ladybird: Add IPC call that opens new tab 2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
4717d645d3 Ladybird: Generate window handle during client creation
Generate handle UUID for top-level context that is going to
run in created WebContent process and sent it over IPC.

Co-authored-by: Timothy Flynn <trflynn89@pm.me>
2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
7c90c67a71 LibWebView: Generate window handle during client creation
Generate handle UUID for top-level context that is going to
run in created WebContent process and sent it over IPC.

Co-authored-by: Timothy Flynn <trflynn89@pm.me>
2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
6c052c45db LibWebView: Add window handle in ClientState in ViewImplementation
Add field for a handle that is going to be used by WebDriver to
identify top-level browsing contexts.

It is supposed to be populated by WebContent client during creation.

Co-authored-by: Timothy Flynn <trflynn89@pm.me>
2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
6d91d2fa50 WebContent: Add IPC call to set window handle from WebContent client 2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
48e0789a17 WebContent: Add IPC call to get window handle from WebContent client 2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
d87a207ca9 LibWeb: Add handle member in BrowsingContext
`handle` is uuid that is going to be used in WebDriver to identify
browsing context.
2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
e8550ed21d LibWeb: Move code that generates uuid into separate function
Make possible to generate uuid without having crypto class instance.
2023-03-16 13:17:37 -04:00
Fabian Dellwing
12cd74495a LibTLS+Base: Rework default system certificate parser
Change the default system certificate parser from our arbitrary
INI format to well-known PEM format.
2023-03-16 18:54:20 +03:30
Fabian Dellwing
da6130a6d8 Tests: Rework TLS test to use new cacert.pem 2023-03-16 18:54:20 +03:30
Fabian Dellwing
b07654c3c1 Meta: Download cacert.pem at build time 2023-03-16 18:54:20 +03:30
Fabian Dellwing
06340ca674 LibCrypto: Add multiple PEM parser
This adds a function to parse multiple PEMs out of a single input.
This allows us to load certificates from a cacert.pem file without
need for preprocessing.
2023-03-16 18:54:20 +03:30
Timothy Flynn
700ad6bf35 WebContent+LibWebView: Consolidate the way browsers connect to WebDriver
Currently, on Serenity, we connect to WebDriver from the browser-side of
the WebContent connection for both Browser and headless-browser.

On Lagom, we connect from within the WebContent process itself, signaled
by a command line flag.

This patch changes Lagom browsers to connect to WebDriver the same way
that Serenity browsers do. This will ensure we can do other initializers
in the same order across all platforms and browsers.
2023-03-16 15:02:41 +00:00
Nico Weber
3a7257c9fe image: Don't just crash when the input file can't be decoded
If the input file didn't exist at all, the TRY(MappedFile::map())
gives us a (cryptic) error message, but if it existed but wasn't an
image file, we would crash. Now we print a message instead.
2023-03-16 10:18:44 -04:00
Nico Weber
0591aa1d96 image: Add --assign-color-profile= flag
This allows assigning a color profile from a .icc file to the output.
No pixel data conversion is taking place: the output will just contain
this profile, so it better matches the image data already.
2023-03-16 10:18:44 -04:00
Nico Weber
e05bb47134 image: Add --strip-color-profile flag
With this flag, no color profile is copied from the source image
to the destination image.
2023-03-16 10:18:44 -04:00
Nico Weber
14581e98ad LibGfx: Remove stray space character in a comment 2023-03-16 09:20:48 -04:00
Nico Weber
b3a0534e02 LibGfx: Add test for serialized bytes of built-in sRGB profile 2023-03-16 09:20:48 -04:00
Timothy Flynn
2cfcbccdb5 LibWeb: Port WebAssembly.Table to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
ca96f8e364 LibWeb: Port WebAssembly.Memory to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
de32c44762 LibWeb: Port WebAssembly.Instance to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
fb1f15774f LibWeb: Port WebAssembly.Module to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
5c97ffb94f LibWeb: Define WebAssembly namespace and import it in web bindings
This will contain concrete definitions of WebAssembly objects used by
generated WebAssembly IDL.
2023-03-16 13:54:16 +01:00
Timothy Flynn
af119d92cb LibIDL+LibWeb: Begin supporting the LegacyNamespace extended attribute
This is used by WebAssembly IDL files. For now, we mostly use this for
error messages and cache keys (to ensure compatibility with existing
code as WebAssembly is ported to IDL).
2023-03-16 13:54:16 +01:00
Timothy Flynn
1ff75618c0 LibIDL: Allow extended attributes on non-required IDL dictionary members
For example, WebAssembly.Memory will have:

    [EnforceRange] unsigned long maximum;
2023-03-16 13:54:16 +01:00
Timothy Flynn
3a11f65451 LibWeb: Add crude support for dereferencing JavaScript built-ins in IDL
This works similarly to the is_platform_object() helper, in that we do
not know that a type like ArrayBuffer needs to be qualified with JS::.
2023-03-16 13:54:16 +01:00
Timothy Flynn
0d921720b4 LibWeb: Support generating optional object IDL parameters
These are used by WebAssembly IDL.
2023-03-16 13:54:16 +01:00
Timothy Flynn
49e6cb7c3d LibWeb: Add LibJS includes to generated IDL constructor files
These will be needed by any constructor having a BufferSource parameter,
such as WebAssembly.Module.
2023-03-16 13:54:16 +01:00
Tim Ledbetter
bdaad815a1 PixelPaint: Rename Layer::resize() to Layer::scale()
This name more accurately describes the transform being performed.
2023-03-16 10:00:26 +01:00
Tim Ledbetter
690f3ae43b PixelPaint: Always specify a new bounding rect when resizing layers
This commit also removes the other Layer::resize() overloads, as they
are no longer used.
2023-03-16 10:00:26 +01:00
Tim Ledbetter
c17b32e058 PixelPaint: Make Resize Image scale each layer to the correct size
The "Resize Image" action will now scale layer such that
the corners of each layer maintain their position relative to the edge
of the canvas.

Previously, each layer was scaled to the same size of the canvas.
2023-03-16 10:00:26 +01:00
Tim Ledbetter
92a0a7e3fa PixelPaint: Don't resize layers when resizing the canvas
Calling Image::resize() with ScalingMode::None now resizes the canvas
without changing the size or position of any layers.
2023-03-16 10:00:26 +01:00
Karol Kosek
6c6af8ae4e ThemeEditor: Store tab title in PropertyTabs as StringView
Removes a hop that creates a deprecated string.

We cannot store the title directly as a String, because we would have to
find a way to propagate the errors during constructing global static
objects.
2023-03-16 09:58:42 +01:00
Karol Kosek
66402b0666 LibGUI+Userland: Port TabWidget set_tab_title to new string 2023-03-16 09:58:42 +01:00
Karol Kosek
4f08a05a3b LibGUI: Store Tab titles using the new string class 2023-03-16 09:58:42 +01:00
Karol Kosek
446c600d09 LibGUI+Applications: Port SettingsWindow::add_tab() to the new string 2023-03-16 09:58:42 +01:00
Karol Kosek
797968c310 LibGUI+Userland: Make TabWidget::*add_tab() take title using new string 2023-03-16 09:58:42 +01:00
Karol Kosek
5fed25ca9a PixelPaint: Port ImageEditor title to new string 2023-03-16 09:58:42 +01:00
Karol Kosek
3805e4e3a9 LibGUI+HackStudio+PixelPaint: Port Widget title to the new String
I had to add a set_title(String) helper function for ImageEditor because
TabWidget requires it. This is a temporary fix and will be handled in
subsequent commit.
2023-03-16 09:58:42 +01:00
Karol Kosek
858e55b653 LibCore: Add new REGISTER_STRING_PROPERTY macro 2023-03-16 09:58:42 +01:00
Karol Kosek
ee5838084d LibCore+Userland: Add DEPRECATED infix to REGISTER_STRING_PROPERTY macro 2023-03-16 09:58:42 +01:00
Julian Offenhäuser
f31a9e9374 Kernel: Refactor AHCIController to propagate more errors
Before, the mapping of our HBA region would be done in the constructor.
Since this can fail, I moved it into initialize().

Additionally, we now use the TypedMapping helper for mapping the HBA
instead of doing it manually. This actually uncovered a bug where we
would ignore any possible offset into the page we were mapping, which
caused us to miss the mapped registers entirely.
2023-03-16 09:55:15 +01:00
Julian Offenhäuser
5541dfd9f8 Kernel: Allow AHCIController::initialize() to fail
If we fail to initialize an AHCI controller, we now skip adding it to
the list of storage controllers in StorageManagement.
2023-03-16 09:55:15 +01:00
Julian Offenhäuser
d1e88a5141 Kernel: Propagate errors in StorageController reset() and shutdown()
These used to signal an error with a boolean return type. We now return
a sensible errno instead.
2023-03-16 09:55:15 +01:00
Mathis Wiehl
9927dab993 LibWeb: Don't drop single <br/> lines
Previously, when having inline contexts consisting of just a `<br/>`
tag, we would not create a line box.

Ensure that there is always a line box when a line is explicitly being
broken and also ensure it won't be trimmed due to being empty.

This will a fix a number of sites that use `<br>` tags for layouts
between block elements (even though the spec says they shouldn't).
2023-03-16 08:40:29 +00:00
Tim Ledbetter
2fe4be40af LibGUI: Store correct address in TreeViewModel's ModelIndices
After `8a48246` m_nodes[row] amd m_child_nodes[row] return a
NonnullRefPtr<Node>, so we were putting the wrong address
into the ModelIndex's data.
2023-03-16 08:05:58 +01:00
Andrew Kaster
49b07cda12 CI: Bump Android NDK version used in CI to 25.2.9519653
The previous version is no longer able to compile Lagom

Clang version 14.0.1 in NDK 24.0.8215888 crashes trying to build
Core::Process
2023-03-15 20:36:22 -06:00
Tim Ledbetter
26662d7ecd SpaceAnalyzer: Make "Open in File Manager" shortcut behave correctly
Previously, the incorrect action would be invoked when using the Open
in File Manager keyboard shortcut, while a directory was selected.
2023-03-16 00:02:08 +01:00
Tim Ledbetter
5ed78d39dd LibGUI: Don't invoke non-visible shortcuts 2023-03-16 00:02:08 +01:00
Tim Ledbetter
8ffe91c2f7 PixelPaint: Make the clone tool brush size consistent with other tools
Other brush tools treat the brush size as a radius, not diameter. The
clone tool now does the same.
2023-03-15 23:56:47 +01:00