Commit graph

46674 commits

Author SHA1 Message Date
Nico Weber
913119b492 LibGfx: Use size_t instead of unsigned in ICC loops 2023-02-08 19:44:03 +00:00
Tim Ledbetter
4b604f702e PixelPaint: Correct move tool alignment with the layer boundary
Previously, the move tool outline could "wobble" relative to the layer
boundary. This caused the layer boundary to appear and disappear when
zooming. With this commit, the layer boundary is always drawn behind
the move tool outline.
2023-02-08 20:29:48 +01:00
Tim Ledbetter
cc18d6fd25 PixelPaint: Use image coordinates for bucket tool bounds checking
Previously, layer coordinates were being used to check whether the
bucket tool was within the bounds of the current selection, rather
than image coordinates.
2023-02-08 20:28:55 +01:00
Tim Schumacher
e8d5e938de AK: Remove the deprecated Stream implementation :^) 2023-02-08 19:18:26 +00:00
MacDue
63b11030f0 Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
MacDue
1c92e6ee9d Ladybird: Don't overwrite argv[0] in spawn_helper_process()
This is already set correctly at the caller.
2023-02-08 19:15:45 +00:00
MacDue
8483efb399 AK: Add ReadonlySpan<T> as an alias for Span<T const>
This is a little clearer than Span<T const> where it looks like it's
the T not the underlying array that's const.
2023-02-08 19:15:45 +00:00
Julian Offenhäuser
b1793868b0 Ports: Add OpenRCT2 2023-02-08 19:06:42 +00:00
Julian Offenhäuser
839c23417d Ports: Add speexdsp 2023-02-08 19:06:42 +00:00
Julian Offenhäuser
1f207282a1 Ports: Add nlohmann-json 2023-02-08 19:06:42 +00:00
Julian Offenhäuser
32e9293ce0 Ports: Add flac 2023-02-08 19:06:42 +00:00
Julian Offenhäuser
463ab21305 LibC: Add strcasestr()
strcasestr() behaves exactly like strstr(), except it ignores case for
both inputs. This function is a nonstandard extension.
2023-02-08 19:06:42 +00:00
Zaggy1024
25c9dfbf90 Tests/LibVideo: Test to ensure that VP9 reference vector clamping works
The test file is a short clip from Big Buck Bunny, so a license file
was added to the directory to attribute it.
2023-02-08 18:56:42 +00:00
Zaggy1024
df313c3dc5 LibVideo/VP9: Clamp motion vectors again in find_mv_refs function
The clamping was previously removed apparently, which was unintended
and caused some files to fail to decode properly.
2023-02-08 18:56:42 +00:00
Zaggy1024
c18728989e LibVideo/VP9: Remove magic numbers for the uncompressed ref frames
This also adds a fixme to Symbols.h to group and rename the definitions
in the file.
2023-02-08 18:56:42 +00:00
Zaggy1024
24f3069129 LibVideo/VP9: Remove debug output from TreeParser 2023-02-08 18:56:42 +00:00
Tim Schumacher
a86184c997 AudioServer: Use AK::Stream to serialize mixed samples 2023-02-08 18:51:02 +00:00
Tim Schumacher
185787d29d TelnetServer: Use AK::Stream to serialize commands 2023-02-08 18:51:02 +00:00
Tim Schumacher
43f36d5e7f LibTLS: Use AK::Stream for serializing TLS packets
We are working with a MemoryStream, so our stream operations shouldn't
ever fail as long as we stay in-bounds, so `MUST` is fine.
2023-02-08 18:51:02 +00:00
Tim Schumacher
a6bcad551d LibCrypto: Use AK::Stream for pretty printing DER 2023-02-08 18:50:53 +00:00
Tim Schumacher
f5fb1396e8 LibCrypto: Use ErrorOr error handling for parsing DER
This replaces a mixture of `Result`, `Optional`, and a custom error enum
with our usual `ErrorOr`-based error handling.
2023-02-08 18:50:53 +00:00
Tim Schumacher
e80eb09fe5 LibGfx: Use AK::Stream to serialize and deserialize bitmaps 2023-02-08 18:50:43 +00:00
Tim Schumacher
6ea3c1659a LibGfx: Propagate errors from serializing bitmaps
We essentially just end up moving `release_value_but_fixme_...` one
layer down, but it makes adding more fallible operations in the
serialization function more comfortable.
2023-02-08 18:50:43 +00:00
Tim Schumacher
81863eaf57 Kernel: Use AK::Stream to write packed binary data 2023-02-08 18:50:31 +00:00
Tim Schumacher
23e10a30ad Kernel: Modernize Error handling when serializing directory entries 2023-02-08 18:50:31 +00:00
Undefine
ccc871e608 LibCore: Propagate errors in SecretString 2023-02-08 19:49:48 +01:00
Xexxa
b4f47935a5 Base: Add more emoji
💪 - U+1F4AA FLEXED BICEPS
🐕‍🦺 - U+1F415 U+200D U+1F9BA SERVICE DOG
🧈 - U+1F9C8 BUTTER
🚚 - U+1F69A DELIVERY TRUCK
🕰️ - U+1F570 MANTELPIECE CLOCK
🏸 - U+1F3F8 BADMINTON
🥻 - U+1F97B SARI
2023-02-08 19:48:49 +01:00
Rodrigo Tobar
e4a7606b81 LibPDF: Construct accented characters with Type1 seac command
The seac command provides the base and accented character that are
needed to create an accented character glyph. Storing these values is
all that was left to properly support these composed glyphs.
2023-02-08 19:47:15 +01:00
Rodrigo Tobar
3eaa27f53a LibPDF: Add infrastructure for accented character glyphs
Type1 accented character glyphs are composed of two other glyphs in the
same font: a base glyph and an accent glyph, given as char codes in the
standard encoding. These two glyphs are then composed together to form
the accented character.

This commit adds the data structures to hold the information for
accented characters, and also the routine that composes the final glyph
path out of the two individual components. All glyphs must have been
loaded by the time this composition takes place, and thus a new
protected consolidate_glyphs() routine has been added to perform this
calculation.
2023-02-08 19:47:15 +01:00
Rodrigo Tobar
11a9bfd4b6 LibPDF: Turn Glyph into a class
Glyph was a simple structure, but even now it's become more complex that
it was initially. Turning it into a class hides some of that complexity,
and make sit easier to understand to external eyes.

While doing this I also decided to remove the float + bool combo for
keeping track of the glyph's width, and replaced it with an Optional
instead.
2023-02-08 19:47:15 +01:00
Rodrigo Tobar
c084943457 LibPDF: Index Type1 glyphs by name, not char code
Storing glyphs indexed by char code in a Type1 Font Program binds a Font
Program instance to the particular Encoding that was used at Font
Program construction time. This makes it difficult to reuse Font Program
instances against different Encodings, which would be otherwise
possible.

This commit changes how we store the glyphs on Type1 Font Programs.
Instead of storing them on a map indexed by char code, the map is now
indexed by glyph name. In turn, when rendering a glyph we use the
Encoding object to turn the char code into a glyph name, which in turn
is used to index into the map of glyphs.

This is the first step towards reusability of Type1 Font Programs. It
also unlocks the ability to render glyphs that are described via the
"seac" command (standard encoding accented character), which requires
accessing the base and accent glyphs by name.
2023-02-08 19:47:15 +01:00
Rodrigo Tobar
f99c9dc11a LibGfx: Add the ability to append a Path into another
This is useful in general (I'd imagine), but in particular having this
will allow us to implement accented PDF Type1 Font glyphs, which consist
of two separate glyphs that are composed into a single one.
2023-02-08 19:47:15 +01:00
Rodrigo Tobar
596119cf3e LibPDF: Add placeholders for *flex Type2 commands
These should be implemented properly in the future, but for now we are
adding the as placeholders to avoid crashes.
2023-02-08 19:47:15 +01:00
Rodrigo Tobar
64bbe431b5 LibPDF: Add char_code -> name mapping function
We already keep both mappings internally, now it's time to actually use
it.
2023-02-08 19:47:15 +01:00
Rodrigo Tobar
82bd854d6f LibPDF: Account for other endings of PS1 Encoding array 2023-02-08 19:47:15 +01:00
Rodrigo Tobar
a533ea7ae6 LibPDF: Improve stream parsing
When parsing streams we rely on a /Length item being defined in the
stream's dictionary to know how much data comprises the stream. Its
value is usually a direct value, but it can be indirect. There was
however a contradiction in the code: the condition that allowed it to
read and use the /Length value required it to be a direct value, but the
actual code using the value would have worked with indirect ones. This
meant that indirect /Length values triggered the fallback, "manual"
stream parsing code.

On the other hand, this latter code was also buggy, because it relied on
the "endstream" keyword to appear on a separate line, which isn't always
the case.

This commit both fixes the bug in the manual stream parsing scenario,
while also allowing for indirect /Length values to be used to parse
streams more directly and avoid the manual approach. The main caveat to
this second change is that for a brief period of time the Document is
not able to resolve references (i.e., before the xref table itself is
not parsed). Any parsing happening before that (e..g, the linearization
dictionary) must therefore use the manual stream parsing approach.
2023-02-08 19:47:15 +01:00
Timothy Flynn
8670526f2a LibJS+LibLocale: Propagate OOM from CLDR RelativeTime Vector operations 2023-02-08 18:32:37 +00:00
Timothy Flynn
340434ce09 LibLocale: Propagate OOM from CLDR DateTime Vector and String operations 2023-02-08 18:32:37 +00:00
Timothy Flynn
89da8de4ca LibJS+LibLocale: Propagate OOM from CLDR NumberFormat Vector operations 2023-02-08 18:32:37 +00:00
Timothy Flynn
858126d236 LibJS: Propagate OOM from remaining Intl Vector operations 2023-02-08 18:32:37 +00:00
Timothy Flynn
9af525bbb0 LibJS: Propagate OOM from Intl.RelativeTimeFormat Vector operations 2023-02-08 18:32:37 +00:00
Timothy Flynn
cb8b2209c1 LibJS: Propagate OOM from Intl.ListFormat Vector operations 2023-02-08 18:32:37 +00:00
Timothy Flynn
c1c54fad96 LibJS: Propagate OOM from Intl.DurationFormat Vector operations 2023-02-08 18:32:37 +00:00
Timothy Flynn
fb8fd757e6 LibJS: Propagate OOM from Intl.DateTimeFormat Vector operations 2023-02-08 18:32:37 +00:00
Timothy Flynn
822ee35f7a LibJS: Propagate OOM from Intl.NumberFormat Vector operations 2023-02-08 18:32:37 +00:00
Timothy Flynn
ea13f3e285 LibJS: Propagate OOM from PatternPartitionWithSource factory 2023-02-08 18:32:37 +00:00
Timothy Flynn
e86eafe65e LibJS: Replace remaining uses of StringBuilder in the Intl namespace 2023-02-08 18:32:37 +00:00
Itamar
951a8269f0 Debugger: Support attaching to a running process 2023-02-08 19:23:07 +01:00
Itamar
26250fe14a LibDebug: Add static attach() function
This function is similar to exec_and_attach(), but instead of spawning
a new process and debugging it, it attaches to an existing process.
2023-02-08 19:23:07 +01:00
Itamar
ddec9cb1f0 Kernel: Update stored registers in a thread's tracer on SIGSTOP
This is needed so we can retrieve the registers of a traced
thread that was attached to while it was running.

Attaching with ptrace to a running thread sends SIGSTOP to it.
2023-02-08 19:23:07 +01:00