summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-01-04Userland: Resolve unused-but-set-varaible warningsAndrew Kaster
These are almost always bugs, so enable globally. Remove unused counter variables in SystemMonitor and disk_benchmark.
2022-01-04Userland: Resolve tautological-constant-out-of-range-compare warningsAndrew Kaster
Stop comparing platform-specific sized integer types to max() values of other interger types. Enable the warning everywhere.
2022-01-04Userland: Locally suppress -Wc99-designator and re-enable globallyAndrew Kaster
There's only two places where we're using the C99 feature of array designated initalizers. This feature seemingly wasn't included with C++20 designated initalizers for classes and structs. The only two places we were using this feature are suitably old and isolated that it makes sense to just suppress the warning at the usage sites while discouraging future array designated intializers in new code.
2022-01-04Userland: Resolve -Woverloaded-virtual in LibGUI and SoundPlayerAndrew Kaster
Enable the warning project-wide. It catches when a non-virtual method creates an overload set with a virtual method. This might cause surprising overload resolution depending on how the method is invoked.
2022-01-04Userland: Fail Core::find_executable_in_path on empty inputsAndrew Kaster
Before this patch, `which ""` or `type ""` would say that the empty string is `/usr/local/bin/`. Convert callers to consistently call is_empty() on the returned string while we're at it, to support eventually removing the is_null() String state in the future.
2022-01-04wc: Port to LibMainmjz19910
2022-01-04which: Port to LibMainmjz19910
2022-01-04wsctl: Port to LibMainmjz19910
2022-01-04xargs: Port to LibMainmjz19910
2022-01-04yes: Port to LibMainmjz19910
2022-01-04uname: Port to LibMainmjz19910
2022-01-04LibCore: Add an ErrorOr wrapper for unamemjz19910
2022-01-04uniq: Port to LibMainmjz19910
2022-01-04PixelPaint: Make paste action create new image if no editor is openedMaciej
This matches GIMP behaviour.
2022-01-04PixelPaint: Add a way to quickly create an image from clipboardMaciej
Ctrl+Shift+V, like in GIMP.
2022-01-04LibC: Include `strings.h` in `string.h`Jesse Buhagiar
Certain C Libraries have (unfortunately) included strings.h as a part of string.h, which violates the POSIX spec for that specific header. Some applications rely on this being the case, so let's include it in our string.h
2022-01-04WindowServer: Fix loading MainScreen setting from configurationTom
2022-01-04tar: Implement -C optioncircl
This allows specifying which directory to extract to or create from. I would have used the *at variants of the functions, but some weren't implemented yet.
2022-01-03LibJS: Propagate errors from TypedArray for_each_item{,_from_last} callsLinus Groh
Another mistake uncovered by moving away from manual exception checks and relying on correct completion types instead :^)
2022-01-03LibJS: Add a ton of spec comments to AST.cppLinus Groh
2022-01-03LibJS: Update AST to use completions :^)Linus Groh
This is another major milestone on our journey towards removing global VM exception state :^) Does pretty much exactly what it says on the tin: updating ASTNode::execute() to return a Completion instead of a plain value. This will *also* allow us to eventually remove the non-standard unwinding mechanism and purely rely on the various completion types.
2022-01-03LibJS: Don't assume non-empty [[Value]] in Completion TRY() helpersLinus Groh
2022-01-03LibJS: Remove redundant abrupt completion checkLinus Groh
A throw completion is always an abrupt completion, no need to check :^)
2022-01-03LibJS: Return Optional<T> from Completion::{value,target}(), not TLinus Groh
In the end this is a nicer API than having separate has_{value,target}() and having to check those first, and then making another Optional from the unwrapped value: completion.has_value() ? completion.value() : Optional<Value> {} // ^^^^^^^^^^^^^^^^^^ // Implicit creation of non-empty Optional<Value> This way we need to unwrap the optional ourselves, but can easily pass it to something else as well. This is in anticipation of the AST using completions :^)
2022-01-03Spreadsheet: Background fill color after reaching vertical endmartinfalisse
When selecting a cell in the spreadsheet that was added automatically as per the InfinitelyScrollableTableView implementation, the background color is now filled correctly. Previously, when navigating horizontally in a spreadsheet, after a certain point the cells would not have the same background fill color as the user would have experienced in the previous column ranges (A-Z).
2022-01-03CrashReporter: Move progressbar into main windowSamuel Bowman
Previously we would create a temporary progress window to show a progressbar while the coredump is processed. Since we're only waiting on backtraces and CPU register states, we can move the progressbar into the main window and show everything else immediately while the slow parts are generated in a BackgroundAction.
2022-01-03Applets/ResourceGraph: Propagate errors in JSON decodingcreator1creeper1
2022-01-03Applets/Network: Propagate errors using custom try_createcreator1creeper1
We now move-construct the bitmaps into the NetworkWidget.
2022-01-03Applets/Network: Propagate errors with try_set_main_widgetcreator1creeper1
Use try_set_main_widget instead of set_main_widget.
2022-01-03Applets/Audio: Propagate errors using custom try_createcreator1creeper1
We now move-construct the bitmaps into the AudioWidget.
2022-01-03Applets/Audio: Propagate errors with try_set_main_widgetcreator1creeper1
Use try_set_main_widget instead of set_main_widget.
2022-01-03WindowServer: Tighten pledged promisesbugreport0
2022-01-03Taskbar: Tighten pledged promises, remove incorrect commentbugreport0
2022-01-03RequestServer: Tighten pledged promisesbugreport0
2022-01-03ChessEngine: Remove unused 'rpath' promisebugreport0
2022-01-03LibGUI: Bring entire cell into view after auto scroll into viewmartinfalisse
On account of row and column headers, when a user navigates to a cell (for example in the spreadsheet application) that is outside of the view, the cell is not properly aligned and so is partially cut-off. This fix takes into account the row and column headers when calculating the Rect to pass to the scroll_into_view function.
2022-01-03WebServer: Make ErrorOr unwrapping more idiomaticMaciej
This still not propagates errors properly, but is at least (more) consistent with the codebase.
2022-01-03LibJS: Implement the Extend TimeZoneName Option ProposalTimothy Flynn
This is a stage 4 proposal that was recently merged into the main ECMA-402 spec. See: https://github.com/tc39/ecma402/commit/1ba5ee7
2022-01-03LibUnicode: Add minimal support for generic & offset-based time zonesTimothy Flynn
ECMA-402 now supports short-offset, long-offset, short-generic, and long-generic time zone name formatting. For example, in the en-US locale the America/Eastern time zone would be formatted as: short-offset: GMT-5 long-offset: GMT-05:00 short-generic: ET long-generic: Eastern Time We currently only support the UTC time zone, however. Therefore, this very minimal implementation does not consider GMT offset or generic display names. Instead, the CLDR defines specific strings for UTC.
2022-01-02Spider: Redraw completely when drawing cardsJamie Mansfield
Spider was only updating the new bounding box area after drawing cards from the deck - leaving behind a sliver of the old deck. This was a regression, as the game previously used the old bounding box, introduced by GH-11153.
2022-01-02SoundPlayer: Don't enqueue samples depending on the GUI loopkleines Filmröllchen
Previously, SoundPlayer would read and enqueue samples in the GUI loop (through a Timer). Apart from general problems with doing audio on the GUI thread, this is particularly bad as the audio would lag or drop out when the GUI lags (e.g. window resizes and moves, changing the visualizer). As Piano does, now SoundPlayer enqueues more audio once the audio server signals that a buffer has finished playing. The GUI- dependent decoding is still kept as a "backup" and to start the entire cycle, but it's not solely depended on. A queue of buffer IDs is used to keep track of playing buffers and how many there are. The buffer overhead, i.e. how many buffers "too many" currently exist, is currently set to its absolute minimum of 2.
2022-01-02LibAudio: Remove frame-wise copys from FlacLoaderkleines Filmröllchen
Previously, FlacLoader would read the data for each frame into a separate vector, which are then combined via extend() in the end. This incurs an avoidable copy per frame. By having the next_frame() function write into a given Span, there's only one vector allocated per call to get_more_samples(). This increases performance by at least 100% realtime, as measured by abench, from about 1200%-1300% to (usually) 1400% on complex test files.
2022-01-02LibAudio: Alow creating a Buffer from a FixedArraykleines Filmröllchen
A FixedArray, due to its non-allocation guarantee, is great for audio programming, so it's natural to have it interface with Buffer.
2022-01-02SoundPlayer: Remove resolved FIXMEkleines Filmröllchen
I already resolved this some time ago but apparently forgot about it :^)
2022-01-02LibCore: Mark 'Read options' parameter [[maybe_unused]] in Account.cppLinus Groh
This broke the macOS clang CI build.
2022-01-02LibJS: Fix two typos in comments in AST.cppLinus Groh
2022-01-02 LibJS: Let Completion::update_empty() take an Optional<Value>Linus Groh
It also needs to be able to take what the spec calls 'empty', which is an Optional<Value> in this case (*not* an empty JS::Value). The common use case is updating a completion with another completion, that may also have an empty [[Value]] slot.
2022-01-02LibJS: Move provided Optional<Value> argument in normal_completion()Linus Groh
2022-01-02LibJS: Update ToRawPrecision / ToRawFixed AO spec commentsTimothy Flynn
This is a normative change in the Intl spec: https://github.com/tc39/ecma402/commit/f0f66cf There are two main changes here: 1. Converting BigInt/Number objects to mathematical values. 2. A change in how ToRawPrecision computes its exponent and significant digits. For (1), we do not yet support BigInt number formatting, thus already have coerced Number objects to a double. When BigInt is supported, the number passed into these methods will likely still be a Value, thus can be coereced then. For (2), our implementation already returns the expected edge-case results pointed out on the spec PR.
2022-01-02LibJS: Explicitly handle postive/negative infinity in Intl.NumberFormatTimothy Flynn
This is a normative change in the Intl spec: https://github.com/tc39/ecma402/commit/f0f66cf Our implementation is unaffected by this change. LibUnicode pre-computes positive, negative, and signless format patterns, so we already format negative infinity correctly. Also, the CLDR does not contain specific locale-dependent strings for negative infinity anyways.