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

#include "base/containers/adapters.h"
#include "third_party/blink/renderer/core/layout/inline/inline_break_token.h"
#include "third_party/blink/renderer/core/layout/inline/inline_item_result_ruby_column.h"
#include "third_party/blink/renderer/core/layout/inline/inline_node.h"
#include "third_party/blink/renderer/core/layout/layout_object_inlines.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_view.h"

namespace blink {

namespace {
inline bool IsHangingSpace(UChar c) {}

wtf_size_t GlyphCount(const InlineItemResult& item_result) {}

}  // namespace

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

void LineInfo::Reset() {}

void LineInfo::SetLineStyle(const InlineNode& node,
                            const InlineItemsData& items_data,
                            bool use_first_line_style) {}

ETextAlign LineInfo::GetTextAlign(bool is_last_line) const {}

bool LineInfo::ComputeNeedsAccurateEndPosition() const {}

unsigned LineInfo::InflowStartOffset() const {}

InlineItemTextIndex LineInfo::End() const {}

unsigned LineInfo::EndTextOffset() const {}

unsigned LineInfo::InflowEndOffsetInternal(bool skip_forced_break) const {}

bool LineInfo::GlyphCountIsGreaterThan(wtf_size_t limit) const {}

bool LineInfo::ShouldHangTrailingSpaces() const {}

bool LineInfo::IsHyphenated() const {}

void LineInfo::UpdateTextAlign() {}

LayoutUnit LineInfo::ComputeTrailingSpaceWidth(unsigned* end_offset_out) const {}

LayoutUnit LineInfo::ComputeWidth() const {}

#if DCHECK_IS_ON()
float LineInfo::ComputeWidthInFloat() const {}
#endif

// Block start adjustment and annotation ovreflow
//
//  Ruby without initial letter[1][2]:
//                  RUBY = annotation overflow and block start adjustment
//          This is line has ruby.
//
//  Raise/Sunken[3]: initial_letter_block_start > 0
//   block start adjustment
//        ***** ^
//          *   | block start adjustment
//          *   V
//          *       RUBY = not annotation overflow
//          *   his line has ruby.
//
//   Drop + Ruby(over)[4]: initial_letter_block_start == 0
//                  RUBY = annotation overflow and block start adjustment
//        ***** his line has ruby.
//          *
//          *
//          *
//          *
//
//  Ruby(over) is taller than initial letter[5]:
//                  RUBY = annotation overflow
//        *****     RUBY ^
//          *       RUBY | block start adjustment
//          *       RUBY |
//          *       RUBY V
//          *    his line has ruby.
//
//  Ruby(under) and raise/Sunken[6]:
//        ***** ^
//          *   | block start adjustment
//          *   V
//          *   his line has under ruby.
//          *       RUBY
//
//  Ruby(under) and drop[7]:
//               his line has under ruby
//        ******     RUBY
//          *
//          *
//
// [1] fast/ruby/ruby-position-modern-japanese-fonts.html
// [2] https://wpt.live/css/css-ruby/line-spacing.html
// [3]
// https://wpt.live/css/css-inline/initial-letter/initial-letter-block-position-raise-over-ruby.html
// [4]
// https://wpt.live/css/css-inline/initial-letter/initial-letter-block-position-drop-over-ruby.html
// [5]
// https://wpt.live/css/css-inline/initial-letter/initial-letter-block-position-raise-over-ruby.html
// [6]
// https://wpt.live/css/css-inline/initial-letter/initial-letter-block-position-raise-under-ruby.html
// [7]
// https://wpt.live/css/css-inline/initial-letter/initial-letter-block-position-drop-under-ruby.html

LayoutUnit LineInfo::ComputeAnnotationBlockOffsetAdjustment() const {}

LayoutUnit LineInfo::ComputeBlockStartAdjustment() const {}

LayoutUnit LineInfo::ComputeInitialLetterBoxBlockStartAdjustment() const {}

LayoutUnit LineInfo::ComputeTotalBlockSize(
    LayoutUnit line_height,
    LayoutUnit annotation_overflow_block_end) const {}

void LineInfo::RemoveParallelFlowBreakToken(unsigned item_index) {}

std::ostream& operator<<(std::ostream& ostream, const LineInfo& line_info) {}

}  // namespace blink