Chromium Code Reviews| Index: Source/core/rendering/svg/RenderSVGInlineText.cpp |
| diff --git a/Source/core/rendering/svg/RenderSVGInlineText.cpp b/Source/core/rendering/svg/RenderSVGInlineText.cpp |
| index 865e569ca63c04466105f0cc16d445a3af2d64e0..626bdc7ae91e9d4835224f855609c24a2c82980c 100644 |
| --- a/Source/core/rendering/svg/RenderSVGInlineText.cpp |
| +++ b/Source/core/rendering/svg/RenderSVGInlineText.cpp |
| @@ -225,18 +225,21 @@ void RenderSVGInlineText::computeNewScaledFontForStyle(RenderObject* renderer, c |
| StyleResolver* styleResolver = document->styleResolver(); |
| ASSERT(styleResolver); |
| - // Alter font-size to the right on-screen value to avoid scaling the glyphs themselves, except when GeometricPrecision is specified |
| + // Alter font-size to the right on-screen value to avoid scaling the glyphs themselves, except when GeometricPrecision is specified. |
|
Stephen Chennney
2013/07/08 13:16:28
Save a little work.
scalingFactor = 1;
if (...tex
|
| scalingFactor = SVGRenderingContext::calculateScreenFontSizeScalingFactor(renderer); |
| - if (scalingFactor == 1 || !scalingFactor || style->fontDescription().textRenderingMode() == GeometricPrecision) { |
| + if (scalingFactor == 1 || !scalingFactor) { |
| scalingFactor = 1; |
| scaledFont = style->font(); |
| return; |
| } |
| + if (style->fontDescription().textRenderingMode() == GeometricPrecision) |
| + scalingFactor = 1; |
| + |
| FontDescription fontDescription(style->fontDescription()); |
| // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt). |
| - fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.computedSize(), DoNotUseSmartMinimumForFontSize)); |
| + fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.specifiedSize(), DoNotUseSmartMinimumForFontSize)); |
| scaledFont = Font(fontDescription, 0, 0); |
| scaledFont.update(styleResolver->fontSelector()); |