Bug 660216, part 1 - Rename PrependLocalTransformTo to PrependLocalTransformsTo. r=heycam.

This commit is contained in:
Jonathan Watt 2012-02-17 08:12:47 +00:00
parent 06578da801
commit 5913361070
22 changed files with 26 additions and 26 deletions

View File

@ -1486,7 +1486,7 @@ nsSVGElement::GetCtx() const
}
/* virtual */ gfxMatrix
nsSVGElement::PrependLocalTransformTo(const gfxMatrix &aMatrix) const
nsSVGElement::PrependLocalTransformsTo(const gfxMatrix &aMatrix) const
{
return aMatrix;
}

View File

@ -155,7 +155,7 @@ public:
* Returns aMatrix post-multiplied by the transform from the userspace
* established by this element to the userspace established by its parent.
*/
virtual gfxMatrix PrependLocalTransformTo(const gfxMatrix &aMatrix) const;
virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix) const;
// Setter for to set the current <animateMotion> transformation
// Only visible for nsSVGGraphicElement, so it's a no-op here, and that

View File

@ -112,10 +112,10 @@ NS_IMETHODIMP nsSVGForeignObjectElement::GetHeight(nsIDOMSVGAnimatedLength * *aH
// nsSVGElement methods
/* virtual */ gfxMatrix
nsSVGForeignObjectElement::PrependLocalTransformTo(const gfxMatrix &aMatrix) const
nsSVGForeignObjectElement::PrependLocalTransformsTo(const gfxMatrix &aMatrix) const
{
// 'transform' attribute:
gfxMatrix matrix = nsSVGForeignObjectElementBase::PrependLocalTransformTo(aMatrix);
gfxMatrix matrix = nsSVGForeignObjectElementBase::PrependLocalTransformsTo(aMatrix);
// now translate by our 'x' and 'y':
float x, y;

View File

@ -69,7 +69,7 @@ public:
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGForeignObjectElementBase::)
// nsSVGElement specializations:
virtual gfxMatrix PrependLocalTransformTo(const gfxMatrix &aMatrix) const;
virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix) const;
// nsIContent interface
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;

View File

@ -189,7 +189,7 @@ nsSVGGraphicElement::IsEventName(nsIAtom* aName)
}
gfxMatrix
nsSVGGraphicElement::PrependLocalTransformTo(const gfxMatrix &aMatrix) const
nsSVGGraphicElement::PrependLocalTransformsTo(const gfxMatrix &aMatrix) const
{
gfxMatrix result(aMatrix);

View File

@ -62,7 +62,7 @@ public:
// nsIContent interface
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual gfxMatrix PrependLocalTransformTo(const gfxMatrix &aMatrix) const;
virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix) const;
virtual void SetAnimateMotionTransform(const gfxMatrix* aMatrix);
virtual mozilla::SVGAnimatedTransformList* GetAnimatedTransformList();

View File

@ -440,7 +440,7 @@ nsSVGPathElement::GetPathLengthScale(PathLengthScaleForType aFor)
// For textPath, a transform on the referenced path affects the
// textPath layout, so when calculating the actual path length
// we need to take that into account.
matrix = PrependLocalTransformTo(matrix);
matrix = PrependLocalTransformsTo(matrix);
}
nsRefPtr<gfxFlattenedPath> path = GetFlattenedPath(matrix);
if (path) {

View File

@ -1180,7 +1180,7 @@ nsSVGSVGElement::GetLength(PRUint8 aCtxType)
// nsSVGElement methods
/* virtual */ gfxMatrix
nsSVGSVGElement::PrependLocalTransformTo(const gfxMatrix &aMatrix) const
nsSVGSVGElement::PrependLocalTransformsTo(const gfxMatrix &aMatrix) const
{
if (IsInner()) {
float x, y;

View File

@ -186,7 +186,7 @@ public:
virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
// nsSVGElement specializations:
virtual gfxMatrix PrependLocalTransformTo(const gfxMatrix &aMatrix) const;
virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix) const;
// nsSVGSVGElement methods:
float GetLength(PRUint8 mCtxType);

View File

@ -488,10 +488,10 @@ nsSVGUseElement::UnlinkSource()
// nsSVGElement methods
/* virtual */ gfxMatrix
nsSVGUseElement::PrependLocalTransformTo(const gfxMatrix &aMatrix) const
nsSVGUseElement::PrependLocalTransformsTo(const gfxMatrix &aMatrix) const
{
// 'transform' attribute:
gfxMatrix matrix = nsSVGUseElementBase::PrependLocalTransformTo(aMatrix);
gfxMatrix matrix = nsSVGUseElementBase::PrependLocalTransformsTo(aMatrix);
// now translate by our 'x' and 'y':
float x, y;

View File

@ -103,7 +103,7 @@ public:
void DestroyAnonymousContent();
// nsSVGElement specializations:
virtual gfxMatrix PrependLocalTransformTo(const gfxMatrix &aMatrix) const;
virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix) const;
// nsIContent interface
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;

View File

@ -179,7 +179,7 @@ nsSVGAFrame::GetCanvasTM()
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(mParent);
nsSVGAElement *content = static_cast<nsSVGAElement*>(mContent);
gfxMatrix tm = content->PrependLocalTransformTo(parent->GetCanvasTM());
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
mCanvasTM = new gfxMatrix(tm);
}

View File

@ -327,8 +327,8 @@ nsSVGClipPathFrame::GetCanvasTM()
nsSVGClipPathElement *content = static_cast<nsSVGClipPathElement*>(mContent);
gfxMatrix tm =
content->PrependLocalTransformTo(mClipParentMatrix ?
*mClipParentMatrix : gfxMatrix());
content->PrependLocalTransformsTo(mClipParentMatrix ?
*mClipParentMatrix : gfxMatrix());
return nsSVGUtils::AdjustMatrixForUnits(tm,
&content->mEnumAttributes[nsSVGClipPathElement::CLIPPATHUNITS],

View File

@ -266,7 +266,7 @@ nsSVGDisplayContainerFrame::GetBBoxContribution(
nsIContent *content = kid->GetContent();
if (content->IsSVG() && !content->IsNodeOfType(nsINode::eTEXT)) {
transform = static_cast<nsSVGElement*>(content)->
PrependLocalTransformTo(aToBBoxUserspace);
PrependLocalTransformsTo(aToBBoxUserspace);
}
// We need to include zero width/height vertical/horizontal lines, so we have
// to use UnionEdges, but we must special case the first bbox so that we don't

View File

@ -495,7 +495,7 @@ nsSVGForeignObjectFrame::GetCanvasTM()
nsSVGForeignObjectElement *content =
static_cast<nsSVGForeignObjectElement*>(mContent);
gfxMatrix tm = content->PrependLocalTransformTo(parent->GetCanvasTM());
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
mCanvasTM = new gfxMatrix(tm);
}

View File

@ -97,7 +97,7 @@ nsSVGGFrame::GetCanvasTM()
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(mParent);
nsSVGGraphicElement *content = static_cast<nsSVGGraphicElement*>(mContent);
gfxMatrix tm = content->PrependLocalTransformTo(parent->GetCanvasTM());
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
mCanvasTM = new gfxMatrix(tm);
}

View File

@ -251,7 +251,7 @@ nsSVGInnerSVGFrame::GetCanvasTM()
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(mParent);
nsSVGSVGElement *content = static_cast<nsSVGSVGElement*>(mContent);
gfxMatrix tm = content->PrependLocalTransformTo(parent->GetCanvasTM());
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
mCanvasTM = new gfxMatrix(tm);
}

View File

@ -384,7 +384,7 @@ nsSVGPathGeometryFrame::GetCanvasTM()
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(mParent);
nsSVGGraphicElement *content = static_cast<nsSVGGraphicElement*>(mContent);
return content->PrependLocalTransformTo(parent->GetCanvasTM());
return content->PrependLocalTransformsTo(parent->GetCanvasTM());
}
//----------------------------------------------------------------------

View File

@ -208,7 +208,7 @@ nsSVGSwitchFrame::GetBBoxContribution(const gfxMatrix &aToBBoxUserspace,
gfxMatrix transform = aToBBoxUserspace;
if (content->IsSVG()) {
transform = static_cast<nsSVGElement*>(content)->
PrependLocalTransformTo(aToBBoxUserspace);
PrependLocalTransformsTo(aToBBoxUserspace);
}
return svgKid->GetBBoxContribution(transform, aFlags);
}

View File

@ -274,7 +274,7 @@ nsSVGTextFrame::GetCanvasTM()
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(mParent);
nsSVGGraphicElement *content = static_cast<nsSVGGraphicElement*>(mContent);
gfxMatrix tm = content->PrependLocalTransformTo(parent->GetCanvasTM());
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
mCanvasTM = new gfxMatrix(tm);
}

View File

@ -147,7 +147,7 @@ nsSVGTextPathFrame::GetFlattenedPath()
nsSVGPathGeometryElement *element =
static_cast<nsSVGPathGeometryElement*>(path->GetContent());
return element->GetFlattenedPath(element->PrependLocalTransformTo(gfxMatrix()));
return element->GetFlattenedPath(element->PrependLocalTransformsTo(gfxMatrix()));
}
return nsnull;
}

View File

@ -460,14 +460,14 @@ nsSVGUtils::GetCTM(nsSVGElement *aElement, bool aScreenCTM)
currentDoc->FlushPendingNotifications(Flush_Layout);
}
gfxMatrix matrix = aElement->PrependLocalTransformTo(gfxMatrix());
gfxMatrix matrix = aElement->PrependLocalTransformsTo(gfxMatrix());
nsSVGElement *element = aElement;
nsIContent *ancestor = aElement->GetFlattenedTreeParent();
while (ancestor && ancestor->IsSVG() &&
ancestor->Tag() != nsGkAtoms::foreignObject) {
element = static_cast<nsSVGElement*>(ancestor);
matrix *= element->PrependLocalTransformTo(gfxMatrix()); // i.e. *A*ppend
matrix *= element->PrependLocalTransformsTo(gfxMatrix()); // i.e. *A*ppend
if (!aScreenCTM && EstablishesViewport(element)) {
if (!element->NodeInfo()->Equals(nsGkAtoms::svg, kNameSpaceID_SVG) &&
!element->NodeInfo()->Equals(nsGkAtoms::symbol, kNameSpaceID_SVG)) {