Andreas Kling
8e49b69f42
LibWeb: Never split <svg> for inline continuations
...
This fixes an issue where we'd make an absolute mess from nested SVG
roots with display:block. Before this fix, the inner SVG root would
trigger the inline continuation logic and try to split the tree.
2025-07-12 14:11:41 +02:00
Andreas Kling
4e23882995
LibWeb: Use foreignObject's own size as available space inside it
...
This ensures that percentages resolve against the foreignObject's size
instead of the size of its containing block.
This makes user profile pictures clip correctly in the "Friends" view
of the Discord app.
2025-07-12 14:11:41 +02:00
Jelle Raaijmakers
c39edfab2d
Tests: Fix calculation of elapsed time in tests
...
We were already taking the "elapsed" part of the global timer, by
subtracting the known runtime from that we always ended up with 0
milliseconds.
2025-07-12 14:05:32 +02:00
Tim Ledbetter
4dd538e708
LibWeb/SVG: Prefer href
to xlink:href
attribute on images
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-07-12 13:13:47 +02:00
Tim Ledbetter
93a35895ae
LibWeb/SVG: Don't crash when changing SVG image href
...
Previously, a segfault could occur if `m_resource_request` was replaced
before its callbacks were invoked.
2025-07-12 13:13:47 +02:00
Ali Mohammad Pur
5b45223d5f
LibRegex: Account for uppercase characters in insensitive patterns
2025-07-12 11:26:23 +02:00
Tim Ledbetter
31e8189f9f
LibWeb/SVG: Implement the SVGAElement.referrerPolicy
attribute
2025-07-12 11:05:48 +02:00
Tim Ledbetter
d86f0a1b29
LibWeb/SVG: Implement the SVGAElement.target
attribute
2025-07-12 11:05:48 +02:00
Aliaksandr Kalenik
910fd426a2
LibWeb: Allow <svg>
to establish a stacking context
...
83b6bc4
went too far by forbidding SVGSVGElement from establishing a
stacking context. This element type does follow the behavior of CSS
boxes, unlike inner SVG elements like `<rect>`, `<circle>`, etc., which
are not supposed to be aware of concepts like stacking contexts,
overflow clipping, scroll offsets, etc.
This change allows us to delete overrides of `before_paint()` and
`after_paint()` in SVGPaintable and SVGSVGPaintable, because display
list recording code has been rearranged to take care of clipping and
scrolling before recursing into SVGSVGPaintable descendants.
`Screenshot/images/css-transform-box-ref.png` expectation is updated and
fixes a bug where a rectangle at the very bottom of the page was not
clipped correctly.
`Screenshot/images/svg-filters-lb-website-ref.png` has a more subtle
difference, but if you look closely, you’ll see it matches other
browsers more closely now.
2025-07-12 11:01:15 +02:00
Shannon Booth
79293a3cbc
LibWeb/XHR: Don't construct a String from a String
...
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
Serializing a URL already returns a String.
2025-07-12 02:57:36 +01:00
Luke Wilde
f50f23b19f
LibWeb/CSP: Implement the script-src-attr directive
2025-07-12 13:06:33 +12:00
Luke Wilde
f382bccc3d
LibWeb/CSP: Implement the script-src-elem directive
2025-07-12 13:06:33 +12:00
Tim Ledbetter
caf45f2317
LibWeb: Implement the SVGGeometryElement.pathLength
attribute
2025-07-12 11:49:10 +12:00
Aliaksandr Kalenik
410e82c9fd
LibWeb: Rearrange code such that a lot less files include Command.h
...
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (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
Build Dev Container Image / build (push) Has been cancelled
With this change number of recompiled files after modification of
`Command.h` goes down from >1000 to <100.
2025-07-11 17:37:27 +02:00
Callum Law
d980321a77
LibWeb: Include own shadow root in for_each_shadow_including_descendant
...
Fixes a crash in wpt.live/css/cssom/CSSStyleSheet-constructable.html
2025-07-11 16:21:11 +02:00
Luke Wilde
409758f040
Meta: Enable the zstd feature for curl
...
This content encoding is used by Facebook.
For example:
```
> GET /rsrc.php/v5/yj/l/0,cross/VNfVTw9fSM1.css HTTP/3
Host: static.xx.fbcdn.net
Accept-Encoding: deflate, gzip, br, zstd
Alt-Used: (nil):0
User-Agent: Mozilla/5.0 (macOS; AArch64) Ladybird/1.0
Accept: text/css,*/*;q=0.1
Accept-Language: en
Sec-Fetch-Dest: style
Sec-Fetch-Mode: cors
Origin: https://www.facebook.com
Sec-Fetch-Site: cross-site
Referer: https://www.facebook.com/
```
The response (with some headers removed for brevity):
```
< HTTP/3 200
< content-encoding: zstd
< content-type: text/css; charset=utf-8
< last-modified: Mon, 01 Jan 2001 08:00:00 GMT
< expires: Fri, 10 Jul 2026 07:47:17 GMT
< cache-control: public,max-age=31536000,immutable
< content-length: 7448
< date: Fri, 11 Jul 2025 11:52:03 GMT
< access-control-allow-origin: https://www.facebook.com
* Added alt-svc: static.xx.fbcdn.net:443 over h3
< alt-svc: h3=":443"; ma=86400
< priority: u=3,i
<
```
2025-07-11 14:16:07 +02:00
Jelle Raaijmakers
0fccc75fd7
Meta: Remove bookmarks.json
...
This seems to be unused.
2025-07-11 14:04:23 +02:00
Jelle Raaijmakers
97fa0be16e
LibWeb: Implement SVGAnimatedNumber
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-07-11 11:25:59 +01:00
Jelle Raaijmakers
ffcf91cd30
LibWeb: Correct initialization order for SVGFE*Element
...
We should first set the prototype before initializing our base,
otherwise e.g. attributes will simply not work.
2025-07-11 11:25:59 +01:00
Callum Law
1a0d4487a8
LibWeb: Implement matches attribute on CSSSupportsRule and CSSMediaRule
...
Gains us 4 WPT tests.
2025-07-11 10:57:19 +02:00
Callum Law
fc395f9824
Tests: Always load WPT interfaces from root interfaces directory
...
Previously we would load from "../interfaces" which wouldn't work for
nested tests.
2025-07-11 10:57:19 +02:00
ayeteadoe
ccb87b4cb4
Tests/LibGfx: Enable file based tests on Windows
...
These actually were always working since we first enabling LibGfx
on Windows. I was just running them outside of the ctest context
and therefore had the wrong working directory so the test-inputs folder
could not be found
2025-07-11 10:54:37 +02:00
Tim Ledbetter
88efb362c4
LibWeb: Remove UA styles for h1 in article, aside, nav and section
2025-07-11 08:24:32 +02:00
Jelle Raaijmakers
2998049fe9
LibWeb: Implement the unreachable scrollable overflow
...
Whenever we end up with a scrollable overflow rect that goes beyond
either of its axes (i.e. the rect has a negative X or Y position
relative to its parent's absolute padding box position), we need to clip
that rect to prevent going into the "unreachable scrollable overflow".
This fixes the horizontal scrolling on https://ladybird.org (gets more
pronounced if you make the window very narrow).
2025-07-11 08:23:46 +02:00
Shannon Booth
05ddf5c718
LibWeb/DOM: Add StorageEvent and DragEvent to Document.createEvent
...
We have since implemented these interfaces.
2025-07-11 08:22:36 +02:00
Shannon Booth
1d5ca2ae80
Tests/LibWeb: Import WPT Document-createEvent WPT tests
2025-07-11 08:22:36 +02:00
Andrew Kaster
c2a37e693c
Utilites: Remove extra dashes from raw strings argument to js
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
Build Dev Container Image / build (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-07-10 16:28:40 -06:00
Olekoop
d6ea941208
Meta: Fix linker issue when compiling for Android
2025-07-10 15:44:53 -06:00
Olekoop
f26a898ffc
Android: Workaround the system certificate issue
...
Due to removal of local ca-certificates we need to use system's
certificate. However, on Android it is stored in multiple files.
Ladybird doesn't support multiple certificates yet, so we just
concatenate all of them into one big file.
2025-07-10 15:44:53 -06:00
Olekoop
0738852466
Documentation: Update the version of Android Studio
2025-07-10 15:44:53 -06:00
Olekoop
e65a38bb0e
Meta: Enable Vulkan and ANGLE when compiling for Android
...
Vulkan seems to have been disabled due to not being able to compile.
However, it compiles on my machine and it works on my phone.
As for ANGLE, someone just forgot about Android.
2025-07-10 15:44:53 -06:00
Olekoop
af2d46bd3d
LibMedia+Meta: Enable FFmpeg under Android and remove the stubs
...
The licensing issue seems to be resolved (#2214 ).
The stubs are not longer necessary. Even if they were, they do not
compile properly.
2025-07-10 15:44:53 -06:00
Olekoop
a70fade461
Documentation: Remove metions about Android port not working
2025-07-10 15:44:53 -06:00
Olekoop
f6c90d00a9
Meta: Don't compile libproxy for Android
...
libproxy isn't availiable for Android.
2025-07-10 15:44:53 -06:00
Olekoop
4b384a3593
Meta: Add a workaround when compiling for Android
...
We shouldn't do any of this but it's necessary in order to link it
properly.
2025-07-10 15:44:53 -06:00
Olekoop
834eb04d33
ImageDecoder: Make it compile for Android
2025-07-10 15:44:53 -06:00
Olekoop
6f350c51fd
Android: Keep up with the times
...
While some of the changes are due to syntax and have no effect on
the functionality, others are more important.
The major changes are
- Use Painter instead of now removed DeprecatedPainter
- Remove the need of LibArchive by using Java's native zip support
- Have a proper C++23 compiler by updating NDK to r29 beta 2
- Store user data and config in an user accessible way
- Update AGP to 8.11 and update compile target to SDK level 35
2025-07-10 15:44:53 -06:00
Jelle Raaijmakers
c99a467cdb
LibWeb: Do not crash when navigating to mailto:
links
...
We forgot to implement a couple of "otherwise," statements from the
"populating a session history entry" spec. While we're here, let's
update the spec copy where relevant.
2025-07-10 22:43:30 +02:00
Jelle Raaijmakers
d822b96786
LibWeb: Remove setting the Skia backend context in Navigable
...
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 is unused. The backend context is also referenced in the Skia
player, which we move to the rendering thread.
2025-07-10 15:27:58 +02:00
Shannon Booth
bd6581fe22
LibRegex: Correctly use ClassSetReservedPunctuator in ClassSetCharacter
...
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
We had typo'd using ClassSetReservedDoublePunctuator which was
resulting in a parse error for the regex:
([^\\:]+?)
With the 'v' flag set.
Co-Authored-By: Ali Mohammad Pur <mpfard@serenityos.org>
2025-07-10 11:41:02 +02:00
Jelle Raaijmakers
3a232880ed
Meta: Remove Polar from FUNDING.yml and FAQ.md
...
The issue bounty system was discontinued, so remove it from our GitHub
repo's sponsoring links and documentation.
2025-07-10 10:04:33 +02:00
Lucien Fiorini
8b1f1ae87a
js: Rename the --disable-string-quotes flag to --raw-strings
...
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
Build Dev Container Image / build (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
Since it does more than removing the quotes by escaping the string too
It makes sense to change the name of the flag to something more close
to what it's really doing.
2025-07-09 18:30:02 -06:00
Lucien Fiorini
8caa7c89cf
js: Safely acquire print target AK::Stream
...
Flush the buffered output stream before acquiring an unbuffered
AK::Stream and add support for newline within the print function.
2025-07-09 18:30:02 -06:00
ayeteadoe
8b778de36b
Meta: Update vcpkg for patched libjxl port and remove our overlay port
2025-07-09 17:52:32 -06:00
Ben Eidson
3aff12bbab
LibWeb/WebAudio: Implement AudioNode::disconnect()
...
Destubs AudioNode::disconnect() and its related overloads.
Ensures that inverse connections are properly removed
when disconnecting AudioNodeConnections. Adds associated
WPT but skips them for now because they rely on
OfflineRenderContext::start_rendering to be fully implemented.
2025-07-09 17:52:06 -06:00
ayeteadoe
75d26b1610
CMake: Improve preset display names and descriptions
...
Now all configure and build presets have consistently formatted
display names with useful content
2025-07-09 16:26:59 -06:00
Andrew Kaster
fa003fb2b0
LibTest: Move declaration of JS main target around to avoid CMake bug
...
For some reason, with CMake 4.0.3 and the Swift language enabled, this
target was getting random tokens in the compile commands. Moving it up
to the top of the file seems to fix this.
2025-07-09 16:26:49 -06:00
Andrew Kaster
a0b902cca1
CMake: Set visibility flags with add_cxx_compile_options() helper
...
This makes the flags not break Swift builds
2025-07-09 16:26:49 -06:00
Andrew Kaster
3040ca4311
LibWeb: Remove noisy debug messages from HTMLParser
2025-07-09 16:26:49 -06:00
Andrew Kaster
ce01236000
Meta: Update swift version to 2025-06-22
2025-07-09 16:26:49 -06:00