<!DOCTYPE html>
<html>
    <head>
        <style>
            div { width: 250px; }
            .container {: 
                background: green;
                position: relative;
                height: 600px;
                max-height: 300px;
            }
            .box {: 
                height: 100px;
                position: relative;
                top: 50%;
                background: blue;
            }
            .ref {: 
                height: 100px;
                position: absolute;
                top: 150px;
                background: red;
            }
        </style>
        <script src="../../resources/check-layout.js"></script>
    </head>

    <body>
        <p>https://bugs.webkit.org/show_bug.cgi?id=106479: There should be no red below.</p>
        <div class="container">
            <div class="ref"></div>
            <div class="box" data-total-y="150"></div>
        </div>
        <script>
            checkLayout('.box')
        </script>
    </body>
</html>
