<!DOCTYPE html>
<html>
<head>
    <title>Line height calculation performance test</title>
    <script src="../resources/runner.js"></script>
</head>
<body>
    <pre id="log"></pre>
    <div id="target" style="width: 300px; display: none;">
    </div>
    <script>
        var target = document.getElementById("target");
        var style = target.style;
        var rows = 10000;
        var el = document.createElement('p');
        el.innerHTML = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ut elit lacus, non convallis odio. Integer facilisis, dolor quis porttitor auctor\n';
        for (var i = 0; i < rows; ++i) {
            var e  = el.cloneNode(true);
            target.appendChild(e);
        }
        function test() {
            style.display = "block";
            style.width = "280px";
            target.offsetLeft;
            style.width = "300px";
            target.offsetLeft;
            style.width = "290px";
            target.offsetLeft;
            style.display = "none";
        }

        PerfTestRunner.measureTime({ run: test });
    </script>
</body>
</html>

Create a baseline RenderBlock::lineHeight() performance
Create a baseline RenderBlock::lineHeight() performance

This test calls RenderBlock::lineHeight() ~425,000 times on each run.
I hope to remove the caching of RenderStyle::computedLineHeight() by
|m_lineHeight| in RenderBlock so this will baseline will ensure it
doesn't regress performance.

Review URL: https://codereview.chromium.org/256593009

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@175356 bbb929c8-8fbe-4397-9dbb-9b2b20218538
