mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 779395 - Add support for skew transforms to compositor-driven animations r=dbaron
This commit is contained in:
parent
39660769e8
commit
c0eb3c766a
@ -284,14 +284,21 @@ CreateCSSValueList(const InfallibleTArray<TransformFunction>& aFunctions)
|
||||
{
|
||||
float x = aFunctions[i].get_SkewX().x();
|
||||
arr = nsStyleAnimation::AppendTransformFunction(eCSSKeyword_skewx, resultTail);
|
||||
arr->Item(1).SetFloatValue(x, eCSSUnit_Number);
|
||||
arr->Item(1).SetFloatValue(x, eCSSUnit_Radian);
|
||||
break;
|
||||
}
|
||||
case TransformFunction::TSkewY:
|
||||
{
|
||||
float y = aFunctions[i].get_SkewY().y();
|
||||
arr = nsStyleAnimation::AppendTransformFunction(eCSSKeyword_skewy, resultTail);
|
||||
arr->Item(1).SetFloatValue(y, eCSSUnit_Number);
|
||||
arr->Item(1).SetFloatValue(y, eCSSUnit_Radian);
|
||||
break;
|
||||
}
|
||||
case TransformFunction::TSkew:
|
||||
{
|
||||
arr = nsStyleAnimation::AppendTransformFunction(eCSSKeyword_skew, resultTail);
|
||||
arr->Item(1).SetFloatValue(aFunctions[i].get_Skew().x(), eCSSUnit_Radian);
|
||||
arr->Item(2).SetFloatValue(aFunctions[i].get_Skew().y(), eCSSUnit_Radian);
|
||||
break;
|
||||
}
|
||||
case TransformFunction::TTransformMatrix:
|
||||
|
@ -100,6 +100,7 @@ struct Scale {
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
struct Skew { float x; float y; };
|
||||
struct SkewX { float x; };
|
||||
struct SkewY { float y; };
|
||||
struct TransformMatrix { gfx3DMatrix value; };
|
||||
@ -117,6 +118,7 @@ union TransformFunction {
|
||||
Rotation;
|
||||
Rotation3D;
|
||||
Scale;
|
||||
Skew;
|
||||
SkewX;
|
||||
SkewY;
|
||||
Translation;
|
||||
|
@ -201,16 +201,27 @@ static void AddTransformFunctions(nsCSSValueList* aList,
|
||||
}
|
||||
case eCSSKeyword_skewx:
|
||||
{
|
||||
double x = array->Item(1).GetFloatValue();
|
||||
double x = array->Item(1).GetAngleValueInRadians();
|
||||
aFunctions.AppendElement(SkewX(x));
|
||||
break;
|
||||
}
|
||||
case eCSSKeyword_skewy:
|
||||
{
|
||||
double y = array->Item(1).GetFloatValue();
|
||||
double y = array->Item(1).GetAngleValueInRadians();
|
||||
aFunctions.AppendElement(SkewY(y));
|
||||
break;
|
||||
}
|
||||
case eCSSKeyword_skew:
|
||||
{
|
||||
double x = array->Item(1).GetAngleValueInRadians();
|
||||
// skew(x) is shorthand for skew(x, 0)
|
||||
double y = 0;
|
||||
if (array->Count() == 3) {
|
||||
y = array->Item(2).GetAngleValueInRadians();
|
||||
}
|
||||
aFunctions.AppendElement(Skew(x, y));
|
||||
break;
|
||||
}
|
||||
case eCSSKeyword_matrix:
|
||||
{
|
||||
gfx3DMatrix matrix;
|
||||
|
Loading…
Reference in New Issue
Block a user