Commit Graph

48861 Commits

Author SHA1 Message Date
Idan Horowitz
db10f201c8 Kernel: Mark sys$munmap as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz
d1082a00b7 Kernel: Mark sys$set_mmap_name as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz
2f79d0e8b9 Kernel: Mark sys$mprotect as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz
3697214166 Kernel: Mark sys$mmap as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz
dcdcab0099 Kernel: Remove unused credentials() call in validate_inode_mmap_prot
For some reason GCC did not complain about this.
2023-04-06 20:30:03 +03:00
Idan Horowitz
0b14081ae1 Kernel: Mark sys$map_time_page as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz
0e564240a6 Kernel: Mark sys$madvise as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Luke Wilde
cb62ffbb8a LibWeb: Transform the default path in CRC2D#fill(CanvasFillRule)
Required by Factory Balls Forever to position anything that isn't an
image.
2023-04-06 17:45:07 +02:00
Andreas Kling
b97229c9b5 LibWeb: Ignore preferred width when calculating intrinsic width of block
When calculating the intrinsic width of a block-level box, we now ignore
the preferred width entirely, and not just when the preferred width
should be treated as auto.

The condition for this was both confused and wrong, as it looked at the
available width around the box, but didn't check for a width constraint
on the box itself.

Just because the available width has an intrinsic sizing constraint
doesn't mean that the box is undergoing intrinsic sizing. It could also
be the box's containing block!
2023-04-06 16:47:40 +02:00
Andreas Kling
68459d43e0 Tests/LibWeb: Move block & inline layout tests into own directory 2023-04-06 16:47:40 +02:00
Emily Trau
332bb8a299 LibEDID: Fix compiler error when ENABLE_PNP_IDS_DOWNLOAD=OFF 2023-04-06 10:26:21 -04:00
Lucas CHOLLET
cfaa51203f LibGfx/JPEG: Use a smaller type to store coefficients
No need to store them in `i32`, the JPEG norm specifies that they are
not bigger than 16 bits for extended JPEGs. So, in this patch, we
replace `i32` with `i16`. It almost divides memory usage by two :^)
2023-04-06 12:00:08 +01:00
Luke Wilde
a744ae79ff LibWeb: Implement the :defined pseudo class
This selects an element if it is either a built-in element, or an
upgraded custom element.
2023-04-06 11:36:56 +02:00
Luke Wilde
6ebdb9f824 LibWeb: Implement the HTMLConstructor extended attribute 2023-04-06 11:36:56 +02:00
Luke Wilde
e3c3cc9e19 LibWeb: Implement the CEReactions extended attribute 2023-04-06 11:36:56 +02:00
Luke Wilde
32e27bc7fa LibWeb: Add a bunch of missing CEReactions
This is almost guaranteed not to be all CEReactions we need to add, but
this puts us in a much better situation.
2023-04-06 11:36:56 +02:00
Luke Wilde
034aaf3f51 LibWeb: Introduce CustomElementRegistry and creating custom elements
The main missing feature here is form associated custom elements.
2023-04-06 11:36:56 +02:00
Luke Wilde
083b547e97 LibWeb/WebIDL: Add the construct abstract operation
This will be used by custom elements to upgrade an element to a custom
element.
2023-04-06 11:36:56 +02:00
Luke Wilde
9b8b363445 LibWeb/WebIDL: Move call_user_object_operation out of line
This makes it in line with `invoke_callback`.
2023-04-06 11:36:56 +02:00
Luke Wilde
686e3a0d94 LibWeb: Support returning a callback function in IDL 2023-04-06 11:36:56 +02:00
Evan Smal
5b906d9a40 HackStudio: Add configuration domain pledge for FileManager
This fixes a bug where clicking the "Save" button would crash the
application because 'FileManager' was a pledged domain.
2023-04-06 08:56:57 +01:00
Julian Offenhäuser
602f5459bf LibGfx: Fix out of bounds read in BitmapFont::masked_character_set()
When creating a copy of the font containing only the glyphs that are in
use, we previously looped over all possible code points, instead of the
range of code points that are actually in use (and allocated) in the
font. This is a problem, since we index into the array of widths to find
out if a given glyph is used. This array is only as long as the number
of glyphs the font was created with, causing an out of bounds read when
that number is less than our maximum.
2023-04-06 08:26:22 +01:00
Cameron Youell
0c98cde18e GMLPlayground: Pledge Calendar domain
This now allows for the preview of `@GUI::Calendar` without
crashing the whole program.
2023-04-06 08:24:25 +01:00
Kenneth Myhra
1080281e58 LibWeb: Port AbstractBrowsingContext to String 2023-04-06 08:41:43 +02:00
Kenneth Myhra
03d6cb88ff LibWeb: Port KeyboardEvent to new String 2023-04-06 08:41:43 +02:00
Kenneth Myhra
e14be3927a LibWeb: Port FocusEvent to new String 2023-04-06 08:41:43 +02:00
stelar7
d527edf0ab LibTLS: Change Certificate parsing to use ErrorOr
Loads of changes that are tightly connected... :/
* Change lambdas to static functions
* Add spec docs to those functions
* Keep the current scope around as a parameter
* Add wrapping classes for some Certificate members
* Parse ec and ecdsa data from certificates
2023-04-06 09:57:31 +03:30
stelar7
b1d80b35af LibCrypto: Add ability to rewrite current tag kind
This is used for IMPLICIT tags where the expected kind is overriden
by the encoding instructions.
2023-04-06 09:57:31 +03:30
stelar7
8273fc230c LibCrypto: Add missing ASN1 tag kinds 2023-04-06 09:57:31 +03:30
stelar7
6163f607c0 AK: Add to_string() for IPv4Address 2023-04-06 09:57:31 +03:30
Nico Weber
73c291f5ae LibGfx: Pass in format and size to webp image decoding function 2023-04-06 00:16:52 +01:00
Nico Weber
48f88b3cdd LibGfx: Teach webp image reading function to read entropy coded images 2023-04-06 00:16:52 +01:00
Nico Weber
4bd7090bc5 LibGfx: Move webp image decoding function up a bit
Pure code move, no changes (except that this allows removing the
explicit prototype for this function, so it removes that).
2023-04-06 00:16:52 +01:00
Nico Weber
f21af311c2 LibGfx: Move webp bitmap decoding code into its own function 2023-04-06 00:16:52 +01:00
Nico Weber
e5e9d3b877 LibGfx: Implement hopefully correct max_symbol handling in webp decoder
The spec is at best misleading here, suggesting that max_symbol should
be set to "num_code_lengths" if it's not explicitly stored.

But num_code_lengths doesn't mean the num_code_lengths mentioned a few
lines further up in the spec, but alphabet_size!

(I had to cheat and look at libwebp instead of the spec for this: See
vp8l_dec.c, ReadHuffmanCode() which passes alphabet_size to
ReadHuffmanCodeLengths() as num_symbols, and ReadHuffmanCodeLengths()
then sets max_symbol to that.)

I haven't yet found a file that uses max_symbol, so this isn't actually
tested. But it's close to what's in libwebp, so maybe it works!
2023-04-06 00:16:52 +01:00
Nico Weber
e8f5e699fe LibGfx: Read transform type in webp lossless decoder
Doesn't do anything with it yet, so this only makes the
"not yet implemented" message a bit more detailed.
2023-04-06 00:16:52 +01:00
Nico Weber
8e6911c8f6 LibGfx: Remove some noisy dbgln_if()s in webp decoder
Pixel decoding mostly works, so there's no need to log all this data.
2023-04-06 00:16:52 +01:00
matcool
cc33a57620 LibWeb: Use intrinsic aspect ratio when calculating max content height 2023-04-05 16:23:56 +02:00
Tim Schumacher
9b4b12f133 tar: Use BufferedFile for reading inputs 2023-04-05 07:30:38 -04:00
Tim Schumacher
081cd9f9af lzcat: Use BufferedFile for reading inputs 2023-04-05 07:30:38 -04:00
Tim Schumacher
3ec513ecf2 xzcat: Use BufferedFile for reading inputs
This improves the decompression time of `clang-15.0.7.src.tar.xz` from
41 seconds down to about 5 seconds.

The reason for this very significant improvement is that LZMA, the
underlying compression of XZ, fills its range decompressor one byte at a
time, causing a lot of overhead at the syscall barrier.
2023-04-05 07:30:38 -04:00
Tim Schumacher
7000ccf89f LibCompress: Copy LZMA repetitions from the buffer in sequence
This improves the decompression time of `clang-15.0.7.src.tar.xz` from
5.2 seconds down to about 2.7 seconds.
2023-04-05 07:30:38 -04:00
Tim Schumacher
b88c58b94c AK+LibCompress: Break when seekback copying to a full CircularBuffer
Otherwise, we just end up infinitely looping while waiting for more
space in the destination.
2023-04-05 07:30:38 -04:00
Tim Schumacher
767fb01a8c AK: Report copied bytes when seekback copying from CircularBuffer
Otherwise, we have no way of determining whether our copy was truncated
by accident.
2023-04-05 07:30:38 -04:00
Tim Schumacher
997e745e87 AK: Properly limit the internal seekback span for CircularBuffer
I was originally thinking in the wrong direction when adding this limit,
we can at most read from the buffer until we reach the current write
head. Since that write head is the reference point for the distance,
we need to limit ourselves to that instead of the seekback limit (which
is the maximum of how far back the distance can be).
2023-04-05 07:30:38 -04:00
Nico Weber
09dd9c4fad Tests: Add test for webp lossless decoding 2023-04-05 13:24:00 +02:00
Nico Weber
c84968dafd LibGfx: Add some support for decoding lossless webp files
Missing:
* Transform support (used by virtually all lossless webp files)
* Meta prefix / entropy image support

Working:
* Decoding of regular image streams
* Color cache

This happens to be enough to be able to decode
Tests/LibGfx/test-inputs/extended-lossless.webp

The canonical prefix code is very similar to deflate's, enough so that
this can use Compress::CanonicalCode (and take advantage of all the
recent performance improvements there).
2023-04-05 13:24:00 +02:00
Nico Weber
c24e4acd19 LibGfx: Add Bitmap::begin() / Bitmap::end()
Useful for accessing a bitmap like a linear container.
2023-04-05 13:24:00 +02:00
Nico Weber
830fd0d5b2 LibGfx: Read webp lossless header using LittleEndianInputBitStream
No behavior change. Covered by existing webp decoder tests :^)
2023-04-05 13:24:00 +02:00
Pankaj Raghav
a65b0cbe4a Kernel/NVMeQueue: Use waitqueue in submit_sync_sqe
The current way we handle sync commands is very ugly and depends on lot
of preconditions. Now that we have an end_io handler for a request, we
can use WaitQueue to do sync commands more elegantly.

This does depend on block layer sending one request at a time but this
change is a step forward towards better IO handling.
2023-04-05 12:45:27 +02:00