Commit graph

54459 commits

Author SHA1 Message Date
Liav A
82428e2a05 Kernel/TTY: Protect SlavePTY pointer with proper spinlock
Instead of using a LockRefPtr, we could easily use SpinlockProtected to
ensure proper locking of this pointer.
2023-09-09 12:08:59 -06:00
Liav A
b55199c227 Kernel: Move TTY-related code to a new subdirectory under Devices
The TTY subsystem is represented with unix devices, so it should be
under the Devices directory like the Audio, Storage, GPU and HID
subsystems.
2023-09-09 12:08:59 -06:00
Tim Schumacher
c99c065a40 Ports/acpica-tools: Ignore unknown warning options
-Wlogical-op, -Wmissing-parameter-type, and -Wold-style-declaration
are unknown to Clang. While this isn't fatal by itself, it is very
noisy.
2023-09-09 11:28:59 -06:00
Tim Schumacher
1875d373e5 Ports/acpica-tools: Don't treat warnings as errors
This also removes existing patches that were trying to fix warnings
one-by-one.

Note that the patch making `CurrentSp` static was incorrect, the
variable needs to be on the stack for us to retrieve the current stack
address.
2023-09-09 11:28:59 -06:00
Jakub Berkop
54e79aa1d9 Kernel+ProfileViewer: Display additional filesystem events 2023-09-09 11:26:51 -06:00
Jakub Berkop
c184a0786f Kernel: Protect access to PerformanceEventBuffer strings with spinlock 2023-09-09 11:26:51 -06:00
kleines Filmröllchen
a0bcc9dd83 LibAudio: Skip empty MP3 scale factor bands in stereo intensity process
These were intentionally set up to be at the end of the granule size,
but since the stereo intensity loop is intentionally using a <= end
comparison (that’s how the scale factor bands work), we must skip these
dummy bands which would otherwise cause an out-of-bounds index.
2023-09-09 11:23:57 -06:00
kleines Filmröllchen
24f5914d18 LibAudio: Prevent overflow in QOA LMS prediction 2023-09-09 11:23:57 -06:00
kleines Filmröllchen
ede8582def LibAudio: Check more FLAC partition order constraints as per the spec 2023-09-09 11:23:57 -06:00
kleines Filmröllchen
dcc3d7bc35 LibAudio: Treat FLAC bps <= wasted_bps as error instead of crash
This can happen with some weird inputs, so instead, return an error; we
need at least one “effective” bit per sample so the bits per sample
cannot be less than or equal to the wasted bits per sample.
2023-09-09 11:23:57 -06:00
kleines Filmröllchen
c776ebcaf6 LibAudio: Only check subframe size if sample rate is constant 2023-09-09 11:23:57 -06:00
kleines Filmröllchen
1bf81f84a0 LibAudio: Perform all seekpoint binary searches with comparisons
One was missed in the previous fix
2023-09-09 11:23:57 -06:00
kleines Filmröllchen
2b61193b71 LibAudio: Account for garbage shifts in several places in FLAC loader 2023-09-09 11:23:57 -06:00
kleines Filmröllchen
b432674923 LibAudio: Prevent overflows during prediction
Saturating arithmetic leads to less screwed up audio in these cases.
2023-09-09 11:23:57 -06:00
Ali Caglayan
0347d04289 Ladybird: Add ladybird.nix to nix flake in Toolchain/
Add another dev shell to `Toolchain/flake.nix` called `ladybird.nix`
that pulls in the dependencies for building Ladybird.

Also update the documentation to mention building with a flake.
2023-09-09 11:22:00 -06:00
Sergey Bugaev
54265cec1c AK: Add InvokeResult 2023-09-09 11:21:15 -06:00
Dan Klishch
4c4e1e1aed JSSpecCompiler: Add if branch merging pass
It merges standalone IfBranch/ElseIfBranch nodes into IfElseIfChain
nodes. This will ease CFG generation later.
2023-09-09 11:20:43 -06:00
Dan Klishch
092ed1cc8a JSSpecCompiler: Allow storing NullableTrees in nodes
And use this in ElseIfBranch node.
2023-09-09 11:20:43 -06:00
Dan Klishch
4eede5282c JSSpecCompiler: Allow storing error text in ErrorNode
This will be the main way to communicate errors from compilation passes.
2023-09-09 11:20:43 -06:00
Dan Klishch
72794e7843 JSSpecCompiler: Add function call canonicalization pass
It simplifies ladders of BinaryOperators nodes in the function call
arguments into nice and neat FunctionCall node. Ladders initially appear
since I do not want to complicate expression parser, so it interprets
`f(a, b, c, d)` as `f "function_call_operator" (a, (b, (c, d))))`.
2023-09-09 11:20:43 -06:00
Dan Klishch
1c4cd34320 JSSpecCompiler: Restrict usage of NodeSubtreePointer
This class stores a non-owning raw pointer to a member of `Node`, so
extra care is needed to ensure that referenced `Node`s will be alive
by the time `NodeSubtreePointer` is used. Since we only need to use this
class while traversing AST in `RecursiveASTVisitor`, access to class
methods can be restricted using `Badge<RecursiveASTVisitor>`.
2023-09-09 11:20:43 -06:00
Karol Kosek
f789d26e37 LibIMAP+Mail: Rename MultiPartBody's mime_type to multipart_subtype 2023-09-09 11:19:37 -06:00
Karol Kosek
642a3f85ef LibIMAP: Parse body-type-msg to spec 2023-09-09 11:19:37 -06:00
Karol Kosek
4a92d712ea LibIMAP: Don't parse starting space directly in parse_envelope
Makes parse_envelope() look like the defined ABNF rule and the parser
will no longer try to consume double spaces in body-type-msg.
2023-09-09 11:19:37 -06:00
Karol Kosek
e9cf35fd60 LibIMAP: Parse body-ext-1part for every one part body type
Previously we were only doing it only for body-type-text, which isn't
correct to spec.

Fixes a crash when parsing a BODYSTRUCTURE response on a mail with
attachments.
2023-09-09 11:19:37 -06:00
Karol Kosek
a61a66c685 LibIMAP: Simplify parsing one part body structure
Each branch was very similar, so let's merge common parts together for
clarity. Also added corresponding ABNF rules names while I'm here. :^)

No behavior change.
2023-09-09 11:19:37 -06:00
Timothy Flynn
2eb9f3f639 Ladybird: Install the Audio Unit plugin on macOS 2023-09-09 13:03:36 -04:00
Timothy Flynn
759e07579e LibAudio: Implement PlaybackStream for macOS using Audio Unit framework
https://developer.apple.com/documentation/audiounit

Apple has a number of audio frameworks we could use. This uses the Audio
Unit framework, as it gives us most control over the rendering of the
audio frames (such as being able to quickly pause / discard buffers).
From some reading, we could implement niceties such as fading playback
in and out while seeking over a short (10ms) period. This patch does not
implement such fancy features though.

Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
2023-09-09 13:03:36 -04:00
Timothy Flynn
d0fd34112f LibJS: Remove the now-unused ThrowableStringBuilder 2023-09-09 13:03:25 -04:00
Timothy Flynn
573cbb5ca0 LibJS+LibWeb+WebContent: Stop using ThrowableStringBuilder 2023-09-09 13:03:25 -04:00
Timothy Flynn
54d1f4e234 LibJS: Stop propagating small OOM errors from the Error object 2023-09-09 13:03:25 -04:00
Timothy Flynn
df915f8a98 LibWeb: Add missing return statement to bail from a stream read request
As the spec states, we should invoke the failureSteps and abort.
2023-09-09 13:03:25 -04:00
Timothy Flynn
d1a1ace77a LibJS: Stop propagating small OOM errors from the String object 2023-09-09 13:03:25 -04:00
Timothy Flynn
02a8683266 LibUnicode+LibJS: Stop propagating small OOM errors from normalization
This API only perform small allocations, and is only used by LibJS.
2023-09-09 13:03:25 -04:00
Tim Ledbetter
331991f9c4 find: Allow '+' and '-' prefix for -links and -size options
The presence of this prefix denotes that the value being tested is
strictly greater than or less than the given numeric value.
2023-09-09 11:02:18 -06:00
Konrad Bartecki
773a64aa5a LibWebSocket: Adds capability for receiving fragmented messages 2023-09-09 10:59:59 -06:00
Tim Ledbetter
d277d2e1fb find: Add ! operator to negate the following command 2023-09-09 10:57:17 -06:00
Andrew Kaster
6952de73dc Ladybird: Add WebContentService for Android port
This will let us spawn a new process for an Android Service to handle
all our WebContent needs. The ServiceConnection is manged by each
WebView. The lifecycle of the Service is not quite clear yet, but each
bindService call will get a unique Messenger that can be used to
transfer the WebContent side of the LibIPC socketpair we use in other
ports.
2023-09-09 10:53:30 -06:00
Reza
ffc0046d74 Snake: Replace DeprecatedString with String 2023-09-09 10:50:03 -06:00
Shannon Booth
d312fdc2d3 LibWeb: Port CanvasRenderingContext2D from DeprecatedString to String 2023-09-09 10:47:12 -06:00
Shannon Booth
da1f137967 LibWeb: Port MutationRecord from DeprecatedString to String 2023-09-09 10:47:12 -06:00
Shannon Booth
75133cf733 LibWeb: Port NamedNodeMap from DeprecatedString to String
The conversion which is required here is unfortunately quite ugly, but
in the spirit of making forwards progress, just leave a FIXME for our
future selves to deal with.
2023-09-09 10:47:12 -06:00
Shannon Booth
f5efe9bb63 LibWeb: Port CSSStyleDeclaration from DeprecatedString to String 2023-09-09 10:47:12 -06:00
Liav A
fbc4370c44 Base: Remove remainders of /sys/kernel/variables from sys(7) manual page
The directory was renamed to be /sys/kernel/conf, so let's reflect this
in the manual page as well.
2023-09-09 10:25:41 -06:00
Liav A
13f9b9282e Base: Remove remainders of /sys/kernel/constants from sys(7) manual page
There's no constants directory anymore under /sys/kernel, so bring all
the described nodes back to the "kernel" directory entries list.
2023-09-09 10:25:41 -06:00
DaftMouse
29c89d3b95 Kernel: Implement scrolling critical messages vga text mode console 2023-09-09 10:18:17 -06:00
DaftMouse
6f7f0b3a8c Kernel: Implement scrolling critical messages in framebuffer console 2023-09-09 10:18:17 -06:00
Aliaksandr Kalenik
df2bc8187c LibWeb: Use actual line height to calculate float y in IFC
Before, we were using the line height from NodeWithStyle::line_height()
 to calculate the y offset for floats inside the IFC. However, this
value doesn't always correspond to the actual height of a line box. For
instance, adding a fragment for an inline-block might change the height
of the line box. With this change, we recalculate the height of the
line box after adding a new fragment and use this recalculated height
value to determine the y position for floats.

Fixes https://github.com/SerenityOS/serenity/issues/20982
2023-09-09 17:05:22 +02:00
James Williams
6ab11e5f44 Documentation: Correct link to flake.nix in BuildInstructionsOther.md 2023-09-09 08:35:05 -06:00
Sam Atkins
b1a569c1c5 LibWeb: Stop crashing when textarea element is modified before insertion
If an element is created from JS, it might have its contents modified
before it is inserted into the document. In this case, we don't have a
shadow tree yet and so trying to set m_text_node's text content would
cause a null dereference. So let's not do that. :^)

That case also means that by the time we do create the shadow tree, we
have the text content already, so we can set it there.

Added a test to verify that we don't crash, and that the text content
appears in the textarea whether it was inserted by JS or by the HTML
parser.
2023-09-09 13:52:01 +01:00