#include "third_party/blink/renderer/core/layout/grid/grid_placement.h"
#include "third_party/blink/renderer/core/layout/grid/grid_line_resolver.h"
namespace blink {
namespace {
enum class AutoPlacementType { … };
AutoPlacementType AutoPlacement(const GridArea& position,
GridTrackSizingDirection major_direction) { … }
}
GridPlacement::GridPlacement(const ComputedStyle& grid_style,
const GridLineResolver& line_resolver)
: … { … }
GridPlacementData GridPlacement::RunAutoPlacementAlgorithm(
const GridItems& grid_items) { … }
bool GridPlacement::PlaceNonAutoGridItems(
const GridItems& grid_items,
PlacedGridItemsList* placed_items,
PositionVector* positions_locked_to_major_axis,
PositionVector* positions_not_locked_to_major_axis) { … }
void GridPlacement::PlaceGridItemsLockedToMajorAxis(
const PositionVector& positions_locked_to_major_axis,
PlacedGridItemsList* placed_items) { … }
void GridPlacement::PlaceAutoMajorAxisGridItem(
GridArea* position,
PlacedGridItemsList* placed_items,
AutoPlacementCursor* placement_cursor) const { … }
void GridPlacement::PlaceAutoBothAxisGridItem(
GridArea* position,
PlacedGridItemsList* placed_items,
AutoPlacementCursor* placement_cursor) const { … }
void GridPlacement::PlaceGridItemAtCursor(
const GridArea& position,
PlacedGridItemsList* placed_items,
AutoPlacementCursor* placement_cursor) const { … }
void GridPlacement::ClampGridItemsToFitSubgridArea(
GridTrackSizingDirection track_direction) { … }
void GridPlacement::ClampMinorMaxToSubgridArea() { … }
bool GridPlacement::HasSparsePacking() const { … }
wtf_size_t GridPlacement::IntrinsicEndLine(
GridTrackSizingDirection track_direction) const { … }
bool GridPlacement::GridPosition::operator<=(const GridPosition& other) const { … }
bool GridPlacement::GridPosition::operator<(const GridPosition& other) const { … }
GridPlacement::PlacedGridItem::PlacedGridItem(
const GridArea& position,
GridTrackSizingDirection major_direction,
GridTrackSizingDirection minor_direction)
: … { … }
GridPlacement::GridPosition
GridPlacement::PlacedGridItem::EndOnPreviousMajorLine() const { … }
void GridPlacement::AutoPlacementCursor::MoveCursorToFitGridSpan(
const wtf_size_t major_span_size,
const wtf_size_t minor_span_size,
const wtf_size_t minor_max_end_line,
const CursorMovementBehavior movement_behavior) { … }
void GridPlacement::AutoPlacementCursor::UpdateItemsOverlappingMajorLine() { … }
void GridPlacement::AutoPlacementCursor::MoveToMajorLine(
const wtf_size_t major_line) { … }
void GridPlacement::AutoPlacementCursor::MoveToMinorLine(
const wtf_size_t minor_line) { … }
void GridPlacement::AutoPlacementCursor::MoveToNextMajorLine(
bool allow_minor_line_movement) { … }
void GridPlacement::AutoPlacementCursor::InsertPlacedItemAtCurrentPosition(
const PlacedGridItem* new_placed_item) { … }
void GridPlacement::PlacedGridItemsList::AppendCurrentItemsToOrderedList() { … }
void GridPlacement::ResolveOutOfFlowItemGridLines(
const GridLayoutTrackCollection& track_collection,
const GridLineResolver& line_resolver,
const ComputedStyle& grid_style,
const ComputedStyle& item_style,
wtf_size_t start_offset,
wtf_size_t* start_line,
wtf_size_t* end_line) { … }
}