mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 740072 - Make perspective-origin check the style parent instead of frame parent. r=roc
This commit is contained in:
parent
e4d5537a7a
commit
3585a9ddba
@ -2489,7 +2489,7 @@ gfxPoint3D GetDeltaToMozPerspectiveOrigin(const nsIFrame* aFrame,
|
||||
//TODO: Should this be using our bounds or the parent's bounds?
|
||||
// How do we handle aBoundsOverride in the latter case?
|
||||
nsIFrame* parent = aFrame->GetParentStyleContextFrame();
|
||||
const nsStyleDisplay* display = aFrame->GetParent()->GetStyleDisplay();
|
||||
const nsStyleDisplay* display = parent->GetStyleDisplay();
|
||||
nsRect boundingRect = nsDisplayTransform::GetFrameBoundsForTransform(parent);
|
||||
|
||||
/* Allows us to access named variables by index. */
|
||||
|
41
layout/reftests/transform-3d/perspective-origin-3-ref.html
Normal file
41
layout/reftests/transform-3d/perspective-origin-3-ref.html
Normal file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<style type="text/css">
|
||||
|
||||
.parentWithPerspective {
|
||||
-moz-perspective: 100px;
|
||||
-moz-perspective-origin: 150px 150px;
|
||||
-webkit-perspective: 100px;
|
||||
-webkit-perspective-origin: 150px 150px;
|
||||
/* Changing width/height to 500px should not change the rendering. */
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.parentWithPerspective > div {
|
||||
position:absolute;
|
||||
top:100px;
|
||||
left:100px;
|
||||
width:100px;
|
||||
height:100px;
|
||||
}
|
||||
|
||||
.notTransformed {
|
||||
outline: 1px solid black;
|
||||
}
|
||||
|
||||
.transformed {
|
||||
background:blue;
|
||||
-moz-transform-origin: 0% 0%;
|
||||
-moz-transform: rotateY(45deg);
|
||||
-webkit-transform-origin: 0% 0%;
|
||||
-webkit-transform: rotateY(45deg);
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div class="parentWithPerspective">
|
||||
<div class="notTransformed"></div>
|
||||
<div class="transformed"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
41
layout/reftests/transform-3d/perspective-origin-3a.html
Normal file
41
layout/reftests/transform-3d/perspective-origin-3a.html
Normal file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<style type="text/css">
|
||||
|
||||
.parentWithPerspective {
|
||||
-moz-perspective: 100px;
|
||||
-moz-perspective-origin: 150px 150px;
|
||||
-webkit-perspective: 100px;
|
||||
-webkit-perspective-origin: 150px 150px;
|
||||
/* Changing width/height to 500px should not change the rendering. */
|
||||
height:500px;
|
||||
}
|
||||
|
||||
.parentWithPerspective > div {
|
||||
position:absolute;
|
||||
top:100px;
|
||||
left:100px;
|
||||
width:100px;
|
||||
height:100px;
|
||||
}
|
||||
|
||||
.notTransformed {
|
||||
outline: 1px solid black;
|
||||
}
|
||||
|
||||
.transformed {
|
||||
background:blue;
|
||||
-moz-transform-origin: 0% 0%;
|
||||
-moz-transform: rotateY(45deg);
|
||||
-webkit-transform-origin: 0% 0%;
|
||||
-webkit-transform: rotateY(45deg);
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div class="parentWithPerspective">
|
||||
<div class="notTransformed"></div>
|
||||
<div class="transformed"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -38,6 +38,7 @@ fuzzy-if(d2d&&layersGPUAccelerated,52,680) fails-if(Android) == scale3d-all-sepa
|
||||
!= perspective-origin-1a.html rotatex-perspective-1a.html
|
||||
== perspective-origin-1b.html perspective-origin-1a.html
|
||||
== perspective-origin-2a.html perspective-origin-2-ref.html
|
||||
== perspective-origin-3a.html perspective-origin-3-ref.html
|
||||
!= sorting-1a.html sorting-1-ref.html
|
||||
# Parallel planes, different z depth
|
||||
== sorting-2a.html sorting-2-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user