summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-12-23Magnifier: Add option to choose grid colorFrHun
2022-12-23Magnifier: Add option to display grid over the imageFrHun
2022-12-23LibGfx: Add NearestFractional scaling type to painterFrHun
This is useful for cases where you want to avoid scaling artifacts.
2022-12-23Magnifier: Allow locking location at current cursor positionFrHun
2022-12-23WindowServer: Allow overriding position when getting bitmapFrHun
2022-12-23Spreadsheet: Allow Functions Help HorizontalSplitter to resizeOptimoos
Using set_fixed_width prevents the splitter from resizing, so it has been changed to set_preferred_width. Added a FIXME that I'm not familiar enough with the codebase to tackle yet. This addresses issue #16589
2022-12-22AK+Everywhere: Replace all Bitmap::must_create() uses with ::create()Sam Atkins
Well, *someone* has to add some more FIXMEs to keep FIXME Roulette going. :^)
2022-12-21HackStudio: Fix typo in one error messageKarol Kosek
A regression from 4784ad66b29dc30fa27e0bd528b5cf85f5287b4b. oops.
2022-12-21uptime: Port to Core::Stream::File, use `AK::human_readable_time()`Karol Kosek
2022-12-21Browser: Introduce action for opening bookmarks in a new windowKemal Zebari
This change introduces an action to bookmarks that allows them to be opened in a new browser window. This is done by accessing any bookmark's context menu and pressing "Open in New Window".
2022-12-21LibGfx/OpenType: Read "glyf" table header using a C++ structAndreas Kling
2022-12-21LibGfx/OpenType: Clean up "kern" table readingAndreas Kling
- Use C++ structs for the header and subtable headers. - Use AK::binary_search to search for kerning pairs.
2022-12-21LibGfx/OpenType: Clean up "name" table readingAndreas Kling
Use a C++ struct to read out the header, and make the rest of the code more idiomatic.
2022-12-21LibGfx/OpenType: Read "os2" table using a C++ structAndreas Kling
2022-12-21LibGfx/OpenType: Clean up "htmx" table readingAndreas Kling
Use a C++ struct to read out the LongHorMetrics, and make the rest of the code more idiomatic.
2022-12-21LibGfx/OpenType: Read "maxp" table using a C++ structAndreas Kling
2022-12-21LibGfx/OpenType: Read "hhea" table using a C++ structAndreas Kling
2022-12-21LibGfx/OpenType: Read "head" table using a C++ structAndreas Kling
Instead of fidgeting with offsets and manually reading out big-endian values, we now declare the "head" table as a C++ struct and use the BigEndian<T> template to deal with byte order.
2022-12-21LibGfx/OpenType: Add spec links to classes representing OpenType tablesAndreas Kling
2022-12-21LibGfx: Rename TTF/TrueType to OpenTypeAndreas Kling
OpenType is the backwards-compatible successor to TrueType, and the format we're actually parsing in LibGfx. So let's call it that.
2022-12-20FileManager: Handle possible ByteBuffer allocation failureAlexander Narsudinov
Before this patch we created ByteBuffer with the help of the VERIFY macro that could cause a crash of FileManager in case of memory allocation failures. Now we propagate the error to a caller instead of using the `release_value_but_fixme_should_propagate_errors()` method.
2022-12-20ntpquery: Explicitly zero initialize msghdr and fill in fieldsAndrew Kaster
Rather than trying to use designated initializers, zero init the msghdr variable and fill in its fields. This makes sure to zero-init any padding bytes, and fixes a compilation error on musl-libc based systems.
2022-12-20LibThreading: Remove unused include of <sys/cdefs.h>Andrew Kaster
This file is not needed here, and causes a compile issue on musl-libc based distributions. We should only be including this file in LibC, for the most part anyway.
2022-12-20LibELF: Include <pthread.h> to ensure PTHREAD_STACK_MAX is availableAndrew Kaster
Android's bionic C library puts this definition in pthread.h rather than limits.h
2022-12-20LibWeb: Fix passing size/position to paint_radial_gradient()MacDue
This was wrong twice making it right... But let's fix that. The center was being passed as a DevicePixelPoint, but was in fact in CSS pixels, the size was passed as a Gfx::FloatSize but was in CSS pixels again. Then we were scaling from device pixels to CSS pixels when painting which does not need to be done if everything is passed which the correct scale factors already applied.
2022-12-20LibGfx: Don't blend opaque pixelsMacDue
2022-12-20LibGfx: Remove unnecessary divides in Color::mixed_with()MacDue
This is mathematically the same thing, but the compiler can't optimize these out without -Ofast, so let's give it a hand.
2022-12-20HackStudio: Port to `Core::Stream::File` :^)Karol Kosek
2022-12-20LibDiff: Make Diff::generate_only_additions take text as StringViewKarol Kosek
2022-12-20LookupServer: Propagate the errors from MulticastDNS::handle_packet()Alexander Narsudinov
This is a bit awkward, but I think it is better to make the caller deal with possible errors.
2022-12-20LookupServer: Propagate the errors from MulticastDNS::lookup()Alexander Narsudinov
This patch slightly change the signature of lookup() method and propagates all the errors to the caller with help of ErrorOr.
2022-12-20LibCore: Make UDPServer::receive() return ErrorOr<ByteBuffer>Alexander Narsudinov
This is a first step towards handling OOM errors instead of just crashing the program. Now UDPServer's method `receive()` return memory allocation errors explicitly with help of ErrorOr. This removes one FIXME and make a bunch of new ones. :(
2022-12-20unzip: Use StringView instead of DeprecatedStringimplicitfield
2022-12-20unzip: Verify extracted files against CRC32 checksumsimplicitfield
This removes one TODO.
2022-12-20LibGL: Generate the API wrappersJelle Raaijmakers
We now generate all LibGL API wrappers from a single API method definition list stored in `GLAPI.json`. Since a significant portion of the OpenGL API methods are relatively consistent variants, we take advantage of this to generate a lot of these variants at once. The autogenerated methods check for the non-nullness of the current `GLContext`, and only perform an action if a `GLContext` is present. This prevents a crash in ports like GLTron, who assume you can still call the OpenGL API without an active context. This increases our API wrapper method count from 211 to 356. Fixes #15814.
2022-12-20LibGL: Implement `glLightModel` integer normalizationJelle Raaijmakers
For the ambient light model, integers need to be remapped to a range of `-1.` through `1.`. Add the `+` and `-` operators to `VectorN` to make it a bit easier to normalize 4 values at once.
2022-12-20LibGL: Support `glLightModel` inside listsJelle Raaijmakers
We now dereference the pointer given to us before adding the arguments to an active list. This also factors out the switching logic from the API wrappers, which helps us with a future commit where we autogenerate all API wrapper functions.
2022-12-20LibGL: Correct `GL_LIGHT_MODEL_LOCAL_VIEWER` comparisonJelle Raaijmakers
We were comparing the `x` parameter to `1.f` instead of `0.f`.
2022-12-20LibGL: Dereference pointer in a consistent way for `glMaterial*`Jelle Raaijmakers
2022-12-20LibGL: Simplify transposing input matricesJelle Raaijmakers
We do not need to templatize the output type - it's always `float`. Also, the input type can be inferred. Finally, use template specialization instead of a conditional to deal with same type input and output matrices.
2022-12-20PixelPaint: Propagate errors when creating images or layersCnidarias
This fixes a dozen release_value_but_fixme_should_propage_errors
2022-12-20AK: Stop using `DeprecatedString` in Base64 encodingJelle Raaijmakers
2022-12-20LibGUI: Fix bug in the ColorPicker's spinbox not changing colorsBaitinq
Before this patch, when having the initial spinbox color value (Color::White), if you changed the color value in the vertical color picker it didn't update the spinbox's colors. This is fixed by manually calling update() in the color picker's onchange() handler if the new color is equal to the previous color, which is the case in the initial spinbox's case as it will always be white unless it is changed (and won't be affected by the vertical color picker). I added a NOTE in the source to explain this "opaque" update() call :))
2022-12-20PDFViewer: Prompt password for encrypted documentsRodrigo Tobar
This tackles a FIXME, but also makes sense to implement only now that the SecurityHandler logic has been fixed. When a Document is created an automatic attempt is made to provide the empty string as the password; even if this attempt failed the SecurityHandler still reported it had a user password, hence we never arrived to the VERIFY_NOT_REQUIRED line this commit is changing.
2022-12-20LibPDF: Reset encryption key on failed user password attemptRodrigo Tobar
When an attempt is made to provide the user password to a SecurityHandler a user gets back a boolean result indicating success or failure on the attempt. However, the SecurityHandler is left in a state where it thinks it has a user password, regardless of the outcome of the attempt. This confuses the rest of the system, which continues as if the provided password is correct, resulting in garbled content. This commit fixes the situation by resetting the internal fields holding the encryption key (which is used to determine whether a user password has been successfully provided) in case of a failed attempt.
2022-12-20LibPDF: Treat Encyption's Length item as optionalRodrigo Tobar
With the StandardSecurityHandler the Length item in the Encryption dictionary is optional, and needs to be given only if the encryption algorithm (V) is other than 1; otherwise we can assume a length of 40 bits for the encryption key.
2022-12-20PDFViewer: Fix indexing error in ErrorsViewRodrigo Tobar
I confused myself when implementing this, plus I tested using pages that had errors in pages 1 and 2, so the index and the number of the page (internally represented as 0-indexed) was always the same. When opening files with errors on higher pages it became evident that there was an issue with how I was reading the errors per page from the corresponding ModelIndex object.
2022-12-20LibGfx: Support BMP favicons with less than 32 bppBruno Conde
Adapt BMPImageDecoderPlugin to support BMP images included in ICOns. ICOImageDecoderPlugin now uses BMPImageDecoderPlugin to decode all BMP images instead of it's own ad-hoc decoder which only supported 32 bpp BMPs.
2022-12-20FontEditor: Update preview window after pasting and deleting glyphsthankyouverycool
2022-12-20FontEditor: Add Unicode block/glyph selection Statusbar Segmentthankyouverycool
Displays the current active Unicode block range, or, if multiple glyphs are selected, their count. Clicking toggles the Unicode block ListView.