summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-20CI: Install a more up-to-date version of emscriptenTimothy Flynn
This is to allow using more recent C++20 features in upcoming commits. Version 3.1.6 is what is installed on Ubuntu 22.10 and works with the C++20 features we want.
2023-01-20Tests: Use AK::shuffle() for shufflingSam Atkins
2023-01-20ColorLines: Use AK::shuffle() for shufflingSam Atkins
2023-01-20LibGfx: Fix TGA decoder being out of boundary after calling frame methodLiav A
This happened because the reader was incrementing the byte index of it after each read of a byte from the Span, so by the end of the frame method, we could be at the end of the mapped file, so the next call on the same decoder will just resume from that point and will be quickly out of boundary. To ensure this doesn't happen we only set the bitmap to m_context member at the end of the method, and call to that method again will just give the already-generated bitmap. In case of setting the bitmap as volatile, we test for that case and re-generate a reader to read the frame again correctly.
2023-01-20Tests/LibGfx: Fix test_gif test caseLiav A
We should expect the GIF image to be animated, therefore fix that condition.
2023-01-20Tests/LibGfx: Fix test_not_ico test caseLiav A
We should expect the sniffing method and the initialize method to fail because this test case is testing that the ICO image decoder should not decode random data within it.
2023-01-20LibWeb: Improve auto height calculation for tablesAliaksandr Kalenik
Change `compute_auto_height_for_block_level_element` to use max height (`m_automatic_content_height` produced from TFC) for tables with auto height which is more correct behaviour than treating them like block containers.
2023-01-20LibWeb: Include table intrinsic offsets in child boxes positionAliaksandr Kalenik
Table's border and padding should be taken in account while calculating child boxes x and y offsets.
2023-01-20LibGfx: Re-structure the whole initialization pattern for image decodersLiav A
When trying to figure out the correct implementation, we now have a very strong distinction on plugins that are well suited for sniffing, and plugins that need a MIME type to be chosen. Instead of having multiple calls to non-static virtual sniff methods for each Image decoding plugin, we have 2 static methods for each implementation: 1. The sniff method, which in contrast to the old method, gets a ReadonlyBytes parameter and ensures we can figure out the result with zero heap allocations for most implementations. 2. The create method, which just creates a new instance so we don't expose the constructor to everyone anymore. In addition to that, we have a new virtual method called initialize, which has a per-implementation initialization pattern to actually ensure each implementation can construct a decoder object, and then have a correct context being applied to it for the actual decoding.
2023-01-20LibGfx: Re-work the abstractions of sending image for decoding over IPCLiav A
Originally I simply thought that passing file paths is quite OK, but as Linus pointed to, it turned out that passing file paths to ensure some files are able to be decoded is awkward because it does not work with images being served over HTTP. Therefore, ideally we should just use the MIME type as an optional argument to ensure that we can always fallback to use that in case sniffing for the correct image type has failed so we can still detect files like with the TGA format, which has no magic bytes.
2023-01-20LibCore: Add MIME type string for TGA filesLiav A
2023-01-20LibCore: Return StringView from guess_mime_type_based_on_filename methodLiav A
2023-01-20Kernel: Remove `dbgln` when unregistering an unhandled x86_64 interruptJelle Raaijmakers
A lot of interrupt numbers are initialized with the unhandled interrupt handler. Whenever a new handler is registered on one of these interrupts, the old handler is unregistered first. Let's not be verbose about this since it is perfectly normal.
2023-01-20Kernel: Simplify (un)registering interrupt logicJelle Raaijmakers
Lose a level of indentation and remove a superfluous `handler_slot` check.
2023-01-19CI: Add GitHub author presence check in commit linterJelle Raaijmakers
If GitHub is unable to match a commit's author to a GitHub user, the `.author` object is set to `null` in the API's response.
2023-01-19LibJS: Return OptionalNone in fallible functions in the Intl namespaceTimothy Flynn
2023-01-19LibJS: Add a special ThrowCompletionOr constructor for OptionalNoneTimothy Flynn
Currently, if you have a fallible function with an Optional return type and try to return OptionalNone like this: ThrowCompletionOr<Optional<SomeType>> { return OptionalNone {}; } Then ThrowCompletionOr's m_value (whose type is an Optional<ValueType>) will be set to empty, rather than containing an empty Optional. This is due to the ThrowCompletionOr's WrappedValueType constructor. This patch adds a constructor specifically for OptionalNone. If someone attempts to construct a ThrowCompletionOr with OptionalNone, but the ValueType is not an Optional, a compile error like the following will occur: ThrowCompletionOr<String> foo() { return OptionalNone {}; } error: no matching constructor for initialization of 'AK::String' Otherwise, it will fill ThrowCompletionOr's m_value with an empty Optional.
2023-01-19LibLocale: Remove now-unused [LanguageID,LocaleID]::to_deprecated_stringTimothy Flynn
2023-01-19LibJS: Port Intl locale resolution to StringTimothy Flynn
2023-01-19LibJS: Do not fully qualify references to CanonicalizeUnicodeLocaleIdTimothy Flynn
This might've been needed at some point to disambiguate between another function of the same name that is in LibLocale. But now that it takes a VM parameter, it is for sure clear to the compiler what is being called.
2023-01-19LibJS: Propagate OOM errors from the PartitionPattern Abstract OperationTimothy Flynn
2023-01-19LibJS: Propagate OOM errors from Intl Abstract OperationsTimothy Flynn
This excludes the PartitionPattern AO as that has a much larger foot- print and will be handled separately.
2023-01-19LibLocale+LibJS: Port locale parsing and processing to StringTimothy Flynn
In order to prevent this commit from having to refactor almost all of Intl, the goal here is to update the internal parsing/canonicalization of locales within LibLocale only. Call sites which are already equiped to handle String and OOM errors do so, however.
2023-01-19LibLocale: Add a method to convert LocaleID to a StringTimothy Flynn
2023-01-19Ladybird: Accept file dropsKarol Kosek
2023-01-19Ladybird: Add URL and 'open in background' parameters to new_tab()Karol Kosek
This will avoid loading starting about:blank page in places when we know exactly what we want to load. The opening in background part might be useful for future things like file drops and right-click open in new tab.
2023-01-19Ladybird: Move the initial blank page load to BrowserWindowKarol Kosek
Takes care of a FIXME :^)
2023-01-19Ladybird: Don't prepend 'about:' urls with an http:// schemeKarol Kosek
2023-01-19Ladybird: Set initial page when NOT connected to WebDriverKarol Kosek
This flips an if check condition, making the JS console work in new tabs again.
2023-01-19Meta: Use existing test-sources lists for Lagom instead of globbingSam Atkins
...mostly. This creates and uses an override for the `serenity_test()` function, so that Lagom can make use of the existing `Tests/LibFoo/CMakeLists.txt` files instead of having to GLOB for test source files and manually copy any data files. Some GLOBs remain but this is most of them. Co-authored-by: Andrew Kaster <akaster@serenityos.org>
2023-01-19Tests: Mark TestCommonmark as DISABLEDSam Atkins
This has no effect right now, but will allow us to use this same cmake file from Lagom.
2023-01-19Tests: Add missing library dependency for LibTimeZone testsSam Atkins
2023-01-19Tests: Add missing library dependencies for LibGL testsSam Atkins
These are required for running on Lagom.
2023-01-19Tests: Move test PDF files into Tests/LibPDFSam Atkins
Let's put test files with the tests themselves, instead of a random user directory. (But still copy them so they appear in the user directory for convenience.)
2023-01-19Meta/Lagom: Make sure that libraries are always linked as PRIVATESam Atkins
2023-01-19Tests: Correct `serenity_test()` invocation for LibTTFSam Atkins
Putting the LibTTF tests into the LibGfx directory worked fine before, but causes issues if we try and call this from Lagom. Also, it's tidier to put LibTTF tests in a LibTTF directory. :^)
2023-01-19LibCore: Implement FileWatcher for macOSTimothy Flynn
The macOS FileWatcher depends on macOS dispatch queues, which run on a different thread than the Core::EventLoop. This implementation handles filesystem events on its dispatch queue, then forwards the event back to the main Core::EventLoop for notifying the FileWatcher owner.
2023-01-19LibCore: Make the FileWatcher test resilient against outside eventsTimothy Flynn
The test currently watches /tmp, which the OS can create/modify files under at any time outside of our control. So just ignore events that we aren't interested in. Also test removing an item from the FileWatcher.
2023-01-19LibCore: Allow subclassing FileWatcherTimothy Flynn
This will be handy for platforms which need to be able to store extra OS-specific members. For example, macOS needs to store a dispatch queue, and event stream, etc.
2023-01-19AK: Move the AK::FixedPoint formatter to FixedPoint.hTimothy Flynn
This does not need to be defined in Format.h. This causes FixedPoint.h to be included everywhere. This is particularly going to be an issue when trying to include <CoreServices/CoreServices.h> on macOS. The macOS SDK defines its own FixedPoint structure which will conflict with ours.
2023-01-19Userland: Add missing Math.h and IntegralMath.h header includesTimothy Flynn
These are currently being implicitly including by FixedPoint.h by way of Format.h. The former will soon be removed from the latter, which would otherwise cause a compile error in these files.
2023-01-19AK: Don't write trailing zeros with %gPeter Elliott
2023-01-19Utilities: Rewrite sort(1) to be more posixyPeter Elliott
2023-01-19Utilities: Replace fgrep with grep --fixed-stringsPeter Elliott
2023-01-19Ports: Fix compatiblity issues with running package.sh on SerenityPeter Elliott
2023-01-19Presenter: Disable actions when there is no loaded presentationJoao Luz
2023-01-19LibC: Remove the stub iconv headerTim Schumacher
This was added in 2019 to trick GCC into accepting a newlib build, but now this no longer seems to be required to build the toolchain.
2023-01-19LibAudio: Skip MP3 frames if not enough historic data is availableTim Schumacher
2023-01-19LibAudio: Clear the MP3 bit stream when seekingTim Schumacher
2023-01-19SoundPlayer: Translate device samples to source samples before seekingTim Schumacher