Commit graph

48246 commits

Author SHA1 Message Date
Aliaksandr Kalenik
7061322606 LibWeb: Create new tab if a new top level BC is requested
With current process architecture where every top level browsing
context lives in a separate WebContent process we need to request
a browser to spawn new WebContent process if new top level BC is
requested.
2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
8026c63e10 LibWeb: Introduce RemoteBrowsingContext
Remote browsing context represents top level browsing context that
lives in another WebContent process.
2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
40ec976781 LibWeb: Inherit BrowsingContext from AbstractBrowsingContext 2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
c4f94b0846 LibWeb: Introduce AbstractBrowsingContext
Introducing class for abstract browsing context is going to make it
possible to have separate implementations for:
1) Local browsing context (Top level BC of current page and iframes)
2) Remote browsing context (BC of a page that lives in another
WebContent process)
2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
9d79a9b214 Browser: Implement notify_request_open_new_tab 2023-03-16 13:17:37 -04:00
Aliaksandr Kalenik
640864b32e Ladybird: Implement notify_request_open_new_tab 2023-03-16 13:17:37 -04:00
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