summaryrefslogtreecommitdiff
path: root/Userland/Services
AgeCommit message (Collapse)Author
2022-11-09Browser+LibWebView+WebContent: Add IPC to minimize and maximize windowTimothy Flynn
Requests to maximize and minimize Browser windows will be coming from the WebContent process rather than the WebDriver process. Add hooks to propagate these requests back up to the Browser.
2022-11-09Browser+WebContent+WebDriver: Move Get/Set Window Rect to WebContentTimothy Flynn
This also lets us more fully implement the "restore the window" method, which requires we block until the document reaches the "visible" state.
2022-11-09Browser+LibWebView+WebContent: Add IPC to re[store,size,position] windowTimothy Flynn
Requests to restore, resize, and reposition Browser windows will be coming from the WebContent process rather than the WebDriver process. Add hooks to propagate these requests back up to the Browser. The spec notes "The specification does not guarantee that the resulting window size will exactly match that which was requested", so these new methods return the actual new size/position.
2022-11-09Everywhere: Fix a few comment typosNico Weber
2022-11-09WebContent: Remove the DRIVER_TRY macro now that it is no longer neededTimothy Flynn
We can now invoke TRY directly, and don't need to wrap single-value return statements with braces.
2022-11-08WebContent+WebDriver: Fully implement closing a sessionTimothy Flynn
There were a couple steps missing to close the remote end. Further, we were not removing the session from the list of active sessions.
2022-11-08WebContent+WebDriver: Move the Get Current URL command to WebContentTimothy Flynn
2022-11-08WebContent+WebDriver: Move the Navigate To command to WebContentTimothy Flynn
2022-11-08WebContent+WebDriver: Set the navigator.webdriver flag from WebDriverTimothy Flynn
This moves setting the navigator.webdriver flag from after WebContent creates the WebDriver connection, to its own IPC to be triggered from WebDriver. This is closer to the spec, but mostly serves as an easy test to validate the connection.
2022-11-08Browser+LibWebView+WebDriver: Connect WebDriver to WebContentTimothy Flynn
First, this moves the WebDriver socket to the /tmp/websocket/ directory, as WebDriver now creates multiple sockets per session. Those sockets are now created with Core::LocalServer rather than manually setting up the listening sockets (this was an existing FIXME which resolved some issues I was hitting with creating a second listening socket). WebDriver passes both socket paths to Browser via command line. Browser continues to connect itself via one socket path, then forwards the other socket path to the WebContent process created by the OOPWV. WebContent then connects to WebDriver over this path. WebContent will temporarily set the navigator.webdriver flag to true after connecting to WebDriver. This will soon be moved to its own IPC to be sent by WebDriver.
2022-11-08WebContent: Add a very-empty WebDriver IPC class to WebContentTimothy Flynn
This just sets up the infrastructure for the WebContent process to house WebDriver IPCs, and adds an IPC for WebContent to create the WebDriver connection. The WebDriverConnection class inside WebContent ultimately will contain most of what is currently in WebDriver::Session (so the copyright attributions are copied here as well). The socket created by WebDriver is currently /tmp/browser_webdriver (formatted with some IDs). This will be moved to the /tmp/webdriver folder, as WebDriver will create multiple sockets to communicate with both Browser and WebContent as the IPCs are iteratively moved to WebContent. That path is unveiled here, though it is unused as of this commit.
2022-11-08LibWeb+WebDriver: Add an IPC-transferable Web::WebDriver::Response classTimothy Flynn
This is essentially an ErrorOr<JsonValue, Web::WebDriver::Error> class. Unfortunately, that ErrorOr would not be default-constructible, which is required for the generated IPC classes. So this is a thin wrapper around a Variant<JsonValue, Web::WebDriver::Error> to emulate ErrorOr.
2022-11-08LibWeb+WebDriver: Move WebDriverError to Web::WebDriver::ErrorTimothy Flynn
This is to prepare for WebContent becoming the WebDriver client.
2022-11-08WindowServer: Cycle through menu items with the same Alt shortcutSergiy Stupar
If there are multiple items with the same Alt shortcut, cycle through them with each keypress instead of activating immediately.
2022-11-07AudioServer: Skip mixing when volume is zeroAlex Chronopoulos
When volume is zero it is not necessary to go through the mixing loop. The zero-filled buffer can be written directly to the device, instead, similar to the muted case. Tested by using the piano app and the main volume control.
2022-11-05WebContent: Capture horizontal overflow in full document screenshotsTimothy Flynn
The full-page screenshot was missing horizontal overflow content on most web pages. Change the dimensions of the captured screenshot to match the actual content size.
2022-11-05WebContent: Store and provide access to web page content sizeTimothy Flynn
2022-11-05LibWebView+WebContent: Add an IPC to take a full document screenshotTimothy Flynn
2022-11-05WebDriver+Browser: Implement `GET /session/{id}/element/{id}/screenshot`Timothy Flynn
2022-11-05LibWebView+WebContent: Add an IPC to take an element screenshotTimothy Flynn
2022-11-05LibWebView+WebContent: Add an IPC to scroll an element into viewTimothy Flynn
Note that even though there is no response, this IPC has to be synchronous to allow all scroll events to trigger before returning to the calling WebDriver process.
2022-11-05WebContent: Abstract calculating an element's absolute rect to a helperTimothy Flynn
2022-11-03WebDriver+Browser: Implement `GET /session/{id}/element/{id}/selected`Timothy Flynn
2022-11-03LibWebView+WebConent: Add an IPC to get an element's selected stateTimothy Flynn
2022-11-03WebDriver: Pass StringView by valueTimothy Flynn
See: 8b1108e4858f797c9216dc8ae4a3918ad50c73b4.
2022-11-03WebDriver: Consolidate getting a known connected element to a helperTimothy Flynn
Instead of verbosely repeating the NOTE and to_int() checks, move this step to a helper. When we have real connected elements, we can then just fix this helper.
2022-11-03WebDriver+Browser: Implement `GET /session/{id}/element/{id}/enabled`Timothy Flynn
2022-11-03LibWebView+WebConent: Add an IPC to get an element's enabled stateTimothy Flynn
2022-11-03WebDriver+Browser: Implement `GET /session/{id}/element/{id}/rect`Timothy Flynn
2022-11-03WebDriver: Rename serialize_window_rect to serialize_rectTimothy Flynn
This won't only be used for "Window" rects.
2022-11-03LibWebView+WebConent: Add an IPC to get an element's absolute rectTimothy Flynn
2022-11-03WebContent: Add a static helper to find an element by its remote IDTimothy Flynn
Instead of repeating the same checks for each WebDriver /element endpoint, add a helper to perform the lookup.
2022-11-03WebDriver+Browser: Implement `GET /session/{id}/source`Timothy Flynn
2022-11-03LibWebView+WebContent: Add IPC to run the fragment serialization stepsTimothy Flynn
2022-11-02WebDriver: Implement `POST /session/{session id}/execute/async` endpointLinus Groh
2022-11-02WebDriver: Implement `POST /session/{session id}/execute/sync` endpointLinus Groh
2022-11-02WebDriver: Support "data" field in error responsesLinus Groh
2022-11-02LibWeb+WebContent: Add WebDriver infrastructure for executing scriptsLinus Groh
This cannot be done on the Browser or WebDriver ends, or via the existing run_javascript() IPC endpoint, as we cannot transfer JS objects through the IPC boundary (yet), only serialized JSON, so the individual WebDriver steps around script execution need to run in the WebContent process.
2022-11-02WebDriver+Browser: Implement `GET /session/{id}/screenshot`Timothy Flynn
This doesn't follow the spec to a tee. Our OutOfProcessWebView already has a bitmap that can be used as the window screenshot. Therefore, we can bypass the steps that assume we need to access the window's frame buffer in-flight. We also don't create an HTMLCanvasElement. We would need a Document in the WebDriver process to do so. Instead, we can still run the encoding steps exactly as-is using the screenshot bitmap.
2022-11-02WebContent: Support sending large responses to the WebDriver clientTimothy Flynn
Some endpoints, like /session/{id}/screenshot, will require sending large data to the client. We won't be able to write all of the data in one shot, so loop over the data until we've sent it all (or fail).
2022-11-02WebDriver+Browser: Implement `POST /session/{id}/window/minimize`Timothy Flynn
2022-11-02LibGUI+WindowServer: Allow programatically minimizing windowsTimothy Flynn
The backend methods in WindowServer already exist. This just adds the IPC plumbing to connect those methods to GUI::Window.
2022-11-02WebDriver+Browser: Implement `POST /session/{id}/window/maximize`Timothy Flynn
2022-11-02WebDriver+Browser: Implement `POST /session/{id}/window/rect`Timothy Flynn
2022-11-02WebDriver+Browser: Implement `GET /session/{id}/window/rect`Timothy Flynn
2022-11-02WebDriver: Convert a couple tabs to spacesTimothy Flynn
2022-11-01LibWeb+LibWebView+WebContent: Add IPC to receive window position/sizeTimothy Flynn
This information will have to come from the Browser application. This adds IPCs to receive that information when it is available or changes.
2022-11-01LibGUI+WindowServer: Create and broadcast an event when a window movesTimothy Flynn
LibWeb's Window object will need to know the OS-level position and size of the GUI::Window for e.g. screenX, screenY, outerWidth, outerHeight. It will also need to know about changes to that data.
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-11-01Everywhere: Explicitly link all binaries against the LibC targetTim Schumacher
Even though the toolchain implicitly links against -lc, it does not know where it should get LibC from except for the sysroot. In the case of Clang this causes it to pick up the LibC stub instead, which might be slightly outdated and feature missing symbols. This is currently not an issue that manifests because we pass through the dependency on LibC and other libraries by accident, which causes CMake to link against the LibC target (instead of just the library), and thus points the linker at the build output directory. Since we are looking to fix that in the upcoming commits, let's make sure that everything will still be able to find the proper LibC first.