Truly independent web browser
Find a file
Andreas Kling dba6216caa LibWeb: Skip CSS tokenizer filtering when string has no '\r' or '\f'
When loading a canned version of reddit.com, we end up parsing many many
shadow tree style sheets of roughly ~170 KiB text each.

None of them have '\r' or '\f', yet we spend 2-3 ms for each sheet just
looping over and reconstructing the text to see if we need to normalize
any newlines.

This patch makes the common case faster in two ways:

- We use TextCodec::Decoder::to_utf8() instead of process()
  This way, we do a one-shot fast validation and conversion to UTF-8,
  instead of using the generic code-point-at-a-time callback API.

- We scan for '\r' and '\f' before filtering, and if neither is present,
  we simply use the unfiltered string.

With these changes, we now spend 0 ms in the filtering function for the
vast majority of style sheets I've seen so far.
2024-07-20 15:35:30 +02:00
.devcontainer Meta: Rename devcontainer to Ladybird 2024-07-11 08:48:15 -06:00
.github CI: Make the notes-push.yml workflow fetch the entire repo history 2024-07-20 09:30:43 +02:00
AK AK: Construct Strings from StringBuilder without re-allocating the data 2024-07-20 06:45:49 +02:00
Base/res LibWebView: Add keyboard navigation to the Inspector 2024-07-18 07:09:50 -06:00
Documentation Documentation: Remove now-unnecessary environment settings for VsCode 2024-07-18 14:48:20 +02:00
Ladybird Ladybird/AppKit: Remove system header workarounds for global names 2024-07-18 09:43:38 +01:00
Meta CMake: Force vcpkg to use CMAKE_CXX_COMPILER as specified to CMake 2024-07-18 14:48:20 +02:00
Tests LibWeb: Make details and summary elements display:block in the UA style 2024-07-20 13:09:28 +02:00
Toolchain Documentation+Toolchain: Don't try to build CMake from source 2024-07-15 10:15:40 +02:00
Userland LibWeb: Skip CSS tokenizer filtering when string has no '\r' or '\f' 2024-07-20 15:35:30 +02:00
.clang-format Meta: Support using clang-format on Objective-C++ files 2023-08-22 21:36:19 -04:00
.clang-tidy Everywhere: Remove references to the kernel 2024-06-03 10:53:53 +02:00
.clangd Meta: Add .clangd config file (with project-recommended defaults) 2024-07-09 04:40:52 -06:00
.editorconfig
.gitattributes LibGfx: Remove support for the various "portable" image formats 2024-06-17 21:57:35 +02:00
.gitignore Meta: Add provision for user-specified port variables to vcpkg 2024-07-07 15:56:59 +02:00
.gn Meta: Automatically generate a compilation database for clangd 2023-11-14 14:29:35 -05:00
.mailmap Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2023-07-15 16:21:29 +02:00
.pre-commit-config.yaml Meta: Update Documentation and CI for repo move 2024-06-03 10:53:53 +02:00
.prettierignore Meta: Remove home/anon directory from .prettierignore 2024-07-17 09:57:46 -06:00
.prettierrc
.ycm_extra_conf.py Meta: Make YCM return flags as Python list 2024-07-06 14:50:43 -06:00
CMakeLists.txt CMake: Force vcpkg to use CMAKE_CXX_COMPILER as specified to CMake 2024-07-18 14:48:20 +02:00
CMakePresets.json Meta+CI: Hook up the Lagom tools build with vcpkg 2024-07-18 14:46:25 +02:00
CONTRIBUTING.md Meta: Update for GitHub org rename to LadybirdBrowser 2024-06-09 13:02:56 +02:00
flake.lock nix: Clean up files, use good practices 2024-03-25 14:19:34 -06:00
flake.nix Meta: Remove SerenityOS components not needed for Ladybird 2024-06-03 10:53:53 +02:00
LICENSE Meta: Update root LICENSE to say Ladybird instead of SerenityOS 2024-06-04 07:25:44 +02:00
README.md Readme: Change ladybird.dev to ladybird.org in README 2024-07-11 23:25:49 -06:00
SECURITY.md Meta: Update for GitHub org rename to LadybirdBrowser 2024-06-09 13:02:56 +02:00
vcpkg-configuration.json Meta: Add overlay port for vulkan-loader 2024-07-07 15:56:59 +02:00
vcpkg.json LibGfx: Decode WebP images with libwebp 2024-07-17 10:04:25 -06:00

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.