#include "third_party/blink/renderer/core/layout/grid/grid_line_resolver.h"
#include <algorithm>
#include "third_party/blink/renderer/core/layout/grid/grid_data.h"
#include "third_party/blink/renderer/core/layout/grid/grid_named_line_collection.h"
#include "third_party/blink/renderer/core/style/computed_grid_template_areas.h"
#include "third_party/blink/renderer/core/style/computed_grid_track_list.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/style/grid_area.h"
#include "third_party/blink/renderer/core/style/grid_position.h"
namespace blink {
static inline GridTrackSizingDirection DirectionFromSide(
GridPositionSide side) { … }
static inline String ImplicitNamedGridLineForSide(const String& line_name,
GridPositionSide side) { … }
GridLineResolver::GridLineResolver(const ComputedStyle& grid_style,
const GridLineResolver& parent_line_resolver,
GridArea subgrid_area,
wtf_size_t column_auto_repetitions,
wtf_size_t row_auto_repetitions)
: … { … }
bool GridLineResolver::operator==(const GridLineResolver& other) const { … }
void GridLineResolver::InitialAndFinalPositionsFromStyle(
const ComputedStyle& grid_item_style,
GridTrackSizingDirection track_direction,
GridPosition& initial_position,
GridPosition& final_position) const { … }
wtf_size_t GridLineResolver::LookAheadForNamedGridLine(
int start,
wtf_size_t number_of_lines,
wtf_size_t grid_last_line,
GridNamedLineCollection& lines_collection) const { … }
int GridLineResolver::LookBackForNamedGridLine(
int end,
wtf_size_t number_of_lines,
int grid_last_line,
GridNamedLineCollection& lines_collection) const { … }
GridSpan GridLineResolver::DefiniteGridSpanWithNamedSpanAgainstOpposite(
int opposite_line,
const GridPosition& position,
GridPositionSide side,
int last_line,
GridNamedLineCollection& lines_collection) const { … }
bool GridLineResolver::IsSubgridded(
GridTrackSizingDirection track_direction) const { … }
wtf_size_t GridLineResolver::ExplicitGridColumnCount() const { … }
wtf_size_t GridLineResolver::ExplicitGridRowCount() const { … }
wtf_size_t GridLineResolver::ExplicitGridTrackCount(
GridTrackSizingDirection track_direction) const { … }
wtf_size_t GridLineResolver::AutoRepetitions(
GridTrackSizingDirection track_direction) const { … }
wtf_size_t GridLineResolver::AutoRepeatTrackCount(
GridTrackSizingDirection track_direction) const { … }
wtf_size_t GridLineResolver::SubgridSpanSize(
GridTrackSizingDirection track_direction) const { … }
bool GridLineResolver::HasStandaloneAxis(
GridTrackSizingDirection track_direction) const { … }
wtf_size_t GridLineResolver::ExplicitGridSizeForSide(
GridPositionSide side) const { … }
GridSpan GridLineResolver::ResolveNamedGridLinePositionAgainstOppositePosition(
int opposite_line,
const GridPosition& position,
GridPositionSide side) const { … }
static GridSpan DefiniteGridSpanWithSpanAgainstOpposite(
int opposite_line,
const GridPosition& position,
GridPositionSide side) { … }
const NamedGridLinesMap& GridLineResolver::ImplicitNamedLinesMap(
GridTrackSizingDirection track_direction) const { … }
const NamedGridLinesMap& GridLineResolver::ExplicitNamedLinesMap(
GridTrackSizingDirection track_direction) const { … }
const NamedGridAreaMap* GridLineResolver::NamedAreasMap() const { … }
const NamedGridLinesMap& GridLineResolver::AutoRepeatLineNamesMap(
GridTrackSizingDirection track_direction) const { … }
const blink::ComputedGridTrackList& GridLineResolver::ComputedGridTrackList(
GridTrackSizingDirection track_direction) const { … }
GridSpan GridLineResolver::ResolveGridPositionAgainstOppositePosition(
int opposite_line,
const GridPosition& position,
GridPositionSide side) const { … }
wtf_size_t GridLineResolver::SpanSizeFromPositions(
const GridPosition& initial_position,
const GridPosition& final_position) const { … }
wtf_size_t GridLineResolver::SpanSizeForAutoPlacedItem(
const ComputedStyle& grid_item_style,
GridTrackSizingDirection track_direction) const { … }
int GridLineResolver::ResolveNamedGridLinePosition(
const GridPosition& position,
GridPositionSide side) const { … }
int GridLineResolver::ResolveGridPosition(const GridPosition& position,
GridPositionSide side) const { … }
GridSpan GridLineResolver::ResolveGridPositionsFromStyle(
const ComputedStyle& grid_item_style,
GridTrackSizingDirection track_direction) const { … }
}