зеркало из https://github.com/mozilla/pjs.git
Bug 455445 - -moz-transform skew() function should accept two parameters, and second should default to zero; r+sr=dbaron
This commit is contained in:
Родитель
9b4349f536
Коммит
d7e024ce53
|
@ -66,3 +66,7 @@ random == percent-1g.html percent-1-ref.html
|
|||
== transform-svg-1a.xhtml transform-svg-1-ref.xhtml
|
||||
== transform-svg-2a.xhtml transform-svg-2-ref.xhtml
|
||||
!= transform-svg-2a.xhtml transform-svg-2-fail.xhtml
|
||||
# skew should allow a mix of one and two parameters.
|
||||
== skew-1a.html skew-1-ref.html
|
||||
== skew-1b.html skew-1-ref.html
|
||||
== skew-2a.html skew-2-ref.html
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 100px; background-color: gold; border: 1px solid black; -moz-transform: skewx(10deg);">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 100px; background-color: gold; border: 1px solid black; -moz-transform: skew(10deg);">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 100px; background-color: gold; border: 1px solid black; -moz-transform: skew(10deg, 0deg);">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 100px; background-color: gold; border: 1px solid black; -moz-transform: skewy(10deg);">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 100px; background-color: gold; border: 1px solid black; -moz-transform: skew(0deg, 10deg);">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6806,6 +6806,7 @@ static PRBool GetFunctionParseInformation(nsCSSKeyword aToken,
|
|||
enum { eLengthPercent,
|
||||
eTwoLengthPercents,
|
||||
eAngle,
|
||||
eTwoAngles,
|
||||
eNumber,
|
||||
eTwoNumbers,
|
||||
eMatrix,
|
||||
|
@ -6815,6 +6816,7 @@ static PRBool GetFunctionParseInformation(nsCSSKeyword aToken,
|
|||
{VARIANT_LENGTH | VARIANT_PERCENT},
|
||||
{VARIANT_LENGTH | VARIANT_PERCENT, VARIANT_LENGTH | VARIANT_PERCENT},
|
||||
{VARIANT_ANGLE},
|
||||
{VARIANT_ANGLE, VARIANT_ANGLE},
|
||||
{VARIANT_NUMBER},
|
||||
{VARIANT_NUMBER, VARIANT_NUMBER},
|
||||
{VARIANT_NUMBER, VARIANT_NUMBER, VARIANT_NUMBER, VARIANT_NUMBER,
|
||||
|
@ -6822,7 +6824,7 @@ static PRBool GetFunctionParseInformation(nsCSSKeyword aToken,
|
|||
|
||||
#ifdef DEBUG
|
||||
static const PRUint8 kVariantMaskLengths[eNumVariantMasks] =
|
||||
{1, 2, 1, 1, 2, 6};
|
||||
{1, 2, 1, 2, 1, 2, 6};
|
||||
#endif
|
||||
|
||||
PRInt32 variantIndex = eNumVariantMasks;
|
||||
|
@ -6865,10 +6867,10 @@ static PRBool GetFunctionParseInformation(nsCSSKeyword aToken,
|
|||
aMaxElems = 2U;
|
||||
break;
|
||||
case eCSSKeyword_skew:
|
||||
/* Exactly one angle. */
|
||||
variantIndex = eAngle;
|
||||
/* Exactly one or two angles. */
|
||||
variantIndex = eTwoAngles;
|
||||
aMinElems = 1U;
|
||||
aMaxElems = 1U;
|
||||
aMaxElems = 2U;
|
||||
break;
|
||||
case eCSSKeyword_scale:
|
||||
/* One or two scale factors. */
|
||||
|
|
|
@ -419,7 +419,7 @@ static void ProcessSkew(float aMain[4], const nsCSSValue::Array* aData)
|
|||
NS_ASSERTION(aData->Count() == 2 || aData->Count() == 3, "Bad array!");
|
||||
|
||||
float xSkew = CSSToRadians(aData->Item(1));
|
||||
float ySkew = (aData->Count() == 2 ? xSkew : CSSToRadians(aData->Item(2)));
|
||||
float ySkew = (aData->Count() == 2 ? 0.0f : CSSToRadians(aData->Item(2)));
|
||||
|
||||
ProcessSkewHelper(xSkew, ySkew, aMain);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче