<!DOCTYPE html>
<html>
<head>
    <title>Document::nodesFromRect : culled inlines - 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: 400px;
            height: 200px;
        }
        #sandbox p { font: 16px Ahem; }
    </style>
</head>
<body id="body">
    <div id=sandbox>
        <p><span id=culledinline><span id=wordinline1>word1</span>   <span id=wordinline2>word2</span></span>   <span id=wordinline3>word3</span></p>
    </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(30, 19, 8, 8, "'word1'");
            /* Rect based test over the word2 only. */
            checkRect(126, 19, 8, 8, "'word2'");
            /* Rect based test over the word3 only. */
            checkRect(222, 19, 8, 8, "'word3'");
            /* Rect based test between word1 and word2. */
            checkRect(84, 19, 8, 8, "'   '");
            /* Rect based test over and outside word1. */
            checkRect(70, 19, 20, 8, "'   ', 'word1', SPAN#wordinline1, SPAN#culledinline");
            /* Rect based test over word1 and word2. */
            checkRect(70, 19, 40, 8, "'word2', '   ', 'word1', SPAN#wordinline2, SPAN#wordinline1, SPAN#culledinline");
            /* Rect based test over word2 and word3. */
            checkRect(170, 19, 40, 8, "'word3', '   ', 'word2', SPAN#wordinline3, SPAN#wordinline2, SPAN#culledinline, P");

            document.getElementById('sandbox').style.display = 'none';
        }
        runTest();
    </script>
    <script src="../../../resources/js-test-post.js"></script>
</body>
</html>

