Backout d6b34be6fb4c for causing reftest failures on a CLOSED TREE

This commit is contained in:
Matt Woodrow 2013-04-18 14:21:25 +12:00
parent ec2f166ceb
commit 4b9c22e2f6
2 changed files with 4 additions and 28 deletions

View File

@ -156,35 +156,15 @@ nsSVGPathGeometryFrame::IsSVGTransformed(gfxMatrix *aOwnTransform,
content->GetAnimatedTransformList();
if ((transformList && transformList->HasTransform()) ||
content->GetAnimateMotionTransform()) {
gfxMatrix temp = content->PrependLocalTransformsTo(gfxMatrix(),
nsSVGElement::eUserSpaceToParent);
if (temp.HasNonTranslation()) {
if (aOwnTransform) {
*aOwnTransform = temp;
}
foundTransform = true;
if (aOwnTransform) {
*aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(),
nsSVGElement::eUserSpaceToParent);
}
foundTransform = true;
}
return foundTransform;
}
gfxPoint
nsSVGPathGeometryFrame::GetOwnTransformIfOnlyTranslation() const
{
nsSVGElement *content = static_cast<nsSVGElement*>(mContent);
if (!content->GetAnimatedTransformList() &&
!content->GetAnimateMotionTransform()) {
return gfxPoint();
}
gfxMatrix temp = content->PrependLocalTransformsTo(gfxMatrix(),
nsSVGElement::eUserSpaceToParent);
if (temp.HasNonTranslation()) {
return gfxPoint();
}
return temp.GetTranslation();
}
void
nsSVGPathGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
@ -634,8 +614,6 @@ nsSVGPathGeometryFrame::GeneratePath(gfxContext* aContext,
aContext->SetLineCap(gfxContext::LINE_CAP_SQUARE);
}
gfxContextMatrixAutoSaveRestore save(aContext);
aContext->Translate(GetOwnTransformIfOnlyTranslation());
aContext->NewPath();
static_cast<nsSVGPathGeometryElement*>(mContent)->ConstructPath(aContext);
}

View File

@ -97,8 +97,6 @@ protected:
protected:
void GeneratePath(gfxContext *aContext, const gfxMatrix &aTransform);
gfxPoint GetOwnTransformIfOnlyTranslation() const;
private:
enum { eRenderFill = 1, eRenderStroke = 2 };
void Render(nsRenderingContext *aContext, uint32_t aRenderComponents);