Commit Graph

22073 Commits

Author SHA1 Message Date
Andreas Kling
a9e98bad8a PixelPaint: Rename Image::create_foo() => Image::try_create_foo()
Factory functions that may fail should be called try_create().
2021-06-11 22:51:10 +02:00
Andreas Kling
29e80178a8 PixelPaint: Convert to east-const style 2021-06-11 22:51:10 +02:00
Dmitrii Ubskii
242742b6c2 2048: Animate sliding tiles 2021-06-11 22:45:14 +02:00
Dmitrii Ubskii
8a8c2572b1 2048: Encapsulate away Board's inner workings
This change brings all the board twiddling code into the Board proper to
enable sliding animations further down the line.
2021-06-11 22:45:14 +02:00
Dmitrii Ubskii
9ce5ce3560 2048: Add pop-in animation for newly added tiles 2021-06-11 22:45:14 +02:00
Dmitrii Ubskii
30c831a3be LibGfx: Add Rect::centered_on()
This is a helper function for creating Rects of a given Size centered
on a Point.
2021-06-11 22:45:14 +02:00
Dmitrii Ubskii
11158c2400 2048: Abstract Board into its own struct 2021-06-11 22:45:14 +02:00
Dmitrii Ubskii
ec8fe6952f 2048: East const all the things 2021-06-11 22:45:14 +02:00
Gal Horowitz
b47d117bd2 LibJS: Add bytecode generation for simple ObjectExpressions
Bytecode is now generated for object literals which only contain simple
key-value pairs (i.e. no spread, getters or setters)
2021-06-11 22:44:17 +02:00
Sam Atkins
e0fb36aad7 Solitaire: Iterate the foundation stacks and inline move_card()
Keeping this as a separate commit as I'm not certain whether this
is a good change or not. The repeated if-else for each Foundation
stack bothered me a bit, though more so before I reduced the code
in the {}. But maybe the ifs are clearer than the loop?

Doing that also meant I could inline the move_card() code instead
of needing to make it a lambda. Again, maybe it would be better as
a lambda? I'm still figuring out the style Serenity uses, and I
know Andreas is big on expressiveness, and move_card() is more
expressive than just having the code in the loop.
2021-06-11 22:42:38 +02:00
Sam Atkins
4917675529 Solitaire: Fix invisible cards when multiple are tab-moved at once
Previously, pressing <tab> to auto-move cards would render all but
the last one that moved invisible. Now they all render correctly.
:^)
2021-06-11 22:42:38 +02:00
Sam Atkins
f0dcf79116 Solitaire: Combine duplicate tab/double-click logic
The two paths did the same thing, in two different ways. Now they
are the same. :^)

Can't quite put all of the logic into
attempt_to_move_card_to_foundations() because the double-click has
to check that you clicked on the top card.
2021-06-11 22:42:38 +02:00
Sam Atkins
adedb3de2a Solitaire: Subtract points when undoing a card-flip
Solitaire: Correct default arg definition location
2021-06-11 22:42:38 +02:00
Sam Atkins
8d8b1d9531 Solitaire: Correctly score automatic moves using <tab> 2021-06-11 22:42:38 +02:00
Linus Groh
862ba64037 LibJS: Implement the Error Cause proposal
Currently stage 3. https://github.com/tc39/proposal-error-cause
2021-06-11 21:34:05 +01:00
Linus Groh
8d77a3297a LibJS: Improve Error/NativeError tests
Some of this stuff is already tested properly in the name and message
prototype tests, so let's focus on covering all error types here as well
instead.
2021-06-11 21:34:05 +01:00
Marcus Nilsson
8b84a0ff69 Utilities/du: Add -h option
Add -h/--human-readable option to du.
2021-06-11 22:23:12 +02:00
Paul Irwin
a2b2194928 Base: Add Sectigo certs to ca_certs.ini
Adds Sectigo RSA Domain, Extended, and Organization cert subjects
to ca_certs.ini. These are the new names for the old Comodo CA
certs that are already trusted.
2021-06-12 00:39:51 +04:30
x-yl
7dac169f39 Utilities: Add a simple utility to test the IMAP library
test-imap is a very simple tool which runs through some of the IMAP
commands and makes sure they don't crash.
2021-06-11 23:58:28 +04:30
x-yl
9174fabf05 LibIMAP: Support for remaining IMAP commands
These include APPEND, AUTHENTICATE, CHECK, CLOSE, EXAMINE, EXPUNGE,
LSUB, SUBSCRIBE, UNSUBSCRIBE
2021-06-11 23:58:28 +04:30
x-yl
16995dc3d9 LibIMAP: Support for APPEND 2021-06-11 23:58:28 +04:30
x-yl
7021413d30 LibIMAP: Support for COPY, CREATE, DELETE and RENAME 2021-06-11 23:58:28 +04:30
x-yl
076c708d0a LibIMAP: Support for STORE and STATUS 2021-06-11 23:58:28 +04:30
x-yl
a6339297ec LibIMAP: Support for the SEARCH command 2021-06-11 23:58:28 +04:30
x-yl
318709c8ca LibIMAP: Support for FETCH BodyStructure
This completes the implementation of the FETCH command.
2021-06-11 23:58:28 +04:30
x-yl
c152a9a594 LibIMAP: Support for the FETCH command (*mostly)
This commit doesn't include support for FETCH BODY, because it's a bit
big already. Rest assured, FETCH is the most complicated IMAP command,
and we'll go back to simple boring ones shortly.
2021-06-11 23:58:28 +04:30
x-yl
1e9dfdcdcc LibIMAP: Support for the IDLE command 2021-06-11 23:58:28 +04:30
x-yl
f00c2c0192 LibIMAP: Support for LOGIN and LOGOUT 2021-06-11 23:58:28 +04:30
x-yl
2f04d24b66 LibIMAP: Support for the LIST and SELECT commands 2021-06-11 23:58:28 +04:30
x-yl
0f42ea6770 LibIMAP: Support for CAPABILITY command & response
This involves parsing messages with untagged responses
2021-06-11 23:58:28 +04:30
x-yl
ac712b07f9 Meta: Fuzz the LibIMAP Parser 2021-06-11 23:58:28 +04:30
x-yl
8c6061fc4a LibIMAP: Add a new IMAP client and support NOOP
A large commit, but sets up the framework for how the IMAP library will
work. Right now only the NOOP command and response is supported.
2021-06-11 23:58:28 +04:30
x-yl
904322e754 LibCore: Add a way to parse a DateTime from a string
DateTime can now be parsed from a string. Implements the same formatters
as strptime: https://linux.die.net/man/3/strptime (Well, some of them at
least).
2021-06-11 23:58:28 +04:30
Linus Groh
cbd7437d40 LibJS: Implement AggregateError 2021-06-11 18:49:50 +01:00
Linus Groh
2f03eb8628 LibJS: Only initialize in add_constructor() if not already done 2021-06-11 18:49:50 +01:00
Linus Groh
ad3242bab7 LibJS: Rename JS_ENUMERATE_{ERROR_SUBCLASSES => NATIVE_ERRORS}
The fact that they *are* subclasses is an implementation detail and
should not be highlighted. The spec calls these NativeErrors, so let's
use that.
Also added a comment explaining *why* they inherit from Error - I was
about to change that :^)
2021-06-11 18:49:50 +01:00
Gal Horowitz
0e10dec324 LibJS: Parse only AssignmentExpressions in ComputedPropertyNames
The property name in an object literal can either be a literal or a
computed name, in which case any AssignmentExpression can be used, we
now only parse AssignmentExpression instead of the previous incorrect
behaviour which allowed any Expression (Specifically, comma
expressions).
2021-06-11 17:25:14 +01:00
Ali Mohammad Pur
8b3f8879c1 LibJS: Use an enum class instead of 'bool is_generator'
This avoid confusion in the order of the multiple boolean parameters
that exist.
2021-06-11 19:42:58 +04:30
Hendiadyoin1
5ffe23e4f3 AK+LibX86: Generalize u128/256 to AK::UFixedBigInt
Doing these as custom classes might be faster, especially when writing
them in SSE, but this would cause a lot of Code duplication and due to
the nature of constexprs and the intelligence of the compiler they might
be using SSE/MMX either way
2021-06-11 18:14:11 +04:30
Hendiadyoin1
9270fb1e69 LibTest: Don't try to pass stderr to warnln 2021-06-11 18:14:11 +04:30
Idan Horowitz
f5a978c1aa LibWeb: Set a detach key for ArrayBuffers returned from WASM
As required by the specification:
`Set buffer.[[ArrayBufferDetachKey]] to "WebAssembly.Memory".`
2021-06-11 13:38:25 +01:00
Marcin Gasperowicz
a64089092f LibJS: Implement bytecode generation for switch 2021-06-11 13:12:26 +02:00
Andreas Kling
fbb54efd28 Meta: Add Max Wipfli to the contributors list :^) 2021-06-11 12:47:08 +02:00
Jelle Raaijmakers
527dc09542 Libc: Silence debug spam from strerror
Particularly noticeable in ports like openssl, which like to map the
entire error message set from 0 through 128 on startup.
2021-06-11 12:09:58 +02:00
Jelle Raaijmakers
33c3c32a38 LibC: Let strerror_r fail if errnum < 0 2021-06-11 12:09:58 +02:00
Max Wipfli
90e229c9b5 Kernel: Use m_inode to stat in FileDescription::stat() if available
This is necessary since the Device class does not hold a reference to
its inode (because there could be multiple), and thus doesn't override
File::stat(). For simplicity, we should just always stat via the inode
if there is one, since that shouldn't ever be the wrong thing.

This partially reverts #7867.
2021-06-11 12:09:26 +02:00
Daniel Bertalan
54a33c45bb Kernel: Add missing BrightWhite color to VirtualConsole
Because of the 'default' label, the compiler did not warn about the
missing field. The `VERIFY_NOT_REACHED` was moved out of the switch to
fix this.
2021-06-11 11:38:15 +02:00
Max Wipfli
79a47d9bd3 WebServer: Add support for HTTP basic authentication
This enables the WebServer to run protected by a username and password.
While it isn't possible to access such a protected server from inside
Serenity as of now (because neither the Browser nor pro(1) support
this), this may very well be the case in the future. :^)
2021-06-11 11:37:15 +02:00
Max Wipfli
1d990b3e7b LibHTTP: Add HTTP Basic Authentication header generation and parsing
This patch adds two new static methods to HttpRequest.
get_http_basic_authentication_header generates a "Authorization" header
from a given URL, where as parse_http_basic_authentication_header parses
an "Authorization" header into username and password.
2021-06-11 11:37:15 +02:00
Max Wipfli
e77ca79897 WebServer: Move server configuration into WebServer::Configuration
This moves the configuration of the web server, which currently only
consists of the root path, into a new class, Configuration. Since the
configuration is global and not per client, it is accessed by a
singleton getter.

This change simplifies future extensions of the configurable parameters.
2021-06-11 11:37:15 +02:00