summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-11LibGUI: Base `write_to_file(StringView path)` on the stream overloadLucas CHOLLET
`write_to_file(StringView path)` was based on the `Core::File` overload. The return type also changed from `bool` to `ErrorOr<void>` to ease error propagation.
2023-02-11FileManager: Factorize code to handle drag-and-dropLucas CHOLLET
The treeview and the breadcrumbbar used to be on one side, sharing drag-and-drop handling and on the other side the directory view had its one logic. This patch factorizes both versions, in the meantime upgrading the version used by the treeview/breadcrumbbar that was left behind. It now uses the copy dialog :^).
2023-02-11AK: Move try_make_ref_counted() to NonnullRefPtr.hNico Weber
2023-02-11AK: Move try_make() to NonnullOwnPtr.hNico Weber
2023-02-11Meta: Mark myself as a CODEOWNER of a few more thingsLinus Groh
Browser, Ladybird, the neofetch & python3 ports I added.
2023-02-11LibWeb: Implement Headers.getSetCookie()Linus Groh
This is a normative change in the Fetch spec. See: https://github.com/whatwg/fetch/commit/e4d3480 This also implements the changes to the 'sort and combine' algorithm, which now treats "set-cookie" headers differently, and is exposed to JS via the Headers' iterator. Passes all 21 WPT tests :^) http://wpt.live/fetch/api/headers/header-setcookie.any.html
2023-02-11LibWeb: Fix UAF in convert_header_names_to_a_sorted_lowercase_set()Linus Groh
We can't keep a span (ReadonlyBytes) to a move()'d ByteBuffer in the header_names_seen HashTable - copy the original name span instead which works the same thanks to CaseInsensitiveBytesTraits. This would sporadically fail the contains() check due to garbage data, later leading to a VERIFY() crash in the OrderedHashTable append loop.
2023-02-11LibWeb: Add tests for flex formatting contextAliaksandr Kalenik
2023-02-11Ports: Add GemRBJulian Offenhäuser
GemRB is an open-source implementation of the Infinity engine by Bioware, used in some of their classic role-playing games.
2023-02-11Ports: Build python3 port with shared librariesJulian Offenhäuser
2023-02-11AK: Move adopt_nonnull_ref_or_enomem() to NonnullRefPtr.hNico Weber
Rewrite the implementation to not depend on OwnPtr.h. No intended behavior change.
2023-02-11AK: Move adopt_nonnull_own_or_enomem() to NonnullOwnPtr.hNico Weber
Rewrite the implementation to not depend on OwnPtr.h. No intended behavior change.
2023-02-11LibGfx: Make ICC code handle out-of-memory situations betterNico Weber
...by using adopt_nonnull_ref_or_enomem() via the try_make_ref_counted() wrapper, instead of adopt_ref().
2023-02-11LibJS: Add missing assignment to offset_string in ZDT conversionLuke Wilde
2023-02-10LibGfx: Add scaffolding for curves in lutAToBType and lutBToATypeNico Weber
2023-02-11Toolchain: Add fuse2fs to serenity.nixBaitinq
This previously missing package was needed for root-less image building :)
2023-02-11Tests: Add a few tests to verify vectors are using inline storageMacDue
2023-02-11AK: Always initialize vector capacity to inline_capacityMacDue
This ensures constructors that take a span or an initializer_list don't allocate when there's already enough inline storage. (Previously these constructors always allocated)
2023-02-10Keymaps: Stop pt-br's r-shift printing "?"Victor Panisa
Currently when trying to use the right-shift on the pt-br layout it prints a "?" on key-down on top of applying the shift modifier. This patch removes the unwanted "?".
2023-02-10LibVideo/VP9: Rename `round_2()` to `rounded_right_shift()` for clarityZaggy1024
2023-02-10LibVideo/VP9: Drop the decoder intermediate bounds checksZaggy1024
Checking the bounds of the intermediate values was only implemented to help debug the decoder. However, it is non-fatal to have the values exceed the spec-defined bounds, and causes a measurable performance reduction. Additionally, the checks were implemented as an assertion, which is easily broken by bad input files. I see about a 4-5% decrease in decoding times in the `webm_in_vp9` test in TestVP9Decode.
2023-02-10LibGfx+LibWeb: Store radii as FloatSize rather than FloatPointAndreas Kling
Radii are sizes, not points. This becomes important when mapping them through a 2D transform.
2023-02-10LibGfx: Make sure the Painter clip rect is never larger than the targetAndreas Kling
The new Painter::set_clip_rect(IntRect) API was able to make the clip rect larger than the underlying target bitmap. This was not good, as it could make it possible to draw outside the bitmap memory. Fixes a crash when viewing https://twinings.co.uk/ in the browser. :^)
2023-02-10LibCore: Fix wrong call to stat on the Core::System::lstat methodLiav A
We should call lstat and not stat, because lstat gives information on the symbolic link itself (if the path is about a symbolic link).
2023-02-10LibWeb/Fetch: Implement CORS preflightLuke Wilde
The main things missing is the CORS preflight cache and making extract_header_list_values properly parse, validate and return split values for the Access-Control headers.
2023-02-10AK: Allow Vector<ByteBuffer>::contains_slow to accept (Readonly)BytesLuke Wilde
This is done by providing Traits<ByteBuffer>::equals functions for (Readonly)Bytes, as the base GenericTraits<T>::equals is unable to convert the ByteBuffer to (Readonly)Bytes to then use Span::operator== This allows us to check if a Vector<ByteBuffer> contains a (Readonly)Bytes without having to making a copy of it into a ByteBuffer first. The initial use of this is in LibWeb with CORS-preflight, where we check the split contents of the Access-Control headers with Fetch::Infrastructure::Request::method() and static StringViews such as "*"sv.bytes().
2023-02-10LibWeb: Make extract_header_list_values differentiate parsing failuresLuke Wilde
Previously, parsing failures and the header not existing made extract_header_list_values return an empty Optional, making it impossible to differentiate between the two. Required for implementing CORS-preflight, where parsing failures for the headers makes it fail, but not having them doesn't make it fail in all cases.
2023-02-10LibWeb/Fetch: Don't add cookies when creating ResourceLoader requestLuke Wilde
Using LoadRequest::create_for_url_on_page will unconditionally add cookies as long as there's a page available. However, it is up to http_network_or_cache_fetch to determine if cookies should be added to the request. This was noticed when implementing CORS-preflight requests, where we sent cookies in OPTIONS requests.
2023-02-10Ladybird: Teach RequestManagerQt how to handle every valid HTTP methodLuke Wilde
2023-02-10LibWeb: Fix clearance to update y offset within current blockAliaksandr Kalenik
If a box has clearance and margin bottom of preceding box is greater than static y of the box then it should also affect y offset in current block container so subsequent boxes will get correct y position too.
2023-02-10LibWeb: Store y offset of current block container in BFC memberAliaksandr Kalenik
This change should make it possible to access y offset of current block container in BFC without explicitly passing it using method parameters.
2023-02-10Kernel: Remove old ‘main id register accessorʼ for Aarch64konrad
2023-02-10Kernel: Migrate ‘main id registerʼ access in Aarch64 MMIOkonrad
2023-02-10Kernel: Provide better types in MIDR register accessor for Aarch64konrad
This avoids unnecessary and-masks during reading.
2023-02-10LibJS+Userland: Port the JS Console object and direct callers to StringTimothy Flynn
2023-02-10LibJS: Surround the VM parameter of TRY_OR_THROW_OOM with parenthesesTimothy Flynn
Depending on how this is invoked, the preprocessor may get confused when pasting the VM parameter into this expression. For example, it trips up on the JS REPL in cases such as: TRY_OR_THROW_OOM(*g_vm, ...);
2023-02-10LibJS: Add a fallible ThrowableStringBuilder::appendffTimothy Flynn
2023-02-10LibJS: Change ThrowableStringBuilder to privately inherit StringBuilderTimothy Flynn
Not an issue currently, but while developing, it's easy to miss cases where an infallible AK::StringBuilder method is still used. By making this inheritance private, and explicitly pulling in base methods we can safely use, we get extra help from the compiler to indicate such mistakes immediately.
2023-02-10LibGfx: Validate ICC cicpTag some moreNico Weber
2023-02-10LibGfx+icc: Stringify known signatureType valuesNico Weber
2023-02-10DisplaySettings: Capitalize fallback display mode when loading settingsJulian Offenhäuser
This setting was capitalized a while ago, except for this place where we fall back to "[C]center". This caused a crash in MonitorWidget.
2023-02-10LibWeb: Use device pixels for transform rect of stacking contextAliaksandr Kalenik
2023-02-10LibPDF: Fix glyph sizing bug that caused incorrect spacingJulian Offenhäuser
When loading OpenType fonts, either as a replacement for the standard 14 fonts or an embedded one, we previously passed the font size as the _point_ size to the loader class. The difference is quite subtle, being that Gfx::ScaledFont uses the optional dpi parameter to convert the input from inches to pixels. This meant that our glyphs were exactly 1.333% too large, causing them to overlap in places.
2023-02-10LibPDF: Use more appropriate standard 14 replacement fontsJulian Offenhäuser
The mapping of standard font to replacement now looks like this: Times New Roman -> Liberation Serif Courier -> Liberation Mono Helvetica, Arial -> Liberation Sans
2023-02-10Base: Add LiberationSans and LiberationMono fontsJulian Offenhäuser
These will be used by LibPDF as replacements for Helvetica/Arial and Courier.
2023-02-10LibGfx+icc: Read chromaticityTagNico Weber
This isn't terribly useful. But some profiles, for example the ones at https://vpifg.com/help/icc-profiles/, do contain this tag and it seems nice to be able to dump it, just for completeness. I haven't seen any files that contain a phosphor or colorant type different from "Unknown", even for the Rec2020 profile on that page. (It has x,y coordinates that match the values required for Rec2020, but it doesn't set the phosphor or colorant type to that.)
2023-02-10LibGfx+icc: Read viewingConditionsTypeNico Weber
Not terribly useful in practice either and also mostly for completionism. But with this, we can dump all types present in Lightroom Classic-exported jpegs :^)
2023-02-10LibGfx+icc: Read measurementTypeNico Weber
Also not terribly useful in practice and mostly for completionism. Lightroom Classic-exported jpegs contain this type in their ICC data.
2023-02-10CI: Add script to post mastodon toots for commits on masternetworkException
This patch adds the toot-commits script (mirroring tweet-commits), posting new commits on the master branch to https://serenityos.social/@commits.
2023-02-10LibWeb: Add missing GCPtr.h includes to Fetch headersTimothy Flynn
These are missing in most Fetch headers, and clangd is (rightfully) very loud about it on a few of these.