chromium/third_party/blink/renderer/core/layout/flex/flexible_box_algorithm.cc

/*
 * Copyright (C) 2011 Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "third_party/blink/renderer/core/layout/flex/flexible_box_algorithm.h"

#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/layout/flex/ng_flex_line.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/layout/logical_box_fragment.h"
#include "third_party/blink/renderer/core/layout/min_max_sizes.h"
#include "third_party/blink/renderer/platform/text/writing_mode.h"

namespace blink {
namespace {

ItemPosition BoxAlignmentToItemPosition(EBoxAlignment alignment) {}

ContentPosition BoxPackToContentPosition(EBoxPack box_pack) {}

ContentDistributionType BoxPackToContentDistribution(EBoxPack box_pack) {}

}  // namespace

FlexItem::FlexItem(const FlexibleBoxAlgorithm* algorithm,
                   const ComputedStyle& style,
                   LayoutUnit flex_base_content_size,
                   MinMaxSizes min_max_main_sizes,
                   LayoutUnit main_axis_border_padding,
                   PhysicalBoxStrut physical_margins,
                   BoxStrut scrollbars,
                   WritingMode baseline_writing_mode,
                   BaselineGroup baseline_group,
                   bool is_initial_block_size_indefinite,
                   bool is_used_flex_basis_indefinite,
                   bool depends_on_min_max_sizes)
    :{}

bool FlexItem::MainAxisIsInlineAxis() const {}

LayoutUnit FlexItem::FlowAwareMarginStart() const {}

LayoutUnit FlexItem::FlowAwareMarginEnd() const {}

LayoutUnit FlexItem::FlowAwareMarginBefore() const {}

LayoutUnit FlexItem::FlowAwareMarginAfter() const {}

LayoutUnit FlexItem::MarginBlockEnd() const {}

LayoutUnit FlexItem::MainAxisMarginExtent() const {}

LayoutUnit FlexItem::CrossAxisMarginExtent() const {}

LayoutUnit FlexItem::MarginBoxAscent(bool is_last_baseline,
                                     bool is_wrap_reverse) const {}

ItemPosition FlexItem::Alignment() const {}

void FlexItem::UpdateAutoMarginsInMainAxis(LayoutUnit auto_margin_offset) {}

bool FlexItem::UpdateAutoMarginsInCrossAxis(
    LayoutUnit available_alignment_space) {}

LayoutUnit FlexItem::CrossAxisOffset(const NGFlexLine& line,
                                     LayoutUnit cross_axis_size) {}

void FlexItem::Trace(Visitor* visitor) const {}

// static
LayoutUnit FlexItem::AlignmentOffset(LayoutUnit available_free_space,
                                     ItemPosition position,
                                     LayoutUnit baseline_offset,
                                     bool is_wrap_reverse,
                                     bool is_deprecated_webkit_box) {}

void FlexLine::FreezeViolations(ViolationsVector& violations) {}

void FlexLine::FreezeInflexibleItems() {}

bool FlexLine::ResolveFlexibleLengths() {}

LayoutUnit FlexLine::ApplyMainAxisAutoMarginAdjustment() {}

void FlexLine::ComputeLineItemsPosition(LayoutUnit main_axis_start_offset,
                                        LayoutUnit main_axis_end_offset,
                                        LayoutUnit& cross_axis_offset) {}

// static
LayoutUnit FlexibleBoxAlgorithm::GapBetweenItems(
    const ComputedStyle& style,
    LogicalSize percent_resolution_sizes) {}

// static
LayoutUnit FlexibleBoxAlgorithm::GapBetweenLines(
    const ComputedStyle& style,
    LogicalSize percent_resolution_sizes) {}

FlexibleBoxAlgorithm::FlexibleBoxAlgorithm(const ComputedStyle* style,
                                           LayoutUnit line_break_length,
                                           LogicalSize percent_resolution_sizes,
                                           Document* document)
    :{}

FlexLine* FlexibleBoxAlgorithm::ComputeNextFlexLine(
    LayoutUnit container_logical_width) {}

bool FlexibleBoxAlgorithm::IsHorizontalFlow() const {}

bool FlexibleBoxAlgorithm::IsColumnFlow() const {}

// static
bool FlexibleBoxAlgorithm::IsColumnFlow(const ComputedStyle& style) {}

// static
bool FlexibleBoxAlgorithm::IsHorizontalFlow(const ComputedStyle& style) {}

// static
const StyleContentAlignmentData&
FlexibleBoxAlgorithm::ContentAlignmentNormalBehavior() {}

bool FlexibleBoxAlgorithm::ShouldApplyMinSizeAutoForChild(
    const LayoutBox& child) const {}

LayoutUnit FlexibleBoxAlgorithm::IntrinsicContentBlockSize() const {}

void FlexibleBoxAlgorithm::AlignFlexLines(
    LayoutUnit cross_axis_content_extent,
    HeapVector<NGFlexLine>* flex_line_outputs) {}

void FlexibleBoxAlgorithm::FlipForWrapReverse(
    LayoutUnit cross_axis_start_edge,
    LayoutUnit cross_axis_content_size,
    HeapVector<NGFlexLine>* flex_line_outputs) {}

PhysicalDirection FlexibleBoxAlgorithm::MainAxisDirection() const {}

PhysicalDirection FlexibleBoxAlgorithm::CrossAxisDirection() const {}

// static
StyleContentAlignmentData FlexibleBoxAlgorithm::ResolvedJustifyContent(
    const ComputedStyle& style) {}

// static
StyleContentAlignmentData FlexibleBoxAlgorithm::ResolvedAlignContent(
    const ComputedStyle& style) {}

// static
ItemPosition FlexibleBoxAlgorithm::AlignmentForChild(
    const ComputedStyle& flexbox_style,
    const ComputedStyle& child_style) {}

ItemPosition FlexibleBoxAlgorithm::TranslateItemPosition(
    const ComputedStyle& flexbox_style,
    const ComputedStyle& child_style,
    ItemPosition align) {}

// static
LayoutUnit FlexibleBoxAlgorithm::InitialContentPositionOffset(
    const ComputedStyle& style,
    LayoutUnit available_free_space,
    const StyleContentAlignmentData& data,
    unsigned number_of_items,
    bool is_reversed) {}

// static
LayoutUnit FlexibleBoxAlgorithm::ContentDistributionSpaceBetweenChildren(
    LayoutUnit available_free_space,
    const StyleContentAlignmentData& data,
    unsigned number_of_items) {}

// Above, we calculated the positions of items in a column reverse container as
// if they were in a column. Now that we know the block size of the container we
// can flip the position of every item.
void FlexibleBoxAlgorithm::LayoutColumnReverse(
    LayoutUnit main_axis_content_size,
    LayoutUnit border_scrollbar_padding_before) {}

FlexItem* FlexibleBoxAlgorithm::FlexItemAtIndex(wtf_size_t line_index,
                                                wtf_size_t item_index) const {}

void FlexibleBoxAlgorithm::Trace(Visitor* visitor) const {}

}  // namespace blink