Commit graph

39361 commits

Author SHA1 Message Date
Liav A
9dbec601b0 Kernel+SystemServer: Make KCOVDevice a character device
This device should not be a block device, as in Serenity, block devices
represent an interface to either disk partitions or storage devices.
2022-07-10 14:57:55 +02:00
Xexxa
b1ed151c9c Browser: Add Brave and Mojeek to search engines 2022-07-10 14:30:51 +02:00
Ali Mohammad Pur
d348eaf305 LibRegex: Treat inverted Compare entries as disjunctions
[^XYZ] is not(X | Y | Z), we used to translate this to
not(X) | not(Y) | not(Z), this commit makes LibRegex interpret this
pattern as not(X) & not(Y) & not(Z).
2022-07-10 14:26:03 +02:00
Ali Mohammad Pur
fe46b2c141 LibRegex: Correctly track current inversion state in the optimizer
This is currently not important as we do not nest TemporaryInverse.
2022-07-10 14:26:03 +02:00
Ali Mohammad Pur
9c5febe800 LibRegex: Flush compare tables before entering a permanent inverse state 2022-07-10 14:26:03 +02:00
Idan Horowitz
fbeef409c6 DynamicLoader: Stop performing relative relocations on non-pie objects
Co-authored-by: Daniel Bertalan <dani@danielbertalan.dev>
2022-07-10 14:24:34 +02:00
Idan Horowitz
b700d1a474 Kernel: Support sys$connect to LocalSockets with short sockaddr_uns
This is not explicitly specified by POSIX, but is supported by other
*nixes, already supported by our sys$bind, and expected by various
programs. While were here, also clean up the user memory copies a bit.
2022-07-10 14:24:34 +02:00
Idan Horowitz
68980bf711 Kernel: Stop reporting POLLHUP exclusively when available in sys$poll
As per Dr. Posix, unlike POLLERR and POLLNVAL, POLLHUP is only mutually
exclusive with POLLOUT, all other events may be reported together with
it.
2022-07-10 14:24:34 +02:00
Idan Horowitz
08e88bfcad Kernel: Remove unused WriteNotOpen File BlockFlag 2022-07-10 14:24:34 +02:00
Idan Horowitz
275e5cdb64 Kernel: Report POLLNVAL events in sys$poll instead of returning EBADF
As required by Dr. Posix.
2022-07-10 14:24:34 +02:00
Idan Horowitz
e32f6903f6 Kernel: Stop providing POLLRDHUP events in sys$poll by default
Dr. Posix specifies that only POLLERR, POLLHUP & POLLNVAL are provided
by default.
2022-07-10 14:24:34 +02:00
Idan Horowitz
5ca46abb51 Kernel: Set POLLHUP on WriteHangUp in sys$poll instead of POLLNVAL
POLLNVAL signifies an invalid fd, not a write hang up.
2022-07-10 14:24:34 +02:00
Idan Horowitz
020c898290 Kernel: Handle SHUT_RDWR in Socket::shutdown
We were previously assuming that the how value was a bitfield, but that
is not the case, so we must explicitly check for SHUT_RDWR when
deciding on the read and write shutdowns.
2022-07-10 14:24:34 +02:00
Idan Horowitz
a6f237a247 Kernel: Accept SHUT_RD and SHUT_WR as shutdown() how values
The previous check for valid how values assumed this field was a bitmap
and that SHUT_RDWR was simply a bitwise or of SHUT_RD and SHUT_WR,
which is not the case.
2022-07-10 14:24:34 +02:00
Karol Kosek
693d34fe3d LibCompress: Write Deflate window size in the Zlib header
Previously we said that the window size was always 512 bytes, which
caused errors during decompressing in apps outside of Serenity that
actually use this information.
Now, the value is always 7 (32 KiB).

Fixes: #14503
2022-07-10 13:52:18 +03:00
MacDue
72a37e5292 LibWeb: Tiebreak corner color on existence of corresponding borders
This fixes the blue border (that should be white/black -- depending
on the theme) between avatars on GitHub commits.
2022-07-10 12:46:57 +02:00
Russell
cfea934cc8 Base: Add uptime(1) manpage 2022-07-10 11:41:45 +01:00
Daniel Bertalan
5c3b182b7e Meta: Teach pick_host_compiler about Homebrew Clang
Homebrew does not add upstream LLVM's install location to $PATH so as
not to conflict with XCode tools, so we should look for it by its
absolute path. LLVM is installed to /opt/homebrew/opt/llvm on ARM Macs,
and is a symlink that points to the latest stable LLVM version.
2022-07-10 12:38:05 +02:00
networkException
710fb11c73 LibGUI: Allow deleting text editor indent selections in non tab cases
Since 00f51d42d2aeb44ec4813ca13be787c2f5ca55ff we would not allow the
deletion for a selection by typing if it would match the conditions to
indent on pressing tab.

As any single line TextEditor would always match the indent conditions,
it was impossible to replace selected text by typing in a TextBox,
PasswordBox or UrlBox.

A missing return, as pointed out in https://github.com/SerenityOS/serenity/pull/13269#discussion_r900866416
was the cause for the additional checks in
TextEditor::insert_at_cursor_or_replace_selection, described in https://github.com/SerenityOS/serenity/pull/13269#discussion_r901009457
With the early return in place the additional checks are not aiding with
the indented behavior but cause the regression described above.

This patch removes the unnecessary conditions.
2022-07-10 12:20:02 +02:00
Linus Groh
071b92e920 LibJS: Fix typos in Temporal spec comments
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/b0411b4
2022-07-10 01:29:28 +02:00
Linus Groh
fb2012dfc7 LibJS: Add Add IsValidISODate assertions
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/46f97ea
2022-07-10 01:22:34 +02:00
Linus Groh
530ea583c1 Meta: Remove accidantally committed 'test' file
Just confirming that js's save(), in fact, still works.
2022-07-10 01:14:18 +02:00
Linus Groh
79fb149b36 js: Add missing built-in functions to help() output 2022-07-10 01:11:52 +02:00
Linus Groh
3c845b0ea4 js: Remove load() built-in function
This is no longer needed now that we have ES modules.
2022-07-10 01:11:52 +02:00
Andreas Kling
89e65e0ea1 LibWeb: Support flex item cross sizing based on intrinsic aspect ratio
This patch implements case B from the "determine the flex base size
and hypothetical main size of each item" from the flexbox algorithm.

https://drafts.csswg.org/css-flexbox-1/#algo-main-item
2022-07-10 00:47:46 +02:00
Andreas Kling
8eb022a57d LibWeb: Don't include flex line margins in inner flex item cross sizes
In cases where flex item cross size is based on the flex line cross
size, the spec specifically says to transfer the *outer* cross size of
the line. We were ignoring the "outer" part.

This patch fixes that by subtracting the cross margins from the size.
2022-07-10 00:04:41 +02:00
Andreas Kling
030dbfd2a9 LibWeb: Improve support for flex-start/end with reversed flex-direction
We now pass the "flex-direction" test from the CSSWG flexbox test suite.
2022-07-10 00:04:41 +02:00
kleines Filmröllchen
41b2d37e8a AK: Always check shift amount in LEB128 read functions
Even shifting 0 by more than the value size is UB.
2022-07-09 22:04:31 +00:00
Andreas Kling
cefc931347 LibWeb: Make sure CSS::ComputedValues has initial size values
Instead of using Optional<LengthPercentage>, we now use LengthPercentage
for these values. The initial values are all `auto`.

This avoids having to check `has_value()` in a ton of places.
2022-07-09 22:16:35 +02:00
Andreas Kling
734ff422ad LibWeb: Add LengthPercentage::is_auto() convenience helper
This lets you ask if a LengthPercentage is `auto` with one call instead
of two, which will make some conditions nicer to express.
2022-07-09 22:16:32 +02:00
Andreas Kling
44025e837f LibGfx: Use float when calculating text width in ScaledFont
This fixes an issue where we'd truncate the fractional part of each
glyph width, often making the returned width slightly too short.
2022-07-09 22:16:18 +02:00
Andreas Kling
80ed7d220c LibGfx: Paint whitespace characters (including &nbsp;) as empty space
This fixes an issue where &nbsp; would sometimes render as "A" in
web content.
2022-07-09 22:16:13 +02:00
Andreas Kling
2217d91b8d AK: Make VERIFY() work in MinSizeRel builds 2022-07-09 22:15:43 +02:00
Lucas CHOLLET
dab814ea11 LibCrypto: Add the [[nodiscard]] qualifier in both BigInteger classes 2022-07-09 15:55:32 +00:00
Maciej
303be38f65 Kernel/Routing: Hide some leftover debugging under a debug flag 2022-07-09 16:53:26 +03:00
Lucas CHOLLET
6f04a3778b FileManager: Change PGID of spawned processes
Processes spawned by FileManager (e.g. through double-click) now set
their PGID to that of the session leader. It allows the filemanage
instance to be killed without propagating the signal to the new process.
2022-07-09 11:41:07 +01:00
Allan Regush
63d06458ca AK: Add equality operators to compare RefPtr to NonNullRefPtr 2022-07-09 09:32:51 +01:00
Allan Regush
ce7d868d6b AK: Add comparison operators to NonnullRefPtr 2022-07-09 09:32:51 +01:00
MacDue
61a703816c LibWeb: Base marker size on font height rather than line height
This fixes the oversized markers on GitHub
2022-07-09 09:28:31 +01:00
kleines Filmröllchen
69218b92a5 LibCore+Userland: Use StringViews when calling Core::System::open
For some reason we used raw char pointers sometimes, which caused at
least one heap buffer overflow detected in fuzzing.
2022-07-09 09:25:20 +01:00
Maciej
7dd3c5c981 Applications: Add a new NetworkSettings application 2022-07-09 09:22:25 +01:00
Maciej
df7b7cbfa4 NetworkServer: Kill running DHCPServer before starting our own
We cannot run two DHCPServers at once, let's just kill the one that was
started previously.
2022-07-09 09:22:25 +01:00
Maciej
8526c3f680 NetworkServer: Clear default gateway route entry before adding 2022-07-09 09:22:25 +01:00
Maciej
20430ffeae route: Support removing entries with unknown gateway 2022-07-09 09:22:25 +01:00
Maciej
bea1668159 Kernel/Net: Support removing route entries with unknown gateway
If you specify gateway as 0.0.0.0, the SIOCDELRT ioctl will remove all
route entries that match all the other arguments.
2022-07-09 09:22:25 +01:00
Maciej
36676a1604 AK: Add IPv4Address::netmask_from_cidr 2022-07-09 09:22:25 +01:00
Ali Mohammad Pur
b85666b3d2 LibRegex: Fix lookup table-based range checks in Compare
The lowercase version of a range is not required to be a valid range,
instead of casefolding the range and making it invalid, check twice with
both cases of the input character (which are the same as the input if
not insensitive).
This time includes an actual test :^)
2022-07-09 01:00:44 +00:00
Brian Gianforcaro
b7c50f7094 Base: Add -ftrivial-auto-var-init to man7/Mitigations.md 2022-07-09 00:53:45 +00:00
Tim Schumacher
a813b941b8 Ports: Add a QEMU port 2022-07-08 22:27:38 +00:00
Tim Schumacher
5835373fc6 Ports: Add a port for pixman 2022-07-08 22:27:38 +00:00