Commit graph

66752 commits

Author SHA1 Message Date
Tim Ledbetter
acbae1b118 LibWeb: Set OscillatorNode type in the constructor 2025-01-04 10:12:24 +00:00
Tim Ledbetter
72818300c0 LibWeb: Implement the OscillatorNode.detune attribute 2025-01-04 10:12:24 +00:00
Tim Ledbetter
ed46d247de LibWeb: Initialize OcillatorNode with the correct default options 2025-01-04 10:12:24 +00:00
Shannon Booth
c804d08d34 LibJS: Parse dates like "2025-01-02 14:00:00+0000"
This was getting spammed in the console by a website in the wild.
2025-01-03 14:43:13 -08:00
Feng Yu
57f776fcb7 WebDriver: Actually create a UUID for session_id 2025-01-03 13:15:52 -08:00
Sam Atkins
ed83bb75e9 LibWeb/WebDriver: Use actions queue for undo actions
This reflects part of https://github.com/w3c/webdriver/pull/1853

Also updated to reflect some minor spec text changes.
2025-01-03 13:14:53 -08:00
Sam Atkins
df702bd4d3 LibWeb/WebDriver: Extract "wait for an action queue token" algorithm
This reflects part of https://github.com/w3c/webdriver/pull/1853
2025-01-03 13:14:53 -08:00
Lucas CHOLLET
d879771044 LibWeb/CSS: Consider unresolved calc() when serializing in Normal mode
Unfortunately, there is no explicit and step-by-step spec to perform
the serialization of `color()` declared values, so while being
spec-informed, this is quite ad-hoc.

Fixes 81 subtests in:
 - css/css-color/parsing/color-valid-color-function.html
2025-01-03 16:49:23 +00:00
Lucas CHOLLET
d6abd44522 AK: Merge implementations of operator== for Optional
Instead of having a overload of the operator in each specialization of
Optional, use a free function as a common implementation.
2025-01-03 17:11:22 +01:00
Gingeh
a4abb35776 LibWeb: Revert addition of VERIFY call to isomorphic-decode 2025-01-03 14:54:29 +01:00
Tim Ledbetter
a6f04506e4 LibWeb: Add BaseAudioContext.create_periodic_wave() factory method 2025-01-03 14:54:18 +01:00
Tim Ledbetter
f90b79fa1f LibWeb: Implement PeriodicWave constructor 2025-01-03 14:54:18 +01:00
Tim Ledbetter
10c5b9c07b IDLGenerators: Allow methods with multiple sequence arguments
Previously, a method with multiple sequence arguments would cause a
compile error, as the same variable name was redeclared when iterating
the sequence for each argument. This change disambiguates these
variable names.
2025-01-03 14:54:18 +01:00
Arhcout
aa82ff8044 LibWeb: Add documentation to the date parser format
So we don't have to dig in the parser's code
2025-01-03 11:26:01 +00:00
Tyler Dence
5cfed4524d Inspector+UI: Close inspector with shortcuts
This brings keyboard shortcuts for the inspector up with common
convention in FF and Chrome: Ctrl+Shift+C now also opens the inspector,
and F12, Ctrl+W, and Ctrl+Shift+I now close the inspector when the
inspector window is focused.

Resolves #972
2025-01-03 10:47:13 +00:00
Tim Ledbetter
a24718cc49 Tests: Don't attempt to create echo server if internals is not exposed 2025-01-03 11:15:16 +01:00
Tim Ledbetter
7f8ba951cb Tests: Don't attempt to set test timeout if internals is not exposed
Previously, test output would not be displayed for tests setting a long
timeout, if the internals object was not exposed.
2025-01-03 11:15:16 +01:00
Tim Ledbetter
72ca91ad1a LibWeb: Flesh out AudioBufferSourceNode buffer setter steps 2025-01-03 11:14:47 +01:00
Tim Ledbetter
6cab972248 LibWeb: Add BaseAudioContext.createConstantSource() factory method 2025-01-03 11:13:27 +01:00
Tim Ledbetter
1b160044c4 LibWeb: Add ConstantSourceNode interface 2025-01-03 11:13:27 +01:00
Aliaksandr Kalenik
ccb543ebb8 LibWeb/CSS: Skip build of rule cache for inactive documents
Some websites (Reddit, for example) create lots of temporary documents
for fragment parsing. Before this change, we had to build a rule cache
for these documents just to determine whether there are :has, :defined,
or attribute selectors, while it should be safe to simply return `false`
right away.
2025-01-03 10:59:41 +01:00
Shannon Booth
34b8a9ab75 LibWeb/HTML: Assert microtasks invoked on empty execution context stack
This a requirement from the ECMA-262 spec.
2025-01-03 10:59:20 +01:00
Shannon Booth
ee1b2dced3 LibWeb/XHR: Use HTML EventLoop to wait for response to arrive 2025-01-03 10:59:20 +01:00
Shannon Booth
2fb4fcf4a0 LibWeb/FileAPI: Use HTML EventLoop to wait for promise to be fulfilled
Which will have proper handling of the exection context when performing
a microtask checkpoint. This fixes an assertion to be added in the next
commit where perform_a_microtask_check is invoked on a non-empty
execution context stack.
2025-01-03 10:59:20 +01:00
InvalidUsernameException
01f8ab35f1 LibGC: Rename remaining occurrence of marked vector
In 3bfb0534be `MarkedVector` was renamed to `RootVector`, but some
related symbols were missed. This commit corrects this.
2025-01-02 16:22:29 -07:00
stasoid
49bdda1475 AK: Simplify usage of windows.h and winsock2.h
Use <AK/Windows.h> instead of windows.h/winsock2.h
to avoid timeval-related errors.

Note: winsock2.h includes windows.h
2025-01-02 10:17:51 -07:00
Tim Ledbetter
3eefa464ee LibWeb: Add BaseAudioContext.createChannelSplitter() factory method 2025-01-02 11:39:23 +00:00
Tim Ledbetter
e564d25ffb LibWeb: Add ChannelSplitterNode interface 2025-01-02 11:39:23 +00:00
devgianlu
819178a49e LibWeb: Use correct default key size for HMAC
When the default key size was requested it was expressed in bytes
(instead of bits) and from the digest size instead of the block size.
2025-01-02 11:33:43 +01:00
devgianlu
f5d3d6a7d4 LibWeb: Set algorithm length for HMAC key generation
This assignment was missing from the spec, but has been fixed since
https://github.com/w3c/webcrypto/pull/394.

Also add relevant WPT tests.
2025-01-02 11:33:43 +01:00
devgianlu
ac0036d184 LibWeb: Remove spec error comments for RSAOAEP
The spec has been fixed since https://github.com/w3c/webcrypto/pull/391.
2025-01-02 11:33:43 +01:00
Shannon Booth
2066ed2318 LibWeb: Correctly initialize Storage objects on the Document
Instead of storing all storage objects in static memory, we now
follow the the spec by lazily creating a unique Storage object
on each document object.

Each Storage object now holds a 'proxy' to the underlying backing
storage. For now, this proxy is simply a reference to the backing
object. In the future, it will need to be some type of interface
object that stores on a SQLite database or similar.

Session storage is now correctly stored / tracked as part of the
TraversableNavigable object.

Local storage is still stored in a static map, but eventually this
should be factored into something that is stored at the user agent
level.
2025-01-02 11:31:15 +01:00
Shannon Booth
c536f65160 LibWeb/HTML: Implement the broadcast steps for Storage
This does not work properly yet as we do not create storage objects in a
spec compliant manner.
2025-01-02 11:31:15 +01:00
Shannon Booth
9a1e5e1835 LibWeb/HTML: Make storage broadcast take optional strings
Matching the arguments specified by the spec, needed to properly
represent null values.
2025-01-02 11:31:15 +01:00
Shannon Booth
bbf4739c8e LibWeb/HTML: Store the type of the storage object
This will be needed by the storage broadcast implementation to perform
different steps if the object is for session storage.
2025-01-02 11:31:15 +01:00
Shannon Booth
f3ecd23a21 LibWeb/HTML: Enforce quota limit for local and session storage
Fixes a timeout/crash for the two commited WPT tests.
2025-01-02 11:31:15 +01:00
Shannon Booth
e767029e24 LibWeb/HTML: Use finalize to clean up MessagePort instances 2025-01-02 11:31:15 +01:00
Shannon Booth
0b2c80e503 LibJS: Adjust FIXME for an incorrect assertion in GetModuleNamespace
It turns out that the FIXME which we had left unimplemented is actually
a spec bug.
2025-01-02 11:30:30 +01:00
Shannon Booth
1031f424e9 LibJS: Remove inaccurate comment about use of on_call_stack_emptied
This is no longer done. One of the comments is also innacurate for a
second reason - the call stack is never empty in that case, and is
verified as such only a few lines above.
2025-01-02 11:30:04 +01:00
Shannon Booth
1586d77b76 LibJS: Adopt editorial fix of return types of algorithms returning empty
See: https://github.com/tc39/ecma262/commit/35af90949
2025-01-02 11:30:04 +01:00
Shannon Booth
8beb567088 LibJS: Remove redundant completion type check in ScriptEvaluation
See editorial change to the ECMA-262 spec of:

https://github.com/tc39/ecma262/commit/bc5b7fda5
2025-01-02 11:30:04 +01:00
Shannon Booth
d48a0aaa55 LibJS: Remove unneeded FIXMEs for suspending an execution context
From what I understand, the suspension steps are not required now,
or in the future for our implementation, or any other. The intent
is already implemented in the spec pushing on another execution
context to the stack and leaving the running execution context as-is.

The resume steps are a slightly different story as there is some subtle
behavior which the spec is trying to convey where some custom logic may
need to be done when one execution context changes from one to another.
It may be worth implementing those steps at a later point in time so
that this behavior is a bit easier to follow in those cases.

To make the situation more confusing - from what I can gather from the
spec, not all cases that the spec mentions resume actually means
anything normative. Resume is only _actually_ needed in a limited set
of locations.

For now, let's just remove the unneeded FIXMEs that indicate that there
is something to be done for the suspension steps, as there is not, and
leave the resume steps as is.
2025-01-02 11:30:04 +01:00
Shannon Booth
44bb2b7e32 LibWeb/HTML: Use paintable box for 'associated CSS layout box' check
This is consistent with other functions such as
HTMLElement::offset_width and fixes a crash for the included test.
Returning an offset of zero is not correct for this case, but this is
still an improvement to not crash.
2025-01-02 11:28:37 +01:00
Shannon Booth
372f2dd7a1 LibWeb/HTML: Remove uneeded handling for non-box paintable HTMLElements
All inline nodes are now PaintableBoxes, so we do not need to handle the
non box case any more :^)
2025-01-02 11:28:37 +01:00
Aliaksandr Kalenik
c7d6a7aafb LibWeb: Insert default font in font list before emoji font
This fixes a bug where, if a non-existent font family is specified in
CSS, whitespaces would be rendered using the emoji font, while letters
would use the default font. This issue occurred because the font was
resolved separately for each code point. Since the emoji font was listed
before the default font, it was chosen for whitespace characters due to
its inclusion of whitespace glyphs (at least in the Apple Color Emoji
font on macOS). This change resolves the issue by placing the default
font before the emoji font in the list.
2025-01-02 10:47:21 +01:00
Aliaksandr Kalenik
8b8d83a318 LibWeb: Request default font with size specified in style 2025-01-02 10:47:21 +01:00
Aliaksandr Kalenik
0b8b690f92 LibWeb+LibWebView: Allow to specify default font size in FontPlugin
Instead of always assuming 12pt size for default font, explicitly pass
it as a parameter.
2025-01-02 10:47:21 +01:00
sideshowbarker
1be55fe793 LibWeb: Support the ariaActiveDescendantElement IDL attribute 2025-01-01 11:00:53 +00:00
sideshowbarker
e1b4aa94db Meta: Fix “shadow-including-ancestors-descendant” generator check
This change fixes the IDLGenerators.cpp implementation of the “If
reflectedTarget's explicitly set attr-element is a descendant of any of
element's shadow-including ancestors” step from the “If a reflected IDL
attribute has the type T?, where T is either Element or an interface
that inherits from Element” case in the HTML spec at
http://whatwg.org/html/#reflecting-content-attributes-in-idl-attributes
2025-01-01 11:00:53 +00:00
sideshowbarker
f9d4852a22 Meta: Make IDLGenerators handle non-HTML and dash-containing attributes
This change updates the BindingsGenerator/IDLGenerators.cpp code to
handle reflected non-HTML::AttributeNames content-attribute names, and
to handle such names as-is — including names with dashes.
2025-01-01 11:00:53 +00:00