gecko-dev/layout/reftests/transform/dynamic-addremove-2.html
Boris Zbarsky f795d19994 Bug 1258911. Correctly reframe an absolutely positioned frame that goes from having a transform to not having one and has an abs pos kid with a fixed-pos descendant. r=dbaron
Instead of skipping the absolute and fixed child lists, we walk all kids of the
frame.  But before recursing down into things that are absolute containing
blocks we ensure that we're only looking for fixed-pos placeholders, so we don't
reframe if we have a relatively positioned descendant with absolutely positioned
kids, for example.  Note that this part is pure optimization attempt, and it
might be cheaper to not do it: IsAbsoluteContainingBlock is not that cheap and
the situations where we avoid reframing due to this optimization are likely
fairly rare.
2016-08-26 15:38:16 -04:00

18 lines
520 B
HTML

<!DOCTYPE html>
<html style="background: red">
<div style="transform: translate3d(0, 0, 0); position: absolute;
top: 0; left: 0; width: 100px; height: 100px">
<div style="position: absolute">
<div style="position: fixed; width: 100%; height: 100%; top: 0; left: 0;
background: green">
</div>
</div>
</div>
<script>
onload = function() {
document.body.offsetWidth;
document.querySelector("div").style.transform = "none";
}
</script>
</html>