Skip to content

Commit 8895a6e

Browse files
committed
[css-layout-api] Add a bunch of TODO issues.
1 parent 099cd77 commit 8895a6e

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

css-layout-api/Overview.bs

+22-14
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@ urlPrefix: https://tc39.github.io/ecma262/#sec-; type: dfn;
4343
text: TypeError
4444
</pre>
4545

46-
<!--
47-
TODO
48-
- Fix layout invalidation section.
49-
- Fix examples.
50-
- Add utility functions.
51-
- Define invalid fragment.
52-
- Layout instance on box is incorrect.
53-
-->
54-
5546
Introduction {#intro}
5647
=====================
5748

@@ -78,7 +69,6 @@ Layout API Containers {#layout-api-containers}
7869
This value causes an element to generate an inline-level <a>layout API container</a> box.
7970
</dl>
8071

81-
8272
A <dfn>layout API container</dfn> is the box generated by an element with a computed 'display' of
8373
''layout()'' or ''inline-layout()''.
8474

@@ -112,12 +102,15 @@ A <a>layout API container</a> has a <dfn>layout instance</dfn>, initially this i
112102
is an instance of the author defined layout class (see [[#registering-layout]]). If the <a>box</a>'s
113103
<a>computed value</a> of 'display' changes, this must be reset to null.
114104

105+
Issue: Having the layout instance on the box is wrong, should really be a map on the layout worklet
106+
global scope.
107+
115108
Layout API Container Painting {#painting}
116109
-----------------------------------------
117110

118111
<a>Layout API Container</a> children paint exactly the same as inline blocks [[!CSS21]], except that
119112
the order in which they are returned from the layout method (via
120-
{{FragmentResultOptions/childFragments}} is used in place of raw document order, and 'z-index'
113+
{{FragmentResultOptions/childFragments}}) is used in place of raw document order, and 'z-index'
121114
values other than ''z-index/auto'' create a stacking context even if 'position' is ''static''.
122115

123116
Layout API Model and Terminology {#layout-api-model-and-terminology}
@@ -515,7 +508,7 @@ dictionary BreakTokenOptions {
515508
enum BreakType { "none", "inline", "inline-hyphen", "column", "page", "region" };
516509
</pre>
517510

518-
Issue(w3c/css-houdini-drafts#258): What type of {{BreakType}}s are needed?
511+
Issue: Fill out other inline type break types.
519512

520513
A {{LayoutChild}} can produce multiple {{Fragment}}s. A {{BoxLayoutChild}} may fragment in the block
521514
direction if a {{ConstraintSpace/blockFragmentation}} is not none. A {{InlineLayoutChild}} may
@@ -525,6 +518,8 @@ A subsequent {{Fragment}} is produced by using the previous {{Fragment}}'s {{Fra
525518
This tells the <a>child layout</a> to produce a {{Fragment}} starting at the point encoded in the
526519
{{ChildBreakToken}}.
527520

521+
Issue: Explain resuming the author defined layout.
522+
528523
<div class="example">
529524
This example shows a simple inline layout which places child fragments in the inline direction. It
530525
places each of its on a line, aligning their dominant baselines.
@@ -717,6 +712,12 @@ partial interface LayoutWorkletGlobalScope {
717712
LayoutSize resolveScrollbarSize(ConstraintSpace constraintSpace,
718713
StylePropertyMapReadOnly styleMap);
719714
};
715+
716+
[Exposed=LayoutWorklet]
717+
interface Layout {
718+
readonly attribute sequence&lt;DOMString> inputProperties;
719+
readonly attribute sequence&lt;DOMString> childInputProperties;
720+
};
720721
</pre>
721722

722723
Issue: Specify the behaviour of these functions.
@@ -736,6 +737,8 @@ name to child input properties map</dfn>. Initialy these maps are empty and are
736737
Each <a>box</a> has an associated <dfn>layout valid flag</dfn>. It may be either
737738
<dfn>layout-valid</dfn> or <dfn>layout-invalid</dfn>. It is initially set to <a>layout-invalid</a>.
738739

740+
Issue: The above flag is too restrictive on user agents, change.
741+
739742
When the <a>computed style</a> for a |box| changes, the user agent must run the following steps:
740743
1. Let |layoutFunction| be the <<layout()>> or <<inline-layout()>> function of the 'display'
741744
property on the <a>computed style</a> for the |box| if it exists. If it is a different type
@@ -923,8 +926,6 @@ layout engine may run the algorithm asynchronously with other work, and/or on a
923926
execution. When {{Fragment}}(s) have been produced by the engine, the user-agent will 'tick' the
924927
generator object with the resulting {{Fragment}}(s).
925928

926-
Issue: Write algorithm "<dfn>generate a fragment</dfn>" which encapsulates this.
927-
928929
<div class="example">
929930
An example layout engine written in javascript is shown below.
930931

@@ -990,6 +991,11 @@ dictionary FragmentResultOptions {
990991
};
991992
</pre>
992993

994+
Issue: Specify how we do min/max content contributions.
995+
996+
Issue: Need to specify that the {{LayoutChild}} objects should remain the same between layouts so
997+
the author can store information? Not sure.
998+
993999
When the user agent wants to <dfn>generate a layout API fragment</dfn> of a <a>layout API formatting
9941000
context</a> for a given |box|, |constraintSpace|, |children| and an optional |breakToken| it
9951001
<em>must</em> run the following steps:
@@ -1026,6 +1032,8 @@ context</a> for a given |box|, |constraintSpace|, |children| and an optional |br
10261032
If |definition| does not exist, let the fragment output be an <a>invalid fragment</a> and
10271033
abort all these steps.
10281034

1035+
Issue: Define what an "invalid fragment" is.
1036+
10291037
6. Let |layoutInstance| be the result of looking up the <a>layout instance</a> on the |box|. If
10301038
|layoutInstance| is null run the following substeps.
10311039

0 commit comments

Comments
 (0)