summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-06-24LibVT: Only resize the line after all rewrapping is doneAli Mohammad Pur
Otherwise we would end up inserting empty cells into the wrapped lines. Fixes #8227.
2021-06-24LibCore+AK: Use proper atomics in `Singleton`Daniel Bertalan
2021-06-24LibGfx: Don't `constexpr` functions returning StringsDaniel Bertalan
Since strings don't have a constexpr constructor, these won't have any effect anyways. Furthermore, this is explicitly disallowed by the standard, and makes Clang tools freak out.
2021-06-24Userland: Disambiguate dependent typesDaniel Bertalan
Clang produced an error on these pieces of code without the `typename` keyword.
2021-06-24Everywhere: Use nothrow new with `adopt_{ref,own}_if_nonnull`Daniel Bertalan
This commit converts naked `new`s to `AK::try_make` and `AK::try_create` wherever possible. If the called constructor is private, this can not be done, so we instead now use the standard-defined and compiler-agnostic `new (nothrow)`.
2021-06-24Utilities: Validate user with Core::Account in userdelbrapru
Previously the remove home directory option never actually removed the user's home directory because it was not properly unveiled. By validating the user with Core::Account, we can identify the user's home directory earlier in the program and unveil as necessary. Additionally, by identifying if the user does not exist much earlier in the program, this elimates depending on getpwent to validate the user and creating unneccessary temp files.
2021-06-24LibJS: Fix clang-tidy warnings in AST.hAndreas Kling
- Add/remove `move()` as suggested. - Add missing `explicit` on single-parameter constructors.
2021-06-24LibJS: Don't use m_ prefix for argument name in ScriptFunctionAndreas Kling
2021-06-24LibJS: Remove unused DeclarativeEnvironmentRecord::type()Andreas Kling
Nothing was using this, and we now have separate classes for the different types of environment records instead.
2021-06-24LibJS: Add ObjectEnvironmentRecord.[[IsWithEnvironment]] fieldAndreas Kling
This is true for environments created by `with` statements, and false for other (global) object environments. Also add the WithBaseObject abstract operation while we're here.
2021-06-24Games: Add SpiderJamie Mansfield
Scoring is designed to mimic Microsoft's implementation - starting at 500, decreasing by 1 every move, and increasing by 100 for every full stack. Fixes GH-5319.
2021-06-24LibCards: Support non-alternating colour patience gamesJamie Mansfield
This introduces a new MovementType concept to LibCards, starting the process to allow other patience games to be implemented using it - that differ more substantially from Klondike in logic. This is currently used for two purposes: 1. to verify that the 'grabbed' stack of cards is valid* (sequential and correct colours) and 2. to allow 'grabbed' stacks to be pushed onto same-colour, either-colour, or alternating-colour stacks * Klondike doesn't need this logic, as per how the game works any 'grabbed' selection is guaranteed to be valid.
2021-06-24LibSymbolication: Fix incorrect argument type for symbolicate()Gunnar Beutner
2021-06-24Profiler: Use u32 when constructing InstructionDataGunnar Beutner
When constructing values of the InstructionData type we assume that the event_count field is a size_t while it actually is a u32. On x86_64 this fails because those are different types.
2021-06-24Userland: Add more TODO()s for arch-specific codeGunnar Beutner
This enables building more of the userspace applications for x86_64.
2021-06-24Solitaire: Maybe fix rare crash from completing a game with TAB (#8217)Sam Atkins
The crash happens very rarely and is hard to reproduce so it is hard to know for certain, but I am confident this fixes it. I previously delayed the start of the game-over animation by one frame, but neglected to check m_start_game_over_animation_next_frame wasn't set. This means multiple calls to start_game_over_animation() on the same frame (or rather, before the first timer_event) would each call Object::start_timer(). Now that we do check the flag, that should no longer be possible. Fixes #8122.
2021-06-24Userland: Remove dummy IPC methodsGunnar Beutner
They're not used anywhere and are unnecessary boilerplate code. So let's remove them and update IPCCompiler to allow for empty endpoint declarations.
2021-06-24 LibELF: Fix missing includeHendiadyoin1
A few files are expecting that someone brings PAGE_SIZE from possibly the Kernel with them
2021-06-24LibSQL: Make lexer and parser more standard SQL compliantJan de Visser
SQL was standardized before there was consensus on sane language syntax constructs had evolved. The language is mostly case-insensitive, with unquoted text converted to upper case. Identifiers can include lower case characters and other 'special' characters by enclosing the identifier with double quotes. A double quote is escaped by doubling it. Likewise, a single quote in a literal string is escaped by doubling it. All this means that the strategy used in the lexer, where a token's value is a StringView 'window' on the source string, does not work, because the value needs to be massaged before being handed to the parser. Therefore a token now has a String containing its value. Given the limited lifetime of a token, this is acceptable overhead. Not doing this means that for example quote removal and double quote escaping would need to be done in the parser or in AST node construction, which would spread lexing basically all over the place. Which would be suboptimal. There was some impact on the sql utility and SyntaxHighlighter component which was addressed by storing the token's end position together with the start position in order to properly highlight it. Finally, reviewing the tests for parsing numeric literals revealed an inconsistency in which tokens we accept or reject: `1a` is accepted but `1e` is rejected. Related to this is the fate of `0x`. Added a FIXME reminding us to address this.
2021-06-24LibSQL: Move Lexer and Parser machinery to AST directoryJan de Visser
The SQL engine is expected to be a fairly sizeable piece of software. Therefore we're starting to restructure the codebase for growth.
2021-06-23HackStudio: Make TODO entries clickableFederico Guerinoni
Now you can click a TODO entry to set focus on that position of that file.
2021-06-23HackStudio: Add TODO entries widgetFederico Guerinoni
2021-06-23LanguageServers: Add function to collect TODO entries in a documentFederico Guerinoni
2021-06-23LibCpp: Add function for retrieving TODO comments from the parserFederico Guerinoni
Now `get_todo_entries` collects all TODO found within a comment statement.
2021-06-23LibVT: Rewrap the terminal history along with the normal bufferAli Mohammad Pur
2021-06-23LibLine: Recalculate the origin on resizeAli Mohammad Pur
2021-06-23LibVT+Terminal: Implement line wrappingAli Mohammad Pur
This commit implements line wrapping in the terminal, and tries its best to move the cursor to the "correct" position.
2021-06-23LibVT: Keep track of the 'true' line endingsAli Mohammad Pur
2021-06-23LibTextCodec: Add Turkish (aka ISO-8859-9, Windows-1254) encodingAatos Majava
2021-06-23LibVT: Don't crash when clicking outside of the terminal's buffer areaGunnar Beutner
When resizing a terminal window the number of columns may change. Previously we assumed that this also affects lines which were in the terminal's buffer while that is not necessarily true.
2021-06-23LibJS: Make AggregateError inherit from ErrorLinus Groh
This is our way of implementing the [[ErrorData]] internal slot, which is being used in Object.prototype.toString().
2021-06-23LibJS: Fix AggregateError's class_name()Linus Groh
2021-06-23LibJS: Add spec links to a bunch of the environment record methodsAndreas Kling
2021-06-23LibJS: Remove no-longer-needed environment record shapeAndreas Kling
We had a cached shape for environment records to make instantiating them fast. Now that environment records don't inherit from JS::Object, we can just get rid of this. :^)
2021-06-23LibJS: Make EnvironmentRecord inherit directly from CellAndreas Kling
Previously, EnvironmentRecord was a JS::Object. This was done because GlobalObject inherited from EnvironmentRecord. Now that this is no longer the case, we can simplify things by making EnvironmentRecord inherit from Cell directly. This also removes the need for environment records to have a shape, which was awkward. This will be removed in the following patch.
2021-06-23HexEditor: Change name for unsaved files to 'Untitled'Gunnar Beutner
2021-06-23HexEditor: Prompt the user to save changes when opening a fileGunnar Beutner
2021-06-23LibJS: Add EnvironmentRecord::global_object()Andreas Kling
Our environment records are currently weird in that they inherit from Object, but don't have a connection to the global object. I'd like to remove this inheritance, and the first step is giving them their own pointer to the global object.
2021-06-23LibJS: Start implementing spec-compliant variable bindingsAndreas Kling
This patch adds the concept of variable bindings to the various environment record classes. The bindings are not yet hooked up to anything, this is just fleshing out all the operations. Most of this is following the spec exactly, but in a few cases we are missing the requisite abstract operations to do the exact right thing. I've added FIXME's in those cases where I noticed it.
2021-06-23LibJS: Correct behaviour of direct vs. indirect evalAnonymous
eval only has direct access to the local scope when accessed through the name eval. This includes locals named eval, because of course it does.
2021-06-23UserspaceEmulator: Add a simple debugging ConsoleHendiadyoin1
For now this only allows us to single-step through execution and inspect part of the execution environment for debugging This also allows to run to function return and sending signals to the VM This changes the behavior of SIGINT for UE to pause execution and then terminate if already paused A way of setting a watchpoint for a function would be a good addition in the future, the scaffold for this is already present, we only need to figure out a way to find the address of a function On a side note I have changed all occurences of west-const to east const
2021-06-23DisplaySettings: Revert changes unless confirmedXavier Defrang
2021-06-22LibGfx: Fix drawing rounded corners when using display scalingGunnar Beutner
2021-06-22ChessEngine: don't store board in non-leaf nodes in MCTSPeter Elliott
Also make parameters static so they aren't in every node of the tree this saves a substantial amount of memory.
2021-06-22LibChess: Compact the Defenitions of various chess related typesPeter Elliott
before: sizeof(Board)=344, sizeof(Move)=36, sizeof(Piece)=4, sizeof(Square)=8 after: sizeof(Board)=108, sizeof(Move)=9, sizeof(Piece)=1, sizeof(Square)=2
2021-06-22LibChess: Only save hash of board state for repetition checkingPeter Elliott
This more than doubles the number of nodes that MCTS can search for a given time limit, and greatly reduces memory usage.
2021-06-22FlappyBug: Standardize on "high score" rather than "highscore"Timothy Flynn
"High score" should be two words, and this matches other games in the system.
2021-06-22FlappyBug: Persist high score to diskTimothy Flynn
Previously, the high score was only in-memory, so only persisted for as long as the FlappyBug window was open.
2021-06-22FlappyBug: Convert the main game widget to a GUI::FrameTimothy Flynn
2021-06-22TextEditor: Don't open files when the user cancelled saving changesGunnar Beutner
Steps to reproduce: 1. Start TextEditor and make some changes to the document. 2. Try to open an existing file. 3. When prompted choose to save the changes to the existing document. 4. Close the file picker by clicking 'Cancel'. 5. Note how the file was opened anyway and your changes were lost. Same applies to the 'New File' action.