blob: e9f23625e11eec49c6d8bcd846c3c422ca7c9097 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Document::nodesFromRect : culled inline with line-break - bug 88376</title>
<script src="../../../resources/js-test-pre.js"></script>
<script src="resources/nodesFromRect.js"></script>
<style>
#sandbox {
position: absolute;
left: 0px;
top: 0px;
width: 220px;
height: 200px;
}
#sandbox p { font: 20px Ahem; }
</style>
</head>
<body id="body">
<div id=sandbox>
<p>Word <span id=culledinline>word1 <span id=wordinline2>word2</span></span> word
</div>
<p id="description"></p>
<span id="console"></span>
<script type="application/javascript">
function runTest()
{
description(document.title);
window.scrollTo(0, 0);
/* Rect based test over word1 only. */
checkRect(110, 25, 10, 10, "'word1 '");
/* Rect based test over the word2 only. */
checkRect(20, 45, 10, 10, "'word2'");
/* Rect based test not contained by culledinline, but contained by its bounding box. */
checkRect(20, 35, 10, 20, "'word2', 'Word ', SPAN#wordinline2, SPAN#culledinline, P");
/* Note the order of P and 'Word ' is slightly unusual, but this is due to lines being tested one by one. */
document.getElementById('sandbox').style.display = 'none';
}
runTest();
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>