Skip to content
Permalink
Browse files
Add performance test for inlines and inline-blocks without text
https://bugs.webkit.org/show_bug.cgi?id=179955

Reviewed by Darin Adler.

Test for https://bugs.webkit.org/show_bug.cgi?id=179950

* Layout/inline-layout-no-text.html: Added.


Canonical link: https://commits.webkit.org/195970@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
anttijk committed Nov 22, 2017
1 parent 27f7919 commit 8d895e8e90c0b7db07fa93a567417713ca8593f6
Showing with 48 additions and 0 deletions.
  1. +11 −0 PerformanceTests/ChangeLog
  2. +37 −0 PerformanceTests/Layout/inline-layout-no-text.html
@@ -1,3 +1,14 @@
2017-11-22 Antti Koivisto <antti@apple.com>

Add performance test for inlines and inline-blocks without text
https://bugs.webkit.org/show_bug.cgi?id=179955

Reviewed by Darin Adler.

Test for https://bugs.webkit.org/show_bug.cgi?id=179950

* Layout/inline-layout-no-text.html: Added.

2017-11-12 Jon Lee <jonlee@apple.com>

Add isolated text tests for MotionMark
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<title>Test layout performance with inlines and inline-blocks.</title>
<script src="../resources/runner.js"></script>
<style>
.inlineBlock { display:inline-block; width:10px; height:10px; }
</style>
</head>
<body>
<pre id="log"></pre>
<div id="target" style="width: 300px; height: 0px; display: block;">
</div>
<script>
var style = target.style;

for (var i = 0; i < 40000; i++) {
const span = document.createElement("span");
const div = document.createElement("div");
div.classList.add("inlineBlock");
span.appendChild(div);
target.appendChild(span);
}

function test() {
style.width = "280px";
target.offsetLeft;
style.width = "300px";
target.offsetLeft;
style.width = "290px";
target.offsetLeft;
}

PerfTestRunner.measureRunsPerSecond({ run: test });
</script>
</body>
</html>

0 comments on commit 8d895e8

Please sign in to comment.