Commit graph

70447 commits

Author SHA1 Message Date
Andrew Kaster
fbf8ffe872 AK: Only propagate delayload of dbghelp.dll for static builds
When AK is a shared library, the flag should be applied to the link
of the dll. When it's a static library, we need to apply it to the
executable that links against it instead.

Co-Authored-By: ayeteadoe <ayeteadoe@gmail.com>
2025-06-23 23:04:45 +02:00
Gingeh
4292344729 LibWeb: Don't skip last keyframe 2025-06-23 21:01:26 +02:00
InvalidUsernameException
f8f399c9c0 CI: Fix path to test-dumps folder of LibWeb tests for artifact upload
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
The CI runs are supposed to upload test dumps for failed LibWeb tests as
artifacts. However, the path for the artifact upload was wrong, it
likely regressed in 9a5b31ccd1.
2025-06-23 11:35:37 -06:00
Andrew Kaster
d9c85288d9 LibTLS: Remove blocking option and simplify Options struct
The complex macro for options with defaults doesn't make sense
now that there's only one option.
2025-06-23 17:49:21 +02:00
Andrew Kaster
955d747431 LibTLS: Use non-blocking TLS socket in the handshake test
None of our real code use cases actually use blocking mode. So we
should be testing non-blocking.
2025-06-23 17:49:21 +02:00
Callum Law
89a08cb7cf LibWeb: Update CSSRule parent style sheet whenever parent rule changes 2025-06-23 15:21:36 +01:00
Callum Law
f336667771 LibWeb: Don't carry quirks across to logical aliases 2025-06-23 15:19:07 +01:00
Callum Law
b0cdc3f03b LibWeb: Respect writing-mode and direction when mapping logical aliases 2025-06-23 15:19:07 +01:00
Callum Law
34a52baeed LibWeb: Add generic functionality for logical alias computed values 2025-06-23 15:19:07 +01:00
Callum Law
cfc8d3031b LibWeb: Map logical aliases at cascade time
Previously we would incorrectly map these in
`CSSStyleProperties::convert_declarations_to_specified_order`, aside
from being too early (as it meant we didn't maintain them as distinct
from their physical counterparts in CSSStyleProperties), this meant
that we didn't yet have the required context to map them correctly.

We now map them as part of the cascade process. To compute the mapping
context we do a cascade without mapping, and extract the relevant
properties (writing-direction and direction).
2025-06-23 15:19:07 +01:00
Callum Law
4e87f85458 LibWeb: Convert logical property shorthands to full-fledged shorthands
No functionality changes. This is just prep work for later commits
around moving logical alias mapping to cascade time
2025-06-23 15:19:07 +01:00
Callum Law
12581fa995 LibWeb: Resolve conflicts in compute_keyframe_values correctly
As conflict resolution depends on whether the property was set directly
or via a shorthand, we have to store the non-expanded values in the
resolved keyframe properties.
2025-06-23 15:19:07 +01:00
Tom Lynch
b3d459f4de LibGfx: Nearest neighbor scaling for ScalingMode::SmoothPixels 2025-06-23 16:05:52 +02:00
Tim Ledbetter
9b6da84fff LibWeb/CSS: Implement the font-kerning property
This sets whether the kerning information stored on the current font is
used.
2025-06-23 13:26:48 +01:00
Callum Law
80ea865b19 LibWeb: Use correct error for invalid rule in nested insertRule
When we try to insert a disallowed (non-nested) statement into a
CSSGroupingRule we should throw a `HierarchyRequestError` as it being
disallowed is a "constraint specified by CSS". Previously we would rely
on `Parser::is_valid_in_the_current_context` and throw a Syntax error.

There are more constraints to be implemented.
2025-06-23 12:52:40 +01:00
Callum Law
ef7ba02842 LibWeb: Throw error in insertRule when rule violates constraints 2025-06-23 12:52:40 +01:00
Callum Law
6144154e4f LibWeb: Ensure valid placement of @import and @namespace rules
These rules should appear before all other rules (excluding @layer
statements and @charset) with @import appearing first.
2025-06-23 12:52:40 +01:00
Glenn Skrzypczak
6b84cd8d11 LibWeb/HTML: Correctly set base elements frozen base url
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
This commit implements the fallback to the documents fallback base url
if the href of the first base element is a data or javascript url.

Additionally the frozen base url is set, if a base element becomes the
first base element with an href content attribute because the previous
one got removed.
2025-06-23 18:56:42 +12:00
Aliaksandr Kalenik
4ed9f6fcc0 LibWeb: Collapse auto-fit tracks in middle of tracks definition [GFC]
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
`collapse_auto_fit_tracks_if_needed()` had a check that does collapsing
only if auto-fit is used like
`grid-template-columns: repeat(auto-fit, 1px);`, and it didn't work for
valid cases when `repeat(auto-fit)` is placed in the middle of
definition like `grid-template-columns: 1px repeat(auto-fit, 1px) 1px;`.
2025-06-23 02:29:45 +02:00
Aliaksandr Kalenik
c333d0876c LibWeb: Simplify resolve_definite_track_size() [GFC] 2025-06-23 02:29:45 +02:00
Aliaksandr Kalenik
b315e80142 LibWeb: Don't use get_free_space() to count auto-fill/fit tracks [GFC]
Spec says that definite grid container size should be used as free space
so there's no need to use `get_free_space()` that does iteration over
tracks and subtracts definite sizes from available space.
2025-06-23 02:29:45 +02:00
Tim Ledbetter
ea29877385 Meta: Add --force option to WPT import script to update existing tests 2025-06-22 23:53:14 +02:00
Tim Ledbetter
689dff3ee8 Tests: Synchronize imported tests with the WPT repository 2025-06-22 23:51:34 +02:00
Tim Ledbetter
11e5cd5048 Meta: Don't lint imported WPT crash tests with prettier 2025-06-22 23:51:34 +02:00
Andrew Kaster
ca293af184 AK: Propagate delayload linker option for dbghelp.dll
When building a static liblagom-ak.a, the delayload link option gets
dropped on the floor if it's a PRIVATE link option. Use an interface
one instead.

This fixes the TestDelayLoadWindows unit test in static windows
builds.
2025-06-22 13:33:33 -06:00
Andrew Kaster
5783caf68e CMake: Add windows vcpkg triplet files to minimize port builds
Now we won't be building both debug and release for all ports when
using a release, distribution, or sanitizer preset.

Eventually we can use this to build all our ports with clang-cl.exe.
That doesn't work at all out of the box, and needs a bunch of extra
legwork. Likely legwork for every port we build.
2025-06-22 13:33:33 -06:00
Andrew Kaster
ffd946d47d CMake: Use cmake_path to check if vcpkg triplets are ours
This makes the check work with possibly-normalized windows paths
2025-06-22 13:33:33 -06:00
Andrew Kaster
b4cc34d0ae CMake: Prepend space to VCPKG_{C,CXX}_FLAGS in icu port overlay
When updating these variables, the appender is responsible for the
preceeding space. Otherwise, flags get jammed together.
2025-06-22 13:33:33 -06:00
Aliaksandr Kalenik
6ec6e755b2 LibWeb: Merge consecutive grid lines in GridTrackSizeList
Fixes a bug where consecutively defined grid lines were not merged
during serialization.
2025-06-22 21:15:40 +02:00
Jelle Raaijmakers
1be79a2b7b CI: Move nightly Windows build to nightly-lagom
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
Since lagom-template supports Windows builds now, we no longer need a
separate nightly-windows workflow.
2025-06-22 12:47:28 +02:00
Jelle Raaijmakers
60ced8197e CI: Move Windows CI to a separate workflow
Having the pull_request 'labeled' event trigger the main CI is much too
impactful, since it cancels running jobs and does not start anything if
the label is anything else than 'windows'. Let's go with a different
approach and put the Windows CI job in a separate workflow.

How this works:

  * Jobs are only run if the 'windows' label is present on the PR.
  * If a PR is opened or updated, existing jobs are canceled.
  * If a PR is (un)labeled, existing jobs are only canceled if the label
    was 'windows'. Other labels cause the job to be rescheduled.

As far as I can see, there's no way to prevent the job from being
rescheduled when labels other than 'windows' are being added or removed.
However, by not canceling the existing Windows job, we can try to create
a cache so the next run will be much quicker.
2025-06-22 12:47:28 +02:00
Jelle Raaijmakers
c6d848b100 CI: Disable the Windows CI job by using a boolean exclusion
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
CI / Windows, x86_64, Windows_Sanitizer_CI, ClangCL (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
Each matrix item now defines whether it is enabled, and if not, the job
conditionally disables itself. Apparantly we cannot use expressions in
`matrix.exclude`, but it should work in the items' definitions.

This has the added benefit that this makes the job show up as "skipped",
which could serve as a hint that it could be run on a PR.
2025-06-22 10:35:11 +02:00
Jelle Raaijmakers
b9d630edbc CI: Trigger Windows build on PR label 'windows'
Our CI matrix now includes Windows if the 'windows' label is added to
the PR. The job still takes too long to include it for every PR, but it
is certainly useful to have it run on Windows-specific PRs and PRs that
might break Windows builds.
2025-06-22 09:17:11 +02:00
Jelle Raaijmakers
433bbcfe19 CI: Make lagom-template.yml work for Windows builds 2025-06-22 09:17:11 +02:00
Jelle Raaijmakers
8493f74be1 CI: Remove PR-specific step from nightly Windows build 2025-06-22 09:17:11 +02:00
Jelle Raaijmakers
d73d768c12 AK: Define tzname for Windows in Time.cpp
Unbreaks the Windows build.

Co-authored-by: R-Goc <ryszardgoc@gmail.com>
2025-06-22 09:17:11 +02:00
Psychpsyo
3ab14f5595 Meta: Enforce doctypes on layout tests
Some checks failed
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
Build Dev Container Image / build (push) Has been cancelled
2025-06-21 22:58:01 +02:00
Aliaksandr Kalenik
e6dabdcebe LibWeb: Serialize grid line names in GridFormattingContext
`getComputedStyle()` for grid tracks returns style value produced during
layout. This is needed to return resolved track sizes values which are
thrown away after layout is done. Now GFC produces more correct style
value by not ignoring grid line names.
2025-06-21 22:07:08 +02:00
Aliaksandr Kalenik
af602b2555 LibWeb: Align CSS Grid properties parsing with the specification
Reimplements `grid`, `grid-template`, `grid-template-rows`, and
`grid-template-columns` in a way that uses a separate function for each
grammar rule defined in the specification. This change results in many
additional passing tests from the already imported WPT suite. Most of
the remaining test failures are related to incorrect serialization of
grid properties.
2025-06-21 22:07:08 +02:00
Aliaksandr Kalenik
7b077595c3 Tests: Reimport css/css-grid/parsing/grid-template-columns-computed.html
Sync this test with upstream WPT where they added a new subtest in this
file.
2025-06-21 22:07:08 +02:00
Philipp Dreher
c414f0c43e Meta: Switch to different source for pre-commit feature in dev-container 2025-06-21 20:18:23 +02:00
Tim Ledbetter
dede92aa78 Tests: Update WPT testharness.js to the most recent version
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
This ensures that our test output looks the same as that shown in the
WPT runner.
2025-06-21 14:58:02 +02:00
Psychpsyo
c0e44820e9 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
Callum Law
d7036daa89 LibWeb: Disallow trailing tokens in @supports(<declaration>) 2025-06-21 11:49:43 +01:00
Jelle Raaijmakers
22bda8e5e2 LibWeb: Stub Geolocation API
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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-06-21 10:00:29 +02:00
Jelle Raaijmakers
f3c1dfb2f1 LibWeb: Import geolocation/idlharness.https.window.html WPT test 2025-06-21 10:00:29 +02:00
Jelle Raaijmakers
63fd4cf9e4 LibWeb: Add the EpochTimestamp IDL typedef 2025-06-21 10:00:29 +02:00
Jelle Raaijmakers
8f3fe0c39e LibWeb: Support nullable attributes in generated toJSON()
Any optional or nullable attribute will end up in an `if/else` branch
when we collect the attribute values, and this is inherently
incompatibly with an `auto {attr}_wrapped = ...` expression. Define the
variable as an `JS::Value` before generating the wrap statement so we
can properly support `toJSON()` for an attribute like:

  readonly attribute double? altitude;
2025-06-21 10:00:29 +02:00
Jelle Raaijmakers
30efcd0d00 LibWeb: Prevent time-traveling leading inline metrics
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
In `InlineLevelIterator`, whenever we call `skip_to_next()` and enter a
node with box model metrics, we could potentially accumulate leading and
trailing metrics. This lead to a weird situation where an element with
`display: inline-block` could adopt the leading metrics of an inline
element that follows it, since we perform the call to
`add_extra_box_model_metrics_to_item()` too late.

Move `skip_to_next()` down so it no longer interferes with the `Item`
we're creating.

The test expectation for
`atomic-inline-with-percentage-vertical-align.html` is updated, although
neither the old nor new results are 100% accurate since either box jumps
one pixel to the right.
2025-06-20 19:59:32 +02:00
Jelle Raaijmakers
de24bc5d26 Meta: Update CA certificates to version 2025-05-20
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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-06-20 07:11:44 -04:00