Skip to content

Commit

Permalink
vaev-layout: Correctly pick block with for each children.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Jul 29, 2024
1 parent b7038cb commit 628799c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/web/vaev-layout/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ struct BlockFlow : public Flow {
Axis mainAxis = Axis::VERTICAL;

Px res = box.borderBox.start();
auto inlineSize = computePreferredBorderSize(
ctx,
mainAxis.cross(),
box.borderBox.width
);

for (auto &c : _frags) {
auto childcontext = ctx.subContext(
Expand All @@ -39,6 +34,12 @@ struct BlockFlow : public Flow {
max(Px{0}, box.borderBox.height - res)
);

auto inlineSize = computePreferredBorderSize(
childcontext,
mainAxis.cross(),
box.borderBox.width
);

RectPx borderBox = RectPx{
box.borderBox.start(),
res,
Expand Down

0 comments on commit 628799c

Please sign in to comment.