Sam Atkins
7c8c05ee82
LibWeb/Layout: Support visibility:collapse on table-row elements
...
When a table row (or its group) is set to collapse, the row takes up no
vertical space in the layout.
We have to account for this in multiple places, so I've cached whether a
row is collapsed in the TableGrid::Row.
2025-08-11 11:07:47 +01:00
Sam Atkins
3b97bdc7bf
Tests: Import WPT tests for table rows with visibility:collapse
...
These mostly fail for now.
2025-08-11 11:07:47 +01:00
Sam Atkins
5f986b2c33
LibWeb/Painting: Paint ridge
and groove
border styles
2025-08-11 11:07:15 +01:00
Sam Atkins
5d4a4e44fe
LibWeb/Painting: Paint border-style: double
using two solid borders
...
Call paint_border() recursively, once for the outer line, and once for
the inner one. This is done in a lambda so that we can reuse it for a
couple of other line styles.
Border-radius behaviour doesn't match other browsers, and goes a bit
haywire in some cases. I've left some FIXMEs for someone who
understands the maths here better than I do. 😅
The LineStyle handling is moved to the start of the function, to avoid
unnecessary work.
2025-08-11 11:07:15 +01:00
Sam Atkins
c660df70b4
LibWeb/Painting: Note that inset
and outset
borders are implemented
2025-08-11 11:07:15 +01:00
Sam Atkins
7c2b8f6ee7
LibWeb/Painting: Move per-edge getter into BordersDataDevicePixels
...
Reduces some duplication.
2025-08-11 11:07:15 +01:00
Timothy Flynn
e2b245add1
LibJS: Handle out-of-range prefixed numbers in Token::double_value
...
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (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 regressed in cd15b1a2c9
.
If a prefixed number is out-of-range of a u64, stroul would previously
fall back to ULONG_MAX. This patch restores that behavior.
2025-08-10 13:35:37 +02:00
Aliaksandr Kalenik
652a457f52
LibWeb: Fix grid layout for replaced items with percentage max-width
...
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (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
CSS grid specification states that for grid items with a replaced
element and a percentage preferred size or maximum size, the percentage
should be resolved against 0 during content-based minimum size
calculation. This makes sense, as it prevents replaced items from
overshooting their grid track while intrinsic track sizes are
calculated, and allows later track size resolution steps to scale
replaced items to fit their grid track.
2025-08-10 11:07:02 +02:00
Timothy Flynn
57b5df21c7
LibWeb: Select the entire input when double clicking password fields
...
This matches the behavior of other browsers, and hides any indication
of word boundaries in the password.
2025-08-10 11:05:49 +02:00
Timothy Flynn
ded337cfec
LibWebView: Gracefully handle RequestServer death
...
This works exactly the same as ImageDecoder death handling.
2025-08-10 11:02:50 +02:00
Timothy Flynn
b1b218596f
LibWeb+WebContent: Add IPC to re-establish RequestServer connections
2025-08-10 11:02:50 +02:00
Timothy Flynn
6f4be4791a
LibRequests: Add hooks to handle RequestServer death
2025-08-10 11:02:50 +02:00
Timothy Flynn
e421c233a6
LibWebView: Ignore ImageDecoder death during process shutdown
2025-08-10 11:02:50 +02:00
Timothy Flynn
58f5fe7d79
RequestServer: Add an IPC method to reconnect N request clients
...
Similar to the same IPC on ImageDecoder, this just avoids IPC churn.
2025-08-10 11:02:50 +02:00
ayeteadoe
78a08bac82
LibWasm: Fix Windows build
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (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-08-09 16:41:37 -06:00
Tim Ledbetter
b15c4cccbf
LibWeb: Ignore non-element nodes when evaluating filters
...
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (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 prevents an unknown filter debug message would be printed for
comments.
2025-08-08 23:54:17 +01:00
Idan Horowitz
81e3afd1fd
LibWeb+LibWebView: Implement emitting CookieChangeEvents
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (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-08-08 13:09:58 -04:00
Idan Horowitz
a72a0b3c2d
LibWeb+LibWebView: Move RFC6265 helpers to LibWeb
...
This will make them usable by LibWeb's CookieStore code as well.
2025-08-08 13:09:58 -04:00
Idan Horowitz
93692242b9
AK: Implement take_all_matching(predicate) API in HashMap
2025-08-08 13:09:58 -04:00
Idan Horowitz
5097e72174
AK: Implement take_all_matching(predicate) API in HashTable
2025-08-08 13:09:58 -04:00
Idan Horowitz
70efa8c1c5
LibWeb: Implement CookieChangeEvent
2025-08-08 13:09:58 -04:00
Idan Horowitz
185f8f7d56
LibWeb: Implement CookieStore::delete(options)
2025-08-08 13:09:58 -04:00
Idan Horowitz
d62fea0340
LibWeb: Implement CookieStore::delete(name)
2025-08-08 13:09:58 -04:00
Idan Horowitz
f724f542ed
LibWeb: Implement CookieStore::set(options)
2025-08-08 13:09:58 -04:00
Idan Horowitz
1f37130703
LibWeb: Implement CookieStore::set(name, value)
2025-08-08 13:09:58 -04:00
Idan Horowitz
1328754fb0
LibWeb: Implement CookieStore::getAll(options)
2025-08-08 13:09:58 -04:00
Idan Horowitz
972e4e2cfc
LibWeb: Implement CookieStore::get(options)
2025-08-08 13:09:58 -04:00
Idan Horowitz
536158878d
LibWeb: Implement CookieStore::getAll(name)
2025-08-08 13:09:58 -04:00
Idan Horowitz
5545d38d7a
LibWeb: Implement CookieStore::get(name)
2025-08-08 13:09:58 -04:00
Idan Horowitz
dc1b7b1925
IDLGenerators: Support generating dictionary to value converter helpers
...
This is useful when returning dictionaries as a Promise.
2025-08-08 13:09:58 -04:00
Idan Horowitz
d6c2893663
LibWeb: Add initial CookieStore support
2025-08-08 13:09:58 -04:00
Timothy Flynn
4a8c70b3a5
LibWeb: Parse CSS/image URLs using DOMURL::parse
...
DOMURL::parse handles blob URLs.
2025-08-08 17:47:51 +01:00
Timothy Flynn
9e474a4eb0
LibWeb: Add missing includes to SharedResourceRequest
...
Missing Cell.h and Ptr.h were causing a bunch of clangd errors. Also
remove unused includes while we're here.
2025-08-08 17:47:51 +01:00
Aliaksandr Kalenik
4b3a87eb14
LibJS: Add fast path for Array.prototype.shift
...
Makes `MicroBench/array-prototype-shift.js` 100x faster on my machine.
Progress on https://github.com/LadybirdBrowser/ladybird/issues/5725
2025-08-08 18:10:14 +02:00
Sam Atkins
7c29db6ab0
Meta: Exclude crash and screenshot tests from newline-at-eof requirement
2025-08-08 15:59:24 +01:00
Luke Wilde
4d34095b0a
LibWeb/Wasm: Return Hash{Map,Table} caches by const reference
...
When loading Infiltrating the Airship in Ruffle, the copying of these
hash maps/tables were at least 10% of the runtime. This disappears when
returning them by const reference.
2025-08-08 16:30:37 +02:00
Sam Atkins
5bd3bc309e
LibWeb/CSS: Rename color style value types
...
The typed-om classes will be separate.
2025-08-08 15:19:03 +01:00
Sam Atkins
6cad3f1921
LibWeb/CSS: Rename CSSColorValue -> ColorStyleValue
...
The typed-om class will be a separate thing.
2025-08-08 15:19:03 +01:00
Sam Atkins
99bce9a94d
LibWeb/CSS: Replace CSSUnitValue with DimensionStyleValue
...
CSSUnitValue is a typed-om type which we will implement separately in
the future. However, it still seems useful to give our dimension values
a base class. (Maybe they could be templated in the future?) So instead
of deleting it entirely, rename it to DimensionStyleValue and make its
API match our style better.
2025-08-08 15:19:03 +01:00
Sam Atkins
7157d19f56
LibWeb/CSS: Separate IntegerSV and NumberSV from CSSUnitValue
...
This inheritance exists for typed-om classes, but StyleValues aren't
typed-om.
Somehow this makes our z-index interpolation slightly more correct. 🎉
2025-08-08 15:19:03 +01:00
Sam Atkins
51a657ca47
LibWeb/CSS: Delete CSSNumericValue
...
This will need to be re-added later as a proper typed-om type, but right
now it's useless.
2025-08-08 15:19:03 +01:00
Sam Atkins
4e92ab52e3
LibWeb/CSS: Rename CSSKeywordValue -> KeywordStyleValue
...
The typed-om CSSKeywordValue will need to be a separate class.
2025-08-08 15:19:03 +01:00
Sam Atkins
c57975c9fd
LibWeb: Move and rename CSSStyleValue to StyleValues/StyleValue.{h,cpp}
...
This reverts 0e3487b9ab
.
Back when I made that change, I thought we could make our StyleValue
classes match the typed-om definitions directly. However, they have
different requirements. Typed-om types need to be mutable and GCed,
whereas StyleValues are immutable and ideally wouldn't require a JS VM.
While I was already making such a cataclysmic change, I've moved it into
the StyleValues directory, because it *not* being there has bothered me
for a long time. 😅
2025-08-08 15:19:03 +01:00
Ali Mohammad Pur
0d8ad0a9fe
Meta: Bump minimum compiler versions for deducing this
2025-08-08 12:54:06 +02:00
Ali Mohammad Pur
cadc3f85a6
Tests: Run all Vector tests for FastLastAccess::Yes too
2025-08-08 12:54:06 +02:00
Ali Mohammad Pur
8af095f797
LibWasm: Make Wasm::Validator::Stack hold a Vector instead of inheriting
2025-08-08 12:54:06 +02:00
Ali Mohammad Pur
b97ad99014
LibWasm: Remove unnecessary C-style casts
...
Or replace them with static-cast when necessary.
2025-08-08 12:54:06 +02:00
Ali Mohammad Pur
1ef536194d
LibWeb/WebAssembly: Avoid scanning all externs when resolving references
...
This was very hot on a profile of ruffle.
2025-08-08 12:54:06 +02:00
Ali Mohammad Pur
33cd5ae08c
LibWasm: Fuse some very common instruction combos into specialised ops
...
Largely combinations of i32.const and local.get.
This shaves off at most single-digit% number of instructions from
dispatch, which translates to at most ~10% reduced dispatch time.
Across most benchmarks, this gains around ~5% perf increase.
2025-08-08 12:54:06 +02:00
Ali Mohammad Pur
0e5ecef848
LibWasm: Try really hard to avoid touching the value stack
...
This commit adds a register allocator, with 8 available "register"
slots.
In testing with various random blobs, this moves anywhere from 30% to
74% of value accesses into predefined slots, and is about a ~20% perf
increase end-to-end.
To actually make this usable, a few structural changes were also made:
- we no longer do one instruction per interpret call
- trapping is an (unlikely) exit condition
- the label and frame stacks are replaced with linked lists with a huge
node cache size, as we only need to touch the last element and
push/pop is very frequent.
2025-08-08 12:54:06 +02:00