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

// Copyright 2016 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/physical_box_fragment.h"

#include "base/ranges/algorithm.h"
#include "third_party/blink/renderer/core/dom/document_lifecycle.h"
#include "third_party/blink/renderer/core/html/shadow/shadow_element_utils.h"
#include "third_party/blink/renderer/core/layout/block_node.h"
#include "third_party/blink/renderer/core/layout/fragment_builder.h"
#include "third_party/blink/renderer/core/layout/geometry/box_strut.h"
#include "third_party/blink/renderer/core/layout/geometry/writing_mode_converter.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/inline/inline_node.h"
#include "third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.h"
#include "third_party/blink/renderer/core/layout/inline/ruby_utils.h"
#include "third_party/blink/renderer/core/layout/layout_block.h"
#include "third_party/blink/renderer/core/layout/layout_text_combine.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "third_party/blink/renderer/core/layout/scrollable_overflow_calculator.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_view.h"
#include "third_party/blink/renderer/platform/wtf/size_assertions.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"

namespace blink {
namespace  // namespace

PhysicalFragment::PhysicalFragment(FragmentBuilder* builder,
                                   WritingMode block_or_line_writing_mode,
                                   FragmentType type,
                                   unsigned sub_type)
    :{}

// Even though the other constructors don't initialize many of these fields
// (instead set by their super-classes), the copy constructor does.
PhysicalFragment::PhysicalFragment(const PhysicalFragment& other)
    :{}

bool PhysicalFragment::IsBlockFlow() const {}

bool PhysicalFragment::IsTextControlContainer() const {}

bool PhysicalFragment::IsTextControlPlaceholder() const {}

base::span<PhysicalOofPositionedNode>
PhysicalFragment::OutOfFlowPositionedDescendants() const {}

const FragmentedOofData* PhysicalFragment::GetFragmentedOofData() const {}

bool PhysicalFragment::HasNestedMulticolsWithOOFs() const {}

bool PhysicalFragment::NeedsOOFPositionedInfoPropagation() const {}

PhysicalFragment::OofData* PhysicalFragment::OofDataFromBuilder(
    FragmentBuilder* builder) {}

PhysicalFragment::OofData* PhysicalFragment::FragmentedOofDataFromBuilder(
    FragmentBuilder* builder) {}

void PhysicalFragment::ClearOofData() {}

PhysicalFragment::OofData* PhysicalFragment::CloneOofData() const {}

bool PhysicalFragment::IsMonolithic() const {}

bool PhysicalFragment::IsImplicitAnchor() const {}

const FragmentData* PhysicalFragment::GetFragmentData() const {}

const PhysicalFragment* PhysicalFragment::PostLayout() const {}

#if DCHECK_IS_ON()
void PhysicalFragment::CheckType() const {}
#endif

LogicalRect PhysicalFragment::ConvertChildToLogical(
    const PhysicalRect& physical_rect) const {}

String PhysicalFragment::ToString() const {}

String PhysicalFragment::DumpFragmentTree(
    DumpFlags flags,
    const PhysicalFragment* target,
    std::optional<PhysicalOffset> fragment_offset,
    unsigned indent) const {}

String PhysicalFragment::DumpFragmentTree(const LayoutObject& root,
                                          DumpFlags flags,
                                          const PhysicalFragment* target) {}

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

void PhysicalFragment::TraceAfterDispatch(Visitor* visitor) const {}

// TODO(dlibby): remove `Children` and `PostLayoutChildren` and move the
// casting and/or branching to the callers.
base::span<const PhysicalFragmentLink> PhysicalFragment::Children() const {}

PhysicalFragment::PostLayoutChildLinkList PhysicalFragment::PostLayoutChildren()
    const {}

void PhysicalFragment::SetChildrenInvalid() const {}

// additional_offset must be offset from the containing_block.
void PhysicalFragment::AddOutlineRectsForNormalChildren(
    OutlineRectCollector& collector,
    const PhysicalOffset& additional_offset,
    OutlineType outline_type,
    const LayoutBoxModelObject* containing_block) const {}

void PhysicalFragment::AddOutlineRectsForCursor(
    OutlineRectCollector& collector,
    const PhysicalOffset& additional_offset,
    OutlineType outline_type,
    const LayoutBoxModelObject* containing_block,
    InlineCursor* cursor) const {}

// additional_offset must be offset from the containing_block because
// LocalToAncestorRect returns rects wrt containing_block.
void PhysicalFragment::AddOutlineRectsForDescendant(
    const PhysicalFragmentLink& descendant,
    OutlineRectCollector& collector,
    const PhysicalOffset& additional_offset,
    OutlineType outline_type,
    const LayoutBoxModelObject* containing_block) const {}

bool PhysicalFragment::DependsOnPercentageBlockSize(
    const FragmentBuilder& builder) {}

void PhysicalFragment::OofData::Trace(Visitor* visitor) const {}

std::ostream& operator<<(std::ostream& out, const PhysicalFragment& fragment) {}

std::ostream& operator<<(std::ostream& out, const PhysicalFragment* fragment) {}

}  // namespace blink

#if DCHECK_IS_ON()

void ShowFragmentTree(const blink::PhysicalFragment* fragment) {}

void ShowFragmentTree(const blink::LayoutObject& root,
                      const blink::PhysicalFragment* target) {}

void ShowEntireFragmentTree(const blink::LayoutObject& target) {}

void ShowEntireFragmentTree(const blink::PhysicalFragment* target) {}

#endif  // DCHECK_IS_ON()