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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PerformanceTests/Layout/add-remove-inline-floats.html
diff --git a/third_party/WebKit/PerformanceTests/Layout/add-remove-inline-floats.html b/third_party/WebKit/PerformanceTests/Layout/add-remove-inline-floats.html
new file mode 100644
index 0000000000000000000000000000000000000000..be1959bfd45d07a1bb80fcfa96ba9a2ba9c866f3
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Layout/add-remove-inline-floats.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<style>
+#test-container span {
+ float: left; /* This is the root cause */
+ width: 18px;
+ height: 18px;
+}
+</style>
+<div id="test-container"></div>
+<script src="../resources/runner.js"></script>
+<script>
+ var count = 3000;
+
+ function addFloats() {
+ var container = document.getElementById("test-container");
+ var newDiv = document.createElement("div");
+ for (var i = 0; i < count; i++) {
+ var span = document.createElement("span");
+ newDiv.appendChild(span);
+ }
+ container.appendChild(newDiv);
+ };
+
+ function removeFloats() {
+ var container = document.getElementById("test-container");
+ if (container.lastChild) container.removeChild(container.lastChild);
+ }
+
+ function test() {
+ addFloats();
+ PerfTestRunner.forceLayoutOrFullFrame();
+ removeFloats();
+ }
+
+ PerfTestRunner.measureRunsPerSecond({
+ description: "Measures performance of removing floats in a block with a lot of inline children.",
+ run: test
+});
+</script>
+</html>
« 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