Skip to content

Commit 3117aa2

Browse files
committed
rename BlockContainerOfBlockContainers to *OfBlocks
CSS standards refer to block containers as blocks sometimes, so this is ok (§9.2.1)
1 parent 0ffe0dc commit 3117aa2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/layout-flow.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export class BlockFormattingContext {
292292
const level = sizeStack.length - 1;
293293
const sBlockSize = box.style.getBlockSize(box);
294294

295-
if (sBlockSize === 'auto' && box.isBlockContainerOfBlockContainers() && !box.isBfcRoot()) {
295+
if (sBlockSize === 'auto' && box.isBlockContainerOfBlocks() && !box.isBfcRoot()) {
296296
box.setBlockSize(childSize);
297297
}
298298

@@ -729,7 +729,7 @@ export interface BlockContainerOfInlines extends BlockContainer {
729729

730730
export type BlockLevel = BlockContainer | ReplacedBox;
731731

732-
export interface BlockContainerOfBlockContainers extends BlockContainer {
732+
export interface BlockContainerOfBlocks extends BlockContainer {
733733
children: BlockLevel[];
734734
}
735735

@@ -764,7 +764,7 @@ export class BlockContainer extends FormattingBox {
764764

765765
if (isize === 'auto') {
766766
isize = 0;
767-
if (this.isBlockContainerOfBlockContainers()) {
767+
if (this.isBlockContainerOfBlocks()) {
768768
for (const child of this.children) {
769769
isize = Math.max(isize, child.contribution(mode));
770770
}
@@ -827,7 +827,7 @@ export class BlockContainer extends FormattingBox {
827827
if (linebox) return offset + linebox.blockOffset + linebox.ascender;
828828
}
829829

830-
if (block.isBlockContainerOfBlockContainers()) {
830+
if (block.isBlockContainerOfBlocks()) {
831831
const parentOffset = offset;
832832

833833
for (const child of block.children) {
@@ -877,7 +877,7 @@ export class BlockContainer extends FormattingBox {
877877
}
878878
}
879879

880-
isBlockContainerOfBlockContainers(): this is BlockContainerOfBlockContainers {
880+
isBlockContainerOfBlocks(): this is BlockContainerOfBlocks {
881881
return !this.isBlockContainerOfInlines();
882882
}
883883

@@ -1010,7 +1010,7 @@ function layoutBlockBoxInner(box: BlockContainer, ctx: LayoutContext) {
10101010
} else {
10111011
box.doTextLayout(cctx);
10121012
}
1013-
} else if (box.isBlockContainerOfBlockContainers()) {
1013+
} else if (box.isBlockContainerOfBlocks()) {
10141014
for (const child of box.children) layoutBlockLevelBox(child, cctx);
10151015
} else {
10161016
throw new Error(`Unknown box type: ${box.id}`);

0 commit comments

Comments
 (0)