Commit Graph

32450 Commits

Author SHA1 Message Date
Sönke Holz
6654021655 Kernel/riscv64: Don't hard-code the page fault reason on RISC-V
Instead, rewrite the region page fault handling code to not use
PageFault::type() on RISC-V.

I split Region::handle_fault into having a RISC-V-specific
implementation, as I am not sure if I cover all page fault handling edge
cases by solely relying on MM's own region metadata.
We should probably also take the processor-provided page fault reason
into account, if we decide to merge these two implementations in the
future.
2024-03-25 14:18:38 -06:00
ronak69
22586c9cc6 AnalogClock: Add feature to change and show time zone
The said time zone is local to each instance of the AnalogClock and is
separate from the system time zone.

This allows user to have clocks that use different time zones
simultaneously.
2024-03-25 14:09:23 -06:00
LekKit
760b9186a5 LibC: Fix pthread_cond_broadcast() waking only one thread 2024-03-25 14:06:32 -06:00
stelar7
0359e8848a LibCrypto: Add roundtrip test for parsing RSA private keys 2024-03-25 14:06:19 -06:00
stelar7
1be411cc73 LibCrypto: Adjust DER length encoding to follow the spec
It says to always use the smallest possible length representation
2024-03-25 14:06:19 -06:00
Nico Weber
2e142105c9 Fuzzers: Add JPEG2000 fuzzer 2024-03-25 20:35:00 +01:00
Nico Weber
a92d887ee3 LibGfx/JPEG2000: Read file structure
This is enough for `file` to print the dimensions of .jp2 / .jpx files,
and for `icc` to print color profile information embedded in the
'colr' box.
2024-03-25 20:35:00 +01:00
Nico Weber
1ab28276f6 LibGfx: Add the start of a JPEG2000 loader
JPEG2000 is the last image format used in PDF filters that we
don't have a loader for. Let's change that.

This adds all the scaffolding, but no actual implementation yet.
2024-03-25 20:35:00 +01:00
Nico Weber
1e95c08db5 LibGfx/ISOBMFF: Add JPEG2000ChannelDefinitionBox 2024-03-25 20:35:00 +01:00
Nico Weber
f080836127 LibGfx/ISOBMFF: Add JPEG2000URLBox 2024-03-25 20:35:00 +01:00
Nico Weber
c58996f4fc LibGfx/ISOBMFF: Add JPEG2000ContiguousCodestreamBox 2024-03-25 20:35:00 +01:00
Nico Weber
f372a9b346 LibGfx/ISOBMFF: Add JPEG2000UUIDListBox 2024-03-25 20:35:00 +01:00
Nico Weber
4a95e55fb3 LibGfx/ISOBMFF: Add JPEG2000CaptureResolutionBox 2024-03-25 20:35:00 +01:00
Nico Weber
b386d5bb14 LibGfx/ISOBMFF: Add JPEG2000ResolutionBox 2024-03-25 20:35:00 +01:00
Nico Weber
7d137dc480 LibGfx/ISOBMFF: Add JPEG2000UUIDInfoBox 2024-03-25 20:35:00 +01:00
Nico Weber
214ff799ce LibGfx/ISOBMFF: Add JPEG2000ColorSpecificationBox 2024-03-25 20:35:00 +01:00
Nico Weber
59bd378db8 LibGfx/ISOBMFF: Add JPEG2000ImageHeaderBox 2024-03-25 20:35:00 +01:00
Nico Weber
78deac3dca LibGfx/ISOBMFF: Give Reader::read_entire_file() a factory callback
This will allow creating different child boxes in different containers.
2024-03-25 20:35:00 +01:00
Nico Weber
b7a120c47e LibGfx/ISOBMFF: Remove Box::read_from_stream()
This doesn't have to be a virtual method: it's called from
various create_from_stream() methods that have a static type
that's created. There's no point in the virtual call here,
and it makes it harder to add additional parameters to
read_from_stream() in some subclasses.
2024-03-25 20:35:00 +01:00
Nico Weber
c84487ed2d LibGfx/ISOBMFF: Give JPEG2000HeaderBox its own type
...and make SuperBox a pure superclass that's not usable by itself.
2024-03-25 20:35:00 +01:00
Nico Weber
65bd090815 LibGfx/ISOBMFF: Start creating JPEG2000 box types
`isobmff` can now dump the id in a JPEG2000SignatureBox.
Creates JPEG2000Boxes.{h,cpp} to house JPEG2000 box types.
2024-03-25 20:35:00 +01:00
Nico Weber
a073b2d047 LibGfx/ISOBMFF: Read JPEG2000HeaderBox 2024-03-25 20:35:00 +01:00
Nico Weber
15ba0a7e18 LibGfx/ISOBMFF: Make BoxStream MaybeOwn its stream
...and make Reader always have a BoxStream.
2024-03-25 20:35:00 +01:00
Nico Weber
a72770cdf6 LibGfx/ISOBMFF: Add JPEG2000 box types
I prefixed the types that are labeled as "JPEG2000" on
https://mp4ra.org/registered-types/boxes with "JPEG2000".
2024-03-25 20:35:00 +01:00
Nico Weber
cdbdc334de LibGfx/ISOBMFF: Alphabetize box type ENUMERATE_ONE() lines 2024-03-25 20:35:00 +01:00
Nico Weber
e81009b338 LibGfx/ISOBMFF: Put string literals in box type ENUMERATE_ONE()
This allows types that have spaces in their FourCC.
2024-03-25 20:35:00 +01:00
Nico Weber
bdb4f6bd49 LibGfx/ISOBMFF: Remove prototypes for nonexistent methods 2024-03-25 20:35:00 +01:00
Nico Weber
270d3303ce LibGfx/ISOBMFF: FileTypeBox is not a FullBox 2024-03-25 20:35:00 +01:00
Nico Weber
7dd5457b8f LibGfx/JBIG2: Add support for refinement coding template 1
This is used when refining a symbol in 0000337.pdf.
2024-03-25 13:16:02 -04:00
Nico Weber
ef9bfce0e7 LibGfx/JBIG2: Add support for SDREFAGG=1 symbol segments
...but only as long as REFAGGNINST == 1. That's enough for 0000337.pdf.
Except that it also needs GRTEMPLATE=1 support in the generic
refinement region decoding procedure, so no behaivor change yet.
2024-03-25 13:16:02 -04:00
Nico Weber
3fa2ecdd65 LibGfx/JBIG2: Extract read_id() into a class
We'll need this for refinement/aggregate coding of symbols.
2024-03-25 13:16:02 -04:00
Nico Weber
68d47cb84a LibGfx/JBIG2: Implement support for symbols segments with input symbols
Needed for 0000337.pdf. It now fails complaining about missing SDREFAGG
support.
2024-03-25 13:16:02 -04:00
Nico Weber
59e6a10f30 LibGfx/JBIG2: Initialize POD members of refinement region input struct
I missed putting this in #23696 while juggling local branches.

No behavior change.
2024-03-25 12:07:18 -04:00
Aliaksandr Kalenik
1036e104ef LibWeb: Remove cache for Paintable::is_visible()
...because it depends on computed values that could be changed without
rebuilding paintable tree.
2024-03-25 14:17:30 +01:00
Ali Mohammad Pur
61148e9bc2 LibCore: Ignore timer events after stop() has been called 2024-03-25 14:16:55 +01:00
Nico Weber
8e9157d6ce LibGfx/JBIG2: Implement decode_end_of_stripe() a bit
This is enough to be able to decode 0000857.pdf p1-4 and
0000372.pdf p11.
2024-03-25 14:08:40 +01:00
Nico Weber
c4a45bb521 LibGfx/JBIG2: Make compute_context() a function pointer
...instead of a lambda that checks the template on every call.

Doesn't make a performance difference locally, but seems maybe nicer?

No behavior change.
2024-03-25 14:08:40 +01:00
Nico Weber
828c640087 LibGfx/JBIG2: Make get_pixel static constexpr
...so it doesn't need to be captured.
2024-03-25 14:08:40 +01:00
Nico Weber
b45a4508c7 LibGfx/JBIG2: Implement support for context templates 1, 2, and 3
Template 2 is needed by some symbols in 0000372.pdf page 11 and
0000857.pdf pages 1-4. Implement the others too while here.  (The
mentioned pages in those two PDFs also use the "end of stripe" segment,
so they still don't render yet.

We still don't support EXTTEMPLATE.
2024-03-25 14:08:40 +01:00
Nico Weber
7035c2a2ff LibGfx/JBIG2: Add some debug logging to decode_page_information() 2024-03-25 14:08:40 +01:00
Andreas Kling
9af966f87d LibWeb: Avoid unnecessary Vector copying when generating line boxes
Carry the same Vector<Gfx::DrawGlyphOrEmoji> all the way from the inline
level iterator to the final line box fragment.
2024-03-25 12:39:23 +01:00
Andreas Kling
f48024c2d1 LibGfx/OpenType: Make glyph_width() only fetch the glyph advance
Instead of fetching a generic set of metrics for each glyph, only fetch
the advance when that's all we need.

This is extremely hot in LibWeb text layout, where it makes a nice dent.
2024-03-25 12:39:23 +01:00
Nico Weber
d2998c1f5e LibGfx/JBIG2: Implement generic_refinement_region_decoding_procedure()
With this, we can decode all pages of 0000425.pdf, 0000215.pdf,
0000882.pdf, and 0000057.pdf.
2024-03-25 08:15:36 +01:00
Nico Weber
0d2e91b4ea LibGfx/JBIG2: Reject things in refinement decoding
These aren't hit for my 1000 page PDF test set.
2024-03-25 08:15:36 +01:00
Nico Weber
562d8ed619 LibGfx/JBIG2: Stub out generic_refinement_region_decoding_procedure()
...and make text_region_decoding_procedure() call it.

generic_refinement_region_decoding_procedure() still just returns
"unimplemented", so no behavior change yet.
2024-03-25 08:15:36 +01:00
Nico Weber
c4c48c1d5f LibGfx/JBIG2: Sketch out text segment refinement coding a bit 2024-03-25 08:15:36 +01:00
Nico Weber
9f327833c0 LibGfx/JBIG2: Read refinement adaptive template pixels for text segments
Text segments using refinement are still rejected later, by
text_region_decoding_procedure(). But we deserialize the input data now,
and the error when this feature is used is now slightly different.
2024-03-25 08:15:36 +01:00
Aliaksandr Kalenik
0652d159cf LibWeb: Add a test for mouse{over,out,enter,leave} events 2024-03-25 08:14:13 +01:00
Aliaksandr Kalenik
4ae2eaead1 LibWeb: Dispatch mouseout and mouseover events 2024-03-25 08:14:13 +01:00
Timothy Flynn
0069390e1c Browser: Implement pasting content from the clipboard 2024-03-25 08:14:00 +01:00