1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00
Commit graph

69173 commits

Author SHA1 Message Date
Andrew Kaster
30d01f7920 Devcontainer: Update to llvm 20 2025-05-14 19:43:52 -04:00
Andrew Kaster
096bd2369a Documentation: Remove instructions for OpenIndiana
No one has tried to build Ladybird on this Solaris fork since the
fork, and it doesn't have any vcpkg support.
2025-05-14 22:15:40 +01:00
Andrew Kaster
cd06939325 Documentation: Remove instructions for Haiku
No one has tried to build Ladybird on Haiku since the
fork, and it doesn't have any vcpkg support.
2025-05-14 22:15:40 +01:00
stelar7
22a7e0795a LibWeb/IDB: Use helper method for checking transaction mode 2025-05-14 17:17:29 +02:00
stelar7
c8e1b24864 LibWeb/IDB: Use helper method for checking transaction state 2025-05-14 17:17:29 +02:00
stelar7
4c7c7845d3 LibWeb/IDB: Remove outdated FIXME 2025-05-14 17:17:29 +02:00
stelar7
13674c1b32 LibWeb/IDB: Resolve FIXME regarding removing from indecies 2025-05-14 17:17:29 +02:00
stelar7
46ecf239c4 LibWeb/IDB: Implement storing of index records 2025-05-14 17:17:29 +02:00
stelar7
c73b8d1fa0 LibWeb/IDB: Implement IDBIndex::openKeyCursor 2025-05-14 17:17:29 +02:00
stelar7
852323009f LibWeb/IDB: Implement IDBIndex::count 2025-05-14 17:17:29 +02:00
stelar7
b8bb8345a9 LibWeb/IDB: Implement IDBIndex::getAllKeys 2025-05-14 17:17:29 +02:00
stelar7
3fa1d1299c LibWeb/IDB: Implement IDBIndex::getAll 2025-05-14 17:17:29 +02:00
stelar7
47450bc15c LibWeb/IDB: Implement IDBIndex::getKey 2025-05-14 17:17:29 +02:00
stelar7
e74e571b56 LibWeb/IDB: Implement IDBIndex::get 2025-05-14 17:17:29 +02:00
Sam Atkins
73fa567e7a LibWeb/CSS: Remove now-unused AllowUnresolved enum
This mechanism has been replaced with PendingSubstitutionValues.
2025-05-14 11:46:47 +01:00
Sam Atkins
4edafb35cd LibWeb/CSS: Use PendingSubstitutionValue for unresolved shorthands
Previously, we would just assign the UnresolvedStyleValue to each
longhand, which was completely wrong but happened to work if it was a
ShorthandStyleValue (because that's basically a list of "set property X
to Y", and doesn't care which property it's the value of).

For example, the included `var-in-margin-shorthand.html` test would:
1. Set `margin-top` to `var(--a) 10px`
2. Resolve it to `margin-top: 5px 10px`
3. Reject that as invalid

What now happens is:
1. Set `margin-top` to a PendingSubstitutionValue
2. Resolve `margin` to `5px 10px`
3. Expand that out into its longhands
4. `margin-top` is `5px` 🎉

In order to support this, `for_each_property_expanding_shorthands()` now
runs the callback for the shorthand too if it's an unresolved or
pending-substitution value. This is so that we can store those in the
CascadedProperties until they can be resolved - otherwise, by the time
we want to resolve them, we don't have them any more.

`cascade_declarations()` has an unfortunate hack: it tracks, for each
declaration, which properties have already been given values, so that
it can avoid overwriting an actual value with a pending one. This is
necessary because of the unfortunate way that CSSStyleProperties holds
expanded longhands, and not just the original declarations. The spec
disagrees with itself about this, but we do need to do that expansion
for `element.style` to work correctly. This HashTable is unfortunate
but it does solve the problem until a better solution can be found.
2025-05-14 11:46:47 +01:00
Sam Atkins
398d2f9981 LibWeb/CSS: Implement pending-substitution value
This is a special value temporarily assigned to longhands when their
shorthand is unresolved, and then later replaced once that is resolved.
2025-05-14 11:46:47 +01:00
Sam Atkins
59e8a669de LibWeb/CSS: Unify code in StyleComputer::cascade_declarations() 2025-05-14 11:46:47 +01:00
Sam Atkins
d1dadd43a1 LibWeb/CSS: Implement guaranteed-invalid value
This is a special value produced when var/attr substitution fails, and
is also the initial value for custom properties.
2025-05-14 11:46:47 +01:00
Sam Atkins
804c1eeeed LibWeb/CSS: Remove double set_property_expanding_shorthands() call
If `value` was UnresolvedStyleValue, we'd attempt to `set_property...()`
with its resolved value, then call that again with the original
UnresolvedStyleValue. For any other kind of `value`, we'd simply call
call `set_property...()` twice with the same parameters.
2025-05-14 11:46:47 +01:00
Sam Atkins
ded3c95da5 LibWeb/CSS: Remove unused FontVariant style value type 2025-05-14 11:46:47 +01:00
Sam Atkins
475788732f LibWeb/CSS: Remove outdated FIXME
This method no longer sets anything to `initial`.
2025-05-14 11:46:47 +01:00
R-Goc
34c14d4e6d LibJS: Add fast path for float to int put
This commit adds a fast path for putting values into a TypedArray of an
integer type, when the value being put in is a double. This leads to a
6% speedup on JetStream/gcc-loops.js.
2025-05-14 12:33:35 +02:00
ayeteadoe
0061c64ee6 CMake: Remove duplicate sanitizer configuration
Root had identical copy of what was being done in Meta/Lagom
so now we ensure this is still included globally but is
isolated to its own cmake module to make sanitizer
config easier to discover
2025-05-14 02:05:12 -06:00
ayeteadoe
c4f08bc268 CMake: Add LibDiff to TEST_DIRECTORIES
Not sure if it has always been this way, but Tests/LibDiff has
not actually been running in CI at all.
2025-05-14 02:05:12 -06:00
ayeteadoe
11bca38f91 CMake: Build LibRegex tests in Tests/LibRegex not Meta/Lagom
As LibRegex was not specified in TEST_DIRECTORIES, the existing
Tests/LibRegex subdirectory was not actually included during
configuration. Also the RegexLibC test has not been needed
since migration away from Serenitys LibC was done, so
that test has been fully removed. I also renamed the
Regex.cpp test to TestRegex.cpp to match the naming
convention of most test targets.
2025-05-14 02:05:12 -06:00
ayeteadoe
8864b3e9d1 CMake: Build LibCore tests in Tests/LibCore not Meta/Lagom
As LibCore was not specified in TEST_DIRECTORIES, the existing
Tests/LibCore subdirectory was not actually included during
configuration.
2025-05-14 02:05:12 -06:00
ayeteadoe
d44ac0874f CMake: Build LibTest[Main] in Libraries/LibTest not Meta/Lagom
As LibTest was not specified in TEST_DIRECTORIES, the existing
Libraries/LibTest subdirectory was not actually included during
configuration.
2025-05-14 02:05:12 -06:00
Timothy Flynn
7280ed6312 Meta: Enforce newlines around namespaces
This has come up several times during code review, so let's just enforce
it using a new clang-format 20 option.
2025-05-14 02:01:59 -06:00
Timothy Flynn
ca9f3673c5 Everywhere: Run clang-format
The following command was used to clang-format these files:

    clang-format-20 -i $(find . \
        -not \( -path "./\.*" -prune \) \
        -not \( -path "./Build/*" -prune \) \
        -not \( -path "./Toolchain/*" -prune \) \
        -type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
2025-05-14 02:01:59 -06:00
Timothy Flynn
d30f6f1b11 Meta: Switch to clang-format-20 as the standard formatter 2025-05-14 02:01:59 -06:00
Timothy Flynn
313e490fb6 Meta: Extract the required clang-format version to a variable
Rather than writing the version N times in this script, let's extract it
to a variable for easier use.
2025-05-14 02:01:59 -06:00
Timothy Flynn
70d2b0b6f3 CI: Update the Clang pipeline to Clang 20 2025-05-14 02:01:59 -06:00
Timothy Flynn
a65bbae4c9 CI: Update the GCC pipeline to GCC 14
Although GCC 15 is released, it is not available on Ubuntu 22.04 LTS via
the ubuntu-toolchain-r/test PPA.
2025-05-14 02:01:59 -06:00
Timothy Flynn
6fc7483757 Documentation: Bump OpenIndiana's clang version
Clang 19 seems to be the newest available:
https://pkg.openindiana.org/hipster/en/search.shtml?token=clang&action=Search

It also looks like they have newer versions of GCC now, but let's just
advise clang on this system that no contributer is using.
2025-05-14 02:01:59 -06:00
Timothy Flynn
0e4a2f760f Documentation: Refer to specific compiler versions in fewer places
The required and recommended compiler versions are sort of scattered
across several documents. Let's list them in a single document, and
have other documents refer to that location.

The language here intentionally recommends the same compiler versions
used in CI. The find_compiler.sh script can be updated with the
minimum known good version.
2025-05-14 02:01:59 -06:00
Timothy Flynn
85ee56a702 CI: Use clang for the test262 build
We currently have optimizations that apply only to clang, so we might as
well make use of them.
2025-05-14 02:01:59 -06:00
Timothy Flynn
3d59efa7e1 CI: Use clang for the fuzzer's lagom tools build
It's kind of weird to be mixing gcc and clang here.
2025-05-14 02:01:59 -06:00
Andrew Kaster
c7cfd3cb1e CI: Disable LTO by default for static GCC builds
lto1 uses more memory than exists in the known universe when building
ladybird, so disable LTO for static GCC builds.
2025-05-14 02:01:50 -06:00
Andrew Kaster
905c5ecb4c AK: Silence -Wfree-nonheap-object more generally in Function for gcc
We were already silencing it at the site of the delete call, but gcc in
distribution mode is more aggressive about inlining and still sees a
delete that it doesn't like.
2025-05-14 02:01:50 -06:00
mikiubo
89e0896cd7 LibWeb: Implement XML Char validation for Text node serialization
With this fix, the second test in domparsing/innerhtml-01.xhtml passes.
2025-05-14 18:18:08 +12:00
Glenn Skrzypczak
5c578b6057 LibWeb/HTML: Implement report_validity
This implements the previously stubbed out `report_validity` method.

The specification is not very clear on how to exactly report the
validity. For now, we bring the first visible invalid control into
view and focus it. In the future, however, it would make sense to
support more complex scenarios and be more aligned with the other
implementations.
2025-05-14 09:39:12 +12:00
stelar7
296d9d74d8 LibWeb/IDB: Implement IDBCursorWithValue interface 2025-05-13 10:48:40 -06:00
stelar7
9c51326fcb LibWeb/IDB: Implement IDBCursor::delete 2025-05-13 10:48:40 -06:00
stelar7
cf84a98bab LibWeb/IDB: Implement IDBCursor::update 2025-05-13 10:48:40 -06:00
stelar7
3154ac8988 LibWeb/IDB: Implement IDBCursor::continuePrimaryKey 2025-05-13 10:48:40 -06:00
stelar7
6afa2c8eee LibWeb/IDB: Implement IDBCursor::advance 2025-05-13 10:48:40 -06:00
stelar7
82d17fa17e LibWeb/IDB: Sort IDBCursor fields according to IDL 2025-05-13 10:48:40 -06:00
Psychpsyo
a0be82b2cb LibWeb: Move containment checks to Layout::Node
It fits better there and avoids having to reach into the Element
all the time.
2025-05-13 15:30:14 +03:00
Psychpsyo
4989c5c793 LibWeb: Add paint containment clipping
The contain-paint-stacking-context-001a.html test has been removed
for now because it has a 1px tall blue line at the top that should
not be there. With paint containment, this line is removed only in
the actual test case, but not in the reference. This is because of
the font that we use in testing and happens in Chromium as well if
the test is run with that font.
2025-05-13 15:30:14 +03:00