Index: Source/core/layout/svg/SVGTextLayoutEngineBaseline.h |
diff --git a/Source/core/layout/svg/SVGTextLayoutEngineBaseline.h b/Source/core/layout/svg/SVGTextLayoutEngineBaseline.h |
index 96e3325c05ba5e0d513eeb9a152439da2210809d..d7497c794a797aeaa70cdf7593a5c9c7caad6292 100644 |
--- a/Source/core/layout/svg/SVGTextLayoutEngineBaseline.h |
+++ b/Source/core/layout/svg/SVGTextLayoutEngineBaseline.h |
@@ -36,7 +36,7 @@ class SVGTextMetrics; |
class SVGTextLayoutEngineBaseline { |
WTF_MAKE_NONCOPYABLE(SVGTextLayoutEngineBaseline); |
public: |
- SVGTextLayoutEngineBaseline(const Font&); |
+ SVGTextLayoutEngineBaseline(const Font&, float effectiveZoom); |
float calculateBaselineShift(const ComputedStyle&) const; |
float calculateAlignmentBaselineShift(bool isVerticalText, const LayoutObject* textRenderer) const; |
@@ -47,6 +47,11 @@ private: |
EAlignmentBaseline dominantBaselineToAlignmentBaseline(bool isVerticalText, const LayoutObject* textRenderer) const; |
const Font& m_font; |
+ |
+ // Everything we read from the m_font's font descriptor during layout is scaled by the effective |
+ // zoom, as fonts always are in computed style. Since layout inside SVG takes place in unzoomed |
+ // coordinates we have to compensate for zoom when reading values from the font descriptor. |
+ float m_effectiveZoom; |
}; |
} // namespace blink |