1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00
Commit graph

69488 commits

Author SHA1 Message Date
Callum Law
94f5a51820 LibWeb: Convert white-space CSS property to shorthand
This exposed a few bugs which caused the following tests to behave
incorrectly:
- `tab-size-text-wrap.html`: This previously relied on a bug where we
  incorrectly treated `white-space: pre` as allowing text wrapping. The
  fix here is to implement the text-wrap CSS shorthand property.

- `execCommand-preserveWhitespace.html`: We don't correctly serialize
  shorthand properties. This is covered by an existing FIXME in
  `CSSStyleProperties::serialized()`

- `white-space-shorthand.html`: The last 5 subtests here fail as we
  don't correctly handle shorthand properties in
  `CSSStyleProperties::remove_property()`. This is covered by an
  existing FIXME in said function.
2025-05-29 12:04:28 +02:00
Callum Law
9d06c86fe4 LibWeb: Support shorthands as relevant_css_property for editing commands 2025-05-29 12:04:28 +02:00
Callum Law
45689936f2 LibWeb: Support shorthand properties as presentational hints 2025-05-29 12:04:28 +02:00
Callum Law
9480b1fc5c LibWeb: Parse and propagate white-space-trim CSS property 2025-05-29 12:04:28 +02:00
Callum Law
50bdd2cb85 LibWeb: Parse and propagate text-wrap-mode CSS property 2025-05-29 12:04:28 +02:00
Callum Law
ea30356fba LibWeb: Parse and propagate white-space-collapse CSS property 2025-05-29 12:04:28 +02:00
R-Goc
3989059227 Libraries/Utilities/Tests: Build and test js.exe
This commit enables building and testing js.exe for windows. Needed
libraries are built in CI, and tests for those which pass were added.
Tests for LibJS which don't require javascripttestrunner were added but
the rest need to wait for that to be ported to windows.
2025-05-29 03:26:23 -06:00
R-Goc
b0cc87c276 Utilities: Port js.exe on windows without repl
This commit allows building js.cpp on windows. The repl functionality is
ifdef'ed out. To decrease the number of ifdefs the code that runs the
repl on Linux was moved into one place. Some globals that are unused as
a result of that are markes maybe_unused. The following commit enables
building and testing js in cmake for windows.
2025-05-29 03:26:23 -06:00
R-Goc
550aace91c Meta: Add flags for compilation and testing of js
This commit adds flags necessary for compilation and testing of js.exe.
The stack size is increased to match linux.
2025-05-29 03:26:23 -06:00
R-Goc
96c197faf1 LibJS: Add minimum changes to build on Windows and run js.exe
This commit adds the minimal export macros needed to run js.exe on
windows. A followup commit is planned to move to explicit export
entirely.

A static_assert for the size of a struct is also ifdef'ed out as the
semantics around object layout and inheritance are different on MSVC abi
and the struct IteratorRecord ends up being 40 bytes not 32.
2025-05-29 03:26:23 -06:00
Andrew Kaster
e67495e141 LibCrypto: Forward declare tommath types properly on Windows 2025-05-29 03:26:23 -06:00
R-Goc
f669af3a5c LibGC: Add the minimum export macros required to link LibJS
This approach still requires the WINDOWS_EXPORT_ALL_SYMBOLS target
property, but it does let us run a lot more tests than before.
2025-05-29 03:26:23 -06:00
R-Goc
d5cb940fe0 LibGC: Use native windows allocation methods for GC blocks
This allows us to use DiscardVirtualMemory in the same way that we
use madvise with MADV_DONTNEED and MADV_FREE on Unix systems.
2025-05-29 03:26:23 -06:00
Andreas Kling
00ad2bd758 LibWeb: Use the GC::RootVector deduction guides where helpful 2025-05-29 03:46:49 +02:00
Andreas Kling
5c5283492b LibWeb: Iterate safely in HTMLSelectElement::set_value()
We can't iterate over m_cached_list_of_options and call set_selected()
in the loop, since that may end up rebuilding m_cached_list_of_options,
disrupting iteration.
2025-05-29 03:46:49 +02:00
Andreas Kling
18d17385fb LibWeb: Remove leftover debugging hack in process_top_layer_removals() 2025-05-29 03:46:49 +02:00
Andreas Kling
2afe208328 LibWeb: Iterate safely in process_top_layer_removals()
We should not remove from a container while iterating over it, since
that may disrupt iteration.
2025-05-29 03:46:49 +02:00
Andreas Kling
59d46af946 LibWeb: Iterate safely in update_animations_and_send_events()
Make copies of the animation timeline list and animations to dispatch
events at before iterating over them. This ensures that they can't be
modified during iteration.
2025-05-29 03:46:49 +02:00
Andreas Kling
32769393a8 LibWeb: Iterate safely in invalidate_style_of_elements_affected_by_has()
We move m_pending_nodes_for_style_invalidation_due_to_presence_of_has to
a local variable before iterating over it. This ensures that nothing can
be added to it while iterating.
2025-05-29 03:46:49 +02:00
Andreas Kling
d5892c7c7a LibGC: Add some deduction guides for GC::RootVector
This makes is easy to construct a RootVector from a vector or span of
references to GC objects.
2025-05-29 03:46:49 +02:00
Andreas Kling
e0e09f71be RequestServer: Don't try to self-destruct already-destroyed request 2025-05-29 03:46:49 +02:00
Aliaksandr Kalenik
c2c9348636 LibWeb: Print FIXME instead of throwing NotSupportedError in WebAudio
This allows us to browse https://pierre.co/ instead of being navigated
to error screen.
2025-05-28 20:37:35 +02:00
Aliaksandr Kalenik
36a255eedd LibWeb: Fix glitchy CSS transitions
`start_needed_transitions()` decides which animations need to be started
based on previous and current style property values. Before this change,
we were using the style value without animations applied as the
"current" value. This caused issues such as starting a new transition
from the animation’s end value when an ongoing animation was
interrupted.
2025-05-28 17:35:59 +01:00
Aliaksandr Kalenik
62739c30d9 LibWeb: Schedule required invalidations when animation effect is removed
For example, if layout affecting property is animated then once this
animation is removed we need to schduled layout invalidation.
2025-05-28 17:35:59 +01:00
Aliaksandr Kalenik
6a029fb6d9 LibWeb: Reset animated CSS properties for pseudo elements
Previously we were resetting animated properties if animation effect's
target is not a pseudo element.
2025-05-28 17:35:59 +01:00
Andrew Kaster
c5071c9025 Tests: Re-enable TestLibCoreMappedFile and TestLibCoreStream
These tests previously only ran on SerenityOS. They needed test input
location changes. The Stream tests also needed to explicitly set
SO_REUSEADDR for the tcp servers.
2025-05-27 20:34:47 -06:00
Andrew Kaster
a94605febe CI: Bump swift toolchain to main-snapshot-2025-05-26 2025-05-27 20:33:42 -06:00
Andrew Kaster
e90a0dc69c CI: Update alternatives for llvm-symbolizer on Ubuntu jobs
Swift jobs were failing a test due to the llvm-symbolizer not being
available in the default location next to the clang binary. swift.org
toolchains don't ship this tool, so LSAN suppressions were not being
applied, failing TestWOFF2.

This was hard to reproduce locally, because I have always had a set of
alternatives set up for the full suite of LLVM tools on my machine.
2025-05-27 20:33:42 -06:00
Andrew Kaster
cd333fe3e9 CI: Use Blacksmith cache action only on Blacksmith runners
Their cache action only works on their runners. For jobs that run on
other runners, we have use the default cache action. At least until they
update their cache product to work or fallback on other runners.
2025-05-27 17:42:25 -06:00
Dan Berglund
d9e90d4556 AppKit: Check availability before using macOS 15 API in TabController
This keeps the code building on older macOS versions.
2025-05-27 13:39:24 -06:00
Dan Berglund
bd3135f8d3 CMake: Set default CMAKE_OSX_DEPLOYMENT_TARGET to 14.0
This makes the build system aware of which macOS version we're
targeting, and will make it an error to newer APIs without explicitly
checking the availability.

Note that the js REPL CI job still sets the deployment target to 11.0
explicitly.
2025-05-27 13:39:24 -06:00
Callum Law
6c3ceb9284 LibWeb: Don't crash when handling invalid HTTP status codes
Example crash: https://wpt.live/fetch/h1-parsing/status-code.window.html

There is still work to make the above tests pass.
2025-05-27 12:58:08 -06:00
Timothy Flynn
24da7b006e Meta: Change the ladybird.py target to be a positional argument
This affords us some API symmetry with ladybird.sh.
2025-05-27 20:02:37 +02:00
Timothy Flynn
25666390f6 Meta: Alias the "ladybird" target to "Ladybird" in ladybird.py
We do the same thing in ladybird.sh for convenience.
2025-05-27 20:02:37 +02:00
Timothy Flynn
e7fe2d3dab Meta: Do not pass non-existing extra arguments to addr2line build step
The variadic nature of the addr2line command is currently taken by the
`addresses` option.
2025-05-27 20:02:37 +02:00
Ruben
3263b629c6 LibWeb: Correct the calculation for right float intrusion
We used to subtract the maximum right margin of any containing box,
but we want to subtract the entire right margin instead. This yielded
incorrect intrusions for right floats not placed in the root.
2025-05-27 17:31:47 +02:00
Timothy Flynn
8e5cc74eb1 LibJS: Add notation to Intl.PluralRules
This is a normative change in the ECMA-402 spec. See:
a7ff535
2025-05-27 10:39:25 -04:00
Tim Ledbetter
b16f34767e LibWeb: Ensure discrete interpolated properties are non-transitionable
If a property is uses discrete interpolation and TransitionBehavior is
not set to `AllowDiscrete` that property should be non-transitionable.

This is now true for properties whose animation type is not discrete,
but the animation type falls back to discrete.
2025-05-27 13:33:29 +02:00
Jelle Raaijmakers
922bf2033f CI: Use Blacksmith's drop-in replacement for actions/cache
Their caches have better locality with their own runners and offer
higher potential throughput speeds (up to 400 MB/s).
2025-05-27 12:10:55 +02:00
Jelle Raaijmakers
090a7a90c3 CI: Switch over remaining runners to Blacksmith.sh
Everything that's not self-hosted or macOS is now pointing to
Blacksmith.sh. Nightly jobs and JS artifact builds use 8VCPU machines,
while regular integration builds & tests use 16VCPU machines.
2025-05-27 12:10:55 +02:00
Jelle Raaijmakers
8e9bf01917 CI: Rename os input to runner
This more clearly describes what the value is being used for, and avoids
some confusion between `os` and `os_name` in `lagom-template.yml`.
2025-05-27 12:10:55 +02:00
Jelle Raaijmakers
08b81b37b1 CI: Reindent inputs in lagom-template.yml 2025-05-27 12:10:55 +02:00
Jelle Raaijmakers
be766ecb30 CI: Switch over some workflows to Blacksmith.sh runners
The people over at Blacksmith.sh have generously offered usage of their
runners for our organization, so let's try to switch over some simple
workflows. The runners should be drop-in replacements.
2025-05-27 09:50:24 +02:00
Khaled Lakehal
9a071c9e89 LibWeb/HTML: Fix behavior when removing multiple from select element
This change ensures correct behavior when the `multiple` attribute is
removed from a `select` element, reducing the number of selected
`option` elements to one.

Fixes a failing WPT test:
https://wpt.live/html/semantics/forms/the-select-element/select-multiple.html
2025-05-27 18:58:31 +12:00
Shannon Booth
937994cfaa LibWeb: Make Environment's top level origin nullable
This matches the definition in the spec, and is also a step towards
removing the default constructor of URL::Origin.
2025-05-27 14:48:43 +12:00
Shannon Booth
556acd82ee LibWeb/Editing: Handle no active range in queryCommandState
Fixes a crash when this is invoked if no range is active for the
document.
2025-05-26 23:36:44 +02:00
Shannon Booth
7c7fec5e00 LibWeb/Editing: Pass normalized command name to editing AOs
As the internal algorithms perform case sensitive matching.
Fixes a crash in the included test, seen on gmail.com.
2025-05-26 23:36:44 +02:00
Rocco Corsi
70abe99bfd Tests: Add test for MimeType sniffing from filenames 2025-05-26 14:23:43 -06:00
Rocco Corsi
9281baffd8 LibCore: Recognize filenames .shellrc and CMakeLists.txt as text
There was a missing comma in the array, so these two entries were
concatenated accidentally.
2025-05-26 14:23:43 -06:00
Aliaksandr Kalenik
1647d7b34c LibJS: Use CallBuiltin for Math.tan() 2025-05-26 21:52:43 +02:00