Skip to content

Commit c9c5e92

Browse files
committed
[css-layout-api] Remove baselines for now.
1 parent 7ad9508 commit c9c5e92

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

css-layout-api/Overview.bs

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ interface Fragment {
246246
attribute double inlineOffset;
247247
attribute double blockOffset;
248248

249-
readonly attribute ChildBreakToken? breakToken;
249+
readonly attribute any data;
250250

251-
readonly attribute double alignmentBaseline;
251+
readonly attribute ChildBreakToken? breakToken;
252252
};
253253
</pre>
254254

@@ -326,9 +326,6 @@ be changed.
326326
If the <a>current layout</a> requires a different {{Fragment/breakToken}} the author must perform
327327
{{LayoutChild/layoutNextFragment()}} again with different arguments.
328328

329-
The {{Fragment}}'s {{Fragment/alignmentBaseline}} attribute specify where the alignment baseline is
330-
positioned relative to the block start of the fragment. It cannot be changed.
331-
332329
Note: In a future level of the specification there may be a way to query for additional baseline
333330
information, for example where the alphabetic or center baseline is positioned.
334331

@@ -348,6 +345,8 @@ interface ConstraintSpace {
348345
readonly attribute double percentageBlockSize;
349346

350347
readonly attribute BlockFragmentationType blockFragmentationType;
348+
349+
readonly attribute any data;
351350
};
352351

353352
dictionary ConstraintSpaceOptions {
@@ -362,7 +361,7 @@ dictionary ConstraintSpaceOptions {
362361

363362
BlockFragmentationType blockFragmentationType = "none";
364363

365-
boolean alignmentBaseline = false;
364+
any data = null;
366365
};
367366

368367
enum BlockFragmentationType { "none", "page", "column", "region" };
@@ -495,8 +494,7 @@ This tells the <a>child layout</a> to produce a {{Fragment}} starting at the poi
495494
Issue: Explain resuming the author defined layout.
496495

497496
<div class="example">
498-
This example shows a simple inline layout which places child fragments in the inline direction. It
499-
places each of its on a line, aligning their baselines.
497+
This example shows a simple inline layout which places child fragments in the inline direction.
500498

501499
This example also demonstrates using the previous {{Fragment/breakToken}} of a {{Fragment}} to
502500
produce the next fragment for the {{LayoutChild}}.
@@ -523,7 +521,6 @@ registerLayout('basic-inline', class extends Layout {
523521

524522
let currentLine = [];
525523
let usedInlineSize = 0;
526-
let maxBaseline = 0;
527524

528525
let lineOffset = 0;
529526
let maxLineBlockSize = 0;
@@ -532,7 +529,6 @@ registerLayout('basic-inline', class extends Layout {
532529
const nextLine = function() {
533530
currentLine = [];
534531
usedInlineSize = 0;
535-
maxBaseline = 0;
536532

537533
lineOffset += maxLineBlockSize;
538534
maxLineBlockSize = 0;
@@ -581,15 +577,10 @@ registerLayout('basic-inline', class extends Layout {
581577
currentLine.push(fragment);
582578
fragment.inlineOffset = usedInlineSize;
583579

584-
if (fragment.alignmentBaseline > maxBaseline) {
585-
maxBaseline = fragment.alignmentBaseline;
586-
}
587-
588580
// Go through each of the fragments on the line and update their
589581
// block offsets.
590582
for (let fragmentOnLine of currentLine) {
591-
fragmentOnLine.blockOffset = lineOffset +
592-
maxBaseline - fragmentOnLine.alignmentBaseline;
583+
fragmentOnLine.blockOffset = lineOffset;
593584

594585
const lineBlockSize =
595586
fragmentOnLine.blockOffset + fragmentOnLine.blockSize;
@@ -1116,7 +1107,6 @@ dictionary FragmentResultOptions {
11161107
double blockSize = 0;
11171108
sequence&lt;Fragment> childFragments = [];
11181109
BreakTokenOptions breakToken = null;
1119-
double alignmentBaseline = null;
11201110
};
11211111

11221112
dictionary IntrinsicSizesResultOptions {
@@ -1382,8 +1372,6 @@ following steps:
13821372
{{FragmentResultOptions/breakToken}}.
13831373

13841374
TODO: storage of the break token.
1385-
1386-
- TODO: baselines.
13871375
</div>
13881376

13891377
### Utility Algorithms ### {#utility-algorithms}
@@ -1514,11 +1502,6 @@ When the user agent wants to <dfn>run a generator</dfn> given |generator|, and |
15141502
- {{Fragment/breakToken}} being a new {{ChildBreakToken}} representing
15151503
|layoutChild|'s internal break token.
15161504

1517-
- {{Fragment/alignmentBaseline}} being |internalFragment|'s <a>alignment
1518-
baseline</a> if |childConstraintSpace| had
1519-
{{ConstraintSpaceOptions/alignmentBaseline}} set to <b>true</b>, otherwise
1520-
just null.
1521-
15221505
4. If |result| is null (that is neither of the above branches was taken), return
15231506
failure, and abort all these steps.
15241507

0 commit comments

Comments
 (0)