зеркало из https://github.com/mozilla/gecko-dev.git
Bug 455265 - Default Y parameter for -moz-transform:translate differs from Apple's proposal; r+sr=dbaron
This commit is contained in:
Родитель
2277ec5e77
Коммит
5c11f2e697
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px); background-color: gold;">
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px, 50px); background-color: gold;">
|
||||
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
||||
<div style="background-color: navy; color: gold; width: 200px; height: 100px; position: absolute; left: 50px; top: 100px;">
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px) ;background-color: gold;">
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px, 50px) ;background-color: gold;">
|
||||
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
||||
<div style="background-color: navy; color: gold; width: 200px; height: 100px; position: fixed; left: 50px; top: 100px;">
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px) ;background-color: gold;">
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px, 50px) ;background-color: gold;">
|
||||
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
||||
<div style="background-color: navy; color: gold; width: 200px; height: 100px; position: fixed; right: -150px; bottom: 0px;">
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px) ;background-color: gold;">
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px, 50px) ;background-color: gold;">
|
||||
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
||||
<div style="background-color: navy; color: gold; width: 200px; height: 100px; position: absolute; right: -150px; bottom: 0px;">
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px) ;background-color: gold;">
|
||||
<div style="width: 100px; height: 200px; -moz-transform: translate(50px, 50px) ;background-color: gold;">
|
||||
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
||||
<div style="background-color: navy; color: gold; width: 200px; height: 100px; position: absolute; right: -151px; bottom: 0px;">
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<style type="text/css">
|
||||
.transformed
|
||||
{
|
||||
-moz-transform: rotate(10deg) translatex(50px) rotate(10deg) translatey(50px) skewx(10deg) translate(25px);
|
||||
-moz-transform: rotate(10deg) translatex(50px) rotate(10deg) translatey(50px) skewx(10deg) translate(25px, 25px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<style type="text/css">
|
||||
.transformed
|
||||
{
|
||||
-moz-transform: rotate(10deg) translatex(50%) rotate(10deg) translatey(50px) skewx(10deg) translate(25px);
|
||||
-moz-transform: rotate(10deg) translatex(50%) rotate(10deg) translatey(50px) skewx(10deg) translate(25px, 25px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<style type="text/css">
|
||||
.transformed
|
||||
{
|
||||
-moz-transform: rotate(10deg) translatex(50px) rotate(10deg) translatey(100%) skewx(10deg) translate(25px);
|
||||
-moz-transform: rotate(10deg) translatex(50px) rotate(10deg) translatey(100%) skewx(10deg) translate(25px, 25px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<style type="text/css">
|
||||
.transformed
|
||||
{
|
||||
-moz-transform: rotate(10deg) translatex(50%) rotate(10deg) translatey(100%) skewx(10deg) translate(25px);
|
||||
-moz-transform: rotate(10deg) translatex(50%) rotate(10deg) translatey(100%) skewx(10deg) translate(25px, 25px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -18,11 +18,12 @@ random == translatey-1b.html translatey-1-ref.html # bug 455138
|
|||
== translatex-2.html translatex-1-ref.html
|
||||
== translatey-2.html translatey-1-ref.html
|
||||
# translate should act like position: relative
|
||||
== translate-1a.html translate-1-ref.html
|
||||
!= translate-1a.html translate-1-ref.html
|
||||
random == translate-1b.html translate-1-ref.html # bug 455138
|
||||
== translate-1c.html translate-1-ref.html
|
||||
== translate-1d.html translate-1-ref.html
|
||||
== translate-1e.html translate-1-ref.html
|
||||
== translate-2a.html translate-2-ref.html
|
||||
# rotate: Several rotations of the same object should be idempotent
|
||||
== rotate-1a.html rotate-1-ref.html
|
||||
== rotate-1b.html rotate-1-ref.html
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<body style="margin:0">
|
||||
<div style="clip-path: url(#c1); width:400px; height:400px; background:blue; -moz-transform: translate(100px);">
|
||||
<div style="clip-path: url(#c1); width:400px; height:400px; background:blue; -moz-transform: translate(100px, 100px);">
|
||||
<div style="height:200px;"/>
|
||||
<div style="height:200px; background:lime;"/>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="-moz-transform: translate(25px) translate(25px);">
|
||||
<div style="-moz-transform: translate(25px, 25px) translate(25px, 25px);">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="-moz-transform: translate(25px); position:relative; top:25px; left:25px;">
|
||||
<div style="-moz-transform: translate(25px, 25px); position:relative; top:25px; left:25px;">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="-moz-transform: translate(50px) translate(-100px) translate(150px) translate(-50px);">
|
||||
<div style="-moz-transform: translate(50px) translate(-100px) translate(150px) translate(-50px) translate(0px, 50px);">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="position: relative; left: 50px; top: 0px;">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="-moz-transform: translate(50px);">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -321,24 +321,26 @@ static void ProcessTranslate(nscoord aDelta[2], float aX[2], float aY[2],
|
|||
|
||||
/* There are several cases to consider.
|
||||
* First, we might have one value, or we might have two. If we have
|
||||
* one, pretend we got two of the same value.
|
||||
* two, we need to consider both dX and dY components.
|
||||
* Next, the values might be lengths, or they might be percents. If they're
|
||||
* percents, store them in the dX and dY components. Otherwise, store them in
|
||||
* the main matrix.
|
||||
*/
|
||||
|
||||
const nsCSSValue &dx = aData->Item(1);
|
||||
const nsCSSValue &dy = (aData->Count() == 2 ? dx : aData->Item(2));
|
||||
|
||||
if (dx.GetUnit() == eCSSUnit_Percent)
|
||||
aX[0] = dx.GetPercentValue();
|
||||
else
|
||||
SetCoordToValue(dx, aContext, aPresContext, aDelta[0]);
|
||||
|
||||
if (dy.GetUnit() == eCSSUnit_Percent)
|
||||
aY[1] = dy.GetPercentValue();
|
||||
else
|
||||
SetCoordToValue(dy, aContext, aPresContext, aDelta[1]);
|
||||
/* If we read in a Y component, set it appropriately */
|
||||
if (aData->Count() == 3) {
|
||||
const nsCSSValue &dy = aData->Item(2);
|
||||
if (dy.GetUnit() == eCSSUnit_Percent)
|
||||
aY[1] = dy.GetPercentValue();
|
||||
else
|
||||
SetCoordToValue(dy, aContext, aPresContext, aDelta[1]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Helper function to set up a scale matrix. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче