summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-07-27Kernel+LibC: Use argument for TIOCGPGRP ioctl valueBrian Gianforcaro
In preparation for modifying the Kernel IOCTL API to return KResult instead of int, we need to fix this ioctl to an argument to receive it's return value, instead of using the actual function return value.
2021-07-26Mail: Prompt for password if no password was savedTom
This allows the user to create a mail configuration without having to save the password in clear text (or any other form) to disk.
2021-07-26LibGUI: Add InputType enum to allow creating a password InputBox dialogTom
2021-07-26LibWeb: Add blurring support to box-shadowTobias Christiansen
Now the box-shadow-rendering is done by using the new Gfx::FastBoxBlurFilter. :^)
2021-07-26LibGfx: Add FastBoxBlurFilterTobias Christiansen
This patch adds a FastBoxBlurFilter to the system. It can be created by specifying a Bitmap it will work on. There are two uses implemented: - apply_single_pass() applys an implementation of a linear-time box-blur algorithm with the specified radius using a horizontal and a vertical pass and utilizinga sliding window. - apply_three_passes() gets a better Gaussian approximation by applying the filter three times. For this to work the radius of each pass is calculated to fit Gauss the best.
2021-07-26NotificationServer: Expand the notification when hoveredsin-ack
Now, instead of showing a tooltip, the entire notification will be shown when the user hovers over a notification. In the future, limiting the amount of lines shown within the notification and moving extra lines to the tooltip again might be a good idea.
2021-07-26Userland: Move text wrapping/elision into the new TextLayout :^)sin-ack
This class now contains all the fun bits about laying out text in a rect. It will handle line wrapping at a certain width, cutting off lines that don't fit the given rect, and handling text elision. Painter::draw_text now internally uses this. Future work here would be not laying out text twice (once actually preparing the lines to be rendered and once to get the bounding box), and possibly adding left elision if necessary. Additionally, this commit makes the Utf32View versions of Painter::draw_text convert to Utf8View internally. The intention is to completely remove those versions, but they're kept at the moment to keep the scope of this PR small.
2021-07-26LibGUI: Ignore the Enter event by defaultsin-ack
If this is not ignored by default, then one can move the mouse fast enough to skip hovering over a parent element and hover directly over the child, causing the parent to never receive an Enter event.
2021-07-26LibGUI: Only dispatch Leave if the now-hovered widget isn't a childsin-ack
Without this change, when the mouse starts hovering over a child widget, the parent would receive a Leave event despite the parent widget not losing mouse hover.
2021-07-26LibGUI: Add virtual handlers for WindowEntered and WindowLeft eventssin-ack
These can be useful if an application wants to react to the cursor entering the window at any point, rather than just on a widget.
2021-07-26LibGUI: Let GUI applications create an inspectable EventLoopsin-ack
GUI applications automatically have EventLoops created for them via GUI::Application; however before this commit it was not possible to make the application event loop inspectable. This exposes a third optional argument to GUI::Application which allows one to make the application event loop inspectable.
2021-07-26LibJS: Implement Unicode aware String.prototype.to{Upper,Lower}CaseTimothy Flynn
2021-07-26Meta: Add LibUnicode (and its tests) to LagomTimothy Flynn
This is primarily to allow using LibUnicode within LibJS and its REPL. Note: this seems to be the first time that a Lagom dependency requires generated source files. For this to work, some of Lagom's CMakeLists.txt commands needed to be re-organized to include the CMake files that fetch and parse UnicodeData.txt. The paths required to invoke the generator also differ depending on what is currently building (SerenityOS vs. Lagom as part of the Serenity build vs. a standalone Lagom build).
2021-07-26LibUnicode: Introduce a Unicode library for interacting with UCD filesTimothy Flynn
The Unicode standard publishes the Unicode Character Database (UCD) with information about every code point, such as each code point's upper case mapping. LibUnicode exists to download and parse UCD files at build time and to provide accessors to that data. As a start, LibUnicode includes upper- and lower-case code point converters.
2021-07-26Kernel: Add option to build with coverage instrumentation and KCOVPatrick Meyer
GCC and Clang allow us to inject a call to a function named __sanitizer_cov_trace_pc on every edge. This function has to be defined by us. By noting down the caller in that function we can trace the code we have encountered during execution. Such information is used by coverage guided fuzzers like AFL and LibFuzzer to determine if a new input resulted in a new code path. This makes fuzzing much more effective. Additionally this adds a basic KCOV implementation. KCOV is an API that allows user space to request the kernel to start collecting coverage information for a given user space thread. Furthermore KCOV then exposes the collected program counters to user space via a BlockDevice which can be mmaped from user space. This work is required to add effective support for fuzzing SerenityOS to the Syzkaller syscall fuzzer. :^) :^)
2021-07-26LibJS: Implement Temporal.PlainDate.fromIdan Horowitz
2021-07-26LibJS: Implement Temporal.PlainDate.compareIdan Horowitz
2021-07-26LibJS: Use narrower types in Temporal PlainDate/PlainDateTime/CalendarIdan Horowitz
These are bounds-checked during construction of PlainDate/PlainDateTime and as such theres no need to widen them in these internal AO calls.
2021-07-26LibWeb: Make functions and attributes in bindings writabledavidot
This allows overwriting of for example EventTarget.prototype.addEventListener as css3test does.
2021-07-26LibJS: Implement a naive String.prototype.localeComparedavidot
2021-07-26LibWeb: Fix that non-member calls to window gave the wrong this_valuedavidot
We treat all NativeFunctions as strict mode and thus window function which were called in a global context (i.e. `setTimeout(f, 0)`) got a null this_value. But we really need to treat all functions not defined by the ECMAScript specification as non-strict. In most cases this won't matter however since Window is also the global_object we have an extra bit of logic. To fix this more correctly we would need to track the strictness of NativeFunctions.
2021-07-26LibWeb: Make the custom CSSDeclaration methods only work on stringsdavidot
Otherwise it will try to convert it to a string later anyway. And as far as I'm aware there are no style properties with just a number or JavaScript symbol as name.
2021-07-26LibWeb: Add a CustomHasProperty trait to WrapperGeneratordavidot
We immediately use this in CSSStyleDeclaration to fix that "background" in element.style did not return true. This is the mechanism used in css3test.com for detecting support of features.
2021-07-26LibWeb: Convert WrapperGenerator and the generated code to east-constdavidot
2021-07-26KeyboardSettings: Prevent minimising the windowJamie Mansfield
This matches how the new MouseSettings application works.
2021-07-26KeyboardSettings: Prevent resizing the windowJamie Mansfield
This matches the other settings applications.
2021-07-26DisplaySettings: Prevent minimising the windowJamie Mansfield
This matches how the new MouseSettings application works.
2021-07-26LibC: Declare wide character type functions in wctype.hKenneth Myhra
Declares all wide character handling functions in wctype.h. All calls are forwarded to the corresponding character handling function in ctype.h. These functions are declared, but not implemented: - iswctype - wctype - towctrans - wctrans This should also resolve a build issue with the 'sed' port getting confused with iswprint being declared twice. Seems like it expected more functions from wctype.h and then had a backup strategy of adding its own wctype.h.
2021-07-26TextDocument: Fix indentation duplicating spacesVinicius
Auto indentation will consider only leading spaces before the cursor. Fixes #8973.
2021-07-26Taskbar: Unbreak application launchers in the start menuAndreas Kling
Application launcher actions reference their applications by an index into the global `g_apps` table. When skipping over settings apps, we still have to increment the current app identifier.
2021-07-26Settings: Tweak initial window sizeAndreas Kling
2021-07-26Taskbar: Show Settings app instead of Settings app categoryAndreas Kling
The Settings app is basically a viewer for the Settings app category anyway, so let's just direct users there instead of having the various settings apps in the start menu.
2021-07-25LibJS: Use more narrow types in Temporal ISODateTime structLinus Groh
2021-07-25LibJS: Implement Temporal.TimeZone.prototype.getOffsetNanosecondsFor()Linus Groh
2021-07-25LibJS: Handle PlainDateTime objects in GetTemporalCalendarWithISODefaultLinus Groh
2021-07-25LibJS: Handle PlainDateTime objects ToTemporalCalendarLinus Groh
2021-07-25LibJS: Store the %Array.prototype.values% intrinsic on the global objectLinus Groh
Also group the getter functions for all the additional intrinsics (not generated via macros), and initialize the members.
2021-07-26Settings: Add a very simple Settings applicationAndreas Kling
This is really just a launcher app that gathers all the installed apps in the "Settings" category and presents them in a single window.
2021-07-26LibDesktop: Add an optional "Description" field to .af filesAndreas Kling
2021-07-25WindowServer: Remove debug spam in MenuManager::refresh()Andreas Kling
2021-07-25LibC: Randomize malloc() block addresses on x86_64Andreas Kling
We have a lot of address space here, let's use it. :^)
2021-07-25Utilities: Support static assignment of the ARP tablebrapru
2021-07-25Kernel: Support ioctl SIOCSARP and SIOCDARPbrapru
Creates ioctl calls necessary to set/delete an entry from the ARP table
2021-07-25LibGUI: Put actions in order in MultiViewKarol Kosek
Not so important, but it really bothered me..
2021-07-25LibGUI: Add keyboard shortcuts for changing views in MultiViewKarol Kosek
2021-07-25LibGUI: Add keyboard shortcuts to FilePickerKarol Kosek
Taken from FileManager.
2021-07-25Kernel: Remove unused madvise(MADV_GET_VOLATILE)Andreas Kling
This was used to query the volatile state of a memory region, however nothing ever actually used it.
2021-07-25Kernel: Make purgeable memory a VMObject level concept (again)Andreas Kling
This patch changes the semantics of purgeable memory. - AnonymousVMObject now has a "purgeable" flag. It can only be set when constructing the object. (Previously, all anonymous memory was effectively purgeable.) - AnonymousVMObject now has a "volatile" flag. It covers the entire range of physical pages. (Previously, we tracked ranges of volatile pages, effectively making it a page-level concept.) - Non-volatile objects maintain a physical page reservation via the committed pages mechanism, to ensure full coverage for page faults. - When an object is made volatile, it relinquishes any unused committed pages immediately. If later made non-volatile again, we then attempt to make a new committed pages reservation. If this fails, we return ENOMEM to userspace. mmap() now creates purgeable objects if passed the MAP_PURGEABLE option together with MAP_ANONYMOUS. anon_create() memory is always purgeable.
2021-07-25LibGUI: Handle GUI::Window non-volatile backing store issues betterAndreas Kling
Instead of crashing when we can't make the back buffer non-volatile, we now transition the window into single-buffered mode instead (assuming it was originally in double-buffered mode.) This reduces GUI fidelity a bit (by potentially making windows flicker during repaint) but since it's only triggered in low-memory conditions, it seems like a reasonable thing to sacrifice in order for the system to carry on. This patch also stops us from allocating entirely new backing stores after the old ones were purged. If they were purged but reallocated just fine, there's no need to allocate new memory again. We already have fresh zero-filled pages in the existing bitmap at this point.
2021-07-25LibGfx: Make Gfx::Bitmap::set_nonvolatile() report allocation failureAndreas Kling
Making a bitmap non-volatile after being volatile may fail to allocate physical pages after the kernel stole the old pages in a purge. This is different from the pages being purged, but reallocated. In that case, they are simply replaced with zero-fill-on-demand pages as if they were freshly allocated.