@@ -495,8 +495,8 @@ export struct TableFormatingContext : FormatingContext {
495495
496496 usize end = start;
497497 while (grid.at (end, i).anchorIdx != grid.at (end, i + 1 ).anchorIdx ) {
498- auto endOfI = grid.at (end, i).anchorIdx .x + grid.at (end, i).box ->attrs . colSpan - 1 ;
499- auto endOfNextI = grid.at (end, i + 1 ).anchorIdx .x + grid.at (end, i + 1 ).box ->attrs . colSpan - 1 ;
498+ auto endOfI = grid.at (end, i).anchorIdx .x + grid.at (end, i).box ->style -> table -> colSpan - 1 ;
499+ auto endOfNextI = grid.at (end, i + 1 ).anchorIdx .x + grid.at (end, i + 1 ).box ->style -> table -> colSpan - 1 ;
500500
501501 if (endOfI == endOfNextI)
502502 break ;
@@ -505,10 +505,10 @@ export struct TableFormatingContext : FormatingContext {
505505 }
506506
507507 Vec<UsedBorder> borders;
508- for (usize j = start; j <= end; j += grid.at (j, i).box ->attrs . colSpan ) {
508+ for (usize j = start; j <= end; j += grid.at (j, i).box ->style -> table -> colSpan ) {
509509 borders.pushBack (resolve (tree, *grid.at (j, i).box , BorderEdge::BOTTOM));
510510 }
511- for (usize j = start; j <= end; j += grid.at (j, i + 1 ).box ->attrs . colSpan ) {
511+ for (usize j = start; j <= end; j += grid.at (j, i + 1 ).box ->style -> table -> colSpan ) {
512512 borders.pushBack (resolve (tree, *grid.at (j, i + 1 ).box , BorderEdge::TOP));
513513 }
514514
@@ -518,11 +518,11 @@ export struct TableFormatingContext : FormatingContext {
518518 auto finalBorder = harmonizeConflictingBorders (borders);
519519
520520 for (usize j = start; j <= end; j++) {
521- j += grid.at (j, i).box ->attrs . colSpan - 1 ;
521+ j += grid.at (j, i).box ->style -> table -> colSpan - 1 ;
522522 paintCellBottom (i, j, finalBorder);
523523 }
524524
525- for (usize j = start; j <= end; j += grid.at (j, i + 1 ).box ->attrs . colSpan ) {
525+ for (usize j = start; j <= end; j += grid.at (j, i + 1 ).box ->style -> table -> colSpan ) {
526526 paintCellTop (i + 1 , j, finalBorder);
527527 }
528528
@@ -545,8 +545,8 @@ export struct TableFormatingContext : FormatingContext {
545545
546546 usize end = start;
547547 while (grid.at (j, end).anchorIdx != grid.at (j + 1 , end).anchorIdx ) {
548- auto endOfJ = grid.at (j, end).anchorIdx .y + grid.at (j, end).box ->attrs . rowSpan - 1 ;
549- auto endOfNextJ = grid.at (j + 1 , end).anchorIdx .y + grid.at (j + 1 , end).box ->attrs . rowSpan - 1 ;
548+ auto endOfJ = grid.at (j, end).anchorIdx .y + grid.at (j, end).box ->style -> table -> rowSpan - 1 ;
549+ auto endOfNextJ = grid.at (j + 1 , end).anchorIdx .y + grid.at (j + 1 , end).box ->style -> table -> rowSpan - 1 ;
550550
551551 if (endOfJ == endOfNextJ)
552552 break ;
@@ -556,11 +556,11 @@ export struct TableFormatingContext : FormatingContext {
556556
557557 Vec<UsedBorder> borders;
558558
559- for (usize i = start; i <= end; i += grid.at (j, i).box ->attrs . rowSpan ) {
559+ for (usize i = start; i <= end; i += grid.at (j, i).box ->style -> table -> rowSpan ) {
560560 borders.pushBack (resolve (tree, *grid.at (j, i).box , BorderEdge::END));
561561 }
562562
563- for (usize i = start; i <= end; i += grid.at (j + 1 , i).box ->attrs . rowSpan ) {
563+ for (usize i = start; i <= end; i += grid.at (j + 1 , i).box ->style -> table -> rowSpan ) {
564564 borders.pushBack (resolve (tree, *grid.at (j + 1 , i).box , BorderEdge::START));
565565 }
566566
@@ -570,11 +570,11 @@ export struct TableFormatingContext : FormatingContext {
570570 auto finalBorder = harmonizeConflictingBorders (borders);
571571
572572 for (usize i = start; i <= end; i++) {
573- i += grid.at (j, i).box ->attrs . rowSpan - 1 ;
573+ i += grid.at (j, i).box ->style -> table -> rowSpan - 1 ;
574574 paintCellEnd (i, j, finalBorder);
575575 }
576576
577- for (usize i = start; i <= end; i += grid.at (j + 1 , i).box ->attrs . rowSpan ) {
577+ for (usize i = start; i <= end; i += grid.at (j + 1 , i).box ->style -> table -> rowSpan ) {
578578 paintCellStart (i, j + 1 , finalBorder);
579579 }
580580
@@ -598,7 +598,7 @@ export struct TableFormatingContext : FormatingContext {
598598
599599 auto finalBorder = harmonizeConflictingBorders (borders);
600600
601- usize colSpan = grid.at (j, i).box ->attrs . colSpan ;
601+ usize colSpan = grid.at (j, i).box ->style -> table -> colSpan ;
602602 if (edge == BorderEdge::TOP) {
603603 paintCellTop (0 , j, finalBorder);
604604 } else {
@@ -627,7 +627,7 @@ export struct TableFormatingContext : FormatingContext {
627627
628628 auto finalBorder = harmonizeConflictingBorders (borders);
629629
630- usize rowSpan = grid.at (j, i).box ->attrs . rowSpan ;
630+ usize rowSpan = grid.at (j, i).box ->style -> table -> rowSpan ;
631631 if (edge == BorderEdge::START) {
632632 paintCellStart (i, j, finalBorder);
633633 } else {
@@ -931,7 +931,7 @@ export struct TableFormatingContext : FormatingContext {
931931
932932 UsedSpacings usedSpacings{
933933 .padding = computePaddings (tree, *cell.box , {tableUsedWidth, 0_au}),
934- .borders = buildBordersWidthsForCell (i, j, cell.box ->attrs . rowSpan , colSpan)
934+ .borders = buildBordersWidthsForCell (i, j, cell.box ->style -> table -> rowSpan , colSpan)
935935 };
936936
937937 auto [cellMinWidth, cellMaxWidth] = getCellMinMaxAutoWidth (tree, *cell.box , cell, tableWidth, usedSpacings);
@@ -956,7 +956,7 @@ export struct TableFormatingContext : FormatingContext {
956956
957957 UsedSpacings usedSpacings{
958958 .padding = computePaddings (tree, *cell.box , {tableUsedWidth, 0_au}),
959- .borders = buildBordersWidthsForCell (i, j, cell.box ->attrs . rowSpan , colSpan)
959+ .borders = buildBordersWidthsForCell (i, j, cell.box ->style -> table -> rowSpan , colSpan)
960960 };
961961
962962 auto [cellMinWidth, cellMaxWidth] = getCellMinMaxAutoWidth (tree, *cell.box , cell, tableWidth, usedSpacings);
@@ -1194,7 +1194,7 @@ export struct TableFormatingContext : FormatingContext {
11941194
11951195 UsedSpacings usedSpacings{
11961196 .padding = computePaddings (tree, *cell.box , {tableUsedWidth, 0_au}),
1197- .borders = buildBordersWidthsForCell (i, j, rowSpan, cell.box ->attrs . colSpan )
1197+ .borders = buildBordersWidthsForCell (i, j, rowSpan, cell.box ->style -> table -> colSpan )
11981198 };
11991199
12001200 auto cellOutput = layoutBorderBox (
@@ -1229,7 +1229,8 @@ export struct TableFormatingContext : FormatingContext {
12291229 CacheParametersFromInput (Input const & i)
12301230 : containingBlockX(i.containingBlock.x),
12311231 capmin (i.capmin.unwrap()),
1232- knownSizeX(i.knownSize.x) {}
1232+ knownSizeX(i.knownSize.x) {
1233+ }
12331234
12341235 bool operator ==(CacheParametersFromInput const & c) const = default ;
12351236 };
@@ -1313,7 +1314,7 @@ export struct TableFormatingContext : FormatingContext {
13131314 footerSize = Vec2Au{
13141315 tableBoxSize.x ,
13151316 rowHeightPref.query (grid.size .y - numOfFooterRows, grid.size .y - 1 ) +
1316- spacing.y * Au{numOfHeaderRows + 1 },
1317+ spacing.y * Au{numOfHeaderRows + 1 },
13171318 };
13181319 }
13191320 }
@@ -1396,8 +1397,8 @@ export struct TableFormatingContext : FormatingContext {
13961397 .padding = computePaddings (tree, *cell.box , tableBoxSize),
13971398 .borders = collapsedBorders
13981399 ? collapsedBorders->map ([](auto b) {
1399- return b.width ;
1400- })
1400+ return b.width ;
1401+ })
14011402 : computeBorders (tree, *cell.box ),
14021403 };
14031404
@@ -1486,14 +1487,13 @@ export struct TableFormatingContext : FormatingContext {
14861487
14871488 bool isSelfContainedRow = true ;
14881489 for (usize j = 0 ; j < grid.size .x ; ++j) {
1489- if (grid.at (j, i).anchorIdx != Math::Vec2u{j, i} or grid.at (j, i).box ->style ->table ->rowSpan != 1 )
1490+ if (grid.at (j, i).anchorIdx != Math::Vec2u{j, i} or grid.at (j, i).box ->style ->table ->rowSpan != 1 ) {
14901491 isSelfContainedRow = false ;
14911492 break ;
14921493 }
14931494 }
14941495
1495- return not isSelfContainedRow or
1496- rowHeight[i] * 2_au > min (fragmentainerSize.x, fragmentainerSize.y);
1496+ return not isSelfContainedRow or rowHeight[i] * 2_au > min (fragmentainerSize.x , fragmentainerSize.y );
14971497 }
14981498
14991499 bool handlePossibleForcedBreakpointAfterRow (Breakpoint& currentBreakpoint, bool allBottomsAndCompletelyLaidOut, bool isLastRow, usize i) {
0 commit comments