1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 16:55:09 +00:00
Commit graph

166 commits

Author SHA1 Message Date
Rafał Babiarz
4fcdbd57e9 Base: Add test page for Web Storage API 2022-05-28 23:54:06 +01:00
Sam Atkins
7c91fda088 LibWeb: Allow multiple text-decoration-lines
The spec grammar for `text-decoration-line` is:

`none | [ underline || overline || line-through || blink ]`

Which means that it's either `none`, or any combination of the other
values. This patch makes that parse for `text-decoration-line` and
`text-decoration`, stores the results as a Vector, and adjusts
`paint_text_decoration()` to run as a loop over all the values that are
provided.

As noted, storing a Vector of values is a bit wasteful, as they could be
stored as flags in a single `u8`. But I was getting too confused trying
to do that in a nice way.
2022-04-14 21:54:10 +02:00
Simon Wanner
5ebcb15c92 Base: Add a test page for CSS font-face 2022-04-09 23:48:18 +02:00
Enver Balalic
747f347b75 LibWeb: Implement flex reverse layouts
This builds on the work done by implementing the flex order CSS
property and implements flex reverse layouts by just reversing
the order and the items within each order bucket.
2022-04-02 19:01:14 +02:00
Enver Balalic
58398b1e12 LibWeb: Implement the flex order CSS property
Adds support for the flex order property and a test page for it
on the browser welcome page.
2022-04-02 18:40:32 +02:00
Linus Groh
b64080a913 Base: Add a <noscript> test page 2022-03-31 17:08:38 +02:00
Enver Balalic
8b4d09932a LibWeb: Fix sizing of flex child that has flex-basis 0
Before if an element didn't have a main min size we would clamp
it to a literal zero. If that element also had a flex-basis 0
it's width would end up being 0.
This patch adds a determine_min_main_size_of_child function that
will calculate the minimum main size for the box based on the
content of the box.
We use the result of that function now instead of clamping
the element main min size to 0.

This also adds one more box to the flex.html test page, which is
the same flex: 0 0 0 box but with flex-direction: column.
2022-03-30 21:16:47 +02:00
Daniel Glazman
fdf1c3c2f1 LibWeb: More tests for attribute selectors 2022-03-29 18:53:20 +02:00
Karol Kosek
55ac11a0ae Base: Add inline properties to custom-properties test page 2022-03-26 17:30:49 +01:00
Andreas Kling
6cffabef03 LibWeb: Support CSS vertical-align values "top" and "bottom" 2022-03-24 22:57:01 +01:00
Sam Atkins
c914e732d2 LibWeb+Base: Fix An+B of foo parsing
When I wrote the An+B parser, it was guaranteed to have no
non-whitespace tokens after it. This is no longer true with the `of
foo` syntax, so this patch corrects the logic when there is no `+B`
segment.

This makes this case shown on Twitter work correctly. :^)
https://twitter.com/simevidas/status/1506657566012678151
2022-03-24 18:08:45 +01:00
Sam Atkins
4d8789b173 Base: Add a text-shadow test page 2022-03-24 18:08:34 +01:00
Simon Wanner
bc5d39493b Base: Add a test page for CSS transforms
This also acts as a little stress test for flexbox layout :^)
2022-03-22 02:06:21 +01:00
Sam Atkins
4827092554 Base: Add a :focus/:focus-within test page 2022-03-20 17:35:31 +00:00
Daniel Lemos
3eb6016dda LibWeb: Add some default style for <textarea> elements and a test 2022-03-18 19:59:19 +01:00
Sam Atkins
0e4c35b4b2 Base: Add of foo tests to nth-child and nth-last-child test pages
Also split the selector-list up for easier debugging.
2022-03-18 11:34:02 +01:00
Sam Atkins
47eb4b2db7 Base: Add a test page for the CSS :where() selector
This behaves identically to :is() except for specificity, so this test
page is identical to the other one. It's not because I'm lazy. :^)
2022-03-18 11:34:02 +01:00
Sam Atkins
88d218721b Base: Add nested lists to list test-page 2022-03-18 11:34:02 +01:00
Sam Atkins
ca8540aba2 Base: Correct the :not() test page's title
Oops!
2022-03-18 11:34:02 +01:00
Sam Atkins
0d01097a54 Base: Add a test page for the CSS :is() selector 2022-03-18 11:34:02 +01:00
Simon Wanner
1f9d76c7b8 LibWeb: Invalidate styles after CSSImportRule loads
This replicates the behavior of StyleSheetList::add_sheet, making sure
the rules added by the imported style sheet are applied.
2022-03-14 22:22:53 +01:00
Sam Atkins
2dad3dca9a Base: Add ratio tests to media-query test page
Note that only the first test actually functions currently.
Single-number ratios instead get parsed as a `<number>`, and will do
until the parser gets smarter. (The alternative, where all
single-numbers get parsed as `<ratio>`, does make the tests succeed,
but numbers are more common than ratios so I have given numbers
preference for now.)

Also simplified the styling and text a bit. Now, red = fail, green =
success. No more "unstyled = fail" stuff.
2022-03-07 13:42:25 +01:00
Timothy Flynn
8156ec5da8 Base: Replace setInterval test page with a more thorough timer test page
Ensure we test both setTimeout and setInterval (and their cancellation
methods), and test scenarios such as raising exceptions in the callback,
passing extra arguments, etc.
2022-03-04 19:51:26 +01:00
Sam Atkins
973f3c3642 LibWeb: Correct handling of negative step values in nth-foo() selectors
This should be 1% on Acid3. :^)

Added the `-5n+3` case to all `nth-of-whatever()` selector test pages,
so we can easily check that it works.
2022-03-02 17:39:57 +01:00
Sam Atkins
e65ff4b8d1 Base: Remove my copyright from this HTML file
I didn't notice that CLion had auto-generated this, oops! As wonderful
as my web design skills are, I don't actually want to enshrine my name
at the top of this file for posterity.
2022-03-01 15:14:18 +00:00
Sam Atkins
5563381b28 Base: Make it obvious which pseudo-element tests are unimplemented
(Sorry Linus!)
2022-02-28 16:50:19 +01:00
Sam Atkins
2e23cce557 Base: Add :nth-of-type and :nth-last-of-type test pages 2022-02-26 15:30:24 +01:00
Sam Atkins
8411ff3f14 fixup! Base: Add a pseudo-element test page 2022-02-25 19:35:34 +01:00
Sam Atkins
a9ad72cc0f Base: Add a pseudo-element test page 2022-02-25 19:35:34 +01:00
Karol Kosek
4e50f8a8b7 LibWeb+Base: Parse font-style CSS property 2022-02-20 11:50:38 +01:00
Sam Atkins
7880718fa8 LibWeb: Implement @supports selector(.foo)
This is defined in
https://www.w3.org/TR/css-conditional-4/#at-supports-ext which just
became a CR. :^)
2022-02-19 19:33:54 +01:00
Maciej
3e1c1c0b16 LibWeb: Add support for CSS image-rendering property
Currently only "auto" and "pixelated" values are supported.
2022-02-19 11:38:46 +01:00
Adam Hodgen
b9b24cb1c1 Base: Add <input> test page 2022-02-18 01:48:51 +01:00
serenitydev
b5d891ed6a Base+LibWeb: Add test case for Workers on welcome homepage 2022-02-17 22:45:21 +01:00
Rafał Babiarz
d159511d85 Base: Add test page for progress bar element 2022-02-16 15:34:08 -05:00
Timothy Flynn
4f19deb13b LibWeb: Implement reverse lookup to labels from their labelable nodes
This enables, for example, clicking on the check box, dragging the mouse
over to the label, releasing the mouse to act as a click on the check
box.

This was implemented for labels / labelable nodes with the "for"
attribute already. This implements the same for labelable nodes that are
inside the label.
2022-02-16 19:18:57 +01:00
Sam Atkins
50cc008efd Base: Add relative-length tests to media-query test page 2022-02-15 23:31:42 +01:00
Sam Atkins
2fad940b0b LibWeb: Add SVG <polygon> element and test case :^) 2022-02-11 21:38:27 +01:00
Sam Atkins
116a1f485c LibWeb: Add SVG <polyline> element and test case :^) 2022-02-11 21:38:27 +01:00
Sam Atkins
17912330c4 LibWeb: Add SVG <line> element and test case :^) 2022-02-11 21:38:27 +01:00
Sam Atkins
3a1a35ef8f LibWeb: Add SVG <ellipse> element and test case :^) 2022-02-11 21:38:27 +01:00
Sam Atkins
21bdcee3c3 LibWeb: Add SVG <circle> element and test case :^) 2022-02-11 21:38:27 +01:00
Sam Atkins
1dde6a0a2b LibWeb: Add SVG <rect> element and test case :^) 2022-02-11 21:38:27 +01:00
Sam Atkins
b51f428165 LibWeb: Parse multiple box-shadows :^)
Again, we don't yet render these (we render nothing) but this gets rid
of a decent amount of CSS spam on Discord.
2022-02-08 17:45:51 +01:00
Sam Atkins
c547bed13b LibWeb: Reorganize box-shadow parsing code
The pattern we've adopted for other multi-value properties is to run in
a loop like this, since that makes it easier to cater for values
appearing in different orders.
2022-02-08 17:45:51 +01:00
Andreas Kling
6c31f6c073 Base: Add a browser test page that dumps out all mouse events 2022-02-07 13:28:59 +01:00
Ali Mohammad Pur
d66c513131 Base: Replace the WebSocket demo target URL with a working one
websocket.org was shutdown somewhere in late 2021, switch to
websocket.events to make the demo work.
2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
8339415939 Base: Format the WebSocket demo page with prettier 2022-02-06 13:10:10 +01:00
Andreas Kling
04bec7a4f5 LibWeb: Remove CSS::StyleInvalidator in favor of dirtying + lazy update
Style updates are lazy since late last year, so the StyleInvalidator is
actually hurting us more than it's helping by running the entire CSS
selector machine on the whole DOM for every attribute change.

Instead, simply mark the entire DOM dirty and let the lazy style update
mechanism run *once* on next event loop iteration.
2022-02-05 22:50:39 +01:00
Sam Atkins
8bd1854406 LibWeb+Base: Enable calc() for font-weight property :^)
Modified the test-page because FontDatabase looks for exact font-weight
matches, so requesting weight 800 in a font that only has 700, causes
it to return the default font instead. So, we ask for 700 here.

The actual fix is to improve our font-matching but I am trying not to
get distracted today. :^)
2022-02-04 13:52:02 +01:00