Skip to content

Commit 3b2d648

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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@225102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 70f1a0d commit 3b2d648

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

PerformanceTests/ChangeLog

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2017-11-22 Antti Koivisto <[email protected]>
2+
3+
Add performance test for inlines and inline-blocks without text
4+
https://bugs.webkit.org/show_bug.cgi?id=179955
5+
6+
Reviewed by Darin Adler.
7+
8+
Test for https://bugs.webkit.org/show_bug.cgi?id=179950
9+
10+
* Layout/inline-layout-no-text.html: Added.
11+
112
2017-11-12 Jon Lee <[email protected]>
213

314
Add isolated text tests for MotionMark
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Test layout performance with inlines and inline-blocks.</title>
5+
<script src="../resources/runner.js"></script>
6+
<style>
7+
.inlineBlock { display:inline-block; width:10px; height:10px; }
8+
</style>
9+
</head>
10+
<body>
11+
<pre id="log"></pre>
12+
<div id="target" style="width: 300px; height: 0px; display: block;">
13+
</div>
14+
<script>
15+
var style = target.style;
16+
17+
for (var i = 0; i < 40000; i++) {
18+
const span = document.createElement("span");
19+
const div = document.createElement("div");
20+
div.classList.add("inlineBlock");
21+
span.appendChild(div);
22+
target.appendChild(span);
23+
}
24+
25+
function test() {
26+
style.width = "280px";
27+
target.offsetLeft;
28+
style.width = "300px";
29+
target.offsetLeft;
30+
style.width = "290px";
31+
target.offsetLeft;
32+
}
33+
34+
PerfTestRunner.measureRunsPerSecond({ run: test });
35+
</script>
36+
</body>
37+
</html>

0 commit comments

Comments
 (0)