Commit Graph

62287 Commits

Author SHA1 Message Date
Zaggy1024
32714878ad LibMedia/Matroska: Make SampleIterator getters const 2024-06-24 12:41:32 -06:00
Zaggy1024
457a69786b LibMedia: Pass Matroska codec private data to the FFmpeg decoder
This is necessary to give the H.264 decoder the data it needs to
initialize, including frame size and profile.
2024-06-24 12:41:32 -06:00
Zaggy1024
81001b37ce LibMedia: Use FFmpeg to decode more video formats
VP9 continues to function, but this also allows AV1 to be decoded. With
this commit, H.264 is still non-functional, as the decoder requires
some extra initial data from the track definition in the Matroska file.
2024-06-24 12:41:32 -06:00
Zaggy1024
bf1e0fac94 LibMedia/Matroska: Move the definition get_codec_id_for_track up
The function is separated from the string-to-enum function it uses, and
the order is also inconsistent with header.
2024-06-24 12:41:32 -06:00
Zaggy1024
55fda2068b LibMedia/Matroska: Make track entries ref-counted
These aren't particularly small objects, but we were still copying them
around all over the place. When TrackEntry contains data buffers, they
won't need to be copied as well.
2024-06-24 12:41:32 -06:00
Zaggy1024
40fe0cb9d5 LibMedia: Store YUV planes as byte arrays with no padding for 8-bit
This should halve the size of frames in memory for frames with 8-bit
color components, which is the majority of videos.

Calculation of the size of subsampled planes has also been consolidated
into a struct. There are likely some places that will still need to
change over to this, but it should prevent issues due to differing
handling of rounding/ceiling.
2024-06-24 12:41:32 -06:00
Zaggy1024
b49d3dcf6f LibMedia: Split output bitmap size assertions to individual lines
Now Clang will stop complaining about DeMorgan's theorem.
2024-06-24 12:41:32 -06:00
Zaggy1024
fe2a63d485 LibMedia: Remove fixed-point path for BT.2020 matrix coefficients
BT.2020 will mainly be used with bit depths greater than 8, so having
this specialization is mostly pointless until we use fixed-point math
for higher bit depths.
2024-06-24 12:41:32 -06:00
Zaggy1024
6f8389c483 LibMedia: Ensure that buffers passed to SubsampledYUVFrame are moved 2024-06-24 12:41:32 -06:00
Zaggy1024
d3f88b4987 LibMedia/Matroska: Actually read out the video color range
Apparently I forgot to put read the value for this field, though this
generally doesn't matter since video bitstreams usually specify CICP as
well.
2024-06-24 12:41:32 -06:00
Zaggy1024
a99ff1fcb4 LibMedia: Add formatters for CICP and its components
This is often useful for debugging.
2024-06-24 12:41:32 -06:00
Zaggy1024
291c1c3bd0 LibMedia: Remove unused includes from VideoSampleData.h 2024-06-24 12:41:32 -06:00
circl
71e099c79a Base: Remove archive.zip 2024-06-24 09:45:41 -06:00
circl
63fa32416d Base: Move test-webm.webm out of /home/anon 2024-06-24 09:45:41 -06:00
circl
9f7f6aa80c LibTLS: Remove key-logging debug feature
This attempted to save data into /home/anon even on Linux
2024-06-24 09:45:41 -06:00
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