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

Side by Side Diff: third_party/WebKit/PerformanceTests/Layout/add-remove-inline-floats.html

Issue 1397383002: Don't keep float-lists in inline children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | 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 <style>
3 #test-container span {
4 float: left; /* This is the root cause */
5 width: 18px;
6 height: 18px;
7 }
8 </style>
9 <div id="test-container"></div>
10 <script src="../resources/runner.js"></script>
11 <script>
12 var count = 3000;
13
14 function addFloats() {
15 var container = document.getElementById("test-container");
16 var newDiv = document.createElement("div");
17 for (var i = 0; i < count; i++) {
18 var span = document.createElement("span");
19 newDiv.appendChild(span);
20 }
21 container.appendChild(newDiv);
22 };
23
24 function removeFloats() {
25 var container = document.getElementById("test-container");
26 if (container.lastChild) container.removeChild(container.lastChild);
27 }
28
29 function test() {
30 addFloats();
31 PerfTestRunner.forceLayoutOrFullFrame();
32 removeFloats();
33 }
34
35 PerfTestRunner.measureRunsPerSecond({
36 description: "Measures performance of removing floats in a block with a lot of inline children.",
37 run: test
38 });
39 </script>
40 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698