summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-05-13LibGL: Use integer math in rasterizer coverage calculationsStephan Unverwerth
This makes the software rasterizer use integers for triangle coverage calculations. The previously used floating point algorithm was not precise enough in certain situations and showed gaps between triangles. This is not yet subpixel accurate.
2021-05-13LibGfx: Add Vector2 classStephan Unverwerth
2021-05-13LibGfx: Add component wise * and / operators to Vector3 and Vector4Stephan Unverwerth
2021-05-13FileManager: Set minimum folder pane widthJelle Raaijmakers
2021-05-13LibGUI/Splitter: Support setting minimum resizee sizeJelle Raaijmakers
2021-05-12KeyboardMapper: Embed icon in executableLinus Groh
By using serenity_app() instead of serenity_bin() in the CMakeLists.txt, we can embed an icon as usual.
2021-05-12KeyboardMapper: Stylize title as "Keyboard Mapper"Linus Groh
We already do this in the about dialog and across the system in general.
2021-05-12KeyboardMapper: Remove two useless commentsLinus Groh
2021-05-122048: Add separator before quit menu actionLinus Groh
2021-05-12WindowServer: Re-render window frame when setting unresponsive statusLinus Groh
Otherwise "(not responding)" would not appear in the window title until the window is moved/resized.
2021-05-12LibCore: Add unit to Core::Timer interval argumentssin-ack
This patch adds the _ms suffix to the interval arguments in Core::Timer, to make it a little clearer what the interval unit is to others.
2021-05-12Userland+LibCore: Update FileWatcher + its users for InodeWatcher 2.0sin-ack
With the new InodeWatcher API, the old style of creating a watcher per inode will no longer work. Therefore the FileWatcher API has been updated to support multiple watches, and its users have also been refactored to the new style. At the moment, all operations done on a (Blocking)FileWatcher return Result objects, however, this may be changed in the future if it becomes too obnoxious. :^) Co-authored-by: Gunnar Beutner <gunnar@beutner.name>
2021-05-12FileManager: Reorganize main toolbar a little bitAndreas Kling
Re-group things so they match the menus better.
2021-05-12FileManager: Reorganize menus a little bitAndreas Kling
Move the common editing actions (cut/copy/paste/select-all) into a new "Edit" menu. And move the "Open Terminal Here" action to the "Go" menu.
2021-05-12LibGUI: Never resolve Key_Invalid to a GUI::ActionAndreas Kling
Fixes #7047.
2021-05-12LibGUI: Move action-from-key-event code to a separate functionAndreas Kling
The logic that figures out which (if any) action should be activated by a keydown event was getting a bit unwieldy. This patch moves it to a separate helper function.
2021-05-12Everywhere: Add Alt shortcuts to remaining top-level menusLinus Groh
Not sure why some menus did have one and others didn't, even in the same application - now they all do. :^) I added character shortcuts to some menu actions as well.
2021-05-12Browser: Use URL for window title if tab title is emptyLinus Groh
Seeing " - Browser" for loading pages is annoying, so let's do something more sensible instead for empty tab document titles: "<URL> - Browser". Also consolidate the two places where this code is used into a lambda to make any future changes easier.
2021-05-12SystemMonitor: Spell process window title as "System Monitor"Linus Groh
This is what we use for the main window and elsewhere.
2021-05-12Everywhere: Rename app_menu to file_menu, continuedLinus Groh
These were missed in 4b0098e.
2021-05-12Kernel+LibC: Make get_dir_entries syscall retriableMart G
The get_dir_entries syscall failed if the serialized form of all the directory entries together was too large to fit in its temporary buffer. Now the kernel uses a fixed size buffer, that is flushed to an output buffer when it is full. If this flushing operation fails because there is not enough space available, the syscall will return -EINVAL. That error code is then used in userspace as a signal to allocate a larger buffer and retry the syscall.
2021-05-12LibCore: Don't use has_flag() with multiple flags (OpenMode::ReadWrite)Ali Mohammad Pur
Fixes boot, regressed in a91a49337c5992d64b30f493eea1eb492792b667.
2021-05-12LibCore+Everywhere: Move SeekMode out of IODeviceAli Mohammad Pur
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-05-12LibWeb: Position the ListItemMarkers according to their widthTobias Christiansen
Previously they were positioned with a fixed offset. However this lead to wider markers with more than one character to collide with the element itself. Now the ListItemMarkerBox generates and stores the appropriate String in its constructor and sets its own width according to that. The ListItemBox then lays out the Marker taking this width into account. This also made the painting a lot easier since we don't generate the needed Strings every time we repaint, just once.
2021-05-12LibWeb: Remove unused alphabet constants from ListItemMarkerBoxTobias Christiansen
Why exactly the linter didn't whine about this is a mystery. These constants aren't needed anymore since the functionality moved to AK/String a while ago.
2021-05-12LibWeb: Move clearing boxes below preceding floating boxesTimothy Flynn
When computing the y-position of a clearing element, use the height of the border box of the associated floating elements. This also extracts this block of code to a helper lambda since it is used twice.
2021-05-12RequestServer: Only attempt to flush() on a timerAli Mohammad Pur
...instead of doing so immediately. This makes RequestServer not spin as much when its client isn't fast enough to empty the download pipe. It also has the nice benefit of allowing multiple downloads to happen at the same time without one blocking the other too much.
2021-05-12LibTLS: Always send the signature_algorithms extensionAli Mohammad Pur
At some point since Sep 2018, OpenSSL added a ~~bug~~ feature that makes the default set of signature algorithms defined in TLSv1.2 unusable without reducing what they call the "security level", which caused communication with servers using more recent versions of openssl to fail with "internal error". This commit makes LibTLS always send its supported sigalgs, making the server not default to the insecure defaults, and thus enabling us to talk to such servers.
2021-05-11LibJS: Make super() in catch block workLinus Groh
The TryStatement handler execution creates a new LexicalEnvironment without a current function set, which we were not accounting for when trying to get the super constructor while executing a SuperExpression. This makes it work but isn't pretty - this needs some refactoring to be close to the spec for that to happen. Fixes #7045.
2021-05-11LibJS: Bring back runtime validation of RegExp flagsLinus Groh
This is a partial revert of commit 60064e2, which removed the validation of RegExp flags during runtime and expected the parser to do that exclusively - however this was not taking into account the RegExp() constructor, which was subsequently crashing on invalid flags. Also adds test for these constructor error cases, which were obviously missing before. Fixes #7042.
2021-05-11LibJS/Tests: Add details for toThrowWithMessage() expectation errorLinus Groh
2021-05-11LibWeb: Add a maximum redirects limit to FrameLoaderIdan Horowitz
This prevents the browser from crashing when trying to load an infinite redirects loop. The chosen limit is based on the fetch specification: "If request's redirect count is twenty, return a network error."
2021-05-11LibWeb: Implement :nth-last-child pseudo-classmiere43
2021-05-11LibJS: Use u64 instead of u32 in NumberPrototype::to_stringLuke
Update to #7033 Partial fix for #7034 (just ups the range to about 2 ** 54 before losing precision)
2021-05-11LibJS: Make number parts unsigned in NumberPrototype::to_stringLuke
Fixes #3931
2021-05-11LibLine+Shell: Add dirty history flag and use itsin-ack
This patch adds a new flag called history_dirty to Line::Editor that is set when history is added to but written. Applications can leverage this flag to write history only when it changes. This patch adds an example usage of this functionality to Shell, which will now only save the history when it is dirty.
2021-05-11LibWeb: Paint an element's foreground before painting its childrenTimothy Flynn
The current implementation is missing the emphasized text of the following rule in the painting order spec: 7. Otherwise: *first for the element*, then for all its in-flow, non-positioned, block-level descendants in tree order... This ensures the foreground is painted for the current element before descending into its children.
2021-05-11Magnifier: Make window resizableLinus Groh
Instead of having the window non-resizable, it now defaults to a frame size of 200 x 200 pixels but is user-resizable. The shown screenshot updates its size accordingly. :^) Sometimes we might need a larger view, or a non-square shape.
2021-05-11LibWeb: Make Element::tag_name return the HTML uppercased qualified nameLuke
I forgot to change tag_name when this was added. Also makes html_uppercased_qualified_name return a const reference.
2021-05-11LibWeb: Expose Element.{prefix,localName}Luke
2021-05-11GLTeapot: Use glGenLists() a bit to demonstrate that it worksAli Mohammad Pur
2021-05-11LibGL: Implement glGenLists and a few friendsAli Mohammad Pur
This commit implements glGenLists(), glNewList(), glDeleteLists(), and glCallList(). The 'compiled' records are implemented as a vector of member function pointers and tuples containing their arguments, and a mechanism is implemented to allow the recorded calls to copy-capture values from the time of the call; this is currently only used with glLoadMatrix.
2021-05-112048: Added Redo SupportUmar Haroon
2021-05-11Shell: Add an option to autosave history every N msAli Mohammad Pur
...and set it to 10 seconds by default.
2021-05-11Userland: Implement a magnifier appValtteri Koskivuori
This utility is useful for making sure those UI elements are pixel perfect. A simple 2x/4x magnification around the mouse cursor, shown in a window.
2021-05-11WindowServer: Add Optional<Gfx::IntRect> argument to get_screen_bitmap()Valtteri Koskivuori
This way, we can optionally specify a region of the display to capture. Defaults to entire screen if no rectangle is given.
2021-05-11LibGfx: Implement Bitmap::cropped()Valtteri Koskivuori
This cuts a region of a bitmap specified by the provided Gfx::IntRect and returns it. Areas outside of the bounds of the original bitmap are filled in with black.
2021-05-11strace: Write output to stderr instead of stdout (#7016)SViN24
Fixes #7014.
2021-05-10LibELF: Propagate ELF image validation errors to the callerGunnar Beutner
With this fixed dlopen() no longer crashes when given an invalid ELF image and instead returns an error code that can be retrieved with dlerror(). Fixes #6995.