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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXTable.cpp

Issue 2630723002: Fix blink_perf.paint regression about tables (Closed)
Patch Set: Nits Created 3 years, 11 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 | « third_party/WebKit/Source/core/paint/TableSectionPainter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/AXTable.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXTable.cpp b/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
index af68f1a426918f858b4f40cd3ed23dfb4c18c28b..8c56fd8d4e4ca614919becd30c29b3c47535a333 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
@@ -164,11 +164,11 @@ bool AXTable::isDataTable() const {
if (!firstBody)
return false;
- int numCols = firstBody->numEffectiveColumns();
+ int numColsInFirstBody = firstBody->numEffectiveColumns();
int numRows = firstBody->numRows();
// If there's only one cell, it's not a good AXTable candidate.
- if (numRows == 1 && numCols == 1)
+ if (numRows == 1 && numColsInFirstBody == 1)
return false;
// If there are at least 20 rows, we'll call it a data table.
@@ -203,7 +203,8 @@ bool AXTable::isDataTable() const {
int headersInFirstColumnCount = 0;
for (int row = 0; row < numRows; ++row) {
int headersInFirstRowCount = 0;
- for (int col = 0; col < numCols; ++col) {
+ int nCols = firstBody->numCols(row);
+ for (int col = 0; col < nCols; ++col) {
LayoutTableCell* cell = firstBody->primaryCellAt(row, col);
if (!cell)
continue;
@@ -291,7 +292,8 @@ bool AXTable::isDataTable() const {
}
}
- if (!row && headersInFirstRowCount == numCols && numCols > 1)
+ if (!row && headersInFirstRowCount == numColsInFirstBody &&
+ numColsInFirstBody > 1)
return true;
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/TableSectionPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698