From 25bd606d806293f0d8bc52d223919c8ea3476be4 Mon Sep 17 00:00:00 2001 From: Robert Longson Date: Thu, 29 Mar 2018 03:12:05 +0100 Subject: [PATCH] Bug 1448774. r=dholbert, a=RyanVM --HG-- extra : source : edfd9ffbd7208ef0a59f40a0d77d8dd53c905cb9 extra : intermediate-source : 3784b22ec536b08ce95201d73ae8806340c18b8c --- dom/svg/SVGTextContentElement.h | 1 + layout/svg/SVGTextFrame.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dom/svg/SVGTextContentElement.h b/dom/svg/SVGTextContentElement.h index 905468228f..5f126c8112 100644 --- a/dom/svg/SVGTextContentElement.h +++ b/dom/svg/SVGTextContentElement.h @@ -29,6 +29,7 @@ typedef SVGGraphicsElement SVGTextContentElementBase; class SVGTextContentElement : public SVGTextContentElementBase { + friend class ::SVGTextFrame; public: using FragmentOrElement::TextLength; diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index e681260682..e5a03333f9 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -5111,8 +5111,8 @@ SVGTextFrame::DoGlyphPositioning() float actualTextLength = static_cast(presContext->AppUnitsToGfxUnits(frameLength) * factor); - RefPtr lengthAdjustEnum = element->LengthAdjust(); - uint16_t lengthAdjust = lengthAdjustEnum->AnimVal(); + uint16_t lengthAdjust = + element->EnumAttributes()[SVGTextContentElement::LENGTHADJUST].GetAnimValue(); switch (lengthAdjust) { case SVG_LENGTHADJUST_SPACINGANDGLYPHS: // Scale the glyphs and their positions.