GithubHelp home page GithubHelp logo

ladybirdbrowser / ladybird Goto Github PK

View Code? Open in Web Editor NEW
13.2K 114.0 528.0 310.55 MB

Truly independent web browser

Home Page: https://ladybird.org

License: BSD 2-Clause "Simplified" License

Shell 0.15% Python 0.23% C++ 84.59% C 0.10% CMake 0.70% JavaScript 8.04% HTML 5.25% CSS 0.10% Kotlin 0.06% Java 0.01% Objective-C 0.03% Objective-C++ 0.71% Nix 0.01% Dockerfile 0.01% Swift 0.01%
browser browser-engine

ladybird's Introduction

Ladybird

Ladybird is a truly independent web browser, using a novel engine based on web standards.

Important

Ladybird is in a pre-alpha state, and only suitable for use by developers

Features

We aim to build a complete, usable browser for the modern web.

Ladybird uses a multi-process architecture with a main UI process, several WebContent renderer processes, an ImageDecoder process, and a RequestServer process.

Image decoding and network connections are done out of process to be more robust against malicious content. Each tab has its own renderer process, which is sandboxed from the rest of the system.

At the moment, many core library support components are inherited from SerenityOS:

  • LibWeb: Web rendering engine
  • LibJS: JavaScript engine
  • LibWasm: WebAssembly implementation
  • LibCrypto/LibTLS: Cryptography primitives and Transport Layer Security
  • LibHTTP: HTTP/1.1 client
  • LibGfx: 2D Graphics Library, Image Decoding and Rendering
  • LibArchive: Archive file format support
  • LibUnicode: Unicode and locale support
  • LibAudio, LibMedia: Audio and video playback
  • LibCore: Event loop, OS abstraction layer
  • LibIPC: Inter-process communication

How do I build and run this?

See build instructions for information on how to build Ladybird.

Ladybird runs on Linux, macOS, Windows (with WSL2), and many other *Nixes.

How do I read the documentation?

Code-related documentation can be found in the documentation folder.

Get in touch and participate!

Join our Discord server to participate in development discussion.

Before opening an issue, please see the issue policy.

A general guide for contributing can be found in CONTRIBUTING.md.

License

Ladybird is licensed under a 2-clause BSD license.

ladybird's People

Contributors

adkaster avatar alimpfard avatar atkinssj avatar awesomekling avatar benwiederhake avatar bertaland avatar bgianfo avatar bugaevc avatar gmta avatar gunnarbeutner avatar hendiadyoin1 avatar idanho avatar itamar8910 avatar kalenikaliaksandr avatar kennethmyhra avatar kleinesfilmroellchen avatar krkk avatar linusg avatar lubrsi avatar lucaschollet avatar macdue avatar mattco98 avatar nico avatar shannonbooth avatar supercomputer7 avatar tcl3 avatar thankyouverycool avatar timschumi avatar tomuta avatar trflynn89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ladybird's Issues

could support for docker?

Is it possible to add docker support?

As far as I know, all remote web is currently published based on docker builds, which makes it compatible with almost any system architecture. I see that the documentation is differentiating between multiple systems, which makes it actually very cumbersome to maintain and locate problems. Hopefully this can be considered as a docker release so that the problem would only be in the difference between arm and amd.

Translated with DeepL.com (free version)

--

请问可以添加docker支持吗?

据我所知,目前所有的远程web都是基于docker构建发布的,这样可以兼容几乎所有系统的结构。我看到文档是区分了多个系统,这样维护和定位问题其实非常麻烦。希望可以考虑作为docker发布,这样问题只会在arm和amd的区别上。

LibWeb: HTTP fetch request from inside a Worker hangs

Currently any fetch request to a http or https address happening inside a Worker will hang indefinitely.

This can be reproduced by following these steps:

  • Put the following files into a folder:

worker-fetch-test.html:

<!DOCTYPE html>
<script>
    const worker = new Worker("worker-fetch-test.js");
    worker.onmessage = (evt) => {
        console.log(`Fetch request completed. Content: ${evt.data}`);
    };
</script>

worker-fetch-test.js:

fetch("./test.file")
    .then(response => response.text())
    .then(text => self.postMessage(text));

test.file:

Fetch works correctly!
  • cd into the folder containing the above files
  • Start a HTTP server with python3 -m http.server 8080
  • Visit http://localhost:8080/worker-fetch-test.html in Ladybird
  • The message "Fetch request completed. Content: Fetch works correctly!" should be printed to the console, but currently nothing happens.
    NOTE: This behavior seems to occur intermittently. You may need to refresh the page to get it to hang.

The hang occurs because EAGAIN is returned when the response data is read.

I previously attempted to fix this issue in d0f88d4 but the change ended up having to be reverted.

Meta: ladybird.sh run does not quit the browser on ctrl+c on macOS

After we refactored ladybird.sh run to use open to open the browser's app bundle, ctrl+c in the terminal that spawned the app no longer quits the app.

We should use the proper open flags or shell trickery to make sure that ctrl+c in the terminal actually quits the app instead of leaving it open.

LibWeb: Text/input/WebAnimations/misc/DocumentTimeline.html frequently fails on CI

Doesn't repro locally, so maybe a timing issue.
CC @mattco98

--- /home/runner/work/ladybird/ladybird/Tests/LibWeb/Text/expected/./WebAnimations/misc/DocumentTimeline.txt
+++ /home/runner/work/ladybird/ladybird/Tests/LibWeb/Text/expected/./WebAnimations/misc/DocumentTimeline.txt
@@ -1,3 +1,3 @@
 new timeline time equals document timeline time: true
-new timeline originTime defaults to 0: true
-new timeline originTime offsets from document timeline: true
+new timeline originTime defaults to 0: false
+new timeline originTime offsets from document timeline: false

Getting and putting ImageData on a canvas swaps Red and Blue channels

<script>
let area = document.createElement("canvas");
let areaCtx = area.getContext("2d");

area.width = 32;
area.height = 32;
  
areaCtx.fillStyle = "#ffffff";
areaCtx.fillRect(0, 0, 32, 32);

{
  let imageData = areaCtx.getImageData(0, 0, area.width, area.height);

  imageData.data[0] = 255;
  imageData.data[1] = 0;
  imageData.data[2] = 0;

  areaCtx.putImageData(imageData, 0, 0);
}

{
  let imageData = areaCtx.getImageData(0, 0, area.width, area.height);

  if (imageData.data[0] == 255) {
    console.log("PASS");
  } else {
    console.log("FAIL");
  }
}
</script>

The above minimal code reproduces this behavior, also can be seen on https://circl-lastname.github.io/Pixedit/

LibWeb: Crash when navigating backwards from Wikipedia media files

To reproduce:

This results in a crash with the following stack trace:

VERIFICATION FAILED: m_current_entry_index != -1 at /home/tim/repos/ladybird/Userland/Libraries/LibWeb/HTML/Navigation.cpp:1429
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-ak.so.0(ak_verification_failed+0xc1) [0x7c65aefa3b71]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::Navigation::update_the_navigation_api_entries_for_a_same_document_navigation(JS::NonnullGCPtr<Web::HTML::SessionHistoryEntry>, Web::Bindings::NavigationType) 0x414) [0x7c65af90e354]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::DOM::Document::update_for_history_step_application(JS::NonnullGCPtr<Web::HTML::SessionHistoryEntry>, bool, unsigned long, unsigned long, AK::Optional<AK::Vector<JS::NonnullGCPtr<Web::HTML::SessionHistoryEntry>, 0ul> >, bool) 0x5a8) [0x7c65af6f8518]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0x9af39c) [0x7c65af9af39c]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::Task::execute() 0x49) [0x7c65af82e7d9]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0x82dcf6) [0x7c65af82dcf6]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0xaf16c9) [0x7c65afaf16c9]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::EventLoop::spin_until(AK::Function<bool ()>) 0x9f) [0x7c65b077f18f]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Platform::EventLoopPluginSerenity::spin_until(JS::SafeFunction<bool ()>) 0x11b) [0x7c65afaf0a5b]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::EventLoop::spin_processing_tasks_with_source_until(Web::HTML::Task::Source, JS::SafeFunction<bool ()>) 0x113) [0x7c65af82db23]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::TraversableNavigable::apply_the_history_step(int, bool, AK::Optional<Web::HTML::SourceSnapshotParams>, JS::GCPtr<Web::HTML::Navigable>, AK::Optional<Web::HTML::UserNavigationInvolvement>, AK::Optional<Web::Bindings::NavigationType>, Web::HTML::TraversableNavigable::SynchronousNavigation) 0xb4b) [0x7c65af9ad9bb]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::TraversableNavigable::apply_the_traverse_history_step(int, AK::Optional<Web::HTML::SourceSnapshotParams>, JS::GCPtr<Web::HTML::Navigable>, Web::HTML::UserNavigationInvolvement) 0x73) [0x7c65af9ae043]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0x9ae128) [0x7c65af9ae128]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0x980c29) [0x7c65af980c29]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::Timer::timer_event(Core::TimerEvent&) 0xb2) [0x7c65b07a09b2]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::EventReceiver::dispatch_event(Core::Event&, Core::EventReceiver*) 0x4d) [0x7c65b07864ed]
/home/tim/repos/ladybird/Build/ladybird/libexec/WebContent(+0x4d8cd) [0x5957a7dd68cd]
/lib/x86_64-linux-gnu/libQt6Core.so.6(+0x183d9b) [0x7c65b0d83d9b]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QTimer::timeout(QTimer::QPrivateSignal) 0x3d) [0x7c65b0d8ed6d]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QObject::event(QEvent*) 0x1c6) [0x7c65b0d76576]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QCoreApplication::notifyInternal2(QObject*, QEvent*) 0xf6) [0x7c65b0d38416]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QTimerInfoList::activateTimers() 0x36b) [0x7c65b0e7b7ab]
/lib/x86_64-linux-gnu/libQt6Core.so.6(+0x333a29) [0x7c65b0f33a29]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5d5b5) [0x7c65ac1145b5]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xbc717) [0x7c65ac173717]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x7c65ac113a53]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x6f) [0x7c65b0f315ef]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 0x2e3) [0x7c65b0d429a3]
/home/tim/repos/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::EventLoop::exec() 0x4a) [0x7c65b077f32a]
/home/tim/repos/ladybird/Build/ladybird/libexec/WebContent(+0x5a23e) [0x5957a7de323e]
/home/tim/repos/ladybird/Build/ladybird/libexec/WebContent(main+0xf6) [0x5957a7dd58e6]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x7c65abe2a1ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x7c65abe2a28b]
/home/tim/repos/ladybird/Build/ladybird/libexec/WebContent(+0x4ca15) [0x5957a7dd5a15

This crash happens for any media file associated with an article like this. I would expect navigating backwards to show the article page.

LibJS: Crash on vscode.dev due to empty JS::Value

To reproduce, open https://vscode.dev/

Looks async function related.

VERIFICATION FAILED: !is_empty() at /home/kling/src/ladybird/Userland/Libraries/LibJS/Runtime/Value.cpp:548
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-ak.so.0(ak_verification_failed+0xef) [0x7b4378d28c7f]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::Value::to_object(JS::VM&) const 0x20b) [0x7b43770f592b]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0(+0x277435) [0x7b4376e77435]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_bytecode(unsigned long) 0xc4a5) [0x7b4376e5c875]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_executable(JS::Bytecode::Executable&, AK::Optional<unsigned long>, JS::Value) 0x20d) [0x7b4376e500dd]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::GeneratorObject::execute(JS::VM&, JS::Completion const&) 0x163) [0x7b4376f682e3]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::GeneratorObject::resume(JS::VM&, JS::Value, AK::Optional<AK::StringView> const&) 0x124) [0x7b4376f68774]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::AsyncFunctionDriverWrapper::continue_async_execution(JS::VM&, JS::Value, bool, JS::AsyncFunctionDriverWrapper::IsInitialExecution) 0x44) [0x7b4376f1c0a4]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0(+0x31cb78) [0x7b4376f1cb78]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0(+0x3d097b) [0x7b4376fd097b]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::NativeFunction::internal_call(JS::Value, AK::Span<JS::Value const>) 0x191) [0x7b4376fd04d1]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0x8e5df2) [0x7b4377ae5df2]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0(+0x3620ab) [0x7b4376f620ab]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0(+0x3f2990) [0x7b4376ff2990]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0x8e8955) [0x7b4377ae8955]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0x8e6409) [0x7b4377ae6409]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0x8c0d1f) [0x7b4377ac0d1f]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::EventLoop::perform_a_microtask_checkpoint() 0xfc) [0x7b4377cffb1c]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::ClassicScript::run(Web::HTML::ClassicScript::RethrowErrors, JS::GCPtr<JS::Environment>) 0xdc) [0x7b4377dcf67c]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLScriptElement::execute_script() 0x207) [0x7b4377d5ca07]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLScriptElement::prepare_script() 0x1213) [0x7b4377d5dd43]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLParser::handle_text(Web::HTML::HTMLToken&) 0x125) [0x7b4377da7755]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLParser::run(Web::HTML::HTMLTokenizer::StopAtInsertionPoint) 0x17e) [0x7b4377d9f75e]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLParser::run(URL::URL const&, Web::HTML::HTMLTokenizer::StopAtInsertionPoint) 0x11f) [0x7b4377da0a9f]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0xd1896b) [0x7b4377f1896b]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0(+0x71cdf) [0x7b4378dd2cdf]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::ThreadEventQueue::process() 0x197) [0x7b4378de7de7]

LibWeb: Crash in `ScaledFont::glyph()` on https://chatgpt.com/auth/login

When loading http://chat.openai.com the WebContent process crashes with the following stack trace:

#0  ak_verification_failed () at /home/tim/repos/ladybird/AK/Assertions.cpp:108
#1  0x00007fb4d935664c in AK::RefPtr<Gfx::Bitmap>::as_nonnull_ptr () at /home/tim/repos/ladybird/AK/RefPtr.h:280
#2  AK::RefPtr<Gfx::Bitmap>::operator* () at /home/tim/repos/ladybird/AK/RefPtr.h:249
#3  Gfx::ScaledFont::glyph () at /home/tim/repos/ladybird/Userland/Libraries/LibGfx/Font/ScaledFont.cpp:93
#4  0x00007fb4d944b778 in Gfx::Painter::draw_glyph () at /home/tim/repos/ladybird/Userland/Libraries/LibGfx/Painter.cpp:852
#5  0x00007fb4dab243f0 in Web::Painting::CommandExecutorCPU::draw_glyph_run () at /home/tim/repos/ladybird/Userland/Libraries/LibWeb/Painting/CommandExecutorCPU.cpp:39
#6  0x00007fb4dab2b09d in Web::Painting::CommandList::execute () at /home/tim/repos/ladybird/Userland/Libraries/LibWeb/Painting/CommandList.cpp:152
#7  0x000055b2be1c4f6e in WebContent::PageClient::paint () at /home/tim/repos/ladybird/Userland/Services/WebContent/PageClient.cpp:232
#8  0x000055b2be1c5003 in WebContent::PageClient::paint_next_frame () at /home/tim/repos/ladybird/Userland/Services/WebContent/PageClient.cpp:194
#9  0x00007fb4da88f771 in operator() () at /home/tim/repos/ladybird/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp:332
#10 operator()<Web::HTML::EventLoop::process()::<lambda(Web::DOM::Document&)> > () at /home/tim/repos/ladybird/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp:199
#11 Web::HTML::EventLoop::process () at /home/tim/repos/ladybird/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp:325
#12 0x00007fb4dab7e2f9 in JS::SafeFunction<void ()>::operator()() const () at /home/tim/repos/ladybird/Userland/Libraries/LibJS/SafeFunction.h:85
#13 operator() () at /home/tim/repos/ladybird/Userland/Libraries/LibWeb/Platform/TimerSerenity.cpp:23
#14 call () at /home/tim/repos/ladybird/AK/Function.h:192
#15 0x00007fb4dbde4db2 in AK::Function<void ()>::operator()() const () at /home/tim/repos/ladybird/AK/Function.h:125
#16 Core::Timer::timer_event () at /home/tim/repos/ladybird/Userland/Libraries/LibCore/Timer.cpp:97
#17 0x00007fb4dbdc768d in Core::EventReceiver::dispatch_event () at /home/tim/repos/ladybird/Userland/Libraries/LibCore/EventReceiver.cpp:162
#18 0x000055b2be13e357 in qt_timer_fired () at /home/tim/repos/ladybird/Ladybird/Qt/EventLoopImplementationQt.cpp:88
#19 operator() () at /home/tim/repos/ladybird/Ladybird/Qt/EventLoopImplementationQt.cpp:102
#20 call () at /usr/include/qt6/QtCore/qobjectdefs_impl.h:137
#21 call<QtPrivate::List<>, void> () at /usr/include/qt6/QtCore/qobjectdefs_impl.h:345
#22 impl () at /usr/include/qt6/QtCore/qobjectdefs_impl.h:555
#23 0x00007fb4dc3a17b7 in ??? () at /usr/lib/libQt6Core.so.6
#24 0x00007fb4dc3a9945 in QTimer::timerEvent(QTimerEvent*) () at /usr/lib/libQt6Core.so.6
#25 0x00007fb4dc38c089 in QObject::event(QEvent*) () at /usr/lib/libQt6Core.so.6
#26 0x00007fb4dc344de3 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6

This appears to be related to changes introduced in #42

Tested on commit: 7a77130

CC: @awesomekling

CSS Grid: Broken layout on brave.com, needs grid-column fix

image

Simplified reduction:

<!doctype html><style>
    * { outline: 1px solid black; }
    body {
        width: 800px;
        display: grid;
        grid-template-columns:
            minmax(0, 250px)
            [main-content-start] minmax(0, 1fr)
            [main-content-end] minmax(0, 400px);
      }
    div {
        grid-column: main-content;
    }
</style><body><div>hello

Can’t load IPv6-only websites

RequestServer(104857:104875): ConnectionCache: Connection to https://ipv6.google.com/ failed: Could not resolve to IPv4 address
RequestServer(104857:104875): Request with a null socket finished for URL https://ipv6.google.com/
WebContent(104890): ResourceLoader: Failed load of: "https://ipv6.google.com/", Error: Load failed, Duration: 11ms

https://ipv6-test.com/ also fails every IPv6 test. I’m on a functional dual-stack network where IPv6 works in my other browsers. Today is the 12th anniversary of World IPv6 Day. 🌐

Version f98e289, on Manjaro 24, Linux Kernel 6.7.12.

WebContnet Process Crashes repeatedly attempting to load fonts on MacOS

VERIFICATION FAILED: !is_error() at ~/ladybird/AK/Error.h:202
0   liblagom-ak.0.0.0.dylib             0x0000000102e008cc ak_verification_failed + 216
1   liblagom-gfx.0.0.0.dylib            0x0000000102f04570 OpenType::Name::string_for_id(OpenType::Name::NameId) const + 788
2   liblagom-gfx.0.0.0.dylib            0x0000000102efe134 OpenType::Font::family() const + 120
3   liblagom-gfx.0.0.0.dylib            0x0000000102efa8d4 void Core::Resource::for_each_descendant_file<Gfx::FontDatabase::load_all_fonts_from_uri(AK::StringView)::$_0>(Gfx::FontDatabase::load_all_fonts_from_uri(AK::StringView)::$_0&&) const::'lambda'(Core::Resource const&)::operator()(Core::Resource const&) const + 308
4   liblagom-gfx.0.0.0.dylib            0x0000000102ef975c Gfx::FontDatabase::load_all_fonts_from_uri(AK::StringView) + 472
5   WebContent                          0x000000010225ef74 Ladybird::FontPlugin::FontPlugin(bool) + 272
6   WebContent                          0x00000001021d3204 serenity_main(Main::Arguments) + 1212
7   WebContent                          0x000000010226bb20 main + 216
8   dyld                                0x00000001939ee0e0 start + 2360
5602790.568 Ladybird(82026): WebContent process crashed!
5602790.568 Ladybird(82026): WebContent has crashed 5 times in quick succession! Not restarting...

Running macOS Sonoma 14.4.1 (23E224), this may be related to #31 but I'm unable to determine that. Built from this commit. 862fc91

This happens when opening a new tab.

crash on engadget.com

image

Click on article picture, then on the article title, then article picture, then on the article title

VERIFICATION FAILED: m_ptr at /mnt/avb/work/ladybird/Userland/Libraries/LibJS/Heap/GCPtr.h:174
/usr/local/libexec/../lib/liblagom-ak.so.0(ak_verification_failed+0xbb) [0x7b545f7abe2b]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::DOM::Document::inclusive_ancestor_navigables() 0x10c) [0x7b54606d4adc]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::HTML::NavigableContainer::shared_attribute_processing_steps_for_iframe_and_frame(bool) 0x245) [0x7b54608f50c5]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLIFrameElement::process_the_iframe_attributes(bool) 0x1bc) [0x7b546085eafc]
/usr/local/libexec/../lib/liblagom-web.so.0(+0x85f422) [0x7b546085f422]
/usr/local/libexec/../lib/liblagom-web.so.0(+0x8f33c8) [0x7b54608f33c8]
/usr/local/libexec/../lib/liblagom-web.so.0(+0x96dbc9) [0x7b546096dbc9]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::Timer::timer_event(Core::TimerEvent&) 0xb2) [0x7b545ff27e82]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::EventReceiver::dispatch_event(Core::Event&, Core::EventReceiver*) 0x4d) [0x7b545ff0e12d]
/usr/local/libexec/WebContent(+0x3d797) [0x602ba39c1797]
/usr/lib/libQt6Core.so.6(+0x19b57f) [0x7b5461b9b57f]
/usr/lib/libQt6Core.so.6 QTimer::timerEvent(QTimerEvent*) 0xa5) [0x7b5461ba0d05]
/usr/lib/libQt6Core.so.6 QObject::event(QEvent*) 0x226) [0x7b5461b8c0e6]
/usr/lib/libQt6Core.so.6 QCoreApplication::notifyInternal2(QObject*, QEvent*) 0x133) [0x7b5461b3fdf3]
/usr/lib/libQt6Core.so.6 QTimerInfoList::activateTimers() 0x5c8) [0x7b5461cb7988]
/usr/lib/libQt6Core.so.6(+0x3957c9) [0x7b5461d957c9]
/usr/lib/libglib-2.0.so.0(+0x5ca89) [0x7b545c50ea89]
/usr/lib/libglib-2.0.so.0(+0xbe9b7) [0x7b545c5709b7]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x35) [0x7b545c50df95]
/usr/lib/libQt6Core.so.6 QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) 0x89) [0x7b5461d93389]
/usr/local/libexec/WebContent(+0x3d359) [0x602ba39c1359]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::EventLoop::spin_until(AK::Function<bool ()>) 0xbd) [0x7b545ff0707d]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::Platform::EventLoopPluginSerenity::spin_until(JS::SafeFunction<bool ()>) 0x10a) [0x7b5460ae3bba]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::HTML::EventLoop::spin_until(JS::SafeFunction<bool ()>) 0xee) [0x7b5460819f6e]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLParser::the_end(JS::NonnullGCPtrWeb::DOM::Document, JS::GCPtrWeb::HTML::HTMLParser) 0x3f4) [0x7b5460926154]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLParser::run(URL::URL const&, Web::HTML::HTMLTokenizer::StopAtInsertionPoint) 0x2ec) [0x7b546092663c]
/usr/local/libexec/../lib/liblagom-web.so.0(+0xae48d9) [0x7b5460ae48d9]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::ThreadEventQueue::process() 0x3de) [0x7b545ff2788e]
/usr/local/libexec/WebContent(+0x3d91d) [0x602ba39c191d]
/usr/local/libexec/WebContent(+0x3e94c) [0x602ba39c294c]
/usr/lib/libQt6Core.so.6 QCoreApplication::notifyInternal2(QObject*, QEvent*) 0x133) [0x7b5461b3fdf3]
/usr/lib/libQt6Core.so.6 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) 0x362) [0x7b5461b401d2]
/usr/lib/libQt6Core.so.6(+0x3959ac) [0x7b5461d959ac]
/usr/lib/libglib-2.0.so.0(+0x5ca89) [0x7b545c50ea89]
/usr/lib/libglib-2.0.so.0(+0xbe9b7) [0x7b545c5709b7]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x35) [0x7b545c50df95]
/usr/lib/libQt6Core.so.6 QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) 0x89) [0x7b5461d93389]
/usr/lib/libQt6Core.so.6 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) 0x1b0) [0x7b5461b48350]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::EventLoop::exec() 0x44) [0x7b545ff071e4]
/usr/local/libexec/WebContent(+0x49c44) [0x602ba39cdc44]
/usr/local/libexec/WebContent(main+0x81) [0x602ba39c0801]
/usr/lib/libc.so.6(+0x25c88) [0x7b545cc39c88]
/usr/lib/libc.so.6(__libc_start_main+0x8c) [0x7b545cc39d4c]
/usr/local/libexec/WebContent(+0x3c9a5) [0x602ba39c09a5]
101277.596 Ladybird(122962): WebContent process crashed!

Crash when navigating backwards to about:newtab

Repro:

  • Start Ladybird (i.e. ./Meta/ladybird.sh run ladybird).
  • Type any URL in the URL bar and navigate to the URL.
  • Press the back buton to return to the previous about:newtab page.

It seems like the URL doesn't matter as long as the flow is fresh browser start -> any reachable website -> back to initial newtab page.

VERIFICATION FAILED: m_ptr at /mnt/Dev/Projects/oss/ladybird/Userland/Libraries/LibJS/Heap/GCPtr.h:168
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-ak.so.0(ak_verification_failed+0xbb) [0x755f0c30b4fb]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::MixedContent::should_fetching_request_be_blocked_as_mixed_content(Web::Fetch::Infrastructure::Request&) 0x16c) [0x755f0b100b7c]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Fetch::Fetching::main_fetch(JS::Realm&, Web::Fetch::Infrastructure::FetchParams const&, Web::Fetch::Fetching::Recursive) 0x8b) [0x755f0adf4e4b]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Fetch::Fetching::fetch(JS::Realm&, Web::Fetch::Infrastructure::Request&, Web::Fetch::Infrastructure::FetchAlgorithms const&, Web::Fetch::Fetching::UseParallelQueue) 0x4a8) [0x755f0adf5f28]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::Navigable::populate_session_history_entry_document(JS::GCPtr<Web::HTML::SessionHistoryEntry>, Web::HTML::SourceSnapshotParams const&, Web::HTML::TargetSnapshotParams const&, AK::Optional<AK::String>, AK::Variant<AK::Empty, JS::NonnullGCPtr<Web::HTML::NavigationParams>, JS::NonnullGCPtr<Web::HTML::NonFetchSchemeNavigationParams> >, Web::HTML::CSPNavigationType, bool, JS::SafeFunction<void ()>) 0x1f14) [0x755f0af64c34]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0xc1b23b) [0x755f0b01b23b]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0xd74fb9) [0x755f0b174fb9]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::ThreadEventQueue::process() 0x3de) [0x755f0c3e4b3e]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/WebContent(+0xded70) [0x65267c1b2d70]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::EventLoop::spin_until(AK::Function<bool ()>) 0xbd) [0x755f0c3c091d]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Platform::EventLoopPluginSerenity::spin_until(JS::SafeFunction<bool ()>) 0x10a) [0x755f0b17429a]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::EventLoop::spin_until(JS::SafeFunction<bool ()>) 0xee) [0x755f0ae8669e]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::TraversableNavigable::apply_the_history_step(int, bool, AK::Optional<Web::HTML::SourceSnapshotParams>, JS::GCPtr<Web::HTML::Navigable>, AK::Optional<Web::HTML::UserNavigationInvolvement>, AK::Optional<Web::Bindings::NavigationType>, Web::HTML::TraversableNavigable::SynchronousNavigation) 0xc1f) [0x755f0b01deff]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::HTML::TraversableNavigable::apply_the_traverse_history_step(int, AK::Optional<Web::HTML::SourceSnapshotParams>, JS::GCPtr<Web::HTML::Navigable>, Web::HTML::UserNavigationInvolvement) 0x6f) [0x755f0b01e54f]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0xc1e640) [0x755f0b01e640]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0xbee6e9) [0x755f0afee6e9]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::Timer::timer_event(Core::TimerEvent&) 0xb2) [0x755f0c3e5132]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::EventReceiver::dispatch_event(Core::Event&, Core::EventReceiver*) 0x4d) [0x755f0c3c7a0d]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/WebContent(+0xdf1c7) [0x65267c1b31c7]
/usr/lib/libQt6Core.so.6(+0x1a17e7) [0x755f0c9a17e7]
/usr/lib/libQt6Core.so.6 QTimer::timerEvent(QTimerEvent*) 0xa5) [0x755f0c9a9975]
/usr/lib/libQt6Core.so.6 QObject::event(QEvent*) 0x219) [0x755f0c98c0b9]
/usr/lib/libQt6Core.so.6 QCoreApplication::notifyInternal2(QObject*, QEvent*) 0x133) [0x755f0c944e13]
/usr/lib/libQt6Core.so.6 QTimerInfoList::activateTimers() 0x5a8) [0x755f0cac3c38]
/usr/lib/libQt6Core.so.6(+0x3a4599) [0x755f0cba4599]
/usr/lib/libglib-2.0.so.0(+0x5ca89) [0x755f0970ea89]
/usr/lib/libglib-2.0.so.0(+0xbe9b7) [0x755f097709b7]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x35) [0x755f0970df95]
/usr/lib/libQt6Core.so.6 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x8d) [0x755f0cba28dd]
/usr/lib/libQt6Core.so.6 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 0x19e) [0x755f0c94f10e]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/../lib/liblagom-core.so.0 Core::EventLoop::exec() 0x44) [0x755f0c3c0a84]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/WebContent(+0xebb94) [0x65267c1bfb94]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/WebContent(+0x1c86d1) [0x65267c29c6d1]
/usr/lib/libc.so.6(+0x25c88) [0x755f09239c88]
/usr/lib/libc.so.6(__libc_start_main+0x8c) [0x755f09239d4c]
/mnt/Dev/Projects/oss/ladybird/Build/ladybird/libexec/WebContent(+0xde065) [0x65267c1b2065]

Select URL when opening new tab?

When I open a new tab, I do so because I want to type a URL or search. Currently, this is somewhat annoying in Ladybird because the location field already contains "about:newtab".

Firefox seems to deal with this by leaving the location field blank when opening new tabs, but automatically selecting its contents would also avoid the issue.

This patch seems to work:

diff --git a/Ladybird/Qt/Tab.cpp b/Ladybird/Qt/Tab.cpp
index d00db16a71..955120c4af 100644
--- a/Ladybird/Qt/Tab.cpp
+++ b/Ladybird/Qt/Tab.cpp
@@ -156,6 +156,9 @@ Tab::Tab(BrowserWindow* window, WebContentOptions const& web_content_options, St
 
     view().on_url_change = [this](auto const& url) {
         m_location_edit->setText(qstring_from_ak_string(url.serialize()));
+
+        if (m_location_edit->hasFocus())
+            m_location_edit->selectAll();
     };
 
     QObject::connect(m_location_edit, &QLineEdit::returnPressed, this, &Tab::location_edit_return_pressed);

Sandboxing and other mitigations

@DemiMarie previously asked about this:

In the modern threat environment, any browser should come with a strong sandbox and other exploit mitigations, for the safety of its users.

I feel a bit bad about making such a complex feature request on a project such as this, but I also want Ladybird’s security, and its users’s safety, to not rely merely on its small market share. While I have not used SerenityOS or Ladybird, the progress that you have made is impressive, and I do not mean to speak negatively of your accomplishments!

Does any of this change now that Ladybird is its own project targeting mainstream operating systems?

LibLocale: Null dereference in ICU within date_time_pattern_generator()

To reproduce, open https://youtube.com/@awesomekling

GDB says:

(gdb) bt
#0  ___pthread_mutex_lock (mutex=0x0) at ./nptl/pthread_mutex_lock.c:80
#1  0x000073edea32b16d in icu_74::UnifiedCache::handleUnreferencedObject() const () at /lib/x86_64-linux-gnu/libicuuc.so.74
#2  0x000073ede9d0e275 in icu_74::SharedObject::removeRef (this=0x5ee7c58aa740) at .././../src/c-74_2-src-83138cd994.clean/source/common/sharedobject.cpp:42
#3  0x000073ede9aea391 in icu_74::Calendar::createInstance (zone=0x5ee7c4d37ce0, aLocale=..., success=@0x7fff176a1c54: U_ZERO_ERROR)
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/calendar.cpp:987
#4  0x000073ede9c2e4f4 in icu_74::SimpleDateFormat::initializeCalendar (this=0x5ee7b75edcd0, adoptZone=0x0, locale=..., status=@0x7fff176a1c54: U_ZERO_ERROR)
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/smpdtfmt.cpp:931
#5  0x000073ede9c2cd5d in icu_74::SimpleDateFormat::construct
    (this=0x5ee7b75edcd0, timeStyle=icu_74::DateFormat::kNone, dateStyle=icu_74::DateFormat::kDateOffset, locale=..., status=@0x7fff176a1c54: U_ZERO_ERROR)
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/smpdtfmt.cpp:668
#6  0x000073ede9c2c246 in icu_74::SimpleDateFormat::SimpleDateFormat
    (this=0x5ee7b75edcd0, timeStyle=icu_74::DateFormat::kNone, dateStyle=icu_74::DateFormat::kDateOffset, locale=..., status=@0x7fff176a1c54: U_ZERO_ERROR)
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/smpdtfmt.cpp:481
#7  0x000073ede9afd0dd in icu_74::DateFormat::create (timeStyle=icu_74::DateFormat::kNone, dateStyle=icu_74::DateFormat::kDateOffset, locale=...)
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/datefmt.cpp:528
#8  0x000073ede9afc9b9 in icu_74::DateFormat::createDateTimeInstance (dateStyle=icu_74::DateFormat::kDateOffset, timeStyle=icu_74::DateFormat::kNone, aLocale=...)
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/datefmt.cpp:413
#9  0x000073ede9afc984 in icu_74::DateFormat::createDateInstance (style=icu_74::DateFormat::kFull, aLocale=...)
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/datefmt.cpp:399
#10 0x000073ede9b0d2ce in icu_74::DateTimePatternGenerator::addICUPatterns (this=0x5ee7c7482e20, locale=..., status=@0x7fff176a1eac: U_ZERO_ERROR)
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/dtptngen.cpp:814
#11 0x000073ede9b0ba6d in icu_74::DateTimePatternGenerator::initData (this=0x5ee7c7482e20, locale=..., status=@0x7fff176a1eac: U_ZERO_ERROR, skipStdPatterns=0 '\000')
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/dtptngen.cpp:519
#12 0x000073ede9b0abbc in icu_74::DateTimePatternGenerator::DateTimePatternGenerator
    (this=0x5ee7c7482e20, locale=..., status=@0x7fff176a1eac: U_ZERO_ERROR, skipStdPatterns=0 '\000')
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/dtptngen.cpp:365
#13 0x000073ede9b0a256 in icu_74::DateTimePatternGenerator::createInstance (locale=..., status=@0x7fff176a1eac: U_ZERO_ERROR)
    at .././../src/c-74_2-src-83138cd994.clean/source/i18n/dtptngen.cpp:312
#14 0x000073ede9add536 in date_time_pattern_generator () at /home/kling/src/ladybird/Userland/Libraries/LibLocale/ICU.cpp:82
#15 0x000073ede9ad9329 in default_hour_cycle () at /home/kling/src/ladybird/Userland/Libraries/LibLocale/DateTimeFormat.cpp:110
#16 0x000073ede9ad24fd in Locale::get_preferred_keyword_value_for_locale(AK::StringView, AK::StringView) ()
    at /home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-locale.so.0
#17 0x000073edeb97380d in resolve_locale () at /home/kling/src/ladybird/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp:425
#18 0x000073edeb97c602 in create_date_time_format () at /home/kling/src/ladybird/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp:149
#19 0x000073edeb97bee7 in construct () at /home/kling/src/ladybird/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp:59
#20 0x000073edeb9d0a08 in internal_construct () at /home/kling/src/ladybird/Userland/Libraries/LibJS/Runtime/NativeFunction.cpp:227
#21 0x000073edeb8781eb in construct () at /home/kling/src/ladybird/Userland/Libraries/LibJS/Runtime/AbstractOperations.h:137
#22 perform_call () at /home/kling/src/ladybird/Userland/Libraries/LibJS/Bytecode/CommonImplementations.h:367
#23 0x000073edeb853c87 in execute_impl () at /home/kling/src/ladybird/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp:1655
#24 run_bytecode () at /home/kling/src/ladybird/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp:575

cc @trflynn89

Using address bar to search for a single word fails

When a search engine is enabled, if I type in the address bar a single word then the page loads as https://thatword/. However if I type multiple words it works as expected.

If I put in the following dbgln's

diff --git a/Ladybird/Qt/LocationEdit.cpp b/Ladybird/Qt/LocationEdit.cpp
index 7dc4336331..3a23be952c 100644
--- a/Ladybird/Qt/LocationEdit.cpp
+++ b/Ladybird/Qt/LocationEdit.cpp
@@ -38,6 +38,8 @@ LocationEdit::LocationEdit(QWidget* parent)
             search_engine_url = Settings::the()->search_engine().query_url;

         auto query = ak_string_from_qstring(text());
+        dbgln("query={}, engine_url={}", query, search_engine_url);
+        dbgln("sanitized_url={}", WebView::sanitize_url(query, search_engine_url));

         if (auto url = WebView::sanitize_url(query, search_engine_url); url.has_value())
             setText(qstring_from_ak_string(url->serialize()));

The I get the following in the logs:

294966.228 Ladybird(680721): query=a, engine_url=https://duckduckgo.com/?q={}
294966.228 Ladybird(680721): sanitized_url=https://a/
294966.280 RequestServer(680723:680748): ConnectionCache: Connection to https://a/ failed: Temporary failure in name resolution
294966.280 RequestServer(680723:680748): Request with a null socket finished for URL https://a/
294966.280 WebContent(680757): ResourceLoader: Failed load of: "https://a/", Error: Load failed, Duration: 45ms
294973.648 Ladybird(680721): query=a a, engine_url=https://duckduckgo.com/?q={}
294973.648 Ladybird(680721): sanitized_url=https://duckduckgo.com/?q=a%20a

So the issue is likely in WebView::sanitize_url

Middle click handler not executed in the Qt version

When using Ladybird Qt on Linux, clicking on links using the middle mouse button does nothing, furthermore, setting breakpoint on tab->view().on_link_middle_click in BrowserWindow reveals that the callback from the WebContentView doesn't fire at all.

Tests: test-js fails on master

Building c790413 and running test-js on x86_64 fails:

$ LADYBIRD_SOURCE_DIR=$(pwd) Build/ladybird/bin/test-js
 FAIL  builtins/Date/Date.parse.js
    ❌ Suite:  <top-level>
         Test:   yy{/,-}mm{/,-}dd hh:mm extension (failed):
                 ExpectationError: toBe: expected _13_, got _18_
         Test:   Month dd, yy hh:mm:ss extension (failed):
                 ExpectationError: toBe: expected _17_, got _21_
 PASS  builtins/DisposableStack/DisposableStack.prototype.@@dispose.js
    ⚠️  Suite:  used in using functionality
         Test:   make the stack marked as disposed (expected fail)
 PASS  builtins/FinalizationRegistry/FinalizationRegistry.prototype.cleanupSome.js
    ⚠️  Suite:  <top-level>
         Test:   basic functionality (expected fail)
 PASS  builtins/Temporal/Now/Now.plainDateTime.js
    ⚠️  Suite:  correct behavior
         Test:   custom time zone positive (skipped)
         Test:   custom time zone negative (skipped)
         Test:   custom time zone test was executed (skipped)
 PASS  builtins/Temporal/Now/Now.plainDateTimeISO.js
    ⚠️  Suite:  correct behavior
         Test:   custom time zone (positive) (skipped)
         Test:   custom time zone (negative) (skipped)
         Test:   custom time zone test was executed (skipped)
 PASS  builtins/WeakMap/WeakMap.prototype.set.js
    ⚠️  Suite:  <top-level>
         Test:   automatic removal of garbage-collected values (expected fail)
 PASS  builtins/WeakSet/WeakSet.prototype.add.js
    ⚠️  Suite:  <top-level>
         Test:   automatic removal of garbage-collected values (expected fail)
 PASS  invalid-lhs-in-assignment.js
    ⚠️  Suite:  <top-level>
         Test:   assignment to function call (expected fail)
         Test:   Postfix operator after function call (expected fail)
         Test:   assignment to inline function call (expected fail)
 PASS  loops/for-in-basic.js
    ⚠️  Suite:  special left hand sides
         Test:   call function is allowed in parsing but fails in runtime (expected fail)
 PASS  loops/for-of-basic.js
    ⚠️  Suite:  special left hand sides
         Test:   call function is allowed in parsing but fails in runtime (expected fail)
 PASS  modules/basic-modules.js
    ⚠️  Suite:  in- and exports
         Test:   can have top level using declarations which trigger at the end of running a module (expected fail)
 PASS  tagged-template-literals.js
    ⚠️  Suite:  tagged template literal functionality
         Test:   string value gets cached per AST node (expected fail)
         Test:   this value of call comes from reference (expected fail)
 PASS  using-declaration.js
    ⚠️  Suite:  basic usage
         Test:   disposes after block exit (expected fail)
         Test:   disposes in reverse order after block exit (expected fail)
         Test:   disposes in reverse order after block exit even in same declaration (expected fail)
    ⚠️  Suite:  behavior with exceptions
         Test:   is run even after throw (expected fail)
         Test:   throws error if dispose method does (expected fail)
         Test:   if block and using throw get suppressed error (expected fail)
         Test:   multiple throwing disposes give suppressed error (expected fail)
         Test:   3 throwing disposes give chaining suppressed error (expected fail)
         Test:   normal error and multiple disposing erorrs give chaining suppressed errors (expected fail)
    ⚠️  Suite:  works in a bunch of scopes
         Test:   works in block (expected fail)
         Test:   works in static class block (expected fail)
         Test:   works in function (expected fail)
         Test:   switch block is treated as full block in function (expected fail)
    ⚠️  Suite:  invalid using bindings
         Test:   nullish values do not throw (expected fail)
         Test:   non-object throws (expected fail)
         Test:   object without dispose throws (expected fail)
         Test:   object with non callable dispose throws (expected fail)
    ⚠️  Suite:  using is still a valid variable name
         Test:   using (expected fail)
 PASS  using-for-loops.js
    ⚠️  Suite:  basic usage
         Test:   using in normal for loop (expected fail)
         Test:   using in normal for loop with expression body (expected fail)
         Test:   using in for of loop (expected fail)
         Test:   using in for of loop with expression body (expected fail)
         Test:   can have multiple declaration in normal for loop (expected fail)
         Test:   can have using in block in for loop (expected fail)
         Test:   can have using in block in for-in loop (expected fail)
         Test:   dispose is called even if throw in for of loop (expected fail)
    ⚠️  Suite:  using is still a valid variable in loops
         Test:   using using of (expected fail)

Test Suites: 1 failed, 1747 passed, 1748 total
Tests:       2 failed, 6 skipped, 39 expected failed, 5047 passed, 5094 total
Files:       1038 total
Time:        6.139s

Build issue on macOS with Xcode 15.4

macOS Sonoma 14.5, latest pkgs from brew and latest xcode. I'm trying to build w/o Qt

FAILED: Lagom/Userland/Libraries/LibWeb/CMakeFiles/LibWeb.dir/CSS/StyleValues/EasingStyleValue.cpp.o
/opt/homebrew/bin/ccache /usr/bin/c++ -DENABLE_COMPILETIME_FORMAT_CHECK -DHAS_ACCELERATED_GRAPHICS -DLibWeb_EXPORTS -I/Users/pavel/Develop/ladybird -I/Users/pavel/Develop/ladybird/Userland/Services -I/Users/pavel/Develop/ladybird/Userland/Libraries -I/Users/pavel/Develop/ladybird/Build/ladybird/Lagom -I/Users/pavel/Develop/ladybird/Build/ladybird/Lagom/Userland/Services -I/Users/pavel/Develop/ladybird/Build/ladybird/Lagom/Userland/Libraries -I/Users/pavel/Develop/ladybird/Meta/Lagom/../.. -I/Users/pavel/Develop/ladybird/Meta/Lagom/../../Userland -I/Users/pavel/Develop/ladybird/Meta/Lagom/../../Userland/Libraries -I/Users/pavel/Develop/ladybird/Meta/Lagom/../../Userland/Services -I/Users/pavel/Develop/ladybird/Build/ladybird -std=c++2b -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -fPIC -fcolor-diagnostics -Wall -Wextra -Wno-invalid-offsetof -Wno-unknown-warning-option -Wno-unused-command-line-argument -fno-exceptions -ffp-contract=off -Werror -fconstexpr-steps=16777216 -Wno-implicit-const-int-float-conversion -Wno-user-defined-literals -Wno-vla-cxx-extension -Wno-maybe-uninitialized -Wno-shorten-64-to-32 -fsigned-char -ggnu-pubnames -fPIC -O2 -g1 -Wno-overloaded-virtual -Wno-unused-private-field -MD -MT Lagom/Userland/Libraries/LibWeb/CMakeFiles/LibWeb.dir/CSS/StyleValues/EasingStyleValue.cpp.o -MF Lagom/Userland/Libraries/LibWeb/CMakeFiles/LibWeb.dir/CSS/StyleValues/EasingStyleValue.cpp.o.d -o Lagom/Userland/Libraries/LibWeb/CMakeFiles/LibWeb.dir/CSS/StyleValues/EasingStyleValue.cpp.o -c /Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp
/Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:119:42: error: reference to local binding 'x1' declared in enclosing lambda expression
                auto x = cubic_bezier_at(x1, x2, t);
                                         ^
/Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:125:46: note: in instantiation of function template specialization 'Web::CSS::EasingStyleValue::Function::evaluate_at(double, bool)::(anonymous class)::operator()(const CubicBezier &)::(anonymous class)::operator()<double>' requested here
                cached_x_samples.append(solve(0.));
                                             ^
/Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:76:26: note: 'x1' declared here
            auto const& [x1, y1, x2, y2, cached_x_samples] = bezier;
                         ^
/Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:119:46: error: reference to local binding 'x2' declared in enclosing lambda expression
                auto x = cubic_bezier_at(x1, x2, t);
                                             ^
/Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:76:34: note: 'x2' declared here
            auto const& [x1, y1, x2, y2, cached_x_samples] = bezier;
                                 ^
/Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:120:42: error: reference to local binding 'y1' declared in enclosing lambda expression
                auto y = cubic_bezier_at(y1, y2, t);
                                         ^
/Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:76:30: note: 'y1' declared here
            auto const& [x1, y1, x2, y2, cached_x_samples] = bezier;
                             ^
/Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:120:46: error: reference to local binding 'y2' declared in enclosing lambda expression
                auto y = cubic_bezier_at(y1, y2, t);
                                             ^
/Users/pavel/Develop/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:76:38: note: 'y2' declared here
            auto const& [x1, y1, x2, y2, cached_x_samples] = bezier;
                                     ^
4 errors generated.
[1846/4551] Building CXX object Lagom/Userland/Libraries/LibWeb/CMakeFiles/LibWeb.dir/CSS/Parser/Parser.cpp.o

I'm on 3225e6f

`float: left` causes the element to be resized by the next element

Noticed this while testing a webpage with PHP DebugBar enabled.

Reduced reproduction:

<style>
dt {
    float: left;
}
</style>

<dt>key</dt><dd>value</dd><dt>key</dt><dd>value</dd><dt>key</dt><dd>value</dd><dt>key</dt><dd>value</dd>

Result:
image

Expected result (Firefox/Chrome/Epiphany):
image

Adding a newline after the <dd> element makes it display correctly in Ladybird.

LibWeb: resetera.com repeatedly zooms in until it crashes

To reproduce, open https://resetera.com
Notice how the text on the page keeps getting larger until it crashes like so:

VERIFICATION FAILED: !height.might_be_saturated() at /home/kling/src/ladybird/Userland/Libraries/LibWeb/Layout/LayoutState.cpp:535
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-ak.so.0(ak_verification_failed+0xef) [0x7ff4ee1c3bcf]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0(+0xb21a06) [0x7ff4ed121a06]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FormattingContext::calculate_max_content_height(Web::Layout::Box const&, Web::CSSPixels) const 0x194) [0x7ff4ed102094]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::compute_height(Web::Layout::Box const&, Web::Layout::AvailableSpace const&) 0x8c) [0x7ff4ed0e3a6c]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_box(Web::Layout::Box const&, Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::CSSPixels&, Web::Layout::AvailableSpace const&) 0xd64) [0x7ff4ed0e4d14]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_children(Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0x90) [0x7ff4ed0de620]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::run(Web::Layout::Box const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0x5a) [0x7ff4ed0dde9a]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FormattingContext::calculate_max_content_height(Web::Layout::Box const&, Web::CSSPixels) const 0x194) [0x7ff4ed102094]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FlexFormattingContext::determine_flex_base_size_and_hypothetical_main_size(Web::Layout::FlexFormattingContext::FlexItem&) 0x59a) [0x7ff4ed0ebbca]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FlexFormattingContext::run(Web::Layout::Box const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0xab) [0x7ff4ed0ea25b]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FormattingContext::calculate_min_content_width(Web::Layout::Box const&) const 0x1a6) [0x7ff4ed0f6806]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FlexFormattingContext::content_size_suggestion(Web::Layout::FlexFormattingContext::FlexItem const&) const 0x14) [0x7ff4ed0f01b4]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FlexFormattingContext::content_based_minimum_size(Web::Layout::FlexFormattingContext::FlexItem const&) const 0x30) [0x7ff4ed0eff50]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FlexFormattingContext::determine_flex_base_size_and_hypothetical_main_size(Web::Layout::FlexFormattingContext::FlexItem&) 0x776) [0x7ff4ed0ebda6]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FlexFormattingContext::run(Web::Layout::Box const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0xab) [0x7ff4ed0ea25b]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FormattingContext::calculate_max_content_height(Web::Layout::Box const&, Web::CSSPixels) const 0x194) [0x7ff4ed102094]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FlexFormattingContext::determine_flex_base_size_and_hypothetical_main_size(Web::Layout::FlexFormattingContext::FlexItem&) 0x59a) [0x7ff4ed0ebbca]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FlexFormattingContext::run(Web::Layout::Box const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0xab) [0x7ff4ed0ea25b]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::FormattingContext::calculate_max_content_height(Web::Layout::Box const&, Web::CSSPixels) const 0x194) [0x7ff4ed102094]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::compute_height(Web::Layout::Box const&, Web::Layout::AvailableSpace const&) 0x8c) [0x7ff4ed0e3a6c]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_box(Web::Layout::Box const&, Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::CSSPixels&, Web::Layout::AvailableSpace const&) 0xd64) [0x7ff4ed0e4d14]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_children(Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0x90) [0x7ff4ed0de620]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_box(Web::Layout::Box const&, Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::CSSPixels&, Web::Layout::AvailableSpace const&) 0xe9a) [0x7ff4ed0e4e4a]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_children(Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0x90) [0x7ff4ed0de620]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_box(Web::Layout::Box const&, Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::CSSPixels&, Web::Layout::AvailableSpace const&) 0xe9a) [0x7ff4ed0e4e4a]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_children(Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0x90) [0x7ff4ed0de620]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::run(Web::Layout::Box const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0x5a) [0x7ff4ed0dde9a]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_box(Web::Layout::Box const&, Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::CSSPixels&, Web::Layout::AvailableSpace const&) 0xd98) [0x7ff4ed0e4d48]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::Layout::BlockFormattingContext::layout_block_level_children(Web::Layout::BlockContainer const&, Web::Layout::LayoutMode, Web::Layout::AvailableSpace const&) 0x90) [0x7ff4ed0de620]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::DOM::Document::update_layout() 0x2cd) [0x7ff4ece9ae1d]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::CSS::ResolvedCSSStyleDeclaration::property(Web::CSS::PropertyID) const 0x50) [0x7ff4ece38b00]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-web.so.0 Web::CSS::CSSStyleDeclaration::internal_get(JS::PropertyKey const&, JS::Value, JS::CacheablePropertyMetadata*, JS::Object::PropertyLookupPhase) const 0x20b) [0x7ff4ecdc3bbb]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0(+0x277cf9) [0x7ff4ec277cf9]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_bytecode(unsigned long) 0x5d5b) [0x7ff4ec257c5b]

Unicode and color rendering.

site: https://www.barometern.se/

✓ Man slog sönder rutor i bilaffär ✓ Polis kände misstänkt lukt
This is the text, but it just displays empty squares (Typical font issue)

This offer is hard to resist in Ladybird (because its missing the close button)
Skärmavbild 2024-06-19 kl  16 17 26

Another really strange issue, the colors are different in Ladybird compared to Safari:
Skärmavbild 2024-06-19 kl  16 21 39

CSS Grid layout goes wrong on chess.com

Hmmmmm:
image

Simplified reduction:

<!doctype html><style>
    * { outline: 1px solid black; }
    html { background: white; }
    body {
        display: grid;
        grid-template-columns: 1fr [sidebar] 500px 1fr;
        grid-template-rows: [top] 100px [bottom] auto;
        background: wheat;
    }
    .main {
        background: pink;
        height: 200px;
    }
    .chessboard {
        background: orange;
        width: 600px;
        height: 100px;
    }
    .sidebar {
        grid-area: top/sidebar;
    }
</style>
<body>
 <div class="main">
  <div class="chessboard"></div>
 </div>
 <div class="sidebar">hello</div>

LibWeb: Support highlight pseudo-elements

Highlight pseudo-elements control styling for selected/highlighted elements. The spec only allows for limited, non-layout-altering properties to be applied to these selectors. The allowed properties are as follows:

  • color
  • background-color
  • text-decoration and its associated properties (including text-underline-position and text-underline-offset)
  • text-shadow
  • stroke-color
  • fill-color
  • stroke-width

Supported pseudo-elements:

  • ::selection
    Applies to elements that have been selected by the user. Currently, this selector does get parsed, but goes unused, as the selection colors are hard-coded to their CSS::SystemColor defaults. See this discussion in the SerenityOS Discord server for more information regarding implementation.
  • ::target-text
    Applies to a page's targeted text fragment. Text fragments are currently unimplemented in Ladybird.
  • ::spelling-error
    Applies to text that has been reported by the browser to be misspelled. This requires a spellcheck engine to be integrated into Ladybird.
  • ::grammar-error
    Applies to text that has been reported by the browser to be grammatically incorrect. This requires a grammar checking engine to be integrated into Ladybird.

Layout problem (abspos with inline siblings) on ekioh.com/flow-browser

image

Reduction:

<!doctype html><style>        
    * { outline: 1px solid black; }    
    html {     
        background: white;      
        width: max-content;    
    }                             
    body {    
        background: pink;      
        position: relative;    
    }                              
    li { display: inline-block; }    
    .abspos {    
        position: absolute;    
        width: 100px;    
        height: 100px;    
        background: orange;    
        opacity: 0.5;    
    }                                                               
</style><body><li>foo</li><li>bar<div class="abspos">   

Build broken?

I tried to do a rebuild but I am not sure that is enough. I have upgraded my macOS version to Sonoma from Ventura.
Is there a way to re-run ./configure if any paths have changed?

I am not really sure If I am the problem (my environment) or if you guys broke something.

/Users/mikaelkonradsson/Documents/git/Thirdparty/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:119:42: error: reference to local binding 'x1' declared in enclosing lambda expression
auto x = cubic_bezier_at(x1, x2, t);
^
/Users/mikaelkonradsson/Documents/git/Thirdparty/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:125:46: note: in instantiation of function template specialization 'Web::CSS::EasingStyleValue::Function::evaluate_at(double, bool)::(anonymous class)::operator()(const CubicBezier &)::(anonymous class)::operator()' requested here
cached_x_samples.append(solve(0.));
^
/Users/mikaelkonradsson/Documents/git/Thirdparty/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:76:26: note: 'x1' declared here
auto const& [x1, y1, x2, y2, cached_x_samples] = bezier;
^
/Users/mikaelkonradsson/Documents/git/Thirdparty/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:119:46: error: reference to local binding 'x2' declared in enclosing lambda expression
auto x = cubic_bezier_at(x1, x2, t);
^
/Users/mikaelkonradsson/Documents/git/Thirdparty/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:76:34: note: 'x2' declared here
auto const& [x1, y1, x2, y2, cached_x_samples] = bezier;
^
/Users/mikaelkonradsson/Documents/git/Thirdparty/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:120:42: error: reference to local binding 'y1' declared in enclosing lambda expression
auto y = cubic_bezier_at(y1, y2, t);
^
/Users/mikaelkonradsson/Documents/git/Thirdparty/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:76:30: note: 'y1' declared here
auto const& [x1, y1, x2, y2, cached_x_samples] = bezier;
^
/Users/mikaelkonradsson/Documents/git/Thirdparty/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:120:46: error: reference to local binding 'y2' declared in enclosing lambda expression
auto y = cubic_bezier_at(y1, y2, t);
^
/Users/mikaelkonradsson/Documents/git/Thirdparty/ladybird/Userland/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.cpp:76:38: note: 'y2' declared here
auto const& [x1, y1, x2, y2, cached_x_samples] = bezier;

Build process relies on vcpkg glibc binaries

I am on a Linux musl-based distribution, and building Ladybird requires running a binary from Microsoft which is linked against glibc; it causes the following build errors:

$ ./Meta/ladybird.sh run ladybird
Building vcpkg
~/src/ladybird/Toolchain/Tarballs ~/src/ladybird/Toolchain
HEAD is now at 01f602195 Patch Tuesday for May 2024 (Again) (#38891)
Downloading vcpkg-glibc...
./bootstrap-vcpkg.sh: /home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/scripts/bootstrap.sh: line 227: /home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/vcpkg: not found

A quick check at the binary:

$ ldd /home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/vcpkg
	/lib64/ld-linux-x86-64.so.2 (0x7f465b971000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f465b971000)
	libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f465b971000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f465b971000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/vcpkg)
Error relocating /home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/vcpkg: __strftime_l: symbol not found
Error relocating /home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/vcpkg: __sprintf_chk: symbol not found

Ladybird is crashing on linux.org.ru

The website is pretty basic, but still with recent commits as of Jun 4 it crashes the browser

$ Ladybird 'https://www.linux.org.ru/news/linux-general/17637964?lastmod=1717609269841'
VERIFICATION FAILED: m_ptr at /mnt/avb/work/ladybird/AK/RefPtr.h:280
/usr/local/libexec/../lib/liblagom-ak.so.0(ak_verification_failed+0xbb) [0x7bbf72f73ecb]
/usr/local/libexec/../lib/liblagom-gfx.so.0 Gfx::ScaledFont::glyph(unsigned int, Gfx::GlyphSubpixelOffset) const 0x13c) [0x7bbf72c7b1ac]
/usr/local/libexec/../lib/liblagom-gfx.so.0 Gfx::Painter::draw_glyph(Gfx::Point, unsigned int, Gfx::Font const&, Gfx::Color) 0xa8) [0x7bbf72d75448]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::Painting::CommandExecutorCPU::draw_glyph_run(Web::Painting::DrawGlyphRun const&) 0x1a0) [0x7bbf74321ad0]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::Painting::CommandList::execute(Web::Painting::CommandExecutor&) 0xf3d) [0x7bbf743284ed]
/usr/local/libexec/WebContent(+0xc580e) [0x5f487f1cf80e]
/usr/local/libexec/WebContent(+0xc58a3) [0x5f487f1cf8a3]
/usr/local/libexec/../lib/liblagom-web.so.0(+0x8b0611) [0x7bbf740b0611]
/usr/local/libexec/../lib/liblagom-web.so.0(+0xb76fa9) [0x7bbf74376fa9]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::Timer::timer_event(Core::TimerEvent&) 0xb2) [0x7bbf73726d42]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::EventReceiver::dispatch_event(Core::Event&, Core::EventReceiver*) 0x4d) [0x7bbf7370d2fd]
/usr/local/libexec/WebContent(+0x3f697) [0x5f487f149697]
/usr/lib/libQt6Core.so.6(+0x19b57f) [0x7bbf7599b57f]
/usr/lib/libQt6Core.so.6 QTimer::timerEvent(QTimerEvent*) 0xa5) [0x7bbf759a0d05]
/usr/lib/libQt6Core.so.6 QObject::event(QEvent*) 0x226) [0x7bbf7598c0e6]
/usr/lib/libQt6Core.so.6 QCoreApplication::notifyInternal2(QObject*, QEvent*) 0x133) [0x7bbf7593fdf3]
/usr/lib/libQt6Core.so.6 QTimerInfoList::activateTimers() 0x5c8) [0x7bbf75ab7988]
/usr/lib/libQt6Core.so.6(+0x3957c9) [0x7bbf75b957c9]
/usr/lib/libglib-2.0.so.0(+0x5ca89) [0x7bbf71921a89]
/usr/lib/libglib-2.0.so.0(+0xbe9b7) [0x7bbf719839b7]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x35) [0x7bbf71920f95]
/usr/lib/libQt6Core.so.6 QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) 0x89) [0x7bbf75b93389]
/usr/local/libexec/WebContent(+0x3f259) [0x5f487f149259]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::EventLoop::spin_until(AK::Function<bool ()>) 0xbd) [0x7bbf7370624d]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::Platform::EventLoopPluginSerenity::spin_until(JS::SafeFunction<bool ()>) 0x10a) [0x7bbf74375a3a]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::HTML::EventLoop::spin_until(JS::SafeFunction<bool ()>) 0xee) [0x7bbf740b0a5e]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLParser::the_end(JS::NonnullGCPtrWeb::DOM::Document, JS::GCPtrWeb::HTML::HTMLParser) 0x339) [0x7bbf741bb929]
/usr/local/libexec/../lib/liblagom-web.so.0 Web::HTML::HTMLParser::run(URL::URL const&, Web::HTML::HTMLTokenizer::StopAtInsertionPoint) 0x2ec) [0x7bbf741bbecc]
/usr/local/libexec/../lib/liblagom-web.so.0(+0xb76759) [0x7bbf74376759]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::ThreadEventQueue::process() 0x3de) [0x7bbf7372674e]
/usr/local/libexec/WebContent(+0x3f81d) [0x5f487f14981d]
/usr/local/libexec/WebContent(+0x4084c) [0x5f487f14a84c]
/usr/lib/libQt6Core.so.6 QCoreApplication::notifyInternal2(QObject*, QEvent*) 0x133) [0x7bbf7593fdf3]
/usr/lib/libQt6Core.so.6 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) 0x362) [0x7bbf759401d2]
/usr/lib/libQt6Core.so.6(+0x3959ac) [0x7bbf75b959ac]
/usr/lib/libglib-2.0.so.0(+0x5ca89) [0x7bbf71921a89]
/usr/lib/libglib-2.0.so.0(+0xbe9b7) [0x7bbf719839b7]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x35) [0x7bbf71920f95]
/usr/lib/libQt6Core.so.6 QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) 0x89) [0x7bbf75b93389]
/usr/lib/libQt6Core.so.6 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) 0x1b0) [0x7bbf75948350]
/usr/local/libexec/../lib/liblagom-core.so.0 Core::EventLoop::exec() 0x44) [0x7bbf737063b4]
/usr/local/libexec/WebContent(+0x4c7a4) [0x5f487f1567a4]
/usr/local/libexec/WebContent(main+0x81) [0x5f487f148621]
/usr/lib/libc.so.6(+0x25c88) [0x7bbf72639c88]
/usr/lib/libc.so.6(__libc_start_main+0x8c) [0x7bbf72639d4c]
/usr/local/libexec/WebContent(+0x3e7c5) [0x5f487f1487c5]
182674.829 Ladybird(274223): WebContent process crashed!
VERIFICATION FAILED: !is_error() at /mnt/avb/work/ladybird/AK/Error.h:202
/usr/local/bin/../lib/liblagom-ak.so.0(ak_verification_failed+0xbb) [0x75fb864b1ecb]
Ladybird(+0x60a34) [0x62a7bb7baa34]
/usr/local/bin/../lib/liblagom-webview.so.0 WebView::ViewImplementation::handle_web_content_process_crash() 0x57a) [0x75fb8706a77a]
/usr/local/bin/../lib/liblagom-core.so.0 Core::ThreadEventQueue::process() 0x3de) [0x75fb8659e74e]
Ladybird(+0x457bd) [0x62a7bb79f7bd]
Ladybird(+0x467ec) [0x62a7bb7a07ec]
/usr/lib/libQt6Widgets.so.6 QApplicationPrivate::notify_helper(QObject*, QEvent*) 0x4d) [0x75fb866fc44d]
/usr/lib/libQt6Core.so.6 QCoreApplication::notifyInternal2(QObject*, QEvent*) 0x158) [0x75fb8573fe18]
/usr/lib/libQt6Core.so.6 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) 0x362) [0x75fb857401d2]
/usr/lib/libQt6Core.so.6(+0x3959ac) [0x75fb859959ac]
/usr/lib/libglib-2.0.so.0(+0x5ca89) [0x75fb817d0a89]
/usr/lib/libglib-2.0.so.0(+0xbe9b7) [0x75fb818329b7]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x35) [0x75fb817cff95]
/usr/lib/libQt6Core.so.6 QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) 0x89) [0x75fb85993389]
/usr/lib/libQt6Core.so.6 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) 0x1b0) [0x75fb85748350]
/usr/lib/libQt6Core.so.6 QCoreApplication::exec() 0x8d) [0x75fb85743c1d]
/usr/local/bin/../lib/liblagom-core.so.0 Core::EventLoop::exec() 0x44) [0x75fb8657e3b4]
Ladybird(+0x66f4e) [0x62a7bb7c0f4e]
Ladybird(main+0x81) [0x62a7bb782881]
/usr/lib/libc.so.6(+0x25c88) [0x75fb82439c88]
/usr/lib/libc.so.6(__libc_start_main+0x8c) [0x75fb82439d4c]
Ladybird(+0x28a25) [0x62a7bb782a25]
Illegal instruction (core dumped)

LibJS: Empty JS::Value crash on https://feber.se/

To reproduce, open https://feber.se/

VERIFICATION FAILED: !is_empty() at /home/kling/src/ladybird/Userland/Libraries/LibJS/Runtime/Value.cpp:548
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-ak.so.0(ak_verification_failed+0xef) [0x7406eb397bcf]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::Value::to_object(JS::VM&) const 0x20b) [0x7406e96fb42b]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0(+0x278be5) [0x7406e9478be5]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_bytecode(unsigned long) 0xc945) [0x7406e945e845]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_executable(JS::Bytecode::Executable&, AK::Optional<unsigned long>, JS::Value) 0x1fd) [0x7406e9451c0d]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::GeneratorObject::execute(JS::VM&, JS::Completion const&) 0x163) [0x7406e9569a53]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::GeneratorObject::resume(JS::VM&, JS::Value, AK::Optional<AK::StringView> const&) 0x124) [0x7406e9569ee4]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::AsyncFunctionDriverWrapper::continue_async_execution(JS::VM&, JS::Value, bool, JS::AsyncFunctionDriverWrapper::IsInitialExecution) 0x44) [0x7406e951d8e4]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0(+0x31e3b8) [0x7406e951e3b8]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0(+0x3d698b) [0x7406e95d698b]
/home/kling/src/ladybird/Build/ladybird/libexec/../lib/liblagom-js.so.0 JS::NativeFunction::internal_call(JS::Value, AK::Span<JS::Value const>) 0x191) [0x7406e95d64e1]

WebDriver: Second session hangs

$ ./Meta/ladybird.sh run WebDriver
...
Listening on 0.0.0.0:8000

First request works fine, opens the window and receives a session ID of 0:

$ curl -d '{"capabilities":{}}' http://127.0.0.1:8000/session
{"value":{"sessionId":"0","capabilities":{"browserName":"ladybird","browserVersion":"1.0","platformName":"linux","acceptInsecureCerts":false,"strictFileInteractability":false,"setWindowRect":true,"serenity:ladybird":{"headless":false},"pageLoadStrategy":"normal","timeouts":{"script":30000,"pageLoad":300000,"implicit":0},"unhandledPromptBehavior":"dismiss and notify"}}}

Second request opens a new tab but never gets a response:

$ curl -d '{"capabilities":{}}' http://127.0.0.1:8000/session
...hangs...

Deleting the existing session either before or after the second POST works in that it gets a response but doesn't prevent future hangs:

$ curl -XDELETE http://127.0.0.1:8000/session/0
{"value":null}

Android builds seem to be broken

I am trying to build a Android build of Ladybird, however after dealing with external libraries and having the program compiled all I get is a white screen with URL bar.
Screenshot_20240619-224706_Ladybird

I have tried to find a culprit and I found that commit 6836091 and commits after cause this issue. Commits before that result in a working build.

Funding

  • We're using Polar.sh to allow folks to offer a reward for completing this issue.
  • The contributor(s) receive the funding once the issue is completed & confirmed.
Fund with Polar

Windows support

This is a meta issue to track all the issues needed for a Windows support.

Goals:

  1. We aim to support clang-cl. This is the first priority.
  2. Later on, cl, from 2022. This is a very low priority.
  3. If we manage to get some mingw toolchain to compile the program - I am happy. But this is not a goal.

Problems:

  • Some compiler flags are not compatible with clang-cl. (#77)
  • We need a package manager to handle building 3rd parties (ICU, fontconfig?, Skia, WABT, more?)
  • We need to find an alternative to fontconfig.
  • 'sys/time.h' not found
  • [[no_unique_address]] not supported (am I using a wrong compiler? I use MSVC 2022 and its clang-cl)
  • We need to pull code from previous attempts of this kind of work. (cherry-picks, rebase etc).
  • Need to understand how to run the commit linters on the local machine, as we don't want developers to spam the CI/CD with phantom builds, just to fix a typo on the commit log (yes, that is directed at me)

Known forks, branches:

Please do not comment on this issue unless you have something to contribute. This issue is one of the boss-issues - it will take time. Problems and goals will change, nothing is written in stone, provide code if you can.

Issue with links to build instructions

Steps to reproduce:

  1. open main repository page
  2. scroll down to the "How do I read the documentation?" and click on this link
  3. scroll down to "Building and Running" section of README
  4. click on first bulletpoint "Build Instructions:

Result:
Error 404 - Page not fount

Cause:
Typo in link to file

Build: Create a way to build with ASAN and/or UBSAN

Now that we have third party libraries involved, I think we need to build them with ASAN/UBSAN as well.
This needs to be streamlined and documented, so that anyone can spin up a sanitizer build easily :)

Tests: Counter::num_destroys’ is used uninitialized

I configured a debug release with cmake -B Build/ladybird -DCMAKE_BUILD_TYPE=Debug. However, building the tests fails:

$ Meta/ladybird.sh build
[0/2] Re-checking globbed directories...
[2634/2966] Building CXX object Lagom/Tests/AK/CMakeFiles/TestNeverDestroyed.dir/TestNeverDestroyed.cpp.o
FAILED: Lagom/Tests/AK/CMakeFiles/TestNeverDestroyed.dir/TestNeverDestroyed.cpp.o 
/usr/bin/c++ -DENABLE_COMPILETIME_FORMAT_CHECK -I/home/nathan/git/ladybird -I/home/nathan/git/ladybird/Userland/Services -I/home/nathan/git/ladybird/Userland/Libraries -I/home/nathan/git/ladybird/Build/ladybird/Lagom -I/home/nathan/git/ladybird/Build/ladybird/Lagom/Userland/Services -I/home/nathan/git/ladybird/Build/ladybird/Lagom/Userland/Libraries -I/home/nathan/git/ladybird/Meta/Lagom/../.. -I/home/nathan/git/ladybird/Meta/Lagom/../../Userland -I/home/nathan/git/ladybird/Meta/Lagom/../../Userland/Libraries -I/home/nathan/git/ladybird/Meta/Lagom/../../Userland/Services -I/home/nathan/git/ladybird/Build/ladybird -g -std=c++23 -fdiagnostics-color=always -Wall -Wextra -Wno-invalid-offsetof -Wno-unknown-warning-option -Wno-unused-command-line-argument -fno-exceptions -ffp-contract=off -Werror -Wno-expansion-to-defined -Wno-literal-suffix -Wno-dangling-reference -fno-semantic-interposition -fvisibility-inlines-hidden -Wno-maybe-uninitialized -Wno-shorten-64-to-32 -fsigned-char -ggnu-pubnames -fPIC -D_FILE_OFFSET_BITS=64 -ggdb3 -Og -MD -MT Lagom/Tests/AK/CMakeFiles/TestNeverDestroyed.dir/TestNeverDestroyed.cpp.o -MF Lagom/Tests/AK/CMakeFiles/TestNeverDestroyed.dir/TestNeverDestroyed.cpp.o.d -o Lagom/Tests/AK/CMakeFiles/TestNeverDestroyed.dir/TestNeverDestroyed.cpp.o -c /home/nathan/git/ladybird/Tests/AK/TestNeverDestroyed.cpp
In file included from /home/nathan/git/ladybird/Userland/Libraries/LibTest/TestCase.h:14,
                 from /home/nathan/git/ladybird/Tests/AK/TestNeverDestroyed.cpp:7:
/home/nathan/git/ladybird/Tests/AK/TestNeverDestroyed.cpp: In function ‘void should_not_destroy()’:
/home/nathan/git/ladybird/Tests/AK/TestNeverDestroyed.cpp:55:21: error: ‘*(Counter*)((char*)&n + offsetof(AK::NeverDestroyed<Counter>,AK::NeverDestroyed<Counter>::storage[0])).Counter::num_destroys’ is used uninitialized [-Werror=uninitialized]
   55 |     EXPECT_EQ(0, c->num_destroys);
/home/nathan/git/ladybird/Userland/Libraries/LibTest/Macros.h:40:21: note: in definition of macro ‘EXPECT_EQ’
   40 |         auto rhs = (b);                                                                                       \
      |                     ^
/home/nathan/git/ladybird/Tests/AK/TestNeverDestroyed.cpp:51:37: note: ‘n’ declared here
   51 |         AK::NeverDestroyed<Counter> n {};
      |                                     ^
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-shorten-64-to-32’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
[2653/2966] Building CXX object Lagom/Userland/Libraries/LibWebView/CMakeFiles/LibWebView.dir/WebContentClient.cpp.o
ninja: build stopped: subcommand failed.

LibWeb: Get Pixedit fully functional

Pixedit is an online pixel editor that I created and wish to have fully compatible with Ladybird. There are a couple issues that I wish to fix.

Visual issues:

  • Resizing has weird behavior (SerenityOS/serenity#20870)
  • measureText off for both vector and bitmap fonts (SerenityOS/serenity#21340)
  • Text is not rendered from the baseline, add actual implementation of baseline
  • Anti-aliasing on UI elements despite exact pixel coordinates

Functionality issues:

Tests: Re-enable WPT job for GCC CI

The logs for this last time it was enabled show that the WebDriver fails to accept the connection from wpt.py when run in the CI configuration. It works locally with ASAN+UBSAN, so there must be a deeper problem here.

backdrop-filter with calc() fails to render

The backdrop-filter on an element fails to render if it contains a calc(). It works if you replace the calc with 70%

body {
    background: blue url("cat.jpg");
}

.panel {
    display: inline-block;
    background: magenta;
    border-radius: 2rem;
    padding: 0.6rem 1.2rem;
    margin: calc(50% / 2);
    color: white;
}

@supports (backdrop-filter: brightness(70%) contrast(110%) saturate(140%) blur(12px)) {
    .panel {
        background: none;
        backdrop-filter: brightness(calc(100% - 50% / 1.666666667)) contrast(110%) saturate(140%) blur(12px);
    }
}

ladybird_backdrop_filter.zip

Expected

image

Actual

image

Add IME support in chrome and webviews in Wayland

Japanese, Korean, and Chinese need IME (Input Method Editor) to input their characters, as it is currently it seems that IMEs are not supported in the browser chrome or inside of webviews. The chrome should be easy as it is QT, honestly confused why it isn't already working the browser itself might be harder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.