Age | Commit message (Collapse) | Author |
|
Move all old usages to the more explicit `JsonArray:must_{append/set}`
|
|
Previously, the create_server function would fail with an "Address
already in use" error if a file that used for socket address is
already exists.
|
|
|
|
If WebContent process got disconnected it is only necessary to remove
associated window instead of terminating the entire session.
|
|
While closing a session, it is necessary to close all windows that may
have been opened during that session.
|
|
Previously it was possible to have following sequence of calls
while destroying a session:
1. `WebContentConnection::die()` calls `Client::close_session()`
2. `Client::close_session()` removes a session from active sessions
map which causes session destructor call.
3. Session destructor calls `Client::close_session()` to remove a
session from active sessions.
With `stop()` method inlined into destructor `close_session()` need
to be called just once while destroying a session.
|
|
This change makes window handles on WebDriver process side be
consistent with handles returned by /window/new.
|
|
This will be primarily necessary for BackgroundAction integration, but
it already allows us to add proper error handling in LibIMAP :^)
|
|
To make EventLoop cancel its managed Promises, we need the ability to
cancel them in the first place.
|
|
These steps now have more than one caller; specifically, they may be
called from the Delete Session and Close Window endpoints. The session
was only removed from the active session map for the former endpoint.
Instead, let's more accurately handle removing the session where the
spec tells us to, so that all callers properly perform this step.
|
|
WebDriver::Session::close_window may invoke Session::stop, which needs
the WebContent connection to still exist. Do not remove the window's
handle (thus destroying the connection) until it is no longer needed.
|
|
|
|
WebDriver socket should not be closed as soon as first client
got connected becaused there might more than one WebContent
process spawned by browser.
|
|
With current architecture every window has its own WebContent process
and there is one WebDriver process that is responsible for talking to
all opened windows. It thus make sense to manage open windows from
WebDriver process instead of WebContent process that is not supposed
to know about all other opened WebContent processes.
This mostly reverts 826d5f8f9ab0e28606a0d07847056bd6562ebc49 but also
adds `web_content_connection` to window structure and window id
generation (currently out of spec).
With these changes `get_window_handles`, `switch_to_window` and
`close_window` start to actually switch, close and returned handles
of currently opened windows.
|
|
|
|
Otherwise it is left on disk forever.
|
|
This moves the actual launching of browser windows to the WebDriver main
file. This will allow Ladybird to specify its own callback and re-use
Serenity's Session class.
|
|
This will allow Ladybird to use local socket files rather than passing
around a bunch of socket FDs.
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
This adds an "extension capability" for clients to indicate that a
headless browser should be used for the session.
|
|
These lambdas were marked mutable as they captured a Ptr wrapper
class by value, which then only returned const-qualified references
to the value they point from the previous const pointer operators.
Nothing is actually mutating in the lambdas state here, and now
that the Ptr operators don't add extra const qualifiers these
can be removed.
|
|
This moves Get Window Handle, Close Window, and Get Window Handles over
to WebContent so they may be implemented closer to the spec and be used
by Ladybird.
|
|
We are expected to return the list of open handles after closing the
current handle. Also just return a WebDriver::Response instead of a
wrapped Error variant.
|
|
|
|
|
|
WebDriver now only has an IPC connection to WebContent. WebDriver still
launches the browser, but now when the session ends, we simply send a
SIGTERM signal to the browser.
|
|
These are currently being included transitively, and will cause an error
when those intermediate includes are removed.
|
|
|
|
|
|
|
|
|
|
The new implementation is made a bit simpler by way of TRY. It also
implements setting the SameSite attribute.
|
|
Instead of sending *all* cookies over IPC and filtering by name, we now
filter by name from the cookie jar and send just the first matching
cookie.
|
|
There are a couple changes here from the existing Get All Cookies
implementation.
1. Previously, WebDriver actually returned *all* cookies in the cookie
jar. The spec dictates that we only return cookies that match the
document's URL. Specifically, it calls out that we must run just the
first step of RFC 6265 section 5.4 to perform domain matching.
This change adds a special mode to our implementation of that section
to skip the remaining steps.
2. We now fill in the SameSite cookie attribute when serializing the
cookie to JSON (this was a trival FIXME that didn't get picked up
when SameSite was implemented).
|
|
With this, WebDriverEndpoints is unused and removed :^)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In doing so, this also implements a FIXME to handle boolean attributes.
|
|
|
|
This also lets us remove the element location strategy and some
WebContent IPC from Browser/LibWebView now that they are unused.
|
|
|
|
|