Skip to content

Commit 952f161

Browse files
committed
[css-layout-api] Specify IDL for utility functions.
1 parent 3991737 commit 952f161

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

css-layout-api/Overview.bs

+36-5
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,16 @@ Layout Children {#layout-children}
137137
----------------------------------
138138

139139
<pre class='idl'>
140+
[Exposed=LayoutWorklet]
140141
interface LayoutChild {
141142
FragmentRequest doLayout(ConstraintSpace space, ChildBreakToken breakToken);
142143
};
143144

145+
[Exposed=LayoutWorklet]
144146
interface InlineLayoutChild : LayoutChild {
145147
};
146148

149+
[Exposed=LayoutWorklet]
147150
interface BoxLayoutChild : LayoutChild {
148151
readonly attribute StylePropertyMapReadOnly styleMap;
149152
};
@@ -233,6 +236,7 @@ Layout Fragments {#layout-fragments}
233236
------------------------------------
234237

235238
<pre class='idl'>
239+
[Exposed=LayoutWorklet]
236240
interface Fragment {
237241
readonly attribute double inlineSize;
238242
readonly attribute double blockSize;
@@ -347,7 +351,7 @@ Constraint Spaces {#constraint-spaces}
347351
--------------------------------------
348352

349353
<pre class='idl'>
350-
[Constructor(optional ConstraintSpaceOptions options)]
354+
[Constructor(optional ConstraintSpaceOptions options),Exposed=LayoutWorklet]
351355
interface ConstraintSpace {
352356
readonly attribute double inlineSize;
353357
readonly attribute double blockSize;
@@ -491,11 +495,13 @@ Breaking and Fragmentation {#breaking-and-fragmentation}
491495
--------------------------------------------------------
492496

493497
<pre class="idl">
498+
[Exposed=LayoutWorklet]
494499
interface ChildBreakToken {
495500
readonly attribute BreakType breakType;
496501
readonly attribute LayoutChild child;
497502
};
498503

504+
[Exposed=LayoutWorklet]
499505
interface BreakToken {
500506
readonly attribute sequence&lt;ChildBreakToken> childBreakTokens;
501507
readonly attribute Object data;
@@ -682,15 +688,39 @@ Utility Functions {#utility-functions}
682688
--------------------------------------
683689

684690
<pre class='idl'>
691+
[Exposed=LayoutWorklet]
692+
interface LayoutStrut {
693+
readonly attribute double inlineStart;
694+
readonly attribute double inlineEnd;
695+
696+
readonly attribute double blockStart;
697+
readonly attribute double blockEnd;
698+
};
699+
700+
[Exposed=LayoutWorklet]
701+
interface LayoutSize {
702+
readonly attribute double inline;
703+
readonly attribute double block;
704+
};
705+
685706
partial interface LayoutWorkletGlobalScope {
686-
resolveInlineSize();
687-
resolveBlockSize();
707+
double resolveInlineSize(ConstraintSpace constraintSpace,
708+
StylePropertyMapReadOnly styleMap);
709+
710+
double resolveBlockSize(ConstraintSpace constraintSpace,
711+
StylePropertyMapReadOnly styleMap,
712+
optional double contentSize);
688713

689-
resolveBordersAndPadding();
690-
resolveScrollbarSize();
714+
LayoutStrut resolveBordersAndPadding(ConstraintSpace constraintSpace,
715+
StylePropertyMapReadOnly styleMap);
716+
717+
LayoutSize resolveScrollbarSize(ConstraintSpace constraintSpace,
718+
StylePropertyMapReadOnly styleMap);
691719
};
692720
</pre>
693721

722+
Issue: Specify the behaviour of these functions.
723+
694724
Layout {#layout}
695725
================
696726

@@ -870,6 +900,7 @@ Layout Engine {#layout-engine}
870900
------------------------------
871901

872902
<pre class="idl">
903+
[Exposed=LayoutWorklet]
873904
interface FragmentRequest {
874905
// Has internal slots:
875906
// [[layoutChild]] - The layout child to generate the fragment for.

0 commit comments

Comments
 (0)