Loading dom/svg/SVGAnimatedLength.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ float SVGAnimatedLength::GetPixelsPerUnit(SVGViewportElement* aCtx, float SVGAnimatedLength::GetPixelsPerUnit(nsIFrame* aFrame, uint8_t aUnitType) const { nsIContent* content = aFrame->GetContent(); MOZ_ASSERT(!content->IsText(), "Not expecting text content"); if (content->IsSVGElement()) { return GetPixelsPerUnit( SVGElementMetrics(static_cast<SVGElement*>(content)), aUnitType); Loading layout/svg/SVGGradientFrame.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -237,7 +237,7 @@ already_AddRefed<gfxPattern> SVGGradientFrame::GetPaintServerPattern( // Set mSource for this consumer. // If this gradient is applied to text, our caller will be the glyph, which // is not an element, so we need to get the parent mSource = aSource->GetContent()->IsText() ? aSource->GetParent() : aSource; mSource = aSource->IsTextFrame() ? aSource->GetParent() : aSource; } AutoTArray<nsIFrame*, 8> stopFrames; Loading layout/svg/SVGObserverUtils.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1566,7 +1566,7 @@ SVGPaintServerFrame* SVGObserverUtils::GetAndObservePaintServer( // least look up past a text frame, and if the text frame's parent is the // anonymous block frame, then we look up to its parent (the SVGTextFrame). nsIFrame* paintedFrame = aPaintedFrame; if (paintedFrame->GetContent()->IsText()) { if (paintedFrame->IsInSVGTextSubtree()) { paintedFrame = paintedFrame->GetParent(); nsIFrame* grandparent = paintedFrame->GetParent(); if (grandparent && grandparent->IsSVGTextFrame()) { Loading layout/svg/SVGPatternFrame.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -595,6 +595,9 @@ gfxRect SVGPatternFrame::GetPatternRect(uint16_t aPatternUnits, width = SVGUtils::ObjectSpace(aTargetBBox, tmpWidth); height = SVGUtils::ObjectSpace(aTargetBBox, tmpHeight); } else { if (aTarget->IsTextFrame()) { aTarget = aTarget->GetParent(); } float scale = MaxExpansion(aTargetCTM); x = SVGUtils::UserSpace(aTarget, tmpX) * scale; y = SVGUtils::UserSpace(aTarget, tmpY) * scale; Loading @@ -611,8 +614,11 @@ gfxMatrix SVGPatternFrame::ConstructCTM(const SVGAnimatedViewBox& aViewBox, const gfxRect& callerBBox, const Matrix& callerCTM, nsIFrame* aTarget) { SVGViewportElement* ctx = nullptr; if (aTarget->IsTextFrame()) { aTarget = aTarget->GetParent(); } nsIContent* targetContent = aTarget->GetContent(); SVGViewportElement* ctx = nullptr; gfxFloat scaleX, scaleY; // The objectBoundingBox conversion must be handled in the CTM: Loading layout/svg/SVGUtils.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,7 @@ float SVGUtils::UserSpace(SVGElement* aSVGElement, float SVGUtils::UserSpace(nsIFrame* aNonSVGContext, const SVGAnimatedLength* aLength) { MOZ_ASSERT(!aNonSVGContext->IsTextFrame(), "Not expecting text content"); return aLength->GetAnimValue(aNonSVGContext); } Loading Loading
dom/svg/SVGAnimatedLength.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ float SVGAnimatedLength::GetPixelsPerUnit(SVGViewportElement* aCtx, float SVGAnimatedLength::GetPixelsPerUnit(nsIFrame* aFrame, uint8_t aUnitType) const { nsIContent* content = aFrame->GetContent(); MOZ_ASSERT(!content->IsText(), "Not expecting text content"); if (content->IsSVGElement()) { return GetPixelsPerUnit( SVGElementMetrics(static_cast<SVGElement*>(content)), aUnitType); Loading
layout/svg/SVGGradientFrame.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -237,7 +237,7 @@ already_AddRefed<gfxPattern> SVGGradientFrame::GetPaintServerPattern( // Set mSource for this consumer. // If this gradient is applied to text, our caller will be the glyph, which // is not an element, so we need to get the parent mSource = aSource->GetContent()->IsText() ? aSource->GetParent() : aSource; mSource = aSource->IsTextFrame() ? aSource->GetParent() : aSource; } AutoTArray<nsIFrame*, 8> stopFrames; Loading
layout/svg/SVGObserverUtils.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1566,7 +1566,7 @@ SVGPaintServerFrame* SVGObserverUtils::GetAndObservePaintServer( // least look up past a text frame, and if the text frame's parent is the // anonymous block frame, then we look up to its parent (the SVGTextFrame). nsIFrame* paintedFrame = aPaintedFrame; if (paintedFrame->GetContent()->IsText()) { if (paintedFrame->IsInSVGTextSubtree()) { paintedFrame = paintedFrame->GetParent(); nsIFrame* grandparent = paintedFrame->GetParent(); if (grandparent && grandparent->IsSVGTextFrame()) { Loading
layout/svg/SVGPatternFrame.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -595,6 +595,9 @@ gfxRect SVGPatternFrame::GetPatternRect(uint16_t aPatternUnits, width = SVGUtils::ObjectSpace(aTargetBBox, tmpWidth); height = SVGUtils::ObjectSpace(aTargetBBox, tmpHeight); } else { if (aTarget->IsTextFrame()) { aTarget = aTarget->GetParent(); } float scale = MaxExpansion(aTargetCTM); x = SVGUtils::UserSpace(aTarget, tmpX) * scale; y = SVGUtils::UserSpace(aTarget, tmpY) * scale; Loading @@ -611,8 +614,11 @@ gfxMatrix SVGPatternFrame::ConstructCTM(const SVGAnimatedViewBox& aViewBox, const gfxRect& callerBBox, const Matrix& callerCTM, nsIFrame* aTarget) { SVGViewportElement* ctx = nullptr; if (aTarget->IsTextFrame()) { aTarget = aTarget->GetParent(); } nsIContent* targetContent = aTarget->GetContent(); SVGViewportElement* ctx = nullptr; gfxFloat scaleX, scaleY; // The objectBoundingBox conversion must be handled in the CTM: Loading
layout/svg/SVGUtils.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,7 @@ float SVGUtils::UserSpace(SVGElement* aSVGElement, float SVGUtils::UserSpace(nsIFrame* aNonSVGContext, const SVGAnimatedLength* aLength) { MOZ_ASSERT(!aNonSVGContext->IsTextFrame(), "Not expecting text content"); return aLength->GetAnimValue(aNonSVGContext); } Loading