Commit a2e2acfb authored by Jonathan Watt's avatar Jonathan Watt
Browse files

Bug 889736, part 1 - Remove nsSVGTextFrame and nsSVGGlyphFrame. r=heycam

parent d13b49a8
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1848,7 +1848,6 @@ GK_ATOM(svgFilterFrame, "SVGFilterFrame")
GK_ATOM(svgForeignObjectFrame, "SVGForeignObjectFrame")
GK_ATOM(svgGenericContainerFrame, "SVGGenericContainerFrame")
GK_ATOM(svgGFrame, "SVGGFrame")
GK_ATOM(svgGlyphFrame, "SVGGlyphFrame")
GK_ATOM(svgGradientFrame, "SVGGradientFrame")
GK_ATOM(svgImageFrame, "SVGImageFrame")
GK_ATOM(svgInnerSVGFrame, "SVGInnerSVGFrame")
@@ -1863,7 +1862,6 @@ GK_ATOM(svgPatternFrame, "SVGPatternFrame")
GK_ATOM(svgRadialGradientFrame, "SVGRadialGradientFrame")
GK_ATOM(svgStopFrame, "SVGStopFrame")
GK_ATOM(svgSwitchFrame, "SVGSwitchFrame")
GK_ATOM(svgTextFrame, "SVGTextFrame")
GK_ATOM(svgTextFrame2, "SVGTextFrame2")
GK_ATOM(svgTextPathFrame, "SVGTextPathFrame")
GK_ATOM(svgTSpanFrame, "SVGTSpanFrame")
+1 −4
Original line number Diff line number Diff line
@@ -204,10 +204,7 @@ DoApplyRenderingChangeToTree(nsIFrame* aFrame,
      }
    }
    if (aChange & nsChangeHint_UpdateTextPath) {
      if (aFrame->GetType() == nsGkAtoms::svgTextPathFrame) {
        // Invalidate and reflow the entire nsSVGTextFrame:
        static_cast<nsSVGTextPathFrame*>(aFrame)->NotifyGlyphMetricsChange();
      } else if (aFrame->IsSVGText()) {
      if (aFrame->IsSVGText()) {
        // Invalidate and reflow the entire nsSVGTextFrame2:
        NS_ASSERTION(aFrame->GetContent()->IsSVG(nsGkAtoms::textPath),
                     "expected frame for a <textPath> element");
+1 −16
Original line number Diff line number Diff line
@@ -122,12 +122,8 @@ NS_NewSVGForeignObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGAFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGGlyphFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGSwitchFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGTextFrame2(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGTSpanFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
@@ -3160,13 +3156,6 @@ nsCSSFrameConstructor::FindTextData(nsIFrame* aParentFrame)
        if (ancestorFrame->IsSVGText()) {
          return &sSVGTextData;
        }
      } else {
        static const FrameConstructionData sSVGGlyphData =
          SIMPLE_FCDATA(NS_NewSVGGlyphFrame);
        nsSVGTextContainerFrame* metrics = do_QueryFrame(ancestorFrame);
        if (metrics) {
          return &sSVGGlyphData;
        }
      }
    }
    return nullptr;
@@ -4984,10 +4973,7 @@ nsCSSFrameConstructor::FindSVGData(Element* aElement,
        }
      } else if (aTag == nsGkAtoms::textPath) {
        // textPath must be a child of text.
        nsIAtom* ancestorFrameType = ancestorFrame->GetType();
        if (ancestorFrameType != nsGkAtoms::svgTextFrame) {
          return &sSuppressData;
        }
        return &sSuppressData; // XXXsvgtext - nsSVGTextPathFrame not used in new SVG text world
      } else if (aTag != nsGkAtoms::a) {
        // Every other element except 'a' must not be a child of a text content
        // element.
@@ -5018,7 +5004,6 @@ nsCSSFrameConstructor::FindSVGData(Element* aElement,
                                 nsCSSAnonBoxes::mozSVGForeignContent) },
    SIMPLE_SVG_CREATE(a, NS_NewSVGAFrame),
    SIMPLE_SVG_CREATE(altGlyph, NS_NewSVGTSpanFrame),
    SIMPLE_SVG_CREATE(text, NS_NewSVGTextFrame),
    SIMPLE_SVG_CREATE(tspan, NS_NewSVGTSpanFrame),
    SIMPLE_SVG_CREATE(linearGradient, NS_NewSVGLinearGradientFrame),
    SIMPLE_SVG_CREATE(radialGradient, NS_NewSVGRadialGradientFrame),
+1 −1
Original line number Diff line number Diff line
@@ -7347,7 +7347,7 @@ nsIFrame::VerticalAlignEnum() const
    for (const nsIFrame* frame = this; frame; frame = frame->GetParent()) {
      dominantBaseline = frame->StyleSVGReset()->mDominantBaseline;
      if (dominantBaseline != NS_STYLE_DOMINANT_BASELINE_AUTO ||
          frame->GetType() == nsGkAtoms::svgTextFrame) {
          frame->GetType() == nsGkAtoms::svgTextFrame2) {
        break;
      }
    }
+0 −2
Original line number Diff line number Diff line
@@ -137,7 +137,6 @@ FRAME_ID(nsSVGForeignObjectFrame)
FRAME_ID(nsSVGGenericContainerFrame)
FRAME_ID(nsSVGGeometryFrame)
FRAME_ID(nsSVGGFrame)
FRAME_ID(nsSVGGlyphFrame)
FRAME_ID(nsSVGGradientFrame)
FRAME_ID(nsSVGImageFrame)
FRAME_ID(nsSVGInnerSVGFrame)
@@ -154,7 +153,6 @@ FRAME_ID(nsSVGRadialGradientFrame)
FRAME_ID(nsSVGStopFrame)
FRAME_ID(nsSVGSwitchFrame)
FRAME_ID(nsSVGTextContainerFrame)
FRAME_ID(nsSVGTextFrame)
FRAME_ID(nsSVGTextFrame2)
FRAME_ID(nsSVGTextPathFrame)
FRAME_ID(nsSVGTSpanFrame)
Loading