Commit graph

664 commits

Author SHA1 Message Date
sideshowbarker
b88fddbf47 FAQ: Add question and answer about ad blocker
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
2025-04-17 20:00:51 +02:00
Timothy Flynn
cef714732e Documentation: Remove now-obsolete patch from Servo's DevTools parser
They have fixed the exception mentioned here, but the script still has
trouble displaying all live-captured packets.
2025-04-17 12:12:50 -04:00
Timothy Flynn
83b6803b32 Documentation: Expand DevTools notes on creating a new Firefox profile
Add a command to create a new Firefox profile, and add `--new-instance`
to the command line when using it.
2025-04-17 12:12:50 -04:00
Andrew Kaster
6d11414957 LibWeb: Make storage of CSS::StyleValues const-correct
Now we consistently use `RefPtr<StyleValue const>` for all StyleValues.
2025-04-16 10:41:44 -06:00
Andrew Kaster
2a15b85658 Documentation: Add instructions for how to enable the Swift build 2025-04-14 16:04:08 -06:00
Ali Mohammad Pur
fac2ee4452 Meta: Add a link job pool with a configurable size
Parallel linking (esp. with bfd) uses a huge chunk of memory, make it
possible for users to limit the number of link jobs to at least
limit the pain.
2025-04-08 14:01:28 +02:00
Sam Atkins
5609649098 Documentation: Document Descriptors.json 2025-04-07 10:00:21 +01:00
Jelle Raaijmakers
3bc6870bbf Meta: Make the "Release" build type use -O3 and -flto
This doesn't affect the default preset, but the Distribution preset will
now compile with these flags instead.
2025-04-01 13:44:05 +02:00
Sam Atkins
88e11eea2d LibWeb: Implement functional pseudo-element parsing
"Functional" as in "it's a function token" and not "it works", because
the behaviour for these is unimplemented. :^)

This is modeled after the pseudo-class parsing, but with some changes
based on things I don't like about that implementation. I've
implemented the `<pt-name-selector>` parameter used by view-transitions
for now, but nothing else.
2025-03-25 07:54:13 +00:00
Jelle Raaijmakers
685cc1aae8 Everywhere: Remove Nix build support
A significant portion of reported build problems come from people trying
to build Ladybird with Nix, and it seems there's always something broken
for someone. The maintainers are currently not focused on supporting
Nix, and as a result PRs are not reviewed as well as they could have
been.

This removes all Nix-related files.
2025-03-24 17:22:08 +00:00
Sam Atkins
82b1d5537e Documentation: Document the new PseudoElements.json file 2025-03-24 09:49:50 +00:00
Andrew Kaster
ddcd48d12e Documentation: Update build instructions to remove -GXcode suggestion
Also some other assorted docs cleanup.
2025-03-19 20:42:16 -04:00
Sam Atkins
a28197669a LibWeb/CSS: Move property code from CSSStyleDeclaration to *Properties
CSSStyleDeclaration is a base class that's used by various collections
of style properties or descriptors. This commit moves all
style-property-related code into CSSStyleProperties, where it belongs.

As noted in the previous commit, we also apply the CSSStyleProperties
prototype now.
2025-03-19 13:53:00 +00:00
Sam Atkins
83bb92c4e0 LibWeb/CSS: Merge style declaration subclasses into CSSStyleProperties
We previously had PropertyOwningCSSStyleDeclaration and
ResolvedCSSStyleDeclaration, representing the current style properties
and resolved style respectively. Both of these were the
CSSStyleDeclaration type in the CSSOM. (We also had
ElementInlineCSSStyleDeclaration but I removed that in a previous
commit.)

In the meantime, the spec has changed so that these should now be a new
CSSStyleProperties type in the CSSOM. Also, we need to subclass
CSSStyleDeclaration for things like CSSFontFaceRule's list of
descriptors, which means it wouldn't hold style properties.

So, this commit does the fairly messy work of combining these two types
into a new CSSStyleProperties class. A lot of what previously was done
as separate methods in the two classes, now follows the spec steps of
"if the readonly flag is set, do X" instead, which is hopefully easier
to follow too.

There is still some functionality in CSSStyleDeclaration that belongs in
CSSStyleProperties, but I'll do that next. To avoid a huge diff for
"CSSStyleDeclaration-all-supported-properties-and-default-values.txt"
both here and in the following commit, we don't apply the (currently
empty) CSSStyleProperties prototype yet.
2025-03-19 13:53:00 +00:00
Timothy Flynn
3af63bc5a3 Everywhere: Replace miscellaneous references to the chrome process 2025-03-15 19:57:27 -04:00
Timothy Flynn
d94bb99c50 Documentation: Remove outdated comment on using the Qt UI for WPT
We now run the tests headlessly.
2025-03-15 19:57:27 -04:00
Timothy Flynn
9de6987134 Documentation: Update steps to enable DevTools via the UI 2025-03-15 19:09:40 +01:00
InvalidUsernameException
d0f80e1f05 Docs: Add note about Android port being broken 2025-03-10 12:58:42 -06:00
Timothy Flynn
38c1ac767d Documentation: Describe how to sniff the DevTools protocol with Firefox
For developing new LibDevTools features, it's easiest to snoop Firefox's
communication on the DevTools port to see what messages are being sent.
2025-03-04 15:42:39 -05:00
Timothy Flynn
491d1621d4 Documentation: Update the DevTools document with console.log support 2025-03-04 15:33:39 -05:00
Rok Povsic
d17bd2c5f1 Documentation: Add instructions to uncheck 'Enable profile' for Debug 2025-03-04 06:08:43 -07:00
fryssen
b62a4a1a89 Documentation: Fix a typo on line 52 in Devtools.md
Typo "communcation" replaced with communication on line 52.
2025-03-01 10:31:47 -05:00
Timothy Flynn
f943e0114e Documentation: Update the DevTools document with console support 2025-02-28 13:08:33 +01:00
sideshowbarker
18a160e0e9 Docs: Prefer closely matching explicit spec AO names 2025-02-27 07:40:19 +00:00
Sam Atkins
c33b465eb6 Documentation: Document how to add a new CSS property 2025-02-26 11:32:14 +00:00
Sam Atkins
c729c3fcee LibWeb/CSS: Add custom-ident blacklists to Properties.json
These excluded values use a similar notation to the ranges for numeric
types: `![foo,bar,baz]` to exclude `foo`, `bar`, and `baz`.
2025-02-26 11:22:47 +00:00
Timothy Flynn
05779fbd17 Documentation: Update the DevTools document with now-supported features 2025-02-24 12:05:29 -05:00
Timothy Flynn
c48641c13a Documentation: Add a document describing our DevTools server 2025-02-19 08:45:51 -05:00
Psychpsyo
49f65291dc Meta: Clarify what IDL files need adding to idl_files.cmake 2025-02-10 16:07:18 +00:00
Noah Bright
18b4dc2153 LibWeb: Update add_libweb_test.py to support Screenshot, Ref, and Layout
Changed the usage from `add_libweb_test.py test_name.html` to
`add_libweb_test.py test_name.html test_type` with no default,
and supports automatically generating input/output files in the
right directories for test types Screenshot, Text, Ref, and Layout.

Co-authored-by: Sam Atkins <sam@ladybird.org>
2025-01-13 14:25:26 +00:00
Ivan Zuzak
cb9e3d5c9b Documentation: Mention TODOs and FIXMEs as potential sources of work
As many other projects, Ladybird has more than a few TODO and FIXME
comments sprinkled throughout the codebase. These can be a great
inspiration or starting point for contributors looking for work, so
we mention them in the docs on contributing to the project.
2025-01-05 12:02:16 +01:00
Timothy Flynn
66732d2203 Meta: Switch to clang-format-19 as the standard formatter 2024-12-28 05:39:32 -08:00
Timothy Flynn
2ec97b4548 Meta: Update to clang-19 in CI and build instructions 2024-12-28 05:39:32 -08:00
Sam Atkins
eb11c35640 LibWeb/CSS: Use CSSNumericType for CalculationResult's numeric type
When we originally implemented calc(), the result of a calculation was
guaranteed to be a single CSS type like a Length or Angle. However, CSS
Values 4 now allows more complex type arithmetic, which is represented
by the CSSNumericType class. Using that directly makes us more correct,
and allows us to remove a large amount of now ad-hoc code.

Unfortunately this is a large commit but the changes it makes are
interconnected enough that doing one at a time causes test
regressions.

In no particular order:

- Update our "determine the type of a calculation" code to match the
  newest spec, which sets percent hints in a couple more cases. (One of
  these we're skipping for now, I think it fails because of the FIXMEs
  in CSSNumericType::matches_foo().)
- Make the generated math-function-parsing code aware of the difference
  between arguments being the same type, and being "consistent" types,
  for each function. Otherwise those extra percent hints would cause
  them to fail validation incorrectly.
- Use the CSSNumericType as the type for the CalculationResult.
- Calculate and assign each math function's type in its constructor,
  instead of calculating it repeatedly on-demand.

The `CalculationNode::resolved_type()` method is now entirely unused and
has been removed.
2024-12-21 18:14:28 +01:00
Jess
61fcccb104 Flake: Add and run formatter + Rename devshell
Add a formatter output to the flake (`nix fmt`), along with moving +
renaming the devshell so it will work by running `nix-shell` in the root
of the project.
2024-12-18 15:15:42 +00:00
sideshowbarker
afca902ea9 Docs: Explain how to do Debug builds without optimizations on
This change updates the (advanced) build docs to explain how to do a
Debug build with the CXX `-O0` option set — which tells the compiler to
build with no optimizations at all.

Otherwise, Debug builds use the `-Og` option — which, when trying to
check frame variables in a debugger can result in an error of this form:

> error: Couldn't look up symbols: __ZN2AK6Detail10StringBaseD2Ev
> Hint: The expression tried to call a function that is not present in
> the target, perhaps because it was optimized out by
> the compiler.
2024-12-11 17:31:52 -07:00
mkljczk
0b2fe008a3 Docs: Add perl-lib to build prerequisites for Fedora 2024-12-10 10:36:29 -08:00
sideshowbarker
aa2c296489 Docs: Add “Is [some particular site] usable in Ladybird” to FAQ 2024-12-08 15:30:03 +01:00
Sam Atkins
2c3c821305 LibWeb: Remove Realm parameter from property_initial_value()
We don't need the Realm to parse a style value.

Fixes #2720
2024-12-05 19:59:57 +01:00
Sam Atkins
b9994c83da Documentation: Update coding style rules about comments
The requirement to use // for comments wasn't described anywhere, so now
it is! Also updated the rule about TODO comments because we've allowed
those for a while now.
2024-12-04 22:22:24 +01:00
Pavel Shliak
2d0fdf804e Documentation: Minor rewordings in Porting.md 2024-12-04 10:26:24 +01:00
Ben Wiederhake
079fdf50d4 Meta+Documentation: Update config for QtCreator
We no longer use C or raw assembly (*.S), and generated include files
have moved to Build/release/Lagom/.
2024-12-02 09:45:32 +00:00
Jess
f4cc9c6426 Docs: Update Nixos build instructions 2024-12-01 13:27:59 -05:00
rmg-x
59c8e0cd5a Documentation: Remove SerenityOS references where appropriate 2024-11-23 14:29:48 +01:00
Feng Yu
570c5f8df2 Documentation: Fix broken link in README 2024-11-21 10:42:45 +01:00
Nicolas Ramz
e98e9b8e81 Documentation: Fix typo in Testing markdown 2024-11-20 15:48:13 +01:00
Shannon Booth
f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Luke Wilde
aacf9b08ed LibWeb: Generate IDL attributes for all supported CSS properties
The CSSOM spec tells us to potentially add up to three different IDL
attributes to CSSStyleDeclaration for every CSS property we support:
- A camelCased attribute, where a dash indicates the next character
  should be uppercase
- A camelCased attribute for every -webkit- prefixed property, with the
  first letter always being lowercase
- A dashed-attribute for every property with a dash in it.

Additionally, every attribute must have the CEReactions and
LegacyNullToEmptyString extended attributes specified on it.

Since we specify every property we support with Properties.json, we can
use that file to generate the IDL file and it's implementation.

We import it from the Build directory with the help of multiple import
base paths. Then, we add it to CSSStyleDeclaration via the mixin
functionality and inheriting the generated class in
CSSStyleDeclaration.
2024-11-14 19:50:22 +01:00
Timothy Flynn
db47cc41f8 Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00