Bug 1825921 - Remove SVGUtils::GetFirstNonAAncestorFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D174352
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user