зеркало из https://github.com/mozilla/pjs.git
Bug 345488 - transform from path not applied to textPath. r=longson, sr=roc
This commit is contained in:
Родитель
07735904ee
Коммит
433fa6c610
|
@ -251,3 +251,29 @@ nsSVGTextPathFrame::AttributeChanged(PRInt32 aNameSpaceID,
|
|||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGContainerFrame methods:
|
||||
|
||||
already_AddRefed<nsIDOMSVGMatrix>
|
||||
nsSVGTextPathFrame::GetCanvasTM()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGMatrix> transform = nsSVGTextPathFrameBase::GetCanvasTM();
|
||||
|
||||
nsIFrame *path = GetPathFrame();
|
||||
if (path) {
|
||||
nsSVGGraphicElement *element =
|
||||
NS_STATIC_CAST(nsSVGGraphicElement*, path->GetContent());
|
||||
nsCOMPtr<nsIDOMSVGMatrix> localTM = element->GetLocalTransformMatrix();
|
||||
|
||||
if (localTM) {
|
||||
nsCOMPtr<nsIDOMSVGMatrix> tmp;
|
||||
transform->Multiply(localTM, getter_AddRefs(tmp));
|
||||
transform = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
nsIDOMSVGMatrix* retval = nsnull;
|
||||
transform.swap(retval);
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -87,6 +87,9 @@ public:
|
|||
nsSVGFlattenedPath *GetFlattenedPath();
|
||||
nsIFrame *GetPathFrame();
|
||||
|
||||
// nsSVGContainerFrame methods:
|
||||
virtual already_AddRefed<nsIDOMSVGMatrix> GetCanvasTM();
|
||||
|
||||
// nsISupports interface:
|
||||
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче