summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-20AK: Stop using `DeprecatedString` in Base64 encodingJelle Raaijmakers
2022-12-20AK: Stop using `DeprecatedString` in `UUID`Jelle Raaijmakers
2022-12-20Ports: Add grepcidr portEWouters
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.
2022-12-20LibGUI+FontEditor: Restore normalized selections on Undo/Redothankyouverycool
Selections are always normalized when saving undo commands. The restore_selection() function reverses this process so negatively sized selections (created right-to-left) continue to resize correctly with the keyboard when restored.
2022-12-20LibGUI: Reset GlyphMapWidget scroll value when changing active rangethankyouverycool
Fixes being teleported to the old location when scrolling on a previously browsed range.
2022-12-20LibGUI: Focus the actively resizing end of GlyphMapWidget selectionsthankyouverycool
2022-12-20LibGUI: Only reset GlyphMapWidget selection on Escapethankyouverycool
and when using unmodified arrows.
2022-12-20LibGUI: Add Page{Up,Down} support for GlyphMapWidgetthankyouverycool
2022-12-20LibGUI: Improve visible glyph estimate in GlyphMapWidgetthankyouverycool
Previously the widget used a very rough estimate for visible glyphs based on viewport and glyph areas. Now it simply figures rows times columns with a two row overdraw to accommodate fractional glyphs on either end of visible content. For KaticaRegular10, this ends up reducing unnecessary glyph iterations during painting by about 30%.
2022-12-20LibGUI: Adjust GlyphMapWidget content sizing and glyph paddingthankyouverycool
Fixes a slightly oversized content rect and erroneous glyph outer rect values. Increases glyph rect padding to guarantee at least 1px between the focus rect and glyph.
2022-12-20LibGUI: Implement calculated_min_size() for GlyphMapWidgetthankyouverycool
2022-12-20LibGUI: Check bounds when moving GlyphMapWidget selectionsthankyouverycool
Fixes crashing on invalid code points when creating selections with the keyboard and applying actions to them. Also adds Home/End key support for selections. Ctrl+Shift+{Home,End} now extends the selection to the beginning or end of the active range, respectively. Shift+{Home,End} extends the selection to the start or end of the row. Alt+{Home,End} resets the selection and moves the active glyph to the beginning or end of the active range.
2022-12-20LibGUI: Ensure GlyphMapWidget selection resets when requestedthankyouverycool
Previously selection reset was ignored on active glyph change if the old glyph equaled the new one. This was an intentional behavior that allowed selections to resize by dragging the focused glyph, but has proved more counterintuitive than useful. Now the widget behaves like other text selection controls: selections can be reset by clicking anywhere in them or shift can be held to grow the selection.
2022-12-20LibGUI: Disallow GlyphMapWidget selection sizes equal to zerothankyouverycool
This is a bogus size as the map must always have at least 1 glyph selected, and it was causing occasional desync between selection contents and the focused glyph when manipulating selections with the keyboard.
2022-12-20LibGUI: Forward GlyphMapWidget Key_Tab eventsthankyouverycool
Allows focus to be passed using the keyboard.
2022-12-20FontEditor: Set Unicode ListView's focus proxy to its search boxthankyouverycool
Provides a visual cue that arrow key input is shared between these widgets.
2022-12-20FontEditor: Remove unused includesthankyouverycool
2022-12-19TextEditor: Suggest saving new files with an extension from highlighterKarol Kosek
2022-12-19LibSyntax: Add `common_language_extension()` functionKarol Kosek
The main motivation for this is to prefill an extension for user when saving a new file.
2022-12-19LibSyntax: Remove default switch case in `language_to_string()`Karol Kosek
This way we can get a compiler error about unhandled new language cases, instead of a possible crash when running a program. Also added a missing case to make it build now.
2022-12-19LibSyntax+TextEditor: Move Highlighter::language_string() out of classKarol Kosek
2022-12-19Snake: Ignore default keydown eventsBaitinq
Before this patch, all key down events except arrow keys or WASD were not propagated, so keyboard shortcuts in the application didn't work. This patch fixes this :))
2022-12-19Snake: Add snake color chooser game menu actionBaitinq
This patch makes use of a new "set_snake_base_color()" function to change the snake's base color to the picked value.
2022-12-19Snake: Don't hardcode the snake painting logicBaitinq
This patch adds a m_snake_base_color variable which dictates the color of the head of the snake and from which the rest of the snake color's are derived from by darkening the base color.
2022-12-19Snake: Add pause/continue game menu actionBaitinq
This patch adds an action in the Snake's game menu that allows for easy pausing/unpausing of the game state. In order to do this, the commit adds new pause()/start() functions in the SnakeGame class ;)
2022-12-19Browser+WebContent: Fixup some DOM inspector weirdnessMacDue
This fixes a few things I noticed whilst working on the inspector for Ladybird. 1. The computed and resolved values were being passed swapped around from the inspect_dom_node() IPC call. I.e. computed values were passed as resolved values and vice versa. This was then fixed by swapping them again in the InspectorWidget (two errors canceled out). 2. Resolved values were called "specified values" seemingly only in the inspect_dom_node() IPC calls. This was a little confusing so I've renamed them to back to "resolved values" for consistency. 3. The inspector took and stored the DOM JSON strings unnecessarily, all the models immediately parse the JSON and don't need the strings to hang around.
2022-12-19Browser: Close inspectors and JS console when tab closesMacDue
Keeping these around can lead to use-after-frees and crashes.
2022-12-19Meta: Include StylePropertiesModel.cpp in lagom LibWebViewMacDue
2022-12-19LibWeb: Fix crash when serializing nodes for DOM inspectorMacDue
Noticed this trying to inspect GitHub, you'd get a segfault due to the parent node being null here.
2022-12-19AK: Use __has_builtin() in Checked.hAndreas Kling
Instead of avoiding overflow-checking builtins with AK_COMPILER_CLANG, we can use the preprocessor's __has_builtin() mechanism to check if they are available.
2022-12-19Documentation: Adjust default TARGET to x86_64 in the documentation0xxFF
2022-12-19FileManager: Clear the selection after deleting filesimplicitfield
2022-12-19LibWeb: Fully Implement `get_an_elements_noopener`Keir Davis
This removes two fix me in HTMLHyperlinkElementUtils
2022-12-19LibCore: Convert explicit timezone to local in `DateTime::parse`Jelle Raaijmakers
When we encounter an explicit timezone, we shift the time to UTC. Because we rely on `mktime`, we need to shift it to the local time before proceeding. If no explicit timezone is provided, local timezone is assumed. This fixes the "timezone-offset extension" LibJS test running on machines with a non-UTC timezone offset. Co-authored-by: Timothy Flynn <trflynn89@pm.me>
2022-12-19LibGfx: Split VERIFY statements in various Bitmap class methodsLiav A
This could aid debugging in many cases, and it doesn't break any functionality, so let's ensure it's easier to understand in which way a provided value is out of range.
2022-12-19Kernel/Graphics: Propagate errors properly around in the VirtIO driverLiav A
This happens to be a sad truth for the VirtIOGPU driver - it lacked any error propagation measures and generally relied on clunky assumptions that most operations with the GPU device are infallible, although in reality much of them could fail, so we do need to handle errors. To fix this, synchronous GPU commands no longer rely on the wait queue mechanism anymore, so instead we introduce a timeout-based mechanism, similar to how other Kernel drivers use a polling based mechanism with the assumption that hardware could get stuck in an error state and we could abort gracefully. Then, we change most of the VirtIOGraphicsAdapter methods to propagate errors properly to the original callers, to ensure that if a synchronous GPU command failed, either the Kernel or userspace could do something meaningful about this situation.
2022-12-19Kernel/Graphics: Disable double buffering for the VirtIO driverLiav A
The performance that we achieve from this technique is visually worse compared to turning off this feature, so let's not use this until we figure out why it happens.
2022-12-19Kernel: Properly propagate errors in VirtIOGPU 3D device initializationLiav A
2022-12-18Meta: Find mke2fs on macOS even if HOMEBREW_PREFIX is not setNico Weber
...as long as `brew` is on the path and `brew --prefix e2fsprogs` tells us where it is. This is for people who don't have `"$(brew shellenv)"` in their .zshrc.
2022-12-18Meta: Disable gdbstub when running under HVF on macOSNico Weber
Without this, `serenity.sh run` fails with gdbstub: current accelerator doesn't support guest debugging on an intel mac.
2022-12-18LibWeb: Don't const_cast layout_box() when calling const functionsMatt Purnell
layout_box() already has a non-const overload, so we don't need to const_cast them anymore. This gets rid of 2 FIXMEs. :^)
2022-12-17LibGL: Pass generated GPU IR to GPU side compiler when linking programStephan Unverwerth