#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_TABLE_TABLE_LAYOUT_UTILS_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_TABLE_TABLE_LAYOUT_UTILS_H_
#include <optional>
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/layout/table/table_layout_algorithm_types.h"
#include "third_party/blink/renderer/core/style/computed_style_constants.h"
namespace blink {
class BlockNode;
class BoxFragmentBuilder;
class ConstraintSpaceBuilder;
class LogicalBoxFragment;
class TableBorders;
class TableNode;
enum class BlockContentAlignment;
enum class LayoutResultCacheSlot;
struct TableColumnLocation;
struct CellBlockSizeData { … };
CellBlockSizeData ComputeCellBlockSize(
const TableTypes::CellBlockConstraint& cell_block_constraint,
const TableTypes::Rows& rows,
wtf_size_t row_index,
const LogicalSize& border_spacing,
bool is_table_block_size_specified);
void SetupTableCellConstraintSpaceBuilder(
const WritingDirectionMode table_writing_direction,
const BlockNode cell,
const BoxStrut& cell_borders,
const Vector<TableColumnLocation>& column_locations,
LayoutUnit cell_block_size,
LayoutUnit percentage_inline_size,
std::optional<LayoutUnit> alignment_baseline,
wtf_size_t start_column,
bool is_initial_block_size_indefinite,
bool is_restricted_block_size_table,
bool has_collapsed_borders,
LayoutResultCacheSlot,
ConstraintSpaceBuilder*);
wtf_size_t ComputeMaximumNonMergeableColumnCount(
const HeapVector<BlockNode>& columns,
bool is_fixed_layout);
scoped_refptr<TableTypes::Columns> ComputeColumnConstraints(
const BlockNode& table,
const TableGroupedChildren&,
const TableBorders& table_borders,
const BoxStrut& border_padding);
void ComputeSectionMinimumRowBlockSizes(
const BlockNode& section,
const LayoutUnit cell_percentage_resolution_inline_size,
const bool is_table_block_size_specified,
const Vector<TableColumnLocation>& column_locations,
const TableBorders& table_borders,
const LayoutUnit block_border_spacing,
wtf_size_t section_index,
bool treat_section_as_tbody,
TableTypes::Sections* sections,
TableTypes::Rows* rows,
TableTypes::CellBlockConstraints* cell_block_constraints);
void FinalizeTableCellLayout(LayoutUnit unconstrained_intrinsic_block_size,
BoxFragmentBuilder*);
class ColspanCellTabulator { … };
class RowBaselineTabulator { … };
constexpr wtf_size_t ComputeMaxColumn(wtf_size_t current_column,
wtf_size_t colspan,
bool is_fixed_table_layout) { … }
CORE_EXPORT MinMaxSizes
ComputeGridInlineMinMax(const TableNode& node,
const TableTypes::Columns& column_constraints,
LayoutUnit undistributable_space,
bool is_fixed_layout,
bool is_layout_pass);
CORE_EXPORT void DistributeColspanCellsToColumns(
const TableTypes::ColspanCells& colspan_cells,
LayoutUnit inline_border_spacing,
bool is_fixed_layout,
TableTypes::Columns* column_constraints);
CORE_EXPORT Vector<LayoutUnit> SynchronizeAssignableTableInlineSizeAndColumns(
LayoutUnit assignable_table_inline_size,
bool is_fixed_layout,
const TableTypes::Columns& column_constraints);
CORE_EXPORT void DistributeRowspanCellToRows(
const TableTypes::RowspanCell& rowspan_cell,
LayoutUnit border_block_spacing,
TableTypes::Rows* rows);
CORE_EXPORT void DistributeSectionFixedBlockSizeToRows(
const wtf_size_t start_row,
const wtf_size_t end_row,
LayoutUnit section_fixed_block_size,
LayoutUnit border_block_spacing,
LayoutUnit percentage_resolution_block_size,
TableTypes::Rows* rows);
CORE_EXPORT void DistributeTableBlockSizeToSections(
LayoutUnit border_block_spacing,
LayoutUnit table_block_size,
TableTypes::Sections* sections,
TableTypes::Rows* rows);
}
WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(…)
#endif