| 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>
|
|
|