Commit Graph

5765 Commits

Author SHA1 Message Date
Andreas Kling
58d3322b0e LibWeb: Don't tell UI process about subframe title changes
This fixes an issue where loading an iframe would cause the current
browser tab title to get overwritten with an empty string.

The problem is that nested browsing contexts can be considered "top
level" during their initialization, but only one browsing context is
ever the Page::top_level_browsing_context(), so that's what we check.
2023-05-27 17:26:29 +02:00
Andreas Kling
a98f5c7251 LibWeb: Make resolved serialization of CSS display prefer short form
Although we translate e.g `block` to `block flow` for internal use in
the engine, CSS-DISPLAY-3 tells us to use the short form in
serializations for compatibility reasons.

This adds 9 points to our score on https://html5test.com/ :^)
2023-05-27 16:43:35 +02:00
Sam Atkins
e8a946c674 LibWeb: Remove StyleValue::has/to_length()
Specifically, stop letting NumericStyleValues holding `0` from
pretending to hold a Length. The parser is now smart enough that we
don't have to do this. :^)
2023-05-27 16:12:25 +02:00
Sam Atkins
6bbf163499 LibWeb: Create a LengthStyleValue for flex-basis of 0
We're about to stop letting 0 NumericStyleValues pretend to be Lengths,
so this will break. As noted, the flex-basis property accepts
`<length>` not `<number>` so this is actually correct.
2023-05-27 16:12:25 +02:00
Sam Atkins
5cbf6eb930 LibWeb: Remove StyleValue::has/to_integer()
Only NumericStyleValue holds integers.

I'm not sure our current distinction between NumericStyleValue holding
an integer or non-integer is useful given it always returns a float.
:thonk:
2023-05-27 16:12:25 +02:00
Sam Atkins
4ecf0b7768 LibWeb: Remove StyleValue::has/to_number()
Only NumericStyleValue holds numbers.

Renamed `to_number()` to `number()` because it's just a getter now.
2023-05-27 16:12:25 +02:00
Sam Atkins
5f755d721e LibWeb: Remove StyleValue::has_rect()
This behaves identically to `is_rect()`
2023-05-27 16:12:25 +02:00
Karthik Karanth
733b74af7c LibWeb: Support min-inline-size & max-inline-size
Currently this assumes that writing-mode is horizontal, and therefore
only affects the min-width/max-width
2023-05-27 16:02:33 +02:00
Matthew Olsson
22e97332fc LibWeb: Throw the correct object when enqueuing to a readable stream 2023-05-27 13:55:14 +02:00
Matthew Olsson
4c8015c1f6 LibWeb: Do not clear stream algorithms (and add corresponding FIXMEs) 2023-05-27 13:55:14 +02:00
Matthew Olsson
dd65d60069 LibWeb: Use doubles for Stream's high_water_mark and queue_total_size
This matches the IDL types
2023-05-27 13:55:14 +02:00
Matthew Olsson
bdfc14f24d LibWeb: Accept explicit "type: undefined" in UnderlyingSource 2023-05-27 13:55:14 +02:00
Matthew Olsson
5d48ade508 LibWeb: Use TRY() to convert invoke_callback result to an ExceptionOr
Otherwise, the JS::Completion is always interpretted as an error by
ExceptionOr.
2023-05-27 13:55:14 +02:00
Matthew Olsson
e5ff777b48 LibWeb: Capture stack values by copy in async lambdas in Stream AOs 2023-05-27 13:55:14 +02:00
Matthew Olsson
42fb847cc8 LibWeb: Use u64 for ReadableByteStream offsets instead of u32
These are specified in the IDL as "unsigned long long", which translates
to u64.
2023-05-27 13:55:14 +02:00
Andreas Kling
e30709fca9 LibWeb: Don't throw away the layout tree on viewport resize
We'll throw it out automatically if some media query changes changes its
evaluation state in response to the resize, and that should be enough.
2023-05-27 11:43:56 +02:00
Andreas Kling
78d6e2db8c LibWeb: Don't invalidate style when attribute set to identical value
This was a fairly common source of unnecessary style invalidations.
2023-05-27 11:43:56 +02:00
Andreas Kling
8ba7bd1b67 LibWeb: Accept fit-content as a value for min-width and max-width
This starts working immediately in BFC thanks to calculate_inner_width
being used for width constraints. :^)
2023-05-27 05:47:54 +02:00
Andreas Kling
1bb4e5c428 LibWeb: Support fit-content width for block-level boxes 2023-05-27 05:47:54 +02:00
Andreas Kling
a277c393b9 LibWeb: Support grid items with fit-content width :^) 2023-05-27 05:47:54 +02:00
Andreas Kling
299775345d LibWeb: Allow calculating intrinsic sizes of non-FC-roots
In order to support intrinsic size keywords (such as fit-content), we
need to be able to calculate the intrinsic sizes of any element, not
just those that form their own formatting context.

When a non-FC-root element is passed to calculate_some_intrinsic_size(),
we now create a synthetic BFC to handle sizing of them.
2023-05-27 05:47:54 +02:00
Andreas Kling
09eb3ef405 LibWeb: Add fit-content as a valid size value for CSS width 2023-05-27 05:47:54 +02:00
Aliaksandr Kalenik
ab5b89eb95 LibWeb: Add basic parsing of grid shorthand CSS property
Introduces incomplete parsing of grid shorthand property. Only
<grid-template> part of syntax is supported for now but it is enough
to significantly improve rendering of websites that use this shorthand
to define grid :)
2023-05-27 05:47:14 +02:00
Andi Gallo
1e526af430 LibWeb: Fix width calculation for floating replaced elements
The path for floating, replaced elements must not fall through to the
path taken for floating, non-replaced elements. The former works like
inline replaced elements, while the latter uses a completely different
algorithm which doesn't account for intrinsic ratio. Falling through
overrides the correct value computed by the former.

Fixes #19061.
2023-05-26 21:20:56 +02:00
Aliaksandr Kalenik
7cc20f4cb5 LibWeb: Reset margin collapsing state only if box indeed add clearance
This fixes the issue when margin collapsing state was always reset if
a box has clear property not equal to none even if it does not actually
introduce clearance.
2023-05-26 18:11:35 +02:00
Sam Atkins
b0a43404b9 LibWeb: Avoid nullptr dereference when parsing grid sizes 2023-05-26 17:53:11 +02:00
Cameron Youell
0afdde0eef LibWeb: Consume sign in SVG::parse_elliptical_arg_argument
This was crashing on google.com with the linux chrome user agent,
interestingly it seems like this behavior may have been accidental as
only two of the three `parse_number()` were changed in f7dbcb6
2023-05-26 14:54:00 +02:00
Andi Gallo
5cec517153 LibWeb: Get reference height from closest non-anonymous ancestor
Ignore anonymous block boxes when resolving percentage weights that
would refer to them, per the CSS 2 visual formatting model
specification. This fixes the case when we create an anonymous block
between an image which uses a percentage height relative to a parent
which specifies a definite height.

Fixes #19052.
2023-05-26 14:53:53 +02:00
PrestonLTaylor
5d3b7a5ecc LibWeb: Return DOMException instead of crashing when setting attributes 2023-05-26 05:23:09 +02:00
Andreas Kling
624f43c12b LibWeb: Do the CORS cross-origin workaround to find MIME type for images
This makes cross-origin image loads actually see the MIME type the
server tells us. :^)
2023-05-25 12:53:41 -07:00
Andreas Kling
aeffa0d988 LibWeb: Make Fetch::Infrastructure::HeaderList::is_empty() public 2023-05-25 12:53:41 -07:00
Andreas Kling
475bac89e1 LibWeb: Don't crash on unimplemented CSS display type
If some page throws "display: ruby-text" or some such at us, let's just
complain and carry on.
2023-05-25 16:49:34 +02:00
Andreas Kling
9c8da4374d LibWeb: Try failed font lookups again without weight and slope
If CSS requests a font that we have loaded, but we didn't associate it
with a specific weight and/or slope, let's still use it if it matches
the family name.

This is a hack until we implement proper CSS font selection.
2023-05-25 16:49:34 +02:00
Sam Atkins
f6fae315e3 LibWeb: Add CustomIdentStyleValue, along with parsing for it
This corresponds to the `<custom-ident>` type in CSS grammar.
2023-05-25 15:31:20 +01:00
0GreenClover0
b4c6cddd96 LibWeb: Handle invalid UTF-8 in Fetch's Body#text() 2023-05-25 06:03:40 -07:00
Andreas Kling
7d24c13d8b LibWeb: Make input element placeholders look better
We now create a flex container inside the input element's UA shadow tree
and add the placeholder and non-placeholder text as flex items (wrapped
in elements whose style we can manipulate).

This fixes the visual glitch where the placeholder would appear below
the bounding box of the input element. It also allows us to align the
text vertically inside the input element (like we're supposed to).

In order to achieve this, I had to make two small architectural changes
to layout tree building:

- Elements can now report that they represent a given pseudo element.
  This allows us to instantiate the ::placeholder pseudo element as an
  actual DOM element inside the input element's UA shadow tree.

- We no longer create a separate layout node for the shadow root itself.
  Instead, children of the shadow root are treated as if they were
  children of the DOM element itself for the purpose of layout tree
  building.
2023-05-25 14:42:24 +02:00
Andreas Kling
6fb661e781 LibWeb: Make HTMLDivElement not "final"
This is to prepare for making some custom internal divs inside the input
element UA shadow tree.
2023-05-25 14:42:24 +02:00
Sam Atkins
c0e61f92c0 LibWeb: Remove now-unused parse_css_value(ComponentValue) method
:^)
2023-05-25 06:36:10 +02:00
Sam Atkins
7e8ed996c9 LibWeb: Use new StyleValue parsing for transform-origin 2023-05-25 06:36:10 +02:00
Sam Atkins
f759a16087 LibWeb: Use new StyleValue parsing for text-decoration 2023-05-25 06:36:10 +02:00
Sam Atkins
a473f6074d LibWeb: Use new StyleValue parsing for text-decoration-line 2023-05-25 06:36:10 +02:00
Sam Atkins
a7a61c4cd9 LibWeb: Use new StyleValue parsing for overflow 2023-05-25 06:36:10 +02:00
Sam Atkins
2da15f987f LibWeb: Use new StyleValue parsing for list-style 2023-05-25 06:36:10 +02:00
Sam Atkins
7386ed7cfb LibWeb: Use new StyleValue parsing for content 2023-05-25 06:36:10 +02:00
Sam Atkins
c8626f2294 LibWeb: Use new StyleValue parsing for font and font-family 2023-05-25 06:36:10 +02:00
Sam Atkins
100adffdfb LibWeb: Use new StyleValue parsing for flex-flow 2023-05-25 06:36:10 +02:00
Sam Atkins
5d8b01ad04 LibWeb: Use new StyleValue parsing for border and its sided versions 2023-05-25 06:36:10 +02:00
Sam Atkins
91c9d10a78 LibWeb: Use new StyleValue parsing for flex
To make this work, we also add `none` as a valid identifier for `flex`.
(This is correct, we just didn't need it before.)
2023-05-25 06:36:10 +02:00
Sam Atkins
021fd15434 LibWeb: Use new StyleValue parsing for background-size 2023-05-25 06:36:10 +02:00
Sam Atkins
8e34bdc123 LibWeb: Use new StyleValue parsing for background-repeat 2023-05-25 06:36:10 +02:00
Sam Atkins
a0ec05ef81 LibWeb: Use new StyleValue parsing for background-position[-x,-y] 2023-05-25 06:36:10 +02:00
Sam Atkins
b0fe07cba3 LibWeb: Use new StyleValue parsing for background 2023-05-25 06:36:10 +02:00
Sam Atkins
d90ad19201 LibWeb: Use new StyleValue parsing for "simple" properties
That is, properties that don't have a bespoke parsing function.
2023-05-25 06:36:10 +02:00
Sam Atkins
bcacc2357e LibWeb: Implement smarter CSS StyleValue parsing
We know what types and identifiers a property can accept, so we can use
that information to only parse things that can be accepted. This solves
some awkward ambiguity problems that we have now or will face in the
future, including:

- Is `0` a number or a length with no unit?
- Is `3.5` a number or a ratio?
- Is `bottom` an identifier, or a custom-ident?

Two CSS Parser methods are introduced here:

`parse_css_value_for_property()` attempts to parse a StyleValue that the
property can accept, skipping any types that it doesn't want.

`parse_css_value_for_properties()` does the same, but takes multiple
PropertyIDs and additionally returns which one the parsed StyleValue is
for. This is intended for parsing shorthands, so you can give it a list
of longhands you haven't yet parsed.

Subsequent commits will actually use these new methods.
2023-05-25 06:36:10 +02:00
Sam Atkins
da4b2d9ca3 LibWeb: Cache initial property values when parsing background
Previously we were looking these up once per background layer. Let's not
do that. :^)
2023-05-25 06:36:10 +02:00
Sam Atkins
aad2f0963f LibWeb: Teach the CSS parser about extra color keywords
All of these identifiers can be treated as a color, so let's make sure
the parser understands that.
2023-05-25 06:36:10 +02:00
Sam Atkins
465ecf37c2 LibWeb: Make property_id_from_string() return Optional 2023-05-25 06:36:10 +02:00
Sam Atkins
03613dc14d LibWeb: Make value_id_from_string() return Optional 2023-05-25 06:36:10 +02:00
Sam Atkins
6f3e48db57 LibWeb: Fill in some missing property data and bodge extra types
We don't yet have generic parsing support for `<filter-value-list>` or
`<paint>`, so listing them here confuses the new StyleValue parsing code
I'm working on. For now, let's skip `<filter-value-list>` since it's
only used in one pkace which manually parses it, and list the parts of
`<paint>` instead which are taken from here:
https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint
2023-05-25 06:36:10 +02:00
Sam Atkins
5533413061 LibWeb: Remove "Invalid" StyleValue type
We never actually use this, we always initialize StyleValues with a
proper type.
2023-05-25 06:36:10 +02:00
kleines Filmröllchen
fc5cab5c21 Everywhere: Use MonotonicTime instead of Duration
This is easily identifiable by anyone who uses Duration::now_monotonic,
and any downstream users of that data.
2023-05-24 23:18:07 +02:00
kleines Filmröllchen
effcd080ca Userland: Remove remaining users of Duration::now_realtime()
This is a clear sign that they want to use a UnixDateTime instead.

This also adds support for placing durations and date times into SQL
databases via their millisecond offset to UTC.
2023-05-24 23:18:07 +02:00
kleines Filmröllchen
213025f210 AK: Rename Time to Duration
That's what this class really is; in fact that's what the first line of
the comment says it is.

This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
2023-05-24 23:18:07 +02:00
Andreas Kling
82ddc813d5 LibWeb: Stop aggressively quantizing font-weight values
Before this change, we were quantizing to either 400, 700 or 900.
This caused us to treat 100/200/300 weighted fonts as if they were
interchangeable.
2023-05-24 20:58:46 +02:00
Andreas Kling
4fc5e06837 LibWeb: Include weight and slope in CSSFontFaceRule debug dumps 2023-05-24 20:58:46 +02:00
Andreas Kling
a28275657b LibWeb: Include weight and style in CSSFontFaceRule serialization 2023-05-24 20:58:46 +02:00
Aliaksandr Kalenik
202b24584f LibWeb: Sum horizontal margins to calculate space used by floats
This fixes the issue where max margin is used to find offset of
floating box although horizonal margins do not collapse so they need
to be summed instead.
2023-05-24 18:58:42 +02:00
Jelle Raaijmakers
90d8844c77 LibWeb: Remove Gfx::Rect<float> workarounds from BFC
No longer is the last horizontal line of pixels ignored during layout.
This used to be a bug in `Gfx::Rect<float>` that was fixed in
f391ccfe53.
2023-05-24 18:19:45 +02:00
Andreas Kling
38b2cba6a2 LibWeb: Honor font-weight and font-style when using downloaded fonts
Instead of keying downloaded @font-face fonts on just the family name,
we now key them on a tuple of the family name, weight and slope.
2023-05-24 17:19:18 +02:00
Andreas Kling
74bdbdf43f LibWeb: Parse font-weight and font-style inside @font-face rules 2023-05-24 17:19:18 +02:00
Andreas Kling
be10360350 LibWeb: Move resolution of font weights and slopes to StyleValue
This isn't exactly ideal factoring (though I'm not sure what is) but
this will make it possible to reuse this code in the parser.
2023-05-24 17:19:18 +02:00
stelar7
17d6ab2416 LibWeb: Implement scroll_{width, height} 2023-05-24 17:18:30 +02:00
Andreas Kling
655d9d1462 LibWeb: Make CSSPixels and Length use 64-bit (double) floating point
This fixes a plethora of rounding problems on many websites.
In the future, we may want to replace this with fixed-point arithmetic
(bug #18566) for performance (and consistency with other engines),
but in the meantime this makes the web look a bit better. :^)

There's a lot more things that could be converted to doubles, which
would reduce the amount of casting necessary in this patch.
We can do that incrementally, however.
2023-05-24 14:40:35 +02:00
Andreas Kling
10ceacf5fb LibWeb: Honor the font-size even if the font-family is not found 2023-05-24 12:11:04 +02:00
Aliaksandr Kalenik
e5618b17c4 LibWeb: Avoid full tree traversal in Node::compare_document_position()
Introduce optimization that determines if one node is preceding,
following, ancestor or descdendant of another node by comparing
ancestors chains of both nodes which is much cheaper than using
Node::is_before() that can walk whole subtree in the worst case.
2023-05-24 08:20:45 +02:00
Andreas Kling
71d5dc510e LibWeb: Resolve CSS variables if present in SVG presentation attributes
SVG presentation attributes are parsed as CSS values, so we also need to
handle CSS variable expansion when handling them.

This (roughly) matches the behavior of other engines. It's also used on
the web, for example on https://stripe.com/ :^)
2023-05-24 06:43:21 +02:00
Andreas Kling
dd19f61538 LibWeb: Add fast way to check if a DOM node is an SVG element 2023-05-24 06:43:21 +02:00
Sam Atkins
4e47e6a3d6 LibWeb: Reject invalid tokens in calc() expressions
If we finish parsing a calculation tree and it still contains
UnparsedCalculationNodes, then it's not valid, and we shouldn't create
a StyleValue from it.
2023-05-23 15:43:23 +02:00
Andreas Kling
fa25f70086 LibWeb: Make LiveNodeList faster when it only cares about children
Same optimization as HTMLCollection, ported to LiveNodeList.
2023-05-23 14:38:45 +02:00
Andreas Kling
fe92b54137 LibWeb: Don't draw text fragments that would be clipped by the painter
This avoids a ton of work when painting large documents. Even though it
would eventually get clipped by the painter anyway, by bailing out
earlier, we avoid a lot more work (UTF-8 iteration, OpenType lookups,
etc).

It would be even nicer if we could skip entire line boxes, but we don't
have a fast way to get the bounding rect of a line box at the moment.
2023-05-23 14:38:45 +02:00
Andreas Kling
df1bb0ff49 LibWeb: Make HTMLCollection faster when it only cares about children
Some of the live HTMLCollection only ever contain children of their root
node. When we know that's the case, we can avoid doing a full subtree
traversal of all descendants and only visit children.

This cuts the ECMA262 spec loading time by over 10 seconds. :^)
2023-05-23 14:38:45 +02:00
Jelle Raaijmakers
c03152c5d2 LibWeb: Simplify margin & border box construction in LayoutState 2023-05-23 12:35:42 +02:00
Jelle Raaijmakers
f391ccfe53 LibGfx+Everywhere: Change Gfx::Rect to be endpoint exclusive
Previously, calling `.right()` on a `Gfx::Rect` would return the last
column's coordinate still inside the rectangle, or `left + width - 1`.
This is called 'endpoint inclusive' and does not make a lot of sense for
`Gfx::Rect<float>` where a rectangle of width 5 at position (0, 0) would
return 4 as its right side. This same problem exists for `.bottom()`.

This changes `Gfx::Rect` to be endpoint exclusive, which gives us the
nice property that `width = right - left` and `height = bottom - top`.
It enables us to treat `Gfx::Rect<int>` and `Gfx::Rect<float>` exactly
the same.

All users of `Gfx::Rect` have been updated accordingly.
2023-05-23 12:35:42 +02:00
Andreas Kling
e2c72922f6 LibWeb: Make LayoutState use HashMap instead of potentially huge Vector
Before this change, LayoutState essentially had a Vector<UsedValues*>
resized to the exact number of layout nodes in the current document.

When a nested layout is performed (to calculate the intrinsic size of
something), we make a new LayoutState with its own Vector. If an entry
is missing in a nested LayoutState, we check the parent chain all the
way up to the root.

Because each nested LayoutState had to allocate a new Vector with space
for all layout nodes, this could get really nasty on very large pages
(such as the ECMA262 specification).

This patch replaces the Vector with a HashMap. There's now a small cost
to lookups, but what we get in return is the ability to handle huge
layout trees without spending eternity in page faults.
2023-05-23 09:24:08 +02:00
Andreas Kling
e83681ee34 LibWeb: Use the right DOM node when placing cursor on double-click
This fixes a null pointer dereference when double-clicking in text
content on some pages.
2023-05-23 07:43:26 +02:00
Andreas Kling
80d6330a26 LibWeb: Don't create mutation record node lists if nobody is interested
By deferring allocation of StaticNodeList objects until we know somebody
actually wants the MutationRecord, we avoid a *lot* of allocation work.

This shaves several seconds off of loading https://tc39.es/ecma262/

At least one other engine (WebKit) skips creating mutation records if
nobody is interested, so even if this is observable somehow, we would
at least match the behavior of a major engine.
2023-05-23 06:31:37 +02:00
Andreas Kling
821f808e52 LibWeb: Avoid rebuilding layout tree unless CSS display property changes
Before this, any style change that mutated a property we consider
"layout-affecting" would trigger a complete teardown and rebuild of the
layout tree.

This isn't actually necessary for the vast majority of CSS properties,
so this patch makes the invalidation a bit finer, and we now only
rebuild the layout tree when the CSS display property changes.

For other layout-affecting properties, we keep the old layout tree (if
we have one) and run the layout algorithms over that once again.
This is significantly faster, since we don't have to run all the CSS
selectors all over again.
2023-05-23 06:06:55 +02:00
Andi Gallo
1bbfe4630d LibWeb: Preserve case for key events
Case-preserving behavior matches observed behavior of other browsers and
the specification.
2023-05-23 06:02:00 +02:00
Timothy Flynn
b865277275 LibWeb: Wait for media candidates without endlessly queueing microtasks
Rather than queueing microtasks ad nauseam to check if a media element
has a new source candidate, let the media element tell us when it might
have a new child to inspect. This removes endless CPU churn in cases
where there is never a candidate that we can play.
2023-05-22 15:11:08 +02:00
Aliaksandr Kalenik
76aa17be86 LibWeb: Make sure collapsed margins are not ignored if box creates FC
Fixes a bug that if box creates new formatting context then all already
collapsed margins are ignored and only margin_top is used.
2023-05-22 12:51:24 +02:00
Andi Gallo
668578ddc0 LibWeb: Propagate children_are_inline in wrap_in_anonymous
This fixes a crash in box_baseline, due to cells created for
display: table expecting a box child and getting the inline node wrapper
instead.

Fixes #18972.
2023-05-22 10:25:18 +02:00
Aliaksandr Kalenik
4fc4bd6c3f LibWeb: Set grid-auto-columns/rows in NodeWithStyle::apply_style() 2023-05-22 09:33:18 +02:00
Luke Wilde
a5936864d9 LibWeb: Stub AudioContext constructor
This is enough to make Discord not throw up "Well this is awkward" on
login.
2023-05-22 06:07:05 +02:00
Luke Wilde
e038901555 LibWeb: Fire the contextmenu event on right click (if not holding shift)
This now allows websites such as Discord, YouTube and your favourite
"Right Click" xkcd comic to open a custom context menu when you right
click. You can bypass this by holding shift, just like Firefox.
2023-05-22 06:07:05 +02:00
MacDue
91d8665ab4 LibWeb: Tidy up apply_clip_overflow_rect() a little
Avoid possible null optional dereference when creating border radius
clipper, and avoid creating clipper if the clip rect is empty (which
prevents some debug spam). Also remove an unnecessary lambda.
2023-05-22 06:05:47 +02:00
Aliaksandr Kalenik
193290b19a LibWeb: Support grid-auto-columns and grid-auto-rows properties in GFC
Implements assignment of sizes specified in grid-auto-columns/rows for
implicitly created tracks.
2023-05-22 06:05:19 +02:00
Aliaksandr Kalenik
6e0601a63e LibWeb/CSS: Implement parsing of grid-auto-columns and grid-auto-rows 2023-05-22 06:05:19 +02:00
Aliaksandr Kalenik
b49e9d2eab LibWeb: Check if line name is present in GridTrackSizeList::to_string()
Fixes crash in GridTrackSizeList::to_string() when line names are
missing.
2023-05-22 06:05:19 +02:00
Andreas Kling
0d82cc8a67 LibWeb: Don't assume response object isn't null in fetch abort algorithm
The callee that we're passing it to expects a GCPtr anyway, so there's
no need to explicitly dereference this.

Fixes a crash when loading https://spotify.com/
2023-05-21 16:19:31 +02:00
Aliaksandr Kalenik
f9803a7319 LibWeb: Represent OccupationGrid using HashTable in GFC
Using HashTable of grid positions to represent OccupationGrid allows to
simplify positioning code. For example maybe_add_row() and
maybe_add_column() calls are not needed anymore because there is no
Vector<Vector<bool>> that need to be resized.

No observable changes in grid layout are expected :)
2023-05-21 16:18:46 +02:00