#include "third_party/blink/renderer/core/layout/svg/svg_text_layout_algorithm.h"
#include <algorithm>
#include "base/containers/contains.h"
#include "base/ranges/algorithm.h"
#include "base/trace_event/trace_event.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_inline_text.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_text_path.h"
#include "third_party/blink/renderer/core/layout/svg/resolved_text_layout_attributes_iterator.h"
#include "third_party/blink/renderer/core/layout/svg/svg_inline_node_data.h"
#include "third_party/blink/renderer/core/svg/svg_animated_length.h"
#include "third_party/blink/renderer/core/svg/svg_length_context.h"
#include "third_party/blink/renderer/core/svg/svg_text_content_element.h"
#include "third_party/blink/renderer/platform/wtf/text/code_point_iterator.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"
#include "ui/gfx/geometry/rect_conversions.h"
namespace blink {
SvgTextLayoutAlgorithm::SvgTextLayoutAlgorithm(InlineNode node,
WritingMode writing_mode)
: … { … }
PhysicalSize SvgTextLayoutAlgorithm::Layout(
const String& ifc_text_content,
FragmentItemsBuilder::ItemWithOffsetList& items) { … }
bool SvgTextLayoutAlgorithm::Setup(wtf_size_t approximate_count) { … }
void SvgTextLayoutAlgorithm::SetFlags(
const String& ifc_text_content,
const FragmentItemsBuilder::ItemWithOffsetList& items) { … }
void SvgTextLayoutAlgorithm::AdjustPositionsDxDy(
const FragmentItemsBuilder::ItemWithOffsetList& items) { … }
void SvgTextLayoutAlgorithm::ApplyTextLengthAttribute(
const FragmentItemsBuilder::ItemWithOffsetList& items) { … }
void SvgTextLayoutAlgorithm::ResolveTextLength(
const FragmentItemsBuilder::ItemWithOffsetList& items,
const SvgTextContentRange& range,
Vector<wtf_size_t>& resolved_descendant_node_starts) { … }
void SvgTextLayoutAlgorithm::AdjustPositionsXY(
const FragmentItemsBuilder::ItemWithOffsetList& items) { … }
void SvgTextLayoutAlgorithm::ApplyAnchoring(
const FragmentItemsBuilder::ItemWithOffsetList& items) { … }
void SvgTextLayoutAlgorithm::PositionOnPath(
const FragmentItemsBuilder::ItemWithOffsetList& items) { … }
PhysicalSize SvgTextLayoutAlgorithm::WriteBackToFragmentItems(
FragmentItemsBuilder::ItemWithOffsetList& items) { … }
float SvgTextLayoutAlgorithm::ScalingFactorAt(
const FragmentItemsBuilder::ItemWithOffsetList& items,
wtf_size_t addressable_index) const { … }
bool SvgTextLayoutAlgorithm::IsFirstCharacterInTextPath(
wtf_size_t index) const { … }
}