Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(955)

Unified Diff: Source/core/layout/svg/SVGTextLayoutEngine.h

Issue 1160623002: Avoid resetting the metrics-list/character offset for each text box (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/svg/SVGTextLayoutEngine.h
diff --git a/Source/core/layout/svg/SVGTextLayoutEngine.h b/Source/core/layout/svg/SVGTextLayoutEngine.h
index dab83d3f120b6e3e0f56187aa9041ca66b70de28..3bb201667a9ed752a923a2b0ff391f211f12900d 100644
--- a/Source/core/layout/svg/SVGTextLayoutEngine.h
+++ b/Source/core/layout/svg/SVGTextLayoutEngine.h
@@ -60,18 +60,17 @@ private:
void updateCurrentTextPosition(float x, float y, float glyphAdvance);
void updateRelativePositionAdjustmentsIfNeeded(float dx, float dy);
- void recordTextFragment(SVGInlineTextBox*, const Vector<SVGTextMetrics>&);
+ void recordTextFragment(SVGInlineTextBox*);
bool parentDefinesTextLength(LayoutObject*) const;
void layoutTextOnLineOrPath(SVGInlineTextBox*, const LayoutSVGInlineText&, const ComputedStyle&);
void finalizeTransformMatrices(Vector<SVGInlineTextBox*>&);
+ void updateMetricsIterator(const LayoutSVGInlineText&, unsigned characterOffset);
pdr. 2015/05/27 03:11:18 Can you move this to the iterator? It seems to be
fs 2015/05/27 12:53:13 Done.
+
bool currentLogicalCharacterAttributes(SVGTextLayoutAttributes*&);
bool currentLogicalCharacterMetrics(SVGTextLayoutAttributes*&, SVGTextMetrics&);
- bool currentVisualCharacterMetrics(SVGInlineTextBox*, const Vector<SVGTextMetrics>&, SVGTextMetrics&);
-
void advanceToNextLogicalCharacter(const SVGTextMetrics&);
- void advanceToNextVisualCharacter(const SVGTextMetrics&);
private:
Vector<SVGTextLayoutAttributes*>& m_layoutAttributes;
@@ -84,8 +83,7 @@ private:
unsigned m_layoutAttributesPosition;
unsigned m_logicalCharacterOffset;
unsigned m_logicalMetricsListOffset;
- unsigned m_visualCharacterOffset;
- unsigned m_visualMetricsListOffset;
+ SVGTextMetricsIterator m_visualMetricsIterator;
float m_x;
float m_y;
float m_dx;
« no previous file with comments | « no previous file | Source/core/layout/svg/SVGTextLayoutEngine.cpp » ('j') | Source/core/layout/svg/SVGTextLayoutEngine.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698