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

Side by Side Diff: PerformanceTests/flexbox-with-stretch-layout.html

Issue 129633004: Avoid unnecessary forced layout of flex items when stretching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/runner.js"></script>
5 <style>
6
7 #container {
8 display: flex;
9 flex-wrap: wrap;
10 }
11
12 .byteBox {
13 width: 9px;
14 font-size: 9px;
15 }
16
17 .inlineBlock {
18 font-family: Ahem;
19 width: 100%;
20 display: inline-block;
21 }
22
23 </style>
24 </head>
25 <body>
26
27 <div id="container" style="">
28 </div>
29
30 </body>
31 <script>
32
33 var nbsp = '\u00A0';
34
35 function setupTest()
36 {
37 var container = document.getElementById("container");
38 for (var i = 0; i < 200; i++) {
39 var div = document.createElement("div");
40 div.className = "byteBox";
41 var span = document.createElement("span");
42 span.className = "inlineBlock";
43 span.innerText = nbsp;
44 div.appendChild(span);
45 container.appendChild(div);
46 };
47 };
48
49 setupTest();
50
51 var switcher = true;
52
53 function runTest()
54 {
55 var inlineBlocks = document.getElementsByClassName("inlineBlock");
56 for (var i = inlineBlocks.length - 1; i >= 0; i--) {
57 inlineBlocks[i].innerText = switcher ? " " : nbsp;
58 inlineBlocks[i].offsetTop;
59 };
60 switcher = !switcher;
61 };
62
63 PerfTestRunner.measureRunsPerSecond({run: runTest });
64 </script>
65 </html>
OLDNEW
« no previous file with comments | « LayoutTests/css3/flexbox/repaint-on-layout-expected.txt ('k') | Source/core/rendering/RenderFlexibleBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698