Commit Graph

62272 Commits

Author SHA1 Message Date
circl
f03e6fddf1 Meta: Remove SerenityOS-specific WASM test installer 2024-06-24 09:45:41 -06:00
circl
37dcb165eb Meta: Remove CommonMark spec test downloader
We no longer have a Markdown implementation to test
2024-06-24 09:45:41 -06:00
circl
e5018d2a7a Utilities: Remove zip and unzip
They are not even being compiled
2024-06-24 09:45:41 -06:00
circl
84ed7e0a63 Userland: Remove unused CMakeLists.txt files
Seems that Meta/Lagon/CMakeLists.txt does their job instead, and that
this is a leftover from the SerenityOS build system.
2024-06-24 09:45:41 -06:00
Andreas Kling
23b5e47b7b Meta: Update Polar link in FUNDING.yml 2024-06-24 17:42:48 +02:00
Timothy Flynn
3c23ce9007 LibTimeZone: Remove entirely unused time zone methods
Evaluating third-party alternatives to LibTimeZone will be simpler with
unused functionality removed.
2024-06-24 15:04:58 +02:00
Timothy Flynn
be0dca8da3 LibTimeZone: Exclude from the tools build and switch to a shared library
It is not needed by code generators anymore, so it is not needed in the
Lagom tools build. And it is not needed as an object library anymore; it
was created this way so it could be included in Serenity's LibC.
2024-06-24 15:04:58 +02:00
Tim Ledbetter
0b753dcb44 LibWeb: Base the current find in page position on the current selection
Prior to this change, our find in page function always highlighted the
first match whenever the query was updated. After this change the
current match index is set such that it is the first match to occur
after the end of the current selection.

This means the current match position is not lost if the user modifies
their existing query.

This matches the behavior of find in page in other browsers.
2024-06-24 13:58:30 +02:00
Tim Ledbetter
0b33331f36 LibWeb: Ensure a repaint occurs when the current selection is cleared
This fixes an issue where clearing the find in page query would not
always visually clear the selection.
2024-06-24 13:57:02 +02:00
Aliaksandr Kalenik
760dfdcc1a LibWeb: Rename CommandExecutor to DisplayListPlayer
Use more widely recognized name among browser engine developers.
2024-06-24 13:22:59 +02:00
Aliaksandr Kalenik
854b269338 LibWeb: Rename RecordingPainter to DisplayListRecorder
Use more widely recognized name among browser engine developers.
2024-06-24 13:22:59 +02:00
Aliaksandr Kalenik
5570e6b648 LibWeb: Rename CommandList to DisplayList
Use more widely recognized name among browser engine developers.
2024-06-24 13:22:59 +02:00
Aliaksandr Kalenik
c92f8ab1ea Everywhere: Use IOSurface as backing store on macOS
Using mmap-allocated memory for backing stores does not allow us to
benefit from using GPU-accelerated painting, because all the performance
increase we get is mostly negated by reading the GPU-allocated texture
back into RAM, so it can be shared with the browser process.

With IOSurface, we get a framebuffer that is both shareable between
processes and can be used as underlying memory for an OpenGL/Metal
texture.

This change does not yet benefit from using IOSurface and merely wraps
them into Gfx::Bitmap to be used by the CPU painter.
2024-06-24 13:09:08 +02:00
Aliaksandr Kalenik
e37071ae05 LibCore: Add a wrapper for IOSurface
Going to be used for backing store in upcoming changes.
2024-06-24 13:09:08 +02:00
Aliaksandr Kalenik
c46bea479c Everywhere: Hand pid of new process to client in launch_server_process()
Allows WebContentClient to get pid of WebContent process right after
creation, so there is no window between forking and
notify_process_information() IPC response, when client doesn't know the
pid.
2024-06-24 13:09:08 +02:00
Aliaksandr Kalenik
3110411c60 LibGfx: Add release callback for Bitmap
In upcoming changes, bitmap is going to be used to wrap the memory of
the IOSurface, and we will want to release the corresponding IOSurface
along with the bitmap.
2024-06-24 13:09:08 +02:00
Aliaksandr Kalenik
be2c484bb6 LibWebView+WebContent: Move backing store allocation into WebContent
In the upcoming changes, we are going to switch macOS to using an
IOSurface for the backing store. This change will simplify the process
of sharing an IOSurface between processes because we already have the
MachPortServer running in the browser, and WebContent knows how to
locate the corresponding server.
2024-06-24 13:09:08 +02:00
Aliaksandr Kalenik
cbbe49cdf0 WebContent: Move screenshot requests handling into repaint loop
This change ensures that if a screenshot is requested between teardown
of paintable tree and relayout, we will wait for layout to complete
before taking a screenshot.
2024-06-24 13:09:08 +02:00
Luke Warlow
6014727c20 LibWebView: Allow data URLs in sanitize_url
Allow navigation to data URLs from browser UI.
2024-06-24 06:31:17 -04:00
Timothy Flynn
ebdb92eef6 LibUnicode+Everywhere: Merge LibLocale back into LibUnicode
LibLocale was split off from LibUnicode a couple years ago to reduce the
number of applications on SerenityOS that depend on CLDR data. Now that
we use ICU, both LibUnicode and LibLocale are actually linking in this
data. And since vcpkg gives us static libraries, both libraries are over
30MB in size.

This patch reverts the separation and merges LibLocale into LibUnicode
again. We now have just one library that includes the ICU data.

Further, this will let LibUnicode share the locale cache that previously
would only exist in LibLocale.
2024-06-23 19:52:45 +02:00
Timothy Flynn
c9d9e1bb1f Meta: Exclude LibCore, LibUnicode, and LibURL from the lagom-tools build
We only need LibCoreMinimal for the lagom-tools build. In particular, by
removing LibUnicode, we remove the lagom-tools dependence on the system
ICU package, as we do not have vcpkg hooked into this build. (We could
probably add vcpkg here, but since this libraries aren't even needed, we
don't need to bother).
2024-06-23 19:52:45 +02:00
Timothy Flynn
546f740772 LibCore: Reduce the size of LibCoreMinimal slightly
A couple of files no longer needed after forking from Serenity and
removing a bunch of code generators.
2024-06-23 19:52:45 +02:00
Timothy Flynn
666979fb90 LibUnicode: Remove unused headers from GenerateEmojiData
Mostly just to make it clear we do not depend on LibUnicode in this
generator.
2024-06-23 19:52:45 +02:00
Timothy Flynn
ec36d7122f LibIDL: Depend on LibCoreMinimal instead of LibCore
When any LibCore file (or any of its dependents) changes, we have to
regenerate all IDL bindings. By depending on LibCoreMinimal, the number
of impacting files greatly reduces.

As an example, changing a .cpp file in LibUnicode would previously cause
about 1800 ninja targets to rebuild. This is now reduced to about 200.
2024-06-23 19:52:45 +02:00
Andreas Kling
85a4cfc59b LibWeb: Add the bare minimum to render SVGAElement (<a>) 2024-06-23 19:15:24 +02:00
Andreas Kling
ae906ca497 LibWeb: Treat width: {min,max,fit}-content as auto if ratio unresolvable
This appears to match other engines.
2024-06-23 19:15:24 +02:00
Andreas Kling
db1faef786 LibWeb: Fix overeager fallback to stretch-fit width for some flex items
If a flex item has a preferred aspect ratio and the flex basis is not
definite, we were falling back to using stretch-fit for the main size,
since that appeared to match other browsers.

However, we missed the case where we actually have a definite cross size
through which the preferred aspect ratio can be naturally resolved.
2024-06-23 19:15:24 +02:00
Andreas Kling
9c02ace897 LibWeb: Allow flex-basis: {min,max,fit}-content 2024-06-23 19:15:24 +02:00
Daniel Bertalan
9df41954c0 CI: Use Xcode's Clang in the macOS workflows
Most users will be building with Xcode Clang on macOS anyway, as our
build scripts default to the system compiler if it's new enough. We
already have an upstream Clang-based workflow on Linux, so we won't lose
any compiler coverage by switching to Apple Clang on macOS.

This should help us avoid build breakages like #186.
2024-06-23 10:39:53 -06:00
Luke Warlow
d86a6e1bec LibWeb: Implement dialog element's close watcher
Dialog elements now correctly establish a close watcher when
shown modally.

This means modal dialogs now correctly close with an escape key press.
2024-06-23 14:30:13 +02:00
Tim Ledbetter
8969f2e34a LibWeb: Disallow pasting into non-editable text nodes 2024-06-23 10:31:00 +02:00
Timothy Flynn
2f66d7b3ba Meta: Update ICU to version 74.2#2
There is no functional change here, but they added an error message to
the install output to indicate what host tools need to be installed.
This has tripped some people up, so it seems worth updating to.
2024-06-23 10:30:23 +02:00
Timothy Flynn
946a09d355 Meta: Re-bootstrap vcpkg when we update its version
Fetching package versions that were shipped after vcpkg was last
bootstrapped requires re-bootstrapping vcpkg.
2024-06-23 10:30:23 +02:00
Andreas Kling
a3c8e60710 LibWeb: Implement very basic in-memory HTTP caching
This patch adds a simple in-memory HTTP cache to each WebContent
process.

It's currently off by default (turn it on with --enable-http-cache)
since the validation logic is lacking and incomplete.
2024-06-23 09:37:23 +02:00
Andreas Kling
47169db452 LibWeb: Make HTTP response directive parsing more robust 2024-06-23 09:37:23 +02:00
Diego
3b40667413 LibWasm: Check source and destination offsets in memory.init
Overflows are no longer possible.
2024-06-22 20:52:32 +02:00
Andreas Kling
0d22e0703f LibWebSocket: Use HTTP::HeaderMap in WebSocket code 2024-06-22 18:53:24 +02:00
Jamie Mansfield
4c5fa102a3 LibWeb: Don't set hashChange for classic history navigate events
See:
- https://github.com/whatwg/html/pull/10393
2024-06-22 17:40:24 +02:00
Luke Warlow
b216046234 LibWeb: Implement CloseWatcher API
This implements most of the CloseWatcher API from the html spec.

AbortSignal support is unimplemented.

Integration with dialogs and popovers is also unimplemented.
2024-06-22 17:39:53 +02:00
Andrew Kaster
527632f416 CI: Re-enable libjs-test262 and test-wasm runs 2024-06-22 11:10:15 -04:00
Andrew Kaster
79db3b32c2 CI+Meta: Delete wasm workflow and js_repl module 2024-06-22 11:10:15 -04:00
Andrew Kaster
4ea2ff82ac CI: Use ladybirdbrowser namespace for devcontainer
This was missed in the ladybirdwebbrowser -> ladybirdbrowser org change.
2024-06-22 11:10:15 -04:00
Edwin Hoksberg
2b30414c1d LibWeb: Add attribute list that must always be compared without casing 2024-06-22 15:52:04 +02:00
Jamie Mansfield
68d84755f4 LibWeb: Implement IDBRequest.onerror 2024-06-22 14:57:47 +02:00
Jamie Mansfield
5ebc09c83b LibWeb: Implement IDBRequest.onsuccess 2024-06-22 14:57:47 +02:00
Jamie Mansfield
fe3962a64d LibWeb: Implement IDBOpenDBRequest.onupgradeneeded 2024-06-22 14:57:47 +02:00
Jamie Mansfield
30db7fb323 LibWeb: Implement IDBOpenDBRequest.onblocked 2024-06-22 14:57:47 +02:00
Jamie Mansfield
1114bbf2f1 LibWeb: Implement HTMLStyleElement.disabled 2024-06-22 14:57:47 +02:00
Jamie Mansfield
be08abbf8a LibWeb: Remove is_media_feature_name function
This was made redundant in GH-12971 (SerenityOS), and removing it drops
a FIXME :^)

See:
- https://github.com/SerenityOS/serenity/pull/12971
2024-06-22 14:57:47 +02:00
Tim Ledbetter
31d7fa2442 LibWeb: Fire auxclick event on middle click
Previously, no event was fired on middle click. This change also allows
the UI to open a link in a new tab on middle click.
2024-06-22 14:57:36 +02:00