summaryrefslogtreecommitdiff
path: root/Meta
AgeCommit message (Collapse)Author
2022-11-25LibVideo: Read Matroska lazily so that large files can start quicklyZaggy1024
The Demuxer class was changed to return errors for more functions so that all of the underlying reading can be done lazily. Other than that, the demuxer interface is unchanged, and only the underlying reader was modified. The MatroskaDocument class is no more, and MatroskaReader's getter functions replace it. Every MatroskaReader getter beyond the Segment element's position is parsed lazily from the file as needed. This means that all getter functions can return DecoderErrors which must be handled by callers.
2022-11-25LibVideo: Reorganize demuxer file hierarchy and rename Matroska filesZaggy1024
As new demuxers are added, this will get quite full of files, so it'll be good to have a separate folder for these. To avoid too many chained namespaces, the Containers subdirectory is not also a namespace, but the Matroska folder is for the sake of separating the multiple classes for parsed information entering the Video namespace.
2022-11-24Meta: Look for e2fsck path on build-image-qemu.shBaitinq
Now we attempt to look for the path of e2fsck before checking if the path can be found in any of the predefined routes. This fixes e2fsck not being found on some "special" distros like NixOS. Related #13754
2022-11-24headless-browser: Add a mode for being controlled by WebDriverTimothy Flynn
This adds command line flags for WebDriver to pass its IPC socket path (if running on Serenity) or its FD passing socket (if running elsewhere) for the headless-browser to connect to.
2022-11-23LibJS+LibWeb: Make Runtime/AbstractOperations.h not include AST.hAndreas Kling
This led to considerable fallout and many files had to be patched with now-missing include statements.
2022-11-23LibArchive: Simplify error handlingimplicitfield
2022-11-18Meta: Do not hard-code index types for UCD/CLDR/TZDB code generatorsTimothy Flynn
Hand-picking the smallest index type that fits a particular generated array started with commit 3ad159537e6e59760ed6b2ac2feba3fbcd8481af. This was to reduce the size of the generated library. Since then, the number of types using UniqueStorage has grown a ton, creating a long list of types for which index types are manually picked. When a new UCD/CLDR/TZDB is released, and the current index type no longer fits the generated data, we fail to generate. Tracking down which index caused the failure is a pretty annoying process. Instead, we can just use size_t while in the generators themselves, then automatically pick the size needed for the generated code.
2022-11-15Meta: Don't try to enable GDB support on WindowsGunnar Beutner
This probably didn't work before either but the option was silently ignored by GDB. Unfortunately 7.2.0-rc0 isn't so kind.
2022-11-13LibArchive: Make TarInputStream::advance report errorsimplicitfield
Fixes this bug that was reported by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52862
2022-11-11CI: Use gcc-12 in nightly Android host lagom build stageAndrew Kaster
2022-11-09Meta: Generate a helper constructor for single-value IPC responsesTimothy Flynn
When an IPC message returns a single value, we generate a class with a constructor that is something like: class MessageResponse { MessageResponse(SingleReturnType value) : m_value(move(value)) { } }; If that IPC message wants to return a value that SingleReturnType is constructible from, you have to wrap that return call with braces: return { value_that_could_construct_single_return_type }; That isn't really an issue except for when we want to mix TRY semantics with the return type. If SingleReturnType is constructible from an Error type (i.e. something similar to ErrorOr), the following doesn't work: TRY(fallible_function()); Because MessageResponse would not be constructible from Error. Instead, we must do some workaround with a custom TRY macro, as in 31bb792. This patch generates a constructor that makes TRY usable as-is without any custom macros. We perform a very similar trick in ThrowCompletionOr inside LibJS. This constructor will allow you to create MessageResponse from any type that SingleReturnType is constructible from.
2022-11-09Meta: Compile new WebContent IPC endpoints for WebDriver in LagomTimothy Flynn
2022-11-08Kernel: Split the Ext2FileSystem.{cpp,h} files into smaller componentsLiav A
2022-11-06Meta+LibUnicode: Avoid relocations for emoji dataGunnar Beutner
Previously each emoji had its own symbol in the library which was then referred to by another symbol. This caused thousands of avoidable data relocations at load time. This saves about 122kB RAM for each process which uses LibUnicode.
2022-11-06Meta+LibUnicode: Avoid relocations for static unicode dataGunnar Beutner
Previously the s_decomposition_mappings variable would refer to other data in s_decomposition_mappings_data. This would cause thousands of avoidable relocations at load time. This saves about 128kB RAM for each process which uses LibUnicode.
2022-11-04Meta: Make file-system resizing work on macOSGunnar Beutner
Previously we'd fail to execute the resize2fs tool which then results in us recreating the image from scratch: resizing disk image... Image resized. line 132: /usr/sbin/resize2fs: No such file or directory failed, not using existing image done
2022-11-04LibTimeZone: Update to TZDB version 2022fTimothy Flynn
https://mm.icann.org/pipermail/tz-announce/2022-October/000075.html
2022-11-03LibJS+LibUnicode: Add "microsecond" and "nanosecond" as sanctioned unitsTimothy Flynn
This is a normative change in the ECMA-402 spec. See: https://github.com/tc39/ecma402/commit/f627573
2022-11-03LibUnicode: Make the generated .h and .cpp paths for emoji data optionalTimothy Flynn
This is to allow people making emoji to run the generator to create the expected commit message format.
2022-11-02LibWeb: Support translate3dAliaksandr Kalenik
2022-11-02LibWeb: Use more verbose input in CSS transform function generatorAliaksandr Kalenik
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-11-01LibC: Properly implement stack protectorsTim Schumacher
The shared parts are now firmly compiled into LibC instead of being defined as a static library and then being copied over manually. The non-shared ("local") parts are kept as a static library that is linked into each binary on demand. This finally allows us to support linking with the -fstack-protector flag, which now replaces the `ssp` target being linked into each binary accidentally via CMake.
2022-11-01Everywhere: Explicitly link all binaries against the LibC targetTim Schumacher
Even though the toolchain implicitly links against -lc, it does not know where it should get LibC from except for the sysroot. In the case of Clang this causes it to pick up the LibC stub instead, which might be slightly outdated and feature missing symbols. This is currently not an issue that manifests because we pass through the dependency on LibC and other libraries by accident, which causes CMake to link against the LibC target (instead of just the library), and thus points the linker at the build output directory. Since we are looking to fix that in the upcoming commits, let's make sure that everything will still be able to find the proper LibC first.
2022-10-31CI: Ensure the manpage generation step shuts down the VM on failureTimothy Flynn
Currently, if the script fails, it simply runs "exit 1". This exits the script, but keeps the VM running, so CI hangs until it times out. Instead of exiting, write a failure status to an error log and shutdown. CI can then read that error log and fail the run if needed.
2022-10-31LibWeb: Handle currently ignored `WebIDL::ExceptionOr<T>`sLinus Groh
2022-10-31Lagom: Update GCC version check in CMakeLists.txtLinus Groh
This was forgotten in bc2ebcadc0eb695605051c9d362c3f5dc184c63c.
2022-10-31LibVideo: Add PlaybackManager to load and decode videosZaggy1024
This file will be the basis for abstracting away the out-of-thread or later out-of-process decoding from applications displaying videos. For now, the demuxer is hardcoded to be MatroskaParser, since that is all we support so far. The demuxer should later be selected based on the file header. The playback and decoding are currently all done on one thread using timers. The design of the code is such that adding threading should be trivial, at least based on an earlier version of the code. For now, though, it's better that this runs in one thread, as the multithreaded approach causes the Video Player to lock up permanently after a few frames are decoded.
2022-10-31LibVideo: Add VideoFrame class for decoded video framesZaggy1024
The class is virtual and has one subclass, SubsampledYUVFrame, which is used by the VP9 decoder to return a single frame. The output_to_bitmap(Bitmap&) function can be used to set pixels on an existing bitmap of the correct size to the RGB values that should be displayed. The to_bitmap() function will allocate a new bitmap and fill it using output_to_bitmap. This new class also implements bilinear scaling of the subsampled U and V planes so that subsampled videos' colors will appear smoother.
2022-10-30AK+Meta: Add WEB_FETCH_DEBUG macroLinus Groh
2022-10-27Meta: Convert build directory path to be completely absoluteJan200101
2022-10-27Meta: Replace Bash script for generating emoji.txt with C++ generatorTimothy Flynn
We currently have two build-time parsers for the UCD's emoji-test.txt file. To prepare for future changes, this removes the Bash parser and moves its functionality to the newer C++ parser.
2022-10-27Meta: Allow specifying additional dependencies with invoke_generatorTimothy Flynn
2022-10-26Meta: Disallow emoji images with invalid code points in their file nameTimothy Flynn
2022-10-25Everywhere: Require version >= 12 for GCC host compilerLinus Groh
So far we've gotten away with using GCC 11 for Lagom and to compile the toolchain, but via #15795 we discovered a compiler bug that has been fixed in the latest version but would error the build with CI's GCC 11. Time for an upgrade :^) We already use ubuntu-22.04 images in most places, so this is pretty straightforward. The only exception is Idan's self-hosted runner, which uses Ubuntu Focal. LibJS should build fine with GCC 11, still.
2022-10-25LibLocale+LibJS: Update to CLDR version 42.0.0Timothy Flynn
There were some notable changes to the CLDR JSON format and data in this release. The patterns for a date at a specific time, i.e. "{date} at {time}", now appear under the "atTime" attribute of the "dateTimeFormats" object. Locale specific changes that affected test-js: All locales: * In many patterns, the code points U+00A0 (NO-BREAK SPACE) and U+202F (NARROW NO-BREAK SPACE) are now used in place of an ASCII space. For example, before the "dayPeriod" fields AM and PM. * Separators such as U+2013 (EN DASH) are now surrounded by U+2009 (THIN SPACE) in place of an ASCII space character. Locale "en": * Narrow localizations of time formats are even more narrow. For example, the abbreviation "wk." for "week" is now just "wk". Locale "ar": * The code point U+060C (ARABIC COMMA) is now used in place of an ASCII comma. * The code point U+200F (RIGHT-TO-LEFT MARK) now appears at the beginning of many localizations. * When the "latn" numbering system is used for currency formatting, the currency symbol more consistently is placed at the end of the pattern. Locale "he": * The "many" plural rules category has been removed. Locales "zh" and "es-419": * Several display-name localizations were changed.
2022-10-24AK+Everywhere: Turn bool keep_empty to an enum in split* functionsdemostanis
2022-10-24Meta: Default to the SDL QEMU frontend on SerenityOSTim Schumacher
We don't yet have anything else than SDL, and certainly not GTK.
2022-10-24Meta: Also set CC/CXX when selecting the host toolchainTim Schumacher
This ensures that the toolchain building scripts will use the host toolchain that has been found manually, and that they won't fall back to `cc` (which in the worst case may not even be installed).
2022-10-24Lagom: Link the system's LibSystem on SerenityOSTim Schumacher
2022-10-22Meta: Detect Homebrew clang-formatDaniel Bertalan
Homebrew does not add upstream LLVM's install location to $PATH so as not to conflict with XCode tools, so we need to run `brew --prefix llvm` to figure out its install path.
2022-10-20LibWeb: Remove dbgln FIXME spam from BindingsGeneratorLinus Groh
2022-10-20LibWeb: Revert support for DOM::Document in XHR::send()Kenneth Myhra
This is a manual revert of commit: 7831e62 Let's revert this until we got nested union support in our IDL generator/parser.
2022-10-20LibWeb: Teach IDL generator to go from WindowProxy to EventTargetAndreas Kling
This case requires some special handling, since there's no direct C++ inheritance relationship between HTML::WindowProxy and DOM::EventTarget.
2022-10-20LibWeb: Prevent GC from running during intrinsics allocationAndreas Kling
Due to the way we lazily construct prototypes and constructors for web platform interfaces, it's possible for nested GC allocation to occur while GC objects have been allocated but not fully constructed. If the garbage collector ends up running in this state, it may attempt to call JS::Cell::visit_edges() on an object whose vtable pointer hasn't been set up yet. This patch works around the issue by deferring GC while intrinsics are being brought up. Furthermore, we also create a dummy global object for the internal realm, and populate it with intrinsics. This works around the same issue happening when allocating something (like the default UA stylesheets) in the internal realm. These solutions are pretty hacky and sad, so I've left FIXMEs about finding a nicer way.
2022-10-18LibTimeZone+LibJS: Update to TZDB version 2022eTimothy Flynn
https://mm.icann.org/pipermail/tz-announce/2022-October/000074.html This version changes America/Chicago's transtion from LMT to CST from 1883 Nov 18 12:09:24 to 1883 Nov 18 18:00.
2022-10-17Lagom: Enable compile_commands.json for the lagom build directoryAndrew Kaster
This allows a developer who only wants to look at Lagom to have their IDE find source files and headers properly.
2022-10-17Lagom+CMake: Propagate dependencies for generated custom targetsAndrew Kaster
We have logic for serenity_generated_sources which works well for source files that are specified in GENERATED_SOURCES prior to calling serenity_lib or serenity_bin. However, code generated with invoke_generator, and the LibWeb generators do not always follow the pattern of the IDL and GML files. For the LibWeb generators, we can just add_dependencies to LibWeb at the time we declare the generate_Foo custom target. However for LibLocale, LibTimeZone, and LibUnicode, we don't have the name of the target available, so export the name in a variable to set into GENERATED_SOURCES. To make this work for Lagom, we need to make sure that lagom_lib and serenity_bin in Lagom/CMakeLists.txt call serenity_generated_sources on the target. This enables the Xcode generator on macOS hosts, at least for Lagom.
2022-10-17Lagom: Make lagom_lib take names prefixed with LibAndrew Kaster
This matches serenity_lib, and consolidates the logic to strip Lib from the front of the library name for the Lagom export name into one place at the top of lagom_lib.
2022-10-16Meta: Start moving common shell definitions into a common fileTim Schumacher