summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-01-25Everywhere: Debug macros instead of constexpr.asynts
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
2021-01-25Everywhere: Name debug macros more consistently.asynts
Personally, I prefer the naming convention DEBUG_FOO over FOO_DEBUG, but the majority of the debug macros are already named in the latter naming convention, so I just enforce consistency here. This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/DEBUG_PATH/PATH_DEBUG/' {} \;
2021-01-25Everywhere: Remove unnecessary debug comments.asynts
It would be tempting to uncomment these statements, but that won't work with the new changes. This was done with the following commands: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/#define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/#define/ { toggle = 1 }' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/ #define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/ #define/ { toggle = 1 }' {} \;
2021-01-25Everywhere: Use CMake to generate AK/Debug.h.asynts
This was done with the help of several scripts, I dump them here to easily find them later: awk '/#ifdef/ { print "#cmakedefine01 "$2 }' AK/Debug.h.in for debug_macro in $(awk '/#ifdef/ { print $2 }' AK/Debug.h.in) do find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/#ifdef '$debug_macro'/#if '$debug_macro'/' {} \; done # Remember to remove WRAPPER_GERNERATOR_DEBUG from the list. awk '/#cmake/ { print "set("$2" ON)" }' AK/Debug.h.in
2021-01-25LibGfx:: Implement scale support for blit_with_opacity()Nico Weber
Now we no longer crash on mousewheel over Terminal while holding the super key. The terminal window doesn't yet correctly become transparent in hidpi mode (needs more investigation), but it works in LibGfxScaleDemo, so maybe that's a problem elsewhere. Also add a FIXME for a pre-existing bug.
2021-01-25Userland: Implement grep -v (invert-match)Andrew Kaster
This will make grep output every line that doesn't have any matches of the given regular expression
2021-01-25Userland: Use getline instead of Core::File::standard_input in grepAndrew Kaster
Core::IODevice (which Core::File inherits from) does not have a reasonable way to block for a line. grep was spinning on IODevice::read_line, passing endless empty strings to the matcher lambda. Use getline instead, which will at least block in the Kernel for characters to be available on stdin and only return full lines (or eof)
2021-01-24LibJS: Set length of TypedArray constructors to 3Linus Groh
https://tc39.es/ecma262/#sec-typedarray-constructors Each TypedArray constructor [...] has a "length" property whose value is 3.
2021-01-24SystemServer: Do not crash if device files are not presentJean-Baptiste Boric
2021-01-24WindowServer: Don't crash if unable to open input peripheralsJean-Baptiste Boric
Seems a bit extreme, other operating systems don't have their graphical environment crash if there is no keyboard or no mouse.
2021-01-24FontEditor: change order of baseline and mean line rowNico Weber
The mean line is above the baseline, so it makes sense if the UI elements are in the same order.
2021-01-24FontEditor: change "Mean Line:" label to "Mean line:"Nico Weber
Matches the case used in other labels in the app.
2021-01-24FontEditor: Fix typos in codeNico Weber
No behavior change.
2021-01-24FontEditor: Make left and right UI margins matchNico Weber
2021-01-24FontEditor: Remove "Save" and "Quit" buttonsNico Weber
We have both the normal menu items and keyboard shortcuts for these by now. No need to have always-visible buttons -- makes the app more consistent with the other apps, and makes it use up less vertical space.
2021-01-24Vim: More correct word jumping (#5090)Zac
Implemented move_to_beginning_of_next(), move_to_end_of_next(), move_to_beginning_of_previous() and move_to_end_of_previous() functions for more correct word jumping than the move_to_xxx_span() methods that were previously used.
2021-01-24HexEditor: FindCamisul
Added search submenu with options to find or find again. Find allows to search for ASII string or sequence of Hex value.
2021-01-24FileManager: Make DirectoryView open links in their real directoryDragonAlex98
Previously it was possible to open a link like /home/anon/Desktop/Home, leading to a folder with the same name. Now it correctly opens its real path, which is /home/anon FileManager: Use Core::File::real_path_for to get real path of links
2021-01-24pmap: Sort memory regions in outputAndreas Kling
This makes the program 100% nicer to use. :^)
2021-01-24LibJS: Add some assertions and tests for TypedArray limitationsAndreas Kling
2021-01-24LibJS: Throw exception on too large TypedArray construction requestAndreas Kling
We will now throw a RangeError in these cases: * new TypedArray with >= INT32_MAX entries * new TypedArray whose ArrayBuffer allocation size computation would cause a 32-bit unsigned overflow.
2021-01-24LibWeb: Disable resource cache for file:// URLsAndreas Kling
This makes the browser a bit less annoying when testing local files, since you no longer have to restart it for changes to take effect. Longer-term we should have a proper way to decide which resources are cacheable.
2021-01-24LibHTTP: Always read in the last chunkLuke
This was accidentally put behind a debug flag. Fixes #5080
2021-01-24LibJS: Remove redundant exception check from ClassExpression::execute()Linus Groh
as_object() cannot fail, leftover from ea55453.
2021-01-24LibJS: Check if class extends value has a valid prototypeLinus Groh
If we have a function as class extends value, we still cannot assume that it has a prototype property and that property has a function or null as its value - blindly calling to_object() on it may fail. Fixes #5075.
2021-01-23LibWeb: Add XHREventTarget and ProgressEvent constructors to WindowLuke
2021-01-23LibWeb: Add XHREventTarget and have XHR inherit from itLuke
2021-01-23LibWeb: Flesh out existing XHR methods a bit moreLuke
This makes open, send and setRequestHeader a bit more spec compliant and adds a bunch of FIXMEs for unimplemented parts.
2021-01-23LibWeb: Remove Range constructor/prototype caches from WindowObjectAndreas Kling
These are constructed on the code generator path now instead.
2021-01-23LibWeb: Generate JS bindings for Range from IDL :^)Andreas Kling
2021-01-23LibWeb: Make WrapperGenerator consider "unsigned" part of a typeAndreas Kling
2021-01-23Tests+UserlandEmulator: Demonstrate missing backtracesBen Wiederhake
2021-01-23UserspaceEmulator: Improve error message for typosBen Wiederhake
2021-01-23UserspaceEmulator: Implement chownBen Wiederhake
Now we can run 'ue chown anon ReadMe.md' :^)
2021-01-23SystemServer: Mask off the set-uid bit in SocketPermissionsAndreas Kling
2021-01-23LibC: Prevent remove from calling rmdir when unlink succeeds.Mart G
2021-01-23LibWeb: Generate JS bindings for XMLHttpRequest from IDL :^)Andreas Kling
Remove the hand-written XHR bindings in favor of generated ones.
2021-01-23LibWeb: Add very basic support for IDL constantsAndreas Kling
You can now put constants on an IDL interface and they will pop up on both the constructor and prototype objects.
2021-01-23LibWeb: Move XMLHttpRequest to separate XHR directoryAndreas Kling
In keeping with the one-directory-per-web-spec layout, let's move XHR into its own clubhouse.
2021-01-23Run: Pledge "thread"Andreas Kling
This is needed for the thumbnail generation thread used by FilePicker. Fixes #5015.
2021-01-23sleep: Support fractional sleep lengthsAndreas Kling
2021-01-23HackStudio: Handle failed fork() in TerminalWrapper a bit betterAndreas Kling
2021-01-23WindowServer: Make dragging maximized windows up no-opBen Wiederhake
That's what that piece of logic is probably supposed to be doing. Let's help it acheive that purpose! Apparently the top of the desktop (i.e. the menubar) was forgotten, so consider it part of the deadzone.
2021-01-23WindowServer: Prevent moving a window to inaccessible regionBen Wiederhake
This is based on a comment by @tomuta on #4644, and should prevent all future instances of bugs like #4644. Disadvantage: The current implementation may generate a lot of WM_WindowRectChanged events for a listener while bouncing occurs. Feel free to improve this.
2021-01-23WindowServer: Fix many subtle bugs in tiling/maximizingBen Wiederhake
- Unmaximization/untiling had nearly but not quite code duplication; this patch replaces the actual "regrabbing" logic with Rect::set_size_around. - When undoing maximization/untiling, it used to be possible to to grab a window "outside" of its frame, and thus drag it off the screen. This is no longer possible. Fixes #4644. - As a side effect, when untiling from the bottom/left/right, the regrab is now a much smoother experience. - Setting the resize aspect ratio while being tiled now untiles and umaximizes the window, as these things are incompatible. Fixes an undocumented bug (steps to reproduce: maximize, then set aspect ratio). - When unmaximizing, spurious WindowLeft events were sent, because that path didn't set hovered_window. Fixes an undocumented bug. Since these things are interwoven, this is all a single commit.
2021-01-23LibGfx: Implement Rect resizing around a fixed pointBen Wiederhake
2021-01-23WindowServer: Remember the correct untiled rectBen Wiederhake
What a silly logic bug! :)
2021-01-23WindowServer: Normalize preferred rect before applyingBen Wiederhake
Previously, SetWindowRect and SetWindowRect could supply basically arbitrary x and y coordinates. This could happen either due to a malicious or malfunctioning program, or even due to the auto-centering feature. This patch also moves the 'normalization' code out of ClientConnection to Window, where it belongs better. Fixes #4135. Fixes #5052.
2021-01-23WindowServer: Don't crash on wallpapers smaller than the desktop with fill ↵Nico Weber
mode 'simple' blit() calls draw_scaled_bitmap() behind the scenes in scaled contexts, and that doesn't like src_rect to be outside of the source bitmap's bounds. Implicitly clip with the source rect, like the non-scaled codepath already does. Fixes #5017 even more.
2021-01-23LibGfx: Make draw_tiled_bitmap() in scaled contexts actually workNico Weber