Commit graph

269 commits

Author SHA1 Message Date
Kenneth Myhra
c9ee1ad5ae LibWeb: Add multipart/form-data demo to formdata.html 2023-04-05 09:43:52 +01:00
MacDue
0abd469d24 Base: Add background-position-x/y test page 2023-04-03 07:10:33 +02:00
MacDue
d38392d416 Base: Use radio button groups on accent-color demo page 2023-03-26 15:09:57 +02:00
MacDue
bcfe275563 Base: Add two more radio buttons to HTML input test page
You can't really test radio buttons with just one button.
2023-03-26 15:09:57 +02:00
MacDue
5ba7449342 Base: Add radio buttons to the accent-color demo page 2023-03-24 09:57:48 +00:00
MacDue
4b3c38e111 Base: Add accent-color demo page
Currently this just has checkboxes, though I intend to add support
for more things later :^)
2023-03-23 08:27:51 +00:00
Tom
52e45fb6fa LibWeb+Base: Fix row-height bug in Grid when there is a column gap
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.
2023-03-10 18:20:27 +01:00
Kenneth Myhra
beba05471c Base: Use string interpolation for all log outputs in formdata.html 2023-03-08 18:57:36 +00:00
Kenneth Myhra
e5a396ce28 Base: Show of iterating over FormData.{keys(),values(),entries()} 2023-03-08 18:57:36 +00:00
Kenneth Myhra
2f20f16292 Base: Add a test using FormData and FormDataEvent 2023-02-12 00:18:09 +00:00
MacDue
bcc4e5ee0b Base: Add a test page for canvas patterns 2023-02-03 20:36:21 +01:00
MacDue
8272cfc9f3 Base: Add a radial gradient with transparent end stops canvas demo 2023-01-23 10:03:54 +00:00
MacDue
9b35e3d95b Base: Add test page for canvas gradients 2023-01-22 18:15:52 +01:00
martinfalisse
173cc5e6e0 Base: Add tests for grid-template-areas and min/max-content 2023-01-21 14:35:00 +01:00
Cameron Youell
ce1b7e63c9 LibWeb: Fix error page icon outside of serenity 2023-01-18 14:46:13 +00:00
Liav A
71f275b5ad Tests/LibGfx: Add tests for compressed TGA images 2023-01-15 12:43:03 +01:00
Liav A
6bf2460231 Tests/LibGfx: Add tests for top-left and bottom-left TGA images 2023-01-15 12:43:03 +01:00
Andreas Kling
80ce0419b6 LibWeb: Fix abspos flex container with height:auto getting zero height
When laying out abspos boxes, we compute the height twice: before and
after the inside of the box has been laid out.

The first pass allows percentage vertical values inside the box to be
resolved against the box's height. The second pass resolves the final
used value for the height of the box itself.

In cases where the box height depends on the results of inside layout,
we were incorrectly setting the box to having a definite zero height.
This led to incorrect results when sizing an abspos flex container,
since the FFC sizes containers (in row layouts) based on whether the
container has a definite height.

To avoid this problem, this patch adds an enum so we can differentiate
between the two abspos height computation passes. If the first pass
discovers a dependency on the inside layout, we simply bail out of
computing the height, leaving it as indefinite. This allows the FFC
to size its container correctly, and the correct height gets set by
the second pass.
2023-01-06 21:12:55 +01:00
Sam Atkins
33b6ac0306 Base: Add some unlisted test pages to welcome.html 2023-01-05 18:54:33 +00:00
martinfalisse
ba5e0607fd Base: Add test page for table 2023-01-03 20:02:47 +01:00
Aliaksandr Kalenik
8259ff12bd LibWeb: Margin bottom collapsing between parent and last child 2022-12-30 14:21:19 +01:00
Aliaksandr Kalenik
7088a87f49 LibWeb: Margin top collapsing between parent and first child
Implement collapsing of a box margin-top and first in-flow
child margin-top by saving function that updates y position
of containing block inside BlockMarginState and then for
every child until "non-collapsed through" child is reached
y position of containing block is updated by calling
update_box_waiting_fox_final_y_position_callback.
2022-12-30 14:21:19 +01:00
Tom
bb062e50b0 LibWeb: Don't expand grid for {row,column} spans
Fixes a bug where when you had spans that that were bigger than the
grid, would create enough tracks to accomodate them. When a fixed
position is given, there should be at a minimum a row/column available
for the track. The span will be truncated if there is no space for it
later.
2022-12-28 15:04:58 +01:00
Tom
9d5049230c LibWeb: Clamp {row,column} spans if outside of grid
A bug was found where grid items were being drawn outside of the grid if
the item had a large span and the grid was defined as having gaps
between the rows/columns.

This was caused by an erroneous calculation of the
{row,column}_{start,span} properties.
2022-12-26 16:02:48 +01:00
Andreas Kling
7a51e846b2 Base: Add two HTML test pages for DOM cloneNode() functionality 2022-12-14 15:21:48 +01:00
MacDue
cdf6e568f6 Base: Add some repeating-radial-gradient() HTML examples 2022-12-03 09:06:51 -05:00
Timothy Flynn
4a30446999 LibWeb: Support displaying HTMLInputElement placeholder values
This adds support for parsing the ::placeholder pseudo-element and
injecting an anonymous layout node with that element when the input
element's data is empty.
2022-12-01 11:18:11 -05:00
MacDue
cdbb2cc917 Base: Add some radial-gradient() HTML examples 2022-11-30 14:24:04 +00:00
martinfalisse
f351418a1e LibWeb: Include tests for grid track spans
Include tests for grid track spans when given for automatically-placed
grid tracks in the grid-*-end properties.
2022-11-29 19:27:31 +01:00
Andreas Kling
e3b8a8f7c8 LibWeb: Treat unresolvable percentage width on inline-block as auto 2022-11-28 19:14:05 +01:00
Andreas Kling
c884aa3f25 Base: Add a test for [SameObject] behavior in LibWeb 2022-11-25 22:49:59 +01:00
martinfalisse
0c577b4b3b Base: Add test for multiple line names in CSS Grid 2022-11-21 21:48:25 +00:00
Timothy Flynn
894bddf62c Base: Add a simple test page for window.prompt
The window prototypes alert, confirm, and prompt must "pause" execution
until a response is received from the user. This test page is meant to
ensure that a timeout queued before a prompt is not executed until after
that prompt is closed.
2022-11-16 17:23:56 +00:00
martinfalisse
70559e9d14 Base: Add test for grid-gap and auto-fit 2022-11-16 00:53:00 +01:00
MacDue
d5cf403f70 Base: Add some repeating-conic-gradient() test cases 2022-11-07 13:13:22 +00:00
martinfalisse
0586730a92 Base: Add tests for grid gap 2022-11-07 10:06:07 +01:00
martinfalisse
13ac078202 Base: Add test for sizing children of grid 2022-11-06 13:23:33 +01:00
MacDue
d66b219453 Base: Add some extra conic-gradient() test cases
This adds a test of a conic-gradient() with just a center position
and no starting angle.

This also adds a gradient that gives each quadrant a different color,
this is very sensitive to the center position being correct.
2022-11-06 01:42:55 +00:00
Andreas Kling
7809cc6557 LibWeb: Use preferred flex item sizes as min/max-content contribution
When a flex item has a specific preferred size, that size should be its
contribution to the containers intrinsic sizes.

This fixes an issue on Patreon where the logo would cover the entire
viewport since the SVG had a large intrinsic size but the flex item
containing it had a small specified size in CSS.
2022-11-05 11:42:19 +01:00
Timothy Flynn
9564f04fa6 Base: Add a disabled button to the button.html test page 2022-11-03 19:15:43 +00:00
MacDue
d6334dcab1 Base: Add some conic-gradient() HTML examples 2022-11-01 23:07:05 +00:00
martinfalisse
937fcfc75c LibWeb+Base: Use line names for positioning grid items
When there are grid tracks with line names, use these to resolve
line-names passed to positioned grid items.
2022-11-01 11:19:41 +01:00
Smrtnyk
ae950816b5 Base: Add SameSite cookie test cases 2022-10-22 18:17:01 +02:00
martinfalisse
8653903bee Base: Update display grid test page
Update the tests after adding minmax(), auto-fill and auto-fit
functionality to the LibWeb implementation of the CSS Grid.
2022-10-15 16:04:01 +02:00
Pavel
db23e2d546 Base: Add test page for exceptions
Created a simple page where you can check
that the exceptions appear in the JS console.
2022-10-15 01:25:12 +02:00
martinfalisse
f538dc2fae LibWeb+Base: Add grid repeat() functionality
Add ability to use values passed to grid-template-columns and
grid-template-rows for CSS Grid layout within a repeat() function.

E.g. grid-template-columns: repeat(2, 50px); means to have two columns
of 50px width each.
2022-10-09 12:40:18 +01:00
martinfalisse
e537035cc6 LibWeb+Base: Deal with column-spans greater than implicit grid
When the indicated column-span is greater than the implicit grid (like
in cases when the grid has the default size of 1x1, and the column is
supposed to span any number greater than that), then previously were
crashing.
2022-10-08 17:26:41 +02:00
MacDue
5a832c0326 Base: Add example backdrop-filter using saturate() 2022-10-07 13:08:24 +01:00
martinfalisse
84290ed7c8 Base+LibWeb: Make sure grid positions don't cause out of bounds
Add some tests to the test page to make sure that different combinations
of GridTrackPlacement don't cause out of bounds issues.
2022-10-06 21:16:01 +02:00
martinfalisse
56f50c9cde Base+LibWeb: Deal with zero-positioned grid items
If a grid item has as its position value a 0 then it should be
invalidated.
2022-10-06 21:16:01 +02:00