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

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: Rebase. 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
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInlineText.h ('k') | Source/core/layout/svg/SVGTextLayoutEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/SVGTextLayoutEngine.h
diff --git a/Source/core/layout/svg/SVGTextLayoutEngine.h b/Source/core/layout/svg/SVGTextLayoutEngine.h
index e7a58b8309e8911f3817ac645fafef52be22143a..c8dded091177682715c4c2fc87e2d4637311fbf8 100644
--- a/Source/core/layout/svg/SVGTextLayoutEngine.h
+++ b/Source/core/layout/svg/SVGTextLayoutEngine.h
@@ -20,6 +20,7 @@
#ifndef SVGTextLayoutEngine_h
#define SVGTextLayoutEngine_h
+#include "core/layout/svg/LayoutSVGInlineText.h"
#include "core/layout/svg/SVGTextFragment.h"
#include "core/layout/svg/SVGTextLayoutAttributes.h"
#include "core/layout/svg/SVGTextMetrics.h"
@@ -30,7 +31,6 @@ namespace blink {
class LayoutObject;
class ComputedStyle;
-class LayoutSVGInlineText;
class SVGInlineTextBox;
// SVGTextLayoutEngine performs the second layout phase for SVG text.
@@ -59,17 +59,14 @@ 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&);
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;
@@ -81,8 +78,7 @@ private:
unsigned m_layoutAttributesPosition;
unsigned m_logicalCharacterOffset;
unsigned m_logicalMetricsListOffset;
- unsigned m_visualCharacterOffset;
- unsigned m_visualMetricsListOffset;
+ SVGInlineTextMetricsIterator m_visualMetricsIterator;
float m_x;
float m_y;
float m_dx;
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInlineText.h ('k') | Source/core/layout/svg/SVGTextLayoutEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698