chromium/third_party/blink/renderer/core/layout/floats_utils.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/layout/floats_utils.h"

#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/layout/block_break_token.h"
#include "third_party/blink/renderer/core/layout/constraint_space.h"
#include "third_party/blink/renderer/core/layout/constraint_space_builder.h"
#include "third_party/blink/renderer/core/layout/fragment_builder.h"
#include "third_party/blink/renderer/core/layout/fragmentation_utils.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/layout/layout_result.h"
#include "third_party/blink/renderer/core/layout/length_utils.h"
#include "third_party/blink/renderer/core/layout/logical_fragment.h"
#include "third_party/blink/renderer/core/layout/min_max_sizes.h"
#include "third_party/blink/renderer/core/layout/physical_fragment.h"
#include "third_party/blink/renderer/core/layout/positioned_float.h"
#include "third_party/blink/renderer/core/layout/space_utils.h"
#include "third_party/blink/renderer/core/layout/unpositioned_float.h"
#include "third_party/blink/renderer/core/style/computed_style.h"

namespace blink {
namespace {

// Adjusts the provided offset to the top edge alignment rule.
// Top edge alignment rule: the outer top of a floating box may not be higher
// than the outer top of any block or floated box generated by an element
// earlier in the source document.
BfcOffset AdjustToTopEdgeAlignmentRule(const ExclusionSpace& exclusion_space,
                                       const BfcOffset& offset) {}

LayoutOpportunity FindLayoutOpportunityForFloat(
    const UnpositionedFloat& unpositioned_float,
    const ExclusionSpace& exclusion_space,
    const BoxStrut& fragment_margins,
    LayoutUnit inline_size) {}

// Creates a constraint space for an unpositioned float. origin_block_offset
// should only be set when we want to fragmentation to occur.
ConstraintSpace CreateConstraintSpaceForFloat(
    const UnpositionedFloat& unpositioned_float,
    std::optional<LayoutUnit> origin_block_offset = std::nullopt,
    std::optional<BoxStrut> margins = std::nullopt) {}

ExclusionShapeData* CreateExclusionShapeData(
    const BoxStrut& margins,
    const UnpositionedFloat& unpositioned_float) {}

// Creates an exclusion from the fragment that will be placed in the provided
// layout opportunity.
const ExclusionArea* CreateExclusionArea(
    const LogicalFragment& fragment,
    const BfcOffset& float_margin_bfc_offset,
    const BoxStrut& margins,
    const UnpositionedFloat& unpositioned_float,
    EFloat type) {}

// Performs layout on a float, without fragmentation, and stores the result on
// the UnpositionedFloat data-structure.
void LayoutFloatWithoutFragmentation(UnpositionedFloat* unpositioned_float) {}

}  // namespace

LayoutUnit ComputeMarginBoxInlineSizeForUnpositionedFloat(
    UnpositionedFloat* unpositioned_float) {}

PositionedFloat PositionFloat(UnpositionedFloat* unpositioned_float,
                              ExclusionSpace* exclusion_space) {}

}  // namespace blink