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

Unified Diff: PerformanceTests/Layout/resources/large-table-with-collapsed-borders.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.js
diff --git a/PerformanceTests/Layout/resources/large-table-with-collapsed-borders.js b/PerformanceTests/Layout/resources/large-table-with-collapsed-borders.js
new file mode 100644
index 0000000000000000000000000000000000000000..373432d93595a242713b406fa00d2d680ac8513c
--- /dev/null
+++ b/PerformanceTests/Layout/resources/large-table-with-collapsed-borders.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, colspan) {
+ 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 (colspan > 0 && x==10 && y==0)
+ table.rows[y].cells[x].colSpan = colspan;
+ }
+ }
+ return table;
+ }
+
+ function createTestFunction(width, height, colspan) {
+ return function() {
+ var table = createTable(width, height, colspan);
+ table.clientHeight;
+ }
+ }
+
+ window.createTableTestFunction = createTestFunction;
+})();
« no previous file with comments | « PerformanceTests/Layout/resources/large-table-with-collapsed-borders.css ('k') | Source/core/rendering/RenderTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698