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

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

Issue 186733005: Move SVGTextMetricsBuilder metrics computation state to a local helper class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 0ad2710c0b3a30ac0fda96830e46c2d2ce89c962..08d585bdeccf5082acc4d4e1886fd7acd76cbf14 100644
--- a/Source/core/rendering/svg/SVGTextMetricsBuilder.h
+++ b/Source/core/rendering/svg/SVGTextMetricsBuilder.h
@@ -21,10 +21,6 @@
#define SVGTextMetricsBuilder_h
#include "core/rendering/svg/SVGTextLayoutAttributes.h"
-#include "core/rendering/svg/SVGTextMetrics.h"
-#include "platform/fonts/WidthIterator.h"
-#include "platform/text/TextRun.h"
-#include "wtf/Vector.h"
namespace WebCore {
@@ -36,27 +32,14 @@ struct MeasureTextData;
class SVGTextMetricsBuilder {
WTF_MAKE_NONCOPYABLE(SVGTextMetricsBuilder);
public:
- SVGTextMetricsBuilder();
+ SVGTextMetricsBuilder() { }
+
void measureTextRenderer(RenderSVGInlineText*);
void buildMetricsAndLayoutAttributes(RenderSVGText*, RenderSVGInlineText* stopAtLeaf, SVGCharacterDataMap& allCharactersMap);
private:
- SVGTextMetrics computeMetricsForCurrentCharacter(unsigned textPosition);
- SVGTextMetrics computeMetricsForCurrentCharacterSimple(unsigned textPosition);
- SVGTextMetrics computeMetricsForCurrentCharacterComplex(unsigned textPosition);
- bool currentCharacterStartsSurrogatePair(unsigned textPosition) const;
-
- void initializeMeasurementWithTextRenderer(RenderSVGInlineText*);
void walkTree(RenderObject*, RenderSVGInlineText* stopAtLeaf, MeasureTextData*);
void measureTextRenderer(RenderSVGInlineText*, MeasureTextData*, bool processRenderer);
-
- RenderSVGInlineText* m_text;
- TextRun m_run;
- bool m_isComplexText;
- float m_totalWidth;
-
- // Simple text only.
- OwnPtr<WidthIterator> m_simpleWidthIterator;
};
} // 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