summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2023-04-04Kernel+Userland: Make some of the POSIX types largerAndreas Kling
Expand the following types from 32-bit to 64-bit: - blkcnt_t - blksize_t - dev_t - nlink_t - suseconds_t - clock_t This matches their size on other 64-bit systems.
2023-04-03LibGUI+CertificateSettings: Use custom SortingProxyFabian Dellwing
The default SortingProxyModel does not allow to react to reodering. As we would like to keep the column width on sorting, we create a subclass and inject our code into the sorting method.
2023-04-03CertificateSettings: Add export functionalityFabian Dellwing
2023-04-03LibCrypto: Add PEM encoderFabian Dellwing
This commit adds a new method to create a PEM encoded ASN1 from its DER variant.
2023-04-03CertificateSettings: Add import functionalityFabian Dellwing
2023-04-03CertificateSettings: Create basic Cert Store applicationFabian Dellwing
This commit adds a new application named CertificateSettings that houses our Cert Store. It should be expanded in the future.
2023-04-03LibTLS: Refactor CA loading into central functionFabian Dellwing
2023-04-03LibTest: Don't output information on tests if none existLucas CHOLLET
2023-04-03Spreadsheet: Propagate errors from SpreadsheetWidget::initialize_menubarSam Atkins
2023-04-03Spreadsheet: Add list of recently-opened filesSam Atkins
2023-04-03LibWeb: Expand background-position layers into x/y position listsMacDue
This fixes multi-layer backgrounds with background positions. This is a little awkard, so maybe it would be better to refactor the parsing code to make these lists directly, but right now this is the simplest fix.
2023-04-03LibWeb: Add getter for separator to StyleValueListMacDue
2023-04-03LibGfx/JPEG: Add YCCK and CMYK to RGB color transformationsLucas CHOLLET
It means that we now fully support JPEGs with four components :^).
2023-04-03LibGfx/JPEG: Support for images with four componentsLucas CHOLLET
This patch adds support for properly read images with four components, basically CMYK or YCCK. However, we still lack color spaces transformations for this type of image. So, it just postpones failure.
2023-04-03LibGfx/JPEG: Replace C-style array by `Array`Lucas CHOLLET
2023-04-03LibGfx/JPEG: Bring IDCT and YCbCr conversion closer to specificationLucas CHOLLET
As mentioned in F.2.1.5 - Inverse DCT (IDCT), the decoder needs to perform a level shift by adding 128. This used to be done in `ycbcr_to_rgb` after the conversion. Now, we do it in `inverse_dct` in order to ensure that the task is done unconditionally. Consequences of this are that we are no longer required to explicitly do it for RGB images and also, the `ycbcr_to_rgb` function is exactly like the specification.
2023-04-03LibGfx/JPEG: Don't reject SOF2 image with successive approximationsLucas CHOLLET
It means full SOF2 JPEG support, yay!
2023-04-03LibGfx/JPEG: Support refinement scansLucas CHOLLET
These scans are only present in progressive JPEGs and contains bits to increase the precision of values acquired in previous scans.
2023-04-03LibGfx/JPEG: Handle ZRL as a special caseLucas CHOLLET
When reading the stream, interpreted as a normal value 0xF0 means skip 15 values and assign the 16th to 0. On the other hand, the marker ZRL - which has the value 0xF0, means skip 16 values. For baseline JPEGs, ZRL doesn't need to be interpreted differently as writing the 16th value has no consequence. This is no longer the case with refining scans. That's why this patch implement correctly ZRL.
2023-04-03LibGfx/JPEG: Change the loop over AC coefficientsLucas CHOLLET
We used to skip over zero coefficient by modifying the loop counter. It is unfortunately impossible to perform this with SOF2 images as only coefficients with a zero-history should be skipped. This induces no behavior change for the user of the function.
2023-04-03LibGfx/JPEG: Still iterate over AC coefficients of a EOB targeted blockLucas CHOLLET
This commit is nonsense for anything else than SOF2 images with spectral approximation. For this particular case, skips like EOB or ZRL only apply to coefficients with a zero-history. This commit prepares the code to handle this behavior.
2023-04-03LibGfx/JPEG: Split `spectral_approximation`Lucas CHOLLET
This `u8` is actually two values of 4 bits. Let's store them separately to avoid confusion.
2023-04-03PDFViewer: Add list of recently-opened filesSam Atkins
2023-04-03AK+Everywhere: Change AK::fill_with_random to accept a Bytes objectTimothy Flynn
Rather than the very C-like API we currently have, accepting a void* and a length, let's take a Bytes object instead. In almost all existing cases, the compiler figures out the length.
2023-04-03LibGfx/JPEG: Use a basic `Stream` instead of a `SeekableStream`Lucas CHOLLET
Only one use `seek` remains, as it is a bit more complex to remove.
2023-04-03LibGfx/JPEG: Remove the `ensure_bounds_okay` functionLucas CHOLLET
This function has probably been added when we weren't as good with error propagations as we are now. We can safely remove it and let future calls to `read` fail if the file is corrupted. This can be tested with the following bytes (already used in 9191829a): ffd8ffc000000800080ef701101200ffda00030100
2023-04-03PixelPaint: Update recent files list on project saveTim Ledbetter
This is consistent with the behavior of other applications.
2023-04-03PixelPaint: Make Bloom use InplaceFilter instead of Filtermatcool
This change affects the filter preview widget, which would get the bloom filter applied over the same bitmap, leading to an incorrect preview.
2023-04-03ImageViewer: Fix crash when setting wallpaperjustus2510
When trying to set the wallpaper from the menu, ImageViewer would crash because setting the wallpaper requires the program to pledge to the WindowManager domain. This patch adds that pledge.
2023-04-03LibWeb: Parse and plumb background-position-x/yMacDue
This parses the new background-position-x/y longhands and properly hooks up them up. This requires converting PositionStyleValue to just contain two EdgeStyleValues so that it can be easily expanded into the longhands.
2023-04-03LibWeb: Add EdgeStyleValueMacDue
This represents a single edge and offset, this will be needed for the values of background-position-x/y.
2023-04-03LibWeb: Add longhand properties for background-positionMacDue
If background-position was not longhand enough for you, we've now got background-position-x and background-position-y :^)
2023-04-02LookupServer: Put upstream DNS responses in cacheAli Mohammad Pur
2023-04-02LibHTTP: Tolerate extra \r\n in chunked-encoding last block sizeAli Mohammad Pur
Some servers put CR/LF there, so let's tolerate that behaviour. Fixes #18151.
2023-04-02LibWeb: Add borders functionality to CSS Gridmartinfalisse
2023-04-02LibWeb: Fix regression in definite grid row heightsmartinfalisse
Fixes a row height bug when a grid item in a row has a definite height.
2023-04-02LibWeb: Rename PositionedBox to GridItemmartinfalisse
This seems like a more accurate description of what this class really is, and easier to understand in my opinion.
2023-04-02LibWeb: Don't apply presentational hints to associated pseudo elementsAndreas Kling
CSS properties generated by presentational hints in content attributes should not leak into pseudo elements.
2023-04-02LibWeb: Don't apply element inline style to associated pseudo elementsAndreas Kling
An element's inline style, if present, should not leak into any pseudo elements generated by that element.
2023-04-02AK: Increase LittleEndianOutputBitStream's buffer size and remove loopsTimothy Flynn
This is very similar to the LittleEndianInputBitStream bit buffer change from 8e834d4bb2f8a217013142658fe7203c5a5c3170. We currently buffer one byte of data for the underlying stream. And when we put bits onto that buffer, we do so 1 bit at a time. This replaces the u8 buffer with a u64. And instead of looping at all, we perform bitwise operations to write the desired number of bits. Using the "enwik8" file as a test (100MB uncompressed, commonly used in benchmarks: https://www.mattmahoney.net/dc/enwik8.zip), compression time decreases from: 13.62s to 10.9s on Serenity (cold) 13.62s to 9.22s on Serenity (warm) 2.93s to 2.32s on Linux One caveat is that this requires explicitly flushing any leftover bits when the caller is done with the stream. The byte buffer implementation implicitly flushed its data every time the buffer was byte-aligned, as doing so would always fill the byte. This is no longer the case. But for now, this should be fine as the one user of this class, DEFLATE, already has a "flush everything now that we're done" finalizer.
2023-04-02LibWeb: Fix application of intrinsic aspect ratio to flex column itemsAndreas Kling
The intrinsic aspect ratio of a box is a width:height ratio, so if we have the width and need the height, we should divide, not multiply. :^)
2023-04-02LibWeb: Make HTMLImageElement loads delay the document load eventAndreas Kling
This is something we're supposed to do according to the HTML spec. Note that image loading is currently completely ad-hoc, and this just adds a simple DocumentLoadEventDelayer to the existing implementation. This will allow us to use images in layout tests, which rely on the document load event firing at a predictable time.
2023-04-02LibJS: Parse secondary expressions with the original forbidden token setLinus Groh
Instead of passing the continuously merged initial forbidden token set (with the new additional forbidden tokens from each parsed secondary expression) to the next call of parse_secondary_expression(), keep a copy of the original set and use it as the base for parsing the next secondary expression. This bug prevented us from properly parsing the following expression: ```js 0 ?? 0 ? 0 : 0 || 0 ``` ...due to LogicalExpression with LogicalOp::NullishCoalescing returning both DoubleAmpersand and DoublePipe in its forbidden token set. The following correct AST is now generated: Program (Children) ExpressionStatement ConditionalExpression (Test) LogicalExpression NumericLiteral 0 ?? NumericLiteral 0 (Consequent) NumericLiteral 0 (Alternate) LogicalExpression NumericLiteral 0 || NumericLiteral 0 An alternate solution I explored was only merging the original forbidden token set with the one of the last parsed secondary expression which is then passed to match_secondary_expression(); however that led to an incorrect AST (note the alternate expression): Program (Children) ExpressionStatement LogicalExpression ConditionalExpression (Test) LogicalExpression NumericLiteral 0 ?? NumericLiteral 0 (Consequent) NumericLiteral 0 (Alternate) NumericLiteral 0 || NumericLiteral 0 Truth be told, I don't know enough about the inner workings of the parser to fully explain the difference. AFAICT this patch has no unintended side effects in its current form though. Fixes #18087.
2023-04-02LibCompress: Make CanonicalCode::from_bytes() return ErrorOr<>Nico Weber
No intended behavior change.
2023-04-01LibWeb: Add ReadableStream.locked/cancel()/getReader()Matthew Olsson
2023-04-01LibWeb: Implement ReadableStream's constructorMatthew Olsson
2023-04-01LibWeb: Add UnderlyingSource struct for ReadableStream constructorMatthew Olsson
2023-04-01LibWeb: Add ReadableStreamDefaultControllerMatthew Olsson
2023-04-01LibWeb: Add ReadableStreamDefaultReaderMatthew Olsson
2023-04-01LibWeb: Add the stream queue-related abstract operationsMatthew Olsson