mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
fe4bbe304b
This makes sure that for example the bounds of an opacity item are not empty if the opacity item contains a scroll frame whose contents are currently scrolled offscreen but still inside that scroll frame's display port. On its own, this changeset causes test failures due to missed optimizations because the bounds of many opacity items are now too large. That's because of the way we're setting scroll clips on opacity items at the moment: Even if the opacity is inside a scroll frame, we're currently only setting that scroll frame's scroll clip on the opacity item's contents, not on the opacity item itself, because the opacity item might also contain other items that are not scrolled by this scroll frame. The next patch in this bug will make us only do that when necessary. MozReview-Commit-ID: 9TtcJ7eQE7U --HG-- extra : rebase_source : 51cab60bd27e1a7e3c2d6b8d791b79fe3b3baa94 extra : histedit_source : ba421898e442d08f7f711d13f71a693c34d908bb
43 lines
660 B
HTML
43 lines
660 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<meta charset="utf-8">
|
|
<title>Reference: Active opacity should be rendered if it's inside the display port, even if it's currently offscreen</title>
|
|
|
|
<style>
|
|
|
|
#scrollbox {
|
|
border: 1px solid black;
|
|
width: 200px;
|
|
height: 200px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#scrolledContent {
|
|
height: 1000px;
|
|
}
|
|
|
|
#opacity {
|
|
will-change: opacity;
|
|
opacity: 0.5;
|
|
margin-top: 250px;
|
|
width: 100px;
|
|
height: 100px;
|
|
box-sizing: border-box;
|
|
border: 1px solid blue;
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
<div id="scrollbox">
|
|
<div id="scrolledContent">
|
|
<div id="opacity"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
document.getElementById("scrollbox").scrollTop = 150;
|
|
|
|
</script>
|