summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
AgeCommit message (Collapse)Author
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-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-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!
2023-04-19LibWeb: Properly handle `auto` in StyleProperties::length_percentage()Sam Atkins
This relied on `auto` being a LengthStyleValue, which soon will not be true. :^)
2023-04-19LibWeb: Properly handle `auto` when parsing `background-size`Sam Atkins
This code assumed that `auto` was always stored as a LengthStyleValue, which will not be true in the next commit. (And was not a safe assumption to make anyway.)
2023-04-19LibWeb: Fix broken handling of `flex: <flex-grow>` shorthandAndreas Kling
This is a tiny bit messy because: - The spec says we should expand this to `flex: <flex-grow> 1 0` - All major engines expand it to `flex: <flex-grow> 1 0%` Spec bug: https://github.com/w3c/csswg-drafts/issues/5742
2023-04-19LibWeb: Implement the HTMLMediaElement crossOrigin attributeTimothy Flynn
2023-04-19LibWeb: Stub out the HTMLMediaElement buffered attributeTimothy Flynn
This is needed by https://store.steampowered.com. For now, we return an empty TimeRanges object.
2023-04-19LibWeb: Stub out the HTML TimeRanges IDL interfaceTimothy Flynn
This is used by media elements. Provide a stub for websites which depend on the interface existing.
2023-04-19LibWeb: Layout <svg> nested inside <svg>Andreas Kling
This is far from perfect, but let's at least make an attempt at laying out <svg> when encountering it inside another <svg>. This makes https://awesomekling.substack.com actually load and render instead of asserting. :^)
2023-04-19LibWeb: Make SVG <g> elements generate a SVGGraphicsPaintableAndreas Kling
...instead of defaulting to a PaintableBox. This way it gets the same behavior as other SVG boxes during paint.
2023-04-18LibWeb: Implement HTMLMediaElement's autoplay attributeTimothy Flynn
2023-04-18LibWeb+LibWebView+WebContent: Add APIs to manage an autoplay allowlistTimothy Flynn
The spec defines a Permissions Policy to control some browser behaviors on a per-origin basis. Management of these permissions live in their own spec: https://w3c.github.io/webappsec-permissions-policy/ This implements a somewhat ad-hoc Permissions Policy for autoplaying media elements. We will need to implement the entire policy spec for this to be more general.
2023-04-18LibWeb: Render HTMLVideoElement controls when scripting is disabledTimothy Flynn
The spec recommends exposing the user agent interface when scripting is disabled on the media element.
2023-04-18LibWeb: Organize LibWeb forwarding headerTimothy Flynn
Alphabetically sort everything (namespaces and forward declarations within namespaces), and de-duplicate repeated namespaces (namely the Web namespace appeared twice).
2023-04-18LibWeb: Treat unresolvable percentage flex-basis values as 'content'Andreas Kling
Per CSS-FLEXBOX-1, we should treat percentage values of flex-basis as 'content' if they resolve against an indefinite size of the flex container.
2023-04-17LibWeb: Honor box-sizing in flex item "specified size suggestion"Andreas Kling
Although the spec doesn't mention it, if a flex item has box-sizing: border-box, and the specified size suggestion is a definite size, we have to subtract the borders and padding from the size before using it. This fixes an issue seen in "This Week in Ladybird #4" where the screenshots ended up in one long vertical stack instead of paired up 2 by 2.
2023-04-17LibWeb: Support implicit lineto commands after moveto in SVG pathsAndreas Kling
Per SVG2, any coordinate pairs following a moveto command should be treated as implicit lineto commands with the same absoluteness as the moveto command.
2023-04-17LibWeb: Fix inverted condition in WritableStream's constructorMatthew Olsson
2023-04-17LibWeb: Make StartAlgorithm return a Value instead of a PromiseMatthew Olsson
2023-04-17LibWeb: Remove outdated FIXMEs around WebIDL::invoke_callback usagesMatthew Olsson
2023-04-17LibWeb: Properly reject abrupt completion in clean_up_on_returnMatthew Olsson
2023-04-17LibWeb: Implement SVG `preserveAspectRatio` attributeMacDue
This attribute is used to define how the viewBox should be scaled. Previously the behaviour implemented was that of "xMidYMid meet", now all of them work (expect none :P). With this the Discord login backend is now correctly scaled/positioned. This also brings our SVG code a little closer to the spec! With spec comments and all :^) (Minor non-visible update to layout tests)
2023-04-17LibWeb: Clip SVG content to parent <svg> element bounding boxMacDue
2023-04-17LibWeb: Update the media playback time for clicks on the media timelineTimothy Flynn
When clicking on the media timeline, compute the percentage along the timeline's width the user clicked, and set the playback time to the same percentage of the video's duration.