summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-06Spreadsheet: Use JS::Parser::print_errors() for reporting syntax errorsLinus Groh
2020-12-06LibJS: Include source location hint in Parser::print_errors()Linus Groh
2020-12-06LibJS: Remove unused {INTERPRETER,VM}_DEBUGLinus Groh
2020-12-06Chess: Add ability to export game as PGN fileAnicJov
This patch adds an option to the menubar for exporting the current game as a PGN file. This file can then be read by other chess programs (and ours eventually) to replay the game or analyze it. The implementation is mostly PGN spec compliant, however the code could use some more work. Particularly the `const_cast`s... But it's a start. :^) Fixup: Chess: Fixed hard-coded home path in unveil() call Fixup: Chess: Removed castling flags from Move struct The castling detection logic is done inside Move::to_algebraic() now, removing the need for is_castle_short and is_castle_long flags inside of the Move struct.
2020-12-06Chess: Added ability to resign and flip the boardAnicJov
This patch adds options to the app's menubar to resign the game and flip the board.
2020-12-06Chess: Change default piece setAnicJov
As much as I like the "test" piece set, I think "stelar7" is a much better first impression for anyone opening the Chess game, so I consider it a much more sensible default.
2020-12-06Userland: Fix typo in 'pro' helpBen Wiederhake
2020-12-06AK: Add test for the will_be_destroyed and one_ref_left magic functionsAndrew Kaster
Fixes a regression introduced by 5c1b3ce. The commit description there asserts that the changes allow calling will_be_destroyed and one_ref_left, which are not required to be const qualified. The implementation in fact does require the methods to be const qualified, because we forgot to add the const_cast inside the decltypes :^)
2020-12-06LibRegex: Add basic support for unicode escapes in ECMA262ParserAnotherTest
This parses unicode escapes (and matches them only for utf8 strings).
2020-12-06LibRegex: Remove Lexer::slice_back() and just use StringViewsAnotherTest
2020-12-06LibRegex: Store 'String' matches inside the bytecodeAnotherTest
Also removes an unnecessary 'length' argument (StringView has a length!)
2020-12-06LibWeb: Do floating box placement together with other boxesAndreas Kling
I realized that we're supposed to float the boxes sideways, but not always to y=0, so that makes it logical to share the placement logic with other normal non-replaced blocks. This is still pretty buggy but we're getting closer. :^)
2020-12-06LibWeb: Naively implement the CSS clear propertyAndreas Kling
This is definitely not fully-featured, but basically we now handle the clear property by forcing the cleared box below the bottom-most floated box on the relevant side.
2020-12-06LibWeb: Floating boxes with width:auto should be shrink-to-fitAndreas Kling
2020-12-06LookupServer: Put debug spam behind a macroAndreas Kling
2020-12-06LibGfx: Fix font x-height computationAndreas Kling
Line indices start from the top, so the baseline is a higher number than the mean line. :^)
2020-12-06WindowServer: Allow for more flexible tilingJulian Offenhäuser
The desktop can now be split up into halves (both vertical and horizontal) and quarters by dragging a window into the corresponding edge or corner. This makes tiling behave more like you would expect from similiar window managers.
2020-12-06Userland: Write some '--help' descriptions where appropriateBen Wiederhake
2020-12-06LibCore: Offer to display a general descriptionBen Wiederhake
2020-12-06LibLine: Don't make Editor::load_history() cut off a character per lineLinus Groh
For some reason we were not considering the last *two* characters from the line's ByteBuffer, with the comment next to it talking about \n and \0. However the buffer doesn't contain a null-byte, so we were effectively removing the newline and the last character from each history line!
2020-12-06LibGfx: Handle OOM slightly betterBen Wiederhake
When create_with_shared_buffer() is called in the next line, the RefPtr::operator* asserts that the RefPtr is not null. That can happen when we're low-ish on memory, and the image is huge.
2020-12-05LibWeb: Hit test floats using the top of lines, not middleAndreas Kling
I don't know why basing the available space between floats on the y coordinate in the middle of each line seemed like a good idea. It just creates situations with a few pixels of floats overlapping text!
2020-12-05LibJS: Add Float{32,64}ArrayLinus Groh
2020-12-05AK: Pull Is{Integral,FloatingPoint} into the global namespaceLinus Groh
2020-12-05LibWeb: Run clang-format on ReplacedBox.cppAndreas Kling
2020-12-05LibWeb: Don't subtract dubious "line spacing" from line y offsetsAndreas Kling
I'm not sure what this was trying to achieve, but it was moving all line fragments upwards and a lot of things look a lot better if we just stop doing that.
2020-12-05LibWeb: Floating boxes follow normal containing block rulesAndreas Kling
I had guessed that floating boxes should somehow be hoisted up to the nearest block ancestor that creates a block formatting context, but that's just wrong. They move up to the nearest block ancestor like any other box that's not absolutely (or fixed) positioned. :^)
2020-12-05LibWeb: Fix off-by-one when computing available space between floatsAndreas Kling
Whoops, this explains why things were not lining up correctly. :^)
2020-12-05Base: Add a simple HTML test page for CSS floatsAndreas Kling
2020-12-05LibWeb: First slightly naive implementation of CSS floats :^)Andreas Kling
Boxes can now be floated left or right, which makes text within the same block formatting context flow around them. We were creating way too many block formatting contexts. As it turns out, we don't need one for every new block, but rather there's a set of rules that determines whether a given block creates a new block formatting context. Each BFC keeps track of the floating boxes within it, and IFC's can then query it to find the available space for line boxes. There's a huge hack in here where we assume all lines are the exact line-height. Making this work with vertically non-uniform lines will require some architectural changes.
2020-12-05LibWeb: Add Layout::Node::is_root_element()Andreas Kling
This returns true if the layout node corresponds to the <html> element.
2020-12-05LibJS: Implement a very hackish "arguments" objectAndreas Kling
We now lazily create an "arguments" array inside functions when code tries to access it. This doesn't follow the spec at all but still covers a lot of the basic uses of arguments, i.e "arguments.length" and "arguments[n]"
2020-12-05LibJS: Implement parseInt()Andreas Kling
Here's a reasonably faithful implementation of ECMAScript 2021 18.2.5. Some corner cases are not covered, I've left them as FIXME's in the included unit test. Also I had to tweak JS::Value::to_i32() to always convert infinity to zero, which is in accordance with ToInt32 AFAICT.
2020-12-05Browser: Add DuckDuckGo to bookmarks (#4288)Daniel Lemos
2020-12-05AudioServer: Fix issue when adding a BufferQueue to MixerJulian Offenhäuser
Previously, the Mixer class would only check for an added BufferQueue if the list of active queues was empty. If more than one client connected to AudioServer, its queue would never be added to the list of active queues. This fix adds a flag that, when set, will cause the sound thread to wait for a new BufferQueue.
2020-12-05js: Improve pretty-printing of various objectsLinus Groh
For many object types we only ever used the regular print_object() in the js REPL - resulting in a useless "{ }". This patch adds more individual representations for the following types: - Boolean/Number/String object: print wrapped value - ArrayBuffer: print byteLength and hex-formatted bytes in chunks of 16 - TypedArray: print length, byteLength, buffer pointer and values - Proxy: print target and handler Also improve the existing pretty-printing output: - More consistency, most objects now follow the format "[Type] ..." - Some coloring tweaks - No two spaces in empty arrays & objects Possible future improvements: - Add line breaks between elements of long arrays & objects Closes #4310.
2020-12-05LibJS: Move is_script_function() to ObjectLinus Groh
Every Object should be able to tell us if it is a ScriptFunction, not only Function objects!
2020-12-04LibWeb: Block layout should account for vertical border spaceAndreas Kling
We were not accounting for space occupied by borders when computing the vertical (y) position of blocks. This meant that blocks with wide top/bottom borders could bleed into each other incorrectly. Fix this by using the combined padding+border geometry instead of just the padding when placing blocks on the y axis.
2020-12-04LibWeb: Block layout should resolve relative lengths against each boxAndreas Kling
We were incorrectly resolving relative length units (ex, em, etc.) against the containing block in many cases. Fix this to resolve them against the descendant box we're currently processing.
2020-12-04LibWeb: Make LineBox take incoming fragment size as floatsAndreas Kling
2020-12-04LibWeb: Expose Document.getElementsByName() to JavaScriptAndreas Kling
2020-12-04LibWeb: Move border painting from Layout::Box to a free functionAndreas Kling
This will allow us to share some code between inline and non-inline border painting.
2020-12-04Base: Add a hover color link to the links on the welcome pageAndreas Kling
2020-12-04LibWeb: Rename LayoutNode::is_root() => is_initial_containing_block()Andreas Kling
Let's use spec language for this. :^)
2020-12-04LibWeb: Call the correct base class in InlineNode::split_into_lines()Andreas Kling
2020-12-04LibWeb: Compute the final border-style property before paintingAndreas Kling
Instead of doing a CSS property lookup for the line style of each border edge during paint, we now cache the final CSS::LineStyle to use in the Layout::BorderData.
2020-12-04LibWeb: Make LineBoxFragment store non-const Layout::Node&Andreas Kling
This is more honest, since we actually const_cast these layout nodes during inline layout anyway.
2020-12-04LibVT: Auto-scroll the terminalJulian Offenhäuser
TerminalWidget will now automatically scroll up or down when the user drags the mouse out of its bounds while selecting text. This happens at a fixed speed.
2020-12-03test-js: Use new format functionsLinus Groh
2020-12-03test-js: Set test root correctly when specified as positional argLinus Groh
When a test root path was given to test-js it was never used, causing test-js to always fail.