Age | Commit message (Collapse) | Author |
|
|
|
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. :^)
|
|
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!
|
|
This relied on `auto` being a LengthStyleValue, which soon will not be
true. :^)
|
|
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.)
|
|
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
|
|
|
|
This is needed by https://store.steampowered.com. For now, we return an
empty TimeRanges object.
|
|
This is used by media elements. Provide a stub for websites which depend
on the interface existing.
|
|
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. :^)
|
|
...instead of defaulting to a PaintableBox. This way it gets the same
behavior as other SVG boxes during paint.
|
|
|
|
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.
|
|
The spec recommends exposing the user agent interface when scripting is
disabled on the media element.
|
|
Alphabetically sort everything (namespaces and forward declarations
within namespaces), and de-duplicate repeated namespaces (namely the
Web namespace appeared twice).
|
|
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.
|
|
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.
|
|
Per SVG2, any coordinate pairs following a moveto command should be
treated as implicit lineto commands with the same absoluteness as the
moveto command.
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
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.
|
|
When the control bar is shown, do not toggle playback when clicking on
the control bar, unless the click target is the playback button. This
will let us implement clicking on the timeline to seek.
Note that this requires caching some layout rects on the video element.
We need to remember where the corresponding layout boxes are, and we
can't cache them on the layout box, as that may be destroyed any time.
|
|
Which also requires converting a DevicePixelSize to a CSSPixelSize.
|
|
|
|
The on_end_of_stream callback was added to notify clients that video
playback has stopped when we didn't have a way to retrieve the playback
state from Video::PlaybackManager. Now that we do, we should consolidate
on using the on_playback_state_change callback to detect such changes.
|
|
|
|
When sizing a flex container with flex-direction:column under a
max-content height constraint, we were incorrectly truncating the
infinite available height to 0 when collecting flex items into lines.
This caused us to put every flex item in its own flex line, which is the
complete opposite of what we want during max-content intrinsic sizing,
as the layout would grow wide but not tall.
|
|
We have to take the cross gap into account when calculating the "sum of
flex line cross sizes" in "Handle 'align-content: stretch'".
|
|
This fixes the clipping of strokes in quite a few cases and now fixes
the Gartic Phone logo :^)
(Layout test updated but no visible changes there)
|
|
Regressed in d4eaaf9.
|
|
|
|
|
|
Adds step and document_state properties. Both will be required for
further navigables spec implementation.
Co-authored-by: Andreas Kling <kling@serenityos.org>
|
|
This represents the new "document state" concept from the HTML spec.
Document states are primarily used in session history entries.
Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
|
These will need to float around more than they're currently able to.
Put them on the GC heap to prepare for that.
Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
|
This now defaults to serializing the path with percent decoded segments
(which is what all callers expect), but has an option not to. This fixes
`file://` URLs with spaces in their paths.
The name has been changed to serialize_path() path to make it more clear
that this method will generate a new string each call (except for the
cannot_be_a_base_url() case). A few callers have then been updated to
avoid repeatedly calling this function.
|
|
The defaults selected for this are based on the behaviour of URL
when it applied percent decoding during parsing. This does mean now
in some cases the getters will allocate, but percent_decode() checks
if there's anything to decode first, so in many cases still won't.
|
|
There are quite a few steps between a ReadableStream being created and
its controller being set. If GC occurs between those points, we will
have an empty Optional in ReadableStream::visit_edges. Seen on YouTube.
|
|
This is what we call it everywhere else.
|
|
|
|
This cannot throw unless we OOM.
|
|
Only the 'start algorithm' ever returns undefined (as a null GCPtr), so
let's type the others more strictly.
|
|
This change adds rules for background-attachment, background-clip,
background-image, background-origin, and background-repeat.
As a result, Window.getComputedStyle() will no longer return empty
strings on these properties after a page is loaded, and the background
shorthand will show the resolved values instead of the default ones for
these values. :^)
|
|
This isn't actually part of CSS-FLEXBOX-1, but all major engines honor
these properties in flex layout, and it's widely used on the web.
There's a bug open against the flexbox spec where fantasai says the
algorithm will be updated in CSS-FLEXBOX-2:
https://github.com/w3c/csswg-drafts/issues/2336
I've added comments to all the places where we adjust calculations for
gaps with "CSS-FLEXBOX-2" so we can find them easily. When that spec
becomes available, we can add proper spec links.
|
|
|
|
|