@@ -43,15 +43,6 @@ urlPrefix: https://tc39.github.io/ecma262/#sec-; type: dfn;
43
43
text: TypeError
44
44
</pre>
45
45
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
-
55
46
Introduction {#intro}
56
47
=====================
57
48
@@ -78,7 +69,6 @@ Layout API Containers {#layout-api-containers}
78
69
This value causes an element to generate an inline-level <a>layout API container</a> box.
79
70
</dl>
80
71
81
-
82
72
A <dfn>layout API container</dfn> is the box generated by an element with a computed 'display' of
83
73
''layout()'' or ''inline-layout()'' .
84
74
@@ -112,12 +102,15 @@ A <a>layout API container</a> has a <dfn>layout instance</dfn>, initially this i
112
102
is an instance of the author defined layout class (see [[#registering-layout]] ). If the <a>box</a> 's
113
103
<a>computed value</a> of 'display' changes, this must be reset to null.
114
104
105
+ Issue: Having the layout instance on the box is wrong, should really be a map on the layout worklet
106
+ global scope.
107
+
115
108
Layout API Container Painting {#painting}
116
109
-----------------------------------------
117
110
118
111
<a>Layout API Container</a> children paint exactly the same as inline blocks [[!CSS21]] , except that
119
112
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'
121
114
values other than ''z-index/auto'' create a stacking context even if 'position' is ''static'' .
122
115
123
116
Layout API Model and Terminology {#layout-api-model-and-terminology}
@@ -515,7 +508,7 @@ dictionary BreakTokenOptions {
515
508
enum BreakType { "none", "inline", "inline-hyphen", "column", "page", "region" };
516
509
</pre>
517
510
518
- Issue(w3c/css-houdini-drafts#258): What type of {{BreakType}} s are needed?
511
+ Issue: Fill out other inline type break types.
519
512
520
513
A {{LayoutChild}} can produce multiple {{Fragment}} s. A {{BoxLayoutChild}} may fragment in the block
521
514
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
525
518
This tells the <a>child layout</a> to produce a {{Fragment}} starting at the point encoded in the
526
519
{{ChildBreakToken}} .
527
520
521
+ Issue: Explain resuming the author defined layout.
522
+
528
523
<div class="example">
529
524
This example shows a simple inline layout which places child fragments in the inline direction. It
530
525
places each of its on a line, aligning their dominant baselines.
@@ -717,6 +712,12 @@ partial interface LayoutWorkletGlobalScope {
717
712
LayoutSize resolveScrollbarSize(ConstraintSpace constraintSpace,
718
713
StylePropertyMapReadOnly styleMap);
719
714
};
715
+
716
+ [Exposed=LayoutWorklet]
717
+ interface Layout {
718
+ readonly attribute sequence<DOMString> inputProperties;
719
+ readonly attribute sequence<DOMString> childInputProperties;
720
+ };
720
721
</pre>
721
722
722
723
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
736
737
Each <a>box</a> has an associated <dfn>layout valid flag</dfn> . It may be either
737
738
<dfn>layout-valid</dfn> or <dfn>layout-invalid</dfn> . It is initially set to <a>layout-invalid</a> .
738
739
740
+ Issue: The above flag is too restrictive on user agents, change.
741
+
739
742
When the <a>computed style</a> for a |box| changes, the user agent must run the following steps:
740
743
1. Let |layoutFunction| be the <<layout()>> or <<inline-layout()>> function of the 'display'
741
744
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
923
926
execution. When {{Fragment}} (s) have been produced by the engine, the user-agent will 'tick' the
924
927
generator object with the resulting {{Fragment}} (s).
925
928
926
- Issue: Write algorithm "<dfn>generate a fragment</dfn> " which encapsulates this.
927
-
928
929
<div class="example">
929
930
An example layout engine written in javascript is shown below.
930
931
@@ -990,6 +991,11 @@ dictionary FragmentResultOptions {
990
991
};
991
992
</pre>
992
993
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
+
993
999
When the user agent wants to <dfn>generate a layout API fragment</dfn> of a <a>layout API formatting
994
1000
context</a> for a given |box|, |constraintSpace|, |children| and an optional |breakToken| it
995
1001
<em> must</em> run the following steps:
@@ -1026,6 +1032,8 @@ context</a> for a given |box|, |constraintSpace|, |children| and an optional |br
1026
1032
If |definition| does not exist, let the fragment output be an <a>invalid fragment</a> and
1027
1033
abort all these steps.
1028
1034
1035
+ Issue: Define what an "invalid fragment" is.
1036
+
1029
1037
6. Let |layoutInstance| be the result of looking up the <a>layout instance</a> on the |box|. If
1030
1038
|layoutInstance| is null run the following substeps.
1031
1039
0 commit comments