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

// Copyright 2018 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_item_segment.h"

#include "third_party/blink/renderer/core/layout/inline/inline_item.h"
#include "third_party/blink/renderer/core/layout/layout_inline.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.h"
#include "third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_buffer.h"

namespace blink {

namespace {

// Constants for PackSegmentData() and UnpackSegmentData().
//
// UScriptCode is -1 (USCRIPT_INVALID_CODE) to 177 as of ICU 60.
// This can be packed to 8 bits, by handling -1 separately.
static constexpr unsigned kScriptBits =;
static constexpr unsigned kFontFallbackPriorityBits =;
static constexpr unsigned kRenderOrientationBits =;

static constexpr unsigned kScriptMask =;
static constexpr unsigned kFontFallbackPriorityMask =;
static constexpr unsigned kRenderOrientationMask =;

static_assert;

unsigned SetRenderOrientation(
    unsigned value,
    OrientationIterator::RenderOrientation render_orientation) {}

}  // namespace

InlineItemSegment::InlineItemSegment(
    const RunSegmenter::RunSegmenterRange& range)
    :{}

InlineItemSegment::InlineItemSegment(unsigned end_offset,
                                     const InlineItem& item)
    :{}

unsigned InlineItemSegment::PackSegmentData(
    const RunSegmenter::RunSegmenterRange& range) {}

RunSegmenter::RunSegmenterRange InlineItemSegment::UnpackSegmentData(
    unsigned start_offset,
    unsigned end_offset,
    unsigned value) {}

RunSegmenter::RunSegmenterRange InlineItemSegment::ToRunSegmenterRange(
    unsigned start_offset,
    unsigned end_offset) const {}

std::unique_ptr<InlineItemSegments> InlineItemSegments::Clone() const {}

unsigned InlineItemSegments::OffsetForSegment(
    const InlineItemSegment& segment) const {}

#if DCHECK_IS_ON()
void InlineItemSegments::CheckOffset(unsigned offset,
                                     const InlineItemSegment* segment) const {}
#endif

void InlineItemSegments::ToRanges(RunSegmenterRanges& ranges) const {}

InlineItemSegments::Iterator InlineItemSegments::Ranges(
    unsigned start_offset,
    unsigned end_offset,
    unsigned item_index) const {}

void InlineItemSegments::ComputeSegments(
    RunSegmenter* segmenter,
    RunSegmenter::RunSegmenterRange* range) {}

unsigned InlineItemSegments::AppendMixedFontOrientation(
    const String& text_content,
    unsigned start_offset,
    unsigned end_offset,
    unsigned segment_index) {}

unsigned InlineItemSegments::PopulateItemsFromFontOrientation(
    unsigned start_offset,
    unsigned end_offset,
    OrientationIterator::RenderOrientation render_orientation,
    unsigned segment_index) {}

void InlineItemSegments::Split(unsigned index, unsigned offset) {}

void InlineItemSegments::ComputeItemIndex(const HeapVector<InlineItem>& items) {}

ShapeResult* InlineItemSegments::ShapeText(const HarfBuzzShaper* shaper,
                                           const Font* font,
                                           TextDirection direction,
                                           unsigned start_offset,
                                           unsigned end_offset,
                                           unsigned item_index,
                                           ShapeOptions options) const {}

}  // namespace blink