Commit graph

32774 commits

Author SHA1 Message Date
Nico Weber
1393719f10 LibGfx/JPEG2000: Fix typo in an error mesage 2024-04-09 10:19:21 +02:00
Nico Weber
6bad4ea275 LibGfx/JPEG2000: Add parsing loop for tile-part headers
We don't interpret most of the marker data yet.

(We do have to interpret the SOT header to be able to skip the
tile data.)
2024-04-09 10:19:21 +02:00
Nico Weber
9eae6b3a90 LibGfx/JPEG2000: Add parsing loop for main header
We don't interpret any of the marker data yet.
2024-04-09 10:19:21 +02:00
Nico Weber
6c9d3f8c46 LibGfx/JPEG2000: Add constants for markers 2024-04-09 10:19:21 +02:00
Linus Groh
cad95ce274 LibJS: Implement Promise.try()
See: https://github.com/tc39/proposal-promise-try
2024-04-09 10:18:35 +02:00
Andreas Kling
2317a8a4eb LibWeb: Incorrectly skip visiting MessagePort::m_worker_event_target
This is a stopgap hack to prevent CI from hanging until we figure out
what's going on.

Bug: https://github.com/SerenityOS/serenity/issues/23899
2024-04-09 09:28:44 +02:00
Sam Atkins
7d43685927 HexEditor: Add option to display offsets in decimal or hexadecimal 2024-04-09 09:24:23 +02:00
Sam Atkins
f6a9ea7265 HexEditor: Add option for showing/hiding the offsets column 2024-04-09 09:24:23 +02:00
Sam Atkins
4640fc2c97 HexEditor: Move some calculations out of HexEditor.h header
These are gradually becoming more complicated, so they don't really make
sense in the header file any more.

No changes, just moving.
2024-04-09 09:24:23 +02:00
Bastiaan van der Plaat
8342525434 LibWeb: Use HTMLOptionElement in select item getter
fix item
2024-04-09 09:23:57 +02:00
Bastiaan van der Plaat
6f84f69677 LibWeb: Add select selected options collection getter 2024-04-09 09:23:57 +02:00
Bastiaan van der Plaat
7372c01786 LibWeb: Add select and options collection remove method 2024-04-09 09:23:57 +02:00
Bastiaan van der Plaat
5decf4b33c LibWeb: Add HTMLOptionsCollection selected index property 2024-04-09 09:23:57 +02:00
Bastiaan van der Plaat
5c277144d8 LibWeb: Add select and option collection set length 2024-04-09 09:23:57 +02:00
Bastiaan van der Plaat
4e5ce7b63e LibWeb: Add select element size property 2024-04-09 09:23:57 +02:00
Matthew Olsson
abb4b6d117 LibJSGCVerifier: Detect missing JS_CELL() calls 2024-04-09 09:13:06 +02:00
Matthew Olsson
5023e5fda3 Spreadsheet: Add calls to JS_{DECLARE,DEFINE}_ALLOCATOR() 2024-04-09 09:13:06 +02:00
Matthew Olsson
97b343f696 WebContent+WebWorker: Add calls to JS_{DECLARE,DEFINE}_ALLOCATOR() 2024-04-09 09:13:06 +02:00
Matthew Olsson
31341b280a LibWeb: Add calls to JS_{DECLARE,DEFINE}_ALLOCATOR() 2024-04-09 09:13:06 +02:00
Matthew Olsson
d62c0fcbdc LibJS: Add calls to JS_{DECLARE,DEFINE}_ALLOCATOR() 2024-04-09 09:13:06 +02:00
Matthew Olsson
edf484a5ab LibJS: Force a semicolon after JS_{DECLARE,DEFINE}_ALLOCATOR()
This matches the style of other macros, and prevents IDEs from flagging
the semicolon as unnecessary.
2024-04-09 09:13:06 +02:00
Matthew Olsson
d47f656a3a LibJS+LibWeb: Mark a few variables as IGNORE_USE_IN_ESCAPING_LAMBDA
This is a bit noisy, but it'll be better once we upgrade to C++23.
2024-04-09 09:10:44 +02:00
Matthew Olsson
ff00d21d58 Everywhere: Mark a bunch of function parameters as NOESCAPE
This fixes the relevant warnings when running LibJSGCVerifier. Note that
the analysis is only performed over LibJS-adjacent code, but could be
performed over the entire codebase. That will have to wait for a future
commit.
2024-04-09 09:10:44 +02:00
Matthew Olsson
31c5cdcbd5 LibWeb+Assistant: Do not ref-capture stack vars in deferred lambdas 2024-04-09 09:10:44 +02:00
Bastiaan van der Plaat
820f966b33 Ladybird: Add indentation to options in optgroup in select dropdown 2024-04-08 17:24:48 -04:00
Bastiaan van der Plaat
1475c1810f LibWeb: Add support for select options disabled state 2024-04-08 17:24:48 -04:00
Bastiaan van der Plaat
4408581ee0 LibWeb: Refactor SelectItem to allow selecting options without value
Currently the `<select>` dropdown IPC uses the option value attr to
find which option is selected. This won't work when options don't
have values or when multiple options have the same value. Also the
`SelectItem` contained so weird recursive structures that are
impossible to create with HTML. So I refactored `SelectItem` as a
variant, and gave the options a unique id. The id is send back to
`HTMLSelectElement` so it can find out exactly which option element
is selected.
2024-04-08 17:24:48 -04:00
Aliaksandr Kalenik
94d72c174a LibWeb: Allow executing scripts for iframes with src=about:blank
Fixes https://github.com/SerenityOS/serenity/issues/23836
2024-04-08 21:27:34 +02:00
Kyle Lanmon
c07d18c017 NetworkSettings: Use on_change when switching adapter 2024-04-08 09:35:55 -06:00
Kyle Lanmon
04708f11e1 MouseSettings: Use on_change callback to resetting default cursor theme 2024-04-08 09:35:55 -06:00
Kyle Lanmon
c2e13764bc GamesSettings: Use on_change callback for resetting cards defaults 2024-04-08 09:35:55 -06:00
Kyle Lanmon
1d243ef3e3 GamesSettings: Use on_change callback for resetting chess defaults 2024-04-08 09:35:55 -06:00
Kyle Lanmon
8b4e2e2099 LibGUI: Call on_change when set text is called
If there is an on_change callback, and we found at least one match,
call the callback.
2024-04-08 09:35:55 -06:00
stelar7
0e53b87261 LibCrypto: Add OAEP 2024-04-08 09:34:49 -06:00
stelar7
73a534494c LibCrypto: Add MGF1 2024-04-08 09:34:49 -06:00
Lucas CHOLLET
94128fe027 LibWeb: Make CanvasImageSource also be an ImageBitmap 2024-04-08 14:25:36 +02:00
Lucas CHOLLET
af3a73c0a4 LibWeb: Provide an IDL definition for CanvasImageSource 2024-04-08 14:25:36 +02:00
Lucas CHOLLET
7d5b9122ec LibWeb: Define CanvasImageSource only once
The Variant is already defined in CanvasDrawImage.h.
2024-04-08 14:25:36 +02:00
Lucas CHOLLET
676fc5e8c6 LibWeb: Implement HTML::ImageBitmap
And the two methods of `WindowOrWorkerGlobalScope` that are used as
constructors for it.
2024-04-08 14:25:36 +02:00
Shannon Booth
db0519ddc1 LibWeb: Fire a pointer event on synthetic clicks 2024-04-08 14:25:08 +02:00
Shannon Booth
b873e5bc1d LibWeb: Implement the PointerEvent interface
As defined in: https://w3c.github.io/pointerevents

With the exception of the getCoalescedEvents and getPredictedEvents
APIs.

There are still many other parts of that spec (such as the event
handlers) left to implement, but this does get us at least some of the
way.
2024-04-08 14:25:08 +02:00
MacDue
d7b77d7695 LibWeb: Split SVGFormattingContext up into functions
Doing multiple `for_each_in_subtree()` passes was kind of a hack. We
can resolve everything in a single pass with a little more control over
the layout process. This also fixes a few minor issues like the sizing
of nested `<g>` elements.

More work is needed here though as this is still fairly ad-hoc.

Note: This does regress `css-namespace-tag-name-selector.html`,
previously SVG text within `<a>` elements would appear. However, this
was only because `for_each_in_subtree()` would blindly look through the
InlineNodes from the unimplemented `SVGAElement`s.
2024-04-08 14:24:35 +02:00
Aliaksandr Kalenik
a3149c1ce9 LibWeb: Wait for initial navigation to complete before modifying iframe
If initial src of an iframe is "about:blank", it does synchronous
navigation that is not supposed to be interleaved by other navigation
or usage of Document.open().

Fixes crashing in navigation on https://twinings.co.uk/
2024-04-08 09:07:18 +02:00
Nico Weber
aada06757b LibGfx/JBIG2: Add early out to composite_bitbuffer()
The halftone region decoding procedure can draw patterns completely
outside the page bitmap. I haven't seen this in practice yet (not
many files use pattern/halftone segments), but it seems like it's
possible in theory and seems like a good thing to check for.
2024-04-08 06:27:51 +02:00
Nico Weber
438be7e2ca LibGfx/JBIG2: Implement halftone_region_decoding_procedure() and Annex C
Annex C describes how to read a grayscale bitmap with n bits per pixel:
It's encoded as n bilevel bitmaps, where each bilevel bitmap stores one
bit of the grayscale value (using a en.wikipedia.org/wiki/Gray_code,
which is named after Frank Gray and doesn't normally have much to do
with grayscale images).

A halftone region stores a grayscale bitmap and a linear coordinate
system the grayscale bitmap is in.  The grayscale bitmap is overlaid
the halftone region using the coordinate system, and each sample in
the grayscale bitmap is used as an index into a pattern dictionary
and the bitmap at that index is drawn at the current location.
This allows for efficient compression of ordered dithering
(but not error-diffusion dithering).

This does not yet implement halftone region decoding for MMR bitmaps.

The halftone region decoding procedure is the only way to call the
generic region decoding procedure with a skip pattern. This does
include code to compute the skip pattern, but support for that
is not yet implemented in the generic region decoding procedure,
so it'll error out when encountered. (I haven't yet found a file
using this feature, not a way to create such a file yet.)
2024-04-08 06:27:51 +02:00
Nico Weber
9d2c115c1c LibGfx/JBIG2: Implement decode_immediate_halftone_region()
...and stub out halftone_region_decoding_procedure().
2024-04-08 06:27:51 +02:00
Nico Weber
ca5b06cc4f LibGfx/JBIG2: Implement pattern_dictionary_decoding_procedure()
A pattern dictionary stores n bitmaps with the same dimensions w x h.
They're stored in a single bitmap of width `n * w` that's then cut
into n stripes.
2024-04-08 06:27:51 +02:00
Nico Weber
d27722ee00 LibGfx/JBIG2: Implement decode_pattern_dictionary()
It calls pattern_dictionary_decoding_procedure(), which is stubbed out.

No real behavior change yet.
2024-04-08 06:27:51 +02:00
Nico Weber
825b4d4e94 LibGfx/JBIG2: Tweak decode_immediate_generic_region()
Set context only for non-MMR.

No behavior change.
2024-04-08 06:27:51 +02:00
Lucas CHOLLET
de6507ef94 LibCrypto: Remove simple-template-id from constructors
This is disallowed as from C++20. GCC 14 gives an error for these two.

See:
https://cplusplus.github.io/CWG/issues/2237.html
https://stackoverflow.com/questions/71978335/class-templates-constructor-declaration-doesnt-compile-for-c20-but-compiles
2024-04-07 21:33:46 +02:00