Commit graph

25 commits

Author SHA1 Message Date
Andrew Kaster
02afbf3285 WebDriver: Access global sessions mutably when finding sessions
We grab RefPtr to non-const for the sessions within, so we can't call
const get() on the global maps. That would return a const reference.
2025-04-16 10:41:44 -06:00
Aliaksandr Kalenik
db8c443392 Everywhere: Make TransportSocket non-movable
Instead of wrapping all non-movable members of TransportSocket in OwnPtr
to keep it movable, make TransportSocket itself non-movable and wrap it
in OwnPtr.
2025-04-09 15:27:52 +02:00
Timothy Flynn
3af3799bbc WebDriver: Temporarily disable site isolation
We will need to update WebDriver to handle the switch of WebContent
processes.
2025-03-12 02:00:54 +00:00
Timothy Flynn
cf69f52d53 LibIPC+Everywhere: Always pass ownership of transferred data to clients
This has been a longstanding ergonomic issue with our IPC compiler. Non-
trivial types were previously passed by const&. So if we wanted to avoid
expensive copies, we would have to const_cast and move the data.

We now pass ownership of all transferred data to the client subclasses.
This allows us to remove const_cast from these methods, and allows us to
avoid some trivial expensive copies that we didn't bother to const_cast.
2025-03-09 11:14:20 -04:00
Timothy Flynn
9879ac0893 LibWeb+WebContent+WebDriver: Port WebDriver to String 2025-02-20 19:27:51 -05:00
Timothy Flynn
bc54c0cdfb AK+Everywhere: Store JSON strings as String 2025-02-20 19:27:51 -05:00
Timothy Flynn
e591636419 AK+Everywhere: Store JSON object keys as String 2025-02-20 19:27:51 -05:00
Timothy Flynn
e53df7e6c9 WebDriver: Correctly report the client's readiness state 2025-02-17 11:14:40 -05:00
devgianlu
62cd358fab Meta: Link with OpenSSL explicitly
Explicitly link final targets with OpenSSL to ensure that the vcpkg
version is loaded instead of the system one.

Before this change we would inherit `libcrypto.so` and `libssl.so` from
other dependencies, like Qt, that do not have their RPATH rewritten.
This would cause the loader to prefer the system libraries over the
vcpkg ones causing all sorts of version mismatch issues.

The effectiveness of this change can be verified with
`readelf -d ./bin/Ladybird` showing `libcrypto.so` and `libssl.so` as
direct dependencies, before they would not appear. Additionally, `ldd`
will show `libcrypto.so` and `libssl.so` pointing to the vcpkg builds.
2025-02-17 12:36:26 +01:00
Timothy Flynn
d873dc0744 LibWeb+WebDriver: Validate WebDriver proxy capabilities
We don't yet support a proxy configuration, but we can still validate
the capability received from the WebDriver client. We should also fail
to create a WebDriver session if a proxy configuration is present.
2025-02-10 11:33:53 -05:00
Timothy Flynn
3128d87766 WebDriver: Properly distinguish HTTP sessions from other sessions
The WebDriver spec now separately tracks an active HTTP session list,
which will contains all non-BiDi WebDriver sessions by default. There
may only be one active HTTP session at a time.

See: https://github.com/w3c/webdriver/commit/63a397f
2025-02-10 11:33:53 -05:00
Timothy Flynn
de34351ba8 LibWeb+WebDriver: Convert WebDriver session flags to an enumeration
Rather than a list of strings, this will be easier to deal with as a
bitwise enumeration.
2025-02-10 11:33:53 -05:00
Timothy Flynn
d95be7d88c WebDriver: Move session management to the Session class
Session management is a bit awkward right now in that the list of active
sessions is managed by Client, resulting in operations like closing a
session being split between several functions in Client and Session.

This patch moves all session management to the Session class. Closing a
session is now entirely in Session::close().

This will make managing a separate HTTP session list a bit simpler.
2025-02-10 11:33:53 -05:00
Timothy Flynn
ee649fc13b LibWeb+WebContent+WebDriver: Bring session start and close up to spec
Lots of editorial spec bugs here, but these changes largely affect how
the unhandledPromptBehavior capability is handled. We also now set an
additional capability for the default User Agent string.
2025-02-06 09:01:16 -05:00
Timothy Flynn
2583996e18 LibWeb+WebContent+WebDriver: Allow specifying multiple prompt handlers
WebDriver script authors may now provide either:
* A user prompt handler configuration to be used for all prompt types.
* A set of per-prompt-type user prompt handlers.

This also paves the way for interaction with the beforeunload prompt,
though we do not yet support that feature in LibWeb.

See: https://github.com/w3c/webdriver/commit/43903d0
2025-02-06 09:01:16 -05:00
Timothy Flynn
7edbd19675 WebContent: Ensure the Release Actions endpoint handles user prompts
This also contains an editorial refactor to the Perform Actions endpoint
to check for user prompts earlier.

See: https://github.com/w3c/webdriver/commit/78d3c9b
2025-02-05 11:33:33 +00:00
Tim Ledbetter
731c2365b6 WebDriver: Disable scrollbar painting when launching the browser 2025-01-15 12:33:53 +00:00
Feng Yu
57f776fcb7 WebDriver: Actually create a UUID for session_id 2025-01-03 13:15:52 -08:00
Tim Ledbetter
34f78ca152 Meta: Add a --debug-process option to WPT.sh
This passes the `--debug-process` option to WebDriver.
2024-12-20 23:42:02 +01:00
Tim Ledbetter
2528055703 WebDriver: Add a --debug-process option
This forwards the `--debug-process` argument to the browser process
launched by WebDriver.
2024-12-20 23:42:02 +01:00
stasoid
4a731b3858 LibCore/Process: Make all spawn overloads return ErrorOr<Process> 2024-11-19 14:40:03 -07:00
Timothy Flynn
0ff91a5273 LibWebView+Services+UI: Move process helpers to LibWebView 2024-11-11 07:35:43 -05:00
Timothy Flynn
db47cc41f8 Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Timothy Flynn
22e0eeada2 Everywhere: Hoist the Services folder to the top-level 2024-11-10 12:50:45 +01:00