summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
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.
2021-05-10LibELF: Don't use assignments in return statementsGunnar Beutner
Sure, this saves a couple of characters, but it's probably not the best style.
2021-05-10Userland: Implement paste --watch modeSergey Bugaev
You can now watch the clipboard for changes and run a command each time the clipboard contents change like this: $ paste --watch some command here The command will be spawned each time the clipboard contents change. It can read the clipboard contents from its stdin, and CLIPBOARD_STATE environment variable will be set to "data" if there is data to be read, or to "nil"/"clear" if the clipboard has been cleared.
2021-05-10Userland: Implement copy --clearSergey Bugaev
You can now clear the clipboard using copy(1) like this: $ copy --clear
2021-05-10LibGUI: Add Clipboard::clear()Sergey Bugaev
Does exactly what it says on the tin :^)
2021-05-10LibC: Partially implement pthread_setcancel{state,type}()Gunnar Beutner
With those partially implemented I can start to clone the SerenityOS git repository via HTTPS. The download still fails half-way through because SSL_read returns an error for reasons I haven't investigated yet.
2021-05-10LookupServer: Do cache eviction when mDNS cache flush bit is setGunnar Beutner
2021-05-10LookupServer: Track the receive timestamp for DNS answersGunnar Beutner
2021-05-10LookupServer: Correct some flags for DNS packetsGunnar Beutner
This corrects some of the flags in the DNS packets to match what I saw on my local network.
2021-05-10LookupServer: Handle DNS record types TXT, AAAA, SRV and CNAMEGunnar Beutner
They're not being used elsewhere at the moment but this gets rid of the debug message for incoming mDNS response packets.
2021-05-10LookupServer: Turn #defines into enum classes and add formatterGunnar Beutner
2021-05-10LookupServer: Split mDNS flags into separate fieldGunnar Beutner
2021-05-10HackStudio: Tweak Files/Classes tab viewsAndreas Kling
Put a bit of padding around the views, and retitle the "ClassView" tab to simply "Classes".
2021-05-10HackStudio: Use is<GitWidget>() instead of comparing class_name()Andreas Kling