Commit graph

6656 commits

Author SHA1 Message Date
Konstantin Konstantin
b03138cbff LibWeb: Support creation of shared memory in WebAssembly API
Add support for shared memory creation in WebAssembly memory API.
This API is needed for WPT tests that use shared array buffers.

Import related WPT tests.
2024-12-08 22:10:45 +01:00
Pavel Shliak
6ec06a01a2 LibCore: Do not include math.h in ArgsParser 2024-12-08 16:38:13 +00:00
Pavel Shliak
116e7baead LibGfx: Remove aligned_within from Rect
The CenterRight and TopCenter alignment cases were
mistakenly identical due to a copy-paste error,
causing the function to behave unexpectedly.
Rather than attempting to fix it, remove aligned_within entirely.
2024-12-08 13:32:10 +00:00
devgianlu
c7a1287a4f LibCrypto: Remove ASN1 encoding/decoding from SECPxxxr1
Little refactoring to remove the last bits of ASN1 decoding/encoding
from within the `SECPxxxr1` class. It was a bit confusing for the
`SECPxxxr1` methods to handle ASN1 internally implicitly. Some explicit
methods are available to achieve the same functionality on the data
structures.
2024-12-07 19:08:40 +01:00
devgianlu
27fbcf70bf LibTLS: Parse SECP256r1 parameters separately 2024-12-07 19:08:40 +01:00
devgianlu
bce2893638 LibCrypto: Add utility functions to SECPxxxr1
This allows to move ASN1 logic from inside the `SECPxxxr1` curve
itself to the data structures. It makes more sense to have dedicated and
explicit methods to handle transformation between formats.
2024-12-07 19:08:40 +01:00
Felipe Muñoz Mazur
e27c59047a LibWeb: Handle abort signal in CloseWatcher 2024-12-07 12:06:53 +00:00
Glenn Skrzypczak
156f9fff32 LibWeb: Support the X-Frame-Options header
Navigation responses are now checked for adherence to the
`X-Frame-Options` header and an error is shown accordingly.
2024-12-07 08:38:02 +00:00
Glenn Skrzypczak
88884c370c LibWeb: Act as if parsing stopped when generating an error document
The user agent now acts as if it has stopped parsing when creating a
document for inline content to display an error.
2024-12-07 08:38:02 +00:00
Andreas Kling
6d7bb074fc LibWeb: Don't serialize resolved CSS color values as named colors
With all the plumbing in place, we can handle this quirk at the
serialization layer.

This allows us to remove the pass where StyleComputer would loop over
all computed values and replace any color values with new values
stripped of their original name strings.
2024-12-07 08:31:03 +00:00
Andreas Kling
b3c4b4fd97 LibWeb: Serialize resolved CSS values in dedicated serialization mode
This doesn't actually do anything differently yet, but it will in the
very next commit.
2024-12-07 08:31:03 +00:00
Andreas Kling
e85c3c97fb LibWeb: Add mode flag to CSSStyleValue::to_string()
This will be used to differentiate between serialization for resolved
style (i.e window.getComputedStyle()) and serialization for all other
purposes.
2024-12-07 08:31:03 +00:00
Aliaksandr Kalenik
86c230cd8e LibWeb/WebGL: Implement vertex array calls for WebGL2 2024-12-07 00:05:36 +01:00
Aliaksandr Kalenik
eec4b71351 LibWeb/WebGL: Remove FIXME from supported calls in WebGL2
These calls were inherited from WebGL 1 and our implementation generator
already supports them.
2024-12-07 00:05:36 +01:00
Lucien Fiorini
beb621665f LibGfx: Add missing return and fix center of radial gradients 2024-12-06 20:21:57 +01:00
sideshowbarker
68894306e2 LibWeb: Compute default ARIA roles context-sensitively where required
This change implements spec-conformant computation of default ARIA roles
for elements whose expected default role depends on the element’s
context — specifically, either on the element’s ancestry, or on whether
the element has an accessible name, or both. This affects the “aside”,
“footer”, “header”, and “section” elements.

Otherwise, without this change, “aside”, “footer”, “header”, and
“section” elements may unexpectedly end up with the wrong default roles.
2024-12-06 18:31:45 +00:00
sideshowbarker
7a4a9cc7bc LibWeb: Extract ARIA role-attribute checking out from role_or_default()
This change separates the steps for checking the string value of the
ARIA “role” attribute out from the element.role_or_default() function
into a separate function — in order to expose a way to just check if the
ARIA “role” attribute actually has a value, without also then computing
a default role value if no “role” attribute value was found.

Otherwise, without this change, the only available function for
retrieving ARIA role values is the element.role_or_default() function —
which always does the additional step of computing (and returning) a
default role value if no “role” attribute is found.
2024-12-06 18:31:45 +00:00
sideshowbarker
c5966bbdcb LibWeb: Add window.internals.getComputedRole(element)
This change adds a window.internals.getComputedLabel(element) function,
for use in testing ARIA-related behavior. It also patches the imported
WPT testdriver.js script’s test_driver.get_computed_role(element)
function to call our window.internals.getComputedRole(element) function.
2024-12-06 18:31:45 +00:00
Tim Ledbetter
d946d94e2d LibWeb: Improve relList feature detection support
`DOMTokenList.supports()` is now correct for all possible `rel`
attribute values for `link`, `a`, `area` and `form` elements.
2024-12-06 18:09:53 +00:00
Timothy Flynn
234f218803 LibJS: Ensure GetDateTimeFormat returns nonnull for the best format
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/8a52801
2024-12-06 11:13:10 -05:00
Timothy Flynn
7104d724ee LibJS: Simplify condition in GetDateTimeFormat
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/23c74b6
2024-12-06 11:13:10 -05:00
Timothy Flynn
6b8acc0af5 LibJS: Ensure DifferenceISODateTime receives valid ISO date-times
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/b5da334
2024-12-06 11:13:10 -05:00
Andrew Kaster
56d45282ea LibWeb/WebGL: Don't crash on unknown getParameter on the context
And allow the implementation to set the error code.
2024-12-06 15:35:36 +01:00
Andrew Kaster
af536e1192 LibWeb: Add stubbed-out WebGL2RenderingContext 2024-12-06 15:35:36 +01:00
Andrew Kaster
9c24bb3cee LibWeb/WebGL: Alphabetize imports for WebGLRenderingContextBase IDL 2024-12-06 15:35:36 +01:00
Andrew Kaster
7abc79ece7 LibWeb/WebGL: Add stub class for WebGLVertexArrayObject
This is a WebGL 2.0 class
2024-12-06 15:35:36 +01:00
Andrew Kaster
39018d233f LibWeb/WebGL: Add stub class for WebGLTransformFeedback
This is a WebGL 2.0 class
2024-12-06 15:35:36 +01:00
Andrew Kaster
bb3226ee57 LibWeb/WebGL: Add stub class for WebGLSync
This is a WebGL 2.0 class
2024-12-06 15:35:36 +01:00
Andrew Kaster
2b5e54e995 LibWeb/WebGL: Add stub class for WebGLSampler
This is a WebGL 2.0 class
2024-12-06 15:35:36 +01:00
Andrew Kaster
69e4adbd98 LibWeb/WebGL: Add stub class for WebGLQuery
This is a WebGL 2.0 class
2024-12-06 15:35:36 +01:00
Andrew Kaster
d8ccd6b87c LibWeb/WebGL: Don't crash when there's no skia backend context 2024-12-06 15:35:36 +01:00
Andrew Kaster
f2ac4f3f2e LibWeb: Add GL types for WebGL 2.0 2024-12-06 15:35:36 +01:00
R-Goc
bebf787c36 LibCore: Add ProcessWindows.cpp to CMakeLists 2024-12-06 13:11:44 +00:00
Totto16
9730e47d51 LibWeb: Add CanvasImageSource to ImageBitmapSource typedef 2024-12-06 13:10:27 +00:00
Luke Warlow
eb1c60f37b LibWeb: Implement popover methods
Implements basics of showPopover, hidePopover and togglePopover.
2024-12-06 12:39:14 +00:00
Luke Warlow
b17bbe6d1f LibWeb: Implement ::details-content pseudo element
Details' contents matches a new details-content pseudo element.

Further work is required to make this pseudo-element behave per spec.

This pseudo should be element-backed per
https://drafts.csswg.org/css-pseudo/#element-backed
2024-12-06 07:16:41 +00:00
Lucas CHOLLET
2249f09267 LibWeb: Fix use-after-move in handle_successful_bitmap_decode
Introduced in bd932858, the code would try to move `result.color_space`
into the ImmutableBitmap created for each single frame of an image. For
animated images, this would result in a use-after-move from the second
frame.
2024-12-06 06:59:40 +00:00
Luke Warlow
7c9a162f99 LibWeb: Remove :closed pseudo class
This was removed from the spec.
2024-12-06 04:49:36 +00:00
Sam Atkins
ebc91686b5 LibWeb/Layout: Add FIXMEs where we're using the wrong font
It's not clear how to address these right now, so add a FIXME to make
them easier to find and address later.
2024-12-06 02:57:34 +01:00
Sam Atkins
00302b5b1e LibWeb/Painting: Place text cursor using GlyphRun font
This makes the cursor appear in the correct place when the text makes
use of multiple different fonts.
2024-12-06 02:57:34 +01:00
Sam Atkins
3782975718 LibWeb/Layout: Use GlyphRun font to measure trimmed whitespace 2024-12-06 02:57:34 +01:00
Sam Atkins
e457252c97 LibWeb/Painting: Use GlyphRun font for measuring selection rectangle
We incorrectly used the first available font to measure this before,
which may or may not be the correct font for this text.
2024-12-06 02:57:34 +01:00
rmg-x
d2521c8e72 LibWebView+WebContent: Add and set cmdline option for echo server port 2024-12-05 17:02:57 -07:00
rmg-x
ece611718d LibWebView+UI: Read and set echo server port in HttpEchoServerFixture
This commit adds a "echo_server_port" property to `WebContentOptions`.

Additionally, it makes `Application::web_content_options()` return a
mutable reference instead of a const reference so that we can set the
port value from the fixture.
2024-12-05 17:02:57 -07:00
rmg-x
aa4dcca0b2 LibCore/Process: Add DupFd file action
This commit provides a new file action allowing callers to provide a
`write_fd` that Process will "redirect" the child's stdin/stdout to.
2024-12-05 17:02:57 -07:00
rmg-x
cddbe7d10f LibWeb+Tests: Add internal property for echo server port 2024-12-05 17:02:57 -07:00
Konstantin Konstantin
7d49704481 LibWeb: Serialization for resizable/shared array buffers
Add serialization for the following array buffer types:
* ResizableArrayBuffer
* SharedArrayBuffer
* GrowableSharedArrayBuffer
2024-12-05 17:02:41 -07:00
Sam Atkins
21e6db6ba4 LibWeb/HTML: Resolve image decoding promises inside tasks
This corresponds to https://github.com/whatwg/html/pull/10753

WHile I was at it, I've also moved the checks inside the spin callback,
and reformatted the spec comments to match our style.
2024-12-05 21:49:10 +01:00
Andreas Kling
8d8aa964da LibWeb: Make window.clientInformation [Replaceable] per spec IDL 2024-12-05 21:35:59 +01:00
Timothy Flynn
6dfa6993e5 LibJS: Add workaround for invalid ISODateTimes in DifferenceISODateTime
The assertions can be hit when Temporal.Duration.prototype.round / total
are provided a PlainDate at the very limits of valid date-times. Tests
were recently added to test262 which trip these assertions, thus we are
now crashing in those tests. Let's throw a RangeError instead, as this
is the behavior expected by the tests.
2024-12-05 15:29:08 -05:00