Backed out changeset a329aa4bc026; r=bustage

This commit is contained in:
Ms2ger 2012-03-31 13:23:37 +02:00
parent 592452bd22
commit fa526f509b
4 changed files with 5 additions and 28 deletions

View File

@ -580,14 +580,10 @@ nsSVGPatternFrame::ConstructCTM(const gfxRect &callerBBox,
tCTM.Scale(scale, scale);
}
const nsSVGViewBox& viewBox = GetViewBox();
if (!viewBox.IsValid()) {
return tCTM;
}
const nsSVGViewBoxRect viewBoxRect = GetViewBox().GetAnimValue();
const nsSVGViewBoxRect viewBox = GetViewBox().GetAnimValue();
if (viewBoxRect.height <= 0.0f || viewBoxRect.width <= 0.0f) {
return gfxMatrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); // singular
if (viewBox.height <= 0.0f || viewBox.width <= 0.0f) {
return tCTM;
}
float viewportWidth, viewportHeight;
@ -606,16 +602,11 @@ nsSVGPatternFrame::ConstructCTM(const gfxRect &callerBBox,
viewportHeight =
GetLengthValue(nsSVGPatternElement::HEIGHT)->GetAnimValue(aTarget);
}
if (viewportWidth <= 0.0f || viewportHeight <= 0.0f) {
return gfxMatrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); // singular
}
gfxMatrix tm = nsSVGUtils::GetViewBoxTransform(
static_cast<nsSVGPatternElement*>(mContent),
viewportWidth, viewportHeight,
viewBoxRect.x, viewBoxRect.y,
viewBoxRect.width, viewBoxRect.height,
viewBox.x, viewBox.y,
viewBox.width, viewBox.height,
GetPreserveAspectRatio());
return tm * tCTM;

View File

@ -1,6 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg">
<pattern id="test" viewBox="0 0 10 10" height="-65%">
<rect/>
</pattern>
<rect width="100" height="100" fill="url(#test)"/>
</svg>

Before

Width:  |  Height:  |  Size: 182 B

View File

@ -1,6 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg">
<pattern id="test" viewBox="0 0 10 10" width="-65%">
<rect/>
</pattern>
<rect width="100" height="100" fill="url(#test)"/>
</svg>

Before

Width:  |  Height:  |  Size: 181 B

View File

@ -125,5 +125,3 @@ load 713413-1.svg
load 722003-1.svg
load 725918-1.svg
load 732836-1.svg
load 740627-1.svg
load 740627-2.svg