mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
Bug 342542 - Repair textPath from bug 342200. r=longsonr, sr=roc
This commit is contained in:
parent
65ef342f8e
commit
8b3428ca1a
@ -1312,10 +1312,8 @@ GK_ATOM(textInputFrame,"TextInputFrame")
|
||||
GK_ATOM(textFrame, "TextFrame")
|
||||
GK_ATOM(viewportFrame, "ViewportFrame")
|
||||
#ifdef MOZ_SVG
|
||||
GK_ATOM(svgCircleFrame, "SVGCircleFrame")
|
||||
GK_ATOM(svgClipPathFrame, "SVGClipPathFrame")
|
||||
GK_ATOM(svgDefsFrame, "SVGDefsFrame")
|
||||
GK_ATOM(svgEllipseFrame, "SVGEllipseFrame")
|
||||
GK_ATOM(svgFilterFrame, "SVGFilterFrame")
|
||||
#ifdef MOZ_SVG_FOREIGNOBJECT
|
||||
GK_ATOM(svgForeignObjectFrame, "SVGForeignObjectFrame")
|
||||
@ -1327,17 +1325,12 @@ GK_ATOM(svgGradientFrame, "SVGGradientFrame")
|
||||
GK_ATOM(svgImageFrame, "SVGImageFrame")
|
||||
GK_ATOM(svgInnerSVGFrame, "SVGInnerSVGFrame")
|
||||
GK_ATOM(svgLinearGradientFrame, "SVGLinearGradientFrame")
|
||||
GK_ATOM(svgLineFrame, "SVGLineFrame")
|
||||
GK_ATOM(svgMarkerFrame, "SVGMarkerFrame")
|
||||
GK_ATOM(svgMaskFrame, "SVGMaskFrame")
|
||||
GK_ATOM(svgOuterSVGFrame, "SVGOuterSVGFrame")
|
||||
GK_ATOM(svgPathFrame, "SVGPathFrame")
|
||||
GK_ATOM(svgPathGeometryFrame, "SVGPathGeometryFrame")
|
||||
GK_ATOM(svgPatternFrame, "SVGPatternFrame")
|
||||
GK_ATOM(svgPolygonFrame, "SVGPolygonFrame")
|
||||
GK_ATOM(svgPolylineFrame, "SVGPolylineFrame")
|
||||
GK_ATOM(svgRadialGradientFrame, "SVGRadialGradientFrame")
|
||||
GK_ATOM(svgRectFrame, "SVGRectFrame")
|
||||
GK_ATOM(svgStopFrame, "SVGStopFrame")
|
||||
GK_ATOM(svgTextFrame, "SVGTextFrame")
|
||||
GK_ATOM(svgTextPathFrame, "SVGTextPathFrame")
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks);
|
||||
virtual void ConstructPath(cairo_t *aCtx);
|
||||
|
||||
nsSVGFlattenedPath *GetFlattenedPath();
|
||||
virtual nsSVGFlattenedPath *GetFlattenedPath();
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -65,3 +65,9 @@ void
|
||||
nsSVGPathGeometryElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
|
||||
{
|
||||
}
|
||||
|
||||
nsSVGFlattenedPath *
|
||||
nsSVGPathGeometryElement::GetFlattenedPath()
|
||||
{
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -47,6 +47,8 @@ struct nsSVGMark {
|
||||
x(aX), y(aY), angle(aAngle) {}
|
||||
};
|
||||
|
||||
class nsSVGFlattenedPath;
|
||||
|
||||
typedef nsSVGGraphicElement nsSVGPathGeometryElementBase;
|
||||
|
||||
class nsSVGPathGeometryElement : public nsSVGPathGeometryElementBase
|
||||
@ -58,6 +60,7 @@ public:
|
||||
virtual PRBool IsMarkable();
|
||||
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks);
|
||||
virtual void ConstructPath(cairo_t *aCtx) = 0;
|
||||
virtual nsSVGFlattenedPath *GetFlattenedPath();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -178,7 +178,7 @@ nsSVGTextPathFrame::GetFlattenedPath() {
|
||||
|
||||
nsSVGUtils::GetReferencedFrame(&path, targetURI, mContent,
|
||||
GetPresContext()->PresShell());
|
||||
if (!path || (path->GetType() != nsGkAtoms::svgPathFrame))
|
||||
if (!path || (path->GetType() != nsGkAtoms::svgPathGeometryFrame))
|
||||
return nsnull;
|
||||
|
||||
if (!mSegments) {
|
||||
@ -190,10 +190,10 @@ nsSVGTextPathFrame::GetFlattenedPath() {
|
||||
}
|
||||
}
|
||||
|
||||
nsSVGPathElement *pathElement = NS_STATIC_CAST(nsSVGPathElement*,
|
||||
path->GetContent());
|
||||
nsSVGPathGeometryElement *element = NS_STATIC_CAST(nsSVGPathGeometryElement*,
|
||||
path->GetContent());
|
||||
|
||||
return pathElement->GetFlattenedPath();
|
||||
return element->GetFlattenedPath();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user