Bug 1825921 - Remove SVGUtils::GetFirstNonAAncestorFrame r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D174352
This commit is contained in:
Robert Longson
2023-04-02 05:34:40 +00:00
parent bd4b217ed6
commit 55fb652cdd
3 changed files with 1 additions and 18 deletions

View File

@@ -3338,8 +3338,7 @@ const nsCSSFrameConstructor::FrameConstructionData*
nsCSSFrameConstructor::FindTextData(const Text& aTextContent,
nsIFrame* aParentFrame) {
if (aParentFrame && IsFrameForSVG(aParentFrame)) {
nsIFrame* ancestorFrame = SVGUtils::GetFirstNonAAncestorFrame(aParentFrame);
if (!ancestorFrame || !SVGUtils::IsInSVGTextSubtree(ancestorFrame)) {
if (!SVGUtils::IsInSVGTextSubtree(aParentFrame)) {
return nullptr;
}

View File

@@ -1217,16 +1217,6 @@ gfxMatrix SVGUtils::AdjustMatrixForUnits(const gfxMatrix& aMatrix,
return aMatrix;
}
nsIFrame* SVGUtils::GetFirstNonAAncestorFrame(nsIFrame* aStartFrame) {
for (nsIFrame* ancestorFrame = aStartFrame; ancestorFrame;
ancestorFrame = ancestorFrame->GetParent()) {
if (!ancestorFrame->IsSVGAFrame()) {
return ancestorFrame;
}
}
return nullptr;
}
bool SVGUtils::GetNonScalingStrokeTransform(const nsIFrame* aFrame,
gfxMatrix* aUserToOuterSVG) {
if (aFrame->GetContent()->IsText()) {

View File

@@ -421,12 +421,6 @@ class SVGUtils final {
const gfxRect& aBBox,
const dom::UserSpaceMetrics& aMetrics);
/**
* Find the first frame, starting with aStartFrame and going up its
* parent chain, that is not an svgAFrame.
*/
static nsIFrame* GetFirstNonAAncestorFrame(nsIFrame* aStartFrame);
static bool OuterSVGIsCallingReflowSVG(nsIFrame* aFrame);
static bool AnyOuterSVGIsCallingReflowSVG(nsIFrame* aFrame);