mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 745934. Update bounds of nsDisplayOpacity after we've mutated its list. r=mattwoodrow,a=blocking-fennec
This commit is contained in:
parent
483c294149
commit
23f723d5cc
@ -1573,14 +1573,14 @@ nsDisplayWrapList::nsDisplayWrapList(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame, nsDisplayList* aList)
|
||||
: nsDisplayItem(aBuilder, aFrame) {
|
||||
mList.AppendToTop(aList);
|
||||
mBounds = mList.GetBounds(aBuilder);
|
||||
UpdateBounds(aBuilder);
|
||||
}
|
||||
|
||||
nsDisplayWrapList::nsDisplayWrapList(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame, nsDisplayItem* aItem)
|
||||
: nsDisplayItem(aBuilder, aFrame) {
|
||||
mList.AppendToTop(aItem);
|
||||
mBounds = mList.GetBounds(aBuilder);
|
||||
UpdateBounds(aBuilder);
|
||||
}
|
||||
|
||||
nsDisplayWrapList::nsDisplayWrapList(nsDisplayListBuilder* aBuilder,
|
||||
|
@ -1744,6 +1744,13 @@ public:
|
||||
nsDisplayWrapList(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||
: nsDisplayItem(aBuilder, aFrame) {}
|
||||
virtual ~nsDisplayWrapList();
|
||||
/**
|
||||
* Call this if the wrapped list is changed.
|
||||
*/
|
||||
void UpdateBounds(nsDisplayListBuilder* aBuilder)
|
||||
{
|
||||
mBounds = mList.GetBounds(aBuilder);
|
||||
}
|
||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap);
|
||||
|
@ -1710,6 +1710,7 @@ WrapPreserve3DListInternal(nsIFrame* aFrame, nsDisplayListBuilder *aBuilder, nsD
|
||||
}
|
||||
nsDisplayOpacity *opacity = static_cast<nsDisplayOpacity*>(item);
|
||||
rv = WrapPreserve3DListInternal(aFrame, aBuilder, opacity->GetList(), aIndex);
|
||||
opacity->UpdateBounds(aBuilder);
|
||||
newList.AppendToTop(item);
|
||||
break;
|
||||
}
|
||||
|
18
layout/reftests/bugs/745934-1-ref.html
Normal file
18
layout/reftests/bugs/745934-1-ref.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div {
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
width: 600px;
|
||||
height: 500px;
|
||||
background: yellow;
|
||||
opacity: 0.3;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div></div>
|
||||
</body>
|
||||
</html>
|
24
layout/reftests/bugs/745934-1.html
Normal file
24
layout/reftests/bugs/745934-1.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div {
|
||||
position: absolute;
|
||||
top: 200px; left: 200px;
|
||||
width: 600px;
|
||||
height: 500px;
|
||||
background: yellow;
|
||||
opacity: 0.3;
|
||||
-moz-transform-style: preserve-3d;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
-moz-transform: translate(-200px, -200px);
|
||||
-webkit-transform: translate(-200px, -200px);
|
||||
transform: translate(-200px, -200px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div></div>
|
||||
</body>
|
||||
</html>
|
@ -1699,3 +1699,4 @@ fuzzy-if(d2d,1,19) fuzzy-if(cocoaWidget,1,170) == 718521.html 718521-ref.html
|
||||
== 731521-1.html 731521-1-ref.html
|
||||
needs-focus == 731726-1.html 731726-1-ref.html
|
||||
== 735481-1.html 735481-1-ref.html
|
||||
== 745934-1.html 745934-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user