Commit graph

21435 commits

Author SHA1 Message Date
Gunnar Beutner
fab9b2f068 Hearts: Don't destroy the animation handler while running it 2021-06-04 19:32:25 +02:00
Itamar
fdaec58f59 HackStudio: Add comment about lexicographical insertion to ClassView 2021-06-04 19:29:22 +02:00
Itamar
c1b2003687 HackStudio: Use Node's name when inserting to the ClassView tree
Previously, when traversing the ClassView tree to find the parent of a
new node, we used the name of the node's declaration to find the path
to the parent in the tree.

However, some nodes in the tree do not have a matching declaration,
which caused a VERIFY failure.

To fix this, we now use the node's name when walking the tree.
We can do this because the node's name should be identical to the name
of its declaration.

Closes #7702.
2021-06-04 19:29:22 +02:00
Timothy Flynn
2b762ef940 Solitaire+LibCards: Draw card stacks with rounded corners
Now that the cards have rounded corners, draw the stack box behind the
cards with rounded corners as well. This way, the corner of the stack
box doesn't peek out from behind the cards.

The caveat here is that the "play" card stack now needs to hold a
reference to the "waste" stack beneath it so it knows when not to draw
its background on top of the waste stack. To faciliate that, the array
of card stacks is now a NonnullRefPtrVector so the play stack can store
a smart pointer to the waste stack (instead of a raw pointer or
reference).
2021-06-04 19:11:45 +02:00
Timothy Flynn
4903186cc5 LibGfx: Add helper for painting a rounded rect with equal corner radii 2021-06-04 19:11:45 +02:00
Maciej Zygmanowski
bee1e06055 hostname: Handle 'sethostname' errors 2021-06-04 19:11:27 +02:00
Gunnar Beutner
d840608a51 Taskbar: Make sure LibGUI/Desktop.h is usable in ports
Now that Desktop.h includes Services/Taskbar/TaskbarWindow.h we have
to install Taskbar's header files so that Desktop.h can be used in
ports or when building software in-target.
2021-06-04 19:11:13 +02:00
Jelle Raaijmakers
18a5ac1e66 Ports: Enable PHP XML extensions 2021-06-04 19:10:58 +02:00
Jelle Raaijmakers
93e605e415 Ports: Add libxml2 2021-06-04 19:10:58 +02:00
Gunnar Beutner
60298121d8 Kernel: Make sure we increment the TX counter
This was broken by b436dd1.
2021-06-04 19:06:47 +02:00
Ryan Chandler
c66b281856 LibJS: Fix functions binding this to global object in strict mode
This fixes an issue where this would be bound to the global object
by default when operating in strict mode.

According to the specification, the expected value for |this| when
no binding is provided is undefined.
2021-06-04 13:00:37 +01:00
Ali Mohammad Pur
1b083392fa LibWasm+wasm: Switch to east-const to comply with project style
Against my better judgement, this change is mandated by the project code
style rules, even if it's not actually enforced.
2021-06-04 16:07:42 +04:30
Ali Mohammad Pur
23fd8bfd69 Userland/wasm: Replace manual noop export with an automatic one
Instead of manually specifying the types and names of imports to stub
out, `--export-noop` can be used to export stub functions for any
unresolved function import.
This makes running and debugging random wasm files much easier.
2021-06-04 16:07:42 +04:30
Ali Mohammad Pur
be62e4d1d7 LibWasm: Load and instantiate tables
This commit is a fairly large refactor, mainly because it unified the
two different ways that existed to represent references.
Now Reference values are also a kind of value.
It also implements a printer for values/references instead of copying
the implementation everywhere.
2021-06-04 16:07:42 +04:30
Ali Mohammad Pur
c392a0cf7f LibWasm: Implement the br.table instruction
Unlike its name, this instruction has nothing to do with tables, it's
just a very simple switch-case instruction.
2021-06-04 16:07:42 +04:30
Ali Mohammad Pur
9db418e1fb LibWasm: Read from and write to memory as little-endian
The spec says so, we must do so.
2021-06-04 16:07:42 +04:30
Ali Mohammad Pur
09cf1040ef LibJS/Tests: Catch exceptions in describe() itself
Otherwise exceptions thrown in that state would simply terminate the
test.
2021-06-04 16:07:42 +04:30
Ali Mohammad Pur
d7ba15371b Meta: Don't make wasm tests pass when they cannot read a module
Instead, just let them be treated as failing their respective test.
2021-06-04 16:07:42 +04:30
Jelle Raaijmakers
977addf76d Ports/PHP: Enable SQLite3 and iconv extensions 2021-06-04 13:03:13 +02:00
Liav A
6a9dc5562d Kernel: Use IO ports instad of MMIO with Bochs graphics in VirtualBox
This is needed for VirtualBox, because it doesn't support controlling
the device with MMIO.

Fixes #7558.
2021-06-04 13:02:32 +02:00
Liav A
d18d91dedc Kernel/Graphics: Add a proper method to check if Intel GPU is supported 2021-06-04 13:02:32 +02:00
Ali Mohammad Pur
824a40e95b AK: Inline *String::is_one_of<Ts...>()
Previously this was generating a crazy number of symbols, and it was
also pretty-damn-slow as it was defined recursively, which made the
compiler incapable of inlining it (due to the many many layers of
recursion before it terminated).
This commit replaces the recursion with a pack expansion and marks it
always-inline.
2021-06-04 12:57:14 +02:00
Jelle Raaijmakers
a446530c0d Ports: Embed ScummVM icons into the binary
Slightly inspired by 9c0cfede.
2021-06-04 12:54:27 +02:00
Jelle Raaijmakers
68f0170bc6 Toolchain: Add ImageMagick to Dockerfile 2021-06-04 12:54:27 +02:00
Jelle Raaijmakers
280785f0fa Ports: Add PHP 2021-06-04 10:39:41 +02:00
Jelle Raaijmakers
e483de93ce LibC: Define MSG_OOB 2021-06-04 10:39:41 +02:00
Jelle Raaijmakers
7f4a1bc11e LibC: Implement execle() 2021-06-04 10:39:41 +02:00
Jelle Raaijmakers
0e990a4be8 LibC: Implement mblen() 2021-06-04 10:39:41 +02:00
Jelle Raaijmakers
496988de47 LibC: Add POSIX timer constants 2021-06-04 10:39:41 +02:00
Daniel Bertalan
99a79a364a LibVT: Fix underlines incorrectly rendering in red
Previously, `href` attributes weren't checked for not being empty when
drawing their underlines. This caused any underline to be treated as an
active `href`, hence the red color.
2021-06-04 09:02:43 +01:00
Daniel Bertalan
53099b216c LibVT: Implement bright color support
Previously, we only used bright colors when the bold attribute was set.
We now have the option to set it via escape sequences. We also needed to
make the bold text behavior optional, as some color schemes do weird
things with it. For example, Solarized uses it for various shades of
gray, so bold green would turn into a light shade of gray.

The following new escape sequences are supported:
- `CSI 90;m` to `CSI 97;m`: set bright foreground color
- `CSI 100;m` to `CSI 107;m`: set bright background color
2021-06-04 09:02:43 +01:00
Daniel Bertalan
acbd1d14d0 LibVT+Terminal: Add color scheme support
This commit introduces color scheme support to Terminal. These are found
in `/res/terminal_colors` and the default color scheme can be set in
`~/.config/Terminal.ini`. Furthermore, a combo box is added for
setting the color scheme at runtime.

The previously used default color scheme has been added to
`/res/terminal-colors/Default.ini`.

To make the implementation more compatible with other color schemes,
`TerminalWidget` now supports overriding the default foreground and
background colors.
2021-06-04 09:02:43 +01:00
Daniel Bertalan
99033876ec LibVT+Kernel: Create Color class
Previously, we converted colors to their RGB values immediately when
they were set. This meant that their semantic meaning was lost, we could
not tell a precise RGB value apart from a named/indexed color.

The new way of storing colors will allow us to retain this information,
so we can change a color scheme on the fly, and previously emitted text
will also be affected.
2021-06-04 09:02:43 +01:00
Max Wipfli
054c742d17 LibWeb: Remove Utf8View usage and try avoiding StringBuilder in TextNode
This patch completely reworks TextNode::compute_text_for_rendering(). It
removes the unnecessary usage of Utf8View to find spaces in a String.
Furthermore, it adds a couple fast return paths for common but trivial
cases such as empty, single-character and whitespace-less strings.

For the HTML spec bookmarks, around two thirds of all function calls
(which amounts to around 10'000) use the fast paths and thus avoid
allocating a StringBuilder just to build a copy of the already present
String.
2021-06-04 09:39:07 +02:00
Gunnar Beutner
9c0cfede59 Ports: Embed icon into the Super Mario port 2021-06-04 09:38:25 +02:00
Gunnar Beutner
46de51f467 Ports: Create launchers for the stpuzzles port
This changes the .port_include.sh script so that ports can more easily
create more than one launcher by making the install_launcher function
available to the port's package.sh script.

This creates launchers for the stpuzzles port in the Games/Puzzles
category.
2021-06-04 09:38:25 +02:00
Gunnar Beutner
101e4233b8 Ports: Don't set the current working directory in the launcher script
This removes the hack for launching Super Mario.
2021-06-04 09:38:25 +02:00
Gunnar Beutner
8c18c7e4c2 Ports: Don't crash when starting uMario outside of /opt/Super_Mario
Previously this port would just crash. There was a workaround in
the way the app launcher started the game but I'd really like to
get rid of that hack.
2021-06-04 09:38:25 +02:00
Gunnar Beutner
19c4e74f70 Taskbar: Allow creating menus for sub-categories
This change allows creating sub-categories in app files, e.g. with
Category=Games/Puzzles.
2021-06-04 09:38:25 +02:00
R Smith
5a6f0ef1bc AK: Don’t drop lines between \r and \n in StringView::lines() (#7662)
StringView::lines() supports line-separators “\n”, “\r”, and “\r\n”.
The method will drop an entire line if it is surrounded by “\r”
and “\n” separators on the left and right sides respectively.
2021-06-04 12:06:08 +04:30
Linus Groh
1828607606 LibTest: Add --json flag to JS test runner
This will not show the colorful human-readable file results and final
test results summary but instead output a JSON blob containing all test
information, which can then be processed by other programs easily.
2021-06-04 08:32:56 +01:00
DhruvMaroo
6c3d601e87 Profiler: Show the duration of the time interval chosen 2021-06-04 09:30:22 +02:00
Scott Antipa
7dab58ac3b
Documentation: Fix a typo by removing an extra word 2021-06-04 08:22:41 +01:00
John Brehm
2dfd95767a
Ports: Add p7zip 2021-06-04 08:21:33 +01:00
Gunnar Beutner
6093236424 LibCards: Don't draw the first card smaller than the others 2021-06-04 09:20:21 +02:00
brapru
7843287d89 LibLine: Actually cancel the search editor on Ctl-C
When the search editor calls on really_quit_event_loop to cancel the
search, the command loaded in m_buffer would actually execute because
really_quit_event_loop sends a new line character and then afterwards
clears the buffer.

By using end_search prior to exiting the event loop, this patch will
appropriately clear the buffer, not execute any commands, and
preserve the original loaded buffer after returning from a canceled
search.
2021-06-04 11:00:24 +04:30
Matthew Jones
1748591570 Solitaire: Fixes undo feature from incorrect merge conflict resolution 2021-06-04 00:15:25 +02:00
Andreas Kling
bfffdd37f0 LibCpp: Revert change to strace.cpp AST test from bf8fd4c
Since the purpose of this file is just to verify the AST generated,
we can leave it alone.
2021-06-04 00:03:25 +02:00
David Isaksson
fe03630716 LibCards: Draw cards with rounded card corners
closes #7412
2021-06-03 22:58:14 +02:00
Andreas Kling
bf8fd4c193 Everywhere: Remove accidental '\n' from various outln() invocations
Also convert outln(stderr, ...) to warnln(...)
2021-06-03 22:50:21 +02:00