summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2023-05-19install: Prefer FileSystem over DeprecatedFileBen Wiederhake
2023-05-19LibGfx: Remove clip check in `Painter::do_draw_scaled_bitmap`Jelle Raaijmakers
We were performing a check whether source pixels would fall into a clipped rect too early. Since we already clamp the resulting source coordinates to the clipped rect, we can just remove this code.
2023-05-19LibWeb: Use box sampling instead of bilinear scaling when downscalingJelle Raaijmakers
As a heuristic, either the width or height of the scaled image should decrease for box sampling to be used. Otherwise, we use bilinear scaling.
2023-05-19PixelPaint: Use box sampling scaling for layer thumbnailsJelle Raaijmakers
2023-05-19PixelPaint: Add support for box sampling scalingJelle Raaijmakers
2023-05-19ImageViewer: Add support for box sampling scalingJelle Raaijmakers
2023-05-19LibGfx: Implement box sampling image scalingJelle Raaijmakers
Box sampling is a scaling algorithm that averages all the pixels that form the source for the target pixel. For example, if you would resize a 9x9 image to 3x3, each target pixel would encompass a 3x3 pixel area in the source image. Box sampling is a near perfect scaling algorithm for downscaling. When upscaling with this algorithm, the result is similar to nearest neighbor or smooth pixels.
2023-05-19LibGfx: Cleanup of `Painter::do_draw_scaled_bitmap()`Jelle Raaijmakers
No functional changes.
2023-05-19LibWeb: Fix null dereference on SVG element with bogus fill URLAndreas Kling
Fixes a crash seen on YouTube channel pages.
2023-05-19LibWeb: Make sure that margins don't collapse across a nested BFCAndreas Kling
In order to fix this, I also had to reorganize the code so that we create an independent formatting context even for block-level boxes that don't have any children. This accidentally improves a table layout test as well (for empty tables).
2023-05-19Revert "LibGfx: Implement alternative `Rect` right/bottom edge calculations"Andreas Kling
This reverts commit 88a7bb5ba7919ccd76839607891e4331868d2e5a.
2023-05-19Revert "LibGfx: Cleanup of `Painter::do_draw_scaled_bitmap()`"Andreas Kling
This reverts commit 4944b16bd5fa615f2f8e9f5198c400412bab30b9.
2023-05-19Revert "LibGfx: Implement box sampling image scaling"Andreas Kling
This reverts commit eb418bec32dbd2371d2f6ead973ff7e93b16c919.
2023-05-19Revert "ImageViewer: Add support for box sampling scaling"Andreas Kling
This reverts commit 032c2a882aee23ea4ac79ac907e9594ba311764d.
2023-05-19Revert "PixelPaint: Add support for box sampling scaling"Andreas Kling
This reverts commit d6aefb1bf121b21745410c666dd612ca6fa5f016.
2023-05-19Revert "PixelPaint: Use box sampling scaling for layer thumbnails"Andreas Kling
This reverts commit 81b30ec3729644cb1be14eb8b7a491eb4c4c61b5.
2023-05-19Revert "LibWeb: Use box sampling instead of bilinear scaling when downscaling"Andreas Kling
This reverts commit b79fd3d1a90f959d71e8d1b56ad9f8c088681e78.
2023-05-19Revert "LibGfx: Remove clip check in `Painter::do_draw_scaled_bitmap`"Andreas Kling
This reverts commit 2959c2f2eb2c52929ce92a33d2af2367bede40aa.
2023-05-19Applications: Improve FSAC error message handlingthankyouverycool
Fixes apps showing redundant error messages and terminating unnecessarily on failed file requests. It's nicer to drop the user off at the equivalent of a default document on failure if possible. Also fixes TextEditor not showing response errors for missing files in the recently opened list.
2023-05-19FileSystemAccessServer: Return EPERM for denied promptsthankyouverycool
Instead of showing an ambiguous "Unknown error" when FSAS approval is denied, let's affirm the user's action wasn't permitted if they reject the prompt.
2023-05-19LibFileSystemAccessClient: Improve error propagationthankyouverycool
Previously FSAC displayed some but not all errors and always rejected directories and devices. This has led most apps to ignore response errors in open/save actions or show redundant messages. Now FSAC displays all errors including fd failures and has the ability to silence messages for directories, devices and ENOENT, which some apps handle differently. Silenced directory and device errors now return files on success. A request's access mode is now stored in RequestData to format more accurate error messages from the user's perspective. Resolved promises don't require callback propagation so they're voided
2023-05-19LibGUI: Set Open/Save button as default in FilePickerthankyouverycool
This makes it more obvious that enter will return the current selection and prevents returning without a valid selection.
2023-05-19LibWeb: Push the realm execution context while linking modulesAndreas Kling
If linking fails, we throw a JS exception, and if there's no execution context on the VM stack at that time, we assert in VM::current_realm(). This is a hack to prevent crashing on failed module loads. Long term we need to rewrite module loading since it has been refactored to share code differently between HTML and ECMA262.
2023-05-19LibWeb: Implement the "error to rethrow" mechanism in HTML::ScriptAndreas Kling
This allows JS module loads to fail and throw without crashing the WebContent process due to a TODO() assertion.
2023-05-19LibGfx: Remove clip check in `Painter::do_draw_scaled_bitmap`Jelle Raaijmakers
We were performing a check whether source pixels would fall into a clipped rect too early. Since we already clamp the resulting source coordinates to the clipped rect, we can just remove this code.
2023-05-19LibWeb: Use box sampling instead of bilinear scaling when downscalingJelle Raaijmakers
As a heuristic, either the width or height of the scaled image should decrease for box sampling to be used. Otherwise, we use bilinear scaling.
2023-05-19PixelPaint: Use box sampling scaling for layer thumbnailsJelle Raaijmakers
2023-05-19PixelPaint: Add support for box sampling scalingJelle Raaijmakers
2023-05-19ImageViewer: Add support for box sampling scalingJelle Raaijmakers
2023-05-19LibGfx: Implement box sampling image scalingJelle Raaijmakers
Box sampling is a scaling algorithm that averages all the pixels that form the source for the target pixel. For example, if you would resize a 9x9 image to 3x3, each target pixel would encompass a 3x3 pixel area in the source image. Box sampling is a near perfect scaling algorithm for downscaling. When upscaling with this algorithm, the result is similar to nearest neighbor or smooth pixels.
2023-05-19LibGfx: Cleanup of `Painter::do_draw_scaled_bitmap()`Jelle Raaijmakers
No functional changes.
2023-05-19LibGfx: Implement alternative `Rect` right/bottom edge calculationsJelle Raaijmakers
For `IntRect`, we assume that the right/bottom edge is offset by minus one. This obviously will not work for `FloatRect`, since those edges are infinitely small. Specialize `right()` and `bottom()` and add a `FIXME` to get rid of the offset in the future.
2023-05-19LibWeb: Resolve grid item fixed size paddings in GFCAliaksandr Kalenik
Adds support for grid items with fixed size paddings. Supporting percentage paddings will probably require to do second pass of tracks layout: second pass is needed to recalculate tracks sizes when final items sizes are known when percentage paddings are already resolved.
2023-05-19LibWeb: Move resolving grid item heights into separate method in GFCAliaksandr Kalenik
2023-05-18shuf: Add `-r` option to allow output lines to be repeatedTim Ledbetter
This commit also modifies the behavior of the `-z` option, so that a '\0' character now delimits output lines, as well as input lines. This matches the behavior of the GNU coreutils and FreeBSD implementations of shuf.
2023-05-18LibAudio: Compute and verify FLAC frame header checksumskleines Filmröllchen
This is currently not a failure condition, but we will print out a message to the console informing the user of a potential corrupted file.
2023-05-18LibCrypto: Add a checksumming stream wrapperkleines Filmröllchen
This generic stream wrapper performs checksum calculations on all data passed through it for reading or writing, and is therefore convenient for calculating checksums while performing normal data input/output, as well as computing streaming checksums on non-seekable streams.
2023-05-18LibCrypto: Add generic 8-bit CRCkleines Filmröllchen
The implementation of this is naive enough so it can handle all 8-bit CRC polynomials, of which there are quite a few. The table generation and update procedure is MSB first, which is backwards from the LSB first method of CRC32.
2023-05-18LibCrypto: Expose checksum type of ChecksumFunctionkleines Filmröllchen
2023-05-18LibWeb: Fix "Unsupported main size for flex-basis" spam about calc()Andreas Kling
For flex items with a calc() value for a main size, we can just convert them to a calculation-backed LengthPercentage.
2023-05-18LibWeb: Use grid item used width as available width during track sizingAliaksandr Kalenik
This change addresses the incorrect assumption that the available width inside a grid item is equal to the width of the track it belongs to. For instance, if a grid item has a width of 200px, the available width inside that item is also 200px regardless of its column(s) base size. To solve this issue, it was necessary to move the final resolution of grid items to occur immediately after the final column track sizes are determined. By doing so, it becomes possible to obtain correct available width inside grid items while resolving the row track sizes.
2023-05-18LibWeb: Remove unitless-length quirk from properties that don't need itSam Atkins
A list of every property that has this quirk is available here: https://quirks.spec.whatwg.org/#the-unitless-length-quirk
2023-05-17Kernel+Userland: Split bind-mounting and re-mounting from mount syscallLiav A
These 2 are an actual separate types of syscalls, so let's stop using special flags for bind mounting or re-mounting and instead let userspace calling directly for this kind of actions.
2023-05-17LibThreading: Only run on_error callback when action wasn't canceledkleines Filmröllchen
This mirrors the same UAF protection for event loops used by the on_complete callback.
2023-05-17LibCore: Cancel jobs on event loop exitkleines Filmröllchen
This important feature was regressed with the recent architectural change.
2023-05-17CatDog: Stop recognizing name of deleted programBen Wiederhake
Inspector was deleted a long time ago in commit 16c47ccff632f520422c81d96681e3cdff358ddf, and likely isn't coming back any time soon.
2023-05-17LibWeb: Add missing call to Base in VideoTrack::visit_edges()Andreas Kling
This fixes a GC crash that happened after a while on the Steam store.
2023-05-17LibWeb: Null-check layout node before dereferencing in HTMLVideoElementAndreas Kling
DOM elements don't always have a corresponding layout node. This fixes a crash soon after loading the Steam store.
2023-05-17LibWeb: Resolve CSS custom properties on pseudo elementsAndreas Kling
The resolved property sets are stored with the element in a per-pseudo-element array (same as for pseudo element layout nodes). Longer term, we should stop storing this with elements entirely and make it temporary state in StyleComputer somehow, so we don't waste memory keeping all the resolved properties around. This makes various gradients show up on https://shopify.com/ :^)
2023-05-17Browser+Ladybird+LibWebView: Handle trivial content APIs in LibWebViewTimothy Flynn
The goal here is to reduce the amount of WebContent client APIs that are duplicated across every ViewImplementation. Across our three browsers, we currently: Ladybird - Mix some AK::Function callbacks and Qt signals to notify tabs of WebContent events. Browser - Use only AK::Function callbacks. headless-browser - Drop most events on the floor. Instead, let's only use AK::Function callbacks across all three browsers to propagate events to tabs. This allows us to invoke those callbacks directly from LibWebView instead of all three browsers needing to define a trivial `if (callback) callback();` override of a LibWebView virtual function. For headless-browser, we can simply not set these callbacks. As a first pass, this only converts WebContent events that are trivial to this approach. That is, events that were simply passed onto the tab or handled without much fuss.