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

Unified Diff: Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp

Issue 323053002: Unapply effectiveZoom during SVG layout (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add tests Created 6 years, 6 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 | « Source/core/rendering/svg/SVGTextLayoutEngineSpacing.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp b/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
index 846c43ecf668a984342c6fee8c6d3eac88a7ce93..e93bb48b41af27f3f52adf63b7406f2cd00332f7 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
@@ -33,13 +33,15 @@
namespace WebCore {
-SVGTextLayoutEngineSpacing::SVGTextLayoutEngineSpacing(const Font& font)
+SVGTextLayoutEngineSpacing::SVGTextLayoutEngineSpacing(const Font& font, float effectiveZoom)
: m_font(font)
, m_lastCharacter(0)
+ , m_effectiveZoom(effectiveZoom)
#if ENABLE(SVG_FONTS)
, m_lastGlyph(0)
#endif
{
+ ASSERT(m_effectiveZoom);
}
float SVGTextLayoutEngineSpacing::calculateSVGKerning(bool isVerticalText, Glyph currentGlyph)
@@ -96,6 +98,9 @@ float SVGTextLayoutEngineSpacing::calculateCSSSpacing(UChar currentCharacter)
spacing += m_font.fontDescription().wordSpacing();
}
+ if (m_effectiveZoom != 1)
+ spacing = spacing / m_effectiveZoom;
+
return spacing;
}
« no previous file with comments | « Source/core/rendering/svg/SVGTextLayoutEngineSpacing.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698