#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_INLINE_RUBY_UTILS_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_INLINE_RUBY_UTILS_H_
#include <optional>
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/fonts/font_height.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
#include "third_party/blink/renderer/platform/text/writing_mode.h"
namespace blink {
class ComputedStyle;
class InlineItem;
class LineInfo;
class LogicalLineContainer;
class LogicalLineItems;
class PhysicalBoxFragment;
class ShapeResultView;
struct InlineItemResult;
struct LogicalRubyColumn;
struct PhysicalRect;
struct RubyItemIndexes { … };
RubyItemIndexes ParseRubyInInlineItems(const HeapVector<InlineItem>& items,
wtf_size_t start_item_index);
PhysicalRect AdjustTextRectForEmHeight(const PhysicalRect& rect,
const ComputedStyle& style,
const ShapeResultView* shape_view,
WritingMode writing_mode);
PhysicalRect ComputeRubyEmHeightBox(const PhysicalBoxFragment& box_fragment);
struct AnnotationOverhang { … };
AnnotationOverhang GetOverhang(const InlineItemResult& item);
AnnotationOverhang GetOverhang(
LayoutUnit ruby_size,
const LineInfo& base_line,
const HeapVector<LineInfo, 1> annotation_line_list);
bool CanApplyStartOverhang(const LineInfo& line_info,
wtf_size_t ruby_index,
const ComputedStyle& ruby_style,
LayoutUnit& start_overhang);
LayoutUnit CommitPendingEndOverhang(const InlineItem& text_item,
LineInfo* line_info);
[[nodiscard]] std::pair<LayoutUnit, LayoutUnit> ApplyRubyAlign(
LayoutUnit available_line_size,
bool on_start_edge,
bool on_end_edge,
LineInfo& line_info);
struct AnnotationMetrics { … };
AnnotationMetrics ComputeAnnotationOverflow(
const LogicalLineItems& logical_line,
const FontHeight& line_box_metrics,
const ComputedStyle& line_style,
std::optional<FontHeight> annotation_metrics);
void UpdateRubyColumnInlinePositions(
const LogicalLineItems& line_items,
LayoutUnit inline_size,
HeapVector<Member<LogicalRubyColumn>>& column_list);
class CORE_EXPORT RubyBlockPositionCalculator { … };
}
WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS(…)
#endif