зеркало из https://github.com/mozilla/pjs.git
Bug 660216, part 1 - Rename PrependLocalTransformTo to PrependLocalTransformsTo. r=heycam.
This commit is contained in:
Родитель
ce43377d28
Коммит
91191f8840
|
@ -1486,7 +1486,7 @@ nsSVGElement::GetCtx() const
|
|||
}
|
||||
|
||||
/* virtual */ gfxMatrix
|
||||
nsSVGElement::PrependLocalTransformTo(const gfxMatrix &aMatrix) const
|
||||
nsSVGElement::PrependLocalTransformsTo(const gfxMatrix &aMatrix) const
|
||||
{
|
||||
return aMatrix;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -189,7 +189,7 @@ nsSVGGraphicElement::IsEventName(nsIAtom* aName)
|
|||
}
|
||||
|
||||
gfxMatrix
|
||||
nsSVGGraphicElement::PrependLocalTransformTo(const gfxMatrix &aMatrix) const
|
||||
nsSVGGraphicElement::PrependLocalTransformsTo(const gfxMatrix &aMatrix) const
|
||||
{
|
||||
gfxMatrix result(aMatrix);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -327,7 +327,7 @@ nsSVGClipPathFrame::GetCanvasTM()
|
|||
nsSVGClipPathElement *content = static_cast<nsSVGClipPathElement*>(mContent);
|
||||
|
||||
gfxMatrix tm =
|
||||
content->PrependLocalTransformTo(mClipParentMatrix ?
|
||||
content->PrependLocalTransformsTo(mClipParentMatrix ?
|
||||
*mClipParentMatrix : gfxMatrix());
|
||||
|
||||
return nsSVGUtils::AdjustMatrixForUnits(tm,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче