| Index: Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
|
| diff --git a/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp b/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
|
| index 113fc8d4e1d6c94dbcc62d021afe5763d32bc3e8..ca02d789046eb03be10d0d3d628e3c3ebc152a3a 100644
|
| --- a/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
|
| +++ b/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
|
| @@ -24,7 +24,7 @@
|
| #include "core/layout/LayoutObject.h"
|
| #include "core/layout/style/SVGLayoutStyle.h"
|
| #include "core/layout/svg/SVGTextMetrics.h"
|
| -#include "core/svg/SVGLengthContext.h"
|
| +#include "platform/LengthFunctions.h"
|
| #include "platform/fonts/Font.h"
|
| #include "platform/text/UnicodeRange.h"
|
|
|
| @@ -35,18 +35,15 @@ SVGTextLayoutEngineBaseline::SVGTextLayoutEngineBaseline(const Font& font)
|
| {
|
| }
|
|
|
| -float SVGTextLayoutEngineBaseline::calculateBaselineShift(const SVGLayoutStyle& style, SVGElement* contextElement) const
|
| +float SVGTextLayoutEngineBaseline::calculateBaselineShift(const LayoutStyle& style) const
|
| {
|
| - if (style.baselineShift() == BS_LENGTH) {
|
| - RefPtrWillBeRawPtr<SVGLength> baselineShiftValueLength = style.baselineShiftValue();
|
| - if (baselineShiftValueLength->unitType() == LengthTypePercentage)
|
| - return baselineShiftValueLength->scaleByPercentage(m_font.fontDescription().computedPixelSize());
|
| -
|
| - SVGLengthContext lengthContext(contextElement);
|
| - return baselineShiftValueLength->value(lengthContext);
|
| + const SVGLayoutStyle& svgStyle = style.svgStyle();
|
| + if (svgStyle.baselineShift() == BS_LENGTH) {
|
| + const float zoom = style.effectiveZoom();
|
| + return floatValueForLength(svgStyle.baselineShiftValue(), m_font.fontDescription().computedPixelSize() * zoom) / zoom;
|
| }
|
|
|
| - switch (style.baselineShift()) {
|
| + switch (svgStyle.baselineShift()) {
|
| case BS_BASELINE:
|
| return 0;
|
| case BS_SUB:
|
|
|