Commit Graph

56844 Commits

Author SHA1 Message Date
Timothy Flynn
97665fa92f Meta: Port recent changes to the GN build
fbfb70f81a
2023-12-02 10:34:22 +01:00
Lucas CHOLLET
e6fc18d96a LibGfx/TIFF: Support TIFF 5.0 LZW images
This makes us decode `quad-lzw.tif` from libtiff's test suite:
https://libtiff.gitlab.io/libtiff/images.html
2023-12-02 08:04:44 +01:00
Timothy Flynn
4c145fdb12 Ladybird/AppKit: Support enabling the GPU painter 2023-12-01 20:07:27 -05:00
Timothy Flynn
07e9a8f79b Ladybird+LibWebView: Move options used to launch WebContent to a struct
It is currently a bit messy to pass these options along from main() to
where WebContent is actually launched. If a new flag were to be added,
there are a couple dozen files that need to be updated to pass that flag
along. With this change, the flag can just be added to the struct, set
in main(), and handled in launch_web_content_process().
2023-12-01 20:07:27 -05:00
Timothy Flynn
8504d8f588 Meta: Support GPU painting in the GN build 2023-12-01 20:07:27 -05:00
Timothy Flynn
8fc5c8b7df WebContent: Print a warning if GPU painting is enabled but not supported 2023-12-01 20:07:27 -05:00
Timothy Flynn
ea81470fc0 WebContent: Remove a bunch of unused includes from PageHost
Mostly just to narrow down where HAS_ACCELERATED_GRAPHICS is used, to
make it easier to see where it needs to be defined by the build system.
2023-12-01 20:07:27 -05:00
Sam Atkins
4ced88b4e5 LibWeb: Make create_a_css_style_sheet() take String arguments 2023-12-01 20:48:13 +01:00
Sam Atkins
d344c50663 LibWeb: Return String from CSSStyleRule::selector_text() 2023-12-01 20:48:13 +01:00
Sam Atkins
374b6cdffd LibWeb: Return String from CSSImportRule::href() 2023-12-01 20:48:13 +01:00
Sam Atkins
ef1e942f3e LibWeb: Use String for getting/setting MediaQueryList media 2023-12-01 20:48:13 +01:00
Sam Atkins
6dbc3044bd LibWeb: Remove some to_deprecated_string() calls in the CSS code 2023-12-01 20:48:13 +01:00
Sam Atkins
9c1c7720c5 LibWeb: Use serialize_a_url() to serialize @import url(...) 2023-12-01 20:48:13 +01:00
Andrew Kaster
fbfb70f81a LibWeb+WebContent: Plumb ability for WebContent process to hold N pages
In order for same-origin NavigableContainers (iframe, frame, embed, ...)
and window.open() WindowProxies to have the proper JS access to their
embedder/opener, we need to host multiple top level traversables in the
same WebContent process. As a first step, make WebContent::PageHost hold
a HashMap of PageClient objects, each holding their own Web::Page that
represents a TraversableNavigable's API surface with the UI process.
2023-12-01 20:47:44 +01:00
Andreas Kling
34ae39478a Kernel/SysFS: Fix bizarre mode bits for directories in SysFS
Not sure what led to 0445 being used here, but let's use 0755.
2023-12-01 20:46:21 +01:00
Ali Mohammad Pur
7edc69dc94 LibCore: Ignore non-S_IFMT bits in directory_entry_type_from_stat
The st_mode field in struct stat is a bitfield of more than just the
file type, this commit masks off the non-filetype bits to ensure no
unrelated bits are checked.
2023-12-01 20:46:16 +01:00
Ali Mohammad Pur
b545427d53 Kernel: Make RAMFS pass along the inode type when traversing as a dir
RAMFS was passing 0, which lead to the userspace seeing all entries as
DT_UNKNOWN when iterating over the directory contents.
To repro prior to this commit, simply check `echo /tmp/*/`.
2023-12-01 20:46:16 +01:00
Ali Mohammad Pur
24a7df9b09 LibLine: Move the cursor to the beginning of the final line after ^C
We previously left it at the end of the final line, which caused the
next prompt to start offset to the right:
    |$ foo^C
    |  $
This commit makes LibLine move to the beginning of that line,
making it so the next prompt shows up at the beginning of the line:
    |$ foo^C
    |$
2023-12-01 20:18:50 +03:30
Ali Mohammad Pur
fde174645a Shell: Accept empty set of completions from program completer
Falling back to default completions goes directly against the users'
wishes :P
2023-12-01 19:24:57 +03:30
Andreas Kling
189d1e8291 LibWeb: Port CSSNamespaceRule to FlyString
This removes a performance problem where we'd convert the style sheet's
default namespace from DeprecatedFlyString to FlyString once per rule
during selector matching.

The conversion now happens once, during CSS parse. It should eventually
be removed from there as well, but one step at a time. :^)
2023-12-01 16:03:58 +01:00
Timothy Flynn
d8f84ef76c CI: Disable running aarch64 tests in CI for now
These tests almost always fail, and all we do is try to boot. Disable it
for now until it can pass more reliably. Note we still compile aarch64,
so the build shouldn't break unnoticed.
2023-12-01 09:35:54 -05:00
Bastiaan van der Plaat
b21ec0afac Ladybird/AppKit: Select all text of location search field on focus 2023-12-01 09:26:37 -05:00
Todderod
e335354b30 LibJS: Call builtins directly in the bytecode interpreter
Allows the bytecode interpreter to call the builtins c++
implementation directly without making a javascript call
just as the JIT.

Kraken test speedups: imaging-gaussian-blur.js (1.5x) and
audio-oscillator.js (1.2x)
2023-12-01 13:01:26 +01:00
Lucas CHOLLET
ce6cd4f45f LibGfx/GIF: Use LZWDecoder::decode_all() 2023-12-01 12:58:14 +01:00
Lucas CHOLLET
cc816b486c LibGfx/TIFF: Use LZWDecoder::decode_all() 2023-12-01 12:58:14 +01:00
Lucas CHOLLET
2a5cb5becb LibCompress: Add LZWDecoder::decode_all()
This method takes bytes as input and decompress everything to a
ByteBuffer. It uses two control codes (clear and end of data) as
described in the GIF, TIFF and PDF specifications.
2023-12-01 12:58:14 +01:00
Tim Schumacher
e9e89d7e4e AK: Optimize BitStream refilling a bit further
This tries to optimize the refill code by making it easier to digest for
the branch predictor. This includes not looping as much across function
calls and marking our EOF case to be unlikely.

Co-Authored-By: Lucas Chollet <lucas.chollet@free.fr>
2023-12-01 12:48:18 +01:00
Tim Schumacher
197331c922 AK: Reject BitStream reads beyond EOF by default
The only exception to this is the lossless WebP decoder, which
legitimately relies on this behavior, even upstream.
2023-12-01 12:48:18 +01:00
Tim Schumacher
cb03d3d78f AK: Allow rejecting BitStream reads beyond EOF 2023-12-01 12:48:18 +01:00
Tim Schumacher
270b1176de Tests: Add a test to codify BitStream behavior beyond stream limits 2023-12-01 12:48:18 +01:00
Tim Schumacher
de49413bdf AK: Don't slice off the first byte of a BitStream read 2023-12-01 12:48:18 +01:00
Lucas CHOLLET
4280f4d2c7 LibGfx/TIFF: Automatically export all enums associated with tags 2023-12-01 12:45:03 +01:00
Sam Atkins
9c12112916 LibWeb: Re-enable the css-background-repeat.html ref test
Assuming that my changes to make iframes delay the load event are
correct, and that nothing else was causing the flakiness, this test
should be OK now! (Famous last words.)
2023-12-01 10:28:02 +01:00
Sam Atkins
2805e16c1c LibWeb: Let NavigableContainers delay the document load event 2023-12-01 10:28:02 +01:00
Sam Atkins
72376ad15a LibWeb: Add special "potentially delay the load event" logic for iframes
`<iframe>`s only potentially delay the load event when their
`current_navigation_was_lazy_loaded` flag is false, so let's wire that
up to the flag's setter, and actually call it!
2023-12-01 10:28:02 +01:00
Sam Atkins
7f509317fd LibWeb: Allow NavigableContainers to report whether to delay load event
Four elements match the "potentially delay the load event" check in the
spec: `<embed>`, `<frame>`, `<iframe>`, and `<object>`. These four are
the same set of elements that are NavigableContainers (or will be once
we implement them) so let's put this logic there.

Note that other things can delay the load event, this is just the name
the spec gives to this particular behaviour.
2023-12-01 10:28:02 +01:00
Sam Atkins
6c5450f9ce LibWeb: Report if anything is delaying load event, not the count
Some elements that delay the load event are more complicated than a
simple count will allow for. We'll implement those in a bit!
2023-12-01 10:28:02 +01:00
Sam Atkins
6154681718 LibWeb: Flesh out some of process_the_iframe_attributes() 2023-12-01 10:28:02 +01:00
Sam Atkins
1d6f06b203 LibWeb: Make HTMLIFrameElement a LazyLoadingElement
This replaces its previous partial implementation of the lazy loading
scaffolding. It still doesn't actually load lazily yet.
2023-12-01 10:28:02 +01:00
Sam Atkins
cc633123ca LibWeb: Extract shared lazy-loading behavior into a base class
`<iframe>` and `<img>` tags share the same spec for several aspects of
lazy-loading: how the `loading` attribute works, the "will lazy load
element" steps, and a member for storing the lazy-load resumption
steps. So let's share the implementation by using a base class.

This mostly involves moving things around. However, we also change the
`start_intersection_observing_a_lazy_loading_element()` method to take
a LazyLoadingElement, and operate on one, instead of always casting to
HTMLImageElement.

We do unfortunately have to do some shenanigans to make the cast work,
by adding a virtual function stub in DOM::Element.
2023-12-01 10:28:02 +01:00
Aliaksandr Kalenik
cc2008ea0d LibWeb: Skip painting of empty stacking contexts in GPU painter
Fixes crashing on https://twinings.co.uk/ that was happening because
of 0 size texture allocation.
2023-12-01 09:28:10 +01:00
Aliaksandr Kalenik
c28f6828c9 LibAccelGfx+LibWeb: Support non-translation transforms in GPU painter
This change introduces GPU painter support for rotate(), skew(),
scale(), and other transformations that could be applied to stacking
context.
2023-12-01 09:28:10 +01:00
Daniel Bertalan
45d81dceed Everywhere: Replace ElfW(type) macro usage with Elf_type
This works around a `clang-format-17` bug which caused certain usages to
be misformatted and fail to compile.

Fixes #8315
2023-12-01 10:02:39 +02:00
Daniel Bertalan
2151e6c8b4 LibELF: Define ELFSIZE macro
This makes the rest of the `ELFABI.h` header define the
bit-width-independent `Elf_type` macros.
2023-12-01 10:02:39 +02:00
Aliaksandr Kalenik
961b067df8 LibWeb/CSS: Add support for translateZ() transform property 2023-11-30 22:54:02 +01:00
Maja Kądziołka
3ed48e6008 Kernel/HID: Don't refer to a USB mouse as PS2
Following 77441079dd, the code in Kernel/Devices/HID/MouseDevice.cpp
is used by both USB and PS2 rodents. Make sure not to emit misleading
debug messages that could suggest that a USB mouse is a PS/2 one.
2023-11-30 13:30:12 -07:00
Sönke Holz
173a085e48 Kernel: Only unmap prekernel on x86_64
Other arches don't use the prekernel, so don't try to unmap it on
non-x86 platforms.
For some reason, this didn't cause aarch64 to crash, but on riscv64 this
would cause a panic.
2023-11-30 13:14:18 -07:00
Sönke Holz
3852f4f136 Kernel: Only try to use VGA text mode on x86_64 2023-11-30 13:13:54 -07:00
Sönke Holz
93b6111f47 Kernel/aarch64: Unbreak RPi framebuffer boot console
342c707 introduced an additional check whether this flag is set
before trying to use the multiboot-provided framebuffer console.
2023-11-30 13:13:54 -07:00
Timothy Flynn
026363024f LibJS: Stub out Atomics.notify
We don't have the facilities to implement this method fully (namely, a
fully realized SharedArrayBuffer). But we can implement enough to
validate the values passed in by the user.
2023-11-30 09:51:46 -05:00