Commit Graph

53767 Commits

Author SHA1 Message Date
Daniel Bertalan
70fcbcf54b LibELF+readelf: Add missing constants for dynamic relocations
These should cover all relocation types we can possibly see in an x86_64
or AArch64 final linked ELF image.
2023-08-18 16:20:13 +02:00
Federico Zotti
d250f8fc3e Documentation: Add dependencies for alpine linux
- Add qemu-audio-pa for the audio driver
- Change qemu i386 with x86_64
- Mention fuse2fs for building.
2023-08-18 15:54:39 +02:00
Pankaj Raghav
7138395982 NVMe: Add shadow doorbell support
Shadow doorbell feature was added in the NVMe spec to improve
the performance of virtual devices.

Typically, ringing a doorbell involves writing to an MMIO register in
QEMU, which can be expensive as there will be a trap for the VM.

Shadow doorbell mechanism was added for the VM to communicate with the
OS when it needs to do an MMIO write, thereby avoiding it when it is
not necessary.

There is no performance improvement with this support in Serenity
at the moment because of the block layer constraint of not batching
multiple IOs. Once the command batching support is added to the block
layer, shadow doorbell support can improve performance by avoiding many
MMIO writes.

Default to old MMIO mechanism if shadow doorbell is not supported.
2023-08-18 15:47:51 +02:00
Pankaj Raghav
5b774f3617 NVMe: Add a new struct Doorbell to encapsulate doorbell registers
Introduce a new Struct Doorbell that encapsulates the mmio doorbell
register.

This commit does not introduce any functional changes and it is added
in preparation to adding shadow doorbell support.
2023-08-18 15:47:51 +02:00
Aliaksandr Kalenik
934afcb9d5 LibWeb: Make HTML::SharedImageRequest GC allocated
This allows to partially solve the problem of cyclic dependency between
HTMLImageElement and SharedImageRequest that prevents all image
elements from being deallocated.
2023-08-18 15:42:44 +02:00
Aliaksandr Kalenik
bbfedf2e5a LibWeb: Make HTML::ImageRequest GC allocated 2023-08-18 15:42:44 +02:00
Poseydon42
333949894e Userland: Add glsl-compiler utility that prints parsed AST 2023-08-18 15:29:48 +02:00
Poseydon42
d160ff2f8d LibGLSL: Add tests for GLSL parser 2023-08-18 15:29:48 +02:00
Poseydon42
29972876e4 LibGLSL: Add initial GLSL parser implementation 2023-08-18 15:29:48 +02:00
Liav A
0b6424d883 Kernel/Storage: Properly free unused NVMeIO AsyncBlockDeviceRequest
This was the root cause of zombie processes showing up randomly and
disappearing after some disk activity, such as running shell commands -
The NVMeIO AsyncBlockDeviceRequest member simply held a pointer to a
Process object, therefore it could keep it alive a for a long time after
it ceased to actually function at all.
2023-08-18 14:08:54 +02:00
Andi Gallo
65854c3411 LibWeb: Set table wrapper width from the table box
Fixes #20385 and some Wikipedia pages, for example:
https://en.wikipedia.org/wiki/2022%E2%80%9323_UEFA_Champions_League_knockout_phase
2023-08-18 12:52:29 +02:00
Tim Ledbetter
f6dd512b65 top: Re-enable non-blocking I/O on stdin
Using blocking I/O would cause updates to stop until a key was pressed.
2023-08-18 11:09:27 +01:00
camc
174d6f1f51 LibGUI: Replace DeprecatedString usage in Widget 2023-08-18 10:43:37 +01:00
camc
d978dd4af8 LibGUI: Add deprecated suffix to {set_,}tooltip in Widget 2023-08-18 10:43:37 +01:00
Seal Sealy
9b1e33af69 Ports: Add lxt port 2023-08-18 11:43:19 +02:00
Seal Sealy
1262a7d142 Kernel: Alias MAXNAMLEN to NAME_MAX
MAXNAMLEN is the BSD name for NAME_MAX, as used by some programs.
2023-08-18 11:43:19 +02:00
Karol Kosek
f9a006d092 Mail: Mark mail as seen after open 2023-08-18 10:32:49 +01:00
Karol Kosek
619b53eaca Mail: Draw unread messages as bold 2023-08-18 10:32:49 +01:00
Torstennator
411ffb7954 PixelPaint: Add simple dodge and burn function to BrushTool
This patch adds three new modes to the brush-tool where it is now
possible to use a dodge or burn function with the brush and a soft mode
where the overdraw is reduced so that the stroke looks much softer.
The dodge and burn functions are used to brighten or darken the colors
in the affected area of the brush. The user can decide if the
highlights, midtones or shadows should be prioritized by the brush.
2023-08-18 10:27:56 +01:00
Torstennator
b9b4ca064f PixelPaint: BrushTool performance optimization
This patch optimizes how the Brush-Tool modifies the pixels. The new
logic generates a "reference brush" with the required size, falloff
and color only once and uses that for the rawing operations. If no
editing mask is used the reference brush is writen via a blit operation
to the content or mask image. This increases the drawing speed and
therefore also allows bigger brush sizes.
2023-08-18 10:27:56 +01:00
Torstennator
31ee20e179 PixelPaint: Allow bigger Brush-Tool sizes
This patch allows a bigger brush tool size of 250 pixels and limits the
cursor bitmap to a reasonable size so that its not much bigger than the
image editor size. If the cursor is bigger as the editor it is rended
with a red edge to indicate that the actual cursor is bigger than
displayed. This change mitigates the OOM conditions when the cursor
gets unusual big.
2023-08-18 10:27:56 +01:00
Maxim Solovyov
55edfe5c3c Documentation: Remove qemu-system-x86 from explicit dependencies on Arch
The qemu-system-x86 package is a dependency of the qemu-desktop package
both on Arch and Manjaro Linux so there is no need to install it
explicitly.
2023-08-18 10:20:25 +02:00
kleines Filmröllchen
834a3227f8 Base: Update Audio subsystem documentation 2023-08-18 08:09:19 +01:00
Dan Klishch
39dee6ad67 AK: Add missing include in RecursionDecision.h 2023-08-18 08:58:51 +03:30
Dan Klishch
1079f178cf LibXML: Set parents for text and comment nodes 2023-08-18 08:58:51 +03:30
Dan Klishch
6368e6ca12 LibXML: Record source location for nodes 2023-08-18 08:58:51 +03:30
Dan Klishch
3556c27d2d AK: Add StringView::count(char) 2023-08-18 08:58:51 +03:30
Dan Klishch
b40ab55830 LibXML: Add helpers for extracting node contents if its type is known 2023-08-18 08:58:51 +03:30
MacDue
3a42ef4118 Tests/LibWeb: Add ref test for CSS gradients
This has to cheat and use a screenshot but thanks to the "Take Full
Screenshot" feature of Ladybird, it is very easy to update this test.

The steps are documented in the test.
2023-08-18 05:26:04 +02:00
MacDue
6c9f1c396a LibWeb: Don't use CSSPixels when resolving radial gradient color stops
CSSPixels are not precise enough to resolve gradient positions, which
leads to visual artifacts.
2023-08-18 05:26:04 +02:00
MacDue
fa7a2269cd LibWeb: Remove ±1 translations from RadialGradientStyleValue
These were added when Gfx::Rect was made endpoint exclusive, however,
for this code an offset of ±1 makes no visible difference (but makes the
code look a little confusing).
2023-08-18 05:26:04 +02:00
Timothy Flynn
c0758882c5 WebContent: Convert image/media context menu positions to device pixels
On Serenity and on my Linux machine, we have a 1:1 CSS-to-device pixel
ratio. On macOS, we have a 2:1 ratio. This did not affect the Qt chrome,
because we are ignoring this position and placing the context menu at
the globally-accessible mouse position. The AppKit chrome will be using
this position, though.

This might be what caused the issue worked around by commit 8177ecb.
2023-08-18 05:24:59 +02:00
Timothy Flynn
5287c9aff4 WebContent: Group context menu request definitions together
Having all 4 of these methods together makes it more immediately obvious
that the 2 moved here are not correct (we are not converting the CSS
pixel point to a device pixel point).
2023-08-18 05:24:59 +02:00
Aliaksandr Kalenik
37bd216c52 LibWeb: Ignore % max-width if box is sized under max-content constraint
When a box is sized under max-content constraint, any percentage value
set for max-width should be considered as if it were infinite. In other
words, it should have no effect on restricting the box's width.
2023-08-18 05:08:52 +02:00
Sam Atkins
0cda97b852 LibWeb: Add some more computed values for CSS properties
- border-spacing
- text-decoration
- text-decoration-color
- text-decoration-thickness
- text-indent
- text-justify
2023-08-17 22:13:00 +01:00
Andreas Kling
10020ba182 LibWeb: Don't override computed font-weight with value from used font
The CSS font-weight is king, even if we load a font that has another
weight value in its OpenType tables.
2023-08-17 20:32:21 +02:00
Andreas Kling
429b2e5860 LibWeb: Make FontCache per-StyleComputer
This effectively makes it per-Document, but we hang it off of
StyleComputer since that's what it's used for.

The purpose of this is to prevent downloaded fonts from escaping the
context that loaded them. There's probably a more elegant solution where
we still share caching of system fonts, but let's start here.
2023-08-17 20:32:21 +02:00
Andreas Kling
69a81243f5 LibWeb: Consider system fonts when looking for inexact weight match
Previously, we only considered loaded (web) fonts.
2023-08-17 20:32:21 +02:00
Andreas Kling
4bb907aa22 LibWeb: Only propagate overflow from document element when it exists 2023-08-17 20:32:21 +02:00
Aliaksandr Kalenik
e9a718ff88 LibWeb/Layout: Replace INFINITY with CSSPixels::min() or max() 2023-08-17 20:03:13 +02:00
Aliaksandr Kalenik
f2a15ecea7 LibWeb/Layout: Replace isfinite() with might_be_saturated()
Since we switched to using fixed-point math for CSSPixels, it cannot
represent infinite values, so we need to check if the value is
saturated instead.
2023-08-17 20:03:13 +02:00
Sam Atkins
c40e441894 LibWeb: Move CSS ParsingContext to its own header
The implementation is already its own file, so having the class defined
in Parser.h feels weird.
2023-08-17 19:39:10 +02:00
Sam Atkins
f176e04323 LibWeb: Move CSS::Parser::Dimension class to a separate file 2023-08-17 19:39:10 +02:00
Sam Atkins
199a931da1 LibWeb: Move gradient parsing code to a separate file 2023-08-17 19:39:10 +02:00
Sam Atkins
8e5b2907f6 LibWeb: Move selector parsing code to a separate file 2023-08-17 19:39:10 +02:00
Sam Atkins
1d6c2cb287 LibWeb: Move media-query parsing code to separate file
Parser.cpp is big and complicated enough to make CLion sluggish and
unhappy, so let's move some code out of it.
2023-08-17 19:39:10 +02:00
Aliaksandr Kalenik
24edb7c97f Ladybird, WebContent: Add option in debug menu to output GC graph dump 2023-08-17 18:27:02 +02:00
Aliaksandr Kalenik
0ff29349e6 LibJS: Add GC graph dumper
This change introduces a very basic GC graph dumper. The `dump_graph()`
function outputs JSON data that contains information about all nodes in
the graph, including their class types and edges.

Root nodes will have a property indicating their root type or source
location if the root is captured by a SafeFunction. It would be useful
to add source location for other types of roots in the future.

Output JSON dump have following format:
```json
    "4908721208": {
        "class_name": "Accessor",
        "edges": [
            "4909298232",
            "4909297976"
        ]
    },
    "4907520440": {
        "root": "SafeFunction Optional Optional.h:137",
        "class_name": "Realm",
        "edges": [
            "4908269624",
            "4924821560",
            "4908409240",
            "4908483960",
            "4924527672"
        ]
    },
    "4908251320": {
        "class_name": "CSSStyleRule",
        "edges": [
            "4908302648",
            "4925101656",
            "4908251192"
        ]
    },
```
2023-08-17 18:27:02 +02:00
Aliaksandr Kalenik
ee29a21ae8 LibJS: Delete unused operator=s in SafeFunction 2023-08-17 18:27:02 +02:00
martinfalisse
70919dbed7 LibWeb: Fix parsing bug for SVG attributes
This doesn't seem to actually have fixed any bugs, as having
FillOpacity instead of StrokeOpacity in the call to parse_css_value
doesn't seem to have actually been causing bugs. But, I still think it's
worthwhile correcting.

The reason that it wasn't causing bugs is that having FillOpacity
instead of StrokeOpacity in the call to parse_css_value means that when
parsing the value is compared to the acceptable values for that property
(for example the value can only be a percentage, or a number, etc.). In
this case both FillOpacity and StrokeOpacity seem to accept the same
values.
2023-08-17 17:48:34 +02:00