diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/svg/svg_text_chunk_builder.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/layout/svg/svg_text_chunk_builder.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/svg/svg_text_chunk_builder.cc b/chromium/third_party/blink/renderer/core/layout/svg/svg_text_chunk_builder.cc index 5c3e12cf096..94ddd75bcb5 100644 --- a/chromium/third_party/blink/renderer/core/layout/svg/svg_text_chunk_builder.cc +++ b/chromium/third_party/blink/renderer/core/layout/svg/svg_text_chunk_builder.cc @@ -26,8 +26,6 @@ namespace blink { -namespace { - float CalculateTextAnchorShift(const ComputedStyle& style, float length) { bool is_ltr = style.IsLeftToRightDirection(); switch (style.SvgStyle().TextAnchor()) { @@ -43,6 +41,8 @@ float CalculateTextAnchorShift(const ComputedStyle& style, float length) { } } +namespace { + bool NeedsTextAnchorAdjustment(const ComputedStyle& style) { bool is_ltr = style.IsLeftToRightDirection(); switch (style.SvgStyle().TextAnchor()) { @@ -143,10 +143,7 @@ void SVGTextChunkBuilder::ProcessTextChunks( } SVGTextPathChunkBuilder::SVGTextPathChunkBuilder() - : SVGTextChunkBuilder(), - total_length_(0), - total_characters_(0), - total_text_anchor_shift_(0) {} + : SVGTextChunkBuilder(), total_length_(0), total_characters_(0) {} void SVGTextPathChunkBuilder::HandleTextChunk(BoxListConstIterator box_start, BoxListConstIterator box_end) { @@ -155,10 +152,6 @@ void SVGTextPathChunkBuilder::HandleTextChunk(BoxListConstIterator box_start, ChunkLengthAccumulator length_accumulator(!style.IsHorizontalWritingMode()); length_accumulator.ProcessRange(box_start, box_end); - // Handle text-anchor as additional start offset for text paths. - total_text_anchor_shift_ += - CalculateTextAnchorShift(style, length_accumulator.length()); - total_length_ += length_accumulator.length(); total_characters_ += length_accumulator.NumCharacters(); } |