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

Unified Diff: Source/core/rendering/svg/SVGTextMetricsBuilder.h

Issue 184103024: Refactor away SVGTextMetricsBuilder::advance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | « no previous file | Source/core/rendering/svg/SVGTextMetricsBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGTextMetricsBuilder.h
diff --git a/Source/core/rendering/svg/SVGTextMetricsBuilder.h b/Source/core/rendering/svg/SVGTextMetricsBuilder.h
index 5954c2cbabd21552bbd646e902946e4543a1067f..708f10323f7f836727a34833881a409242230c9d 100644
--- a/Source/core/rendering/svg/SVGTextMetricsBuilder.h
+++ b/Source/core/rendering/svg/SVGTextMetricsBuilder.h
@@ -41,9 +41,9 @@ public:
void buildMetricsAndLayoutAttributes(RenderSVGText*, RenderSVGInlineText* stopAtLeaf, SVGCharacterDataMap& allCharactersMap);
private:
- bool advance();
- void advanceSimpleText();
- void advanceComplexText();
+ SVGTextMetrics computeMetricsForCurrentCharacter();
+ SVGTextMetrics computeMetricsForCurrentCharacterSimple();
+ SVGTextMetrics computeMetricsForCurrentCharacterComplex();
bool currentCharacterStartsSurrogatePair() const;
void initializeMeasurementWithTextRenderer(RenderSVGInlineText*);
@@ -54,14 +54,10 @@ private:
TextRun m_run;
unsigned m_textPosition;
bool m_isComplexText;
- SVGTextMetrics m_currentMetrics;
float m_totalWidth;
// Simple text only.
OwnPtr<WidthIterator> m_simpleWidthIterator;
-
- // Complex text only.
- SVGTextMetrics m_complexStartToCurrentMetrics;
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/core/rendering/svg/SVGTextMetricsBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698