Commit Graph

1572 Commits

Author SHA1 Message Date
Andreas Kling
411b28fc59 LibWeb: Make sure that margins don't collapse across a nested BFC
In order to fix this, I also had to reorganize the code so that we
create an independent formatting context even for block-level boxes
that don't have any children. This accidentally improves a table
layout test as well (for empty tables).
2023-05-19 15:09:09 +02:00
Aliaksandr Kalenik
902ceb1675 LibWeb: Resolve grid item fixed size paddings in GFC
Adds support for grid items with fixed size paddings. Supporting
percentage paddings will probably require to do second pass of tracks
layout: second pass is needed to recalculate tracks sizes when final
items sizes are known when percentage paddings are already resolved.
2023-05-19 06:12:05 +02:00
Aliaksandr Kalenik
82aedfcaf0 LibWeb: Use grid item used width as available width during track sizing
This change addresses the incorrect assumption that the available width
inside a grid item is equal to the width of the track it belongs to.
For instance, if a grid item has a width of 200px, the available width
inside that item is also 200px regardless of its column(s) base size.

To solve this issue, it was necessary to move the final resolution of
grid items to occur immediately after the final column track sizes are
determined. By doing so, it becomes possible to obtain correct
available width inside grid items while resolving the row track sizes.
2023-05-18 18:06:05 +02:00
Andreas Kling
fb722e69f3 LibWeb: Resolve CSS custom properties on pseudo elements
The resolved property sets are stored with the element in a
per-pseudo-element array (same as for pseudo element layout nodes).

Longer term, we should stop storing this with elements entirely and make
it temporary state in StyleComputer somehow, so we don't waste memory
keeping all the resolved properties around.

This makes various gradients show up on https://shopify.com/ :^)
2023-05-17 20:37:29 +02:00
Aliaksandr Kalenik
628efda754 LibWeb: Consider span > 1 while getting available space for items in GFC 2023-05-17 15:55:14 +02:00
Aliaksandr Kalenik
d6d097b671 LibWeb: Remove borders from TemporaryTrack in GFC
This change makes grid items be responsible for their borders instead
of grid tracks which can not have borders itself.

There are changes in layout tests but those are improvements :)
2023-05-17 09:11:29 +02:00
Aliaksandr Kalenik
c61bb1706f LibWeb: Use auto minimimum size while resolving flexible tracks in GFC 2023-05-17 07:48:38 +02:00
Aliaksandr Kalenik
5f2264a2bd LibWeb: Skip non-spanning items sizing if there are no such items
Otherwise base_size and growth_limit for tracks that do not have any
spanning items will be overriden with wrong values.
2023-05-17 07:48:38 +02:00
Aliaksandr Kalenik
a3759b6e76 LibWeb: Implement more of "Expand Flexible Tracks" in GFC
Implements "Otherwise, if the free space is an indefinite length:" from
the spec.
2023-05-17 07:48:38 +02:00
Andreas Kling
2e13f65ff4 LibWeb: Support flex-basis: calc(...)
1. Propagate calc() values from StyleProperties to ComputedValues.
2. Actually resolve calc() values when determining the used flex basis.

This makes the "support" section on https://shopify.com/ show up
correctly as a 2x2 grid (instead of 1x4). :^)
2023-05-17 07:40:17 +02:00
Andreas Kling
e81d4ca1ac LibWeb: Fix off-by-one in CSS calc() "negate" operation
When negating a number, we should subtract it from 0, not 1. :^)
2023-05-17 07:40:17 +02:00
Andreas Kling
e938860126 LibWeb: Make text justification work between floats
While inline content between floating elements was broken correctly,
text justification was still using the original amount of available
space (without accounting for floats) when justifying fragments.
2023-05-16 14:35:10 +02:00
Andreas Kling
bab6796099 LibWeb: Rewrite calculation of available space between floats
This code now works in terms of *intrusion* by left and right side
floats into a given box whose insides we're trying to layout.

Previously, it worked in terms of space occupied by floats in the root
box of the BFC they participated in. That created a bunch of edge cases
since the code asking about the information wasn't operating in root
coordinate space, but in the coordinate space of some arbitrarily nested
block descendant of the root.

This finally allows horizontal margins in the containing block chain to
affect floats and nested content correctly, and it also allows us to
remove a bogus workaround in InlineFormattingContext.
2023-05-16 14:35:10 +02:00
Andi Gallo
9a6a635e51 LibWeb: Fix for absolutely positioned elements with specified height
Use inner height since the paintable adds padding back.

Fixes #18842.
2023-05-16 14:34:53 +02:00
Aliaksandr Kalenik
a613a0973e LibWeb: Reset item_incurred_increase before distributing space in GFC
item_incurred_increase should be reset before every next distirbution
because otherwise it will accumulate increases from previous
distributions which is not supposed to happen.
2023-05-16 07:47:47 +02:00
Andreas Kling
5d4e9a0673 LibWeb: Basic support for CSS text-indent: <length-percentage>
Note that this simple form of text-indent only affects the first line
of formatted content in each block.

Percentages are resolved against the width of the block.
2023-05-15 19:31:09 +02:00
Aliaksandr Kalenik
87a7299078 LibWeb: Start implementing sizing for tracks with span > 1 items in GFC
Partially implements:
- Increase sizes to accommodate spanning items crossing content-sized
  tracks
- Increase sizes to accommodate spanning items crossing flexible tracks

from https://www.w3.org/TR/css-grid-2/#algo-content
2023-05-14 19:32:34 +02:00
Aliaksandr Kalenik
6f82079a93 LibWeb: Remove dead code in resolve_intrinsic_track_sizes() in GFC
Removes partially implemented algorithm for distributing extra space
from spanning item:
https://www.w3.org/TR/css-grid-2/#extra-space

This algorithm should not be part of resolving track sizing on its own
but instead be a subfunction of step 3:
https://www.w3.org/TR/css-grid-2/#track-size-max-content-min

There are changes in layout tests but those are not regressions.
2023-05-14 13:45:29 +02:00
Aliaksandr Kalenik
dbafb11a7e LibWeb: Flesh out basic support of min-width/height for grid items
This change brings calculate_minimum_contribution() for grid items and
supporting functions.
2023-05-13 18:43:34 +02:00
Aliaksandr Kalenik
d187862f76 LibWeb: Return grid container width from automatic_content_width in GFC
automatic_content_width() should return grid container width that is
supposed to be set by determine_intrinsic_size_of_grid_container().
2023-05-13 12:53:25 +02:00
Aliaksandr Kalenik
644e4f4c99 LibWeb: Implement grid container intrinsic sizes calculation
When a width/height constraint is applied to GFC it should set its own
width/height to the sum of track sizes according to the spec.

Changes in layout tests are improvement over what we had before.
2023-05-13 12:53:25 +02:00
Aliaksandr Kalenik
de970c2dce LibWeb: Resolve grid items preferred width in GFC
Previously, the width and height of grid items were set to match the
size of the grid area they belonged to. With this change, if a grid
item has preferred width or height specified to not "auto" value it
will be resolved using grid area as containing block and used instead.
2023-05-11 18:37:06 +02:00
Aliaksandr Kalenik
c2f6ba8f5f LibWeb: Parse calc() function in grid sizes
Adds missing part of grid size parsing function to handle calc().
2023-05-11 18:36:56 +02:00
Andreas Kling
b98252728e LibWeb: Fix percentage min/max sizes on flex items with intrinsic ratio
We were resolving percentage values against the containing block size in
the wrong axis.
2023-05-10 18:46:04 +02:00
Andreas Kling
89ba7246dd LibWeb: Don't resolve CSS property values for unconnected elements
While it's possible to getComputedStyle() on an unconnected element,
the resulting object is not supposed to have any values, since we can't
resolve style without a document root anyway.

This fixes a crash on https://bandcamp.com
2023-05-10 17:27:07 +02:00
Andreas Kling
0c26717ba3 LibWeb: Adjust flex item main size through aspect ratio if needed
If there are min or max size constraints in the cross axis for a flex
item that has a desired aspect ratio, we may need to adjust the main
size *after* applying the cross size constraints.

All the steps to achieving this aren't mentioned in the spec, but it
seems that all other browsers behave this way, so we should too.
2023-05-10 13:03:05 +02:00
Aliaksandr Kalenik
14cb0067bb LibWeb: Implement more of "Resolve Intrinsic Track Sizes" in GFC
Implements some parts of "Resolve Intrinsic Track Sizes" algorithm
from spec to make it more spec compliant.
2023-05-10 05:52:47 +02:00
Andreas Kling
197efc8985 LibWeb: Improve handling of min/max constraint violations on images
Instead of bailing after resolving one violated constraint, we have to
continue down the list of remaining constraints.

We now also call the constraint solver for all replaced elements with
"auto" for both width and height.

Co-authored-by: 0GreenClover0 <clovers02123@gmail.com>
2023-05-09 12:11:28 +02:00
Emil Militzer
8200d1f68b LibWeb: Initial offset in reverse flex layout moved to opposite side
This change moves the initial offset for justify-content: center to the
opposite side if the flex layout is in the reverse direction.
2023-05-09 10:32:09 +02:00
Aliaksandr Kalenik
fb6b52b3fb LibWeb: Align GridFormattingContext::run_track_sizing() with the spec
1. Stop using -1 to indicate infinity value of growth limit. Just use
   INFINITY for that.
2. More complete implementation of "Expand Flexible Tracks" step.
3. Return AvailableSize from get_free_space: spec says that this
   function can return indefinite size and it is ok.
2023-05-09 06:37:30 +02:00
Aliaksandr Kalenik
f2323b5b99 Tests/LibWeb: Split input/grid/minmax.html into smaller tests 2023-05-09 06:37:30 +02:00
Aliaksandr Kalenik
0dcc93ed3d Tests/LibWeb: Split input/grid/gap.html into smaller tests
The file gap.html, which previously had multiple grid tests, has now
been divided into smaller files, each containing only one grid test.
It is going to make it easier to identify what inputs have been
affected by changes in layout code.
2023-05-09 06:37:30 +02:00
Aliaksandr Kalenik
bb90bf0141 Tests/LibWeb: Split input/grid/template-areas.html into smaller tests
The file template-areas.html, which previously had multiple grid tests,
has now been divided into smaller files, each containing only one grid
test. It is going to make it easier to identify what inputs have been
affected by changes in layout code.

Also this change removes parts of template-areas.html that we can't
layout correctly yet.
2023-05-09 06:37:30 +02:00
Andreas Kling
1ebae7a779 LibWeb: Stop changing width of block-level flex containers during layout
If the parent BFC can come up with a nice stretch-fit width for the flex
container, it will have already done so *before* even entering flex
layout. There's no need to do it again, midway through the flex layout
algorithm.

This wasn't just unnecessary, but we were also doing it incorrectly and
not taking margins into account when calculating the amount of available
space for stretch-fit. This led to oversized flex containers in the
presence of negative margins.

Fixes #18614
2023-05-08 15:56:00 +02:00
martinfalisse
ea61296738 LibWeb: Use layout-test-mode for layout tests
Also do some test changes to test it out :^)
2023-05-08 14:47:52 +02:00
Aliaksandr Kalenik
3a605d8c19 LibWeb: Set width in compute_width_for_table_wrapper()
Width of table wrapper need to be set to to calculate width of table
box inside. Otherwise TFC will set wrong width assuming width of
containing block is 0.
2023-05-07 06:31:53 +02:00
Andreas Kling
fc3c3aef22 LibWeb: Enforce min/max height constraints on abspos replaced boxes
Fixes #18658
2023-05-07 06:28:47 +02:00
Aliaksandr Kalenik
ced862e16f LibWeb: Consolidate track sizing code for rows and columns in GFC
Although the algorithm for sizing tracks (rows or columns) is defined
once for both dimensions in the specification
(https://www.w3.org/TR/css-grid-2/#algo-track-sizing), we have
implemented it twice separately for sizing rows and columns.

In addition to code duplication, another issue is that these
implementations of the same algorithm have already diverged in some
places, and this divergence is likely to become even worse as our
implementation evolves.

This change unifies code for both dimension into one method that runs
track sizing.

While this change brings a bit of collateral damange (border.html and
minmax.html got changes in layout snaphots) it ultimately brings more
benefits because now we can evolve layout for both rows and colums
without duplicating the code :)
2023-05-06 07:01:27 +02:00
0GreenClover0
8bb2663a22 LibWeb: Zero out margins if width is not 'auto' in BFC's compute_width
Reverse the condition to satisfy the spec comment. Probably a typo.
A 3 year old typo! :^)
2023-05-05 13:26:41 +02:00
Aliaksandr Kalenik
34b1186272 LibWeb: Remove early resolve to auto while calculating border-box width
`Length::resolved(Node&)` transforms infinite values to "auto".

Following transformations:
Infinite (Length) -> "auto" -> 0 (px)
cause border-box width to be resolved in zero when it should be inf px.

Removing `Length::resolved(Node&)` makes it work right:
Infinite (Length) -> Infinite (px)

Fixes #18649
2023-05-05 10:01:28 +02:00
Aliaksandr Kalenik
0318ac5ce4 LibWeb: Remove setting length to 0px if it is not definite
If available width (or height) is max-content and width (or height)
value is 100% it should be resolved in infinite px, not 0 px.

Fixes #18639
2023-05-05 06:20:44 +02:00
Aliaksandr Kalenik
853ecb8d8e LibWeb: Narrow width of boxes that create BFC to avoid overlap of float
https://www.w3.org/TR/CSS22/visuren.html#floats says that when a box
establishes BFC it should not overlap with floats. The way to avoid
overlaps is up to implementor. This change implements avoiding overlap
by narrowing width of a box because it seems like what other engines
do (in the scenarios I tested).
2023-05-04 06:14:58 +02:00
Andreas Kling
590723aa3b LibWeb: Implement the "The html element fills the viewport quirk"
Fixes #18037.
2023-05-03 20:44:30 +02:00
Andreas Kling
508927cae2 LibWeb: Take floats into account when measuring automatic width of IFC
When there are floats present inside an IFC, we must coordinate with
the parent BFC to calculate the automatic width of the IFC's block box.
This is because the IFC is not directly aware of floats. Only the BFC
knows enough about them to account for them in automatic sizing.
2023-05-03 19:49:43 +02:00
Andreas Kling
610a7603a2 LibWeb: Implement more box type transformation edge cases
In particular, we now blockify layout internal boxes (e.g table parts)
by turning them into `block flow`. This fixes a crash when viewing
our GitHub repo :^)
2023-05-03 16:04:30 +02:00
Aliaksandr Kalenik
09d698e0a0 LibWeb: Exclude table-wrapper margins from table available width
Table should not take up more width than is available inside wrapper
after margins are taken in account.
2023-05-03 15:03:56 +02:00
Aliaksandr Kalenik
4d971b5bc5 LibWeb: Use appropriate containing block width to get width of table
This solves the issue that previously width table-wrapper containing
block were used in the places were containing block of table-root
should be used.
2023-05-03 15:03:56 +02:00
Andreas Kling
968db96101 LibWeb: Show formatting context roots in layout tree dumps
This patch does three things:

- Factors out the code that determines whether a box will create a new
  formatting context for its children (and which type of context)

- Uses that code to mark all formatting context roots in layout tree
  dumps. This makes it much easier to follow along with layout since
  you can now see exactly where control is transferred to a new
  formatting context.

- Rebaselines all existing layout tests, since the output format has
  changed slightly.
2023-05-03 13:14:36 +02:00
Aliaksandr Kalenik
f6ff37398c LibWeb: Fix intrinsic sizing when min or max width is specified
Fixes the problem that width is incorrectly computed in intrinsic
sizing mode when there are blocks that have min-width or max-width
specified.

Actually that is just the fix of a symptom of the larger problem that
Length::to_px() returns 0 when value is auto regardless of available
size.
2023-05-02 18:50:26 +02:00
Aliaksandr Kalenik
6cec431720 LibWeb: Set zero underflow when calculating intrinsic width of block
This fix resolves issue where calculating the min size of a block could
result in incorrect value if width of the block's children was
compensated by margins to fit into container width (which is equal to 0
during min size calculation).
2023-05-02 12:41:45 +02:00
Andreas Kling
00e3e82bbd LibWeb: Account for box-sizing:border-box in layout-less definite sizes
When we determine that a size is definite because it can be resolved now
without performing layout, we also need to account for the box-sizing
property.

This lets us remove a hack from flex layout where box-sizing:border-box
was manually undone at one point in the layout algorithm.
2023-05-02 11:47:13 +02:00
martinfalisse
22202715fc LibWeb: Parse grid-template property 2023-04-30 05:56:10 +02:00
Andreas Kling
5236819f58 LibWeb: Resolve horizontal auto margins for images with display: block 2023-04-30 05:52:19 +02:00
Aliaksandr Kalenik
e54ee7de96 LibWeb: Exclude borders from width available for table columns
Fix table box width calculation to minus horizonal borders from space
available for columns.
2023-04-29 16:08:48 +02:00
Aliaksandr Kalenik
d9f0c2a806 LibWeb: Implement "distribute height to rows" step in TFC
This commit implements following missing steps in table layout:
- Calculate final table height
- Resolve percentage height of cells and rows using final table height
- Distribute avilable height to table rows
2023-04-29 06:46:45 +02:00
Aliaksandr Kalenik
9fd51a59ff LibWeb: Fix division by zero in table columns width distribution
If total max columns width (grid_max) is zero then available width
should be divided equally between columns. Previously there was
division by zero: `column.max_width / grid_max`.
2023-04-29 06:46:45 +02:00
Emil Militzer
a8d08357c9 LibWeb: Compute inset for relative positioned inline-block 2023-04-28 18:12:02 +02:00
Aliaksandr Kalenik
2a1e58f8cc LibWeb: Consider cell computed height in total row min height of table
Previously, the minimum height of a table row was calculated based
on the automatic height of the cells inner layout. This change makes
computed height of a cell boxes also be considered if it has definite
value.
2023-04-28 06:17:07 +02:00
Aliaksandr Kalenik
9b4cd0dab7 LibWeb: Consider row computed height in total row min height of table
Fixes the issue that currently we do not consider table rows height
while calculating min row height even if it is definite value.
2023-04-28 06:17:07 +02:00
Andreas Kling
c0b4083b02 LibWeb: Blockify pseudo elements that are flex items
When deciding on a box type transformation (blockify/inlinify) for a
pseudo element, we have to use the originating element as a reference
rather than the parent.

(The originating element *is* the parent for its pseudo elements.)
2023-04-27 18:29:02 +02:00
Andreas Kling
d053cb6fae LibWeb: Fix bug where box-sizing: border-box made flex items too small
If a flex item has a preferred cross size of "auto", we should not be
subtracting padding and border in the cross axis when computing the
cross size.
2023-04-27 13:57:52 +02:00
Aliaksandr Kalenik
9ee64b5694 LibWeb: Prevent margin double-counting with "collapse through" boxes
If there is a remaining margin-bottom in margin collapsing state
tracker after laying out all boxes in the current BFC, it must be
assigned to the last in-flow child since margin collapsing cannot
occur across a formatting context boundary.

The current issue where margin-bottom may be counted twice due to
"collapse through" margins in the last in-flow child box is addressed
with this fix by excluding such boxes during the search for a box to
assign the remaining margin.

Test case coming with this fix has a layout bug with incorrectly
computed line height.
2023-04-27 07:52:12 +02:00
martinfalisse
c987c934d0 LibWeb: Fix grid size when intrinsically sized
This fixes a bug that was seen when a combination of the grid having
been floated with `float: left` and a `minmax()` column size were used.

The issue was that a grid track size should be considered intrinsically
sized if both the min and max sizes are intrinsic, not just one of them.
2023-04-24 07:55:40 +02:00
Aliaksandr Kalenik
ce483fb2c9 Tests/LibWeb: Time limit layout tests
This change will prevent CI runners from being stuck trying to run
layout tests on PR that made browser hang.
2023-04-21 11:00:21 +01:00
Andreas Kling
8c03d21e95 LibWeb: Fix broken handling of flex: <flex-grow> shorthand
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-19 12:07:16 +02:00
Andreas Kling
ce5a939148 LibWeb: Layout <svg> nested inside <svg>
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-19 07:52:26 +02:00
Andreas Kling
0d5e0d27aa LibWeb: Treat unresolvable percentage flex-basis values as 'content'
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-18 10:06:02 +02:00
Andreas Kling
c710575f88 LibWeb: Honor box-sizing in flex item "specified size suggestion"
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-17 18:22:53 +02:00
Andreas Kling
7f79208759 LibWeb: Support implicit lineto commands after moveto in SVG paths
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-17 14:18:45 +02:00
MacDue
f0dde6236d Tests: Add layout test for SVG preserveAspectRatio
This is a cut down version of the example, but it's nice to add a
test to ensure this keeps working.
2023-04-17 07:32:31 +02:00
MacDue
5df4e64eb7 LibWeb: Implement SVG preserveAspectRatio attribute
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-17 07:32:31 +02:00
Andreas Kling
e7f5b5a2f3 LibWeb: Fix multi-line flex column layouts with auto height on container
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.
2023-04-16 21:45:15 +02:00
Andreas Kling
b9b6037d2b LibWeb: Honor gap between flex lines when using align-content: stretch
We have to take the cross gap into account when calculating the "sum of
flex line cross sizes" in "Handle 'align-content: stretch'".
2023-04-16 20:52:32 +02:00
MacDue
f9c61e3ba7 LibWeb: Scale SVG stroke-width based on viewbox
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)
2023-04-15 19:28:13 +02:00
Andreas Kling
47c21cc349 LibWeb: Honor column-gap and row-gap CSS properties in flex layout
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.
2023-04-14 13:22:07 +02:00
Sam Atkins
d0f80b40b2 LibWeb: Reimplement CalculatedStyleValue as a calculation node tree
VALUES-4 defines the internal representation of `calc()` as a tree of
calculation nodes. ( https://www.w3.org/TR/css-values-4/#calc-internal )

VALUES-3 lacked any definition here, so we had our own ad-hoc
implementation based around the spec grammar. This commit replaces that
with CalculationNodes representing each possible node in the tree.

There are no intended functional changes, though we do now support
nested calc() which previously did not work. For example:
    `width: calc( 42 * calc(3 + 7) );`

I have added an example of this to our test page.

A couple of the layout tests that used `calc()` now return values that
are 0.5px different from before. There's no visual difference, so I
have updated the tests to use the new results.
2023-04-13 09:53:47 +02:00
MacDue
5abffc9c5a Tests: Add layout test for SVG transforms and viewboxes
Now that these are kind of working, lets add a layout test to prevent
future regressions :^)

This test is the same as the previous example (it is copied, though
that seems to have been done for other tests, e.g. Acid 1).
2023-04-12 07:40:22 +02:00
martinfalisse
c839c51b0b LibWeb: Use max-width property in table formatting 2023-04-07 10:42:26 +02:00
martinfalisse
1440845aad LibWeb: Add table formatting tests
Creates some TableFormattingContext tests based on the tests in
/html/misc.
2023-04-07 10:42:26 +02:00
martinfalisse
c421f1692c LibWeb: Move table tests to their own folder 2023-04-07 10:42:26 +02:00
Andreas Kling
7b4c76788b LibWeb: Don't put abspos grid/flex items in anonymous wrapper
Grid and flex containers have their own rules for abspos items, so we
shouldn't try to be clever and put them in the "current" anonymous
wrapper block. That behavior is primarily for the benefit of block &
inline layout.
2023-04-07 10:15:16 +02:00
Andreas Kling
b97229c9b5 LibWeb: Ignore preferred width when calculating intrinsic width of block
When calculating the intrinsic width of a block-level box, we now ignore
the preferred width entirely, and not just when the preferred width
should be treated as auto.

The condition for this was both confused and wrong, as it looked at the
available width around the box, but didn't check for a width constraint
on the box itself.

Just because the available width has an intrinsic sizing constraint
doesn't mean that the box is undergoing intrinsic sizing. It could also
be the box's containing block!
2023-04-06 16:47:40 +02:00
Andreas Kling
68459d43e0 Tests/LibWeb: Move block & inline layout tests into own directory 2023-04-06 16:47:40 +02:00
matcool
cc33a57620 LibWeb: Use intrinsic aspect ratio when calculating max content height 2023-04-05 16:23:56 +02:00
martinfalisse
289285cd6e LibWeb: Add borders functionality to CSS Grid 2023-04-02 19:08:04 +02:00
martinfalisse
6f52272d34 LibWeb: Fix regression in definite grid row heights
Fixes a row height bug when a grid item in a row has a definite height.
2023-04-02 19:08:04 +02:00
Andreas Kling
8bb0be7d4f LibWeb: Don't apply presentational hints to associated pseudo elements
CSS properties generated by presentational hints in content attributes
should not leak into pseudo elements.
2023-04-02 15:00:06 +02:00
Andreas Kling
620a34a463 LibWeb: Don't apply element inline style to associated pseudo elements
An element's inline style, if present, should not leak into any pseudo
elements generated by that element.
2023-04-02 15:00:06 +02:00
Andreas Kling
9cded6e1b5 LibWeb: Fix application of intrinsic aspect ratio to flex column items
The intrinsic aspect ratio of a box is a width:height ratio, so if we
have the width and need the height, we should divide, not multiply. :^)
2023-04-02 06:45:44 +02:00
martinfalisse
57cdb0c972 LibWeb: Add display grid automated tests 2023-04-01 21:45:29 +02:00
martinfalisse
7028f75779 Tests: Use layout tests placed in subdirectories
Allows organizing layout tests into subdirectories.
2023-04-01 21:45:29 +02:00
Andreas Kling
45f8542965 LibWeb: Actually visit rules and media queries in imported style sheets
Due to CSSImportRule::has_import_result() being backwards, we never
actually entered imported style sheets when traversing style rules or
media queries.

With this fixed, we no longer need the "collect style sheets" step in
StyleComputer, as normal for_each_effective_style_rule() will now
actually find all the rules. :^)
2023-03-30 16:54:15 +02:00
Andreas Kling
e4b71495f5 LibWeb: Resolve percentage vertical-align values against line-height
...instead of not resolving them at all. :^)
2023-03-29 18:38:29 +02:00
Andreas Kling
c0a7a61288 LibWeb: Clamp fit-content widths in flex layout to min/max-width
In situations where we need a width to calculate the intrinsic height of
a flex item, we use the fit-content width as a stand-in. However, we
also need to clamp it to any min-width and max-width properties present.
2023-03-28 21:08:54 +02:00
Luke Wilde
4c090a9a35 Tests/LibWeb: Add layout test for layout fix in PR #15780
Adds a layout test for the fix in 488a979.
2023-03-28 19:45:00 +01:00
Andreas Kling
af118abdf0 LibWeb: Use fit-content width in place of indefinite flex item widths
In `flex-direction: column` layouts, a flex item's intrinsic height may
depend on its width, but the width is calculated *after* the intrinsic
height is required.

Unfortunately, the specification doesn't tell us exactly what to do here
(missing inputs to intrinsic sizing is a common problem) so we take the
solution that flexbox applies in 9.2.3.C and apply it to all intrinsic
height calculations within FlexFormattingContext: if the used width of
an item is not yet known when its intrinsic height is requested, we
substitute the fit-content width instead.

Note that while this is technically ad-hoc, it's basically extrapolating
the spec's suggestion in one specific case and using it in all cases.
2023-03-27 23:28:07 +02:00
Aliaksandr Kalenik
1ee99017e2 LibWeb: Fix intrinsic sizing early return condition in TFC
Early return before running full TFC algorithm is only possible when
just table width need to be calculated.
2023-03-27 23:10:16 +02:00
Andreas Kling
949483fb01 Tests/LibWeb: Test flex column item with auto height and max-width
This case is important because we have to clamp the width before using
it to determine the auto height.
2023-03-26 15:14:35 +02:00
Andreas Kling
5b030a6923 Tests/LibWeb: Add test for flex item auto height with flex-wrap: wrap 2023-03-26 15:14:35 +02:00
Andreas Kling
4bf10674fa LibWeb: Don't allow resolved height of abspos elements to become negative
We have to clamp the resulting height to 0 when solving for it.
2023-03-25 19:41:31 +01:00
Andreas Kling
3f6f3966b9 LibWeb: Don't allow resolved width of abspos elements to become negative
We have to clamp the resulting width to 0 when solving for it.
2023-03-25 19:41:31 +01:00
Andreas Kling
8f311c61af LibWeb: Add out-of-flow boxes to anonymous wrapper block when possible
If the previous sibling of an out-of-flow box has been wrapped in an
anonymous block, we now stuff the out-of-flow box into the anonymous
block as well.

Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2023-03-25 19:41:31 +01:00
Andreas Kling
d005b1ad1b LibWeb: Support loading file:// URLs via fetch (through ResourceLoader)
This builds on the existing ad-hoc ResourceLoader code for HTTP fetches
which works for files as well.

This also includes a test that checks that stylesheets loaded with the
"file" URL scheme actually work.
2023-03-22 23:34:32 +00:00
Andreas Kling
a6d1307aa4 LibWeb: Don't crash on HTML input element with display: inline
This would previously assert in InlineFormattingContext because we had
an outwardly inline box that wasn't inwardly flow.

Fix this by converting text-based input boxes to inline-blocks. This is
an ad-hoc solution, and there might be a much better way to solve it.
2023-03-20 17:57:58 +01:00
Aliaksandr Kalenik
7ddacef3b5 LibWeb: Apply border-radius clip only if overflow hidden for both axis
Before this change `apply_clip_overflow_rect` might crash trying to
access `clip_rect` that does not have value because we currently
support calculation of visible rectangle when `overflow: hidden`
is applied for both axis.
2023-03-19 19:04:51 +01:00
Simon Wanner
482fa2d4e2 Tests/LibWeb: Add two tests for lh and rlh units 2023-03-18 20:14:52 +01:00
Andreas Kling
1dc074fc18 LibWeb: Treat flex item's cyclic percentage cross size as auto
This fixes an issue where e.g `height: 100%` on a flex item whose
container has indefinite height was being resolved to 0. It now
correctly behaves the same as auto.
2023-03-18 00:26:19 +01:00
Mathis Wiehl
9927dab993 LibWeb: Don't drop single <br/> lines
Previously, when having inline contexts consisting of just a `<br/>`
tag, we would not create a line box.

Ensure that there is always a line box when a line is explicitly being
broken and also ensure it won't be trimmed due to being empty.

This will a fix a number of sites that use `<br>` tags for layouts
between block elements (even though the spec says they shouldn't).
2023-03-16 08:40:29 +00:00
Andreas Kling
71b7e65a52 Tests/LibWeb: Add ACID1 as a layout test
This will help us catch any future regressions immediately.
2023-03-15 11:43:54 +01:00
Andreas Kling
db545b51ef LibWeb: Make sure float: left boxes get pushed down if they can't fit 2023-03-15 11:43:54 +01:00
Andreas Kling
50f9a86086 LibWeb/Tests: Remove image from a test
The image made the test flaky when running on my machine, so this
doesn't seem safe at the moment. We can just hardcode the dimensions.

Eventually we should make it possible to use external images in tests,
but for now let's not flake up the CI.
2023-03-14 18:49:37 +01:00
Mathis Wiehl
b96920a9d6 LibWeb: Consider margins of atomic inlines in layout
According to CSS Inline Layout Module Level 3 § 2.2 Step 1. atomic
inlines should be layed out in a line box based on their margin box.

However, up until this patch we were unconditionally considering only
the border box during line box height calculation. This made us
essentially drop all vertical margins for atomic inlines.
2023-03-14 14:45:40 +01:00
Tim Schumacher
ae51c1821c Everywhere: Remove unintentional partial stream reads and writes 2023-03-13 15:16:20 +00:00
Tim Schumacher
d5871f5717 AK: Rename Stream::{read,write} to Stream::{read_some,write_some}
Similar to POSIX read, the basic read and write functions of AK::Stream
do not have a lower limit of how much data they read or write (apart
from "none at all").

Rename the functions to "read some [data]" and "write some [data]" (with
"data" being omitted, since everything here is reading and writing data)
to make them sufficiently distinct from the functions that ensure to
use the entire buffer (which should be the go-to function for most
usages).

No functional changes, just a lot of new FIXMEs.
2023-03-13 15:16:20 +00:00
Timothy Flynn
127d2e2098 LibWeb: Run LibWeb layout tests using headless-browser 2023-03-13 12:41:10 +00:00
Andreas Kling
7bb7d87807 LibWeb: Resolve percentage line-height values before CSS inheritance
Percentage line-height values are relative to 1em (i.e the font-size
of the element). We have to resolve their computed values before
proceeding with inheritance.
2023-03-12 18:10:32 +01:00
Andreas Kling
7b55d79d3a LibWeb: Actually incorporate style from imported style sheets 2023-03-12 18:10:32 +01:00
Andreas Kling
1b262f8c89 Tests/LibWeb: Only care about *.html files in layout test runner 2023-03-12 18:10:32 +01:00
Andreas Kling
92eaad8f2e LibWeb: Consider entire stack of floated boxes when floating new box
If normal flow layout has caused us to progress past the current
innermost float in the block axis, we still need to consider the floats
stacked outside of it.

Fix this by always walking the currently stacked floats from innermost
to outermost when placing new floats.
2023-03-12 18:10:32 +01:00
Andreas Kling
f3556f239e LibWeb: Don't touch flex items after they we've been frozen
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.
2023-03-11 11:52:19 +01:00
Andreas Kling
f97754942c LibWeb: Collapse margin-left with space used by left-side floats
We had an issue where boxes with margin-left were shifted right by
left-side floats twice instead of just once.
2023-03-11 10:46:26 +01:00
Mathis Wiehl
ab4cf7c57d LibWeb: Don't overflow flex containers on margin auto
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.
2023-03-11 10:46:21 +01:00
Andreas Kling
da861fe7af Tests/LibWeb: Use SerenitySans in new layout tests
This ensures consistent font metrics no matter which platform fonts
are available.
2023-03-10 18:10:33 +01:00
Andreas Kling
109ed27423 LibWeb: Rewrite FFC "resolve flexible lengths" algorithm from draft spec
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. :^)
2023-03-10 13:38:34 +01:00
Andreas Kling
1cd61723f0 LibWeb: Show layout test failure diffs in unified format (diff -u) 2023-03-10 13:38:34 +01:00
Andreas Kling
0ef07383e5 LibWeb: Fix bogus min/max-height for box-sizing:border-box flex items
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.
2023-03-10 13:38:34 +01:00
Andreas Kling
24d5a9d7df LibWeb: Fix bogus percentage vertical padding with box-sizing:border-box
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. :^)
2023-03-10 13:38:34 +01:00
Andreas Kling
7e76a51cb0 LibWeb: Rename Layout::InitialContainingBlock to Layout::Viewport
The name "initial containing block" was wrong for this, as it doesn't
correspond to the HTML element, and that's specifically what it's
supposed to do! :^)
2023-02-28 12:21:56 +01:00
Tim Schumacher
874c7bba28 LibCore: Remove Stream.h 2023-02-13 00:50:07 +00:00
Tim Schumacher
606a3982f3 LibCore: Move Stream-based file into the Core namespace 2023-02-13 00:50:07 +00:00
Aliaksandr Kalenik
92cb32b905 LibWeb: Add tests for flex formatting context 2023-02-11 10:42:52 +01:00
Aliaksandr Kalenik
2ed5415750 LibWeb: Fix clearance to update y offset within current block
If a box has clearance and margin bottom of preceding box is greater
than static y of the box then it should also affect y offset in current
block container so subsequent boxes will get correct y position too.
2023-02-10 20:55:33 +01:00
Aliaksandr Kalenik
f43f4feb1e LibWeb: Table wrappers should not be ignored in auto height calculation
Though table wrappers are anonymous block containers (because
TableWrapper is inherited from BlockContainer) with no lines they
should not be skipped in block auto height calculation.
2023-02-07 17:04:38 +01:00
Aliaksandr Kalenik
900cd78121 LibWeb: Add layout tests for floats, margins collapsing and positioning
Those are copied from 'Base/res/html/misc/'.
2023-02-06 20:42:14 +01:00
Aliaksandr Kalenik
12eca612bc Ladybird: Specify window size in layout dump mode 2023-02-06 20:42:14 +01:00
Timothy Flynn
9f9b8e7273 CI: Move running LibWeb layout tests to Azure
The current config on GitHub Actions does not use ccache, so it takes
quite a while to build. Instead, let's just run these tests on Azure
where we already build Ladybird and have ccache enabled. This also lets
us sanitize LibWeb on both Linux and macOS.

The script changes here are to A) handle differences between Azure and
GitHub Actions and B) to support running on macOS.
2023-02-01 14:04:44 +00:00
Aliaksandr Kalenik
78b503946c Tests: Add LibWeb layout tests 2023-01-29 11:33:33 +00:00
Ben Wiederhake
b3d2fdceb1 LibWeb+Tests: Demonstrate slowness of CSS::value_id_from_string 2023-01-14 15:43:27 -07:00
Ben Wiederhake
0687a75eaa LibWeb: Run tests in lagom if ENABLE_LAGOM_LIBWEB is set 2023-01-14 15:43:27 -07:00
Linus Groh
57dc179b1f Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
2022-12-06 08:54:33 +01:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00
Andreas Kling
81aa601637 Tests: Remove test-web
This was not used or maintained, and relied on InProcessWebView which we
need to get rid of.
2022-04-06 19:35:07 +02:00
Sam Atkins
82605e2dff Tests: Port TestHTMLTokenizer to Core::Stream 2022-03-10 12:04:22 -05:00
Linus Groh
1422bd45eb LibWeb: Move Window from DOM directory & namespace to HTML
The Window object is part of the HTML spec. :^)
https://html.spec.whatwg.org/multipage/window-object.html
2022-03-08 00:30:30 +01:00
Andreas Kling
8b2499b112 LibWeb: Make document.write() work while document is parsing
This necessitated making HTMLParser ref-counted, and having it register
itself with Document when created. That makes it possible for scripts to
add new input at the current parser insertion point.

There is now a reference cycle between Document and HTMLParser. This
cycle is explicitly broken by calling Document::detach_parser() at the
end of HTMLParser::run().

This is a huge progression on ACID3, from 31% to 49%! :^)
2022-02-21 22:00:28 +01:00
Adam Hodgen
b6eaefa87d LibWeb: Fix 'Comment end state' in HTML Tokenizer
Also, update the expected hash in the LibWeb TestHTMLTokenizer
regression test.

This is due to the "This comment has a few too many dashes." comment
token being updated.
2022-02-21 16:31:45 +01:00
Karol Kosek
fb5e2670d6 LibWeb: Fix highlighting HTML comments
Commit b193351a99 caused the HTML comments to flash when changing
the text cursor. Also, when double-clicking on a comment, the selection
started from the beginning of the file instead.

The following message was displaying when `TOKENIZER_TRACE_DEBUG`
was enabled:

    (Tokenizer::nth_last_position) Invalid position requested: 4th-last
    of 4. Returning (0-0).

Changing the `nth_last_position` to 3 fixes this. I'm guessing that's
because the parser is at that moment on the second hyphen of the `<!--`
string, so it has to go back only by three characters.
2022-02-14 12:50:44 +03:30
Timothy Flynn
7e63f0eb32 LibWeb: Update TestHTMLTokenizer's expected token hash
The output of the tokenizer changed in commit:
b193351a99.
2022-02-13 17:37:33 +00:00
Luke Wilde
f71f404e0c LibWeb: Introduce the Environment Settings Object
The environment settings object is effectively the context a piece of
script is running under, for example, it contains the origin,
responsible document, realm, global object and event loop for the
current context. This effectively replaces ScriptExecutionContext, but
it cannot be removed in this commit as EventTarget still depends on it.

https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object
2022-02-08 17:47:44 +00:00
davidot
9264f9d24e LibJS+Everywhere: Remove VM::exception() and most related functions
This commit removes all exception related code:
Remove VM::exception(), VM::throw_exception() etc. Any leftover
throw_exception calls are moved to throw_completion.
The one method left is clear_exception() which is now a no-op. Most of
these calls are just to clear whatever exception might have been thrown
when handling a Completion. So to have a cleaner commit this will be
removed in a next commit.

It also removes the actual Exception and TemporaryClearException classes
since these are no longer used.

In any spot where the exception was actually used an attempt was made to
preserve that behavior. However since it is no longer tracked by the VM
we cannot access exceptions which were thrown in previous calls.
There are two such cases which might have different behavior:
- In Web::DOM::Document::interpreter() the on_call_stack_emptied hook
  used to print any uncaught exception but this is now no longer
  possible as the VM does not store uncaught exceptions.
- In js the code used to be interruptable by throwing an exception on
  the VM. This is no longer possible but was already somewhat fragile
  before as you could happen to throw an exception just before a VERIFY.
2022-02-08 09:12:42 +00:00
mjz19910
1ef633472b Everywhere: Convert VM::call() to JS::call() 2022-01-23 15:24:45 +00:00
Andreas Kling
8b1108e485 Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Idan Horowitz
44555eb50a LibJS: Convert test-js/test-web/test-wasm to ThrowCompletionOr 2021-10-20 12:27:19 +01:00
Linus Groh
4d8912a92b LibJS: Convert to_string() to ThrowCompletionOr
Also update get_function_name() to use ThrowCompletionOr, but this is
not a standard AO and should be refactored out of existence eventually.
2021-10-13 09:55:10 +01:00
Andreas Kling
f67648f872 LibWeb: Rename HTMLDocumentParser => HTMLParser 2021-09-25 23:36:43 +02:00
Timothy Flynn
c59b97043e LibWeb: Use ErrorType::NotAnObjectOfType instead of NotA 2021-09-12 00:16:39 +02:00
Andrew Kaster
58797a1289 Tests: Remove all file(GLOB) from CMakeLists in Tests
Using a file(GLOB) to find all the test files in a directory is an easy
hack to get things started, but has some drawbacks. Namely, if you add
a test, it won't be found again without re-running CMake. `ninja` seems
to do this automatically, but it would be nice to one day stop seeing it
rechecking our globbed directories.
2021-09-02 09:08:23 +02:00
ovf
898b8ffcb6 LibWeb: Avoid assertion failure on parsing numeric character references 2021-07-28 18:32:22 +02:00
ovf
13c7d55320 LibWeb: Fix parsing of character references in attribute values 2021-07-27 00:03:43 +02:00
Max Wipfli
b6e995ca3c Tests: Use pointers in TestHTMLTokenizer to avoid copying HTMLTokens 2021-07-17 16:24:57 +04:30
Max Wipfli
918bde98b1 LibWeb: Hide implementation details of HTMLToken attribute list
Previously, HTMLToken would expose the Vector<Attribute> directly to
its users. In preparation for a future change, all users now use
implementation-agnostic APIs which do not expose the Vector directly.
2021-07-17 16:24:57 +04:30
Max Wipfli
2404ad6897 LibWeb: Fix assertion failure when tokenizing JS regex literals
This fixes parsing the following regular expression: /</g;

It also adds a simple script element to the HTMLTokenizer regression
test, which also contains that specific regex.
2021-07-15 01:47:22 +02:00
Max Wipfli
a9a54914bf Tests: Add comments to the HTMLTokenizer regression test file 2021-07-15 00:48:45 +02:00
Max Wipfli
5a44a0b9f4 Tests: Add a basic test suite for HTMLTokenizer
The test suite includes a few basic tests and a very crude regression
test, which just concatenates the to_string() of all tokens and checks
the String's hash to be equal. This relies on the format of
HTMLToken::to_string() to stay the same, which is not ideal.
2021-07-14 23:03:36 +02:00
Andreas Kling
ba9d5c4d54 LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
Gunnar Beutner
631d36fd98 Everywhere: Add component declarations
This adds component declarations so that users can select to not build
certain parts of the OS.
2021-06-17 11:03:51 +02:00
Ali Mohammad Pur
51c2c69357 AK+Everywhere: Disallow constructing Functions from incompatible types
Previously, AK::Function would accept _any_ callable type, and try to
call it when called, first with the given set of arguments, then with
zero arguments, and if all of those failed, it would simply not call the
function and **return a value-constructed Out type**.
This lead to many, many, many hard to debug situations when someone
forgot a `const` in their lambda argument types, and many cases of
people taking zero arguments in their lambdas to ignore them.
This commit reworks the Function interface to not include any such
surprising behaviour, if your function instance is not callable with
the declared argument set of the Function, it can simply not be
assigned to that Function instance, end of story.
2021-06-06 00:27:30 +04:30
Ali Mohammad Pur
d897abf4c2 LibWeb: Implement test-web in terms of LibTest/JavaScriptTestRunner
This deduplicates the test-js copy-ism :^)
2021-05-18 18:48:15 +01:00
Ali Mohammad Pur
a91a49337c LibCore+Everywhere: Move OpenMode out of IODevice
...and make it an enum class so people don't omit "OpenMode".
2021-05-12 11:00:45 +01:00
Brian Gianforcaro
10a594e6fe Tests: Fix install of test-js and test-web
When these were moved, there was a copy paste bug in the install
directives of both of these binaries.
2021-05-09 11:04:38 +02:00
Brian Gianforcaro
b390554ad8 Tests: Move Userland/Utilities/test-web to Tests/LibWeb 2021-05-08 00:04:10 +01:00