Chromium Code Reviews| Index: Source/core/rendering/svg/SVGTextLayoutEngine.cpp |
| diff --git a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp |
| index fc5dc792329317ece1c8def55a91bacc2098e286..2414c7597d8fd636f22338f5548a76e12d40ff21 100644 |
| --- a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp |
| +++ b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp |
| @@ -295,13 +295,13 @@ void SVGTextLayoutEngine::finalizeTransformMatrices(Vector<SVGInlineTextBox*>& b |
| AffineTransform textBoxTransformation; |
| for (unsigned boxPosition = 0; boxPosition < boxCount; ++boxPosition) { |
| SVGInlineTextBox* textBox = boxes.at(boxPosition); |
| - Vector<SVGTextFragment>& fragments = textBox->textFragments(); |
| + m_chunkLayoutBuilder.transformationForTextBox(textBox, textBoxTransformation); |
|
pdr.
2014/07/03 22:56:49
What do you think about refactoring this function
|
| + if (textBoxTransformation.isIdentity()) |
| + continue; |
| + Vector<SVGTextFragment>& fragments = textBox->textFragments(); |
| unsigned fragmentCount = fragments.size(); |
| for (unsigned i = 0; i < fragmentCount; ++i) { |
| - m_chunkLayoutBuilder.transformationForTextBox(textBox, textBoxTransformation); |
| - if (textBoxTransformation.isIdentity()) |
| - continue; |
| ASSERT(fragments[i].lengthAdjustTransform.isIdentity()); |
| fragments[i].lengthAdjustTransform = textBoxTransformation; |
| } |