зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1452805 - Make sure we rebuild contents infront and behind stacking contexts if their size might have changed. r=miko
The test invalidates the z-index element, so that we do a partial build with just that and the DAG no longer knows the relative ordering between it and the other blue elements. We then expand the size of the 'first' elements stacking context, and ensure that we provide enough intersecting items to know that we're on top of the z-index element. MozReview-Commit-ID: KP7c3bnwfBd * * * [mq]: fix MozReview-Commit-ID: EuraqvaUS35 --HG-- extra : rebase_source : 9e2e4f2dc661cc552891499a614d489625ea895d
This commit is contained in:
Родитель
3f11f75aa1
Коммит
00069d57ec
|
@ -2921,6 +2921,12 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
}
|
||||
inTransform = true;
|
||||
} else if (IsFixedPosContainingBlock()) {
|
||||
// Restict the building area to the overflow rect for these frames, since
|
||||
// RetainedDisplayListBuilder uses it to know if the size of the stacking
|
||||
// context changed.
|
||||
visibleRect.IntersectRect(visibleRect, GetVisualOverflowRect());
|
||||
dirtyRect.IntersectRect(dirtyRect, GetVisualOverflowRect());
|
||||
}
|
||||
|
||||
bool hasOverrideDirtyRect = false;
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<html class="reftest-wait">
|
||||
<head>
|
||||
<style>
|
||||
div {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background-color: blue;
|
||||
filter: greyscale(50%);
|
||||
position: relative;
|
||||
}
|
||||
#second {
|
||||
width: 600px;
|
||||
height: 500px;
|
||||
display: none;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top" style="z-index:-4;"></div>
|
||||
<div style="top: 10px;"></div>
|
||||
<div style="top: 20px;">
|
||||
<div id="second" style="top: -400px;"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function doTest2() {
|
||||
document.getElementById("second").style.display = "block";
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
function doTest() {
|
||||
document.getElementById("top").style.zIndex = -5;
|
||||
setTimeout(doTest2, 500);
|
||||
}
|
||||
document.addEventListener("MozReftestInvalidate", doTest);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background-color: blue;
|
||||
filter: greyscale(50%);
|
||||
position: relative;
|
||||
}
|
||||
#second {
|
||||
width: 600px;
|
||||
height: 500px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top" style="z-index:-4;"></div>
|
||||
<div style="top: 10px;"></div>
|
||||
<div style="top: 20px;">
|
||||
<div id="second" style="top: -400px;"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -27,3 +27,4 @@ skip-if(!asyncPan) == 1437374-1.html 1437374-1-ref.html
|
|||
== 1443027-2.html 1443027-ref.html
|
||||
== 1443027-3.html 1443027-3-ref.html
|
||||
== 1451971-1.html 1451971-ref.html
|
||||
== 1452805-1.html 1452805-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче