1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
Commit graph

71 commits

Author SHA1 Message Date
Aliaksandr Kalenik
7efdd1c1ec LibWeb: Stub CacheStorage interface
With this change we can again open login form https://discord.com/login
instead of failing in js because `caches.open()` is not defined.
2025-06-05 23:02:21 +02:00
Sam Atkins
870f24f181 LibWeb/CSS: Add basic implementation of CSSMarginRule
This is a bit under-specced, specifically there's no definition of
CSSMarginDescriptors so I've gone with CSSStyleProperties for now. Gets
us 17 WPT subtests.
2025-05-16 11:01:39 +01:00
Sam Atkins
aaf07ae30d LibWeb: Add basic implementation of @page
This doesn't support selectors, and the only descriptors for now are for
margins.
2025-05-15 09:53:29 +01:00
stelar7
296d9d74d8 LibWeb/IDB: Implement IDBCursorWithValue interface 2025-05-13 10:48:40 -06:00
Timothy Flynn
ea77092100 LibWeb: Begin implementing SharedWorker
Shared workers are essentially just workers that may be accessed from
scripts within the same origin. There are plenty of FIXMEs here (mostly
building on existing worker FIXMEs that are already in place), but this
lets us run the shared worker variants of WPT tests.
2025-05-02 17:48:02 -04:00
Glenn Skrzypczak
cce7d8c0fb LibWeb/HTML: Implement CommandEvent class
This implements the `CommandEvent` class.
2025-04-18 12:09:57 +01:00
Timothy Flynn
d5d9d999ae LibWeb: Implement ReadableStream's async iterator 2025-04-14 17:43:11 -04:00
Luke Wilde
948349974c LibWeb/WebGL: Implement EXT_blend_minmax extension 2025-04-07 23:21:11 +02:00
Sam Atkins
cb8511772d LibWeb/CSS: Add CSSFontFaceDescriptors type
This is a CSSOM type that holds the descriptors for a CSSFontFaceRule,
but this commit only adds it without using it.
2025-04-04 10:40:32 +01:00
Totto16
b66e7ac1ba LibWeb: Implement BarProp properties for Window 2025-03-29 02:35:27 +00:00
Timothy Flynn
f05b0bfd5f LibWeb+LibWebView+WebContent: Convert about:settings to a WebUI 2025-03-28 07:31:10 -04:00
Timothy Flynn
c75e40180c LibWeb+LibWebView+WebContent: Convert about:processes to a WebUI 2025-03-28 07:31:10 -04:00
Timothy Flynn
41aeb9e63a LibWeb+LibWebView+WebContent: Introduce a WebUI framework
When we build internal pages (e.g. about:settings), there is currently
quite a lot of boilerplate needed to communicate between the browser and
the page. This includes creating IDL for the page and the IPC for every
message sent between the processes.

These internal pages are also special in that they have privileged
access to and control over the browser process.

The framework introduced here serves to ease the setup of new internal
pages and to reduce the access that WebContent processes have to the
browser process. WebUI pages can send requests to the browser process
via a `ladybird.sendMessage` API. Responses from the browser are passed
through a WebUIMessage event. So, for example, an internal page may:

    ladybird.sendMessage("getDataFor", { id: 123 });

    document.addEventListener("WebUIMessage", event => {
        if (event.name === "gotData") {
            console.assert(event.data.id === 123);
        }
    });

To handle these messages, we set up a new IPC connection between the
browser and WebContent processes. This connection is torn down when
the user navigates away from the internal page.
2025-03-28 07:31:10 -04:00
Timothy Flynn
b169a98495 LibWeb+LibWebView+WebContent: Introduce a basic about:settings page
This adds a basic settings page to manage persistent Ladybird settings.
As a first pass, this exposes settings for the new tab page URL and the
default search engine.

The way the search engine option works is that once search is enabled,
the user must choose their default search engine; we do not apply any
default automatically. Search remains disabled until this is done.

There are a couple of improvements that we should make here:

* Settings changes are not broadcasted to all open about:settings pages.
  So if two instances are open, and the user changes the search engine
  in one instance, the other instance will have a stale UI.

* Adding an IPC per setting is going to get annoying. It would be nice
  if we can come up with a smaller set of IPCs to send only the relevant
  changed settings.
2025-03-22 17:27:45 +01:00
Timothy Flynn
843209c6a9 LibWeb+LibWebView+WebContent: Add an about:processes page
The intent is that this will replace the separate Task Manager window.
This will allow us to more easily add features such as actual process
management, better rendering of the process table, etc. Included in this
page is the ability to sort table rows.

This also lays the ground work for more internal `about` pages, such as
about:config.
2025-03-19 10:03:17 -04:00
Sam Atkins
83bb92c4e0 LibWeb/CSS: Merge style declaration subclasses into CSSStyleProperties
We previously had PropertyOwningCSSStyleDeclaration and
ResolvedCSSStyleDeclaration, representing the current style properties
and resolved style respectively. Both of these were the
CSSStyleDeclaration type in the CSSOM. (We also had
ElementInlineCSSStyleDeclaration but I removed that in a previous
commit.)

In the meantime, the spec has changed so that these should now be a new
CSSStyleProperties type in the CSSOM. Also, we need to subclass
CSSStyleDeclaration for things like CSSFontFaceRule's list of
descriptors, which means it wouldn't hold style properties.

So, this commit does the fairly messy work of combining these two types
into a new CSSStyleProperties class. A lot of what previously was done
as separate methods in the two classes, now follows the spec steps of
"if the readonly flag is set, do X" instead, which is hopefully easier
to follow too.

There is still some functionality in CSSStyleDeclaration that belongs in
CSSStyleProperties, but I'll do that next. To avoid a huge diff for
"CSSStyleDeclaration-all-supported-properties-and-default-values.txt"
both here and in the following commit, we don't apply the (currently
empty) CSSStyleProperties prototype yet.
2025-03-19 13:53:00 +00:00
Luke Wilde
02236be737 LibWeb/CSP: Implement SecurityPolicyViolationEvent
This is used to report violations of policies to the element/global
object that caused it.
2025-03-19 00:55:14 +01:00
Timothy Flynn
810d04b3f4 LibWeb+LibWebView+WebContent: Remove the built-in Inspector 2025-03-15 19:09:40 +01:00
Luke Wilde
6d1f78198d LibWeb: Implement Resource Timing 2025-03-06 09:00:53 -07:00
Luke Wilde
9ca25eed7f LibWeb/WebGL2: Implement EXT_color_buffer_float extension
This makes the Point Of Sale model on https://www.shopify.com/ have
colour instead of being completely black.
2025-03-06 12:59:28 +01:00
Sam Atkins
f148af0a93 LibWeb: Move XMLSerializer into HTML directory
The DOMParsing spec is in the process of being merged into the HTML one,
gradually. The linked spec change moves XMLSerializer, but many of the
algorithms are still in the DOMParsing spec so I've left the links to
those alone.

I've done my best to update the GN build but since I'm not actually
using it, I might have done that wrong.

Corresponds to 2edb8cc7ee
2025-03-04 16:44:41 +00:00
Tim Ledbetter
bbcd8bd97c LibWeb: Implement FileReaderSync interface
This interface allows the user to read File or Blob objects
synchronously from inside workers.
2025-02-28 04:49:51 +00:00
Jelle Raaijmakers
63b451cb46 LibWeb: Add SVGFilterElement 2025-02-22 10:14:29 +01:00
Jelle Raaijmakers
aeef179668 LibWeb: Add SVGAnimatedEnumeration 2025-02-22 10:14:29 +01:00
Luke Wilde
958938655d LibWeb/WebGL: Implement WEBGL_compressed_texture_s3tc extension 2025-02-09 01:00:51 +01:00
Luke Wilde
cae0ee6fa7 LibWeb: Implement TextEncoderStream
Required by the server-side rendering mode of React Router, used by
https://chatgpt.com/

Note that the imported tests do not have the worker variants to prevent
freezing on macOS.
2025-02-07 11:04:46 -05:00
devgianlu
da9eaf8788 LibWeb: Stub for Credential Management API
Stub out basic Credential Management APIs and import IDL tests.

Spec: https://w3c.github.io/webappsec-credential-management/
2025-02-05 13:18:47 -07:00
Shannon Booth
d4649db55e LibWeb/URLPattern: Add initial stub for URLPattern interface 2025-01-27 18:07:17 +00:00
Luke Wilde
55f7cb4f10 LibWeb/WebGL: Implement WEBGL_draw_buffers extension 2025-01-21 21:36:05 +01:00
Luke Wilde
de77a5e3ea LibWeb/WebGL: Move extensions into their own folder 2025-01-21 21:36:05 +01:00
Luke Wilde
442f0b9a13 LibWeb/WebGL: Implement OES_vertex_array_object extension 2025-01-21 21:36:05 +01:00
Tim Ledbetter
56907e2de6 LibWeb: Add StereoPannerNode interface 2025-01-18 10:20:41 +01:00
Tim Ledbetter
aa39aa50f7 LibWeb: Add MediaElementAudioSourceNode interface 2025-01-17 19:04:47 +00:00
Noah Bright
6c6bf322ea LibWeb/WebAudio: Define and partially implement AnalyserNode
https://webaudio.github.io/web-audio-api/#AnalyserNode

Most of the interface is naively implemented. Container types
probably need adjusted (Vector<double> is used for all the processing).
A Fourier Transform is needed, but that's waiting on either a 3rd
party library or a complex number type.

There are lots of simple miscellaneous filters that need to be applied.
It could be reasonable to implement from scratch, supposing that
it can be parallelized. It might be hard to find one library with
everything. Not my call though.

Some additional scaffolding around blocks and render quanta is
probably needed before this is developed much further, which
probably comes in at the level of the AudioNode.

Co-authored-by: Tim Ledbetter <tim.ledbetter@ladybird.org>
2025-01-17 10:11:24 +01:00
Tim Ledbetter
6c4c925f02 LibWeb/WebAudio: Add DelayNode interface 2025-01-08 15:31:59 +00:00
Tim Ledbetter
1b160044c4 LibWeb: Add ConstantSourceNode interface 2025-01-03 11:13:27 +01:00
Tim Ledbetter
e564d25ffb LibWeb: Add ChannelSplitterNode interface 2025-01-02 11:39:23 +00:00
Lucas CHOLLET
55b4a983a7 LibWeb/CSS: Add the TransitionEvent type 2024-12-25 17:14:08 +01:00
Shannon Booth
f3e92f2ae5 LibWeb/HTML: Implement the StorageEvent interface 2024-12-25 11:57:14 +01:00
Andrew Kaster
44e3817219 LibWeb: Add WebAssembly.Global and exports support for global instances 2024-12-24 15:20:28 +01:00
Feng Yu
b3edbd7bf2 LibWeb: Implement the ClipboardItem API
Spec: https://w3c.github.io/clipboard-apis/#clipboard-item-interface
2024-12-20 15:29:18 +00:00
Aliaksandr Kalenik
c9105955f6 LibWeb/WebGL: Add support for ANGLEInstancedArrays extension
This is only WebGL 1.0 extension. It's enabled in ANGLE by default.

Progress on https://ciechanow.ski/curves-and-surfaces/ that relies on
this extension.
2024-12-20 15:31:58 +01:00
Luke Wilde
4f691c2410 LibWeb/WebAudio: Implement PannerNode
Required by https://scottts.itch.io/different-strokes
2024-12-17 13:38:20 +01:00
Andrew Kaster
af536e1192 LibWeb: Add stubbed-out WebGL2RenderingContext 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
Shannon Booth
b39f4f0b5a LibWeb: Add stub definition for WorkletGlobalScope 2024-11-30 11:19:35 +01:00