@@ -446,13 +446,13 @@ struct TableFormatingContext : FormatingContext {
446446 // NOTE: The table does not automatically expand to fill its containing block.
447447 // (https://www.w3.org/TR/CSS22/tables.html#width-layout)
448448
449- if (not (box.style ->sizing ->width .is <Keywords::Auto>() or box.style ->sizing ->width .is <CalcValue<PercentOr< Length> >>()))
449+ if (not (box.style ->sizing ->width .is <Keywords::Auto>() or box.style ->sizing ->width .is <Calc< Length>>()))
450450 logWarn (" width can't be anything other than 'auto' or a length in a table context" );
451451
452452 tableUsedWidth =
453- not box.style ->sizing ->width .is <CalcValue<PercentOr< Length> >>()
453+ not box.style ->sizing ->width .is <Calc< Length>>()
454454 ? 0_au // AUTO case
455- : resolve (tree, box, box.style ->sizing ->width .unwrap <CalcValue<PercentOr< Length> >>(), availableXSpace) -
455+ : resolve (tree, box, box.style ->sizing ->width .unwrap <Calc< Length>>(), availableXSpace) -
456456 boxBorder.horizontal (); // NOTE: maybe remove this after borderbox param is clearer
457457
458458 auto [columnBorders, sumBorders] = getColumnBorders ();
@@ -465,10 +465,10 @@ struct TableFormatingContext : FormatingContext {
465465
466466 auto const & width = col.el .style ->sizing ->width ;
467467
468- if (not (width.is <Keywords::Auto>() or width.is <CalcValue<PercentOr< Length> >>()))
468+ if (not (width.is <Keywords::Auto>() or width.is <Calc< Length>>()))
469469 logWarn (" width can't be anything other than 'auto' or a length in a table context" );
470470
471- if (auto widthCalc = width.is <CalcValue<PercentOr< Length> >>()) {
471+ if (auto widthCalc = width.is <Calc< Length>>()) {
472472 for (usize x = col.start ; x <= col.end ; ++x) {
473473 colWidthOrNone[x] = resolve (tree, col.el , *widthCalc, tableUsedWidth);
474474 }
@@ -482,7 +482,7 @@ struct TableFormatingContext : FormatingContext {
482482 while (x < grid.size .x ) {
483483 auto cell = grid.get (x, 0 );
484484
485- auto cellBoxWidthCalc = cell.box ->style ->sizing ->width .is <CalcValue<PercentOr< Length> >>();
485+ auto cellBoxWidthCalc = cell.box ->style ->sizing ->width .is <Calc< Length>>();
486486
487487 if (not (cell.box ->style ->sizing ->width .is <Keywords::Auto>() or cellBoxWidthCalc))
488488 logWarn (" width can't be anything other than 'auto' or a length in a table context" );
@@ -557,10 +557,10 @@ struct TableFormatingContext : FormatingContext {
557557 auto cellMinWidth = cellMinOutput.x ;
558558 auto cellMaxWidth = cellMaxOutput.x ;
559559
560- if (not (cell.box ->style ->sizing ->width .is <Keywords::Auto>() or cell.box ->style ->sizing ->width .is <CalcValue<PercentOr< Length> >>()))
560+ if (not (cell.box ->style ->sizing ->width .is <Keywords::Auto>() or cell.box ->style ->sizing ->width .is <Calc< Length>>()))
561561 logWarn (" width can't be anything other than 'auto' or a length in a table context" );
562562
563- if (auto cellBoxWidthCalc = cell.box ->style ->sizing ->width .is <CalcValue<PercentOr< Length> >>()) {
563+ if (auto cellBoxWidthCalc = cell.box ->style ->sizing ->width .is <Calc< Length>>()) {
564564 auto cellPreferredWidth = resolve (
565565 tree,
566566 box,
@@ -640,7 +640,7 @@ struct TableFormatingContext : FormatingContext {
640640 for (auto & group : colGroups) {
641641
642642 auto columnGroupWidth = group.el .style ->sizing ->width ;
643- auto columnGroupWidthCalc = columnGroupWidth.is <CalcValue<PercentOr< Length> >>();
643+ auto columnGroupWidthCalc = columnGroupWidth.is <Calc< Length>>();
644644
645645 if (not (columnGroupWidth.is <Keywords::Auto>() or columnGroupWidthCalc))
646646 logWarn (" width can't be anything other than 'auto' or a length in a table context" );
@@ -668,7 +668,7 @@ struct TableFormatingContext : FormatingContext {
668668 void computeAutoWidthOfCols (Tree& tree, Vec<Au>& minColWidth, Vec<Au>& maxColWidth, Au tableWidth) {
669669 for (auto & [start, end, el] : cols) {
670670 auto width = el.style ->sizing ->width ;
671- auto widthCalc = width.is <CalcValue<PercentOr< Length> >>();
671+ auto widthCalc = width.is <Calc< Length>>();
672672
673673 if (not (width.is <Keywords::Auto>() or widthCalc))
674674 logWarn (" width can't be anything other than 'auto' or a length in a table context" );
@@ -713,7 +713,7 @@ struct TableFormatingContext : FormatingContext {
713713 // https://www.w3.org/TR/css-tables-3/#intrinsic-percentage-width-of-a-column-based-on-cells-of-span-up-to-1
714714 // We will need a way to retrieve the percentage value, which is also not yet implemented.
715715
716- if (auto boxWidthCalc = box.style ->sizing ->width .is <CalcValue<PercentOr< Length> >>()) {
716+ if (auto boxWidthCalc = box.style ->sizing ->width .is <Calc< Length>>()) {
717717 auto [minWithoutPerc, maxWithoutPerc] = computeMinMaxAutoWidths (tree, grid.size .x , 0_au);
718718
719719 Au tableComputedWidth = resolve (tree, box, *boxWidthCalc, containingBlockX);
@@ -791,7 +791,7 @@ struct TableFormatingContext : FormatingContext {
791791
792792 for (auto & row : rows) {
793793 auto & height = row.el .style ->sizing ->height ;
794- auto heightCalc = height.is <CalcValue<PercentOr< Length> >>();
794+ auto heightCalc = height.is <Calc< Length>>();
795795
796796 if (not (height.is <Keywords::Auto>() or heightCalc))
797797 logWarn (" height can't be anything other than 'auto' or a length in a table context" );
@@ -815,11 +815,11 @@ struct TableFormatingContext : FormatingContext {
815815 // [A] CSS 2.2 does not specify how cells that span more than one row affect row height calculations except
816816 // that the sum of the row heights involved must be great enough to encompass the cell spanning the rows.
817817
818- if (not (cell.box ->style ->sizing ->height .is <Keywords::Auto>() or cell.box ->style ->sizing ->height .is <CalcValue<PercentOr< Length> >>()))
818+ if (not (cell.box ->style ->sizing ->height .is <Keywords::Auto>() or cell.box ->style ->sizing ->height .is <Calc< Length>>()))
819819 logWarn (" height can't be anything other than 'auto' or a length in a table context" );
820820
821821 auto rowSpan = cell.box ->attrs .rowSpan ;
822- if (auto cellBoxHeightCalc = cell.box ->style ->sizing ->height .is <CalcValue<PercentOr< Length> >>()) {
822+ if (auto cellBoxHeightCalc = cell.box ->style ->sizing ->height .is <Calc< Length>>()) {
823823 auto computedHeight = resolve (
824824 tree,
825825 *cell.box ,
0 commit comments