mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1098266. Set correct visible rect on nsDisplayOpacity items that are shuffled around during preserve-3d display list wrapping. r=tn
This commit is contained in:
parent
ede2626f13
commit
1d690099cd
@ -3482,6 +3482,13 @@ nsDisplayWrapList::SetVisibleRect(const nsRect& aRect)
|
||||
mVisibleRect = aRect;
|
||||
}
|
||||
|
||||
void
|
||||
nsDisplayWrapList::SetReferenceFrame(const nsIFrame* aFrame)
|
||||
{
|
||||
mReferenceFrame = aFrame;
|
||||
mToReferenceFrame = mFrame->GetOffsetToCrossDoc(mReferenceFrame);
|
||||
}
|
||||
|
||||
static nsresult
|
||||
WrapDisplayList(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||
nsDisplayList* aList, nsDisplayWrapper* aWrapper) {
|
||||
|
@ -2743,6 +2743,8 @@ public:
|
||||
|
||||
void SetVisibleRect(const nsRect& aRect);
|
||||
|
||||
void SetReferenceFrame(const nsIFrame* aFrame);
|
||||
|
||||
/**
|
||||
* This creates a copy of this item, but wrapping aItem instead of
|
||||
* our existing list. Only gets called if this item returned nullptr
|
||||
|
@ -1796,6 +1796,7 @@ WrapPreserve3DListInternal(nsIFrame* aFrame, nsDisplayListBuilder *aBuilder,
|
||||
switch (item->GetType()) {
|
||||
case nsDisplayItem::TYPE_TRANSFORM: {
|
||||
if (!aTemp->IsEmpty()) {
|
||||
// Flush current aTemp contents
|
||||
aOutput->AppendToTop(new (aBuilder) nsDisplayTransform(aBuilder,
|
||||
aFrame, aTemp, aTemp->GetVisibleRect(), aIndex++));
|
||||
}
|
||||
@ -1819,6 +1820,7 @@ WrapPreserve3DListInternal(nsIFrame* aFrame, nsDisplayListBuilder *aBuilder,
|
||||
}
|
||||
case nsDisplayItem::TYPE_OPACITY: {
|
||||
if (!aTemp->IsEmpty()) {
|
||||
// Flush current aTemp contents
|
||||
aOutput->AppendToTop(new (aBuilder) nsDisplayTransform(aBuilder,
|
||||
aFrame, aTemp, aTemp->GetVisibleRect(), aIndex++));
|
||||
}
|
||||
@ -1833,6 +1835,9 @@ WrapPreserve3DListInternal(nsIFrame* aFrame, nsDisplayListBuilder *aBuilder,
|
||||
output.AppendToTop(new (aBuilder) nsDisplayTransform(aBuilder,
|
||||
aFrame, aTemp, aTemp->GetVisibleRect(), aIndex++));
|
||||
}
|
||||
|
||||
opacity->SetVisibleRect(output.GetVisibleRect());
|
||||
opacity->SetReferenceFrame(output.GetBottom()->ReferenceFrame());
|
||||
opacity->GetChildren()->AppendToTop(&output);
|
||||
opacity->UpdateBounds(aBuilder);
|
||||
aOutput->AppendToTop(item);
|
||||
|
9
layout/reftests/bugs/1098266-1-ref.html
Normal file
9
layout/reftests/bugs/1098266-1-ref.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<div style="position: absolute; transform-style: preserve-3d; transform: perspective(600px) scale(0.166667); opacity:0.3">
|
||||
<div style="position: absolute; background: yellow; width:900px; height:100px; transform: translate3d(0, 3000px, 0px) rotateZ(90deg) scale(5); transform-style: preserve-3d;">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
9
layout/reftests/bugs/1098266-1.html
Normal file
9
layout/reftests/bugs/1098266-1.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<div style="position: absolute; transform-style: preserve-3d; transform: perspective(600px) scale(0.166667); ">
|
||||
<div style="position: absolute; background: yellow; width:900px; height:100px; transform: translate3d(0, 3000px, 0px) rotateZ(90deg) scale(5); transform-style: preserve-3d; opacity:0.3">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user