summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-12-14LibWeb: Convert Paintable coordinates to new pixel unitsSam Atkins
This fixes a few sizing issues too. The page size is now correct in most cases! \o/ We get to remove some of the `to_type<>()` shenanigans, though it reappears in some other places.
2022-12-14LibWeb: Remove declarations for LineBoxFragment methods that don't existSam Atkins
2022-12-14LibWeb: Convert text and text-decoration painting to new pixel unitsSam Atkins
This does not touch the actual font selection, so the text itself is still small for now.
2022-12-14LibWeb: Convert marker painting to new pixel unitsSam Atkins
2022-12-14LibWeb: Convert shadow painting to new pixel unitsSam Atkins
2022-12-14LibWeb: Convert gradient painting to new pixel unitsSam Atkins
Co-authored-by: MacDue <macdue@dueutil.tech>
2022-12-14LibWeb: Convert backdrop-filter painting to new pixel unitsSam Atkins
2022-12-14LibWeb: Convert border painting to new pixel unitsSam Atkins
2022-12-14LibWeb: Convert background painting to new pixel unitsSam Atkins
2022-12-14LibWeb: Split PaintContext::viewport_rect() into device/css variantsSam Atkins
For now, everyone uses `device_viewport_rect()`, until I convert them.
2022-12-14LibWeb: Make PaintContext aware of CSS and DevicePixelsSam Atkins
Store the ratio between device and CSS pixels on the PaintContext, so that it can convert between the two. Co-authored-by: MacDue <macdue@dueutil.tech>
2022-12-14LibWeb: Only allow DevicePixels operators to work with integersSam Atkins
Allowing floats here was causing accidental truncations. Co-authored-by: MacDue <macdue@dueutil.tech>
2022-12-14FileManager: Display message box if stat()'ing a file to activate failsMaciej
2022-12-14LaunchServer: Return if read_link fails in for_each_handler_for_pathMaciej
Previously we were just printing error and then doing release_value(), causing crash when opening links that cannot be read (e.g in /proc).
2022-12-14LibJS: Don't update names of resulting functions in object expressiondavidot
The only cases where the name should be set is if the function comes from a direct anonymous function expression.
2022-12-14LibJS: Set DateTimeFormat's time zone when the CLDR download is disabledTimothy Flynn
We return early from the DateTimeFormat constructor to avoid crashing on assertions when the CLDR is disabled. However, after commit 019211b, the spec now mandates we assert the time zone identifier is valid. The early return resulted in this identifier being an empty string.
2022-12-14LibUnicode: Fix compilation when the UCD download is disabledTimothy Flynn
2022-12-14PixelPaint: Add background color options to "new image" dialogMacDue
This now allows you to select a background color for your new image, and optionally allows saving that default. You can pick between Transparent, White, Black, or a custom color (similar to other editors).
2022-12-14LibArchive: Do some error propagation while packing tar filesTim Schumacher
2022-12-14LibArchive: Port `TarOutputStream` to `Core::Stream`Tim Schumacher
2022-12-14LibIDL: Use `Core::Stream` to read importsTim Schumacher
2022-12-14Help: Move-capture help page pathMaciej
Previously it was reference-captured, causing crash because of stack use after return.
2022-12-14Minesweeper: Make a factory function for Field and propagate errorsAndreas Kling
This fixes a pleasant 8 FIXMEs. :^)
2022-12-14CatDog: Make a factory function for CatDog and propagate errorsAndreas Kling
This fixes an astonishing 22 FIXMEs. :^)
2022-12-14Snake: Make a factory function for SnakeGame and propagate errorsAndreas Kling
This fixes a whopping 29 FIXMEs. :^)
2022-12-14LibSQL: Convert string values to a double in a locale-independent mannerTimothy Flynn
This currently uses strtod, which is locale-dependent. Use the locale- independent method added in 65ee9b4134225398f0a5109eb79b0baba98c9cd6.
2022-12-14LibWeb: Implement Node.isEqualNode() for ProcessingInstruction nodesAndreas Kling
2022-12-14LibWeb: Add Document.createProcessingInstruction()Andreas Kling
These nodes don't really do anything interesting yet, but let's allow creating them. :^)
2022-12-14LibWeb: Make sure ProcessingInstruction objects have the right prototypeAndreas Kling
2022-12-14LibWeb: Implement Node.isEqualNode() for Attr nodesAndreas Kling
2022-12-14LibWeb: Implement Node.cloneNode for Attr nodesAndreas Kling
2022-12-14Browser: Inject cookies timestamps as integers rather than doublesTimothy Flynn
Now that LibSQL can store 64-bit integers, let's use them.
2022-12-14LibSQL: Support 64-bit integer values and handle overflow errorsTimothy Flynn
Currently, integers are stored in LibSQL as 32-bit signed integers, even if the provided type is unsigned. This resulted in a series of unchecked unsigned-to-signed conversions, and prevented storing 64-bit values. Further, mathematical operations were performed without similar checks, and without checking for overflow. This changes SQL::Value to behave like SQLite for INTEGER types. In SQLite, the INTEGER type does not imply a size or signedness of the underlying type. Instead, SQLite determines on-the-fly what type is needed as values are created and updated. To do so, the SQL::Value variant can now hold an i64 or u64 integer. If a specific type is requested, invalid conversions are now explictly an error (e.g. converting a stored -1 to a u64 will fail). When binary mathematical operations are performed, we now try to coerce the RHS value to a type that works with the LHS value, failing the operation if that isn't possible. Any overflow or invalid operation (e.g. bitshifting a 64-bit value by more than 64 bytes) is an error.
2022-12-14LibSQL: Sort the list of SQL error codes alphabeticallyTimothy Flynn
2022-12-14LibSQL: Remove unnecessary values from the ENUMERATE_SQL_TYPES macroTimothy Flynn
Removing the bitmask-esque values from the enumeration necessitates a Heap version bump.
2022-12-14LibSQL: Ungracefully handle database version incompatibilitiesTimothy Flynn
In the long run, this is obviously a bad way to handle version changes to the SQL database files. We will want to migrate old databases to new formats. Until we figure out a good way to do that, wipe old databases so that we don't crash trying to read incompatible data.
2022-12-14LibJS+LibWeb: Remove NonnullGCPtr<T>::operator=(GCPtr<T>) footgunAndreas Kling
GCPtr can be null so it's not safe to assign it to a NonnullGCPtr unless you know it to be non-null. This exposed a number of wrong uses in LibWeb which had to be fixed as part of this change.
2022-12-14LibJS: Remove Object(Object& prototype) footgunAndreas Kling
This constructor was easily confused with a copy constructor, and it was possible to accidentally copy-construct Objects in at least one way that we dicovered (via generic ThrowCompletionOr construction). This patch adds a mandatory ConstructWithPrototypeTag parameter to the constructor to disambiguate it.
2022-12-14LibJS: Don't "copy construct" temporary value in ThrowCompletionOr ctorAndreas Kling
It was possible for the generic ThrowCompletionOr constructor to "copy-construct" a JS Object when instantiating a ThrowCompletionOr via e.g `return *object;`. This happened because it chose the Object(Object& prototype) constructor which will be removed in a subsequent commit. It was not easy to debug. As a first step towards avoiding this in the future, the generic ThrowCompletionOr constructor now takes the value as a const reference.
2022-12-14Presenter: Provide default text styles to text objectsArda Cinar
Having an uninitialized text alignment value caused a crash in Gfx::Painter::draw_text.
2022-12-14Presenter: Fix a crash in loading untitled presentationsArda Cinar
The Presentation::title() and Presentation::author() functions return a StringView to the title/author defined in the json file or a default value. Previously, this would return a StringView to already-freed memory and crash the application when setting the window title. This commit fixes that issue :^)
2022-12-14LibCore: Protect Core::Group against null group::gr_mem membersTimothy Flynn
Serenity's implementation does not set this pointer to anything, so we should not assume it was set.
2022-12-14LibCore: Define and use a fallible, OS-independent getgrent(_r) wrapperTimothy Flynn
Rather than maintaining a list of #ifdef guards to check systems that do not provide the reentrant version of getgrent, we can use C++ concepts to let the compiler perform this check for us. While we're at it, we can also provide this wrapper as fallible to let the caller TRY calling it.
2022-12-14LibCore: Define and use a fallible, OS-independent getpwent(_r) wrapperTimothy Flynn
Rather than maintaining a list of #ifdef guards to check systems that do not provide the reentrant version of getpwent, we can use C++ concepts to let the compiler perform this check for us. While we're at it, we can also provide this wrapper as fallible to let the caller TRY calling it.
2022-12-14Everywhere: Stop shoving things into ::std and mentioning them as suchAli Mohammad Pur
Note that this still keeps the old behaviour of putting things in std by default on serenity so the tools can be happy, but if USING_AK_GLOBALLY is unset, AK behaves like a good citizen and doesn't try to put things in the ::std namespace. std::nothrow_t and its friends get to stay because I'm being told that compilers assume things about them and I can't yeet them into a different namespace...for now.
2022-12-14LibJS: Convert WrappedFunction::create() to NonnullGCPtrLinus Groh
2022-12-14LibJS: Convert WeakSet::create() to NonnullGCPtrLinus Groh
2022-12-14LibJS: Convert WeakRef::create() to NonnullGCPtrLinus Groh
2022-12-14LibJS: Convert WeakMap::create() to NonnullGCPtrLinus Groh
2022-12-14LibJS: Convert TypedArray::create() to NonnullGCPtrLinus Groh