Commit Graph

34046 Commits

Author SHA1 Message Date
Diego
bd6ee060d2 LibWasm: Check data section offset for overflow during instantiation 2024-06-07 18:45:56 +02:00
Andreas Kling
28d4e326f8 LibGfx: Use the woff2 library to decode WOFF2 font files
This saves us the trouble of maintaining our own implementation,
and instantly brings us to full WOFF2 feature parity with others.

Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
2024-06-07 18:42:12 +02:00
Aliaksandr Kalenik
9be5867eb2 LibWeb: Implement rejection by bounding box for PaintInnerBoxShadow
Before this change we were painting inner shadows lying outside of
viewport.

Improves painting performance on Github and Twitter where this command
is used a lot.
2024-06-07 18:41:57 +02:00
Aliaksandr Kalenik
1c8d37d528 LibWeb: Rename PaintOuterBoxShadowParams to PaintBoxShadowParams
Drop "outer" from the name because this struct is used for both inner
and outer shadows.
2024-06-07 18:41:57 +02:00
Aliaksandr Kalenik
22bb476b6f LibWeb: Use ints instead of DevicePixels in PaintOuterBoxShadowParams
DevicePixels concept should not leak from painting recording phase.
2024-06-07 15:42:38 +02:00
Aliaksandr Kalenik
2dd3b6fcff LibWeb: Remove unused members in PaintOuterBoxShadowParams
This struct had all members in CSSPixels and DevicePixels, but only the
latter are needed for painting.

Shrinks PaintOuterBoxShadowParams from 144 bytes to 72 bytes.
2024-06-07 15:42:38 +02:00
Jamie Mansfield
ab6b687d4c LibWeb: Implement "Set request’s referrer policy on redirect" AO 2024-06-07 09:54:19 +02:00
Jamie Mansfield
5a40a00d9e LibWeb/ReferrerPolicy: Add spec link for strip URL AO 2024-06-07 09:54:19 +02:00
Jamie Mansfield
8542a8b458 LibWeb/Fetch: Update "HTTP-redirect fetch" algorithm to latest spec
The spec and implementation's comments had diverged a little, this
brings them in line :)
2024-06-07 09:54:19 +02:00
Jamie Mansfield
8f2cb6755b LibWeb: Implement HTMLAreaElement.referrerPolicy 2024-06-07 09:54:19 +02:00
Jamie Mansfield
64eadab181 LibWeb: Implement HTMLIFrameElement.referrerPolicy 2024-06-07 09:54:19 +02:00
Jamie Mansfield
1aa58b6d8c LibWeb: Implement HTMLImageElement.referrerPolicy 2024-06-07 09:54:19 +02:00
Jamie Mansfield
f82c727071 LibWeb: Implement HTMLLinkElement.referrerPolicy 2024-06-07 09:54:19 +02:00
Jamie Mansfield
469cbe78de LibWeb: Use Reflect for HTMLAnchorElement.referrerPolicy 2024-06-07 09:54:19 +02:00
Jamie Mansfield
53d7aa53a2 LibWeb: Use Enumerated for HTMLScriptElement.referrerPolicy 2024-06-07 09:54:19 +02:00
Jamie Mansfield
7ce35b75aa LibWeb: Implement should block mixed content response to request 2024-06-07 09:50:30 +02:00
Jamie Mansfield
2159377296 LibWeb: Upgrade mixed requests to potentially trustworthy URLs
(if appropriate)
2024-06-07 09:50:30 +02:00
Jamie Mansfield
8f0d035145 LibWeb: Implement should block mixed content request 2024-06-07 09:50:30 +02:00
Andrew Kaster
d90a9ab70c LibWeb: Add Web::UIEvents::KeyCode and KeyModifier enums, drop Kernel
This was the last Kernel header we had. Move the definitions we need
into a UIEvents header similar to MouseButton.
2024-06-07 09:44:41 +02:00
Andrew Kaster
f98e28912a LibCore: Only include BeepInstruction in System.cpp on Serenity
It remains to be seen whether we actually need this on serenity either..
2024-06-06 12:51:14 -06:00
Andrew Kaster
2770b7eecd LibCore: Null-check struct addrinfo to avoid freeaddrinfo(NULL)
On some C libraries, like NetBSD and musl-libc, this under-specified
edge case results in a crash rather than silently ignoring the null
pointer.
2024-06-06 12:48:58 -06:00
Andrew Kaster
405ce6e5f5 LibCore: Be more BSD-friendly in Core::Environment
FreeBSD and NetBSD don't have secure_getenv(3), same as macOS.
FreeBSD 13 and lower also don't allow setting environ pointers to null.

Co-Authored-By: Robert Clausecker <fuz@FreeBSD.org>
2024-06-06 12:48:58 -06:00
Andrew Kaster
89092e98a4 LibJS: Pass -1 as fd when using MAP_ANONYMOUS with mmap
NetBSD and FreeBSD get upset when we don't set the fd to an invalid
value when using a non-shared mapping.

Reported-By: Thomas Klausner <wiz@gatalith.at>
2024-06-06 12:48:58 -06:00
easrng
43b8f82e94 LibGfx: Ignore nonexistent font directories 2024-06-06 10:42:55 -06:00
easrng
f058939f1b LibCore: Get font directories from XDG_DATA_DIRS 2024-06-06 10:42:55 -06:00
Andrew Kaster
aef6ece9e6 Meta: Remove shred utility 2024-06-06 09:43:51 -06:00
Timothy Flynn
d61770c457 LibCore: Remove now-unused singleton process utilities 2024-06-06 11:27:03 -04:00
Timothy Flynn
8362c073f3 Everywhere: Remove LibSQL, SQLServer, and the sql REPL :^)
It is now entirely unused and replaced by sqlite3.
2024-06-06 11:27:03 -04:00
Timothy Flynn
30e745ffa7 LibWebView: Replace usage of LibSQL with sqlite3
This makes WebView::Database wrap around sqlite3 instead of LibSQL. The
effect on outside callers is pretty minimal. The main consequences are:

1. We must ensure the Cookie table exists before preparing any SQL
   statements involving that table.
2. We can use an INSERT OR REPLACE statement instead of separate INSERT
   and UPDATE statements.
2024-06-06 11:27:03 -04:00
Timothy Flynn
65ddd0553b Meta+LibWebView: Install and link sqlite3 with vcpkg
We will use sqlite3 as a replacement for LibSQL. Using a tried-and-true
database will allow us to avoid maintaining our an incomplete, non-ACID,
and less performant implementation. It also means we do not have to
launch and manage the singleton SQLServer process.
2024-06-06 11:27:03 -04:00
Timothy Flynn
d1ec32e28f LibProtocol: Exit fatally if the connection to RequestServer disappears
The default implementation of die() causes the client process to simply
exit cleanly. This prevents any tests from recognizing that something
went wrong, as the process exits with a code of 0. With this patch, we
still just exit when the connection dies, but with a fatal signal. In
the future, we will want to launch a new RequestServer process and
re-establish client connections.
2024-06-06 13:55:10 +02:00
Enver Balalic
862fc91b2c LibWeb: Implement HTMLImageElement::decode with a few FIXMEs
Implements enough of HTMLImageElement::decode for it to not break
websites and actually load an image :)
2024-06-06 08:20:02 +02:00
Andrew Kaster
7b67fa706f DOM: Check for navigable destruction in declarative refresh timer
If the Document's navigable has been destroyed since we started this
timer, or it's no longer the active document of its navigable, we
shouldn't navigate to it.
2024-06-06 08:13:34 +02:00
Nathan E. Egge
b040e5c12b LibTimeZone: Remove AK_OS_SERENITY ifdef
Remove special case for SerenityOS as fallback will still work.
2024-06-05 22:23:15 -04:00
Nathan E. Egge
d83ab035ee LibTimeZone: Read /etc/timezone for current TZ
Fallback to reading /etc/timezone by calling system_time_zone() when
unable determine time zone from /etc/localtime.
This works on systems where /etc/localtime is a file and not a symlink.

Fixes #65
2024-06-05 22:23:15 -04:00
Tim Ledbetter
c79041344d LibWeb: Ensure anchor node is not null when extending selection
Previously, clicking while holding shift without having previously made
any text selection would cause a crash.
2024-06-05 13:57:01 -04:00
Andrew Kaster
90af26e309 Meta+CMake: Remove unused CMake functions and features
Goodbye, serenity_components and Jakt.
2024-06-05 12:23:54 -04:00
Tim Ledbetter
f721230456 LibWeb: Extend text selection when left clicking and holding shift 2024-06-05 11:51:41 -04:00
Andreas Kling
f42c18bc4c LibGfx: Make Painter::target() return a Bitmap&
Painter always has a target bitmap, so let's return a reference.
2024-06-05 15:37:05 +02:00
Andreas Kling
a1a59ec3ab LibGfx: Remove unused Painter::draw_text() overloads 2024-06-05 15:37:05 +02:00
Andreas Kling
2f23912a55 LibGfx: Remove unused cruft from Painter.h 2024-06-05 15:37:05 +02:00
Andreas Kling
fe4cc32380 Everywhere: Include <LibGfx/Painter.h> in fewer places
Touching Painter.h now rebuilds ~40 files instead of ~300.
2024-06-05 15:37:05 +02:00
Andreas Kling
0e47e5e265 LibGfx: Move Gfx::Painter::LineStyle => Gfx::LineStyle 2024-06-05 15:37:05 +02:00
Andreas Kling
57906a4e1b LibGfx: Move Gfx::Painter::WindingRule => Gfx::WindingRule 2024-06-05 15:37:05 +02:00
Andreas Kling
254d040ff4 LibGfx: Move Gfx::Painter::ScalingMode => Gfx::ScalingMode
This will allow users to avoid including Painter.h
2024-06-05 15:37:05 +02:00
Andreas Kling
5e059c80cd LibGfx: Remove unused TabPosition.h 2024-06-05 15:37:05 +02:00
Andreas Kling
6a96920dbc LibGfx: Remove Bitmap and Painter "scale" concept
We don't need intrinsic scale factors for Gfx::Bitmap in Ladybird,
as everything flows through the CSS / device pixel ratio mechanism.

This patch also removes various unused functions instead of adapting
them to the change.
2024-06-05 15:37:05 +02:00
Andreas Kling
fce4739d3e LibTLS: Put debug spam about loaded certificates behind TLS_DEBUG 2024-06-05 07:11:34 +02:00
Andreas Kling
a0874dc870 LibWebView: Remove ProcessManager debug spam 2024-06-05 07:10:42 +02:00
Aliaksandr Kalenik
881e970846 LibWeb: Implement scrollbars dragging 2024-06-05 07:03:42 +02:00
Aliaksandr Kalenik
94eacf6da7 LibWeb: Remove did_request_scroll_to IPC call
No longer used after moving scrollbar painting into WebContent.
2024-06-05 07:03:42 +02:00
Aliaksandr Kalenik
cc3d95a356 LibWeb: Remove did_request_scroll IPC call
No longer used after moving scrollbar painting into WebContent.
2024-06-05 07:03:42 +02:00
Aliaksandr Kalenik
5285e22f2a LibWeb+WebContent: Move scrollbar painting into WebContent
The main intention of this change is to have a consistent look and
behavior across all scrollbars, including elements with
`overflow: scroll` and `overflow: auto`, iframes, and a page.

Before:
- Page's scrollbar is painted by Browser (Qt/AppKit) using the
  corresponding UI framework style,
- Both WebContent and Browser know the scroll position offset.
- WebContent uses did_request_scroll_to() IPC call to send updates.
- Browser uses set_viewport_rect() to send updates.

After:
- Page's scrollbar is painted on WebContent side using the same style as
  currently used for elements with `overflow: scroll` and
  `overflow: auto`. A nice side effects: scrollbars are now painted for
  iframes, and page's scrollbar respects scrollbar-width CSS property.
- Only WebContent knows scroll position offset.
- did_request_scroll_to() is no longer used.
- set_viewport_rect() is changed to set_viewport_size().
2024-06-05 07:03:42 +02:00
Aliaksandr Kalenik
eb909118bf LibWeb: Propagate scrollbar-width property from root element to viewport 2024-06-05 07:03:42 +02:00
Aliaksandr Kalenik
50920b0595 LibWeb: Scroll into viewport from a task in set_focused_element()
This is a hack needed to preserve current behaviour after making set
viewport_rect() being not async in upcoming changes.

For example both handle_mousedown and handle_mouseup should use the same
viewport scroll offset even though handle_mousedown runs focusing steps
that might cause scrolling to focused element:
- handle_mousedown({ 0, 0 })
  - run_focusing_steps()
  - set_focused_element()
  - scroll_into_viewport() changes viewport scroll offset
- handle_mouseup({ 0, 0 })
2024-06-05 07:03:42 +02:00
Jamie Mansfield
8e062a52a3 LibWeb: Move NetworkPartitionKey into a header
This is used elsewhere, such as the HTMLLinkElement.
2024-06-05 05:42:47 +01:00
Jamie Mansfield
2ffda00347 LibWeb: Implement HTMLImageElement.crossOrigin 2024-06-05 05:42:47 +01:00
Jamie Mansfield
d7d60268ec LibWeb: Implement HTMLLinkElement.crossOrigin 2024-06-05 05:42:47 +01:00
Jamie Mansfield
735859bc10 LibWeb: Implement HTMLLinkElement.fetchPriority 2024-06-05 05:42:47 +01:00
Jamie Mansfield
d1f884533e LibWeb: Update "create a link request" for spec changes
Fetch priority is added, and one line is split into two :)
2024-06-05 05:42:47 +01:00
Jamie Mansfield
21cf2c2981 LibWeb: Implement HTMLScriptElement.fetchPriority 2024-06-05 05:42:47 +01:00
Jamie Mansfield
8315ad6759 LibWeb: Implement HTMLImageElement.fetchPriority 2024-06-05 05:42:47 +01:00
Jamie Mansfield
956106c6d8 LibWeb: Add from_string function for request priority 2024-06-05 05:42:47 +01:00
Jamie Mansfield
2fde20adf9 LibWeb: Add IDL enum for fetch priority attribute 2024-06-05 05:42:47 +01:00
Andreas Kling
4822d1da4e LibWeb: Remove unused CRC2D::bitmap_font_fill_text() 2024-06-04 18:45:30 +02:00
Andreas Kling
e81bd34561 LibGfx: Remove more unused Font APIs 2024-06-04 18:45:30 +02:00
Andreas Kling
a4a3703fb4 LibGfx: Remove unused GlyphBitmap class 2024-06-04 18:45:30 +02:00
Andreas Kling
d86f54da30 LibGfx: Remove Font::presentation_size()
This was a legacy version of point_size() that returned a u8.
2024-06-04 18:45:30 +02:00
Andreas Kling
d95f5692a3 LibGfx: Remove Font::qualified_name() and some FontDatabase APIs
...because the FontDatabase APIs were not used, and they were the only
users of qualified_name().
2024-06-04 18:45:30 +02:00
Andreas Kling
eccfdede10 LibGfx: Remove various unused Font APIs 2024-06-04 18:45:30 +02:00
Andreas Kling
23bb449026 LibGfx: Remove Utf32View APIs from Painter 2024-06-04 18:45:30 +02:00
Andreas Kling
1a2a34fa43 LibGfx: Remove Bitmap::glyph_spacing()
This was only ever non-zero for SerenityOS bitmap fonts.
2024-06-04 18:45:30 +02:00
Andreas Kling
04a6e2f83d LibWeb: Remove Gfx::BitmapFont
This class supported the binary bitmap font file format in SerenityOS,
and isn't something we need in Ladybird.
2024-06-04 18:45:30 +02:00
Andreas Kling
30a92911fa WebContent: Remove update_system_fonts() IPC message
This was no longer doing anything. We'll eventually want a way to pass
system default fonts to each WebContent process, but we don't need to
squeeze everything through this API that was really meant for Serenity's
very idiosyncratic font system.
2024-06-04 18:45:30 +02:00
Andreas Kling
f78ed0600a LibGfx: Remove FontDatabase "default queries"
At last, nothing depends on these anymore.
2024-06-04 18:45:30 +02:00
Andreas Kling
966d442152 LibWeb+Ladybird: Remove FontPluginSerenity (+ use Ladybird::FontPlugin) 2024-06-04 18:45:30 +02:00
Andreas Kling
fac126bce9 Ladybird+LibWeb: Stop using Gfx::FontDatabase default fonts
This closes the window at WebContent process startup where we were
relying on Gfx::FontDatabase having some resolvable value in its default
font query.
2024-06-04 18:45:30 +02:00
Andreas Kling
49d546fe8b LibGfx: Remove Painter "draw op" mechanism
We were not making use of this in Ladybird, so let's simplify.
2024-06-04 18:45:30 +02:00
Andreas Kling
d3e802cbef LibGfx: Remove a whole bunch of unused Painter APIs 2024-06-04 18:45:30 +02:00
Andreas Kling
10335a07ee LibGfx: Remove Painter's "implicit font" concept
Nothing actually needs this, so let's remove it and no longer have to
deal with figuring out its fallback value.
2024-06-04 18:45:30 +02:00
Andreas Kling
ba8945f6f3 LibWeb: Make DrawText paint command always have a font
Nobody ever tries to create one without a font anyway.
2024-06-04 18:45:30 +02:00
Andreas Kling
1b2d08ee7e LibGfx: Remove a bunch of unused classes 2024-06-04 18:45:30 +02:00
Simon Wanner
0ab4722cee LibTextCodec: Use generated lookup tables for all single byte decoders 2024-06-04 10:21:07 +02:00
Simon Wanner
6b2c459901 LibTextCodec: Fix ISO-8859-1 vs. windows-1252 handling in web contexts
The Encoding specification maps ISO-8859-1 to windows-1252 and expects
the windows-1252 translation table to be used, which differs from
ISO-8859-1 for 0x80-0x9F.

Other contexts expect to get the actual ISO-8859-1 encoding, with 1-to-1
mapping to U+0000-U+00FF, when requesting it.

`decoder_for_exact_name` is introduced, which skips the mapping from
aliases to the encoding name done by `get_standardized_encoding`.
2024-06-04 10:21:07 +02:00
Simon Wanner
46d5cf0443 LibTextCodec: Fix some incorrect encoding aliases 2024-06-04 10:21:07 +02:00
Simon Wanner
09f2d79cb1 LibTextCodec: Bring TextCodec::get_standardized_encoding closer to spec 2024-06-04 10:21:07 +02:00
Simon Wanner
987910ad0f LibWeb: Bring TextDecoder constructor closer to spec 2024-06-04 10:21:07 +02:00
Andreas Kling
6321e97b09 AK: Remove various unused things 2024-06-04 09:19:39 +02:00
Andreas Kling
5b4d071daa Everywhere: Remove LibCrypt
This was totally unused.
2024-06-04 09:19:39 +02:00
Andreas Kling
f2fd8fc928 Everywhere: Remove LibGemini
This hasn't been maintained (or worked at all) for a long time,
and it's not a widely supported protocol, so let's drop it.
2024-06-04 09:19:39 +02:00
Andreas Kling
e4cd91761d Everywhere: Remove LibMarkdown
This was used to convert markdown into HTML for display in the browser,
but no other browser behaves this way, so let's simplify things by
removing it.

(Yes, we could implement all kinds of "convert to HTML and display" for
every file format out there, but that's far outside the scope of a
browser engine.)
2024-06-04 09:19:39 +02:00
Timothy Flynn
edb527e04d Libraries: Remove some Serenity-only interface implementations 2024-06-04 07:45:42 +02:00
Timothy Flynn
126cbce632 Meta: Remove empty LibSystem library and references 2024-06-04 07:45:42 +02:00
Jamie Mansfield
a419dcbe8b LibWeb/Fetch: Update "HTTP fetch" algorithm to latest spec comments
The spec and implementation's comments had diverged a little, this
brings them in line :)
2024-06-04 07:27:52 +02:00
Diego
50dc1c3c19 LibWasm: Fix memarg multi-memory reading
The extension bit for the memory index present in memargs is at
position 6, but we previously checked position 5, which caused a few
spec issues.
2024-06-03 16:20:19 +02:00
Tim Ledbetter
c76140f6ed LibDSP: Remove LibDSP 2024-06-03 15:58:55 +02:00
Tim Ledbetter
d7768cdd0f LibAudio: Move MDCT.h from LibDSP to LibAudio 2024-06-03 15:58:55 +02:00
Timothy Flynn
bdbe2fdcc5 Everywhere: Replace SERENITY_SOURCE_DIR with LADYBIRD_SOURCE_DIR
In order to have checkouts of both SerenityOS and Ladybird, we need to
use a different environment variable for Ladybird.
2024-06-03 15:57:59 +02:00
Andreas Kling
e70d96e4e7 Everywhere: Remove a lot more things we don't need 2024-06-03 10:53:53 +02:00
Andreas Kling
421aa7c475 Everywhere: Remove more unused components 2024-06-03 10:53:53 +02:00
Tim Ledbetter
5863ef852d Meta: Remove references to unused utilities 2024-06-03 10:53:53 +02:00
Tim Ledbetter
b82eaad274 Ladybird: Move BrowserSettings/Defaults.h to Ladybird/DefaultSettings.h 2024-06-03 10:53:53 +02:00
Andrew Kaster
dd1fbd3513 Meta: Remove SerenityOS components not needed for Ladybird 2024-06-03 10:53:53 +02:00
Matthew Olsson
44bb6e8390 LibWeb: Handle the cssFloat and cssOffset keyframe properties properly 2024-06-03 10:53:32 +02:00
Matthew Olsson
36ceaf38d5 LibWeb: Check for nullish objects in process_a_keyframe algorithm 2024-06-03 10:53:32 +02:00
Matthew Olsson
37ee45db3d LibWeb: Use camelCase for JS keyframe objects 2024-06-03 10:53:32 +02:00
Matthew Olsson
b5c682bc2e LibWeb: Copy the keyframes in KeyframeEffect's copy constructor 2024-06-03 10:53:32 +02:00
Matthew Olsson
5b84bd6e45 LibWeb: Add DocumentOrShadowRoot::get_animations() 2024-06-03 10:53:32 +02:00
Matthew Olsson
37322baf54 LibWeb: Ensure all DocumentTimeline objects have the same time value
The DocumentTimeline constructor used the current millisecond time to
initialize its currentTime, but that means that a newly created timeline
would always have a different time value than other timelines that have
been through the update_animations_and_send_events function.
2024-06-03 10:53:32 +02:00
Nico Weber
4e9480b719 LibGfx/WebP: Add a VERIFY() for an assumption
This should have no behavior change after the previous commit.
2024-06-03 07:48:53 +02:00
Nico Weber
857750dfed LibGfx/WebPLoader: Survive calling loop_count() before other accessors
Fixes `animation` asserting when reading a webp input.

(The other order of operations is still covered by TestImageWriter.cpp.)
2024-06-03 07:48:53 +02:00
Andreas Kling
3020c5766e LibGfx: Remove unnecessary use of LibGUI in Gfx::Palette
Let's not require a cross-library badge like this.
2024-06-02 20:26:56 +02:00
Andreas Kling
09980af4ea LibWeb: Add Web::UIEvents::MouseButton enum, drop dependency on LibGUI
This was the only thing LibWeb needed from LibGUI, and we can just
duplicate the enum in LibWeb and get rid of a bogus dependency.
2024-06-02 20:24:42 +02:00
Andreas Kling
3e46874858 LibSyntax: Remove minor unnecessary use of LibGUI
This was the only stuff that made it look like LibSyntax depends on
LibGUI, when it really doesn't.
2024-06-02 20:00:29 +02:00
Jamie Mansfield
295c4ef51a LibWeb/Fetch: Use MimeType in DataURL 2024-06-02 19:55:53 +02:00
Jamie Mansfield
2b59ba19e0 LibWeb/WebSockets: Use correct URL parser 2024-06-02 19:55:53 +02:00
Jamie Mansfield
48e834918a LibWeb/SVG: Implement SVGTransformList.numberOfItems 2024-06-02 19:55:53 +02:00
Jamie Mansfield
4a1d02e7d8 LibWeb/SVG: Implement SVGTransformList.length 2024-06-02 19:55:53 +02:00
Diego
ad9457b725 LibWasm: Properly check memory.copy addresses
Prevents overflow when checking that `memory.copy` addresses are valid.
This prevents a potential crash in the VM.
2024-06-02 19:45:54 +02:00
Diego
308592969c LibWasm: Properly check table bounds in element instantiation
Offset is now checked using saturating addition to avoid overflow. This
prevents a crash in the VM during instantiation.
2024-06-02 19:31:25 +02:00
Diego
2fabbae0f6 LibWasm: Properly check active data segment offset in instantiation
Before, it was possible to crash the VM during instantiation when an
active data segment requested to put data in memory at an invalid
offset.
2024-06-02 19:30:40 +02:00
Andreas Kling
ae90e26315 LibJS/Bytecode: Make constant deduplication a bit smarter
Instead of scanning through the list of seen constants, we now have a
more structured storage of the constants true, false, null, undefined,
and every possible Int32 value.

This fixes an O(n^2) issue found by Kraken/json-stringify-tinderbox.js
2024-06-02 16:34:08 +02:00
Andreas Kling
044539c60b LibJS/Bytecode: Rewrite Jump-to-Return-or-End as just Return or End
Instead of wasting time jumping to a shared Return or End instruction,
we can also emit a Return or End directly in many cases.
2024-06-02 16:34:08 +02:00
Andreas Kling
7971cfdd89 LibJS/Bytecode: Move bytecode operand rewriting to a separate pass
This way we don't have to do it whenever performing some kind of
instruction rewrite.
2024-06-02 16:34:08 +02:00
Andreas Kling
97983275bc LibJS/Bytecode: Perform constant folding on binary expressions
This turns expressions like `(2 + 3) * 8 / 2` into a constant (20)
at bytecode compilation time instead of generating instructions
to calculate the value.
2024-06-02 16:34:08 +02:00
Andreas Kling
c372a084a2 LibJS/Bytecode: Add and use copy_if_needed_to_preserve_evaluation_order
This is a new Bytecode::Generator helper that takes an operand and
returns the same operand, or a copy of it, in case a copy is required
to preserve correct evaluation order.

This can be used in a bunch of places where we're worried about
clobbering some value after obtaining it.

Practically, locals are always copied, and temporary registers as well
as constants are returned as-is.
2024-06-02 16:34:08 +02:00
Matthew Olsson
73aadddbc1 LibWeb: Reject invalid keyframe offset values 2024-06-02 16:07:12 +02:00
Matthew Olsson
e13cd914a9 LibWeb: Handle animating the 'all' property 2024-06-02 16:07:12 +02:00
Matthew Olsson
64ec66e209 LibWeb: Handle animating 'initial' property values 2024-06-02 16:07:12 +02:00
Matthew Olsson
2adb4c460d LibWeb: Change enum to enum class in KeyframeEffect 2024-06-02 16:07:12 +02:00
Matthew Olsson
6859826e3d LibWeb: Handle persisting an animation after it has been removed 2024-06-02 16:07:12 +02:00
Matthew Olsson
a80af938eb LibWeb: Support subtree option in Animatable.getAnimations() 2024-06-02 16:07:12 +02:00
Matthew Olsson
e2cb25e35c LibWeb: Support interpolation of mixed percentage dimension units 2024-06-02 15:12:17 +02:00
Diego
d1cfddc177 LibWasm: Check section lengths when parsing
Sections in WebAssembly give their length in bytes after they're
declared. This commit makes sure that length is upheld.
2024-06-01 22:27:15 +02:00
Liav A.
a7aa843bcc Utilities/tar: Open archive file before changing directory
Otherwise the utility will fail to open the archive file because it's
presumably not in the chosen directory.
2024-06-01 18:35:31 +02:00
Diego
d906255cbb LibWasm: Improve table support
Implements `table.get`, `table.set`, `elem.drop`, `table.size`,
and `table.grow`. Also fixes a few issues when generating ref-related
spectests. Also changes the `TableInstance` type to use
`Vector<Reference>` instead of `Vector<Optional<Reference>>`, because
the ability to be null is already encoded in the `Reference` type.
2024-06-01 16:21:03 +02:00
Nico Weber
347e2831b2 LibGfx/WebPWriter: Do not write color index if only one channel varies
The benefit of the color indexing transform is to have only one
varying channel after it (the green channel, which after the
transform serves as index into the color table).

If there is only one varying channel before the transform, it's
not beneficial. (...except if there are <= 16 colors, then the
pixel bundling presumably still works.)
2024-06-01 14:52:00 +02:00
Jamie Mansfield
e13b9bef5c LibWeb: Don't warn when 'scopes' is present in import maps
Another mistake I made when implementing import map support.
2024-06-01 07:42:48 -04:00
Jamie Mansfield
76eb7568c9 LibWeb: Set import map scopes when parsing 2024-06-01 07:42:48 -04:00
Andreas Kling
8b7ad09a07 LibJS: Add test to verify copying this to a local doesn't break
Co-Authored-By: Simon Wanner <simon+git@skyrising.xyz>
2024-06-01 09:39:50 +02:00
Andreas Kling
e6b1e54c44 LibJS/Bytecode: Don't generate ResolveThisBinding if not needed
Functions that don't have a FunctionEnvironment will get their `this`
value from the ExecutionContext. This patch stops generating
ResolveThisBinding instructions at all for functions like that, and
instead pre-populates the `this` register when entering a new bytecode
executable.
2024-06-01 09:39:50 +02:00
Andreas Kling
9d22db2802 LibJS/Bytecode: Pretty-print the this register as "this" 2024-06-01 09:39:50 +02:00
Andreas Kling
507f83a615 LibJS/Bytecode: Always resolve this binding into dedicated register
We already have a dedicated register slot for `this`, so instead of
having ResolveThisBinding take a `dst` operand, just write the value
directly into the `this` register every time.
2024-06-01 09:39:50 +02:00
Andreas Kling
9d57b55f24 LibJS/Bytecode: Make Generator aware of the function it's compiling 2024-06-01 09:39:50 +02:00
Andreas Kling
59c2637fdc LibJS/Bytecode: Rename emit_function_body_bytecode() -> compile()
This function isn't really one of the "emit_foo" family -- it's the main
compilation driver!
2024-06-01 09:39:50 +02:00
Timothy Flynn
b01e810a89 LibWeb+LibWebView+WebContent: Support case-insensitive find-in-page
This allows searching for text with case-insensitivity. As this is
probably what most users expect, the default behavior is changes to
perform case-insensitive lookups. Chromes may add UI to change the
behavior as they see fit.
2024-06-01 07:37:54 +02:00
Timothy Flynn
fe3fde2411 AK+LibUnicode: Implement a case-insensitive variant of find_byte_offset
The existing String::find_byte_offset is case-sensitive. This variant
allows performing searches using Unicode-aware case folding.
2024-06-01 07:37:54 +02:00
Diego
cf6aa77816 LibWasm: Fix memory limits validator discrepancy
The spec allows the maximum size of the linear memory to be 2^16.
However, we previously only allowed 2^16-1, which caused a spec
compliance issue.
2024-06-01 00:28:48 +02:00
Andrew Kaster
a9fdd819c3 LibCore: Don't leak EventLoopImplementationUnix's ThreadData
The ThreadData still has a lifetime a longer than the thread it was
created for, but at least now it's not leaked at process exit.
2024-05-31 15:24:46 -06:00
Nico Weber
8a21992030 image: Add a --webp-allowed-transforms switch
This is mainly useful for testing.
2024-05-31 22:39:25 +02:00
Nico Weber
533b29dde7 LibGfx/WebPWriter: Add a toggle for disabling individual transforms 2024-05-31 22:39:25 +02:00
Nico Weber
47d3245ea7 LibGfx/WebPWriter: Do not convert -inf to unsigned
Else UBSan complains about the color indexing test in this PR.
2024-05-31 22:39:25 +02:00
Nico Weber
9e61912f64 LibGfx/WebPWriter: Fix bug computing max_symbol bit length
Storing a number n needs floor(log2(n) + 1) bits, not ceil(log2(n)).
(The two expressions are identical except for when n is a power of 2.)

Serendipitously covered by the indexed color transform tests in this PR.
2024-05-31 22:39:25 +02:00
Nico Weber
5c990e87f4 LibGfx/WebPWriter: Add a dbgln_if() 2024-05-31 22:39:25 +02:00
Nico Weber
e212c20228 LibGfx/WebPWriter: Implement pixel bundling for color indexing
If an image has <= 16 colors, WebP lossless files pack multiple
color table indexes into a single pixel's green channel, further
reducing file size. This adds support for that.

My current test files all have more than 16 colors. For a 16x16
black-and-white bitmap that contains a little smiley face in the
middle, this reduces the output size from 128B to 54B.
2024-05-31 22:39:25 +02:00
Nico Weber
cae672e1f9 LibGfx/WebPWriter: Implement color indexing transform
If an image has 256 or fewer colors, WebP/Lossless allows storing
the colors in a helper image, and then storing just indexes into that
helper image in the main image's green channel, while setting
r, b, and a of the main image to 0.

Since constant-color channels need to space to store in WebP,
this reduces storage needed to 1/4th (if alpha is used) or 1/3rd
(if alpha is constant across the image).

If an image has <= 16 colors, WebP lossless files pack multiple
color table indexes into a single pixel's green channel, further
reducing file size. This pixel packing is not yet implemented in
this commit.

GIFs can store at most 256 colors per frame, so animated gifs
often have 256 or fewer colors, making this effective when
transcoding gifs.

(WebP also has a "subtract green" transform, which can be used
to need to store just a single channel for grayscale images, without
having to store a color table. That's not yet implemented -- for now,
we'll now store grayscale images using this color indexing transform
instead, which wastes to storage for the color table.)

(If an image has <= 256 colors but all these colors use only a single
channel, then storing a color table for these colors is also wasteful,
at least if the image has > 16 colors too. That's rare in practice,
but maybe we can add code for it later on.)

(WebP also has a "color cache" feature where the last few used colors
can be referenced using very few bits. This is what the webp spec says
is similar to palettes as well. We don't implement color cache writing
support yet either; maybe it's better than using a color indexing
transform for some inputs.)

Some numbers on my test files:

sunset-retro.png: No performance or binary size impact. The input
quickly uses more than 256 colors.

giphy.gif (184k): 4.1M -> 3.9M, 95.5 ms ± 4.9 ms -> 106.4 ms ± 5.3 ms
Most frames use more than 256 colors, but just barely. So fairly
expensive runtime wise, with just a small win.

(See comment on #24454 for the previous 4.9 MiB -> 4.1 MiB drop.)

7z7c.gif (11K): 118K -> 40K
Every frame has less than 256 colors (but more than 16, so no packing),
and so we can cut filesize roughly to 1/3rd: We only need to store an
index per channel. From 10.7x as large as the input to 3.6x as large.
2024-05-31 22:39:25 +02:00
Nico Weber
633f509eb4 LibGfx/WebP: Move TransformType to WebPSharedLossless.h 2024-05-31 22:39:25 +02:00
Nico Weber
804e85265e LibGfx/WebPWriter: Use an IsOpaque struct for tracking opacity
No behavior change, but this makes it easy to correctly set this
flag when adding an indexing transform: Opacity then needs to be
determined based on if colors in the color table have opacity,
not if the indexes into the color table do.

With this struct, only the first time something sets opacity is
honored, giving us those semantics.
2024-05-31 22:39:25 +02:00
Nico Weber
c5dedbc54a LibGfx/WebPWriter: Give write_VP8L_coded_image() a kind parameter
This way, it can be used to write entropy-coded-images too,
which will be used when writing transforms.
2024-05-31 22:39:25 +02:00
Nico Weber
b50702f490 LibGfx/WebP: Move ImageKind to WebPSharedLossless.h 2024-05-31 22:39:25 +02:00
Nico Weber
9dfb254c73 LibGfx/WebPWriter: Extract write_VP8L_coded_image() 2024-05-31 22:39:25 +02:00
Nico Weber
d9aa594e86 LibGfx/WebPWriter: Add comment for image-stream production 2024-05-31 22:39:25 +02:00
Nico Weber
286cc6f905 LibGfx/WebPLoader: Prefix a few dbgln_if()s with chunk name 2024-05-31 22:39:25 +02:00
Nico Weber
a2ddf054f2 LibGfx/WebPWriter: Remove two obsolete comments
In an early version of the huffman writing code, we always used 8 bits
here, and the comments still reflected that. Since we're now always
writing only as many bits as we need (in practice, still almost always
8), the comments are misleading.
2024-05-31 22:39:25 +02:00
Andreas Kling
391c53025e Revert "LibProtocol: Retry reading if read errors with EAGAIN"
This reverts commit d0f88d4958.

This made us hang when loading GitHub repo pages.
2024-05-31 17:17:24 +02:00
Andreas Kling
a48fc971c6 LibJS: Rearrange ExecutionContext members to shrink the class
Just a minor tweak to make the class 8 bytes smaller.
2024-05-31 16:31:33 +02:00
Andreas Kling
a3782782fa LibJS: Remove two unused members from ExecutionContext 2024-05-31 16:31:33 +02:00
Romain Chardiny
f5cacf25e1 Utilities: Add shred utility 2024-05-31 13:49:34 +01:00
Romain Chardiny
892da127d0 LibCore: Add wrapper for fsync() 2024-05-31 13:49:34 +01:00
Simon Wanner
11bb216912 LibTextCodec: Add replacement decoder 2024-05-31 07:56:26 +02:00
Simon Wanner
7f3b457e62 LibTextCodec: Add EUC-KR decoder 2024-05-31 07:56:26 +02:00
Simon Wanner
ded6512ca8 LibTextCodec: Add Shift_JIS decoder 2024-05-31 07:56:26 +02:00
Simon Wanner
06f7c393b2 LibTextCodec: Add ISO-2022-JP decoder 2024-05-31 07:56:26 +02:00
Simon Wanner
45f0ae52be LibTextCodec: Add EUC-JP decoder 2024-05-31 07:56:26 +02:00
Simon Wanner
9943bb1d8e LibTextCodec: Add Big5 decoder 2024-05-31 07:56:26 +02:00
Simon Wanner
2ce61fe6ea LibTextCodec: Add GBK/GB18030 decoder
Includes changes from GB-18030-2022, which are not yet included in the
Encoding Specification, but WebKit, Blink and WPT are already updated.
2024-05-31 07:56:26 +02:00
Simon Wanner
9ed52504ab LibTextCodec: Delegate to process() in default validate() implementation 2024-05-31 07:56:26 +02:00
Simon Wanner
88c2586f25 LibTextCodec: Remove unused decoder classes 2024-05-31 07:56:26 +02:00
Andrew Kaster
46e00a8f5e LibWeb: Parse TokenizedFeatures from window.open 2024-05-30 16:16:33 -04:00
Andrew Kaster
e2d50dc5dd LibWeb: Move window.open TokenizedFeature parsing into its own file 2024-05-30 16:16:33 -04:00
Tim Ledbetter
79143833b6 LibWeb/WebDriver: Ensure error responses are serialized correctly 2024-05-30 13:53:24 -04:00
stelar7
a4e97c1598 WebDriver: Dont assume the pageLoad is an i64 2024-05-30 11:46:02 -04:00
stelar7
fa9c234976 WebDriver: Parse webSocketUrl capability 2024-05-30 11:46:02 -04:00
Matthew Olsson
9ea6ab0ad4 LibJS+LibWeb: Fix a ton of JS_CELL-like macro issues 2024-05-30 09:29:20 -06:00
Tim Ledbetter
7aea87c9df LibWeb+LibWebView+WebContent: Add basic find in page functionality
This allows the browser to send a query to the WebContent process,
which will search the page for the given string and highlight any
occurrences of that string.
2024-05-30 16:30:11 +02:00
Diego
4eaabdad34 LibWasm: Properly read blocktypes
This works for now, but is technically still not spec compliant. Right
now, we're (potentially) missing one bit when reading function indices.
See the relevant issue: #24462.
2024-05-29 22:33:15 +02:00
Daniel Bertalan
9d3b73743e sql: Work around Clang 17/18 run-time call to consteval function
There was an issue with Clang that causes `consteval` function calls
from default initializers of fields to be made at run-time. This
manifested itself in the case of `ByteString::formatted` as an undefined
reference to `check_format_parameter_consistency` once format string
checking was enabled for Clang builds. The workaround is simple (just
move it to the member initializer list), and unblocks a useful change.
2024-05-29 13:34:15 -06:00
Andrew Kaster
ca806a3e18 WebDriver+WebContent: Add /session/🆔/window/consume-user-activation
This extension to the WebDriver spec is defined in the HTML spec, how
fun.
2024-05-29 21:30:15 +02:00
Andrew Kaster
9bc1318a78 LibWeb: Consume user activation when showing a picker dialog 2024-05-29 21:30:15 +02:00
Andrew Kaster
a3a74245d6 LibWeb: Implement consume user activation AO 2024-05-29 21:30:15 +02:00
Andrew Kaster
45860e3878 LibWeb: Move consume history-action user activation to Window 2024-05-29 21:30:15 +02:00
Andrew Kaster
9c6ebe21d2 LibWeb: Remove get prefix from activation timestamp getters 2024-05-29 21:30:15 +02:00
Andrew Kaster
2fde20993b LibWeb: Update show the picker if applicable to latest spec text 2024-05-29 21:30:15 +02:00
Jamie Mansfield
7da449ce01 LibWeb: Check correct activation (spec fix)
See:
- https://github.com/whatwg/html/commit/d28284f
2024-05-29 09:32:59 -06:00
Jamie Mansfield
34b2a4f7ca LibWeb: Add getter for history-action activation 2024-05-29 09:32:59 -06:00
Jamie Mansfield
a741f68eb9 LibWeb: Implement "consume history-action user activation" 2024-05-29 09:32:59 -06:00
Jamie Mansfield
30539db2fc LibWeb: Use Infinity<double> for infinity
Co-authored-by: Matthew Olsson <matthewcolsson@gmail.com>
2024-05-29 09:32:59 -06:00
Jamie Mansfield
01bd179eef LibWeb: Implement UserActivation 2024-05-29 09:32:59 -06:00
Jamie Mansfield
227151b881 LibWeb: Add getter for sticky activation 2024-05-29 09:32:59 -06:00
Matthew Olsson
1965943026 LibWeb: Reject invalid AnimationEffect duration string values 2024-05-29 08:18:24 +02:00
Matthew Olsson
3e221fbb2d IDLGenerators: Handle restricted/unrestricted floating point types 2024-05-29 08:18:24 +02:00
Matthew Olsson
2bd8093449 LibWeb: Detect explicit null timeline given in KeyframeAnimationOptions
We already do this for the timeline argument in the KeyframeEffect
constructor
2024-05-29 08:18:24 +02:00
Matthew Olsson
7bd62809a9 LibWeb: Include leading colons in KeyframeEffect::pseudo_element() 2024-05-29 08:18:24 +02:00
Matthew Olsson
854d02fe10 LibWeb: Reject more invalid pseudo-element selectors in KeyframeEffect
The old way this was written wouldn't actually check for the presence of
the two initial colons in the pseudo-element string.
2024-05-29 08:18:24 +02:00
Matthew Olsson
e188ab1493 LibWeb: Add missing spec links to KeyframeEffect 2024-05-29 08:18:24 +02:00
Tim Ledbetter
d0f88d4958 LibProtocol: Retry reading if read errors with EAGAIN
This fixes an issue where fetch requests to HTTP(s) addresses would
fail inside workers.
2024-05-29 08:17:18 +02:00
Tim Ledbetter
bb923983fc LibWeb: Implement WorkerGlobalScope.importScripts()
This method allows workers to synchronously import one or more scripts.
2024-05-29 08:17:18 +02:00
Tim Ledbetter
975a067f58 LibWeb: Align worker ESO getters with the specification
The `api_base_url()` and `policy_container()` getters now get their
respective objects from the global scope.
2024-05-29 08:17:18 +02:00
Tim Ledbetter
2d487ee5ab LibWeb: Add spec comments to WorkerEnvironmentSettingsObject::setup()
No behavior change.
2024-05-29 08:17:18 +02:00
MacDue
9c711bc868 LibWeb+Ladybird: Add option to enable the AffineCommandExecutorCPU
This adds a `--experimental-cpu-transforms` option to Ladybird and
WebContent (which defaults to false/off).

When enabled the AffineCommandExecutorCPU will be used to handle
painting transformed stacking contexts (i.e. stacking contexts where
the transform is something other than a simple translation). The regular
command executor will still handle the non-transformed cases.

This is hidden under a flag as the `AffineCommandExecutorCPU` is very
incomplete now. It missing support for clipping, text, and other basic
commands. Once most common commands have been implemented this flag
will be removed.
2024-05-29 08:17:01 +02:00
MacDue
b9db9013f5 LibWeb: Add (initial) AffineCommandExecutorCPU
This CommandExecutor is intended to provide better support for painting
stacking contexts where the transform is not a simple translation. It
is not intended to replace the CPU command executor (as its methods of
painting will likely be slower for the non-transformed case), instead,
it will function as a companion executor to handle transformations.

This is only intended to properly handle 2D transformations (skews,
rotations, scaling, etc). Full support for 3D transformations would
need further changes in LibGfx.

As it stands this is (very) incomplete and experimental, but hopefully,
this can be fleshed out to the point where it supports most common
painting commands.
2024-05-29 08:17:01 +02:00
MacDue
6333159108 LibWeb: Add support for nested painting command executors
This adds two new CommandResults: ContinueWithNestedExecutor and
ContinueWithParentExecutor.

ContinueWithNestedExecutor switches the command executor to the result
of calling `.nested_executor()` on the current CommandExecutor.

ContinueWithParentExecutor returns to the previous command executor
(i.e. what it was before the last ContinueWithNestedExecutor).
2024-05-29 08:17:01 +02:00
MacDue
a5442ad70d LibGfx: Add shortcut to draw_scaled_bitmap_with_transform() for scales
Using `draw_scaled_bitmap()` for simple scales is almost always better
than using `draw_scaled_bitmap_with_transform()` which does not respect
the scaling mode.
2024-05-29 08:17:01 +02:00
MacDue
f7bf14605c LibWeb: Remove PaintBorders recording painter command
`Painting::paint_all_borders()` only uses `.draw_line()` for simple
borders and `.fill_path()` for more complex cases. These are both
already supported by the `RecordingPainter` so removing this command
simplifies the painting API.

Two test changes:

css-background-clip-text: Borders are now drawn via the AA painter
(which makes them closer to how they appear in other browsers).

corner-clip-inside-scrollable: Borders removed (does not change test)
due to imperceptible sub-pixel changes.
2024-05-29 08:17:01 +02:00
Nico Weber
0ae36b9524 LibGfx/WebPWriter: Write correct alpha use hint in animation VP8L header
Since we now compute this for free, might as well fill it in.

As far as I can tell, no observable behavior difference anywhere.
2024-05-29 07:10:00 +01:00
Nico Weber
2d80a5c6ca LibGfx/WebPWriter: Let compress_VP8L_image*() return if image was opaque
We compute that as part of compression there anyways, so let's compute
it only once.

No behavior change.
2024-05-29 07:10:00 +01:00
Nico Weber
99d280a927 LibGfx/WebPLoader: Relax vp8x / vp8l alpha check
The check from 0805319d1e is too strict for animated images: It's
possible that an animation has alpha, but a frame doesn't.

(For example, if the animation is 10x10 pixels, but one frame updates
just 1x1 pixels. But even a full-sized frame could just not have alpha.)

If the VP8X header claims that the animation has alpha, we could check
that at least one frame has alpha, but for now we just don't do any
checking for animated images.
2024-05-29 07:10:00 +01:00
Nico Weber
c71b9fe6f8 LibGfx/WebPWriter: Add a comment explaining a file offset 2024-05-29 07:10:00 +01:00
Aliaksandr Kalenik
b8d18ebcf7 LibWeb+WebContent: Change event loop to synchronously paint next frame
...instead of scheduling repaint timer in PageClient.

This change fixes flickering on Discord that happened because:
- Event loop schedules repainting by activating repaint timer
- `Document::tear_down_layout_tree()` destroys paintable tree
- Repaint timer invokes callback and renders an empty frame because
  paintable tree was destroyed
2024-05-28 18:21:18 +02:00
Aliaksandr Kalenik
e806136116 LibWeb: Refresh clip and scroll state only when needed
Although refreshing is cheap, it was performed before each hit-testing
and was 2-4% in profiles on Discord and Twitter.

Now clip and scroll states are refreshed only if scroll offset has
changed.
2024-05-28 17:45:49 +02:00
Tim Ledbetter
d6297ec074 LibWeb: Cast to the correct type in Element::auto_directionality()
Previously, we always cast to a HTMLInputElement when getting the value
of an auto directionality form associated element. This caused
undefined behavior when determining the directionality of an element
that wasn't a HTMLInputElement.
2024-05-28 09:51:07 +02:00
Tim Ledbetter
0b0ad5c9db LibWeb: Calculate width property resolved value correctly
This means that relative width values are now correctly resolved when
calling `getComputedStyle()`.
2024-05-28 08:08:31 +02:00
Tim Ledbetter
7d192ed8c1 LibWeb: Don't crash on clicking a label with an associated text input
Previously, we assumed that all label control paintables were of type
`LabelablePaintable`. This caused a crash when clicking on a label with
a text input control.
2024-05-28 08:07:05 +02:00
Shannon Booth
6466fca20a LibWeb: Implement BaseAudioContext.createGain 2024-05-28 08:06:09 +02:00
Shannon Booth
1fa7235fec LibWeb: Add Implement GainNode interface
As with all other current audio nodes we still need to wire up the
inputs and outputs so it can be properly used in an audio context - but
this is enough to implement the public IDL interface.
2024-05-28 08:06:09 +02:00
Shannon Booth
97bf9e7953 LibWeb: Stub out Window-Management proposal extensions to Screen API
As defined in https://w3c.github.io/window-management
2024-05-27 17:24:51 -06:00
Simon Wanner
b79815c5a5 LibTextCodec: Add x-mac-cyrillic decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
07a9435da5 LibTextCodec: Add windows-1258 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
275b89720b LibTextCodec: Add windows-1257 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
c76308c7e6 LibTextCodec: Add windows-1256 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
eb9ed10573 LibTextCodec: Add windows-1253 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
2d35687db0 LibTextCodec: Add windows-874 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
1b6878b6ca LibTextCodec: Add KOI8-U decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
1fd3a6f48c LibTextCodec: Add ISO-8859-16 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
3e882f26db LibTextCodec: Sort checks in decoder_for mostly alphabetically
Keeps checks for common encodings (Latin1 & UTF-*) at the top.
2024-05-27 20:50:50 +02:00
Simon Wanner
56241df604 LibTextCodec: Add ISO-8859-14 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
4188e328ac LibTextCodec: Add ISO-8859-13 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
cc640f4363 LibTextCodec: Add ISO-8859-10 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
d73220837e LibTextCodec: Add ISO-8859-8(-I) decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
24028e353e LibTextCodec: Add ISO-8859-7 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
01c3b8091a LibTextCodec: Add ISO-8859-6 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
763d904ad5 LibTextCodec: Add ISO-8859-5 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
c6b17320db LibTextCodec: Add ISO-8859-4 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
6c84edaaa2 LibTextCodec: Add ISO-8859-3 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
fc783199f1 LibTextCodec: Add IBM866 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
96b3c35358 LibTextCodec: Implement table based decoders as SingleByteDecoder
Instead of copy-pasting the implementation, let's use a single class.
This "Single Byte Decoder" concept even exists in the Encoding Spec :^)
2024-05-27 20:50:50 +02:00
Simon Wanner
3029406c4b LibWeb: Handle TextDecoder's fatal flag 2024-05-27 20:50:50 +02:00
Diego
f8ac883fb4 LibWasm: Implement element section parsing 2024-05-27 19:38:45 +02:00
Idan Horowitz
95b9d77536 Kernel: Prevent reference to unaligned u32 in MBRPartitionTable init
This is technically UB, so triggers KUBSAN.
2024-05-27 17:35:42 +02:00
Jamie Mansfield
3095daa7c8 LibWeb: Implement HTMLImageElement.currentSrc
Removes some console noise from lner.co.uk :)
2024-05-27 17:34:59 +02:00