Commit graph

3640 commits

Author SHA1 Message Date
Cameron Youell
c5219b0193 CMake: Fix linker issues on Windows
Co-authored-by: Andrew Kaster <akaster@serenityos.org>
2024-10-19 18:14:48 -06:00
Jelle Raaijmakers
2a98f2a12d LibWeb: Implement AudioListener
This exposes BaseAudioContext.listener, which is a container for
parameters related to the configuration of an actual "listener" in 3D
space.
2024-10-18 09:39:04 +02:00
Aliaksandr Kalenik
c097f53875 LibWeb: Remove InlinePaintable
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, 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
Push notes / build (push) Waiting to run
It was replaced with PaintableWithLines.
2024-10-16 20:25:42 +02:00
Jelle Raaijmakers
0b9d55b676 Meta: Reuse built-in JS types list for IDL to C++ generation
This opens up the code path for the `ArrayBuffer` type, which can now be
used as a method argument.
2024-10-15 10:02:15 +02:00
John Diamond
8f45f59df3 Meta: Warn before attempting to use clang-format 19
The clang-format version released with llvm 19 will format many files
differently than clang-format-18.

This change presents the existing warning shown for incorrect
clang-format versions to those with versions greater than 18.

Fixes issue #1750
2024-10-14 15:54:53 -06:00
Andreas Kling
dd419b5a8d AK: Make String::number() infallible
This API will always succeed in creating a String representing the
provided number in base-10.
2024-10-14 20:47:35 +02:00
Timothy Flynn
6ce473af72 LibIPC: Pass AK::Duration by value over IPC
AK::Duration is simply an integer, and does not need to be passed by
reference.
2024-10-14 08:25:41 +02:00
Sam Atkins
e0be17e4fb LibWeb/CSS: Rewrite CSS Parser core methods according to new spec
CSS Syntax 3 (https://drafts.csswg.org/css-syntax) has changed
significantly since we implemented it a couple of years ago. Just about
every parsing algorithm has been rewritten in terms of the new token
stream concept, and to support nested styles. As all of those
algorithms call into each other, this is an unfortunately chonky diff.

As part of this, the transitory types (Declaration, Function, AtRule...)
have been rewritten. That's both because we have new requirements of
what they should be and contain, and also because the spec asks us to
create and then gradually modify them in place, which is easier if they
are plain structs.
2024-10-14 08:08:37 +02:00
justus2510
55f0dc823f LibWeb: Handle unpaired surrogates in USVStrings
Some checks are pending
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, 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
Push notes / build (push) Waiting to run
This should fix (at least) the last two remaining WPT test failures in
FileAPI/unicode.html.
2024-10-13 22:24:28 +01:00
Cory Virok
9336b14d15 Meta: Clean up generated CMake uservars
Prior to this change, running ./Meta/ladybird.sh rebuild would not
remove the user-variables.cmake file that was generated by the build
script. This caused errors when testing out the .devcontainer on my
Mac because the pkg-config binary lived in different dirs in the
container vs host.debug
2024-10-12 15:37:26 -06:00
Andreas Kling
175f3febb8 LibWeb: Make DOMException take error message as a String
There was no need to use FlyString for error messages, and it just
caused a bunch of churn since these strings typically only existed
during the lifetime of the error.
2024-10-12 21:14:18 +02:00
sin-ack
d5948709cd BindingsGenerator: Handle global interfaces without named properties
DedicatedWorkerGlobalScope is an object with a Global extended
attribute, but does not define any named property getters. This needs to
be handled by setting the prototype chain to:

    DedicatedWorkerGlobalScope
    ^ DedicatedWorkerGlobalScopePrototype
    ^ WorkerGlobalScopePrototype

(This is different from something like Window, where there is an
intermediate WindowProperties object for named properties.)

Previously, we treated the GlobalMixin object as if it was a simple
prototype object, accidentally setting DedicatedWorkerGlobalScope's
prototype to WorkerGlobalScopePrototype. This caused the expression

    self instanceof DedicatedWorkerGlobalScope

to return false inside workers.

This makes us pass many more of the "/xhr/idlharness.any.worker" WPT
tests than before, rather than failing early.
2024-10-12 19:21:59 +02:00
Timothy Flynn
bd8ab33593 Meta: Add a command to WPT.sh to execute wpt serve
Just a handy command for local testing.
2024-10-12 15:02:41 +02:00
pheonixfirewingz
60283ed392 CMake: Reorganize flags for ClangCL usage
Disable some non-supported flags on windows platforms, and
pull in some flags from the other windows support branches.

Co-Authored-By: Andrew Kaster <andrew@ladybird.org>
2024-10-10 21:48:41 -06:00
pheonixfirewingz
c92d9cce42 Toolchain: Rewrite BuildVcpkg.sh in python
Co-Authored-By: Andrew Kaster <andrew@ladybird.org>
2024-10-10 21:48:41 -06:00
Andrew Kaster
7faebb2702 LibWeb: Implement most of Service Worker registration
Some checks are pending
Lint Code / lint (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Push notes / build (push) Waiting to run
This approach will need some rework to be properly handled at the user
agent level instead of per renderer process, but it's a start.
2024-10-09 15:58:36 -06:00
Sam Atkins
b645e26e9b LibWeb/CSS: Bring TokenStream in line with spec
When the TokenStream code was originally written, there was no such
concept in the CSS Syntax spec. But since then, it's been officially
added, (https://drafts.csswg.org/css-syntax/#css-token-stream) and the
parsing algorithms are described in terms of it. This patch brings our
implementation in line with the spec. A few deprecated TokenStream
methods are left around until their users are also updated to match the
newer spec.

There are a few differences:

- They name things differently. The main confusing one is we had
  `next_token()` which consumed a token and returned it, but the spec
  has a `next_token()` which peeks the next token. The spec names are
  honestly better than what I'd come up with. (`discard_a_token()` is a
  nice addition too!)

- We used to store the index of the token that was just consumed, and
  they instead store the index of the token that will be consumed next.
  This is a perfect breeding ground for off-by-one errors, so I've
  finally added a test suite for TokenStream itself.

- We use a transaction system for rewinding, and the spec uses a stack
  of "marks", which can be manually rewound to. These should be able to
  coexist as long as we stick with marks in the parser spec algorithms,
  and stick with transactions elsewhere.
2024-10-09 17:29:29 +01:00
Andrew Kaster
be13a0ec3f Meta: Port changes to gn build
8b3a5d0b96
99ef078c97
dc401f49ea
d30ae92b82
c22a2d8f2b
6cf7d07a98
0c98c7637e
00487a7b25
1db243c006
2024-10-09 06:43:31 -04:00
Shannon Booth
7ea17d2fea Meta: Use a common function for getting build directory
Between WPT.sh and ladybird.sh.

This is useful to me as I set my default build configuration to Debug,
and have been hacking around with the WPT script to align with this
configuration.
2024-10-09 11:31:51 +01:00
Shannon Booth
16f68ab1bd Meta: Make LADYBIRD_SOURCE_DIR consistent between WPT.sh and ladybird.sh
ladybird.sh allows the source directory to be overriden to point to
another source directory. I am not sure if anyone is actually using this
behaviour in practise, but let's make the behaviour at least common
between the two scripts with a helper function.
2024-10-09 11:31:51 +01:00
Jelle Raaijmakers
f88acedc8f AK: Remove unused floating point conversion code
Currently I don't expect this code to be ever used in Ladybird.
2024-10-08 19:02:51 +02:00
Jamie Mansfield
f610a12671 LibWeb/UIEvents: Implement TextEvent 2024-10-08 11:45:39 +02:00
Jamie Mansfield
86e20ea246 LibWeb/UIEvents: Implement CompositionEvent 2024-10-08 11:45:39 +02:00
Jamie Mansfield
9fce70069d LibWeb/UIEvents: Implement InputEvent 2024-10-08 11:45:39 +02:00
Timothy Flynn
00487a7b25 LibWebView+LibWeb: Remove ResourceLoader and WebSocket adapters
These were used to provide a layer of abstraction between ResourceLoader
and the networking backend. Now that we only have RequestServer, we can
remove these adapters to make the code a bit easier to follow.
2024-10-08 06:52:51 +02:00
Timothy Flynn
1b324f3ae1 LibWebView+UI: Remove Qt networking infrastructure
Now that we use libcurl, there's no reason to keep Qt networking around.
Further, it doesn't support all features we need anyways, such as non-
buffered request handling for SSE.
2024-10-08 06:52:51 +02:00
Noah Bright
d30ae92b82 LibWeb: Define PerformanceEventTiming
https://www.w3.org/TR/event-timing/#sec-performance-event-timing

Add idl, header and stubs for PerformanceEventTiming interface.

Two missing `PerformanceEntry` types that have come up in issues
are the `first-input` and the `event` entryTypes. Those are both
this.

Also, because both of those are this same interface, the static
methods from the parent class are difficult to implement because
of instance-specific details. Might either need subclasses or to
edit the parent and also everything that inherits from it :/
2024-10-08 03:44:55 +02:00
Shannon Booth
dc401f49ea LibWeb+LibURL: Move HTML::Origin to URL::Origin
While Origin is defined in the HTML spec - this leaves us with quite an
awkward relationship as the URL spec makes use of AO's from what is
defined in the HTML spec.

To simplify this factoring, relocate Origin into LibURL.
2024-10-05 10:46:30 +02:00
Shannon Booth
e9dd05b2b5 LibWeb: Correct attributes on IDL interface 'operations'
This fixes four tests for the IDL harness for URL under:

https://wpt.live/url/idlharness.any.html
and https://wpt.live/url/idlharness.any.worker.html

But probably some tests in other places too :^)
2024-10-05 10:46:30 +02:00
Shannon Booth
fb2b78620d LibWeb: Factor out function to define the 'operations' on an interface 2024-10-05 10:46:30 +02:00
rmg-x
d8c36ed458 LibCore: Remove unused classes and headers 2024-10-05 09:18:54 +02:00
Andreas Kling
cc4b3cbacc Meta: Update my e-mail address everywhere
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, 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
Push notes / build (push) Waiting to run
2024-10-04 13:19:50 +02:00
Andrew Kaster
29416befe6 LibWeb: Add ServiceWorker job registration and execution
Now we can register jobs and they will be executed on the event loop
"later". This doesn't feel like the right place to execute them, but
the spec needs some updates in this regard anyway.
2024-10-04 07:08:08 +02:00
Andrew Kaster
3ecf6de652 LibMedia+Ladybird: Use pkg_check_modules to find pulseaudio
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, 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
Push notes / build (push) Waiting to run
2024-10-02 20:23:03 -04:00
Zachary Huang
e0bd42be95 ImageDecoder+LibGfx: Collate decoded bitmaps before sending over IPC
There is an issue where gifs with many frames cannot be loaded, as each
bitmap is sent over IPC using a separate file descriptor, and there is
limit on the maximum number of descriptors per IPC message. Thus, trying
to load gifs with more than 64 frames (the current limit) causes the
image decoder process to die.

This commit introduces the BitmapSequence class, which is a thin wrapper
around the type Vector<Optional<NonnullRefPtr<Gfx::Bitmap>>> and
provides an IPC encode/decode routine that collates all bitmap data into
a single buffer so that only a single file descriptor is required per
IPC transfer, even if multiple frames are being sent.
2024-10-02 15:57:41 -06:00
Andrew Kaster
ebaba7fb7b LibMedia: Mark ffmpeg as required, and reorganize CMakeLists
Now it should be clearer looking at the build scripts what options
are available for building LibMedia, and what packages are required.
2024-10-02 16:03:33 -04:00
Sam Atkins
cd13b30fb8 LibWeb/CSS: Add parsing for <opentype-tag>
This is a special form of `<string>` so doesn't need its own style value
type. It's used in a couple of font-related properties. For completeness
it's included in ValueType.
2024-10-02 16:28:55 +01:00
Andrew Kaster
91de0438fe Meta: Add swift-format linter script
Some checks are pending
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, 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
Push notes / build (push) Waiting to run
swift-format is available in the Xcode 16 Beta and homebrew.
We will need some extra docs to tell Linux developers how to get it on
their distribution.

This also makes use of the fact that you can pass git diff a colon
delimited pattern to include ':*pattern' or exclude ':!*pattern'
matching files, which is pretty neat.
2024-10-01 13:33:05 -06:00
Saleem Abdulrasool
cf702d21d1 Meta: Remove unused code generate tools
These are no longer in the tree, remove their definitions.
2024-10-01 10:14:16 -06:00
Jelle Raaijmakers
233b4f2ca8 LibMedia+everywhere: Remove superfluous and unused audio code
We had numerous NiH-based implementations of audio formats and metadata
that we now no longer need because we either don't make use of the code,
or we replaced its implementation by FFmpeg.
2024-09-30 18:48:12 +02:00
Jelle Raaijmakers
57783eff24 LibMedia: Convert OggLoader into generic FFmpegLoader
This loader supports whatever format libavformat and libavcodec can
handle. Currently only seekable streams are supported, and we still have
some limitations as to the number of channels and sample format.

Plays all non-streaming audio files at:

  https://tools.woolyss.com/html5-audio-video-tester/
2024-09-30 18:48:12 +02:00
Sam Atkins
fdcece2e88 LibWeb/CSS: Implement legacy name aliases for properties
When a property is a "legacy name alias", any time it is used in CSS or
via the CSSOM its aliased name is used instead.
(See https://drafts.csswg.org/css-cascade-5/#legacy-name-alias)

This means we only care about the alias when parsing a string as a
PropertyID - and we can just return the PropertyID it is an alias for.
No need for a distinct PropertyID for it, and no need for LibWeb to
care about it at all.

Previously, we had a bunch of these properties, which misused our code
for "logical aliases", some of which I've discovered were not even
fully implemented. But with this change, all that code can go away, and
making a legacy alias is just a case of putting it in the JSON. This
also shrinks `StyleProperties` as it doesn't need to contain data for
these aliases, and removes a whole load of `-webkit-*` spam from the
style inspector.
2024-09-27 17:16:23 +01:00
Andrew Kaster
2b13079b35 Meta: Update Ladybird and services to build again with gn 2024-09-27 10:15:08 -06:00
Andrew Kaster
7880b2fba9 Meta: Update LibWeb to build again with gn 2024-09-27 10:15:08 -06:00
Andrew Kaster
9bcdf8eafe Meta: Update non-LibWeb libraries in gn build 2024-09-27 10:15:08 -06:00
Andrew Kaster
e53ad772f3 Meta: Update LibUnicode gn build to depend on icu 2024-09-27 10:15:08 -06:00
Andrew Kaster
4348efd078 Meta: Update LibMedia gn build to depend on ffmpeg 2024-09-27 10:15:08 -06:00
Andrew Kaster
b395e6a6a6 Meta: Update LibGfx gn build for removed files and added Libraries
LibGfx depends on a lot of third-party libs now.
2024-09-27 10:15:08 -06:00
Andrew Kaster
a1e2437b21 Meta: Add missing files and libraries to LibCore in gn build 2024-09-27 10:15:08 -06:00
Andrew Kaster
8aac8f25ba Meta: Handle removed and renamed libraries in gn build 2024-09-27 10:15:08 -06:00
Andrew Kaster
8636a49f47 Meta: Update AK gn build for new files and dependencies 2024-09-27 10:15:08 -06:00
Andrew Kaster
0fefcbcf5e Meta: Handle removal of emoji files in gn build
Also add inspector.html to the file sets that are copied to the build
directory and macOS bundle.
2024-09-27 10:15:08 -06:00
Andrew Kaster
6ee1afc9c0 Meta: Add third-party libraries to gn build with vcpkg install script
The vcpkg install is handled through an action to run vcpkg install with
the private --x-install-root flag that their CMake toolchain file uses
to install dependencies into a build-time directory.
2024-09-27 10:15:08 -06:00
Andrew Kaster
aa1bf3e8a4 Meta: Add missing -Wno-unqualified-std-cast-call warning to gn build 2024-09-27 10:15:08 -06:00
Andrew Kaster
994457d7af LibMedia: Use build-time rather than configure-time check for avcodec
Rather than checking the avcodec version in CMake, check it using the
avcodec version macros in the only source file that needs to know about
the AVFrame API/ABI change in version 59.24.100. This is friendlier to
other build systems that would rather avoid configure time checks.
2024-09-27 06:45:32 -04:00
Saleem Abdulrasool
a7a24fed68 Meta: Add an option for building against AppKit
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, 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
Push notes / build (push) Waiting to run
The build assumed QT or AppKit are the only build UI frameworks. This
extends the default assumption away from that to start experimenting
with building on other platforms.
2024-09-25 14:56:40 -06:00
Saleem Abdulrasool
60e7a6ea28 Meta: Update environment variables for ak_debug_gen
This updates the environment variables that are passed along to the tool
to run this build command.
2024-09-25 12:51:48 -06:00
Saleem Abdulrasool
050ffddff3 Meta: Update the build rules for AK
The `gn` build did not generate the CMake configuration file for the
backtrace module. Update the rules to configure the generated macros
mirroring the CMake build.
2024-09-25 12:41:05 -06:00
Saleem Abdulrasool
199f0e45cb Meta: Make download_file work on Windows
The file is not committed to disk until the close which occurs at the
termination of the scope. Extract the `rename` to outside the scope
allowing this to work on Windows. The `download_file` utility downloads
a file in the `gn` build.
2024-09-25 10:19:51 -06:00
Jamie Mansfield
1a012f279a LibWeb/WebVTT: Implement VTTRegion idl interface 2024-09-24 23:48:56 +01:00
Tim Ledbetter
b634683662 Meta: Allow ladybird.sh to run any target in the MacOS app bundle
Previously, using `ladybird.sh run` with any target that was part of the
MacOS app bundle would try to run the given executable from the wrong
directory.
2024-09-23 11:11:36 -06:00
Andrew Kaster
0bedc79ca5 CMake: Pull swift-testing from the Swift toolchain
This confirmed works on Xcode 16, and Xcode 16.1 Beta 2, with CMake 3.28
or higher.

On linux, the 6.0.0 release from swiftly is still missing my libstdc++
workaround, so it needs a snapshot to work.
2024-09-23 11:06:26 -06:00
Andrew Kaster
7ab1d117f1 CMake: Enable finding the Swift -target flag in more cases
When the detected SDK for CMAKE_OSX_SYSROOT and friends has the same
version as your current macOS system version, CMake helpfully doesn't
set CMAKE_OSX_DEPLOYMENT_TARGET. Unfortunately, in this case, swiftc
will default to macOS 10.4, which is absolutely ancient. Grab the target
triple from the -print-target-info JSON when CMAKE_OSX_DEPLOYMENT_TARGET
is not provided at configure time.
2024-09-23 11:06:26 -06:00
Andreas Kling
42a1a0bd73 LibWeb: Put CSS transitions debug spam behind CSS_TRANSITIONS_DEBUG
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, 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
Push notes / build (push) Waiting to run
2024-09-22 10:46:54 +02:00
Andreas Kling
d77843e2f0 LibHTTP: Remove the now-unused job classes
The request/response classes are still used in a couple places and will
need more careful removal.
2024-09-22 06:43:12 +02:00
Timothy Flynn
3332230cef LibWebView+WebContent+headless-browser: Make the page info IPCs async
The IPCs to request a page's text, layout tree, etc. are currently all
synchronous. This can result in a deadlock when WebContent also makes
a synchronous IPC call, as both ends will be waiting on each other.

This replaces the page info IPCs with a single, asynchronous IPC. This
new IPC is promise-based, much like our screenshot IPC.
2024-09-19 18:07:17 +02:00
Sam Atkins
76daba3069 LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue
This matches the name in the CSS Typed OM spec. There's quite a lot
still to do to make it match the spec behavior, but this is the first
step.
2024-09-18 20:38:41 +01:00
Tim Ledbetter
35ab0a2db6 Meta: Support all available logging formats in WPT.sh script
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, 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
Push notes / build (push) Waiting to run
This change allows the user to specify the format of the log file to be
generated by the `WPT.sh` script. Multiple logging arguments may now be
specified.

The supported logging arguments are: `--log-raw`, `--log-unittest`,
`--log-xunit`, `--log-html`, `--log-mach`, `--log-tbpl`,
`--log-grouped`, `--log-chromium`, `--log-wptreport` and
`--log-wptscreenshot`. These arguments act the same as the equivalent
arguments supported by `wpt run`.

The short `--log` argument may also be used as an alias for `--log-raw`.
2024-09-14 15:04:22 +02:00
Timothy Flynn
541968b30d LibWeb+LibWebView+WebContent: Return a named enum from UI event handlers
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, 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
Push notes / build (push) Waiting to run
UI event handlers currently return a boolean where false means the event
was cancelled by a script on the page, or otherwise dropped. It has been
a point of confusion for some time now, as it's not particularly clear
what should be returned in some special cases, or how the UI process
should handle the response.

This adds an enumeration with a few states that indicate exactly how the
WebContent process handled the event. This should remove all ambiguity,
and let us properly handle these states going forward.

There should be no behavior change with this patch. It's meant to only
introduce the enum, not change any of our decisions based on the result.
2024-09-12 17:38:36 -04:00
Jelle Raaijmakers
d29797f118 LibMedia: Add ogg/vorbis support
Technically this supports any ogg/* audio stream, but it was at least
tested successfully on ogg/vorbis :^)
2024-09-12 10:01:19 +02:00
Jelle Raaijmakers
1b267abf36 LibMedia: Link to avformat as well
This allows us to process container formats in future commits.
2024-09-12 10:01:19 +02:00
Jelle Raaijmakers
3bf910706f LibMedia: Remove AudioQueue and UserSampleQueue
Both unused.
2024-09-12 10:01:19 +02:00
Jelle Raaijmakers
7728633906 LibMedia+Utilities: Remove encoders and aconv
We don't use these in Ladybird, so let's get rid of them.
2024-09-12 10:01:19 +02:00
Jelle Raaijmakers
85fd2e281b LibMedia: Absorb LibAudio
LibMedia will be responsible for both audio and video decoding.
2024-09-12 10:01:19 +02:00
Sam Atkins
2671820ace LibWeb: Move our "default sizing algorithm" function into a public place
Specifically, this is used by the updated algorithm for parsing a sizes
attribute, so we need access to it there.

No behaviour changes.
2024-09-12 07:39:11 +02:00
Annya
bea7eec518 LibWeb/CSS: Implement revert-layer
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, 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
Push notes / build (push) Waiting to run
With the introduction of the cascade layer, the 5th CSS-wide keyword,
`revert-layer`, has been added.
2024-09-11 22:30:20 +01:00
sideshowbarker
a7578164d4 Meta: Add script for checking WebIDL files
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, 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
Push notes / build (push) Waiting to run
This adds a new script for linting WebIDL files, and adds it to the set
of scripts Meta/lint-ci.sh runs. Initially, this script does just one
thing: normalizes IDL definition lines so they start with four spaces.
2024-09-10 21:16:53 +01:00
Andrew Kaster
dc18280f80 Meta: Remove HeaderCheck tool
No one has run this tool on the ladybird source tree post-fork, and we
have very similar functionality in clangd that can be enabled if needed.
2024-09-10 07:39:15 +02:00
Andrew Kaster
e66ad7c452 Meta: Remove stale zsh shell completions for serenity.sh
If someone wants to add these back for ladybird.sh, they'll need largely
rewritten anyway.
2024-09-10 07:39:15 +02:00
Andrew Kaster
0427646883 Meta: Remove check-ak-test-files script
This script only checks Tests/AK, and verifies that all source files
that match Tests/AK/*.cpp are listed in the CMakeLists.txt.

This is a bit excessive. We don't have this check for any other test
files. This sort of error will definitely ™️ be caught in review.
2024-09-10 07:39:15 +02:00
Andrew Kaster
9356c967d7 Meta: Remove unused functions from shell_include.sh 2024-09-10 07:39:15 +02:00
Andrew Kaster
b3a009f521 Meta: Check more file extensions for newlines at EOF 2024-09-09 22:34:52 -06:00
Laura Braun
26415d39f7 Meta: Check for CMake version in ladybird.sh
CMake reads CMakePresets.json, which is before it reads CMakeLists.txt.
This causes CMake Error: Unrecognized "version" field if the version of
CMake is older than support for presets, or the version field of
presets.

The fix is to check CMake version in ladybird.sh before trying to create
the build directory.

Co-Authored-By: Andrew Kaster <andrew@ladybird.org>
2024-09-09 13:10:19 -06:00
Andreas Kling
ddbfac38b0 LibWeb: Note what's causing a style invalidation to happen
You can now build with STYLE_INVALIDATION_DEBUG and get a debug stream
of reasons why style invalidations are happening and where.

I've rewritten this code many times, so instead of throwing it away once
again, I figured we should at least have it behind a flag.
2024-09-08 09:45:31 +02:00
Andreas Kling
1f5c49f40d LibWeb: Make CSS::is_inherited_property(PropertyID) go fast
Instead of switching on the PropertyID and doing a boatload of
comparisons, we reorder the PropertyID enum so that all inherited
properties are in two contiguous ranges (one for shorthands,
one for longhands).

This replaces the switch statement with two simple range checks.

Note that the property order change is observable via
window.getComputedStyle(), but the order of those properties is
implementation defined anyway.

Removes a 1.5% item from the profile when loading https://hemnet.se/
2024-09-08 09:45:31 +02:00
Jamie Mansfield
48366ddddf LibWeb/WebAssembly: Use a debug flag for dbgln calls
This prevents the horrendous console spam when functions are resolved,
e.g. on the Royal Albert Hall website.
2024-09-07 19:44:23 +02:00
Timothy Flynn
28f27ff1c4 LibWebView+LibUnicode: Remove (nearly) unused GeneratorUtil header
This header held a bunch of utility functions shared across several code
generators. The only user of any of these utilities now is the public
suffix generator. Move the one used function to that generator, and
remove the common header.
2024-09-06 16:36:20 -04:00
Aliaksandr Kalenik
4e9d6a543a Everywhere: Remove bitmap emojis inherited from SerenityOS
These are no longer used since we switched to using the system emoji
font.
2024-09-06 08:30:30 -04:00
Sam Atkins
1c6133aa52 LibWeb/CSS: Add CSSOM types for @layer rules
Depending on usage, `@layer` has two forms, with two different CSSOM
types. One simply lists layer names and the other defines a layer with
its contained rules.
2024-09-06 07:49:55 +02:00
Aliaksandr Kalenik
a9d5a99568 LibGfx+LibWeb: Replace remaining OpenType implementation with Skia
This change should move us forward toward emoji support, as we are no
longer limited by our own OpenType implementation, which was failing
to parse the TrueType Collection format used to store emoji fonts
(at least on macOS).
2024-09-05 19:21:52 +02:00
Jamie Mansfield
4c5a176354 LibWeb: Stub MediaCapabilities IDL interface 2024-09-05 14:52:26 +01:00
Sam Atkins
8cbc211616 Meta: Make embed_as_string_view.py produce Strings instead
This is only used for CSS style sheets. One case wants it as a String,
and the others don't care, but will in future also want to have the
source as a String.
2024-09-03 10:12:07 +01:00
Olekoop
873e576da2 LibGfx: Use a diffrent way for finding libjxl on Android
When trying to use pkgconfig for finding libjxl, the build fails
trying to link the cross-compiler's libc++.
Using this way libjxl also requires hwy library.

Findlibjxl.cmake was taken from SDL_image and altered to include its license.
2024-09-03 00:17:49 -06:00
Andrew Kaster
188b3bb9b8 CMake: Add find module for swift-testing
This project is a part of the Xcode-shipped toolchain on macOS, but
needs built from source on other platforms. However, using the Xcode
version of the framework leads to a bunch of rpath confusion when
trying to link it the expected way. I suspect that there will be a
more intuitive way to link this library from the toolchain when it
stabilizes. So we'll build it everywhere :)
2024-08-28 21:27:35 -06:00
Andrew Kaster
062e687289 Meta: Apply cxx-interop settings to swift targets directly
Instead of using a global setting, let's set this per-target. This
prevents conflicts when importing third-party dependencies that do
not tolerate the mode being "default".
2024-08-28 21:27:35 -06:00
Andrew Kaster
c5153cb398 Meta+Libraries+AK: Append Cxx to imported library module names in swift
At the same time, simplify CMakeLists magic for libraries that want to
include Swift code in the library. The Lib-less name of the library is
now always the module name for the library with any Swift additions,
extensions, etc. All vfs overlays now live in a common location to make
finding them easier from CMake functions. A new pattern is needed for
the Lib-less modules to re-export their Cxx counterparts.
2024-08-27 17:22:31 -06:00
Andrew Kaster
f27d638e0a CMake: Always use a target for linking skia 2024-08-27 17:22:31 -06:00
Tim Ledbetter
53ab6fa403 LibWeb: Stub the ServiceWorkerContainer interface 2024-08-25 09:48:30 +02:00
Tim Ledbetter
0c0a4a6042 LibWeb: Stub the ServiceWorkerRegistration interface 2024-08-25 09:48:30 +02:00
Tim Ledbetter
70fdf7affb IDLGenerators: Add register to the list of C++ keywords
This ensures that a generated C++ method called `register` will have an
underscore appended to it, avoiding a compile error.
2024-08-25 09:48:30 +02:00