Commit graph

73123 commits

Author SHA1 Message Date
Callum Law
a984ff4f58 LibWeb: Replace use of Optional<NonnullRefPtr> with RefPtr 2025-11-28 16:15:49 +00:00
Callum Law
70c4ed261f LibWeb: Reduce the number of headers CSS Parser.h is included in
Reduces the rebuild required when editing this file
2025-11-28 16:15:49 +00:00
InvalidUsernameException
bc44203744 LibGfx+Tests: Load bmp files with unpremultiplied alpha
From what I can tell BMP files with an alpha channel always store
unpremultiplied alpha. So let's load them as such to avoid rendering
artifacts from using the wrong alpha type.
2025-11-28 17:00:29 +01:00
Andreas Kling
949053cee7 LibHTTP: Remove unused HttpRequest functions re: basic auth 2025-11-28 08:48:33 -05:00
Callum Law
8a197b7ee5 LibWeb: Produce correct resolved value for animation-duration 2025-11-28 13:24:11 +00:00
Callum Law
c8d91c127e LibWeb: Parse view() for the animation-timeline CSS property 2025-11-28 13:24:11 +00:00
Callum Law
7d70714eac LibWeb: Parse scroll() for the animation-timeline CSS property 2025-11-28 13:24:11 +00:00
Callum Law
5bbcd0a48f LibWeb: Parse the animation-timeline CSS property 2025-11-28 13:24:11 +00:00
Callum Law
d79aba68d2 LibWeb: Allow reset-only longhands in coordinating value list shorthands
Required for `animation-timeline` and the various `animation-trigger-*`
properties within the `animation` coordinating value list
2025-11-28 13:24:11 +00:00
Callum Law
6bb7224f4e LibWeb: Parse the view-timeline shorthand CSS property
The remaining failing tests in view-timeline-shorthand.html are due to
either:
 a) incorrect tests, see web-platform-tests/wpt#56181 or;
 b) a wider issue where we collapse coordinating value list longhand
properties to a single value when we shouldn't.
2025-11-28 13:24:11 +00:00
Callum Law
e093c76eea LibWeb: Parse the view-timeline-inset CSS property 2025-11-28 13:24:11 +00:00
Callum Law
21ff35691a LibWeb: Parse the view-timeline-axis CSS property 2025-11-28 13:24:11 +00:00
Callum Law
d9d3e66197 LibWeb: Parse the view-timeline-name CSS property 2025-11-28 13:24:11 +00:00
Callum Law
13ce2d1857 LibWeb: Parse the scroll-timeline shorthand CSS property
The remaining failing tests in scroll-timeline-shorthand.html are due to
either:
 a) incorrect tests, see web-platform-tests/wpt#56181 or;
 b) a wider issue where we collapse coordinating value list longhand
properties to a single value when we shouldn't.
2025-11-28 13:24:11 +00:00
Callum Law
992b0a4dc6 LibWeb: Parse the scroll-timeline-axis CSS property 2025-11-28 13:24:11 +00:00
Callum Law
e95f326f3d LibWeb: Parse the scroll-timeline-name CSS property 2025-11-28 13:24:11 +00:00
Callum Law
826e947920 LibWeb: Propagate 'auto' value of animation-duration
Avoids a crash when `animation-duration` was `auto`
2025-11-28 13:24:11 +00:00
Tete17
c790de24dd LibWeb: Implement encapsulateBits method for SubtleCrypto
None of the current algorithms supports the method but the future
post quantum algorithms will do so.
2025-11-27 21:50:06 +01:00
Tete17
b36a702ad1 LibWeb: Implement encapsulateKey method for SubtleCrypto
None of the current algorithms supports the method but the future
post quantum algorithms will do so.
2025-11-27 21:50:06 +01:00
Tete17
42f55c7c97 LibWeb: Implement Encapsulate(Key|Bits) dictionaries
These are needed structure for the encapsulate(Key|Bits) operations.
2025-11-27 21:50:06 +01:00
Tete17
1d6a64b26c LibWeb: Update the Key Usage enum to adapt for PostQuantum Algorithms 2025-11-27 21:50:06 +01:00
Daniel Price
b0c48b961e LibWeb: Check that import map elements are ordered maps (json objects) 2025-11-27 14:15:33 -06:00
Undefine
c01f0e537e LibWeb: Clear m_current_program when the program gets deleted 2025-11-27 19:19:54 +01:00
Undefine
b0fcb35134 LibWeb: Implement WebGL getParameter(GL_VERTEX_ARRAY_BINDING) 2025-11-27 19:19:54 +01:00
Undefine
f373ab7011 LibWeb: Bind WebGL uniform locations to their respective program
The spec mandates that each uniform location object only gets used with
the program it was created with.
2025-11-27 19:19:54 +01:00
Undefine
7d6212ae71 LibWeb: Ensure WebGL buffers don't mix between index and other data
The spec mandates that a buffer during its lifetime can only get bound
to either an index buffer or any other type.
2025-11-27 19:19:54 +01:00
Sam Atkins
85478c9215 LibWeb/HTML: Rename popover "invoker"
Lots of renames, no behaviour differences. (Apart from the rename of the
IDL type, which does of course affect JS.)

Corresponds to:
16cb7808da
2025-11-27 16:44:51 +00:00
Jelle Raaijmakers
82dfa69e4e LibWeb/WebGL: Implement getRenderbufferParameter() 2025-11-27 15:51:59 +01:00
Timothy Flynn
9375660b64 LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP
The end goal here is for LibHTTP to be the home of our RFC 9111 (HTTP
caching) implementation. We currently have one implementation in LibWeb
for our in-memory cache and another in RequestServer for our disk cache.

The implementations both largely revolve around interacting with HTTP
headers. But in LibWeb, we are using Fetch's header infra, and in RS we
are using are home-grown header infra from LibHTTP.

So to give these a common denominator, this patch replaces the LibHTTP
implementation with Fetch's infra. Our existing LibHTTP implementation
was not particularly compliant with any spec, so this at least gives us
a standards-based common implementation.

This migration also required moving a handful of other Fetch AOs over
to LibHTTP. (It turns out these AOs were all from the Fetch/Infra/HTTP
folder, so perhaps it makes sense for LibHTTP to be the implementation
of that entire set of facilities.)
2025-11-27 14:57:29 +01:00
Timothy Flynn
3dce6766a3 LibWeb: Extract some CORS and MIME Fetch helpers to their own files
An upcoming commit will migrate the contents of Headers.h/cpp to LibHTTP
for use outside of LibWeb. These CORS and MIME helpers depend on other
LibWeb facilities, however, so they cannot be moved.
2025-11-27 14:57:29 +01:00
Timothy Flynn
0fd80a8f99 LibTextCodec+LibWeb: Move isomorphic coders to LibTextCodec
This will be used outside of LibWeb.
2025-11-27 14:57:29 +01:00
Timothy Flynn
0480934afb LibHTTP+LibWeb: Remove unused HTTP::HTTPResponse
The only thing in HTTPResponse being used is reason_phrase_for_code,
which is just a static helper method. Move it to its own file and remove
HTTPResponse.

This is just one less thing to have to port to an upcoming HTTP header
refactor.
2025-11-27 14:57:29 +01:00
Timothy Flynn
bf75f52ce0 UI/AppKit: Store the original key-down event for WebContent processing
When a shortcut is an alternative key, macOS first fires a key event for
the primary key. Then if it is not handled, it fires an event for the
alternative key. For example, we see these two events in a row when we
press cmd and =/+:

    NSEvent: type=KeyDown flags=0x100108 chars="=" keyCode=25
    NSEvent: type=KeyDown flags=0x100108 chars="+" keyCode=24

For dead key processing, we don't handle these events right away. By the
time we get to doCommandBySelector, when we call [NSApp currentEvent],
we see the following events:

    NSEvent: type=KeyDown flags=0x100108 chars="=" keyCode=24
    NSEvent: type=AppDefined flags=0

The AppDefined event is internally posted by our event loop. So it seems
we cannot rely on currentEvent being the key-down event we are looking
for.

Instead, we can store the key-down event that we last saw.
2025-11-27 13:51:45 +00:00
aplefull
934817d45e LibRegex: Add missing StringSet cases 2025-11-27 14:02:04 +01:00
Rocco Corsi
0738be817b Documentation: Correct small typo in AdvancedBuildInstructions 2025-11-27 07:21:34 -05:00
Sam Atkins
936c7f05df LibWeb/HTML: Account for User-Agent not starting with "Mozilla/"
Corresponds to:
a93c6fa9fa
2025-11-27 07:20:32 -05:00
Sam Atkins
37d0741099 LibWeb/HTML: Implement HTMLTemplateElement.content to spec
No real behaviour change - it just means we VERIFY before returning the
value we returned before.
2025-11-27 10:26:13 +00:00
Sam Atkins
a25cb679fb LibWeb/HTML: Update spec text related to template's content
Corresponds to:
aa52274b5a
2025-11-27 10:26:13 +00:00
Jelle Raaijmakers
39ad7833f0 LibWeb: Do not render SVG <symbol> elements unless part of <use>
We were always rendering <symbol> SVG elements, but we should only
render them if they are a child of a <use>'s shadow root. This caused
practically all instances of <symbol> to be drawn at least one time too
many.
2025-11-27 07:55:29 +01:00
Jelle Raaijmakers
632854d870 LibWeb: Move qualified_name in SVGUseElement constructor 2025-11-27 07:55:29 +01:00
Jelle Raaijmakers
df3d68f849 LibWeb: Remove unused ::inserted() override from SVGUseElement 2025-11-27 07:55:29 +01:00
Jelle Raaijmakers
9b1ee8f3e2 LibWeb: Remove unused includes from SVGSymbolElement.cpp 2025-11-27 07:55:29 +01:00
Tim Ledbetter
cfce5dc970 LibJS: Add fast path for loosely comparing object and nullish values 2025-11-26 22:03:31 -05:00
Tete17
5e736d4e07 LibWeb: Expose SHA3 hashing algorithm through WebCryptoAPI
This give us 48 WPT subtests :)
2025-11-26 22:01:00 -05:00
Tete17
0786486aa2 LibCrypto: SHA3 hashing algorithm 2025-11-26 22:01:00 -05:00
Timothy Flynn
7b0dfa61b1 LibWeb: Do not move header name/values that are re-used
Fixes a regression from commit:
f675cfe90f
2025-11-26 21:22:35 -05:00
Timothy Flynn
cbfae97101 LibWeb: Include empty header values when joining duplicated headers
Fixes a regression from commit:
f675cfe90f

It is not sufficient to only check if the builder is empty, as we will
then drop empty header values (when the first found value is empty).

This is tested in WPT by /cors/origin.htm, but that requires an HTTP
server.
2025-11-26 21:22:35 -05:00
Timothy Flynn
00070455fd LibWeb: Parse the correct header list for CSP-Report-Only
Fixes a regression from a copy-paste mistake in commit:
ed27eea091

The regressed CSP tests aren't able to be imported, unfortunately. They
do not work with the file-based test-web infra.
2025-11-26 21:22:35 -05:00
Psychpsyo
693dd7b6f6 LibWeb: Avoid unnecessary sorting work when getting animations
This way, the list is not re-sorted on every recursive call.
2025-11-26 22:19:23 +01:00
Tim Ledbetter
1abc91ccc6 LibRegex: Put debug mode code block behind a flag
This block should be optimized out anyway, but putting the whole thing
behind a flag makes the intent clearer.
2025-11-26 14:33:59 +00:00