mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 704469 - Use style context parent instead of frame parent when looking up perspective for 3d transforms. r=roc
This commit is contained in:
parent
2580db3548
commit
9f58ec2444
@ -2538,8 +2538,9 @@ nsDisplayTransform::GetResultingTransformMatrix(const nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
const nsStyleDisplay* parentDisp = nsnull;
|
||||
if (aFrame->GetParent()) {
|
||||
parentDisp = aFrame->GetParent()->GetStyleDisplay();
|
||||
nsStyleContext* parentStyleContext = aFrame->GetStyleContext()->GetParent();
|
||||
if (parentStyleContext) {
|
||||
parentDisp = parentStyleContext->GetStyleDisplay();
|
||||
}
|
||||
if (nsLayoutUtils::Are3DTransformsEnabled() &&
|
||||
parentDisp && parentDisp->mChildPerspective.GetUnit() == eStyleUnit_Coord &&
|
||||
|
27
layout/reftests/transform-3d/overflow-hidden-1-ref.html
Normal file
27
layout/reftests/transform-3d/overflow-hidden-1-ref.html
Normal file
@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<style type="text/css">
|
||||
.stage{
|
||||
-moz-perspective: 700px;
|
||||
overflow: hidden;
|
||||
width: 260px;
|
||||
height: 260px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 170px;
|
||||
height: 170px;
|
||||
background-color: red;
|
||||
display: block;
|
||||
-moz-transform: rotate3d(0,1,0, 50deg) translatey(20px);
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body id="body">
|
||||
<div class="stage">
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
</body></html>
|
27
layout/reftests/transform-3d/overflow-hidden-1a.html
Normal file
27
layout/reftests/transform-3d/overflow-hidden-1a.html
Normal file
@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<style type="text/css">
|
||||
.stage{
|
||||
-moz-perspective: 700px;
|
||||
overflow: hidden;
|
||||
width: 260px;
|
||||
height: 260px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 170px;
|
||||
height: 170px;
|
||||
background-color: red;
|
||||
display: block;
|
||||
-moz-transform: rotate3d(0,1,0, 50deg) translatey(20px);
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body id="body">
|
||||
<div class="stage">
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
</body></html>
|
@ -41,3 +41,4 @@ fails == preserve3d-1a.html preserve3d-1-ref.html
|
||||
== sorting-3a.html green-rect.html
|
||||
# Different, but equivalent (for the given transform) transform origins
|
||||
== rotatex-transformorigin-1a.html rotatex-transformorigin-1-ref.html
|
||||
== overflow-hidden-1a.html overflow-hidden-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user