Commit graph

51033 commits

Author SHA1 Message Date
Liav A 336fb4f313 Kernel: Move InterruptDisabler to the Interrupts subdirectory 2023-06-04 21:32:34 +02:00
Liav A 927926b924 Kernel: Move Performance-measurement code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
Liav A b88c1d90e1 Kernel: Move TimerQueue code to the Time subdirectory 2023-06-04 21:32:34 +02:00
Liav A 8f21420a1d Kernel: Move all boot-related code to the new Boot subdirectory 2023-06-04 21:32:34 +02:00
Liav A c9a34cae66 Kernel: Move ExecutionMode.h to the Security subdirectory 2023-06-04 21:32:34 +02:00
Liav A 7c0540a229 Everywhere: Move global Kernel pattern code to Kernel/Library directory
This has KString, KBuffer, DoubleBuffer, KBufferBuilder, IOWindow,
UserOrKernelBuffer and ScopedCritical classes being moved to the
Kernel/Library subdirectory.

Also, move the panic and assertions handling code to that directory.
2023-06-04 21:32:34 +02:00
Liav A f1cbfc5a6e Kernel: Move task-crash related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
Liav A ee0ccdaebe Kernel: Move Credentials.{cpp,h} to the Security subdirectory 2023-06-04 21:32:34 +02:00
Liav A aaa1de7878 Kernel: Move {Virtual,Physical}Address classes to the Memory directory 2023-06-04 21:32:34 +02:00
Liav A 64af4953c2 Kernel: Move UBSanitizer and AddressSanitizer to Security subdirectory 2023-06-04 21:32:34 +02:00
Liav A 490856453d Kernel: Move Random.{h,cpp} code to Security subdirectory 2023-06-04 21:32:34 +02:00
Liav A 1b04726c85 Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
Liav A 788022d5d1 Kernel: Move Jail code to a new subdirectory 2023-06-04 21:32:34 +02:00
Ahmed Hussein fd9dbf1f20 TextEditor: Prevent autoscroll looping over
When a text file has only 1 line with long text
autoscroll to the top will no longer loop over
and set the cursor to the end of the line.
2023-06-04 21:28:41 +02:00
Tim Ledbetter 55e103deb5 PixelPaint: Make "Crop Image to Content" work with disjoint layers 2023-06-04 21:06:28 +02:00
Tim Ledbetter c98ec85fb5 PixelPaint: Make "Crop Image to Selection" work with disjoint layers
The "Crop Image to Selection" action will now crop all layers within
the current selection.

Any layers outside of the current selection are deleted.

If there are no layers within the current selection, a new layer the
same size as the selection is created, which has the same name as the
current active layer.
2023-06-04 21:06:28 +02:00
Andreas Kling 89ba00304c LibWeb: Account for negative margins when calculating float intrusion
If a box has a negative margin-left, it may have a negative effective
offset within its parent BFC root coordinate system.

We can account for this when calculating the amount of left-side float
intrusion by flooring the X offset at 0.
2023-06-04 18:14:12 +02:00
networkException 0e5ec8c0ab Toolchain+Ladybird: Declare dependencies in correct nix file
The dependencies added in b5e9b9a939
are a better fit for Ladybird/ladybird.nix
2023-06-04 10:01:34 +02:00
networkException cfd3f749b0 Ladybird: Sort packages in nativeBuildsInputs nix list 2023-06-04 10:01:34 +02:00
MacDue e853139cf0 LibGfx: Fix adding active edges in filled path rasterizer
This was previously masked by sorting the edges on max_y, but if the
last added edge pointed to an edge that ended on the current scanline,
that edge (and what it points to) would also end up added to the active
edges. These edges would then never get removed, and break things very
badly!
2023-06-04 05:40:39 +02:00
MacDue 6abc51d9f8 LibGfx: Simplify segmentizing paths
Remove SplitLineSegment and replace it with a FloatLine, nobody was
interested in its extra fields anymore. Also, remove the sorting of
the split segments, this really should not have been done here
anyway, and is not required by the rasterizer anymore. Keeping the
segments in stroke order will also make it possible to generate
stroked path geometry (in future).
2023-06-04 05:40:39 +02:00
sin-ack 910bff9e94 Ports: Update the Zig port's Serenity type definitions
After b98f537, the Zig port's types for Serenity no longer matched what
Serenity actually returned from LibC; this caused weird errors due to
stat() not returning valid values anymore.
2023-06-04 05:39:32 +02:00
Sam Atkins 874202045d LibWeb: Rewind TokenStream if we reject a parsed value as out-of-bounds
Wrap the parsing of numbers, integers, and dimensions in a transaction,
which we only commit if that parsed value was actually accepted by the
property.

This fixes `font: 0/0 a;` failing to parse.
2023-06-03 16:04:46 +02:00
Sam Atkins c48347f0cb LibWeb: Exit parse_font_family_value() when hitting an illegal token
...instead of looping forever. Oops! :^)
2023-06-03 16:04:46 +02:00
Liav A 43903aa960 SystemServer: Ensure service drop privileges could fail only when root
If we try to launch a lazily-spawned service and the SystemServer as a
(running --user) session leader is running with root permissions, then
if it is instructed to drop the root permissions for a the new service
then it will make sense to abort the entire spawn procedure if dropping
of privileges failed.

For other users, trying to change UID/GID to something else doesn't make
sense (and will always actually fail) as we are already running in non
root permissions, hence we don't attempt to do this anymore.
It should be noted that if an explicit User configuration was actually
specified for a Service to be used with, we would still try to login
with the requested User option value, which would fail when running as
non-root user.

This is useful for example when trying to run the pro utility with pls
to elevate to root permissions, but the session leader is still the same
so trying to "drop" privileges to UID 0 doesn't make sense.
2023-06-03 14:42:22 +02:00
Ben Wiederhake 189af20294 Base: Remove unlicensed copy of BMFW
The creator of this site is most definitely not going to enforce his
copyright, yes, but it's still a bad idea to keep around an unlicensed
copy of someone else's work. We no longer use it to 'test' anything, so
let's just remove it entirely.
2023-06-03 14:29:19 +02:00
Ben Wiederhake 38f107685c Base: Replace GPL bmpsuite by link to original
bmpsuite on GitHub is licensed under the GPLv3:
https://github.com/jsummers/bmpsuite/blob/master/COPYING.txt

However, we did not "conspicuously and appropriately publish on each
copy an appropriate copyright notice", therefore we probably were in
violation with GPLv3 paragraph 4, "Conveying Verbatim Copies".

Let's just remove this entirely, because Ladybird can just access
the original pages instead.

At the time of writing, `bmpsuite.html` and the HTML response from the
linked URL are byte-identical.
2023-06-03 14:29:19 +02:00
Shannon Booth 484635651c Ladybird: Assume file:// URL when URL starts with '/'
Allowing for easily pasting into ladybird the path to some HTML
file (as an example).

This behavior matches chrome and firefox handling.
2023-06-03 11:43:35 +01:00
Zhiyuan Guo 83345ba698 LibWeb: Don't crash when document.write a script with src attr
To abort the processing of any nested invocations of the tokenizer,
just return is enough in this case.
During the process of pending parsing blocking script, the
is_ready_to_be_parser_executed() check should be applied on the
blocking script, not the original script.
2023-06-03 12:22:01 +02:00
Caoimhe e8a18be3b7 Meta: Ignore Helix's configuration folder 2023-06-03 12:20:40 +02:00
Caoimhe 9ed9a95c15 Documentation: Add instructions for configuring the Helix editor 2023-06-03 12:20:40 +02:00
Sam Atkins 052ca0a246 LibWeb: Detect and reject math functions with no resolved type
... instead of crashing :^)
2023-06-03 06:14:53 +02:00
stelar7 a5f2024afa LibWeb: Resolve the transition-delay property 2023-06-03 05:59:19 +02:00
PrestonLTaylor aa691c22d4 LibWeb: Implement the <symbol> SVG element 2023-06-03 05:58:00 +02:00
PrestonLTaylor c7c3043aa2 LibWeb: Implement the <use> SVG element
The SVG <use> element is used to be able to reuse other SVG graphics
without having to re-write the svg element.

We now support this feature! :^)
2023-06-03 05:58:00 +02:00
PrestonLTaylor b322abd8d0 LibWeb: Add document_fully_loaded event to DocumentObserver
SVGUseElement needs to be able to query the fully loaded document for
its referenced element.
2023-06-03 05:58:00 +02:00
PrestonLTaylor 31d536912c LibWeb: Allow SVG painting to escape out of a shadow tree
The spec for the `<use>` element requires a shadow tree for the
rendered content, so we need to be able to escape shadow trees when
rendering svg content.
2023-06-03 05:58:00 +02:00
stelar7 fd360ba171 LibWeb: Implement details_notification_task_steps for <details> 2023-06-03 05:56:00 +02:00
stelar7 8773122f6b LibWeb: Implement the <summary> element 2023-06-03 05:56:00 +02:00
Simon Wanner 870bcd56df LibWeb: Make disclosure marker bounds square
This makes sure we actually render an equilateral triangle
inside a square.
2023-06-03 05:54:49 +02:00
Simon Wanner 293ece2292 LibWeb: Support list-style-position
This moves the ::marker inside of <summary> actually inside. :^)
2023-06-03 05:54:49 +02:00
Simon Wanner ee7282cbe4 LibWeb: Make pseudo-elements inspectable
This makes it possible to set a pseudo-element as the inspected node
using Document::set_inspected_node(), Document then provides
inspected_layout_node() for the painting related functions.
2023-06-03 05:54:49 +02:00
Simon Wanner 5e3e9b2f61 LibWeb: Add list-style-type: disclosure-{closed,open}
These markers are rendered as equilateral triangles pointing right and
down respectively. As we currently don't implement writing-mode the
closed marker does not respect it.
2023-06-03 05:54:49 +02:00
Tim Schumacher ad899b179f LibLine: Ignore ENOENT errors when loading old history
A missing history file is just an empty history, so ignore that error
and replace it with an empty array.

This regressed in f93ee3142d.
2023-06-03 05:52:52 +02:00
Caoimhe 4be5000c22 SpiceAgent: Exit early if SPICE_DEVICE doesn't exist 2023-06-03 05:52:16 +02:00
Caoimhe 13506a612e SpiceAgent: Don't pledge cpath or open SPICE_DEVICE as rwc
Core::File's new `DontCreate` open mode removes the need for these
capabilities on SpiceAgent. We shouldn't have to create this file,
as if it doesn't exist, QEMU never initiated a spice connection!
2023-06-03 05:52:16 +02:00
Caoimhe 2344bb6c57 LibCore: Add File::OpenMode::DontCreate
Some applications may not want to have the ability to create a
file if it doesn't exist, but still be able to read and write
from it. The easy solution here would be just to not apply
O_CREAT when creating the flags, but to prevent breaking a ton
of applications, having a `DontCreate` mode is the best for now.
2023-06-03 05:52:16 +02:00
Lucas CHOLLET 9e6d91032e LibGfx/JPEG: Use Error to propagate errors
This patch removes a long time remnant of the pre-`AK::Error` era.
2023-06-02 20:07:27 +02:00
networkException b5e9b9a939 Toolchain: Add qt6.qt{base,svg} to serenity.nix
This is required for building ladybird.
2023-06-02 20:05:51 +02:00
networkException 43182285fd Toolchain: Sort packages in {nativeB,b}uildInputs nix lists 2023-06-02 20:05:51 +02:00