chromium/third_party/blink/renderer/core/layout/custom/layout_worklet_global_scope.idl

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://drafts.css-houdini.org/css-layout-api/#layoutworkletglobalscope

[
    Exposed=LayoutWorklet,
    Global=(Worklet,LayoutWorklet),
    RuntimeEnabled=CSSLayoutAPI
] interface LayoutWorkletGlobalScope : WorkletGlobalScope {
    [RaisesException] void registerLayout(DOMString name, NoArgumentConstructor layoutCtor);
};

// Blink-specific type for layout function
// https://drafts.css-houdini.org/css-layout-api/#layout-definition-layout-function
callback LayoutCallback = any (sequence<LayoutChild> children, LayoutEdges edges, LayoutConstraints constraints, StylePropertyMapReadOnly styleMap);

// Blink-specific type for intrinsicSizes function
// https://drafts.css-houdini.org/css-layout-api/#layout-definition-intrinsic-sizes-function
callback IntrinsicSizesCallback = any (sequence<LayoutChild> children, LayoutEdges edges, StylePropertyMapReadOnly styleMap);