Commit 2f504d0d authored by Robert Longson's avatar Robert Longson
Browse files

Bug 1825921 - Remove SVGUtils::GetFirstNonAAncestorFrame r=emilio

parent 11a6ea9d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
    }

+0 −10
Original line number Diff line number Diff line
@@ -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()) {
+0 −6
Original line number Diff line number Diff line
@@ -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);