summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-10LibVideo: Handle corrupted video errors without spamming dialogsZaggy1024
No longer will the video player explode with error dialogs that then lock the user out of closing them. To avoid issues where the playback state becomes invalid when an error occurs, I've made all decoder errors pass through the frame queue. This way, when a video is corrupted, there should be no chance that the playback state becomes invalid due to setting the state to Corrupted in the event handler while a presentation event is still pending. Or at least I think that was what caused some issues I was seeing :^) This system should be a lot more robust if any future errors need to be handled.
2022-11-09LibWeb: Fix typo in BodyInitOrReadableBytes type aliasLinus Groh
2022-11-09LibRegex: Don't treat ForkReplace* as new forksAli Mohammad Pur
2022-11-09LibGUI: Shift+Tab unindents lineJulian Eigmüller
Previously, pressing Shift+Tab would indent the line if no selection was given. While with a selection, it would be unindented. With this change, pressing Shift+Tab with no selection unindents the current line. For this, add unindent_line() helper function. This function unindents the current line by at most one tab width if it starts with whitespace, regardless of cursor position.
2022-11-09Browser+WebContent+WebDriver: Move [Max,Min]imize Window to WebContentTimothy Flynn
This also lets us more fully implement the "iconify the window" method, which requires we block until the document reaches the "hidden" state.
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-09Browser: Remove unused WebDriver IPC endpointsTimothy Flynn
I had originally thought to just leave these and remove them all at once at the end of the WebContent migration. But it is kind of confusing to have them around, so this removes the endpoints that have already been ported.
2022-11-09PixelPaint: Make filters apply to a selection if one is presentTimothy Slater
This changes ImageProcessor to use the scratch bitmap of the layer which will cause the changes to only be applied inside the active selection (if there is one). This also updates the FilterPreviewWidget to show the filter preview with active selection taken into account.
2022-11-09Everywhere: Fix a few comment typosNico Weber
2022-11-09LibWeb: Finish half-written comment in abspos height calculationAndreas Kling
Apparently I forgot to write the whole comment in the previous commit, 8a87f4fa207da2ec40665e6125bffd2a6f7425e2.
2022-11-09LibJS: Move throw_completion(Value) out of lineAndreas Kling
This allows us to instrument this function locally without rebuilding 1000+ files.
2022-11-09LibWeb: Try to compute height for abspos elements before inside layoutAndreas Kling
This can resolve height early in some cases, notably this kind of setup: position: absolute; top: 0px; bottom: 0px; By resolving height before inside layout, descendants of the abspos element can resolve automatic and relative vertical lengths against it. This makes the Discord UI occupy the whole window instead of looking "shrink-to-fit".
2022-11-09LibWeb: Actually assign solved value for `left` in abspos width case 1Andreas Kling
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-09Meta: Generate a helper constructor for single-value IPC responsesTimothy Flynn
When an IPC message returns a single value, we generate a class with a constructor that is something like: class MessageResponse { MessageResponse(SingleReturnType value) : m_value(move(value)) { } }; If that IPC message wants to return a value that SingleReturnType is constructible from, you have to wrap that return call with braces: return { value_that_could_construct_single_return_type }; That isn't really an issue except for when we want to mix TRY semantics with the return type. If SingleReturnType is constructible from an Error type (i.e. something similar to ErrorOr), the following doesn't work: TRY(fallible_function()); Because MessageResponse would not be constructible from Error. Instead, we must do some workaround with a custom TRY macro, as in 31bb792. This patch generates a constructor that makes TRY usable as-is without any custom macros. We perform a very similar trick in ThrowCompletionOr inside LibJS. This constructor will allow you to create MessageResponse from any type that SingleReturnType is constructible from.
2022-11-09Meta: Compile new WebContent IPC endpoints for WebDriver in LagomTimothy Flynn
2022-11-09LibWebSocket: Buffer incoming frame data until whole frame is availableAndreas Kling
Frames with large payloads may arrive in multiple chunks, so it's not safe to assume that the whole frame is available for reading just because we got a first "ready to read" notification. This patch solves this in a very naive way by simply buffering incoming frame data and trying to reparse a frame every time new data arrives. This is definitely inefficient, but it works as a start. With this, it's now possible to log in to Discord in Ladybird! :^)
2022-11-09LibWebSocket: Move web socket to Closing state in WebSocket::close()Andreas Kling
2022-11-09LibWebSocket: Allow library clients to provide their own WebSocketImplAndreas Kling
2022-11-09LibWebSocket: Remove unused WebSocketImpl::can_read()Andreas Kling
2022-11-09LibWebSocket: Make WebSocketImpl an abstract classAndreas Kling
The LibCore sockets implementation becomes WebSocketImplSerenity. This will allow us to create a custom WebSocketImpl subclass for Qt to use in Ladybird.
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-08LibWeb: Add a flag to track when a browsing context has been discardedTimothy 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-08LibCore: Add support for LocalServer to propogate accept() errorsTimothy Flynn
We still log the error (perhaps in the future, we will only want to log the error if there is no handler). But this allows callers to actually handle errors to e.g. unblock waiters.
2022-11-08AK+LibIPC: Add a convenience encoder/decoder for JsonValueTimothy Flynn
This requires that JsonValue is implicitly default-constructible.
2022-11-08LibJS: Add thorough tests for try/finally using continue and breakLuke Wilde
I wrote these tests a while ago while trying to improve the bytecode, but didn't end up making them pass and gave up. They work in AST interpreter mode, so we can have them in now to have them around for anyone who wants to try and make them pass in bytecode.
2022-11-08LibWeb: Apply the current transform in CRC2D.stroke()Luke Wilde
This makes the Google Docs spelling and grammar squiggles appear in the correct position.
2022-11-08Everywhere: Clean up "in in" comment typosNico Weber
Includes fetch editorial update https://github.com/whatwg/fetch/commit/3cafbdfc39250!
2022-11-08LibC: Implement getpwent_rGunnar Beutner
Refs #15965.
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-08LibWeb: Pick the correct DOM node for mouse-move eventsGunnar Beutner
This makes hovering over the link in the following HTML snippet work, i.e. the tooltip is shown and the link target is shown at the bottom of the browser window: <html lang="en"><head><style> .site-link{display:inline-block} .site-link:before{content:"derp"} .site-link::after{content:"";display:block} </style></head><body><a class="site-link" href="#" title="Tooltip, maybe!"></a>
2022-11-08Kernel: Split the Ext2FileSystem.{cpp,h} files into smaller componentsLiav A
2022-11-08Kernel: Split the ISO9660FileSystem.{cpp,h} files to smaller componentsLiav A
2022-11-08Kernel: Split the DevPtsFS files into smaller componentsLiav A
2022-11-08Kernel: Split the Plan9FileSystem.{cpp,h} file into smaller componentsLiav A
2022-11-08Kernel: Split the ProcFS core file into smaller componentsLiav A
2022-11-08Kernel: Split the FATFileSystem.{cpp,h} files into smaller componentsLiav A
2022-11-08Kernel: Split the TmpFS core files into smaller componentsLiav A
2022-11-08Kernel: Split the SysFS core files into smaller componentsLiav A
2022-11-07LibGUI: Fix a typoMike Akers
2022-11-07PixelPaint: Improve brushtool gradient for low hardnessTorstennator
This patch mitigates a rough gradient for the brush tool with a low hardness. Previously the gradient alpha value was truncated by the type conversion to int. Now the desired alpha value is scaled up to mitigate the information loss due to type conversion which results in a much smoother gradient.