Commit graph

54489 commits

Author SHA1 Message Date
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
Zaggy1024
883f44d397 LibWeb: Use CSSPixels only when calculating radial gradient sizes
In order to do this, a function `sqrt(CSSPixels)` was added, which
currently just converts to floating point to run `AK::sqrt()`.
2023-09-09 13:03:11 +02:00
Zaggy1024
d9c842a83f LibWeb: Set radial gradients' ending shape corners correctly
Previously, the corner was always set to the top right, except if the
top left turned out to be closest, in which case it would be left
default-initialized instead.
2023-09-09 13:03:11 +02:00
Zaggy1024
0e78037c68 LibWeb: Use fractions to calculate font absolute size mappings
This also brings us closer to spec by changing the fractional scaling
to use division instead of hard-coded decimal numbers.
2023-09-09 13:03:11 +02:00
Zaggy1024
c9849aeadd LibWeb: Use a switch instead of HashMap to get absolute size mappings
A `HashMap` is unnecessary complexity for such a small set of possible
keys, let's let the optimizer actually understand what's happening.
2023-09-09 13:03:11 +02:00
Zaggy1024
f57c42fad7 LibWeb: Avoid conversion from floating point in CSS position resolution
We can just use division here, since fixed-point division by 2 will
compile down to a shift by 1.
2023-09-09 13:03:11 +02:00
Zaggy1024
99c90e49b6 LibWeb: Calculate viewport-relative lengths in CSSPixels 2023-09-09 13:03:11 +02:00
Zaggy1024
fc05cda8cf LibWeb: Make division of CSSPixels by integers create a fraction
This also adds some additional operators to `CSSPixelsFraction` to
allow this change to build, since some places were using equations like
`(a / b) + (c / d)` or `-(x / y)`.
2023-09-09 13:03:11 +02:00
Zaggy1024
607a398917 LibWeb: Store computed CSS font size as CSSPixels
The value is originally set using a `CSSPixels` value converted to
double, then when it is used it is always converted back to a
`CSSPixels` again. Let's just store it as that instead.
2023-09-09 13:03:11 +02:00
Zaggy1024
d792461714 LibWeb: Use Integral concept for CSSPixels operators
These were previously manually overloaded, which is unnecessary when we
can just use a concept to cover everything!
2023-09-09 13:03:11 +02:00
Sam Atkins
9e227dfc16 LibWeb: Flesh out HTMLTextAreaElement
Give it a shadow tree, similar to HTMLInputElement's, so that we can
actually edit its contents at a basic level. Add some CSS to use the
`rows` and `cols` attributes as the size if they are present.
2023-09-09 07:45:05 +02:00
Sam Atkins
4897643ffb LibWeb: Allow non-HTMLInputElements to have did_edit_text_node() called
HTMLTextAreaElement also needs to be told when its contained text node
has been edited, so let's make this functionality work for anyone who
extends the new EditableTextNodeOwner interface class.
2023-09-09 07:45:05 +02:00
Tim Schumacher
ce556c9566 Ports: Remove the ability to override fetch and patch_internal 2023-09-09 01:06:31 +02:00
Tim Schumacher
d94bffd708 Ports/gn: Switch to using the Git repository directly 2023-09-09 01:06:31 +02:00
Tim Schumacher
e28ff48304 Ports: Introduce support for Git repositories 2023-09-09 01:06:31 +02:00
Tim Schumacher
ce50dbb411 Ports: Pass --no-sign to tagging operations
If the user chose to sign tags by default, not passing this flag will
force a signed and therefore annotated tag, which requires a message.
2023-09-09 01:06:31 +02:00
Tim Schumacher
b80760003e Ports: Use clearer tag names for ./package.sh dev
The old names only made sense in the context of `./package.sh dev` but
that will not be the only context anymore very soon.
2023-09-09 01:06:31 +02:00
Tim Schumacher
9a828a76d2 Ports: Remove ./package.sh dev support for non-Git patches
All of our existing patches have been converted into Git patch format,
and new patches are created through `./package.sh dev` itself.
2023-09-09 01:06:31 +02:00
Tim Schumacher
456fd9f574 Ports: Switch to the new files syntax 2023-09-09 01:06:31 +02:00
Andrew Kaster
920dc1ba53 Ladybird/Android: Move host build into its own shell script
This lets us select a proper host compiler version if cc/cxx are not
suitable for building Lagom.
2023-09-08 09:01:34 -06:00
Andrew Kaster
bd7d01e975 Meta: Move compiler detection functions to their own file
This way we can use them in other scripts that want to build Lagom
and pick a suitable host compiler.
2023-09-08 09:01:34 -06:00