Commit graph

45438 commits

Author SHA1 Message Date
Sam Atkins
affc8a22ca LibWeb+WebContent: Convert BrowsingContext to new pixel units
This fixes a few glitches. We no longer give the page double the width
it should have, and we mark the correct area of the page as needing
repainting.
2023-01-05 17:42:31 +01:00
kleines Filmröllchen
8fb7c32ec3 Meta: Create nested manpage section indices for the website
This is probably committing some sed crimes, but it looks very nice!
2023-01-05 15:03:52 +01:00
kleines Filmröllchen
20f44e095d Meta: Use parallel rsync for file coyping for online manpages
The main point is to bring this in line with all the other file copying,
which is always done via rsync.

On my machine this leads to very little speedup, but I'm also on WSL, so
🤷

Timings:
Before:
  Time (abs ≡): 20.440 s [User: 133.928 s, System: 12.290 s]
After:
  Time (abs ≡): 20.346 s [User: 135.534 s, System: 11.207 s]
2023-01-05 15:03:52 +01:00
kleines Filmröllchen
a205efd900 Meta: Generate manpages for website in parallel
pandoc is a single-threaded and pretty slow application, so we can run
it in the background and "synchronize" before generating section
indices.

Timing results:
Before:
  Time (abs ≡):        59.833 s [User: 49.541 s, System: 6.943 s]
After:
  Time (abs ≡):        20.440 s [User: 133.928 s, System: 12.290 s]

(both generated with hyperfine -p "rm -r output || true" -r 1
	Meta/build-manpages-website.sh )
2023-01-05 15:03:52 +01:00
kleines Filmröllchen
a196fafd0f Meta: Print progress during the website manpage build
This especially helps when building locally.
2023-01-05 15:03:52 +01:00
kleines Filmröllchen
3affa922e3 Meta: Make the manpage website build work with manpage subsection
For now, we create simple but complete indices and actually generate the
HTML for the manpages in subsections. For these purposes, switch to
using "find" as a file finding tool everywhere, instead of the very
limited globs from before.
2023-01-05 15:03:52 +01:00
kleines Filmröllchen
69e5645955 Meta: Remove duplicate manpage section generation for the website 2023-01-05 15:03:52 +01:00
Timothy Flynn
dec96bb00f Base: Remove some old, not particularly useful aliases from .shellrc
Things like games and demos don't really need aliases here.
2023-01-05 13:05:13 +00:00
Timothy Flynn
8c7f6abf58 Games: Add a Cards Settings menu item to Hearts, Solitaire, and Spider 2023-01-05 13:05:13 +00:00
Timothy Flynn
33fd2c1af9 LibCards: Add a helper to create an action to open Cards Settings
This is a useful shortcut to open the settings from within the game
rather than having to go through the system menu.
2023-01-05 13:05:13 +00:00
Timothy Flynn
a2277655c0 Solitaire: Highlight cards beneath dragged cards that are valid targets
If the card beneath the card currently being dragged is a valid drop
target, we will highlight it to indicate this to the user.
2023-01-05 13:05:13 +00:00
Timothy Flynn
2a09807f2e LibCards: Support highlighting cards of interest
For example, in Solitaire, when dragging a card around, it's common for
other implementations to highlight the card underneath the dragged card
if that other card is a valid drop target. This implementation will draw
a rounded rectangle within the edges of the highlighted card, using a
rudimentary complementary color of the board background color.
2023-01-05 13:05:13 +00:00
MacDue
eeb6072f15 LibGfx+LibPDF: Apply subpixel offset in affine transformation 2023-01-05 13:50:26 +01:00
Ben Wiederhake
6c85088952 Documentation: Update QtCreator setup instructions
The biggest difference is that -m32 is no longer important, and in fact
breaks every 64-bit setup.

Also, defining ENABLE_UNICODE_DATA, ENABLE_COMPILETIME_FORMAT_CHECK, and
__SSE__ makes some code "visible" in the #ifdef sense, which improves
syntax highlighting.
2023-01-05 13:20:54 +01:00
MacDue
91db49f7b3 LibPDF: Use subpixel accurate text rendering
This just enables the new tricks from LibGfx with the same nice
improvements :^)
2023-01-05 12:09:35 +01:00
MacDue
6632023498 LibGfx: Enable subpixel accurate text rendering in Painter::draw_text()
This improves kerning and alignment jittering quite a bit :^)
2023-01-05 12:09:35 +01:00
MacDue
ada48a1daf LibGfx: Add ability to request glyphs at subpixel offsets to fonts
This adds the option to pass a subpixel offset when fetching a glyph
from a font, this offset is currently snapped to thirds of a pixel
(i.e. 0, 0.33, 0.66). This is then used when rasterizing the glyph,
which is then cached like usual.

Note that when using subpixel offsets you're trading a bit of space
for accuracy. With the current third of a pixel offsets you can end
up with up to 9 bitmaps per glyph.
2023-01-05 12:09:35 +01:00
MacDue
a1726b1ba5 LibGfx: Avoid rounding/truncating glyph positions till blitting
This keeps some overloads that accept ints to avoid adding calls to
.to_type<float>() all over the place.
2023-01-05 12:09:35 +01:00
Nico Weber
68f678f566 LibGfx+icc: Print if profile id is valid 2023-01-05 10:54:35 +01:00
Nico Weber
fafacbb87b LibCrypto: Add equality operators for Crypto::Hash::Digest<> 2023-01-05 10:54:35 +01:00
Nico Weber
7080aac84f LibGfx: Remove useless name from try_load_from_externally_owned_memory() 2023-01-05 10:54:35 +01:00
Nico Weber
5d4ffd5580 icc: Print profile id 2023-01-05 10:54:35 +01:00
Nico Weber
34a21efef6 LibGfx: East-const-ify ICCProfile::pcs_illuminant() 2023-01-05 10:54:35 +01:00
Nico Weber
d5c8c90ff0 LibGfx: Store profile id MD5 in ICCProfile 2023-01-05 10:54:35 +01:00
Nico Weber
c10a02c405 LibCrypto: Add a Formatter for Crypto::Hash::Digest<> 2023-01-05 10:54:35 +01:00
Nico Weber
1fe3ba17c0 LibCrypto: Use nested namespace specifiers in Hash/ 2023-01-05 10:54:35 +01:00
Nico Weber
27189850d8 LibGfx: Sort ICC parsing functions by spec number 2023-01-05 10:54:35 +01:00
Jelle Raaijmakers
a7806d410a Kernel: Convert 2 instances of dbgln to dmesgln_pci in AC'97 2023-01-05 01:50:35 +01:00
Evan Smal
288a73ea0e Kernel: Add dmesgln_pci logging for Kernel::PCI
A virtual method named device_name() was added to
Kernel::PCI to support logging the PCI::Device name
and address using dmesgln_pci. Previously, PCI::Device
did not store the device name.

All devices inheriting from PCI::Device now use dmesgln_pci where
they previously used dmesgln.
2023-01-05 01:44:19 +01:00
Andreas Kling
6a5be5f1c5 Meta: Add Jelle Raaijmakers to list of project maintainers :^) 2023-01-05 00:32:05 +01:00
John Bundgaard
badfe72b64 SystemMonitor: Update stats/graph immediately on launch
Previously the stats was only updated once the first callback from
refresh_timer fired.

It now makes an early stats update on launch, so something will appear
in the graphs.
2023-01-05 00:12:29 +01:00
Aliaksandr Kalenik
f8ce211201 LibWeb: Generate missing parents for table elements
Implements 3.1 and 3.2 algorithms from:
https://www.w3.org/TR/css-tables-3/#fixup-algorithm
2023-01-05 00:07:44 +01:00
Timothy Flynn
c9e331b320 SoundPlayer: Parse Main::Arguments with Core::ArgsParser
Otherwise running "SoundPlayer --help" on the terminal tries to open a
file named "--help".
2023-01-05 00:06:32 +01:00
Timothy Flynn
9d2884603e LibIPC: Remove declarations of unimplemented IPC::Encoder methods
Should have been removed in af2ae7fda1.
2023-01-04 20:13:54 +01:00
Timothy Flynn
0ae2cef8b4 LibIPC: Move most of DeprecatedString's encoder to StringView's encoder
This was a footgun waiting to happen. The StringView encoder is only
used internally within IPC::Encoder to encode DeprecatedString. It does
not encode its null state nor its length. If someone were to innocently
use the StringView encoder as it is, and then decode a DeprecatedString
on the remote end, the decoding would be corrupt.

This changes the StringView encoder to do the work the DeprecatedString
encoder is currently doing, and the latter now just forwards to it.
2023-01-04 20:13:54 +01:00
Timothy Flynn
7c6b5ed161 LibIPC+LibC: Add and use a helper to encode/decoder container sizes
While refactoring the IPC encoders and decoders for fallibility, the
inconsistency in which we transfer container sizes was a frequent thing
to trip over. We currently transfer sizes as any of i32, u32, and u64.
This adds a helper to transfer sizes in one consistent way.

Two special cases here are DeprecatedString and Vector, whose encoding
is depended upon by netdb, so that is also updated here.
2023-01-04 20:13:54 +01:00
AsciiWolf
40165f5846 Ports: Fix the libmpg123 patch 2023-01-04 20:07:53 +01:00
Nico Weber
beee52dbdc LibRegex: Return StringView from get_error_string()
It just returns literals after all. Removes one use of DeprecatedString.
2023-01-04 20:05:52 +01:00
Nico Weber
5fdef94d53 LibRegex: Tweak get_error() function
- Return StringView instead of DeprecatedString from function
  returning only literals
- Remove redundant cast
- Remove "inline" -- the function is defined in a cpp file,
  so there's no need for the linkage implications of `inline`.
  And compilers know to inline static functions with a single
  use without it. (Normally I'd remove the `static` instead,
  but this is in an `extern "C"` block, and it doesn't matter
  enough to end that block before the helper function and
  reopen it enough after)
2023-01-04 20:04:57 +01:00
Nico Weber
a96f307af1 Everywhere: Make global inline functions not static
`inline` already assigns vague linkage, so there's no need to
also assign per-TU linkage. Allows the linker to dedup these
functions across TUs (and is almost always just the Right Thing
to do in C++ -- this ain't C).
2023-01-04 20:04:57 +01:00
Nico Weber
0a3cc10bb6 Everywhere: Remove some redundant inline keywords
Functions defined inside class bodies (including static functions)
are implicitly inline, no need to type it out.
2023-01-04 20:04:57 +01:00
Simon Danner
5fa8068580 LibPDF: Fix calculation of encryption key
Before this patch, the generation of the encryption key was not working
correctly since the lifetime of the underlying data was too short,
same inputs would give random encryption keys.

Fixes #16668
2023-01-04 11:10:37 -05:00
implicitfield
51f41ea997 LibWeb: Support more presentational hints from the HTML spec
Specifically, this adds support for the align attribute when applied to
heading, paragraph and caption elements.
2023-01-04 11:50:03 +01:00
implicitfield
25af1b33f6 LibWeb: Add spec-mandated rules for embedded content to Default.css 2023-01-04 11:50:03 +01:00
implicitfield
e75eb21a54 LibWeb: Support "start" and "end" values for justify-content 2023-01-04 11:50:03 +01:00
Timothy Flynn
4819ebe831 LibIPC: Remove now-unused stream operator from IPC::Encoder
The fallible encoders are now the only option to encode values.
2023-01-04 11:49:15 +01:00
Timothy Flynn
8b7b03b369 IPCCompiler+LibIPC: Propagate IPC encoder errors
This propagates errors from user-defined encoders up to IPC::Connection.
There, we currently just log the error, as we aren't in a position to
propagate it further (i.e. we are inside a deferred invocation).
2023-01-04 11:49:15 +01:00
Timothy Flynn
ab99ed5fba LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr
In doing so, this removes all uses of the Encoder's stream operator,
except for where it is currently still used in the generated IPC code.
So the stream operator currently discards any errors, which is the
existing behavior. A subsequent commit will propagate the errors.
2023-01-04 11:49:15 +01:00
Timothy Flynn
d0f3f3d5ff LibIPC: Add a Dictionary for-each method for fallible callbacks
Similar to a similar change to JsonObject (13b18a1).
2023-01-04 11:49:15 +01:00
Timothy Flynn
af2ae7fda1 LibIPC: Replace Encoder::encode methods with IPC::encode specializations
Currently, the stream operator overload hides most encoding errors. In
an effort to make IPC encoding fallible, this first replaces the Encoder
overloads with IPC::encode specializations. The return type is still a
boolean, a future commit will change it to ErrorOr.

Note that just like in the analogous decoder commit (9b48362), these
specializations must be defined at the namespace scope. Further, all
arithmetic specializations are now in one method.
2023-01-04 11:49:15 +01:00