blob: 0b9ae9c0ed37338b8d96c2b75ffae71bb59e9266 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
#wrap {
position: absolute;
width: 800px;
height: 200px;
border: 2px solid black;
left:0;
top:0;
}
#outer {
position: absolute;
display: inline-block;
width:200px;
height:200px;
background-color:grey;
}
#outer2 {
display: inline-block;
width:200px;
height:200px;
background-color:blue;
}
#inner {
width: 100px;
height: 100px;
background-color:green;
position: fixed; top:2px;
}
#outer p {
margin-left: 110px;
}
</style>
</head>
<body>
<div id='wrap'>
<div id='outer2'></div>
<div id='outer'>
<div id='inner'></div>
<p>Foo</p>
</div>
</div>
<div id="output">Failure</div>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
}
function measure() {
var output = document.getElementById("output");
if (document.getElementById('inner').offsetLeft == 2) {
output.innerHTML = "Success"
}
}
// crbug.com/445889: this ensures the layout only sees the movement created by removing the child.
document.body.offsetTop;
var outer = document.getElementById("outer2");
document.getElementById("wrap").removeChild(outer);
measure();
</script>
</body>
</html>