#include "third_party/blink/renderer/core/layout/svg/svg_text_query.h"
#include <unicode/utf16.h>
#include "third_party/blink/renderer/core/layout/inline/fragment_item.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/layout_box.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/layout/svg/layout_svg_text.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_view.h"
namespace blink {
namespace {
unsigned AdjustCodeUnitStartOffset(StringView string, unsigned offset) { … }
unsigned AdjustCodeUnitEndOffset(StringView string, unsigned offset) { … }
std::tuple<Vector<const FragmentItem*>, const FragmentItems*>
FragmentItemsInVisualOrder(const LayoutObject& query_root) { … }
std::tuple<Vector<const FragmentItem*>, const FragmentItems*>
FragmentItemsInLogicalOrder(const LayoutObject& query_root) { … }
std::tuple<const FragmentItem*, StringView, unsigned, unsigned>
FindFragmentItemForAddressableCodeUnitIndex(const LayoutObject& query_root,
unsigned index) { … }
void GetCanvasRotation(void* context,
unsigned,
Glyph,
gfx::Vector2dF,
float,
bool,
CanvasRotationInVertical rotation,
const SimpleFontData*) { … }
float InlineSize(const FragmentItem& item,
StringView item_text,
unsigned start_code_unit_offset,
unsigned end_code_unit_offset) { … }
std::tuple<const FragmentItem*, gfx::RectF> ScaledCharacterRectInContainer(
const LayoutObject& query_root,
unsigned code_unit_index) { … }
enum class QueryPosition { … };
gfx::PointF StartOrEndPosition(const LayoutObject& query_root,
unsigned index,
QueryPosition pos) { … }
}
unsigned SvgTextQuery::NumberOfCharacters() const { … }
float SvgTextQuery::SubStringLength(unsigned start_index,
unsigned length) const { … }
gfx::PointF SvgTextQuery::StartPositionOfCharacter(unsigned index) const { … }
gfx::PointF SvgTextQuery::EndPositionOfCharacter(unsigned index) const { … }
gfx::RectF SvgTextQuery::ExtentOfCharacter(unsigned index) const { … }
float SvgTextQuery::RotationOfCharacter(unsigned index) const { … }
int SvgTextQuery::CharacterNumberAtPosition(const gfx::PointF& position) const { … }
}