mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 906199. Ensure that nsDisplayTransforms being bubbled up by preserve-3d have the correct clip applied. r=mattwoodrow
This commit is contained in:
parent
3e39a45945
commit
8253361b24
@ -1683,6 +1683,14 @@ WrapPreserve3DListInternal(nsIFrame* aFrame, nsDisplayListBuilder *aBuilder, nsD
|
||||
if (!aTemp->IsEmpty()) {
|
||||
aOutput->AppendToTop(new (aBuilder) nsDisplayTransform(aBuilder, aFrame, aTemp, aIndex++));
|
||||
}
|
||||
// Override item's clipping with our current clip state (if any). Since we're
|
||||
// bubbling up a preserve-3d transformed child to a preserve-3d parent,
|
||||
// we can be sure the child doesn't have clip state of its own.
|
||||
NS_ASSERTION(!item->GetClip().HasClip(), "Unexpected clip on item");
|
||||
const DisplayItemClip* clip = aBuilder->ClipState().GetCurrentCombinedClip(aBuilder);
|
||||
if (clip) {
|
||||
item->SetClip(aBuilder, *clip);
|
||||
}
|
||||
aOutput->AppendToTop(item);
|
||||
break;
|
||||
}
|
||||
|
32
layout/reftests/bugs/906199-1-ref.html
Normal file
32
layout/reftests/bugs/906199-1-ref.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div {
|
||||
position:relative;
|
||||
width:300px;
|
||||
height:200px;
|
||||
left:50px;
|
||||
top:50px;
|
||||
}
|
||||
.grandparentdiv {
|
||||
background:yellow;
|
||||
overflow:hidden;
|
||||
}
|
||||
.childdiv {
|
||||
background:green;
|
||||
}
|
||||
.grandchilddiv {
|
||||
background:red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="grandparentdiv">
|
||||
<div class="childdiv">
|
||||
<div class="grandchilddiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
33
layout/reftests/bugs/906199-1.html
Normal file
33
layout/reftests/bugs/906199-1.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div {
|
||||
position:relative;
|
||||
width:300px;
|
||||
height:200px;
|
||||
left:50px;
|
||||
top:50px;
|
||||
transform-style:preserve-3d;
|
||||
}
|
||||
.grandparentdiv {
|
||||
background:yellow;
|
||||
overflow:hidden;
|
||||
}
|
||||
.childdiv {
|
||||
background:green;
|
||||
}
|
||||
.grandchilddiv {
|
||||
background:red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="grandparentdiv">
|
||||
<div class="childdiv">
|
||||
<div class="grandchilddiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1772,3 +1772,4 @@ test-pref(layout.css.flexbox.enabled,true) == 849407-1.html 849407-1-ref.html
|
||||
== 883987-1f.html 883987-1-ref.html
|
||||
== 890495-1.html 890495-1-ref.html
|
||||
== 894931-1.html 894931-1-ref.html
|
||||
== 906199-1.html 906199-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user