Commit graph

53651 commits

Author SHA1 Message Date
Andreas Kling
90e95d38d7 LibWeb: Make align-items: normal behave like stretch on flex items
CSS-ALIGN-3 tells us that `normal` behavior inside flex containers is
simply to behave as `stretch` so this patch makes them behave the same
inside FFC.

Furthermore, we change the `align-items` initial value to `normal`,
matching other engines.
2023-08-20 19:37:50 +02:00
Aliaksandr Kalenik
d05be0d504 LibWeb: Fix Request::visit_edges to actually visit m_body
This fixes bug introduced in bdd3a16b16
that `m_body` is not visited because `BodyType` variant has
`JS::NonnullGCPtr` instead of `JS::GCPtr`.
2023-08-20 19:08:37 +02:00
Andi Gallo
769f11f9ae LibWeb: Implement table missing cells fixup
Fixes #19936.
2023-08-20 18:38:15 +02:00
Andi Gallo
4c0816b002 LibWeb: Move table grid slots functionality to separate module 2023-08-20 18:38:15 +02:00
Sam Atkins
6367b6a3d0 LibWeb: Use x-macro for StyleValue::Type instead of manual boilerplate
This saves us from having to manually write these every time we add a
new type of StyleValue:

- bool is_foo() const;
- FooStyleValue const& as_foo() const;
- FooStyleValue& as_foo();
2023-08-20 17:59:36 +02:00
Sam Atkins
f7f7ab9775 LibWeb: Forward-declare RevertStyleValue 2023-08-20 17:59:36 +02:00
Sam Atkins
fae05faf7f LibWeb: Rename StyleValue::Type::Url -> URL
This matches the URLStyleValue name. (This will be important shortly.)
2023-08-20 17:59:36 +02:00
Aliaksandr Kalenik
01cc14714e LibWeb: Implement getting "inclusive ancestor navigables" of a document 2023-08-20 16:07:24 +02:00
Andreas Kling
e211f6c925 LibWeb: Implement getting "ancestor navigables" of a document 2023-08-20 16:07:24 +02:00
Aliaksandr Kalenik
c8271ac9e6 LibWeb: Start fleshing out "navigate to a fregment" for Navigables 2023-08-20 16:06:56 +02:00
Aliaksandr Kalenik
d5adb7f10c LibWeb: Implement "finalize a same-document navigation" 2023-08-20 16:06:56 +02:00
Aliaksandr Kalenik
37f5253ec9 LibWeb/Layout: Add support for grid-auto-flow in GFC 2023-08-20 15:36:18 +02:00
Andreas Kling
703c2bb06e LibWeb: Add support for parsing grid-auto-flow CSS property
Co-Authored-By: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2023-08-20 15:36:18 +02:00
Sam Atkins
1a5533e528 LibWeb: Tokenize CSS numbers as doubles
Every later stage uses doubles, so dropping that precision right at the
start of parsing is a little silly. :^)
2023-08-20 14:25:18 +01:00
Sam Atkins
c20df751c9 LibWeb: Use correct NumericLimits in CalculatedStyleValue 2023-08-20 14:25:18 +01:00
Sam Atkins
1feacd4b52 LibWeb: Use doubles for CSS dimension types
Avoid unintentionally converting between float and double multiple times
by just using double everywhere. Also, remove the unused `int` versions
of their constructors.
2023-08-20 14:25:18 +01:00
Sam Atkins
95f80bc65b LibWeb: Use double in CSS Token
It was already a double internally, so let's expose that and get rid of
some of clangd's red wiggly underlines.
2023-08-20 14:25:18 +01:00
Shannon Booth
9cf5b67162 LibWeb: Return a HTMLFormControlsCollection from HTMLFormElement element
Instead of a HTMLCollection
2023-08-20 11:04:03 +02:00
Shannon Booth
27dd2a40ad LibWeb: Implement HTMLFormControlsCollection
This collection is used in the form element for when element lookup
yields multiple elements.
2023-08-20 11:04:03 +02:00
Shannon Booth
daefe744ba LibWeb: Implement RadioNodeList
This interface is used in the interface for HTMLFormControlsCollection
as a live view over its matching elements.

Currently the "value" attribute for this interface is left
unimplemented.
2023-08-20 11:04:03 +02:00
Shannon Booth
c2bf391f81 LibWeb: Don't mark LiveNodeList as final
This is to accommodate for adding the RadioNodeList interface which
returns a live list of elements.
2023-08-20 11:04:03 +02:00
Shannon Booth
15944c5b26 LibWeb: Const qualify HTMLCollection::length 2023-08-20 11:04:03 +02:00
Andrew Kaster
041d5bff91 Meta: Port changes to gn build
This commit includes gn changes for the following commits:
625aac2367
8451c4d91c
8fcf42f684
9ba4c33940
1d6c2cb287
8e5b2907f6
d68433653a
2023-08-19 21:05:06 -06:00
Andrew Kaster
863fad0e32 Meta: Add ccache compiler launcher to gn build 2023-08-19 21:05:06 -06:00
Andrew Kaster
50383d318c Toolchain: Add a script to build GN from source 2023-08-19 21:05:06 -06:00
Andrew Kaster
0acd87954b Meta: Add Serenity Kernel to gn build 2023-08-19 21:05:06 -06:00
Andrew Kaster
f4e37c8ad4 Meta: Add serenity toolchain to gn build 2023-08-19 21:05:06 -06:00
Andrew Kaster
f8e1544f41 StateMachineGenerator: Pass output file as an argument
This allows us to avoid shell redirection to create output files, and
will help with the GN build.
2023-08-19 21:05:06 -06:00
Andrew Kaster
f87a488b22 AK: Silence -Wimplicit-const-int-float-conversion in clamp_to_int 2023-08-19 21:05:06 -06:00
Andrew Kaster
871485cc0d Meta: Port fe672989a9 to gn build 2023-08-19 21:05:06 -06:00
0GreenClover0
f6c3ec3742 LibWeb: Add Base::apply_presentational_hints call to <symbol> element 2023-08-20 05:03:27 +02:00
Andreas Kling
d296992fb3 LibWeb: Make StackingContext point to paint tree instead of layout tree
Eventually we should not need the layout tree for anything when painting
and this code will only look at the paint tree. For now, this is just
another step in that direction.
2023-08-20 05:02:59 +02:00
Andreas Kling
1e0ea45fe5 LibWeb: Make sure that SVG use and symbol elements get paintables
I'm about to make StackingContext traverse the paintable tree instead of
actually traversing the layout tree, and it turns out we were not
creating paintables for these SVG elements.

Also switch them to Layout::Box instead of the default InlineNode to
make the trees look a bit less weird. Ultimately, we should do something
specialized for these subtrees, but for now this'll do.
2023-08-20 05:02:59 +02:00
Andreas Kling
3d7c880a42 LibWeb: Give DOM::Node a direct pointer to its Paintable
Instead of going via the layout tree.
2023-08-20 05:02:59 +02:00
Andreas Kling
25375bf1d5 LibWeb: Make Document::paintable() return a ViewportPaintable 2023-08-20 05:02:59 +02:00
Andreas Kling
8bb275f2ea LibWeb: Move painting logic from Layout::Viewport to ViewportPaintable 2023-08-20 05:02:59 +02:00
Andreas Kling
c01c4b41e2 LibWeb: Add ViewportPaintable to represent viewports in the paint tree
This patch just adds the new root paintable and updates the tests
expectations. The next patch will move painting logic from the layout
viewport to the paint viewport.
2023-08-20 05:02:59 +02:00
Andreas Kling
136ac1a6a5 LibWeb: Add virtuals to check if Paintable is PBox or PWithLines
Instead of inferring the type of paintables by looking at the type of
their origin in the layout tree, let's ask them directly.
2023-08-20 05:02:59 +02:00
Andreas Kling
6b3af92262 LibWeb: Give paintables their own pointer to the BrowsingContext 2023-08-20 05:02:59 +02:00
Andreas Kling
e67ac16862 LibWeb: Give Paintable its own pointer to the corresponding DOM node
Instead of going through the layout node's DOM pointer.
2023-08-20 05:02:59 +02:00
Andreas Kling
216bd513fa LibWeb: Make the paint tree a proper standalone tree
Until now, paint trees have been piggybacking on the layout tree for
traversal, and paintables didn't actually have their own parent/child
pointers.

This patch changes that by making Paintable inherit from TreeNode, and
adding a new pass to LayoutState::commit() where we recursively build
the new paint tree.
2023-08-20 05:02:59 +02:00
Andreas Kling
4d4dbacfc3 LibWeb: Remove all the unused functions from TreeNode 2023-08-20 05:02:59 +02:00
Andreas Kling
2f3e7187ca LibWeb: Remove unused TreeNode::is_child_allowed()
This is not used by any of the TreeNode template users.
2023-08-20 05:02:59 +02:00
Sebastian Zaha
a0fb1478bf Meta: Add options for lldb and gdb output to gn
This makes it possible to specify (instead of is_debug) a more
specialized is_debug_lldb or is_debug_gdb, so that clang outputs the
proper symbols. (For lldb this fixes issues with formatting by
setting -fstandalone-debug)
2023-08-19 20:09:26 -06:00
Sebastian Zaha
1b395a3df9 Meta: Port GCC compile option from cmake to gn
The clang build is very noisy without
-Wno-implicit-const-int-float-conversion
2023-08-19 20:09:26 -06:00
Sebastian Zaha
b4df4d66dc Meta: Port recent build changes to gn build
This ports the following commits:

f76c614a84
ddbe6bd7b4
2eaa528a0e
1b40bf9783
9f6ceff7cf
52d6df5ee5
9e22f01eba
bf4e2f3e9c
da2cd73bcf
2023-08-19 20:09:26 -06:00
Andrew Kaster
4c26b0b047 Tests: Convert WebDriver patch to a git patch and clean up assumptions
Instead of assuming that the WebDriver binary is in PATH or the two
most common build directories for our scripts, add a command line
argument to the script to pass a WebDriver binary.
2023-08-20 03:20:54 +02:00
Niklas Poslovski
9c3b0b367a Ladybird: Link libnsl and libsocket to RequestServer on Solaris 2023-08-19 18:25:56 -06:00
Andrew Kaster
326e8a0a33 LibWeb: Only update /etc/hosts for WPT if required lines are not present 2023-08-19 17:49:04 -06:00
Andrew Kaster
99499a6fae Ladybird+Meta: Add ctest to run WPT in the Integration configuration
By running ctest -C Integration -R WPT, you can run WPT. Adding just
-C Integration will run all other tests *and* the WPT test.

Also add support for ./Meta/serenity.sh test lagom WPT to serenity.sh
2023-08-19 23:50:29 +02:00