Commit Graph

183 Commits

Author SHA1 Message Date
Shannon Booth
2a56df8ecd LibWeb: Add scaffolding for DynamicsCompressorNode 2024-05-14 13:45:43 -04:00
Andrew Kaster
e10721f1b5 LibWeb: Add stub implementation of FontFaceSet and Document.fonts
This is now enough for duolingo to load and use its fallback fonts.
2024-05-08 10:39:16 +02:00
Andrew Kaster
2c31d7dddc LibWeb: Add stub implementation of CSS FontFace Web API 2024-05-08 10:39:16 +02:00
Shannon Booth
a83f4216a5 LibWeb: Add stub IDL interface for OscillatorNode
This source node generates a periodic wave form.
2024-05-02 07:49:23 +02:00
Shannon Booth
c9b2c1c747 LibWeb: Add stub IDL interface for AudioScheduledSourceNode
This is a base class of a few different audio nodes, most notably for
our immediate needs - OscillatorNode.
2024-05-02 07:49:23 +02:00
Shannon Booth
6661c68b28 LibWeb: Add stub IDL interface for AudioNode
An AudioNode is the fundamental building block used in 'Audio
Contexts'. In our immediate case, the audio node we are working towards
implementing is an oscillating source node.
2024-05-02 07:49:23 +02:00
Shannon Booth
5ae0ac7b73 LibWeb: Add stub IDL interface for AudioParam
An AudioParam is a fundamental building block in WebAudio as it controls
the value of an individual parameter of an AudioNode, such as volume.
2024-05-02 07:49:23 +02:00
Shannon Booth
b1b7e2324a LibWeb: Add stub IDL interface for PeriodicWave
PeriodicWave represents an arbitrary periodic waveform to be used
with an OscillatorNode.
2024-05-02 07:49:23 +02:00
Shannon Booth
91efa1d568 LibWeb: Add skeleton for OfflineAudioContext
Implement enough to construct the object itself, with most parts stubbed
out.
2024-04-27 07:11:02 +02:00
Shannon Booth
0c8a98ac94 LibWeb: Begin implementing the interface for AudioBuffer
Implement the constructor and getChannelData function, working towards
the functionality that we need in order to implement
OfflineAudioContext.
2024-04-25 19:26:19 -04:00
Jamie Mansfield
2d90317c20 LibWeb: Implement <desc> SVG element 2024-04-17 07:17:27 +02:00
Aliaksandr Kalenik
ccb363c443 LibWeb: Add hashchange event support 2024-04-15 01:02:51 -07:00
Aliaksandr Kalenik
ee3dd7977d LibWeb: Add popstate event support
It is going to be useful in writing tests for History API.
2024-04-11 21:25:06 +02:00
Lucas CHOLLET
676fc5e8c6 LibWeb: Implement HTML::ImageBitmap
And the two methods of `WindowOrWorkerGlobalScope` that are used as
constructors for it.
2024-04-08 14:25:36 +02:00
Shannon Booth
b873e5bc1d LibWeb: Implement the PointerEvent interface
As defined in: https://w3c.github.io/pointerevents

With the exception of the getCoalescedEvents and getPredictedEvents
APIs.

There are still many other parts of that spec (such as the event
handlers) left to implement, but this does get us at least some of the
way.
2024-04-08 14:25:08 +02:00
Shannon Booth
ccebc7a905 LibWeb: Add stubs for the Screen Orientation API
As defined in: https://w3c.github.io/screen-orientation
2024-04-03 10:09:58 +01:00
MacDue
6d72f40d8d LibWeb: Stub out SVGAnimatedTransformList 2024-04-01 21:10:35 +02:00
MacDue
3bab4fbae9 LibWeb: Stub out SVGTransformList 2024-04-01 21:10:35 +02:00
MacDue
a6a40a5bc6 LibWeb: Stub out SVGTransform 2024-04-01 21:10:35 +02:00
Shannon Booth
1f59e21829 LibWeb: Implement HTMLAllCollection
This collection has some pretty strange behaviour, particularly with the
IsHTMLDDA slot which is defined in the javascript spec specifically for
this object.

This commit implements pretty much all of this interface, besides from
the custom [[Call]].

There is also no caching over this collection. Since it is a live
collection over the entire document, the performance is never going to
be great, and I am not convinced any speedup for this legacy interface
is worth a massive cache.
2024-04-01 14:41:00 +02:00
Matthew Olsson
911088278d LibWeb: Add the CSSTransition IDL object 2024-03-29 21:58:12 +01:00
Matthew Olsson
a1f4d1875e LibWeb: Add an InternalAnimationTimeline object
This will allow fine grained control over animation times, which will
allow us to write timing tests that can reliably pass on the much slower
CI machines.
2024-03-28 21:08:32 +01:00
Timothy Flynn
c2ef506b4a LibWeb: Add an empty DataTransfer IDL implementation
This does not implement any of the IDL methods, but GitHub requires the
interface exists to upload files via an <input type="file"> element.
Their JS handles uploads via this element and via drag-and-drop in one
function, and check if the uploaded file is `instanceof DataTransfer` to
decide how to handle it.
2024-03-14 10:10:33 +01:00
Shannon Booth
f9e5b43b7a LibWeb: Rename URL platform object to DOMURL
Along with putting functions in the URL namespace into a DOMURL
namespace.

This is done as LibWeb is in an awkward situation where it needs
two URL classes. AK::URL is the general purpose URL class which
is all that is needed in 95% of cases. URL in the Web namespace
is needed predominantly for interfacing with the javascript
interfaces.

Because of two URLs in the same namespace, AK::URL has had to be
used throughout LibWeb. If we move AK::URL into a URL namespace,
this becomes more painful - where ::URL::URL is required to
specify the constructor (and something like
::URL::create_with_url_or_path in other places).

To fix this problem - rename the class in LibWeb implementing the
URL IDL interface to DOMURL, along with moving the other Web URL
related classes into this DOMURL folder.

One could argue that this name also makes the situation a little
more clear in LibWeb for why these two URL classes need be used
in the first place.
2024-02-25 08:54:31 +01:00
Aliaksandr Kalenik
fb8edcea00 LibWeb: Flesh out implementation of ResizeObserver interfaces
Adds the initial implementation for interfaces defined in the
ResizeObserver specification. These interfaces will be used to
construct and send observation events in the upcoming changes.
2024-02-20 10:55:10 +01:00
Matthew Olsson
faaf5b9652 LibWeb: Add the AnimationEvent IDL objects 2024-02-16 12:02:11 -07:00
Matthew Olsson
3a87c000c4 LibWeb: Add the CSSAnimation IDL object 2024-02-16 12:02:11 -07:00
Andreas Kling
b12541b286 LibWeb: Add SVGSVGElement.viewBox attribute
This attribute has some compatbility issues...
- The spec says it should be an SVGAnimatedRect which contains
  a DOMRect and a DOMReadOnlyRect.
- Blink gives you an SVGAnimatedRect with 2x SVGRect
- Gecko gives you an SVGAnimatedRect with 2x SVGRect? (nullable)

I ended up with something similar to Gecko, an SVGAnimatedRect
with 2x DOMRect? (nullable)

With this fixed, we can now load https://polar.sh/ :^)
2024-01-25 08:23:41 +01:00
stelar7
a8ddf6c2a4 LibWeb: Add the CryptoKey interface 2024-01-23 14:07:06 -07:00
Luke Wilde
ddf601830a LibWeb: Implement SVGAnimatedString 2023-12-30 18:50:29 +01:00
MacDue
809c5b0b03 LibWeb: Add initial support for SVG <textPath>
This patch adds basic support for the SVG `<textPath>`, so it supports
placing text along a path, but none of the extra attributes for
controlling the layout of the text. This is enough to correctly display
the MDN example.
2023-12-19 21:29:03 +01:00
Timothy Flynn
ffdc2d8add LibWeb+LibWebView+WebContent: Add an Inspector IDL object to the Window
This is an internal object that must be explicitly enabled by the chrome
before it is added to the Window. The Inspector object will be used by a
special WebView that will replace all chrome-specific inspector windows.
The IDL defines methods that this WebView will need to inform the chrome
of various events, such as the user clicking a DOM node.
2023-11-24 08:37:19 +01:00
Matthew Olsson
5824916f8c LibWeb: Add KeyframeEffect IDL objects 2023-11-14 10:12:02 +01:00
Matthew Olsson
43dc9dfb69 LibWeb: Add the AnimationPlaybackEvent IDL object 2023-11-11 22:45:16 +01:00
Timothy Flynn
4b94b0b561 LibWeb: Begin implementing the Clipboard API
https://w3c.github.io/clipboard-apis/

This implements enough for navigator.clipboard.writeText(String).
2023-11-11 08:54:37 +01:00
Matthew Olsson
1ca46afa2f LibWeb: Add the Animation IDL object 2023-11-08 09:58:18 +01:00
Matthew Olsson
0df06ce273 LibWeb: Add the AnimationEffect IDL object 2023-11-08 09:58:18 +01:00
Matthew Olsson
734076946b LibWeb: Add DocumentTimeline IDL object 2023-11-07 15:17:09 +01:00
Matthew Olsson
521f8bd5f2 LibWeb: Add AnimationTimeline IDL object 2023-11-07 15:17:09 +01:00
Shannon Booth
07b332e17c LibWeb: Add IDL definition for SVGScriptElement
It does not currently handle any of the actual scripting, but this
should at least allow us to create an instance of the element.

The test being added here isn't actually testing much, but before the
previous commit we used to crash parsing the page due to a TODO().
2023-09-23 11:41:57 +02:00
Shannon Booth
77d32fcb5f LibWeb: Add an initial implementation for Web::FileAPI::FileReader
Some steps are still to be implemented, namely:
 * Properly aborting the read algorithm
 * Handling BinaryString type properly
 * Setting error on any error

But as it stands, this is enough functionality for the basic case of
reading the contents of a blob using the FileReader API.
2023-09-17 16:37:31 -06:00
Timothy Flynn
153ae93f9c LibWeb: Implement ToggleEvent for HTMLDetailsElement 2023-09-13 13:45:47 +02:00
Luke Wilde
af2886449a LibWeb: Implement PerformanceObserver 2023-08-27 23:27:44 +02:00
Andrew Kaster
d1aea87889 LibWeb: Add NavigateEvent, the main event of the Navigation API
This event is the star of the show, and the main way that web content
can react to either programmatic or user-initiated navigation.

All of the fun algorithms will have to come later though.
2023-08-24 11:03:57 -06:00
Andrew Kaster
3dd3b2019d LibWeb: Add NavigationTransition, a transient property of Navigation
This property is useful for web content to determine whether an ongoing
navigation has settled or not.
2023-08-24 11:03:57 -06:00
Andrew Kaster
4989375191 LibWeb: Add NavigationDestination, used for NavigateEvents
This class will be used in the algorithms for the navigate event firing
algorithms to populate the destination field of the NavigateEvent.
2023-08-24 11:03:57 -06:00
Andrew Kaster
0c2f758067 LibWeb: Implement the start of the Navigation API
This API is how JavaScript can manipulate the new Navigable concepts
directly. We are still missing most of the interesting algorithms on
Navigation that do the actual navigation steps, and call into the
currently WIP navigable AOs.
2023-08-24 11:03:57 -06:00
Andrew Kaster
51c2835044 LibWeb: Add NavigationCurrentEntryChangeEvent, fired when navigating
This event will be fired by Navigation when changing the current
NavigationHistoryEntry.
2023-08-24 11:03:57 -06:00
Andrew Kaster
3c1d4eab24 LibWeb: Add NavigationHistoryEntry, a wrapper around SessionHistoryEntry 2023-08-24 11:03:57 -06:00
Bastiaan van der Plaat
c88f14902b LibWeb: Add DOMQuad and text tests 2023-08-23 12:11:21 +01:00