Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: PerformanceTests/Layout/line-layout-line-height.html

Issue 256593009: Create a baseline RenderBlock::lineHeight() performance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Line height calculation performance test</title>
Julien - ping for review 2014/04/28 20:11:38 Can't we dump this into the test or would this imp
5 <script src="../resources/runner.js"></script>
6 </head>
7 <body>
8 <pre id="log"></pre>
9 <div id="target" style="width: 300px; display: none;">
10 </div>
11 <script>
12 var target = document.getElementById("target");
13 var style = target.style;
14 var rows = 10000;
Julien - ping for review 2014/04/28 20:11:38 s/rows/lines/?
15 var el = document.createElement('p');
16 el.innerHTML = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ut elit lacus, non convallis odio. Integer facilisis, dolor quis porttit or auctor\n';
17 for (var i = 0; i < rows; ++i) {
18 var e = el.cloneNode(true);
19 target.appendChild(e);
20 }
21 function test() {
22 style.display = "block";
Julien - ping for review 2014/04/28 20:11:38 FWIW you are also checking the attachment / detach
23 style.width = "280px";
24 target.offsetLeft;
25 style.width = "300px";
26 target.offsetLeft;
27 style.width = "290px";
28 target.offsetLeft;
29 style.display = "none";
30 }
31
32 PerfTestRunner.measureTime({ run: test });
Julien - ping for review 2014/04/28 20:11:38 I think it's preferred to measure runs per seconds
33 </script>
34 </body>
35 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698