| Index: Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
|
| diff --git a/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp b/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
|
| index 2889c76c0de26e7b2c56491f19964c5463dbf574..be2daef7f40bff4faf3881d27355e95c94fa4dd2 100644
|
| --- a/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
|
| +++ b/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
|
| @@ -40,6 +40,7 @@ namespace blink {
|
| class SVGTextMetricsCalculator {
|
| public:
|
| SVGTextMetricsCalculator(RenderSVGInlineText*);
|
| + ~SVGTextMetricsCalculator();
|
|
|
| SVGTextMetrics computeMetricsForCharacter(unsigned textPosition);
|
| unsigned textLength() const { return static_cast<unsigned>(m_run.charactersLength()); }
|
| @@ -62,7 +63,6 @@ private:
|
| BidiCharacterRun* m_bidiRun;
|
| TextRun m_run;
|
| BidiResolver<TextRunIterator, BidiCharacterRun> m_bidiResolver;
|
| - BidiRunList<BidiCharacterRun> m_bidiRuns;
|
| bool m_isComplexText;
|
| float m_totalWidth;
|
| TextDirection m_textDirection;
|
| @@ -89,6 +89,12 @@ SVGTextMetricsCalculator::SVGTextMetricsCalculator(RenderSVGInlineText* text)
|
| setupBidiRuns();
|
| }
|
|
|
| +SVGTextMetricsCalculator::~SVGTextMetricsCalculator()
|
| +{
|
| + if (m_bidiRun)
|
| + m_bidiResolver.runs().deleteRuns();
|
| +}
|
| +
|
| void SVGTextMetricsCalculator::setupBidiRuns()
|
| {
|
| RenderStyle* style = m_text->style();
|
| @@ -102,8 +108,9 @@ void SVGTextMetricsCalculator::setupBidiRuns()
|
| m_bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&m_run, 0));
|
| const bool hardLineBreak = false;
|
| const bool reorderRuns = false;
|
| - m_bidiResolver.createBidiRunsForLine(TextRunIterator(&m_run, m_run.length()), m_bidiRuns, NoVisualOverride, hardLineBreak, reorderRuns);
|
| - m_bidiRun = m_bidiRuns.firstRun();
|
| + m_bidiResolver.createBidiRunsForLine(TextRunIterator(&m_run, m_run.length()), NoVisualOverride, hardLineBreak, reorderRuns);
|
| + BidiRunList<BidiCharacterRun>& bidiRuns = m_bidiResolver.runs();
|
| + m_bidiRun = bidiRuns.firstRun();
|
| }
|
|
|
| SVGTextMetrics SVGTextMetricsCalculator::computeMetricsForCharacterSimple(unsigned textPosition)
|
|
|