Commit Graph

53639 Commits

Author SHA1 Message Date
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
Andrew Kaster
8e605fb0f9 Meta+LibWeb: Make WPT run script runnable anywhere, remove apt installs
We should be documenting required pacakges elsewhere and installing them
in the setup step of CI.

This also fixes a problem where the run script would fail if you already
had a cloned wpt directory.
2023-08-19 23:50:29 +02:00
Sam Atkins
81b9f3ec15 LibWeb: Make ResolvedCSSStyleDeclaration method infallible
Specifically, `style_value_for_property()` and some supporting helper
functions.
2023-08-19 17:34:22 +02:00
Sam Atkins
eca144a75e LibWeb: Make absolutizing StyleValues infallible 2023-08-19 17:34:22 +02:00
Sam Atkins
e177cef8ff LibWeb: Make parse_css_value_for_properties() return Optional
Signalling failure with a null `PropertyAndValue::style_value` is weird.
2023-08-19 17:34:22 +02:00
Sam Atkins
2038cb3c81 LibWeb: Make CSS math function parsing infallible 2023-08-19 17:34:22 +02:00
Sam Atkins
28c2836c24 LibWeb: Make external StyleValue-parsing methods infallible 2023-08-19 17:34:22 +02:00
Sam Atkins
9e1bbfbd37 LibWeb: Make internal StyleValue-parsing methods infallible 2023-08-19 17:34:22 +02:00
Sam Atkins
8a8cc18cf4 LibWeb: Make StyleValue constructors infallible 2023-08-19 17:34:22 +02:00
Aliaksandr Kalenik
b2b99aba95 LibWeb: Use Core::Timer for cursor blink timer in BrowsingContext
Using `Core::Timer` that doesn't implicitly convert callback to
`JS::SafeFunction` fixes the bug when `BrowsingContext` is never
destroyed because of cyclic dependency between callback and
`BrowsingContext`.
2023-08-19 16:41:53 +02:00
Sam Atkins
dfb5ba0e2c LibCore: Prevent duplicate ArgsParser option names
Inspired by #20641, detect when adding an option that its long and short
names are both unique. If they are not, print a warning and crash.
2023-08-19 16:27:53 +02:00
Hans Joachim Desserud
2d31903e07 Ports: Add flare-game
Add a playable campagin to flare-engine
2023-08-19 15:51:50 +02:00
Hans Joachim Desserud
54ea999373 Ports: Add flare-engine
Action RPG engine
2023-08-19 15:51:50 +02:00