Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: third_party/WebKit/PerformanceTests/Mutation/large-table-row-height-change-with-collapsed-border.html

Issue 2842313002: Add two large table collapsed border performance tests (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-zero-width-collapsed-borders.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PerformanceTests/Mutation/large-table-row-height-change-with-collapsed-border.html
diff --git a/third_party/WebKit/PerformanceTests/Mutation/large-table-row-height-change-with-collapsed-border.html b/third_party/WebKit/PerformanceTests/Mutation/large-table-row-height-change-with-collapsed-border.html
new file mode 100644
index 0000000000000000000000000000000000000000..af3a09b59c17090a2c07a27821ca3e43b2c6fae1
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Mutation/large-table-row-height-change-with-collapsed-border.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<body>
+<script src="../resources/runner.js"></script>
+<style>td { border: 1px solid blue }</style>
+<script>
+function createTable(rows, columns) {
+ var table = document.createElement("TABLE");
+ // Collapsing border is not necessary to see the slowness
+ // but it makes the painting phase ~2x slower.
+ table.style.borderCollapse = "collapse";
+ for (var i = 0; i < rows; ++i) {
+ var tr = document.createElement("TR");
+ for (var j = 0; j < columns; ++j) {
+ var td = document.createElement("TD");
+ tr.appendChild(td);
+ }
+ table.appendChild(tr);
+ }
+ return table;
+}
+
+var table = createTable(400, 400);
+document.body.appendChild(table);
+
+var y = 0;
+PerfTestRunner.measureFrameTime({
+ run: function() {
pdr. 2017/04/27 05:18:56 Optional: can you move the setup into setup() and
Xianzhu 2017/04/27 05:56:00 Good idea! I will address this in a follow-up, inc
+ table.childNodes[y].style.height = '20px';
+ y++;
+ },
+});
+</script>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-zero-width-collapsed-borders.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698