mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
f795d19994
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.
18 lines
520 B
HTML
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>
|