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
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
...
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
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
...
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
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
Tim Ledbetter
9c28fe42e8
WebContent: Fix typo in find_element_from_shadow_root()
spec text
...
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 typo was recently fixed in the WebDriver spec.
2025-06-20 09:27:22 +02:00
Tomasz Strejczek
7278a17e87
LibCore: Remove DateTime::to_string() and to_byte_string()
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-19 18:42:45 -06:00
Tomasz Strejczek
6fb2be96bf
Everywhere: Replace DateTime::to_string() with UnixDateTime::to_string()
...
Replace LibCore::DateTime::to_string() with
AK::UnixDateTime::to_string().
Remove unncessary #include <LibCore/DateTime.h>.
2025-06-19 18:42:45 -06:00
Tomasz Strejczek
8f8e51b1fc
AK: Implement AK::UnixDateTime::to_string()
...
Copy implementation of LibCore::DateTime::to_string()
to AK.
Rename TestDuration.cpp to TestTime.cpp and add
there tests for to_string().
2025-06-19 18:42:45 -06:00
Andreas Kling
63d862219e
LibWeb: Avoid expensive Vector::insert() in innerText & outerText
...
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
When expanding "required line breaks", we now write directly into the
final StringBuilder instead of doing a pass of Vector remove/insert
operations first.
This removes a hot profile item on https://serpapi.com/
2025-06-19 17:31:22 +02:00
Chase Knowlden
326a8399a4
Meta: Update vcpkg to latest master
2025-06-19 16:20:59 +02:00
Tim Ledbetter
70f9eb9d8f
LibWeb: Remove Document::validate_qualified_name()
...
This is no longer used and appears to have been removed from the
specification.
2025-06-19 15:06:58 +02:00
Tim Ledbetter
16dbb44de2
LibWeb: Update DOMImplementation.createDocumentType()
name validation
...
This now follows the latest specification steps.
2025-06-19 07:55:47 -04:00
Sam Atkins
f98312d022
LibWeb/DOM: Move pseudo-element scroll offsets into PseudoElement
2025-06-19 12:35:31 +01:00
Sam Atkins
2c7310553a
LibWeb/Layout: Reuse create_pseudo_element_if_needed() for ::backdrop
2025-06-19 12:35:31 +01:00
Sam Atkins
9c656dd7d1
LibWeb/Layout: Only apply ::before/::after creation rules to them
2025-06-19 12:35:31 +01:00
Sam Atkins
c1d4323cf7
LibWeb: Support counter-* properties on pseudo-elements
...
There are multiple things happening here which are interconnected:
- We now use AbstractElement to refer to the source of a counter, which
means we also need to pass that around to compute `content`.
- Give AbstractElement new helper methods that are needed by
CountersSet, so it doesn't have to care whether it's dealing with a
true Element or PseudoElement.
- The CountersSet algorithms now walk the layout tree instead of DOM
tree, so TreeBuilder needs to wait until the layout node exists
before it resolves counters for it.
- Resolve counters when creating a pseudo-element's layout node. We
awkwardly compute the `content` value up to twice: Once to figure out
what kind of node we need to make, and then if it's a string, we do
so again after counters are resolved so we can get the true value of
any `counter()` functions. This will need adjusting in the future but
it works for now.
2025-06-19 12:35:31 +01:00
Sam Atkins
a6df9e1bac
LibWeb/Layout: Store computed style for ::marker
...
This lets us refer to its properties later, for example to resolve its
counters.
2025-06-19 12:35:31 +01:00
Sam Atkins
67241d6419
LibWeb/DOM: Give PseudoElement a CountersSet
...
This is not yet used
2025-06-19 12:35:31 +01:00
Sam Atkins
23520509cc
LibWeb/Layout: Expose which pseudo-element a node was generated for
2025-06-19 12:35:31 +01:00
Sam Atkins
46e95db355
LibWeb: Make Element::get_pseudo_element() public
2025-06-19 12:35:31 +01:00
Sam Atkins
498e143687
LibWeb/DOM: Stop including Element.h from AbstractElement.h
...
We only need the forward declaration here, and this will let us include
AbstractElement from Element.
2025-06-19 12:35:31 +01:00
Sam Atkins
dfce9974b5
LibWeb: Remove GeneratedPseudoElement enum
...
This doesn't currently provide any value over just using PseudoElement,
and makes it harder to work with PseudoElement in other places.
2025-06-19 12:35:31 +01:00
Sam Atkins
a57595faf5
LibWeb: Make [resolve,inherit]_counters() take AbstractElement
...
This is one of those cases where the spec says "element" and
means "element or pseudo-element". The easiest way to handle both is to
make these be free functions that take an AbstractElement, and then
give AbstractElement some helper methods so that the caller doesn't
have to care which it's dealing with.
There are some FIXMEs here because PseudoElement doesn't have a
CountersSet yet, and because the CountersSet currently uses a
UniqueNodeID to identify counter sources, which doesn't support
pseudo-elements.
2025-06-19 12:35:31 +01:00
Sam Atkins
ce380a59c7
LibWeb/DOM: Rename ElementReference to AbstractElement
...
This isn't some kind of identifier, it's a handle on an actual Element
or PseudoElement.
2025-06-19 12:35:31 +01:00
Sam Atkins
e7c2f0dd52
LibWeb: Make PseudoElement a class in its own right
...
It's getting a bit large and complicated to be a struct hidden in
DOM::Element.
2025-06-19 12:35:31 +01:00
Jelle Raaijmakers
e56146edec
LibWeb: Limit scroll bar thumb movement based on grab point
...
We were calculating the scroll delta based on the last known mouse
position, even if that position ventured far beyond the scroll bar's
rect. This caused weird behavior such as scrolling when the mouse was
clearly not on the scrollbar.
This reworks the scrollbar logic to use the mouse's absolute position
instead of a delta, and to always calculate and set the absolute scroll
offset. This makes it much easier to reason about the scrollbar's
position, plus we don't need the last mouse position anymore.
As far as I can tell, our scroll bar behavior now closely resembles
Firefox' behavior.
2025-06-19 07:03:54 -04:00
Tim Ledbetter
727b4f5e89
LibWeb: Update attribute name validation in Document.createAttribute()
...
This now follows the latest specification steps.
2025-06-19 11:00:53 +01:00
Tim Ledbetter
ba641d4784
LibWeb: Update attribute name validation in Element.setAttribute()
...
This now follows the latest specification steps.
2025-06-19 11:00:53 +01:00
Tim Ledbetter
acf2d773d5
LibWeb: Update attribute name validation in Element.toggleAttribute
...
This now follows the latest specification steps.
2025-06-19 11:00:53 +01:00
Tim Ledbetter
4593c28769
LibWeb: Update validate_and_extract
and its users to the latest spec
2025-06-19 11:00:53 +01:00
Tim Ledbetter
c6cc7e1874
Tests: Update dom/nodes/attributes.html
WPT test
2025-06-19 11:00:53 +01:00
Tim Ledbetter
07b3b70a10
LibWeb: Return the correct computed value for opacity properties
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_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-19 10:27:35 +02:00
Tim Ledbetter
269d5bb40e
LibWeb: Resolve percentages for opacity properties at parse time
2025-06-19 10:27:35 +02:00
Jelle Raaijmakers
86c8dbbf90
CI: Restore cache action checks on inputs.ccache_path
...
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
These got removed by accident.
2025-06-18 18:58:00 +02:00
Jelle Raaijmakers
573696b10f
CI: Use GitHub's actions cache instead of Blacksmith's for now
...
We were seeing lower ccache hitrates using Blacksmith's cache, and after
some investigation it turned out that actions running on our `master`
branch were pulling the caches from PRs. Blacksmith is looking into
this - for now revert to GitHub's cache until the issue is resolved.
2025-06-18 12:39:45 -04:00
Gingeh
e96338dd63
LibWeb: Don't play initially-paused animations
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-18 17:17:29 +02:00
Aliaksandr Kalenik
6169e91994
LibWeb: Delete redundant GridFitContent class from track representation
...
GridSize already supports the FitContent type, so there is no need to
additionally wrap it in a GridFitContent class.
2025-06-18 15:51:10 +01:00