Commit graph

37297 commits

Author SHA1 Message Date
Damien Firmenich
31ca48ebb2 Shell: Complete for current path when the text is empty
For example, when typing `cd <tab>`, the shell will show a list of
files in the current directory. This behavior is similar to typing `cd
./<tab>`.

It makes it easier to `cd` into directories without having to list them
first.
2022-04-15 13:08:41 +04:30
djwisdom
9dbcda7eef Base: Update CsillaRegular12 add Latin Extended-A
CsillaRegular12
Latin Extended-A
0100-017E
2022-04-15 00:26:55 +02:00
djwisdom
d69df87728 Base: Update CsillaBold12 font add Latin Extended-A
CsillaBold12
Latin Extended-A
0100-017E
2022-04-15 00:26:55 +02:00
fanzidanzhidi
06ebdf82f7 Base: Add su(1) manpage
Base: Add su(1) manpage

Base: Add su(1) manpage
2022-04-15 00:22:37 +02:00
Marco Cutecchia
ccc3da4ee1 HackStudio: Remember if the user wants to see dotfiles between sessions 2022-04-15 00:15:04 +02:00
Marco Cutecchia
a7ba8677cd HackStudio: Add a "Project Configuration" button in the Edit menu 2022-04-15 00:15:04 +02:00
Marco Cutecchia
9096da19f1 HackStudio: Allow customizing the actions of the Build & Run buttons
This commit introduces per-project settings that can be customized
through a JSON file placed in '.hackstudio/config.json' in the
project's root
2022-04-15 00:15:04 +02:00
Martin Frederic
3e6c083754 Pong: Explicitly clear held keys in Game::reset()
The paddle's movement is determined by the currently held keys. A key
is no longer considered held when a matching keyup_event() fires.
However, the event does not fire when the timer has stopped (e.g. due to
a game over condition), which can result in the paddle keeping its
former direction and moving on its own -- even after the player started
a new game. Therefore, any held keys will be cleared explicitly.
2022-04-15 00:13:09 +02:00
Martin Frederic
02d2a300e7 Pong: Restart timer if necessary
When the player runs into a game over condition, Game's timer is
stopped. In order for reset() to work properly, the timer has to be
started again. The condition is tracked via a new member variable,
`m_game_over`. To prevent confusion, game_over() has been renamed to
show_game_over_message().
2022-04-15 00:13:09 +02:00
Martin Frederic
0abdeb474f Pong: Extend Game::reset()
Previously, the method reset the ball and the paddles. Now, it will
also reset and redraw the scores and update the ball's rect.
2022-04-15 00:13:09 +02:00
Martin Frederic
740beea5ce Pong: Add 'New Game' action
This declares Game::reset() public and lets the menu action invoke it.
2022-04-15 00:13:09 +02:00
Marco Rebhan
a4639fced9 LibGUI: Don't try to get link target value if read_link failed 2022-04-14 23:44:09 +02:00
Sam Atkins
7c91fda088 LibWeb: Allow multiple text-decoration-lines
The spec grammar for `text-decoration-line` is:

`none | [ underline || overline || line-through || blink ]`

Which means that it's either `none`, or any combination of the other
values. This patch makes that parse for `text-decoration-line` and
`text-decoration`, stores the results as a Vector, and adjusts
`paint_text_decoration()` to run as a loop over all the values that are
provided.

As noted, storing a Vector of values is a bit wasteful, as they could be
stored as flags in a single `u8`. But I was getting too confused trying
to do that in a nice way.
2022-04-14 21:54:10 +02:00
Aatos Majava
85da8cbb07 TelnetServer: Ignore null and \n when parsing
This fixes issues with carriage return sequences.

Before, using <CR><NUL> as the return sequence wouldn't work at all,
and when using <CR><LF> there was an extra newline after every newline.

After this patch, the behaviour should be closer to the Telnet RFC.
2022-04-14 16:12:16 +02:00
Sam Atkins
e941f07931 LibWeb: Make StyleProperties::property() always return a value
By the time that property() gets called, we've already given every
single property a value, so we can just return it. This simplifies a
lot of places that were manually handling a lack of value
unnecessarily.
2022-04-14 14:54:06 +02:00
Sam Atkins
a20188cd91 LibWeb: Use generated enum code for property value validation
This has the nice benefit of removing a lot of duplicated lists of
values from Properties.json. :^)
2022-04-14 14:54:06 +02:00
Sam Atkins
a797a92990 LibWeb: Stop including StyleValue.h in a few places
I don't know how much this will actually help compile times, but it's
something!
2022-04-14 14:54:06 +02:00
Sam Atkins
c66da0f2cb LibWeb: Assign an underlying type to generated CSS enums
I'm *pretty* sure that even a u32 would be overkill but you never know
with CSS specs.
2022-04-14 14:54:06 +02:00
Sam Atkins
c50661067d LibWeb: Generate and use to_string(css_enum) functions
The only one that's actually used is for Repeat, but it's easy to
generate them so might as well. :^)
2022-04-14 14:54:06 +02:00
Sam Atkins
ae40e9a66c LibWeb: Use generated to_value_id() functions 2022-04-14 14:54:06 +02:00
Sam Atkins
9bf511caa3 LibWeb: Generate to_value_id() functions 2022-04-14 14:54:06 +02:00
Sam Atkins
3cc6cba4fe LibWeb: Use generated value_id_to_foo() functions 2022-04-14 14:54:06 +02:00
Sam Atkins
4d42885327 LibWeb: Return Optional from StyleProperties::box_sizing()
This function was written as if it returned `Optional<CSS::BoxSizing>`
but actually returned a plain `CSS::BoxSizing`, meaning if the property
was not set or was invalid, it would return whichever enum value was
first. This wasn't visible because we don't yet pay any attention to
the `box-sizing` property.
2022-04-14 14:54:06 +02:00
Sam Atkins
3f61f869c8 LibWeb: Generate ValueID-to-enum conversion functions 2022-04-14 14:54:06 +02:00
Sam Atkins
823d67bfc1 LibWeb: Use the generated enums instead of defining them in StyleValue.h
The remaining enums here are special cases that don't directly
correspond to a list of identifiers. But the majority can go. :^)
2022-04-14 14:54:06 +02:00
Sam Atkins
a97944e483 LibWeb: Add a new code generator for CSS enums
Alias values are represented by "alias-name=real-name".

We have a lot of repetitive code for converting between ValueID and
property-specific enums. Let's see if we can generate it. :^)

This first step just produces the enums, from a JSON file. The values in
there are a duplication of what's in Properties.json, but eventually
those will go away.
2022-04-14 14:54:06 +02:00
Tim Schumacher
66170ff632 Tests: Add a test for printf truncation 2022-04-14 03:12:56 +04:30
Tim Schumacher
3651da6a96 LibC: Define correct limits for long on x86_64 2022-04-14 03:12:56 +04:30
Tim Schumacher
d6ccee4089 AK: Differ between long and long long formats 2022-04-14 03:12:56 +04:30
Tim Schumacher
fbfa378e74 AK: Deduplicate formatting hexadecimal values
Both calls essentially only differ in one boolean, which dictates
whether to print the value in uppercase or lowercase.

Move the long function call into a new function and pass in the
"uppercase" boolean seperately to avoid having to write everything
twice.
2022-04-14 03:12:56 +04:30
Tim Schumacher
0d5098fdc0 AK: Merge print_i64 into print_signed_number
Those functions only differ by the input type of `number`. No other
wrapper does this, as they rely on adjusting the type of the argument on
the caller side instead.

Avoid specializing too much by just doing the same for signed numbers.
2022-04-14 03:12:56 +04:30
SimonFJ20
399202f1d3 LibGUI: Make class final and seperate from GML Playground 2022-04-13 21:24:48 +02:00
SimonFJ20
791e881892 LibGUI: Rename function to make intention clearer 2022-04-13 21:24:48 +02:00
SimonFJ20
50ca1b3d87 LibGUI+GMLPlayground: Reset cursor to end of text after replace 2022-04-13 21:24:48 +02:00
SimonFJ20
661e7d691e LibGUI+GMLPlayground: Replace text using ReplaceAllTextCommand 2022-04-13 21:24:48 +02:00
Andreas Kling
343d699627 LibJS: Add missing Vector::in_reverse() in ensure_property_table()
Regressed with 35fcb028e9.
2022-04-13 21:02:37 +02:00
Andreas Kling
32bff52c25 LibWeb: Use Vector::in_reverse() in DOM::EventDispatcher 2022-04-13 19:52:25 +02:00
Andreas Kling
35fcb028e9 LibJS: Tidy up Shape::ensure_property_table() a little bit
- Use a vector or references for the transition chain since null shapes
  are not allowed in the chain.

- Use Vector::in_reverse() for iterating the chain backwards.
2022-04-13 19:52:25 +02:00
Andreas Kling
b0008c0934 LibWeb: Use Vector::in_reverse() in HTML::StackOfOpenElements 2022-04-13 19:52:25 +02:00
Andreas Kling
83082b12b7 LibWeb: Make reverse iterators work for const NonnullPtrVectors 2022-04-13 19:52:25 +02:00
Andreas Kling
6712bbc0ee LibWeb: Tidy up Layout::TreeBuilder ancestor stack a little bit
- Make it a vector of references since we never put null pointers on
  the ancestor stack.

- Use Vector::in_reverse() to iterate backwards.
2022-04-13 19:52:25 +02:00
Idan Horowitz
118d381091 LibArchive: Stop null-terminating StringView tar file header fields
Since 8209c2b570 was added the requires
check for copy_characters_to_buffer matched StringViews as well, which
caused unexpected null bytes to be inserted for non null-terminated
fields.
2022-04-13 19:51:57 +02:00
Luke Wilde
a9a90b1b58 Ports: Add mGBA 2022-04-13 18:32:25 +01:00
Andreas Kling
5d6c5571c4 LibWeb: Map <pre wrap> presentational hint to CSS white-space:pre-wrap 2022-04-13 16:40:46 +02:00
Andreas Kling
de5de4d99a LibWeb: Fix typo in CSS::Display::is_outside_and_inside() name 2022-04-13 16:40:46 +02:00
Olivier De Canniere
be4913c1fb PixelPaint: Add exporting to the QOI image format 2022-04-13 15:21:27 +01:00
Olivier De Canniere
44a5558525 LibGfx: Add a QOI image format encoder
Previously only a QOI image decoder was available on the system. This
commit adds an encoder as well.

For now it only handles images with 4 channels (RGBA).
2022-04-13 15:21:27 +01:00
EWouters
2f8afcccfd Ports: Add port libyaml version 0.2.5 2022-04-13 15:14:50 +01:00
Timothy Flynn
4d0315099f LibJS: Allow TypeArray to become detached in TypedArray.prototype.set
This is a normative change in the ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/4d570c4
2022-04-13 16:02:01 +02:00
Sam Atkins
f92312e778 Utilities/unzip: Use Core::Directory to create output directory 2022-04-13 16:00:17 +02:00