Commit graph

34765 commits

Author SHA1 Message Date
Linus Groh
b253bca807 AK: Add optional format string parameter to String{,Builder}::join()
Allow specifying a custom format string that's being used for each item
instead of hardcoding "{}".
2022-02-23 21:53:30 +00:00
Linus Groh
f8ff8c8dd6 AK: Add Traits<Span<T>>::hash() 2022-02-23 21:53:30 +00:00
electrikmilk
3217b34f5c Base: Improve default WebServer pages
Add some fancy stuff like semantic tags, styling and the ladyball to
the default web server pages :^).
2022-02-23 21:28:17 +00:00
thankyouverycool
653f01616c LibGUI+Apps: Adjust Splitter spacings
Different thread highlights between widgets lead to different
visual weights between splitters, even when they have the same
width or height. This means some splitters look best at odd
sizes while others even. This sets the default spacing to the
most commonly used, depending on orientation, and adjusts
spacing for a few apps based on the new paint rect.

The most consistent look across apps requires some manual
tweaking occassionally. Knurlheads, use your discretion!
2022-02-23 18:56:22 +02:00
thankyouverycool
fe864af0dc LibGUI+Apps: Prevent Splitter children from being unresizable
Splitters could be resized in such an order that all their remaining
children were fixed size, leading to unfillable gaps on resize events.

HackStudio and TextEditor already had logic to handle this edge case,
so this patch factors it into a general solution for all Splitters.
At least one widget is now guaranteed to be resizeable after a child
is removed.
2022-02-23 18:56:22 +02:00
thankyouverycool
c3ce562240 LibGUI+Apps: Let Splitters select which resizee to set fixed
This gives Splitters more versatility when the right resizee is
intended to remain fixed or be toggled on and off.
2022-02-23 18:56:22 +02:00
thankyouverycool
495fd1d2c4 LibGUI: Adjust grabbable rect between Splitter widgets
Previously, the rect began on the edge of the first widget instead of
immediately after, causing an overpaint visible on hover.
2022-02-23 18:56:22 +02:00
Lady Gegga
ffe9b1d434 Base: Add Mathematical Alphanumeric Symbols to font Katica Regular 10
1D475, 1D4A6, 1D4A9, 1D4AA, 1D4AB, 1D4AC, 1D4AE, 1D4AF, 1D4B1, 1D4B3,
1D4B4, 1D4B5, 1D4B6, 1D538, 1D539, 1D53B, 1D53C, 1D53D, 1D53E, 1D540,
1D541, 1D542, 1D543, 1D544, 1D546, 1D54A, 1D54B, 1D54C, 1D54D, 1D54E,
1D54F, 1D550, 1D552, 1D553, 1D554, 1D555, 1D556, 1D557, 1D558, 1D559,
1D55A, 1D55B, 1D55C, 1D55D, 1D55E, 1D55F, 1D560, 1D561, 1D562, 1D563,
1D564, 1D565, 1D566, 1D569, 1D56A, 1D56B, 1D56F, 1D58B, 1D58D, 1D58E,
1D58F, 1D590, 1D591, 1D592, 1D594, 1D597, 1D670, 1D671, 1D672, 1D673,
1D674, 1D675, 1D676, 1D677, 1D678, 1D679, 1D67A, 1D67B, 1D67C, 1D67D,
1D67E, 1D67F, 1D680, 1D681, 1D682, 1D683, 1D684, 1D685, 1D686, 1D687,
1D688, 1D689, 1D68A, 1D68B, 1D68C, 1D68D, 1D68E, 1D68F, 1D690, 1D691,
1D692, 1D693, 1D694, 1D695, 1D696, 1D697, 1D698, 1D699, 1D69A, 1D69B,
1D69C, 1D69D, 1D69E, 1D69F, 1D6A0, 1D6A1, 1D6A2, 1D6A3, 1D7D8, 1D7D9,
1D7DA, 1D7DB, 1D7DC, 1D7DD, 1D7DE, 1D7DF, 1D7E0, 1D7E1
https://www.unicode.org/charts/PDF/U1D400.pdf
2022-02-23 15:59:12 +00:00
Lady Gegga
8f92e0c754 Base: Add Supplemental Arrows-C symbols to font Katica Regular 10
1F850, 1F851, 1F852, 1F853, 1F854, 1F855, 1F856, 1F857, 1F858, 1F859,
1F860, 1F861, 1F862, 1F863, 1F864, 1F865, 1F866, 1F867, 1F894, 1F895,
1F896, 1F897, 1F8A0, 1F8A1, 1F8A2, 1F8A3, 1F8A4, 1F8A5, 1F8A6, 1F8A7
https://www.unicode.org/charts/PDF/U1F800.pdf
2022-02-23 15:59:12 +00:00
Lady Gegga
386502b184 Base: Add Latin Extended Additional chrs to font Katica Regular 10
1D97, 1E00, 1E02, 1E03, 1E04, 1E05, 1E06, 1E07, 1E38, 1E39,
1E3A, 1E3B, 1E59, 1E5B, 1E61, 1E63, 1E69, 1E6A, 1E6C, 1E6D,
1E6E, 1E6F, 1E8B, 1E8D, 1EFA
https://www.unicode.org/charts/PDF/U1E00.pdf
2022-02-23 15:59:12 +00:00
Lady Gegga
0e8f5cee6d Base: Add 2018 to font Csilla Regular 10 2022-02-23 15:59:12 +00:00
Lady Gegga
1a2399ff1b Base: Adjust 1E9E in font Csilla Bold 10
Changed to be 1px smaller
2022-02-23 15:59:12 +00:00
thankyouverycool
95743df023 Base: Update the '4' in Csilla10 2022-02-23 15:42:21 +01:00
thankyouverycool
f2a82bc13d Base: Make Katica10's numbers tabular
Katica10's numbers 0-9 were originally monospaced but became
proportional at some point. Tabular numbers greatly reduce the
jitteriness of widgets that update often like status bars and the
geometry overlay and of course line up properly in apps like
Spreadsheet.
2022-02-23 15:42:21 +01:00
Peter Ross
ceb9f43ed5 Ports: Add Bochs x86 PC emulator 2022-02-23 09:59:08 +00:00
Michiel Visser
898be38517 LibTLS: Add signature verification for DHE and ECDHE key exchange
This will verify that the signature of the ephemeral key used in the
DHE and ECDHE key exchanges is actually generated by the server.

This verification is done using the first certificate provided by the
server, however the validity of this certificate is not checked here.
Instead this code expects the validity to be checked earlier by
`TLSv12::handle_certificate`.
2022-02-23 13:20:28 +03:30
Michiel Visser
be138474c5 LibCrypto: Add EMSA-PKCS1-V1_5 encoder and verification
This add an implementation for the EMSA-PKCS1-V1_5-ENCODE function from
RFC8017 section 9.2. The verification of this encoding is implemented by
simply encoding the message to be verified, and then comparing the two
encoded string.

The digest info for the different hash function is from RFC8017 section
9.2 notes 1. These byte sequences are actually ASN.1 encoded data,
however these are always constant for a specific hash function and can
be treated as opaque byte sequences.
2022-02-23 13:20:28 +03:30
Michiel Visser
edee8ab32a LibTLS: ECDHE switch from FeatureNotSupported to NotUnderstood error
NotUnderstood will generate a TLS alert with an InternalError instead of
crashing the RequestServer.
2022-02-23 13:20:28 +03:30
Michiel Visser
ab84aa6fb2 LibTLS: Add OutOfMemory error that will send an InternalError alert 2022-02-23 13:20:28 +03:30
Itamar
610b380515 Libraries/LibCpp: Add parser test for out-of-line function definitions 2022-02-23 00:48:44 +00:00
Itamar
cdfc530a99 LanguageServers/Cpp: Fix "complete_includes" language server test
Previously the target result was only a partial completion.
2022-02-23 00:48:44 +00:00
Itamar
7b42abccf2 LibCpp: Allow qualified names in AST Declaration nodes
Previously, the names of declarations where stored as a simple
StringView.

Because of that, we couldn't parse out-of-line function definitions,
which have qualified names.
For example, we couldn't parse the following snippet:

```
void MyClass::foo(){}
```

To fix this, we now store the name of a declaration with a
ASTNode::Name node, which represents a qualified named.
2022-02-23 00:48:44 +00:00
kleines Filmröllchen
604309327e AK: Add the Fundamental concept 2022-02-23 00:42:49 +00:00
kleines Filmröllchen
7418bdb85f AK: Prevent Atomic with complex types
This would throw some really weird linker errors, so let's prevent it
from happening instead!
2022-02-23 00:42:49 +00:00
Jelle Raaijmakers
d905de6a7a LibGL: Set correct matrices in glFrustum and glOrtho
We were erroneously setting the projection matrix when `GL_MODELVIEW`
was supplied.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
5cf967e4f2 LibGL: Improve glFrustum precision and error handling
Do not convert to float too early. Additionally, handle some error
cases for the input parameters.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
d92047c74d LibGL: Clamp color in glClearColor to 0..1 2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
44a3d5c101 LibGL: Implement glClearDepthf and store as float
Our API still specifies it as a double, but internally we communicate a
float to the rasterizer. Additionally, clamp the value to 0..1 as
described in the spec.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
36a732e98e LibGL: Ignore stack on projection and model view matrix retrieval
Our implementation keeps the top-most item on the matrix stacks in a
member variable, so we can always use that instead of considering the
actual stack.

Additionally, the current matrix mode should not influence retrieving
the projection or model view matrix.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
c3273e9492 LibSoftGPU: Clean up some conditionals in Device
No functional changes.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
f28047de73 LibSoftGPU: Round rasterization position to nearest integer
This fixes the issue where e.g. `299.97` would be cast to an integer
value of `299`, whereas the pixel's center would lie at `299.5` and
would then erroneously be excluded.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
8c9fa50c61 LibSoftGPU: Apply regular cartesian coordinate system
Currently, LibSoftGPU is still OpenGL-minded in that it uses a
coordinate system with the origin of `(0, 0)` at the lower-left of
textures, buffers and window coordinates. Because we are blitting to a
`Gfx::Bitmap` that has the origin at the top-left, we need to flip the
Y-coordinates somewhere in the rasterization logic.

We used to do this during conversion of NDC-coordinates to window
coordinates. This resulted in some incorrect behavior when
rasterization did not pass through the vertex transformation logic,
e.g. when calling `glDrawPixels`.

This changes the coordinate system to OpenGL's throughout, only to blit
the final color buffer upside down to the target bitmap. This fixes
drawing to the depth buffer directly resulting in upside down images.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
3832656464 LibGL: East-const two methods in Texture2D
No functional changes.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
7004b20656 LibGL+LibSoftGPU: Use more expressive is_power_of_two 2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
971b39ae4f LibSoftGPU: Rename rgba to bgra to reflect actual value 2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
506a857c3e LibGL: Use clamp<float> for depth range
We get `double`s as input, so convert them to `float` first.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
db0616c67a LibSoftGPU: Generalize pixel buffers and standardize on BGRA8888
Between the OpenGL client and server, a lot of data type and color
conversion needs to happen. We are performing these conversions both in
`LibSoftGPU` and `LibGL`, which is not ideal. Additionally, some
concepts like the color, depth and stencil buffers should share their
logic but have separate implementations.

This is the first step towards generalizing our `LibSoftGPU` frame
buffer: a generalized `Typed3DBuffer` is introduced for arbitrary 3D
value storage and retrieval, and `Typed2DBuffer` wraps around it to
provide in an easy-to-use 2D pixel buffer. The color, depth and stencil
buffers are replaced by `Typed2DBuffer` and are now managed by the new
`FrameBuffer` class.

The `Image` class now uses multiple `Typed3DBuffer`s for layers and
mipmap levels. Additionally, the textures are now always stored as
BGRA8888, only converting between formats when reading or writing
pixels.

Ideally this refactor should have no functional changes, but some
graphical glitches in Grim Fandango seem to be fixed and most OpenGL
ports get an FPS boost on my machine. :^)
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
72ec2c21f4 LibGL: Remove superfluous AK::dbgln alias 2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
6318522339 LibSoftGPU: Remove Device::wait_for_all_threads()
This function was added as a FIXME but was then arbitrarily invoked in
the rest of `Device`. We are better off removing this FIXME for now and
reevaluate introducing multithreading later on, so the code is not
littered with useless empty function calls.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
4d53a87355 LibSoftGPU: Remove unused AK/Function.h include 2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
a5ad702387 LibSoftGPU: Use fabsf instead of fabs for float
Let's not do a `float -> double -> float` roundtrip. :^)
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
011f6542db LibGL: Allow all primitives in glBegin()
We check for primitive support in `glEnd()`, so we do not need to
preemptively reject the mode in `glBegin()`. This allows `glBegin()` to
be invoked with `GL_POINTS`, for example.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
e3d5a11d84 Ports: Enable monkey4 engine for ScummVM
This depends on both the `libmpeg2` and `libmad` ports. Since `monkey4`
is currently an experimental engine in ScummVM, we need to explicitly
enable it during configuration.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
6a3017625b Ports: Add libmpeg2 2022-02-22 23:48:59 +00:00
Jelle Raaijmakers
5b593783f3 Ports: Add libmad 2022-02-22 23:48:59 +00:00
Ali Mohammad Pur
bed129a69f LibTest+Spreadsheet: Add some basic spreadsheet runtime behaviour tests
As there's a somewhat active development going on, let's keep the
expected behaviour under tests to make sure nothing blows up :^)
2022-02-23 03:17:12 +03:30
Ali Mohammad Pur
0fe97cdfe4 LibJS: Print the expected and received value on expect.toEqual() failure
'ExpectationError' is hardly an actionable error message.
2022-02-23 03:17:12 +03:30
Ali Mohammad Pur
6bb0c09bc1 Spreadsheet: Make Range.forEach() stop looping when it receives a Break
Not having this broke the mechanism behind lookup() and reflookup().
2022-02-23 03:17:12 +03:30
thankyouverycool
4ccb6c8815 Base: Merge Serifina into Roman font family as italic variant 2022-02-22 22:53:05 +00:00
Ryan Chandler
05cdfb8698 Shell: Start history counter from 1
Previously would show the list of history items starting from
an index of 0.

This is a bit misleading though. Running `!0` would actually cause
the parser to error out and prevent you from running the command.
2022-02-22 21:26:25 +03:30