This also adds support for `xyz` as it defaults to `xyz-d65`. We now
pass the following WPT tests:
- css/css-color/xyz-001.html
- css/css-color/xyz-002.html
- css/css-color/xyz-004.html
- css/css-color/xyz-d65-001.html
- css/css-color/xyz-d65-002.html
- css/css-color/xyz-d65-004.html
This will be usefully on its own later on when supporting this color
space directly, but it also allows us to do some factorization in the
current codebase.
If a & simple selector is on a style rule with no parent style rule,
then it behaves like :scope - but notably, :scope provides 1
specificity in the class category, but & is supposed to provide 0.
To solve this, we stop replacing it directly, and just handle the & like
any other simple selector. We know that if the selector engine ever
sees one, it's equivalent to :scope, because the nested ones will have
been replaced with :is() before that point.
This gets us one more subtest pass. :^)
When we first parse a nested CSSStyleRule's selectors, we treat them as
relative selectors and then patch them up with an `&` as needed.
However, we weren't doing this when assigning the `cssText` attribute.
So, let's do that!
This gives us a couple of subtest passes. :^)
We were delaying sending an IPC message until the HTML PortMessage
task was run, but we were not queuing the task in on the receiver
side. The result of this was that message port posting was
needlessly creating an HTML task just to send an IPC message.
On the flip side, we were directly calling dispatch_event from the
socket notifier of the target port's message queue. This is a huge
problem, because it means that we were effectively running
javascript-aware code from an 'in parallel' context.
By switching around which side of the IPC interface is responsible
for queuing a task, we can avoid problems where a document is
destroyed from a port message-attached callback and crashes.
The Gfx::Bitmap encoder and decoder have been replaced
by BitmapSequence in #1435, making them redundant and safe to remove.
Additionally, the base IPC::encode and IPC::decode implementations
will trigger a compiler error if these methods are called.
.ipc files already exclude references to Gfx::Bitmap.
This change fixes accessible-name computation for:
- an element that has empty text content but that also has a title
attribute (“tooltip”) with a non-empty value
- an img element whose alt attribute is the empty string but that also
has a “title” attribute with a non-empty value
Otherwise, without this change, the accessible name unexpectedly isn’t
computed correctly for those cases.
This lets us redraw the WebView while live resize events are ongoing. By
doing so, we can also update the window rect from within the WebView,
rather than requiring a separate method invocation (which the Inspector
and Task Manager windows were missing).
When the user resizes the browser window, AppKit will spin the current
run loop in the common mode. This patch allows socket events from IPC to
be processed while the resize is ongoing. This includes the WebView hook
to repaint.
Co-Authored-By: Andreas Kling <andreas@ladybird.org>
This adds the vcpkg triplets and CMake preset to perform release
builds for distribution. These builds are fully static, and currently
intended to be used for the `js` ESVU release.
In the future, linking everything statically into the final binary is
probably not what we will do for released Ladybird builds. Instead, we
may have a "libladybird.so", which is then linked into the binary. But
this should be fine for `js` for now.
As shown in the test added by this patch, it was possible to re-assign
the `this` value of a member function call while it was executing.
Let's copy the original this value like we already do with the callee.
Fixes#2226.
The dynamic shared lib build of skia doesn't seem to actually express
any dependencies in its DT_NEEDED section, so we need to force-load
fontconfig into the dependencies of the skia target to avoid runtime
linker errors.
For some reason, Microsoft have decided to remove Xcode 16 from macOS 14
images. We require Xcode 16 for Swift 6.
See: https://github.com/actions/runner-images/issues/10703
Because macOS 15 images are still in preview, their availability is much
lower than macOS 14 images. To hopefully alleviate the amount of time we
are waiting in the runner queue, for now this only upgrades the workflow
which uses Swift.
Paths in `headless-browser` tests were being compared by string value.
With this patch, they will be compared by their real path instead,
ensuring relative paths and symlinks are handled correctly.