File tree 2 files changed +48
-0
lines changed
2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
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
+
1
12
2017-11-12 Jon Lee <
[email protected] >
2
13
3
14
Add isolated text tests for MotionMark
Original file line number Diff line number Diff line change
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 >
You can’t perform that action at this time.
0 commit comments