Skip to content

Commit b8aadd0

Browse files
committed
[css-layout-api] Remove overflow for now.
1 parent cd9e5fb commit b8aadd0

File tree

1 file changed

+6
-51
lines changed

1 file changed

+6
-51
lines changed

css-layout-api/Overview.bs

+6-51
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,6 @@ interface Fragment {
258258
readonly attribute double inlineSize;
259259
readonly attribute double blockSize;
260260

261-
readonly attribute double inlineOverflowSize;
262-
readonly attribute double blockOverflowSize;
263-
264261
attribute double inlineOffset;
265262
attribute double blockOffset;
266263

@@ -279,10 +276,6 @@ requires a different {{Fragment/inlineSize}} or {{Fragment/blockSize}} the autho
279276
{{LayoutChild/layoutNextFragment()}} again with different arguments in order to get different
280277
results.
281278

282-
The {{Fragment}} has {{Fragment/inlineOverflowSize}} and {{Fragment/blockOverflowSize}} attributes.
283-
This is the size of the overflow area of the fragment. If the fragment didn't overflow these
284-
attributes will be the same as {{Fragment/inlineSize}} and {{Fragment/blockSize}} respectively.
285-
286279
The author inside the current layout can position a resulting {{Fragment}} by setting its
287280
{{Fragment/inlineOffset}} and {{Fragment/blockOffset}} attributes. If not set by the author they
288281
default to zero.
@@ -335,16 +328,13 @@ registerLayout('block-like', class extends Layout {
335328
blockOffset += fragment.blockSize;
336329
}
337330

338-
const inlineOverflowSize = maxChildInlineSize + bordersAndPadding.inlineEnd;
339-
const blockOverflowSize = blockOffset + bordersAndPadding.blockEnd;
331+
const contentSize = blockOffset + bordersAndPadding.blockEnd;
340332
const blockSize = resolveBlockSize(
341-
constraintSpace, styleMap, blockOverflowSize);
333+
constraintSpace, styleMap, contentSize);
342334

343335
return {
344336
inlineSize: inlineSize,
345337
blockSize: blockSize,
346-
inlineOverflowSize: inlineOverflowSize,
347-
blockOverflowSize: blockOverflowSize,
348338
childFragments: childFragments,
349339
};
350340
}
@@ -381,9 +371,6 @@ interface ConstraintSpace {
381371
readonly attribute double percentageInlineSize;
382372
readonly attribute double percentageBlockSize;
383373

384-
readonly attribute boolean inlineOverflow;
385-
readonly attribute boolean blockOverflow;
386-
387374
readonly attribute BlockFragmentationType blockFragmentationType;
388375
};
389376

@@ -481,8 +468,6 @@ registerLayout('flex-distribution-like', class {
481468
return {
482469
inlineSize: inlineSize,
483470
blockSize: blockSize,
484-
inlineOverflowSize: Math.max(inlineSize, totalSize),
485-
blockOverflowSize: maxChildBlockSize,
486471
childFragments: childFragments,
487472
};
488473
}
@@ -573,7 +558,6 @@ registerLayout('basic-inline', class extends Layout {
573558
scrollbarSize.block;
574559

575560
const childFragments = [];
576-
let maxInlineSize = 0;
577561

578562
let currentLine = [];
579563
let usedInlineSize = 0;
@@ -584,10 +568,6 @@ registerLayout('basic-inline', class extends Layout {
584568

585569
// Just a small little function which will update the above variables.
586570
const nextLine = function() {
587-
if (usedInlineSize > maxInlineSize) {
588-
maxInlineSize = usedInlineSize;
589-
}
590-
591571
currentLine = [];
592572
usedInlineSize = 0;
593573
maxBaseline = 0;
@@ -668,19 +648,17 @@ registerLayout('basic-inline', class extends Layout {
668648

669649
// Determine our block size.
670650
nextLine();
671-
const blockOverflowSize = lineOffset +
651+
const contentSize = lineOffset +
672652
bordersAndPadding.blockStart +
673653
bordersAndPadding.blockEnd;
674654
const blockSize = resolveBlockSize(constraintSpace,
675655
styleMap,
676-
blockOverflowSize);
656+
contentSize);
677657

678658
// Return our fragment.
679659
const result = {
680660
inlineSize: inlineSize,
681661
blockSize: blockSize,
682-
inlineOverflowSize: maxInlineSize,
683-
blockOverflowSize: blockOverflowSize,
684662
childFragments: childFragments,
685663
}
686664

@@ -866,6 +844,7 @@ map is empty; it is populated when {{registerLayout(name, layoutCtor)}} is calle
866844
The {{LayoutWorkletGlobalScope}} has a <a>map</a> of <dfn>layout class instances</dfn>. Initially
867845
this map is empty; it is populated when {{registerLayout(name, layoutCtor)}} is called.
868846

847+
<div algorithm>
869848
When the <dfn method for=LayoutWorkletGlobalScope>registerLayout(|name|, |layoutCtor|)</dfn> method
870849
is called, the user agent <em>must</em> run the following steps:
871850
1. If the |name| is an empty string, <a>throw</a> a <a>TypeError</a> and abort all these steps.
@@ -991,6 +970,7 @@ is called, the user agent <em>must</em> run the following steps:
991970
}
992971
</pre>
993972
</div>
973+
</div>
994974

995975
Layout Engine {#layout-engine}
996976
------------------------------
@@ -1076,8 +1056,6 @@ Performing Layout {#performing-layout}
10761056
dictionary FragmentResultOptions {
10771057
double inlineSize = 0;
10781058
double blockSize = 0;
1079-
double inlineOverflowSize = null;
1080-
double blockOverflowSize = null;
10811059
sequence&lt;Fragment> childFragments = [];
10821060
BreakTokenOptions breakToken = null;
10831061
double alignmentBaseline = null;
@@ -1201,29 +1179,6 @@ context</a> for a given |box|, |constraintSpace|, |children| and an optional |br
12011179

12021180
- The <a>block size</a> is set to |fragmentResult|'s {{FragmentResultOptions/blockSize}}.
12031181

1204-
- The <b>inline overflow size</b> is set to |fragmentResult|'s
1205-
{{FragmentResultOptions/inlineOverflowSize}} if not null, otherwise it is set to
1206-
{{FragmentResultOptions/inlineSize}}.
1207-
1208-
Issue: REMOVE THIS.
1209-
1210-
- The <b>block overflow size</b> is set to |fragmentResult|'s
1211-
{{FragmentResultOptions/blockOverflowSize}} if not null, otherwise it is set to
1212-
{{FragmentResultOptions/blockSize}}.
1213-
1214-
If the |constraintSpace|'s {{ConstraintSpace/inlineOverflow}} is <code>false</code> and
1215-
the <b>inline overflow size</b> is greater than the <a>inline size</a> and the <a>computed
1216-
value</a> for <a>inline</a> 'overflow' is ''overflow/auto'' then set |constraintSpace|'s
1217-
{{ConstraintSpace/inlineOverflow}} to <code>true</code>.
1218-
1219-
If the |constraintSpace|'s {{ConstraintSpace/blockOverflow}} is <code>false</code> and the
1220-
<b>block overflow size</b> is greater than the <a>block size</a> and the <a>computed
1221-
value</a> for <a>block</a> 'overflow' is ''overflow/auto'' then set |constraintSpace|'s
1222-
{{ConstraintSpace/blockOverflow}} to <code>true</code>.
1223-
1224-
If either {{ConstraintSpace/inlineOverflow}} or {{ConstraintSpace/blockOverflow}} were set
1225-
in the above steps, restart this algorithm with the updated |constraintSpace|.
1226-
12271182
Note: In a future level of the specification there may be a way to more efficiently abort
12281183
a layout given a "scroll trigger line" on the constraint space.
12291184

0 commit comments

Comments
 (0)