summaryrefslogtreecommitdiff
path: root/Meta
AgeCommit message (Collapse)Author
2023-03-14LibWeb: Support variadic "any..." parameters in IDLTimothy Flynn
For example, this is used by setTimeout/setInterval.
2023-03-13file: Read more metadata from audio fileskleines Filmröllchen
We can always read the basic format information (sample rate, bit depth, etc.), but we will also print artist, album, and title if available in the metadata.
2023-03-13Meta+Documentation: Allow cross-debugging x86_64 Serenity on M1 MacsDaniel Bertalan
While there is no native GDB on Apple Silicon, a cross-debugger that supports x86-64 does exist.
2023-03-13CodeGenerators: Ensure that we always print the entire generated outputTim Schumacher
2023-03-13AK: Rename Stream::read_entire_buffer to Stream::read_until_filledTim Schumacher
No functional changes.
2023-03-13AK: Rename Stream::{read,write} to Stream::{read_some,write_some}Tim Schumacher
Similar to POSIX read, the basic read and write functions of AK::Stream do not have a lower limit of how much data they read or write (apart from "none at all"). Rename the functions to "read some [data]" and "write some [data]" (with "data" being omitted, since everything here is reading and writing data) to make them sufficiently distinct from the functions that ensure to use the entire buffer (which should be the go-to function for most usages). No functional changes, just a lot of new FIXMEs.
2023-03-13LibAudio: Move audio stream buffering into the loaderkleines Filmröllchen
Before, some loader plugins implemented their own buffering (FLAC&MP3), some didn't require any (WAV), and some didn't buffer at all (QOA). This meant that in practice, while you could load arbitrary amounts of samples from some loader plugins, you couldn't do that with some others. Also, it was ill-defined how many samples you would actually get back from a get_more_samples call. This commit fixes that by introducing a layer of abstraction between the loader and its plugins (because that's the whole point of having the extra class!). The plugins now only implement a load_chunks() function, which is much simpler to implement and allows plugins to play fast and loose with what they actually return. Basically, they can return many chunks of samples, where one chunk is simply a convenient block of samples to load. In fact, some loaders such as FLAC and QOA have separate internal functions for loading exactly one chunk. The loaders *should* load as many chunks as necessary for the sample count to be reached or surpassed (the latter simplifies loading loops in the implementations, since you don't need to know how large your next chunk is going to be; a problem for e.g. FLAC). If a plugin has no problems returning data of arbitrary size (currently WAV), it can return a single chunk that exactly (or roughly) matches the requested sample count. If a plugin is at the stream end, it can also return less samples than was requested! The loader can handle all of these cases and may call into load_chunk multiple times. If the plugin returns an empty chunk list (or only empty chunks; again, they can play fast and loose), the loader takes that as a stream end signal. Otherwise, the loader will always return exactly as many samples as the user requested. Buffering is handled by the loader, allowing any underlying plugin to deal with any weird sample count requirement the user throws at it (looking at you, SoundPlayer!). This (not accidentally!) makes QOA work in SoundPlayer.
2023-03-13headless-browser: Re-implement headless-browser using an OOPWVTimothy Flynn
headless-browser currently uses its own PageClient to load web pages in-process. Due to this, it also needs to set up a whole bunch of other objects needed to run LibWeb, e.g. image decoders, request servers, etc. This changes headless-browser to instead implement a WebView to launch WebContent out-of-process. This implementation is almost entirely empty, but can be filled in as-needed. For example, we may want to print JavaScript console messages.
2023-03-12Userland: Add an `image` utilityNico Weber
At the moment, all it can do is read all image formats that LibGfx can read and save to any image format that LibGfx can write (currently bmp, png, qoi). Currently, it drops all image metadata (including color profiles). Over time, this could learn tricks like keeping color profiles, converting an image to a different color profile, cropping out a part of an image, and so on.
2023-03-12Meta+CMake: Remove "image" ninja target in favor of "qemu-image"Nico Weber
"image" was an alias for "qemu-image". I want to add an `image` userland utility, which clashes with that shortname. So remove the existing "image" target. It was just an alias for "qemu-image". If you use serenity.sh to build, nothing changes. This only affects you if you run ninja manually -- you now have to say `ninja qemu-image` to build the disk image.
2023-03-11Meta: Use the correct boot device addressing mode for NVMe devicesPankaj Raghav
Commit: 2c84466ad8 ("Kernel/Storage: Introduce new boot device addressing modes") changed the way we pass the boot device parameter. That commit missed updating boot parameter in the run.sh script for NVMe boot devices.
2023-03-11CI: Remove stale dependence on Toolchain.yml from nightly jobAndrew Kaster
We removed this file in 0a7d0362eaf08cec03e648c08d4d5fca84668ae5 but forgot to update the nightly job.
2023-03-11Meta: Don't check for newlines at EOF in Tests/LibWeb/Layout/Andreas Kling
2023-03-10Ladybird+CI: Move layout_test.sh test runner from CI yml into CMakeAndrew Kaster
We should be able to run this locally, as long as ENABLE_LAGOM_LADYBIRD is true, or if building ladybird from the ladybird source directory. This removes a special case from the Lagom CI yml file.
2023-03-10Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_caseAndreas Kling
Let's make it clear that these functions deal with ASCII case only.
2023-03-10Meta/Lagom: Add a fuzzer for QOAkleines Filmröllchen
2023-03-10Documentation: Reorganize Lagom README and update fuzzer documentationAndrew Kaster
Add some prose to the introduction of Lagom about how we use it. Also, move the section on including Lagom in other projects above the fuzzer documentation. Remove the explicit cmake commands from the Fuzzer documentation, as the script should be the source of truth.
2023-03-09LibIMAP: Propagate OOM errors from decode_quoted_printable()Linus Groh
2023-03-08LibWeb: Move generated #include statement for iterators out of loopKenneth Myhra
When an IDL file has #imports and the IDL interface exposes an iterator, the bindings generator would generate #include statements missing the class name of the iterator in the form 'LibWeb/{namespace}/Iterator'. This change only generates the iterator #include statement for the top interface that is the iterator.
2023-03-07LibWeb/HTML: Port Window.structuredClone() to IDLLinus Groh
2023-03-07LibWeb/HTML: Port Window.performance to IDLLinus Groh
2023-03-07LibWeb/HTML: Port Window.event to IDLLinus Groh
2023-03-07LibWeb: Generate setter for [Replaceable] IDL attributesLinus Groh
The code is directly stolen from the REPLACEABLE_PROPERTY_SETTER() macro which will hopefully be removed soon.
2023-03-07LibWeb: Support interfaces with the [Global] extended attributeLinus Groh
These are treated differently as the interface members are placed on the object itself, not its prototype. As the object itself still needs to be hand-written code, and we can no longer fully hide the gnarly generated code in the prototype object, these now generate a 'mixin' class that is added to the actual object through inheritance. https://webidl.spec.whatwg.org/#Global
2023-03-07LibWeb: Generate Window{Constructor,Prototype} from IDLLinus Groh
The Window object is massive, so let's do the conversion to IDL step by step. First up: getting rid of the manual constructor and prototype definitions, which can be generated from an empty `interface Window`.
2023-03-07LibWeb: Remove CSS::Parser::ParsingContext's default constructorLuke Wilde
This relied on pulling the current realm from the main thread VM, which requires an execution context to be on the VM's stack. This heavily relied on the dummy execution context that is always on the stack, for example, when parsing the UA style sheets where no JavaScript is running.
2023-03-06Everywhere: Stop using NonnullRefPtrVectorAndreas Kling
This class had slightly confusing semantics and the added weirdness doesn't seem worth it just so we can say "." instead of "->" when iterating over a vector of NNRPs. This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
2023-03-06Lagom: Add a tool to verify correctness of the LibJS GCMatthew Olsson
This is implemented as a Clang frontend tool, and currently does two things: - Ensure for all fields wrapped in {Nonnull,}GCPtr<T>, T inherits from JS::Cell - Ensure for all fields not wrapped in {Nonnull,}GCPtr, that the type does not inherit from JS::Cell (otherwise it should be wrapped in a Ptr class). In the future, this tool could be extended further. For example, we may consider validating all implementations of Cell::visit_impl.
2023-03-05LibCore+Everywhere: Return an Error from DirIterator::error()Sam Atkins
This also removes DirIterator::error_string(), since the same strerror() string will be included when you print the Error itself. Except in `ls` which is still using fprintf() for now.
2023-03-05LibUnicode: Use binary search for lookups into the generated emoji dataTimothy Flynn
This sorts the array of generated emoji data by code point (first by code point length, then by code point value). This lets us use a binary search to find emoji data, rather than the current linear search. In a profile of scrolling around /home/anon/Documents/emoji.txt, this reduces the runtime of Gfx::Emoji::emoji_for_code_points from 69.03% to 28.42%. Within that, Unicode::find_emoji_for_code_points reduces from 28.42% to just 1.95%.
2023-03-05LibWeb: Remove unused SourceGenerator mappingsLinus Groh
2023-03-05LibWeb: Don't use C++ name for error messages in generated bindingsLinus Groh
2023-03-05LibWeb: Use 'Base::initialize()' in generated bindingsLinus Groh
2023-03-04Meta: Link to libnsl and libsocket on Solaris in Lagom CMakeListsnipos
2023-03-04Base+Meta: Remove invalid symlinks from Base for more and envAndrew Kaster
These symlinks' only purpose was to be copied into the rootfs along with the rest of Base. Instead of storing symlinks to files that either don't exist in the Base directory, or point to an absolute path outside of the serenity folder, move these symlinks into the build-root-filesystem.sh script.
2023-03-04LibCMake: Introduce a CMake lexerSam Atkins
2023-03-03LibUnicode: Validate that all emoji images in /res/emoji actually existTimothy Flynn
This will raise a compile error if an emoji image was neglected to be added to e.g. emoji-serenity.txt, or if the code points are not correct.
2023-03-03LibWeb: Fix duplicate enum-to-string conversion in generated codeLinus Groh
This regressed in e3a9ed0.
2023-03-01LibWeb: Handle optional return values for getters returning new StringKenneth Myhra
2023-03-01LibWeb: Add new String support for parameters with empty string defaultsKenneth Myhra
This adds new string support for parameters with an optional default value of empty string ("").
2023-03-01LibGfx+LibUnicode: Support specifying the path to search for emojiTimothy Flynn
Similar to the FontDatabase, this will be needed for Ladybird to find emoji images. We now generate just the file name of emoji image in LibUnicode, and look for that file in the specified path (defaulting to /res/emoji) at runtime.
2023-02-28Everywhere: Use '_{short_,}string' literals moreLinus Groh
This mostly updates code what was written before but merged after these were added.
2023-02-28AK+Everywhere: Make GenericLexer::ignore_until() stop before the valueSam Atkins
`consume_until(foo)` stops before foo, and so does `ignore_until(Predicate)`, so let's make the other `ignore_until()` overloads consistent with that so they're less confusing.
2023-02-28Userland+AK: Stop using getopt() for ArgsParserAli Mohammad Pur
This commit moves the implementation of getopt into AK, and converts its API to understand and use StringView instead of char*. Everything else is caught in the crossfire of making Option::accept_value() take a StringView instead of a char const*. With this, we must now pass a Span<StringView> to ArgsParser::parse(), applications using LibMain are unaffected, but anything not using that or taking its own argc/argv has to construct a Vector<StringView> for this method.
2023-02-27LibWeb: Make [UseNewAKString] work for enums and stringifiersLuke Wilde
2023-02-26Meta: Lower QEMU DirectSound driver timer period to 2mskleines Filmröllchen
10ms (the default) is ridiculous and causes all kinds of glitches if we actually want to have a low-latency queue. <https://gitlab.com/qemu-project/qemu/-/issues/1076#note_996636777> suggests 2ms (and no lower than 1ms). This improves audio glitch resistance at our current 512 sample buffer size, but going lower is still not possible.
2023-02-26Lagom: Look for clang the same way serenity.sh does in BuildFuzzers.shAndrew Kaster
Also note that Xcode does not ship libfuzzer and is not usable for a fuzzer build.
2023-02-26LibWasm+LibWeb: Sneak a JS::Completion into Wasm::ResultAli Mohammad Pur
Imported functions in Wasm may throw JS exceptions, and we need to preserve these exceptions so we can pass them to the calling JS code. This also adds a `assert_wasm_result()` API to Result for cases where only Wasm traps or values are expected (e.g. internal uses) to avoid making LibWasm (pointlessly) handle JS exceptions that will never show up in reality.
2023-02-26BindingsGenerator: Use JS::Value::to_string() when new StringKenneth Myhra
Make sure to use JS::Value::to_string() when the IDL interface is marked with the extended attribute UseNewAKString.
2023-02-26BindingsGenerator: Conditionally check dictionary member is stringKenneth Myhra
This adds the condition member.type->is_string() to the if statement, so that we now conditionally check the dictionary member is a new string and associated with an optional constructor parameter.