Commit graph

71961 commits

Author SHA1 Message Date
Zaggy1024
ce228663f1 LibMedia: Rename Matroska TRACK_CODEC_PRIVATE to TRACK_CODEC_PRIVATE_ID 2025-10-02 11:03:26 +02:00
rmg-x
b9554038ff LibWeb+LibXML: Make Listener::set_source(ByteString) fallible
`set_source` takes a ByteString but the implementation might require a
specific encoding. Make it fallible so that we don't need to crash in
the case of invalid UTF-8 or similar.

The test includes a sequence of invalid UTF-8 bytes that crash the
browser without this change.
2025-10-02 02:25:28 +02:00
Ali Mohammad Pur
2397ae4af5 LibWasm: Use [[gnu::musttail]] on new-enough GCC versions
This is supported starting GCC 15.
The warning -Wmaybe-musttail-local-addr complained about &value possibly
escaping (it cannot, but gcc is being pessimistic about
store_to_memory), so a little rearrangement of that function was
necessary.
2025-10-01 23:47:29 +02:00
Ali Mohammad Pur
15bb9fee71 AK: Use OOB pointer for "empty" last-fast-access Vector last ptr
This is a _significant_ perf improvement as we no longer have to think
about tracking state transitions from empty <-> nonempty.
(corresponds to a ~20% perf improvement in LibWasm)
2025-10-01 23:47:29 +02:00
Ali Mohammad Pur
02b3c4f8a9 LibWasm: Utilise direct threading if/when possible
~50% performance improvement on coremark.
2025-10-01 23:47:29 +02:00
Ali Mohammad Pur
cf30d61d8b LibWasm: Use a faster way to detect live registers
Instead of doing a naive O(n^2) liveness detection loop, use a bitmap
for values allocated to registers.
This cuts down validating time from 20% to 1.4% of runtime on the same
game as last commit.
2025-10-01 23:47:29 +02:00
Ali Mohammad Pur
c0223befe1 LibWasm: Avoid frequent re/deallocations while validating expressions
Freeing and reallocating these vectors was ~6% of runtime when
validating some web-based game.
2025-10-01 23:47:29 +02:00
Ali Mohammad Pur
80e5356853 AK: Add Vector::remove_all(container)/remove_all(it, end)
Instead of repeatedly removing elements off the vector, this allows for
specifying all the removed indices at once, and does not perform any
extra reallocations or unnecessary moves.
2025-10-01 23:47:29 +02:00
Aliaksandr Kalenik
93d7efa4c3 LibIPC: Delete unused code in Connection 2025-10-01 14:59:23 -04:00
Jelle Raaijmakers
a5697b4796 LibWeb: Remove unused fields from BrowsingContext
These were introduced in 83c5ff57d8, but
we stopped using them. No functional changes.
2025-10-01 07:21:54 -04:00
Tim Ledbetter
c79063a77d LibWeb: Convert blend test to use rectangle rather than circle
Using a circle isn't relevant to the outcome of the test and introduces
anti-aliasing artifacts.
2025-09-30 22:33:12 +01:00
Tim Ledbetter
a00e7cb20b LibWeb: Implement <feComposite> SVG filter 2025-09-30 22:33:12 +01:00
Sam Atkins
bbfc3a0f5e LibWeb/CSS: Use a bitfield for Containment flags
Shrinks the struct down from 5 bytes to 1.
2025-09-30 22:05:45 +01:00
Sam Atkins
3916e33276 LibWeb/CSS: Parse the container-type property
This applies size, inline-size, and style containment in some cases.
There are other WPT tests for that, but we seem to not implement enough
of containment for this to have an effect so I've not imported those.

Gets us 35 WPT subtests.
2025-09-30 22:05:45 +01:00
Sam Atkins
b0bb775c05 LibWeb/CSS: Remove unnecessary CSS:: namespaces from ComputedValues.h
These are just visual noise.
2025-09-30 22:05:45 +01:00
Aliaksandr Kalenik
ffc05a9ca9 LibWeb/WebGL: Define Uint32List exactly like in the spec
Same fix as d54cab60 but applied for Uint32List.
2025-09-30 18:35:32 +02:00
Aliaksandr Kalenik
c75a8fab3b LibWeb/WebGL: Define Int32List exactly like in the spec
Same fix as d54cab60 but applied for Int32List.
2025-09-30 17:57:46 +02:00
Aliaksandr Kalenik
655cd339a7 LibWeb/WebGL: Move Float32List -> Span<float> conversion into helper
This allows to remove lots of duplicated code.
2025-09-30 16:47:16 +02:00
Aliaksandr Kalenik
d54cab60a8 LibWeb/WebGL: Define Float32List exactly like in the spec
Use `Float32Array or sequence<GLfloat>` instead of
`BufferSource or sequence<GLfloat>`. This meaningfully changes behavior
for `Float16Array` and `Float64Array`: they are now converted to
`sequence<GLfloat>` by iterating the typed array, rather than being
treated as a `BufferSource`. As a result, many WebGL calls now work
correctly where we previously crashed in `VERIFY_NOT_REACHED()` due to
the assumption that a `BufferSource` was always a `Float32Array`.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/5962
2025-09-30 16:47:16 +02:00
Aliaksandr Kalenik
22075c08e4 BindingsGenerator: Return the exact typed array member type for unions
Allows definition of:
`typedef (Float32Array or sequence<GLfloat>) Float32List;`

which did fail to compile before, because `GC::Root<JS::Object>` fails
to implicitly cast into
`AK::Variant<GC::Root<JS::Float32Array>, AK::Vector<float>>`.
2025-09-30 16:47:16 +02:00
Sam Atkins
a098b5fcc4 LibWeb/CSS: Remove PropertyID::Invalid 2025-09-30 15:21:09 +02:00
Sam Atkins
56c7d838f0 LibWeb/CSS: Stop using PropertyID::Invalid in border parsing 2025-09-30 15:21:09 +02:00
Sam Atkins
7d4b2d10e4 LibWeb/CSS: Remove default value for parse_css_value() PropertyID
Every user provides this, and it's not clear what passing
PropertyID::Invalid here actually means.
2025-09-30 15:21:09 +02:00
Tim Ledbetter
3299ea97c6 LibWeb: Treat word-wrap as an alias for overflow-wrap 2025-09-30 13:50:53 +01:00
Tomasz Strejczek
a010557205 LibCore: Remove DateTime
Remove DateTime and its dependencies as it's not longer used.
2025-09-30 12:39:01 +02:00
Tomasz Strejczek
6fc4c544de LibIPC: Remove DateTime encoder/decoder
Remove LibCore::DateTime encoder/decoder as it is not longer needed.
2025-09-30 12:39:01 +02:00
Tomasz Strejczek
27dfaea32f LibWeb: Replace DateTime::parse with UnixDateTime::parse
Replace LibCore::DateTime::parse with UnixDateTime::parse. Add
conversion from UTC to local time zone.
2025-09-30 12:39:01 +02:00
Tomasz Strejczek
5f12d34d13 LibDNS: Remove LibCore::DateTime dependency
Replace LibCore::DateTime Formatter with AK::UnixDateTime's Formatter.
2025-09-30 12:39:01 +02:00
Tomasz Strejczek
5cde267979 AK: Implement Formatter<UnixDateTime>
Implement StringBuilder's Formatter<UnixDateTime>. Add necessary tests.
2025-09-30 12:39:01 +02:00
Tomasz Strejczek
ea32e39d68 AK: Add UnixDateTime::parse() method
Copy parse() method from LibCore::DateTime::parse(). Augment the method
to handle parsing from GMT time. Fix incorrect handling of year in '%D'
format specifier. Remove all format specifiers related to time zones.
Copy relevant tests and add additional ones.
2025-09-30 12:39:01 +02:00
luizgfc
820fee434e LibWeb: Import WPT test about custom property resolution precedence 2025-09-30 09:54:10 +01:00
luizgfc
82bddd5209 Tests: Important custom properties precedence on resolution 2025-09-30 09:54:10 +01:00
luizgfc
13748a8c19 LibWeb: Make Custom Properties cascading consider !important
Make so that !important properties are always applied last, prioritizing
them over normal properties
2025-09-30 09:54:10 +01:00
R-Goc
71c8ee31fb Docs: Recommend the standard git workflow
The standard workflow for working with forks is to clone the fork and
add the main repository as upstream. Also recommend using git switch
instead of checkout.
2025-09-30 08:43:38 +02:00
Pascal Pomper
5b1eba7ac8 LibWeb: Position absolute block-level boxes below previous siblings
Whether an absbox is positioned below or to the right of its previous
sibling in an `InlineFormattingContext` is determined by the
display-outside value before blockification, so we store the
pre-blockification `display` value in `ComputedValues` to access it in
`InlineFormattingContext` and position the box accordingly.
2025-09-29 18:37:53 +02:00
Andreas Kling
7867fef8d7 LibWeb: Use correct width for flex item intrinsic height calculation
Before this change, we always used the flex container's full available
space as the width for intrinsic (height) sizing of flex items.

This meant that flex lines with more than one flex item had their
intrinsic height determined as if they were alone on the line.

For flex row layouts, if we've already determined the flex item's main
size, we now use that as the width to get the intrinsic height.

This leads to more correct layouts, and also avoids some redundant work
since we no longer do unnecessary sizing work with the wrong width (and
can hit cache instead).
2025-09-29 13:27:58 +02:00
Andreas Kling
6ec10a5408 LibWeb: Make more FlexFormattingContext functions take FlexItem
...instead of taking the Layout::Box. This will allow us to make more
nuanced decisions in those functions by having access to flex layout
internal state.
2025-09-29 13:27:58 +02:00
Tim Ledbetter
fda5ea8277 LibWeb: Correctly resolve position-area computed value 2025-09-29 12:48:13 +02:00
Tim Ledbetter
eb571a1a46 LibWeb: Parse the position-area property 2025-09-29 09:53:27 +02:00
Rocco Corsi
12bb266bf2 Documentation: Add libtool to openSUSE dependencies
Provide help with out-of-date openSUSE packages.

Update the libpulse-devel and qt6-multimedia-devel instructions
when dynamic linking errors are encountered.
2025-09-28 21:30:34 -04:00
Andreas Kling
f00f975cf4 LibWeb: Treat percentage max-width as none during min-content sizing
...but only for non-replaced boxes. This is what CSS-SIZING-3 tells us
to do, and we were already doing it for width, but neglecting max-width.
2025-09-28 19:25:18 +02:00
Andreas Kling
652e52d76a LibWeb: Get ResizeObserver::m_document from Window directly
We don't have to go via the window's navigable to find the document
we're being created for. It's right there on the window.
2025-09-28 19:25:18 +02:00
Andreas Kling
d36e5098f8 LibWeb: Support percentage attributes on SVG rect element
This makes the IMDb logo have a yellow background as expected.
2025-09-28 19:25:18 +02:00
Callum Law
99dd648475 LibWeb: Disallow ASF in DOMMatrix constructor
We have no context to resolve ASFs against here so we should throw.
2025-09-28 17:43:25 +02:00
Tim Ledbetter
bf1564388d LibWeb: Serialize grid-template shorthand correctly 2025-09-28 17:34:58 +02:00
Timothy Flynn
cb6ca85564 LibJS: Handle relativeTo ZDTs that fall within second DST wallclock time
This is a normative change in the Temporal proposal. See:
1a089eb
2025-09-28 11:33:43 -04:00
Rocco Corsi
1ecb78897f Documentation: Add 'libtool' & 'perl-Time-Piece` to fedora dependencies 2025-09-28 11:26:10 -04:00
Rocco Corsi
adc78e9d54 LibJS: Correct line ending detection in debug output 2025-09-28 11:23:41 -04:00
Pavel Shliak
fb97fde15b Meta: Fix libjs-test262 CI workflow
libtool is required to build gperf
2025-09-28 11:22:55 -04:00
Tim Ledbetter
b2591309d6 LibWeb: Use preferred style for swift guard case clause
This stops `swift-format` complaining.
2025-09-27 20:38:47 +01:00