summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2023-04-21LibWeb+Browser+Ladybird: Use JS::SafeFunction for EventLoop callbacksSam Atkins
This automatically protects captured objects from being GC'd before the callback runs.
2023-04-21LibWeb: Add FIXME: for new step 6 of Fetch's "main fetch"Sam Atkins
This step was added in this commit: https://github.com/whatwg/fetch/commit/2d78995db8dbbe1c9ab4a9c6765d7d6603216bff
2023-04-21LibGfx: Move two globals into the only functions that use themNico Weber
No real behavior change. (The two globals are now both initialized at first use instead of before main(), but that should have no observable effect. The motivation is readability.)
2023-04-21Kernel+Userland: Remove the `nfds` entry from `/sys/kernel/processes`Tim Schumacher
`process.fds()` is protected by a Mutex, which causes issues when we try to acquire it while holding a Spinlock. Since nothing seems to use this value, let's just remove it entirely for now.
2023-04-21Spider: Fix crash when completing a deckJamie Mansfield
This resolves a regression caused by 8a48246ed1a93983668a25f5b9b0af0e745e3f04.
2023-04-21LibWeb: Make WebSocket#send support typed arrays, Blob and DataViewLuke Wilde
Required by jigsawpuzzles.io, which particularly uses typed arrays.
2023-04-21LibWeb: Add XMLDocument stubLuke Wilde
Required by old versions of Pixi.js's XMLFormat bitmap font loader. https://github.com/pixijs/pixijs/blob/db824181dc3dfffa0951fb8579282ba8e654cb3b/packages/text-bitmap/src/formats/XMLFormat.ts#L16
2023-04-21Browser: Add support for CookieJar to run in a transient, in-memory modeTimothy Flynn
This is to allow running Ladybird without the SQL database for testing. Primarily, this will let us set 'follow-fork-mode' to 'child' within GDB to enter the WebContent process, rather than the SQLServer process. But this is also handy for digging into cookie storage issues.
2023-04-21LibWeb: Implement HTMLVideoElement representation closer to the specTimothy Flynn
The representation is used to indicate whether the layout node should paint a video frame, the video's poster, or a "transparent black" box.
2023-04-21LibWeb: Implement the HTMLVideoElement poster attributeTimothy Flynn
This will fetch the URL indicated by the poster attribute when it's set, changed, or removed. The spec doesn't say how to handle animated poster images, so we just grab the first frame of the image, which seems to match other implementations.
2023-04-21LibWeb: Implement the HTMLMediaElement show-poster flagTimothy Flynn
Note that this doesn't do much yet, as the HTMLVideoElement does not handle its poster attribute as of this commit.
2023-04-21LibWeb: Implement the HTMLMediaElement "potentially playing" conceptTimothy Flynn
2023-04-21LibWeb: Make HTMLMediaElement's attribute change handlers protectedTimothy Flynn
These will be need to be overridden by HTMLVideoElement. We also need to be sure to invoke HTMLMediaElement's base class's did_remove_attribute.
2023-04-21LibWeb: Add a getter for HTMLMediaElement's current playback positionTimothy Flynn
This will be needed by the layout node, which may change what is painted when the position of the frame image is not the same as the element's current time.
2023-04-21LibWeb: Track decoded video frame positions along with the frame imageTimothy Flynn
This will be needed by the layout node, which may change what is painted when the position of the frame image is not the same as the element's current time.
2023-04-20LibWeb: Use device pixels to translate NestedBrowsingContextPaintableAliaksandr Kalenik
Fix translation of iframes when pixel size is not 1.0.
2023-04-20LibWeb/Painting: Move-assign value in set_containing_line_box_fragmentLinus Groh
An Optional<Layout::LineBoxFragmentCoordinate> is 24 bytes, which isn't small enough to pass by value and then copy.
2023-04-20LibWeb/Painting: Remove redundant 'Painting::' namespace prefixesLinus Groh
2023-04-20LibWeb: Rename remaining paint_box variables to paintable_boxLinus Groh
These don't match the type name, which is confusing.
2023-04-20LibWeb/Layout: Rename BlockContainer::paint{_box => able_with_lines}()Linus Groh
It returns a PaintableBox (a PaintableWithLines, to be specific), not a 'PaintBox'. paintable_box() without the cast is already available through BlockContainer's Box base class, we don't need to shadow it.
2023-04-20LibWeb/DOM: Rename Node::{paint => paintable}_box()Linus Groh
It returns a PaintableBox, not a 'PaintBox'.
2023-04-20LibWeb/Layout: Rename Box::{paint => paintable}_box()Linus Groh
It returns a PaintableBox, not a 'PaintBox'.
2023-04-20LibWeb/Painting: Rename StackingContext::paintable{ => _box}()Linus Groh
It returns a PaintableBox, not any Paintable.
2023-04-20LibWeb/WebDriver: Handle WindowProxy in internal_json_clone_algorithm()Linus Groh
To test: ```console curl http://0.0.0.0:8000/session \ -H 'Content-Type: application/json' \ -d '{"capabilities": {}}' curl http://0.0.0.0:8000/session/0/execute/sync \ -H 'Content-Type: application/json' \ -d '{"script": "return window;", "args": []}' ``` Which should result in: ```json { "value": { "window-fcc6-11e5-b4f8-330a88ab9d7f": "86307df6-e2f1-4175-85cb-77295ff90898" } } ```
2023-04-20TextEditor: Propagate errors from `MainWidget::initialize_menubar()`Karol Kosek
2023-04-20SQLStudio: Propagate errors from `MainWidget::initialize_menubar()`Karol Kosek
2023-04-20PDFViewer: Propagate errors from `PDFViewerWidget::initialize_menubar()`Karol Kosek
2023-04-20HexEditor: Propagate errors from `HexEditorWidget::initialize_menubar()`Karol Kosek
2023-04-20CharacterMap: Propagate errors from `initialize_menubar()`Karol Kosek
2023-04-20LibWeb/HTML: Store NonnullGCPtr in browsing context group setLinus Groh
These are never supposed to be null.
2023-04-20LibWeb/HTML: Store NonnullGCPtr in browsing context setLinus Groh
These are never supposed to be null.
2023-04-20Chess: Gracefully handle ChessEngine disconnectionsTim Ledbetter
The GUI now tracks when it becomes disconnected from ChessEngine. If not currently waiting for a move from ChessEngine, it will automatically reconnect on the next engine move. If a disconnection occurs while waiting for a move, the player is asked whether they want to try again or not.
2023-04-20ChessEngine: Gracefully handle GUI disconnectionsTim Ledbetter
2023-04-20LibChess: Allow UCIEndpoint to handle unexpected disconnectionsTim Ledbetter
2023-04-20Chess: Send a quit command to ChessEngine when it is no longer in useTim Ledbetter
The chess GUI now instructs the ChessEngine to gracefully exit by sending a UCI quit command.
2023-04-20ChessEngine: Handle the UCI quit commandTim Ledbetter
2023-04-20LibChess: Add the UCI quit commandTim Ledbetter
2023-04-20LibWeb: Properly stop, rather than terminate, ongoing media fetchesTimothy Flynn
We are currently using the fetch controller's terminate() method to stop ongoing fetches when the HTMLMediaElement load algorithm is invoked. This method ultimately causes the fetch response to be a network error, which we propagate through the HTMLMediaElement's error event. This can cause websites, such as Steam, to avoid attempting to play any video. The spec does not actually specify what it means to "stop" or "cancel" a fetching process. But we should not use terminate() as that is a defined spec method, and the spec does tend to indicate when that method should be used (e.g. as it does in XMLHttpRequest).
2023-04-20LibWeb: Invent a method to stop an in-progress fetch without errorsTimothy Flynn
The HTMLMediaElement will need to stop fetching processes when its load algorithm is invoked while a fetch is ongoing. We don't have a way to really stop the process, due to the way it runs on nested deferred task invocations. So for now, this swaps the fetch callbacks (e.g. to process a fetch response) with empty callbacks.
2023-04-20LibWeb: Do not handle media ready state changes for empty network statesTimothy Flynn
This was missed in the header text of the ready state transition spec.
2023-04-20LibWeb: Implement the HTMLMediaElement delaying-the-load-event flagTimothy Flynn
2023-04-20LibWeb: Implement the HTMLMediaElement currentSrc attributeTimothy Flynn
2023-04-19LibWeb: Add HTML::TraversableNavigableAndreas Kling
This is the "traversable navigable" concept from the HTML spec. Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2023-04-19LibWeb: Add HTML::NavigableAndreas Kling
This is the first step towards implementing the new "navigable" concept from the HTML spec. Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2023-04-19LibWeb: Rename BrowsingContextContainer => NavigableContainerAndreas Kling
The "browsing context container" concept in the HTML spec has been replaced with "navigable container". Renaming this is the first step of many towards implementing the new world. Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2023-04-19LibWeb: Simplify StyleValue API now that `auto` isn't a lengthSam Atkins
Now that LengthStyleValue never contains `auto`, IdentifierStyleValue is the only type that can hold an identifier. This lets us remove a couple of virtual methods from StyleValue. I've kept `has_auto()` and `to_identifier()` for convenience, but they are now simple non-virtual methods.
2023-04-19LibWeb: Verify we don't accidentally create an `auto` LengthStyleValueSam Atkins
2023-04-19LibWeb: Stop creating `auto` LengthStyleValue for resolved styleSam Atkins
2023-04-19LibWeb: Stop parsing `auto` as a LengthSam Atkins
Previously, whether trying to parse a `<length>` or `<dimension>`, we would accept `auto` and produce a `LengthStyleValue` from it. This would fool the `property_accepts_value()` into allowing `auto` where it does not belong, if the property did accept lengths. Of the few places in the parser that called `parse_dimension_value()` or `parse_length()`, none of them were expecting it to accept `auto`, so this fixes those too. :^)
2023-04-19LibWeb: Check flex longhands first when parsing flex shorthandSam Atkins
Currently, `property_accepts_value()` always returns `true` if the property is a shorthand. (This is a bug, and should actually be fixed properly at some point...) This means that all identifiers are caught here, including `auto`, which should be handled by the `flex-basis` branch instead. This works currently because `auto` is a LengthStyleValue, but that's about to change!