LibIDL: Add LayoutWorklet and PaintWorklet parsing

We don't support these yet, but this avoids having to comment out IDL
definitions that are exposed to them.
This commit is contained in:
Sam Atkins 2025-08-14 16:44:57 +01:00 committed by Jelle Raaijmakers
commit 6be9f0757f
Notes: github-actions[bot] 2025-08-15 07:22:34 +00:00
2 changed files with 7 additions and 0 deletions

View file

@ -34,6 +34,10 @@ ErrorOr<ExposedTo> parse_exposure_set(StringView interface_name, StringView expo
return ExposedTo::ServiceWorker;
if (string == "AudioWorklet"sv)
return ExposedTo::AudioWorklet;
if (string == "LayoutWorklet"sv)
return ExposedTo::LayoutWorklet;
if (string == "PaintWorklet"sv)
return ExposedTo::PaintWorklet;
if (string == "Worklet"sv)
return ExposedTo::Worklet;
if (string == "ShadowRealm"sv)

View file

@ -19,6 +19,9 @@ enum class ExposedTo {
Window = 0x10,
ShadowRealm = 0x20,
Worklet = 0x40,
PaintWorklet = 0x80,
LayoutWorklet = 0x100,
// FIXME: Categorize PaintWorklet and LayoutWorklet once we have them and know what they are.
AllWorkers = DedicatedWorker | SharedWorker | ServiceWorker | AudioWorklet, // FIXME: Is "AudioWorklet" a Worker? We'll assume it is for now (here, and line below)
All = AllWorkers | Window | ShadowRealm | Worklet,
};