Commit graph

65928 commits

Author SHA1 Message Date
Pavel Shliak
2159a4f14e Tests: Remove SerenityOS Check
This check can be safely removed, as we no longer support
building Ladybird for SerenityOS ;^)
2024-12-06 14:21:56 -07:00
Lucien Fiorini
6260e18de6 Tests: Add fillstyle gradients screenshot test for canvas 2024-12-06 20:21:57 +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
7868b03d90 LibWeb: Alphabetize WebGL type list in generator 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
Totto16
14e808e574 AK: Add Flatten Variant helper
This will be used in future commits.
It has to be present for types, that are generated by the IDL since the
IDL flattens variants of variants.
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
Pavel Shliak
c16c20b836 AK: Fix InsertionSort to respect specified bounds
Previously, it ignored 'start', sorting from the array's
beginning. This caused unintended changes and slower
performance. Fix ensures sorting stays within 'start'
and 'end' indices only.
2024-12-06 06:44:27 +00:00
rmg-x
fa28337817 Tests/LibWeb: Add test for propagation of custom HTTP reason phrase
This commit adds an in-tree test for code added in a previous commit:
e89e084798

We want to make sure that the custom reason phrase is making it from
RequestServer to the "statusText" property in the XHR infrastructure.
2024-12-06 06:09:44 +00:00
rmg-x
de595b713d Tests/LibWeb: Allow setting custom reason phrase in HTTP echo server 2024-12-06 06:09:44 +00:00
rmg-x
08b8c88ac3 Tests/LibWeb: Use Optional instead of | None syntax in echo script
The `str | None` syntax is only supported in Python 3.10+ and we can
support more Python versions without compromising readability by
importing the `Optional` type.
2024-12-06 06:09:44 +00:00
rmg-x
e4bc6178b9 Tests/LibWeb: Remove duplicate "headers" property in HTTP echo request 2024-12-06 06:09:44 +00:00
Luke Warlow
7c9a162f99 LibWeb: Remove :closed pseudo class
This was removed from the spec.
2024-12-06 04:49:36 +00:00
Gingeh
c937aff95a LibWeb: Add test for computed mimetypes in loaded documents
This couldn't be added in #2207
2024-12-06 04:48:33 +00:00
Gingeh
e4512d8089 LibWeb: Add test for non-ascii content-type headers
This couldn't be added in #1893
2024-12-06 04:48:33 +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
7a0c675f45 Tests/LibWeb: Re-enable "test-http-test-server" test
Previously, this test was disabled for flakiness.
2024-12-05 17:02:57 -07: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
rmg-x
4dd21d0b80 Tests/LibWeb: Refactor HTTP echo server script
This commit makes the following changes:
- Adds a model "Echo" for the request body
- Changes the main endpoint from /create to /echo (more REST-y)
- Sends "400: Bad Request" for invalid params or a reserved path
- Sends "409: Conflict" when trying to use an already registered path
- Prints the server port to stdout
- Removes unnecessary subcommands/options (start, stop, --background)
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
Timothy Flynn
784e872851 LibJS: Remove errant assertion from ParseISODateTime
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/728beeb
2024-12-05 15:29:08 -05:00