summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-21Kernel+LibC: Move name length constants to Kernel/API from limits.hAndrew Kaster
Reduce inclusion of limits.h as much as possible at the same time. This does mean that kmalloc.h is now including Kernel/API/POSIX/limits.h instead of LibC/limits.h, but the scope could be limited a lot more. Basically every file in the kernel includes kmalloc.h, and needs the limits.h include for PAGE_SIZE.
2023-01-21Kernel+LibC: Move LibC/signal_numbers.h to Kernel/API/POSIXAndrew Kaster
Make Userland and Tests users just include signal.h, and move Kernel users to the new API file.
2023-01-21LibGUI: Mimic a user click when calling `Button::click()`Lucas CHOLLET
The `mimic_pressed` function was primarily used in one place, the Calculator. This patch removes quite a lot of logic duplication there. It is also profitable to a lot of other places where `click()` was called without mimicking a click.
2023-01-21LibGUI: Rename `Button` method `set_mimic_pressed` => `mimic_pressed`Lucas CHOLLET
This function does more things than a simple getter, so it's probably better to not use this notation. I also drop the parameter as it was always used with the same value.
2023-01-21LibGUI: Remove public getter `Button::is_mimic_pressed()`Lucas CHOLLET
This method shouldn't be used outside the class and having a getter for a bool seems a bit overkill.
2023-01-21LibWeb: Fix floats y offset calculationAliaksandr Kalenik
There is a difference in y offset position calculation for floats when LineBuilder provides final y position while for blocks it needs to be adjusted by `y_offset`. This difference already accounted in floating box position calculation and this patch also makes it accounted in check whether a floating boxes on the same line intersect between each other.
2023-01-21AK: Remove `FileStream`Tim Schumacher
2023-01-21UserspaceEmulator: Use `Core::Stream` for writing profiling dataTim Schumacher
This looks like it should compile, but UserspaceEmulator is currently broken on any non-i686 platform anyways, so I can't test that.
2023-01-21Base: Add tests for grid-template-areas and min/max-contentmartinfalisse
2023-01-21LibWeb: Place grid items in grid-areas if applicablemartinfalisse
If valid grid-template-areas were given, then place grid items within these areas. Grid-template-areas take precedence over named line tracks, meaning if there are grid-areas as well as named tracks, should use the grid-areas.
2023-01-21LibWeb: Calculate valid grid areasmartinfalisse
When starting the GridFormattingContext, calculate the valid grid areas as declared in the `grid-template-areas` property. Since this doesn't change, are able to do this once and store the results.
2023-01-21LibWeb: Implement min/max-contentmartinfalisse
Use the min/max-content properties when given as a size for a grid-column or grid-row.
2023-01-21LibWeb: Refactor grid item positioning to use zero-indexmartinfalisse
In some sections of the code, previously would use the values passed to `grid-column-start`, `grid-row-end`, etc. literally. Since these values start at grid-column 1 instead of 0 (as represented in most areas in the code), this made the code unnecessarily complicated. Now the values are zero-indexed from the getgo.
2023-01-21LibWeb: Parse `grid-area` CSS propertymartinfalisse
2023-01-21LibWeb: Parse `grid-template-areas` CSS propertymartinfalisse
2023-01-21LibWeb: Parse min and max-contentmartinfalisse
Parse min and max-content as well as use its values in the GridTrackSize class.
2023-01-21LibWeb: Use String class in certain CSS Grid classesmartinfalisse
Converts the remaining instances of DeprecatedString to String in the CSS Grid classes.
2023-01-21AK: Add `split()` for `String`martinfalisse
2023-01-21AK: Rename double_hash to rehash_for_collisionTimothy Flynn
The name is currently quite confusing as it indicates it hashes doubles.
2023-01-21LibWeb: Use type-correct hashing and formatting functions for pixelsTimothy Flynn
1. Don't use double_hash. This is not for doubles, as its name implies. 2. Specialize traits and formatters using the underlying DistinctNumeric type of Web::DevicePixels and Web::CSSPixels.
2023-01-21AK: Add a type alias for DistinctNumeric's underlying typeTimothy Flynn
2023-01-21icc: Remove needless use of DateTime::to_deprecated_string()Nico Weber
Turns out DateTime has a Formatter that prints the same thing that to_deprecated_string() returns. No behavior change.
2023-01-21icc: Tweak output to look nicerNico Weber
Align header on the `:`, and make bitmask output more structured.
2023-01-21AK: Remove `InputBitStream` and `OutputBitStream`Tim Schumacher
2023-01-21LibPDF: Use `Core::Stream` to parse the page offset hint tableTim Schumacher
2023-01-20LibGfx: Add scaffolding for reading ICC tag tableNico Weber
The idea is that we'll have one type for each tag type. For now, this treats all tag types as unknown, but it puts most of the infrastructure for reading tags in place.
2023-01-20LibGfx: Extract Profile::read_header() functionNico Weber
2023-01-20LibGfx: Make ICCHeader use FourCC types for fourcc fieldsNico Weber
No behavior change. Arguably more expressive.
2023-01-20LibGfx: Make DistinctFourCC compatible with BigEndianNico Weber
2023-01-20LibCore: Remove `FileStream`Tim Schumacher
2023-01-20wasm: Interface with the standard output via `Core::Stream`Tim Schumacher
2023-01-20gunzip: Use `Core::Stream` to write the decompression outputTim Schumacher
2023-01-20WebServer: Use `Core::Stream` to read served filesTim Schumacher
2023-01-20LibGfx: Use `Core::Stream` to write bitmap fontsTim Schumacher
2023-01-20Tests: Use `Core::Stream` to write output files in LibGL testsTim Schumacher
2023-01-20AK: Remove `DuplexMemoryStream`Tim Schumacher
2023-01-20LibAudio: Use `AllocatingMemoryStream` as the MP3 loader bit reservoirTim Schumacher
2023-01-20LibWasm: Use `AllocatingMemoryStream` around `Wasm::Printer`Tim Schumacher
2023-01-20LibCore: Avoid logical OOB read in AllocatingMemoryStream::offset_of()Ali Mohammad Pur
The previous impl was trimming the last chunk to the free space instead of the used space, which yielded an OOB read if the needle wasn't found.
2023-01-20AK: Disable use of consteval in String::from_utf8_short_string for AppleTimothy Flynn
This causes an ICE on older versions of clang, and Apple's clang is currently based on such a version.
2023-01-20LibJS: Mark infallible operations that may throw only due to OOMTimothy Flynn
2023-01-20LibJS: Add a macro for infallible operations that may throw OOMTimothy Flynn
If a spec step hasn't been marked as fallible, but might throw due to OOM, this is to make it clear that OOM is the only thing that may cause a failure.
2023-01-20Everywhere: Convert known short-strings to the infallible String factoryTimothy Flynn
For now, this is limited to strings that are 3 bytes or less. We can use 7 bytes on 64-bit platforms, but we do not yet assume 64-bit for Lagom hosts (e.g. wasm).
2023-01-20AK: Support creating known short string literals at compile timeTimothy Flynn
In cases where we know a string literal will fit in the short string storage, we can do so at compile time without needing to handle error propagation. If the provided string literal is too long, a compilation error will be emitted due to the failed VERIFY statement being a non- constant expression.
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.