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

// Copyright 2019 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/fragment_item.h"

#include "base/debug/dump_without_crashing.h"
#include "third_party/blink/renderer/core/editing/bidi_adjustment.h"
#include "third_party/blink/renderer/core/editing/position_with_affinity.h"
#include "third_party/blink/renderer/core/layout/geometry/writing_mode_converter.h"
#include "third_party/blink/renderer/core/layout/inline/fragment_items_builder.h"
#include "third_party/blink/renderer/core/layout/inline/inline_caret_position.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/inline/inline_item.h"
#include "third_party/blink/renderer/core/layout/inline/inline_item_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/svg/layout_svg_inline_text.h"
#include "third_party/blink/renderer/core/paint/inline_paint_context.h"
#include "third_party/blink/renderer/platform/fonts/text_fragment_paint_info.h"
#include "third_party/blink/renderer/platform/wtf/size_assertions.h"

namespace blink {

namespace  // namespace

FragmentItem::FragmentItem(const InlineItem& inline_item,
                           const ShapeResultView* shape_result,
                           const TextOffsetRange& text_offset,
                           const PhysicalSize& size,
                           bool is_hidden_for_paint)
    :{}

FragmentItem::FragmentItem(const LayoutObject& layout_object,
                           TextItemType text_type,
                           StyleVariant style_variant,
                           TextDirection direction,
                           const ShapeResultView* shape_result,
                           const String& text_content,
                           const PhysicalSize& size,
                           bool is_hidden_for_paint)
    :{}

FragmentItem::FragmentItem(const InlineItem& inline_item,
                           const ShapeResultView* shape_result,
                           const String& text_content,
                           const PhysicalSize& size,
                           bool is_hidden_for_paint)
    :{}

FragmentItem::FragmentItem(const PhysicalLineBoxFragment& line)
    :{}

FragmentItem::FragmentItem(const PhysicalSize& size,
                           const PhysicalLineBoxFragment& base_line)
    :{}

FragmentItem::FragmentItem(const PhysicalBoxFragment& box,
                           TextDirection resolved_direction)
    :{}

// |const_type_| will be re-initialized in another constructor called inside
// this one.
FragmentItem::FragmentItem(LogicalLineItem&& line_item,
                           WritingMode writing_mode)
    :{}

FragmentItem::FragmentItem(const FragmentItem& source)
    :{}

FragmentItem::FragmentItem(FragmentItem&& source)
    :{}

FragmentItem::~FragmentItem() {}

bool FragmentItem::IsInlineBox() const {}

bool FragmentItem::IsAtomicInline() const {}

bool FragmentItem::IsBlockInInline() const {}

bool FragmentItem::IsFloating() const {}

bool FragmentItem::IsEmptyLineBox() const {}

bool FragmentItem::IsStyleGeneratedText() const {}

bool FragmentItem::IsGeneratedText() const {}

bool FragmentItem::IsFormattingContextRoot() const {}

bool FragmentItem::IsListMarker() const {}

LayoutObject& FragmentItem::BlockInInline() const {}

void FragmentItem::SetSvgFragmentData(const SvgFragmentData* data,
                                      const PhysicalRect& unscaled_rect,
                                      bool is_hidden) {}

void FragmentItem::SetSvgLineLocalRect(const PhysicalRect& unscaled_rect) {}

gfx::RectF FragmentItem::ObjectBoundingBox(const FragmentItems& items) const {}

gfx::QuadF FragmentItem::SvgUnscaledQuad() const {}

PhysicalOffset FragmentItem::MapPointInContainer(
    const PhysicalOffset& point) const {}

float FragmentItem::ScaleInlineOffset(LayoutUnit inline_offset) const {}

bool FragmentItem::InclusiveContains(const gfx::PointF& position) const {}

bool FragmentItem::HasNonVisibleOverflow() const {}

bool FragmentItem::IsScrollContainer() const {}

bool FragmentItem::HasSelfPaintingLayer() const {}

FragmentItem::BoxItem::BoxItem(const PhysicalBoxFragment* box_fragment,
                               wtf_size_t descendants_count)
    :{}

void FragmentItem::BoxItem::Trace(Visitor* visitor) const {}

const PhysicalBoxFragment* FragmentItem::BoxItem::PostLayout() const {}

void FragmentItem::LayoutObjectWillBeDestroyed() const {}

void FragmentItem::LayoutObjectWillBeMoved() const {}

const PhysicalOffset FragmentItem::ContentOffsetInContainerFragment() const {}

inline const LayoutBox* FragmentItem::InkOverflowOwnerBox() const {}

inline LayoutBox* FragmentItem::MutableInkOverflowOwnerBox() {}

PhysicalRect FragmentItem::SelfInkOverflowRect() const {}

PhysicalRect FragmentItem::InkOverflowRect() const {}

const ShapeResultView* FragmentItem::TextShapeResult() const {}

TextOffsetRange FragmentItem::TextOffset() const {}

unsigned FragmentItem::StartOffsetInContainer(
    const InlineCursor& container) const {}

StringView FragmentItem::Text(const FragmentItems& items) const {}

TextFragmentPaintInfo FragmentItem::TextPaintInfo(
    const FragmentItems& items) const {}

TextDirection FragmentItem::BaseDirection() const {}

TextDirection FragmentItem::ResolvedDirection() const {}

bool FragmentItem::HasSvgTransformForPaint() const {}

bool FragmentItem::HasSvgTransformForBoundingBox() const {}

// For non-<textPath>:
//   length-adjust * translate(x, y) * rotate() * translate(-x, -y)
// For <textPath>:
//   translate(x, y) * rotate() * length-adjust * translate(-x, -y)
//
// (x, y) is the center of the rotation.  The center points of a non-<textPath>
// character and a <textPath> character are different.
AffineTransform FragmentItem::BuildSvgTransformForPaint() const {}

AffineTransform FragmentItem::BuildSvgTransformForLengthAdjust() const {}

AffineTransform FragmentItem::BuildSvgTransformForTextPath(
    const AffineTransform& length_adjust) const {}

// This function returns:
//   translate(x, y) * rotate() * translate(-x, -y)
//
// (x, y) is the center of the rotation.  The center points of a non-<textPath>
// character and a <textPath> character are different.
AffineTransform FragmentItem::BuildSvgTransformForBoundingBox() const {}

float FragmentItem::SvgScalingFactor() const {}

const Font& FragmentItem::ScaledFont() const {}

String FragmentItem::ToString() const {}

PhysicalRect FragmentItem::LocalVisualRectFor(
    const LayoutObject& layout_object) {}

void FragmentItem::InvalidateInkOverflow() {}

PhysicalRect FragmentItem::RecalcInkOverflowForCursor(
    InlineCursor* cursor,
    InlinePaintContext* inline_context) {}

void FragmentItem::RecalcInkOverflow(const InlineCursor& cursor,
                                     InlinePaintContext* inline_context,
                                     PhysicalRect* self_and_contents_rect_out) {}

PhysicalRect FragmentItem::RecalcInkOverflowForDescendantsOf(
    const InlineCursor& cursor,
    InlinePaintContext* inline_context) const {}

void FragmentItem::SetDeltaToNextForSameLayoutObject(wtf_size_t delta) const {}

LayoutUnit FragmentItem::CaretInlinePositionForOffset(StringView text,
                                                      unsigned offset) const {}

std::pair<LayoutUnit, LayoutUnit> FragmentItem::LineLeftAndRightForOffsets(
    StringView text,
    unsigned start_offset,
    unsigned end_offset) const {}

PhysicalRect FragmentItem::LocalRect(StringView text,
                                     unsigned start_offset,
                                     unsigned end_offset) const {}

PhysicalRect FragmentItem::ComputeTextBoundsRectForHitTest(
    const PhysicalOffset& inline_root_offset,
    bool is_occlusion_test) const {}

PositionWithAffinity FragmentItem::PositionForPointInText(
    const PhysicalOffset& point,
    const InlineCursor& cursor) const {}

PositionWithAffinity FragmentItem::PositionForPointInText(
    unsigned text_offset,
    const InlineCursor& cursor) const {}

unsigned FragmentItem::TextOffsetForPoint(const PhysicalOffset& point,
                                          const FragmentItems& items) const {}

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

std::ostream& operator<<(std::ostream& ostream, const FragmentItem& item) {}

std::ostream& operator<<(std::ostream& ostream, const FragmentItem* item) {}

}  // namespace blink