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

Unified Diff: third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-zero-width-collapsed-borders.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
Index: third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-zero-width-collapsed-borders.html
diff --git a/third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-zero-width-collapsed-borders.html b/third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-zero-width-collapsed-borders.html
new file mode 100644
index 0000000000000000000000000000000000000000..56436e0efd8ca456a917dcfaf4f0525594963f21
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-zero-width-collapsed-borders.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<body>
+<script src="../resources/runner.js"></script>
+<style>td { border: 0 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(600, 600);
+document.body.appendChild(table);
+
+var ix = 30;
+var iy = 30;
+
+PerfTestRunner.measureFrameTime({
+ run: function() {
+ table.childNodes[iy].childNodes[ix].style.backgroundColor = 'teal';
+ ix++;
+ iy++;
+ },
+});
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698