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

Unified Diff: PerformanceTests/Layout/resources/large-table-with-collapsed-borders-and-colspan-wider-than-table.js

Issue 154243002: Optimize RenderTable::colToEffCol() for tables without colspans (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 10 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: PerformanceTests/Layout/resources/large-table-with-collapsed-borders-and-colspan-wider-than-table.js
diff --git a/PerformanceTests/Layout/resources/large-table-with-collapsed-borders-and-colspan-wider-than-table.js b/PerformanceTests/Layout/resources/large-table-with-collapsed-borders-and-colspan-wider-than-table.js
new file mode 100644
index 0000000000000000000000000000000000000000..348c078093512972665a5a52af5cf10ec6b9d550
--- /dev/null
+++ b/PerformanceTests/Layout/resources/large-table-with-collapsed-borders-and-colspan-wider-than-table.js
@@ -0,0 +1,32 @@
+(function() {
+ function createElement(tag, parent, className, id) {
+ var el = document.createElement(tag);
+ el.className = className;
+ if (id)
+ el.id = id;
+ parent.appendChild(el);
+ return el;
+ }
+
+ function createTable(width, height) {
+ var table = createElement("table", document.body, "table");
+ for (var y = 0; y < height; ++y) {
+ var tr = createElement("tr", table, "tr");
+ for (var x = 0; x < width; ++x) {
+ var td = createElement("td", tr, "td");
+ if (x==10 && y==0)
+ table.rows[y].cells[x].colSpan = "500";
+ }
+ }
+ return table;
+ }
+
+ function createTestFunction(width, height) {
+ return function() {
+ var table = createTable(width, height);
+ table.clientHeight;
+ }
+ }
+
+ window.createTableTestFunction = createTestFunction;
+})();

Powered by Google App Engine
This is Rietveld 408576698