Idan Horowitz
1a8ee5d8d7
LibJS: Generify the garbage collector's weak container notifications
...
This will allow us to use the same interface for other JS weak
containers like the WeakMap & WeakRef.
2021-06-12 10:44:28 +01:00
Andreas Kling
06fdc26656
LibJS: Fix all clang-tidy warnings in Bytecode/Op.h
...
- Add missing explicit to constructors
- Use move() where appropriate
2021-06-12 11:22:46 +02:00
Andreas Kling
68a307be4e
PixelPaint: Use ImageDecoder to load images out-of-process
...
This sandboxes the image decoding work done by PixelPaint to prevent
bugs in the decoding framework from compromising PixelPaint itself. :^)
2021-06-12 11:19:29 +02:00
Andreas Kling
92203c9821
PixelPaint: Don't allow Image::try_create_from_bitmap(nullptr)
...
This is not a valid use-case so let's prevent it at compile time.
2021-06-12 11:19:29 +02:00
Andreas Kling
9038bc675f
PixelPaint: Guarantee that constructed Layer always has a Gfx::Bitmap
...
Hoist any allocation failures so that layer factories never return a
bitmap-less layer.
2021-06-12 11:19:29 +02:00
Andreas Kling
c7f7c1f7f0
PixelPaint: Use move semantics around Layer construction and accessors
2021-06-12 11:19:29 +02:00
Gunnar Beutner
a612c22278
LibJS: Add support for running test-js with the bytecode interpreter
...
This obviously won't actually successfully run the test suite until
more of the AST expressions used by the test suite are supported.
2021-06-12 11:14:55 +02:00
Gunnar Beutner
6a78b44c22
LibJS: Add missing length() method for NewArray
2021-06-12 11:14:55 +02:00
Linus Groh
633f604c47
LibJS: Fix attributes of Promise.prototype
...
This was missing a 0 at the end to make it non-writable, non-enumerable,
non-configurable.
2021-06-12 01:19:07 +01:00
Linus Groh
1d7514d51e
LibJS: Hide gc() dbgln() behind #ifdef __serenity__
...
This spams to stdout when using Lagom, and is therefore included in
test-js output. Don't need that.
2021-06-12 01:09:45 +01:00
networkException
592bc1e331
HackStudio: Add "Show in File Manager" Action to project TreeView
...
This shows all selected inodes in their parent directory.
Currently, each selection makes a seperate call to LaunchServer
and opens a seperate FileManager window. In the future selections
with a shared parent could share windows.
2021-06-12 00:47:37 +01:00
Dmitrii Ubskii
f11000b176
2048: Fix move success detection
...
Whether or not tiles moved used to be determined by comparing new_tiles
with m_tiles. This is no longer possible since the slide is done
in-place.
This fix makes the game look through the m_sliding_tiles, which contains
previous and current position for each tile on the board, to determine
whether any tile moved at all. If not, the move is deemed unsuccessful.
Fixes #8008 .
2021-06-12 00:46:11 +01:00
Idan Horowitz
a1f5357ad3
LibJS: Expose Symbol.species properties as getters
...
As required by the specification.
2021-06-12 00:44:15 +01:00
Idan Horowitz
7f6d3818a2
LibJS: Add the Object::define_native_accessor method
...
This is very similar to Object::define_native_property, but here the
native functions are exported as standalone JS getter and setter
functions, instead of being transparently called by interactions with
the property.
2021-06-12 00:44:15 +01:00
Andreas Kling
9c5de113b1
PixelPaint: Rename Layer::create_foo() => Layer::try_create_foo()
2021-06-11 23:06:46 +02:00
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