Commit graph

45203 commits

Author SHA1 Message Date
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
Taj Morton
31eeea08ba Kernel/FileSystem: Fix handling of FAT names that don't fill an entry
* Fix bug where last character of a filename or extension would be
   truncated (HELLO.TXT -> HELL.TX).
 * Fix bug where additional NULL characters would be added to long
   filenames that did not completely fill one of the Long Filename Entry
   character fields.
2023-01-04 09:02:13 +00:00
Taj Morton
f2253d11e5 Documentation: Add how to update build to use SerenityOS-provided CMake 2023-01-04 09:02:13 +00:00
Taj Morton
a91fc697bb Kernel/FileSystem: Remove FIXME about old/new path being the same
Added comment after confirming that Linux and OpenBSD implenment the
same behavior.
2023-01-04 09:02:13 +00:00
Jelle Raaijmakers
d57e9b53a0 LibGL: Implement GL_BLEND_DST and GL_BLEND_SRC
These context parameters are used to retrieve the active blend
functions.
2023-01-03 19:49:31 -05:00
Jelle Raaijmakers
215d68baf6 Ports: Remove gltron patch for glext.h
This is no longer necessary since we have resolved most conflicts with
SDL2's version of the GL constants.
2023-01-03 19:48:16 -05:00
Jelle Raaijmakers
c2b3a7a524 Ports: Unbreak ScummVM icon pack generation
The ScummVM icon repository no longer accepts "1970-01-01" as a valid
start date for the icon pack generation. We now use the oldest commit
date in the repository which _is_ accepted.
2023-01-03 19:47:29 -05:00
djwisdom
c1d4fc2d0b Ports: Update serenity-theming use latest commit 7a39b7d 2023-01-03 16:13:54 -08:00
Tim Schumacher
77ea609cd3 Lagom: Fix up a missed usage of Compress::Zlib in the fuzzers 2023-01-03 23:26:45 +01:00
MacDue
c7ab6daf26 LibGUI: Stop duplicating mouse events of cursor tracking widget
Previously we didn't always return when there was an automatic cursor
tracking widget. This meant for certain events e.g. a MouseUp over
the tracking widget, the event would be fired twice on the same widget
(once on `m_automatic_cursor_tracking_widget` then again on
`result.widget` outside the if).

Fixes #16737
2023-01-03 21:25:08 +01:00
martinfalisse
25a60f988a LibWeb: Conditionally draw borders for table elements
When the border-collapse property is given for a table with the
`collapse` property, only the inner borders should be drawn.
2023-01-03 20:02:47 +01:00
martinfalisse
d467a0a730 LibWeb: Use the layout_state border values when drawing borders
This will be useful for conditionally drawing borders in the
TableFormattingContext.
2023-01-03 20:02:47 +01:00
martinfalisse
ba5e0607fd Base: Add test page for table 2023-01-03 20:02:47 +01:00
martinfalisse
64c353f11c LibWeb: Parse border-collapse property for HTML table 2023-01-03 20:02:47 +01:00
martinfalisse
25f612f32b LibWeb: Prevent column sizing errors for html table
Previously when there was no difference between the sum of the
max and min-widths of all columns of a table, it would result in a NaN
value being set as the column's width as there was a division by 0.

This would result in 2+ column tables being reduced to only 1 column.
2023-01-03 20:02:47 +01:00
Timothy Flynn
c88aa21302 Meta: Mark myself a CODEOWNER of some paths to be alerted of related PRs 2023-01-03 19:51:49 +01:00
Linus Groh
b9913f9441 LibGfx: Fix typos in ICC spec comments 2023-01-03 18:53:20 +01:00
yyny
fb2be937ac Kernel: Allow sending SIGCONT to processes in the same group
Allow sending `SIGCONT` to processes that share the same `pgid`.
This is allowed in Linux aswell.

Also fixes a FIXME :^)
2023-01-03 18:13:11 +01:00
yyny
9ca979846c Kernel: Add sid and pgid to Credentials
There are places in the kernel that would like to have access
to `pgid` credentials in certain circumstances.

I haven't found any use cases for `sid` yet, but `sid` and `pgid` are
both changed with `sys$setpgid`, so it seemed sensical to add it.

In Linux, `man 7 credentials` also mentions both the session id and
process group id, so this isn't unprecedented.
2023-01-03 18:13:11 +01:00
Jelle Raaijmakers
456a8436b5 LibGL: Remove i686 data types in favor of 64-bit types 2023-01-03 18:11:37 +01:00
Jelle Raaijmakers
62092a329d LibGL: Make GLsizeiptr signed
The Khronos description of a "non-negative binary integer" does not mean
an unsigned type, just that it should not be negative.
2023-01-03 18:11:37 +01:00
Linus Groh
e7627af555 Meta: Add CODEOWNERS file
These are the areas of the system where I'd like GitHub to inform me
about changes, other maintainers are of course free to add themselves.

Subscribing to all notifications and using email filters is no longer
practical :^)

https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
2023-01-03 12:10:56 -05:00
Srikavin Ramkumar
56efd60755 LibWeb: Add stub reset algorithm for HTMLOutputElement 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
119e58a8c1 LibWeb: Add stub reset algorithm for HTMLTextAreaElement 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
b55c9f36dc LibWeb: Implement reset algorithm for HTMLSelectElement 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
de44e0faf5 LibWeb: Implement reset algorithm for HTMLInputElement 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
6032d122c2 LibWeb: Implement reset button behavior 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
7cc6ffe5b7 LibWeb: Implement HTMLFormElement::reset
This patch sets up the necessary infrastructure for implementing reset
algorithms for form-associated controls.
2023-01-03 18:09:40 +01:00
MacDue
2376385f0c LibGfx: Improve AA stroke_path() line intersections a little
- Simplify both straight lines case
- Simplify rotation by constant 90 degrees
- Remove some unnecessary rounding and hacks
2023-01-03 18:08:22 +01:00
MacDue
d140d0f880 LibGfx: Add Rect::translated(dboth)
This corresponds to the current in place Rect::translate_by(dboth).
2023-01-03 18:08:22 +01:00
Vetrox
5080126095 LibWeb: CSS don't set resolve-failures (var/attr)
Previously when resolving an attr or var-defined property
with a 'not-set' value like this `property: var(--ValueNotSet)`,
we left the property unchanged (as an unresolved) and
added it to the computed-style of the element.
We still don't change the property but rather we now also don't set
unresolved properties in the computed-style.
This is an intended behavior.

The specification suggests that, on resolving an attr or var property
(custom properties) we have an invalid property when neither the
variable inside the var, nor the backup value could be resolved.

An invalid property must be inherited or defaulted depending on it's
type. We already do this with every 'untouched'
(as in m_property_values contains no entry for it) value.
So not setting the property results in an inherited (or initial)
value by a later-called function.

This also fixes another problem, where
`text-decoration: var(--NotSet)`
wouldn't be inherited because the computed-style of the
parent element hasn't set `text-decoration` but rather
all it's long-versions like `text-decoration-line` and so on.
2023-01-03 18:07:28 +01:00
kleines Filmröllchen
b36d09bab0 Documentation: Document fix for missing /etc/mtab
/etc/mtab is identical to /proc/self/mounts, but it does not exist under
many circumstances, e.g. chroot'ed or in WSL. The fact that many
userspace programs rely on this file existing and the user needing to
create symlinks manually has been a long-standing issue (there's pretty
old forum posts on Debian and Arch Linux forums about it), but it's not
fixed upstream. This short mention should save people some time.
2023-01-03 18:02:16 +01:00
Vetrox
2afe9f574e Documentation: Add Neovim configuration documentation 2023-01-03 17:59:08 +01:00
Lucas CHOLLET
2eeaba3f1d LibGfx: Use the Midpoint Ellipse Algorithm for filled ellipses 2023-01-03 17:58:11 +01:00
Lucas CHOLLET
d2372464a2 LibGfx: Put the Midpoint Ellipse Algorithm in its own function 2023-01-03 17:58:11 +01:00
Timothy Flynn
9c5915b5b4 Screensaver: Add a screensaver launcher application
Similar to the Settings application, this adds a single Screensaver
application to launch all screensaver demos. This is to declutter the
taskbar menu a bit.
2023-01-03 17:56:55 +01:00