From acf95284e7d9b00d4ab1e526dc5f12b4d29bdff1 Mon Sep 17 00:00:00 2001 From: Robert Longson Date: Thu, 29 Mar 2018 03:12:05 +0100 Subject: 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 905468228..5f126c811 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 e68126068..e5a03333f 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. -- cgit v1.2.3