Sam Atkins
d611806f18
LibWeb/CSS: Parse and use tech() in @font-face { src }
2025-06-05 12:10:29 +01:00
Sam Atkins
5b42f8d707
LibWeb/HTML: Compare paragraph align="" values insensitively
...
This is the one place we weren't comparing align keywords insensitively.
2025-06-05 12:10:17 +01:00
Sam Atkins
6f4df83917
LibWeb: Always compare attribute names directly
...
Attributes are already stored with their names in lowercase, so we can
do a direct comparison instead of a case-insensitive one.
2025-06-05 12:10:17 +01:00
Sam Atkins
bc8a97589f
LibWeb/SVG: Add stop-color and stop-opacity to AttributeNames
2025-06-05 12:10:17 +01:00
Aliaksandr Kalenik
3b68fd0b8e
LibJS: Make array_like_size() non-virtual in IndexedPropertyStorage
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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-05 03:43:43 +02:00
Aliaksandr Kalenik
1d4f63e4cd
LibJS: Add simple storage fast path in internal_define_own_property()
...
...of Array. If array has simple storage, which implies that attributes
of all indexed properties are default, and newly added property also
has default attribute, we can do a fast path and skip lots of checks
that happen in `Object::internal_define_own_property()`.
2025-06-05 03:43:43 +02:00
Aliaksandr Kalenik
20655b8ebf
LibJS: Add simple storage fast path in internal_get_own_property()
...
...of Array. This allows us to avoid lots of unnecessary for simple
arrays checks that happen in `Object::internal_get_own_property()`.
2025-06-05 03:43:43 +02:00
Nicolas Danelon
f6f7c69023
Meta: Add missing 'args' argument to install command parser
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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 install command was failing with 'Namespace object has no
attribute args' error because the argument parser for the
install command was missing the 'args' parameter that allows
passing additional arguments to the build system.
This fix adds the missing argument to match the behavior of
other commands like build, run, and debug.
2025-06-04 17:34:21 -04:00
Timothy Flynn
128675770c
LibJS: Implement Intl.Locale.prototype.variants
...
This is a normative change in the ECMA-402 spec. See:
e8c995a
2025-06-04 17:11:35 -04:00
Timothy Flynn
324bd0f163
LibJS: Update the Intl.Locale prototype to the latest editorial spec
...
This has been refactored a bit recently.
2025-06-04 17:11:35 -04:00
Timothy Flynn
208a5e6763
LibJS: Update the Intl.Locale constructor to the latest editorial spec
...
This has been refactored a bit recently. There are upcoming normative
changes that do not apply cleanly without this update.
2025-06-04 17:11:35 -04:00
wesinator
4c4af5492d
Base: BrowserContentFilters.txt - add 51.la tracking domains
...
51.la is a CN language tracking site
2025-06-04 20:40:31 +01:00
Callum Law
670c247937
LibWeb: Resolve FIXME around shorthand properties in remove_property()
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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 exposes some false-positive sub-tests in the font-computed.html
test which are now correctly marked as failed.
2025-06-04 16:34:31 +01:00
Ruben
88da6250f9
LibWeb: Use the correct definition of separated-borders mode
...
We previously checked the cell's computed values for the border-collapse
property, but a cell is only in separated-borders mode if the table has
border-collapse set to separate. Curiously in some other placed where
this mode is checked we already did the correct thing.
2025-06-04 15:02:42 +01:00
Callum Law
50cce72ab9
LibWeb: Implement text-wrap
CSS property
...
This resolves an issue introduced in 94f5a51
with the
tab-size-text-wrap test
2025-06-04 12:48:36 +01:00
Callum Law
9ba74316d2
LibWeb: Implement text-wrap-style
CSS property
2025-06-04 12:48:36 +01:00
Timothy Flynn
7d99a92135
LibWeb: Absolutize CSS image URLs for computed style resolution
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
For getComputedStyle(), we must return an absolute URL for image style
values. We currently return the raw parsed URL.
This fixes loading the marker icons on https://usermap.serenityos.org .
2025-06-03 19:30:43 -04:00
Timothy Flynn
3ae2220534
LibWeb: Add missing FlyString include to CSS/URL.h
...
clangd is complaining about this.
2025-06-03 19:30:43 -04:00
Andreas Kling
6dba720370
LibWeb: Invalidate layout tree at nearest non-anonymous ancestor
...
When marking a part of the layout tree for rebuild, if the subtree root
that we're marking has an anonymous parent, we now mark from the nearest
non-anonymous ancestor instead.
This ensures that subtrees inside anonymous wrappers don't just get
duplicated (i.e recreated but inserted instead of replaced).
2025-06-04 00:43:23 +02:00
Aliaksandr Kalenik
93cd17db74
LibJS: Add fast path internal_has_property()
for Array
...
If array has packed index property storage without holes, we could check
if indexed property is present simple by checking if it's less than
array's length.
Makes the following program go 1.1x faster:
```js
function f() {
let array = [];
for (let i = 0; i < 3_000; i++) {
array.push(i);
}
for (let i = 0; i < 10_000; i++) {
array.map(x => x * 2);
}
}
f();
```
2025-06-03 23:18:41 +02:00
Aliaksandr Kalenik
22e0b732db
LibJS: Add missing update for holes count in IndexedPropertyStorage
...
This one is required to cover the case when new empty elements are
introduced by assigning to element with index > length, like:
```js
var x = [];
x[0] = 1;
x[2] = 2;
```
2025-06-03 23:18:41 +02:00
aplefull
3781c132aa
LibWeb: Fix grid item placement when only grid-column-end is specified
2025-06-03 22:22:24 +02:00
Rocco Corsi
4b3dccd0f2
LibWeb: Remove Unicode Cyrillic e char (04+35) in variable name
...
Static analysis tool cppcheck reports that
LibWeb/Internals/Internals.cpp:65 has a variable named
hit_tеsting_result with a Cyrillic e in the 'testing' portion of the
name, instead of the more common ASCII e. No other use of Unicode
characters for identifiers in the Ladybird code base noted by cppcheck,
so assuming that this is unintended use.
2025-06-03 21:22:27 +02:00
Aliaksandr Kalenik
1274f4e2f7
LibJS: Optimize Function.prototype.apply()
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
...by avoiding `CreateListFromArrayLike` in cases when we could directly
use elements of underlying object's indexed properties storage.
Makes this program go 2.1x faster:
```js
function target(a, b, c) {
return a + b + c;
}
const args = [1, 2, 3];
let result = 0;
(function() {
for (let i = 0; i < 10_000_000; i++) {
result += target.apply(null, args);
}
})();
```
2025-06-03 17:16:01 +02:00
Aliaksandr Kalenik
3f7c4dd5f6
LibJS: Maintain number of empty elements in SimpleIndexedPropertyStorage
...
This will be used in upcoming changes to do a fast path when array does
not have any holes.
2025-06-03 17:16:01 +02:00
Psychpsyo
4c54a28c45
Meta: Add doctypes to a few more layout tests
2025-06-03 11:03:19 +01:00
Manuel Zahariev
f972342c27
LibWeb/CSS: Unit tests for changes to counter definitions
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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-03 03:51:42 +02:00
Manuel Zahariev
99c6eb0c35
LibWeb/CSS: Invalidate layout tree for changes to counter definitions
...
A change to a counter "definition" propagates to all subsequent
instances of this counter: descendents, siblings and their descendents
(the "next tree slice"). Rebuilding the layout tree (from the parent
node) covers at least the "next_tree_slice".
2025-06-03 03:51:42 +02:00
Timothy Flynn
8145572180
LibJS+LibUnicode: Support ambiguous time zone transitions
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
For example, time zone transitions can result in repeated or skipped
wall times. Temporal wants us to handle these transitions.
2025-06-03 09:09:21 +12:00
Timothy Flynn
c8b4dc4847
LibJS: Require strict matching with a precise ZonedDateTime offset
...
This is a normative change in the Temporal proposal. See:
1117eaf
2025-06-03 09:09:21 +12:00
Timothy Flynn
f091047159
LibJS+LibUnicode: Implement retrieval of collator keyword values
...
Completely missed this when implementing Intl.Collator!
2025-06-03 09:03:33 +12:00
Timothy Flynn
422d72e85d
LibUnicode: Provide string length to ICU string enumeration callbacks
...
Some callers need the raw nul-terminated c-string in this callback, to
pass to some other ICU method. But other callers will want a StringView.
We know the length already in `icu_string_enumeration_to_list`, so let's
just pass it along to avoid `strlen`.
2025-06-03 09:03:33 +12:00
Timothy Flynn
21cff645a2
LibUnicode: Use ICU to convert Unicode keywords to their BCP 47 value
...
We were manually doing this for the calendar keyword, and would need to
do so for the collation keyword as well. I wasn't aware of this API
originally, so let's start using it.
2025-06-03 09:03:33 +12:00
aplefull
486602e796
LibRegex: Fix handling of + quantifier with zero-width matches
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
Small change that allows quantifiers using Fork* forms (e.g., +) to
succeed after one match, even if that match has zero width.
2025-06-02 15:52:26 +02:00
Timothy Flynn
2380fb0ca1
Meta: Default chosen compilers to the CC and CXX environment variables
...
This regressed when porting find_compiler.sh to python.
2025-06-02 08:04:07 -04:00
Saksham Mittal
c52c05555b
LibWeb: Don't place cursor on certain <input> elements
...
For example, button inputs shouldn't have a cursor
displayed in their text since they're not editable,
and are not meant to be editable.
Fixes #4140
Co-authored-by: Sam Atkins <sam@ladybird.org>
2025-06-02 11:38:38 +01:00
Tim Ledbetter
17f14a277b
LibWeb: Don't crash when interpolating single-value repeatable lists
...
Previously, when interpolating a repeatable list from a list with
multiple values to a single value, we would crash.
2025-06-02 11:33:01 +01:00
Timothy Flynn
8ded0c65dc
LibJS+LibUnicode: Change time zones in a way that works on Windows
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
On Windows, ICU does not look at the TZ environment variable at all. So
to support changing time zones in test-js, let's set ICU's default time
zone directly.
Note that we no longer deal with "null" time zone strings. We just cache
whatever ICU thinks is the current time zone before attempting to change
it, for which we never have a null result.
Co-authored-by: Andrew Kaster <andrew@ladybird.org>
2025-06-01 18:48:58 -04:00
stasoid
8d33a97630
Tests/LibURL: Port to Windows
2025-06-01 16:42:19 -06:00
Tim Ledbetter
e2d0d8e2b9
LibWeb/CSS: Implement the scrollbar-color
property
...
This allows the user to set the scrollbar thumb and track colors.
2025-06-02 00:17:51 +02:00
Aliaksandr Kalenik
285bc005cb
LibJS: Do more comprehensive check if next()
fast path is possible
...
Before this change each built-in iterator object has a boolean
`m_next_method_was_redefined`. If user code later changed the iterator’s
prototype (e.g. `Object.setPrototypeOf()`), we still believed the
built-in fast-path was safe and skipped the user supplied override,
producing wrong results.
With this change
`BuiltinIterator::as_builtin_iterator_if_next_is_not_redefined()` looks
up the current `next` property and verifies that it is still the
built-in native function.
2025-06-02 00:15:36 +02:00
Lucien Fiorini
0fcb574041
LibGfx+LibWeb: Turn Gfx::Filter into a SkImageFilter wrapper
2025-06-01 23:22:10 +02:00
InvalidUsernameException
417f4edc46
Tests/LibWeb: Print properties without indexes
...
The test CSSStyleDeclaration-has-indexed-property-getter is a frequent
source of merge conflicts between PRs that are adding to or otherwise
modifying the list of supported CSS properties.
This is primarily because the test prints out a numeric index of each
property along with the property. As far as I can tell the indexes are
inconsequential for what the test is trying to verify. So lets modify
the printout to only contain the properties without indexes.
2025-06-01 19:09:10 +01:00
Julien Le Bras
3ba6d129df
LibJS: Cache string constants in Generator::add_constant
...
This mirrors the existing caching logic for int32 constants.
Avoids duplication of string constants in m_constants which could
result in stack overflows for large scripts with a lot of similar
strings.
2025-06-01 18:25:59 +02:00
Richard Gibson
9bf836e6c4
js: Don't escape printed strings with --disable-string-quotes
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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-01 09:51:09 -04:00
Timothy Flynn
5e40db5a17
AK: Remove some now-unnecessary workarounds for simdutf base64 usage
2025-06-01 08:03:00 -04:00
Timothy Flynn
3693fd5caa
Meta: Update simdutf to version 7.3.0
2025-06-01 08:03:00 -04:00
Timothy Flynn
d9d87d4816
Meta: Update libjxl to version 0.11.1#1
...
This includes a CMake fix that we added for Ladybird.
2025-06-01 08:03:00 -04:00
Timothy Flynn
0f2bcd26c4
Meta: Update curl to version 8.14.0
2025-06-01 08:03:00 -04:00
Timothy Flynn
2205177d15
Meta: Update vcpkg baseline
2025-06-01 08:03:00 -04:00