| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../resources/runner.js"></script> | 4 <script src="../resources/runner.js"></script> |
| 5 <style> | 5 <style> |
| 6 [attr=root] [attr=child] {} | 6 [attr=root] [attr=child] {} |
| 7 </style> | 7 </style> |
| 8 </head> | 8 </head> |
| 9 <body> | 9 <body> |
| 10 <div id="root"></div> | 10 <div id="root"></div> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 var child = document.querySelector("#child012341"); | 36 var child = document.querySelector("#child012341"); |
| 37 child.setAttribute("attr", "child"); | 37 child.setAttribute("attr", "child"); |
| 38 var runFunction = function() | 38 var runFunction = function() |
| 39 { | 39 { |
| 40 root.offsetHeight; // force recalc style | 40 root.offsetHeight; // force recalc style |
| 41 root.setAttribute("attr" , "root"); | 41 root.setAttribute("attr" , "root"); |
| 42 root.offsetHeight; | 42 root.offsetHeight; |
| 43 root.removeAttribute("attr"); | 43 root.removeAttribute("attr"); |
| 44 } | 44 } |
| 45 | 45 |
| 46 PerfTestRunner.measureRunsPerSecond({run: runFunction}); | 46 PerfTestRunner.measureRunsPerSecond({ |
| 47 description: "Measures performance of the CSS attribute descendant selector
([a=b] [c=d]).", |
| 48 run: runFunction |
| 49 }); |
| 47 | 50 |
| 48 </script> | 51 </script> |
| 49 </body> | 52 </body> |
| 50 </html> | 53 </html> |
| OLD | NEW |