mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 736791 - translate transforms are not serialised correctly. r=jwatt
This commit is contained in:
parent
218dc8bcda
commit
8934f3b783
@ -53,7 +53,8 @@ SVGTransform::GetValueAsString(nsAString& aValue) const
|
||||
|
||||
switch (mType) {
|
||||
case nsIDOMSVGTransform::SVG_TRANSFORM_TRANSLATE:
|
||||
if (mMatrix.x0 != mMatrix.y0)
|
||||
// The spec say that if Y is not provided, it is assumed to be zero.
|
||||
if (mMatrix.y0 != 0)
|
||||
nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
|
||||
NS_LITERAL_STRING("translate(%g, %g)").get(),
|
||||
mMatrix.x0, mMatrix.y0);
|
||||
|
@ -80,6 +80,16 @@ function run()
|
||||
0, 1,
|
||||
0, 10,
|
||||
0, "matrix");
|
||||
|
||||
// If ty is not supplied it is assumed to be zero
|
||||
g.setAttribute("transform", "translate(5)");
|
||||
|
||||
// test that the SVGTransform now reflects the matrix value
|
||||
checkTransform(t, SVGTransform.SVG_TRANSFORM_TRANSLATE,
|
||||
1, 0,
|
||||
0, 1,
|
||||
5, 0,
|
||||
0, "transform");
|
||||
|
||||
// set the SVGTransform to be a rotate()
|
||||
t.setRotate(90, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user