chromium/third_party/blink/renderer/core/layout/inline/inline_box_state.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/core/layout/inline/inline_box_state.h"

#include "base/containers/adapters.h"
#include "third_party/blink/renderer/core/layout/box_fragment_builder.h"
#include "third_party/blink/renderer/core/layout/geometry/logical_offset.h"
#include "third_party/blink/renderer/core/layout/geometry/logical_size.h"
#include "third_party/blink/renderer/core/layout/inline/inline_item_result.h"
#include "third_party/blink/renderer/core/layout/inline/line_box_fragment_builder.h"
#include "third_party/blink/renderer/core/layout/inline/line_utils.h"
#include "third_party/blink/renderer/core/layout/layout_result.h"
#include "third_party/blink/renderer/core/layout/layout_text_combine.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "third_party/blink/renderer/core/layout/relative_utils.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_inline_text.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/svg/svg_length_functions.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_view.h"
#include "third_party/blink/renderer/platform/heap/collection_support/clear_collection_scope.h"

namespace blink {

namespace {

FontHeight ComputeEmphasisMarkOutsets(const ComputedStyle& style,
                                      const Font& font) {}

}  // namespace

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

InlineBoxState::InlineBoxState(const InlineBoxState&& state)
    :{}

void InlineBoxState::ResetStyle(const ComputedStyle& style_ref,
                                bool is_svg,
                                const LayoutObject& layout_object) {}

void InlineBoxState::ComputeTextMetrics(const ComputedStyle& styleref,
                                        const Font& fontref,
                                        FontBaseline ifc_baseline) {}

void InlineBoxState::AdjustEdges(const ComputedStyle& style,
                                 const Font& font,
                                 FontBaseline baseline_type,
                                 bool should_apply_over,
                                 bool should_apply_under,
                                 FontHeight& metrics) {}

void InlineBoxState::ResetTextMetrics() {}

void InlineBoxState::EnsureTextMetrics(const ComputedStyle& styleref,
                                       const Font& fontref,
                                       FontBaseline ifc_baseline) {}

void InlineBoxState::AccumulateUsedFonts(const ShapeResultView* shape_result) {}

LayoutUnit InlineBoxState::TextTop(FontBaseline baseline_type) const {}

bool InlineBoxState::CanAddTextOfStyle(const ComputedStyle& text_style) const {}

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

InlineBoxState* InlineLayoutStateStack::OnBeginPlaceItems(
    const InlineNode node,
    const ComputedStyle& line_style,
    FontBaseline baseline_type,
    bool line_height_quirk,
    LogicalLineItems* line_box) {}

InlineBoxState* InlineLayoutStateStack::OnOpenTag(
    const ConstraintSpace& space,
    const InlineItem& item,
    const InlineItemResult& item_result,
    FontBaseline baseline_type,
    LogicalLineItems* line_box) {}

InlineBoxState* InlineLayoutStateStack::OnOpenTag(
    const ConstraintSpace& space,
    const InlineItem& item,
    const InlineItemResult& item_result,
    FontBaseline baseline_type,
    const LogicalLineItems& line_box) {}

InlineBoxState* InlineLayoutStateStack::OnCloseTag(const ConstraintSpace& space,
                                                   LogicalLineItems* line_box,
                                                   InlineBoxState* box,
                                                   FontBaseline baseline_type) {}

void InlineLayoutStateStack::OnEndPlaceItems(const ConstraintSpace& space,
                                             LogicalLineItems* line_box,
                                             FontBaseline baseline_type) {}

void InlineLayoutStateStack::EndBoxState(const ConstraintSpace& space,
                                         InlineBoxState* box,
                                         LogicalLineItems* line_box,
                                         FontBaseline baseline_type) {}

void InlineLayoutStateStack::OnBlockInInline(const FontHeight& metrics,
                                             LogicalLineItems* line_box) {}

// Crete a placeholder for a box fragment.
// We keep a flat list of fragments because it is more suitable for operations
// such as ApplyBaselineShift. Later, CreateBoxFragments() creates box fragments
// from placeholders.
void InlineLayoutStateStack::AddBoxFragmentPlaceholder(
    InlineBoxState* box,
    LogicalLineItems* line_box,
    FontBaseline baseline_type) {}

// Add a |BoxData|, for each close-tag that needs a box fragment.
void InlineLayoutStateStack::AddBoxData(const ConstraintSpace& space,
                                        InlineBoxState* box,
                                        LogicalLineItems* line_box) {}

std::optional<std::pair<LayoutUnit, LayoutUnit>>
InlineLayoutStateStack::AnnotationBoxBlockAxisMargins() const {}

void InlineLayoutStateStack::ChildInserted(unsigned index) {}

void InlineLayoutStateStack::PrepareForReorder(LogicalLineItems* line_box) {}

void InlineLayoutStateStack::UpdateAfterReorder(LogicalLineItems* line_box) {}

unsigned InlineLayoutStateStack::UpdateBoxDataFragmentRange(
    LogicalLineItems* line_box,
    unsigned index,
    HeapVector<BoxData>* fragmented_boxes) {}

void InlineLayoutStateStack::UpdateFragmentedBoxDataEdges(
    HeapVector<BoxData>* fragmented_boxes) {}

void InlineLayoutStateStack::BoxData::UpdateFragmentEdges(
    HeapVector<BoxData, 4>& list) {}

LayoutUnit InlineLayoutStateStack::ComputeInlinePositions(
    LogicalLineItems* line_box,
    LayoutUnit position,
    bool ignore_box_margin_border_padding) {}

void InlineLayoutStateStack::MoveBoxDataInBlockDirection(LayoutUnit diff) {}

void InlineLayoutStateStack::MoveBoxDataInInlineDirection(LayoutUnit diff) {}

void InlineLayoutStateStack::ApplyRelativePositioning(
    const ConstraintSpace& space,
    LogicalLineItems* line_box,
    const LogicalOffset* parent_offset) {}

void InlineLayoutStateStack::CreateBoxFragments(const ConstraintSpace& space,
                                                LogicalLineItems* line_box,
                                                bool is_opaque) {}

const LayoutResult* InlineLayoutStateStack::BoxData::CreateBoxFragment(
    const ConstraintSpace& space,
    LogicalLineItems* line_box,
    bool is_opaque) {}

void InlineLayoutStateStack::BoxData::Trace(Visitor* visitor) const {}

InlineLayoutStateStack::PositionPending
InlineLayoutStateStack::ApplyBaselineShift(InlineBoxState* box,
                                           LogicalLineItems* line_box,
                                           FontBaseline baseline_type) {}

LayoutUnit InlineLayoutStateStack::ComputeAlignmentBaselineShift(
    const InlineBoxState* box) {}

FontHeight InlineLayoutStateStack::MetricsForTopAndBottomAlign(
    const InlineBoxState& box,
    const LogicalLineItems& line_box) const {}

LogicalRubyColumn& InlineLayoutStateStack::CreateRubyColumn() {}

#if DCHECK_IS_ON()
void InlineLayoutStateStack::CheckSame(
    const InlineLayoutStateStack& other) const {}

void InlineBoxState::CheckSame(const InlineBoxState& other) const {}
#endif

}  // namespace blink