<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
p {
    height: 1%;
    overflow: visible;
}
</style>
</head>
<body>
<div id="description">This tests for a bug where copying content from a document in quirksmode and pasting it would produce overlapping text because of a height: 1%; overflow: visible; rule. To run manually, paste into a document not in quirksmode. The paragraphs should not overlap. When you inspect the source, the paragraphs should have pixel values for the height property.</div>
<div id="copy" contenteditable="true">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam interdum lacus id lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Quisque pulvinar, libero eu tincidunt adipiscing, quam arcu pharetra libero, sed aliquet leo eros vitae sapien.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam interdum lacus id lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Quisque pulvinar, libero eu tincidunt adipiscing, quam arcu pharetra libero, sed aliquet leo eros vitae sapien.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam interdum lacus id lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Quisque pulvinar, libero eu tincidunt adipiscing, quam arcu pharetra libero, sed aliquet leo eros vitae sapien.</p>
</div>

<div id="paste" contenteditable="true"></div>

<script>
copy = document.getElementById("copy");
copy.focus();
document.execCommand("selectall");
document.execCommand("copy");
if (window.testRunner) {
    window.testRunner.dumpAsText();
    paste = document.getElementById("paste");
    description = document.getElementById("description");
    document.getElementById("paste").focus();
    document.execCommand("paste");
    document.body.innerText = description.innerText + "\n\n" + paste.innerHTML;
}
</script>
</body>
</html>
