Age | Commit message (Collapse) | Author |
|
I've never actually used this for anything, and it's pretty noisy.
|
|
Use FlyString::from_deprecated_fly_string() in these instances instead
of FlyString::from_utf8(). As we convert to new FlyString/String we want
to be aware of these potential unnecessary allocations.
|
|
|
|
This requires a bit of error type conversion glue as HashMap::try_ensure
expects the callback to return ErrorOr<T> like the function itself does.
|
|
This now matches the other window-owned objects, which already do this:
m_crypto, m_performance, m_screen.
|
|
This makes sure the property attributes are correct (writable and
configurable), which they currently aren't for either CSS or
WebAssembly.
|
|
|
|
Until now we were just creating a stacking context for the tree root,
which usually is the viewport element. This lead to weird painting
behaviour when negative z-index children of the html element that
established their own stacking context were drawn below the canvas
background.
Now we establish a stacking context for both, the root element and the
viewport.
|
|
Removal of dummy execution context in
9aca54091a53b5b287096311a6bbcfdd21f42d2f caused a crash in
`execute_async_script` because of empty execution contexts stack
during `create_resolving_functions` call.
|
|
When using the flex shrink factor, the flexible length resolution
algorithm was incorrectly ignoring the `frozen` flag on items and would
update the same items again, causing overconsumption of the remaining
free space on the flex line.
|
|
Better than doing the calculation manually.
|
|
We had an issue where boxes with margin-left were shifted right by
left-side floats twice instead of just once.
|
|
|
|
These are only ever constructed with a corresponding SVGGeometryElement,
so we know it's safe to static_cast here.
|
|
In case flex items had `margin: auto` on the primary flex axis, we were
still also distributing remaining space according to `justify-content`
rules. This lead to duplicated spacing in various places and overflows.
It looks like this issue was observed previously but missidentified
because there was logic to ignore margins at the start and end which
would partially paper over the root cause. However this created other
bugs (like for example not having a margin at beginning and end ;-)) and
I can find nothing in the spec or other browser behaviour that indicates
that this is something that should be done.
Now we skip justify-content space distribution alltogether if it has
already been distributed to auto margins.
|
|
This fixes a bug in the CSS Grid when there is a column and/or row gap,
as previously it would take the index of the incorrect column when
finding the `AvailableSize`.
There is a mild complication in the GridFormattingContext as the
OccupationGrid does not take into account the gap columns and rows that
later appear in the `Vector<TemporaryTrack>` columns and rows. The
PositionedBoxes are kind of a connection between the two, and so it's
now more explicit whether you would like to refer to a column by its
position taking into the gap columns/rows or not.
|
|
These were accidentally made public a while ago. Thankfully nobody
started poking into script element internals since then. :^)
|
|
|
|
|
|
|
|
The draft CSS-FLEXBOX-1 spec had a more detailed description of this
algorithm, so let's use that as our basis for the implementation.
Test by Aliaksandr. :^)
|
|
When resolving these constraints to CSS pixel sizes, we have to resolve
padding-top and padding-bottom against the flex container's *width*,
not its height.
|
|
The padding-top and padding-bottom properties are relative to the
*width* of the containing block, not the height.
It's funny how we keep making this same mistake again and again. :^)
|
|
These took an Optional<CSS::Size> for some reason, but that was not
necessary. Just take a CSS::Size.
|
|
|
|
|
|
Let's make it clear that these functions deal with ASCII case only.
|
|
|
|
|
|
This was necessary in the past, because IFC would set the height of its
containing block after inline layout.
Now that IFC can properly communicate the automatic size to its parent
formatting context, this hack is no longer necessary.
|
|
Instead of putting every rule that matches a pseudo element in the
same bucket, let them go in the best ID/class/tag name bucket instead.
Then, add a flag to MatchingRule that says whether it contains a
pseudo element in the rightmost compound selector.
When deciding which selectors to run for an element, we can now simply
filter in/out pseudo element selectors as appropriate depending on what
we're trying to match.
This fixes an issue where pages using Font Awesome had 1700+ rules in the
pseudo-element rule cache. (This meant all those rules had to run
against every element twice or more while instantiating pseudo elements.)
|
|
"Specified" means something else in CSS, so let's not use this
overloaded word here. These helpers return the inner main/cross size of
a given box, so let's say "inner" instead.
|
|
There was a pointless mix of `FlexItem*` vs `FlexItem&` as well as
`flex_item` vs `item`. Let's pick one and be consistent.
|
|
|
|
Also drop the try_ prefix from the fallible function, as it is no longer
needed to distinguish the two.
|
|
|
|
This adds the FormDataIterator implementation so we can iterate over
FormData.{keys(),values(),entries()}.
|
|
This getter returns the same readiness state of document as
`ready_state()` getter that is already present returns but without
allocating string.
|
|
We were already sorting the author style selectors into buckets.
Now we do it for the built-in UA style as well.
This means less work for the selector engine everywhere :^)
|
|
This makes selector matching significantly faster by not forcing us to
convert from FlyString to DeprecatedFlyString when matching class
selectors. :^)
|
|
This caused UAF since the string returned from url_encode() was
immediately discarded.
Co-authored-by: Luke Wilde <lukew@serenityos.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|