summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
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.
2021-06-22Playground: Prompt to save changes after the user picked a file to openGunnar Beutner
There's no point in saving the file - and potentially having to ask the user for a file name - if the user abandons the 'Open' action by clicking 'Cancel' in the file picker. This now also matches TextEditor's behavior.
2021-06-22Playground: Add a menu action to save the fileGunnar Beutner
There was already 'Save As' and now we also have 'Save'.
2021-06-22Playground: Ask to save changes even when the document was never savedGunnar Beutner
This makes sure to ask the user whether they want to save changes to their current document when opening a file even if the document has never been saved before.
2021-06-22Taskbar: Check if executable in .af exist in filesystemPAUL007
This adds access X_OK check in discover_apps_and_categories() to see executable specified in .af files exist before registering them for start menu.
2021-06-22LibJS: Remove direct argument loading since it was buggyAndreas Kling
The parser doesn't always track lexical scopes correctly, so let's not rely on that for direct argument loading. This reverts the LoadArguments bytecode instruction as well. We can bring these things back when the parser can reliably tell us that a given Identifier is indeed a function argument.
2021-06-22LibJS: Make GlobalEnvironmentRecord forward to the right functionAndreas Kling
This was accidentally deleting a property from the object record object itself, rather than from the object record. It's quite confusing that Environment Records are objects, but moving away from that will require some large changes.
2021-06-22LibJS: Make string to integer parsing for properties more strictdavidot
This does break two TypedArray test262 test but those really were not correct because hasProperty was not implemented
2021-06-22LibJS: Add HasProperty to TypedArraydavidot
2021-06-22LibJS: Fix this_value in native setters and gettersdavidot
This fixes getting values from double proxies: var p = new Proxy(new Proxy([], {}), {}); p.length
2021-06-22LibJS: Fix small issues in Array.prototype.concatdavidot
2021-06-22LibJS: Fix a number of regressions in the test262 testsdavidot
In get_own_properties: Entries which are deleted while iterating need to be skipped In PropertyDescriptor::from_dictionary If the getter/setter is undefined it should still mark it as present
2021-06-22LibJS: Make put_own_property_by_index closer to specdavidot
Most of the code is taken from put_own_property however the attributes need to be handled slightly differently it seems
2021-06-22LibJS: Use Set/CreateDataPropertyOrThrow in Array.prototype as in specdavidot
Mapping: Set -> put (does not throw by default) CreateDataPropertyOrThrow -> define_property
2021-06-22LibJS: Make define_property always throw if specifieddavidot
Now put uses is_strict_mode to determine define_property should throw
2021-06-22LibJS: Use the new force_throw_exception in delete_propertydavidot
2021-06-22LibJS: Add parameter to delete_property since we need DeleteOrThrowdavidot
2021-06-22LibJS: Return non-object argument unaltered from Object.setPrototypeOf()Linus Groh
This was missing step 3 from the spec: 3. If Type(O) is not Object, return O. Also use RequireObjectCoercible() for a better error message and make the rest of the code a bit easier to read and more similar to the spec text.
2021-06-22LibJS: Begin implementing GlobalEnvironmentRecordAndreas Kling
These represent the outermost scope in the environment record hierarchy. The spec says they should be a "composite" of two things: - An ObjectEnvironmentRecord wrapping the global object - A DeclarativeEnvironmentRecord for other declarations It's not yet clear to me how this should work, so this patch only implements the first part, an object record wrapping the global object.
2021-06-22LibJS: Split the per-call-frame environment into lexical and variableAndreas Kling
To better follow the spec, we need to distinguish between the current execution context's lexical environment and variable environment. This patch moves us to having two record pointers, although both of them point at the same environment records for now.
2021-06-22LibJS: Bring function environment records closer to the specAndreas Kling
This patch adds FunctionEnvironmentRecord as a subclass of the existing DeclarativeEnvironmentRecord. Things that are specific to function environment records move into there, simplifying the base. Most of the abstract operations related to function environment records are rewritten to match the spec exactly. I also had to implement GetThisEnvironment() and GetSuperConstructor() to keep tests working after the changes, so that's nice as well. :^)
2021-06-22LibJS: Remove home object from DeclarativeEnvironmentRecordAndreas Kling
According to the spec, [[HomeObject]] is an internal slot on function objects, and should always be accessed through there.
2021-06-22Tests: Run each test in their respective directoriescoderdreams
This is so they can find their associated resources and it's the same behavior as in Lagom. This also required changing some tests so that they could write their resources in a writable location.
2021-06-22LibJS: Disallow whitespace or comments between regex literal and flagsLinus Groh
If we consumed whitespace and/or comments after a RegexLiteral token, the following token must not be RegexFlags - no whitespace or comments are allowed between the closing / and the flag characters. Fixes #8201.
2021-06-22WindowServer: Send events once when global cursor tracking is enabledGunnar Beutner
Previously we'd send mouse events twice if the target window had global cursor tracking enabled.
2021-06-22PixelPaint: Allow copying arbitrary selectionsDavipb
This replaces the naive copy algorithm that only supported rectangular and 100% opaque selections with a more general approach that supports any shape and alpha value. Note that we now make a brand new bitmap with a hardcoded format instead of just cropping the layer's existing bitmap. This is done to ensure that the final clipboard image will have an alpha channel.
2021-06-22PixelPaint: Add more options to RectangleSelectToolDavipb
A "feather" value sets by how much the borders of the selection will be smoothed, and a "mode" value sets how the newly selected region will interact with an existing image selection (if any).