chromium/third_party/blink/renderer/core/layout/inline/inline_containing_block_utils.cc

// Copyright 2021 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/inline/inline_containing_block_utils.h"

#include "third_party/blink/renderer/core/layout/box_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/physical_box_fragment.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"

namespace blink {

namespace {

// std::pair.first points to the start linebox fragment.
// std::pair.second points to the end linebox fragment.
// TODO(layout-dev): Update this to a struct for increased readability.
LineBoxPair;

// |fragment_converter| is the converter for the current containing block
// fragment, and |containing_block_converter| is the converter of the
// containing block where all fragments are stacked. These are used to
// convert offsets to be relative to the full containing block rather
// than the current containing block fragment.
template <class Items>
void GatherInlineContainerFragmentsFromItems(
    const Items& items,
    const PhysicalOffset& box_offset,
    InlineContainingBlockUtils::InlineContainingBlockMap*
        inline_containing_block_map,
    HeapHashMap<Member<const LayoutObject>, LineBoxPair>*
        containing_linebox_map,
    const WritingModeConverter* fragment_converter = nullptr,
    const WritingModeConverter* containing_block_converter = nullptr) {}

}  // namespace

void InlineContainingBlockUtils::ComputeInlineContainerGeometry(
    InlineContainingBlockMap* inline_containing_block_map,
    BoxFragmentBuilder* container_builder) {}

void InlineContainingBlockUtils::ComputeInlineContainerGeometryForFragmentainer(
    const LayoutBox* box,
    PhysicalSize accumulated_containing_block_size,
    InlineContainingBlockMap* inline_containing_block_map) {}

}  // namespace blink