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

Unified Diff: Source/core/accessibility/AccessibilityTableCell.cpp

Issue 20294002: Fix trailing whitespace in .cpp, .h, and .idl files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 5 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: Source/core/accessibility/AccessibilityTableCell.cpp
diff --git a/Source/core/accessibility/AccessibilityTableCell.cpp b/Source/core/accessibility/AccessibilityTableCell.cpp
index 56fd2e12c9a67521f4cb41755907cb3b3c128863..54757d2c3a144694c4242bb00a38806b1efe79e8 100644
--- a/Source/core/accessibility/AccessibilityTableCell.cpp
+++ b/Source/core/accessibility/AccessibilityTableCell.cpp
@@ -35,7 +35,7 @@
using namespace std;
namespace WebCore {
-
+
using namespace HTMLNames;
AccessibilityTableCell::AccessibilityTableCell(RenderObject* renderer)
@@ -59,13 +59,13 @@ bool AccessibilityTableCell::computeAccessibilityIsIgnored() const
return false;
if (decision == IgnoreObject)
return true;
-
+
if (!isTableCell())
return AccessibilityRenderObject::computeAccessibilityIsIgnored();
-
+
return false;
}
-
+
AccessibilityObject* AccessibilityTableCell::parentTable() const
{
if (!m_renderer || !m_renderer->isTableCell())
@@ -74,48 +74,48 @@ AccessibilityObject* AccessibilityTableCell::parentTable() const
// If the document no longer exists, we might not have an axObjectCache.
if (!axObjectCache())
return 0;
-
- // Do not use getOrCreate. parentTable() can be called while the render tree is being modified
+
+ // Do not use getOrCreate. parentTable() can be called while the render tree is being modified
// by javascript, and creating a table element may try to access the render tree while in a bad state.
// By using only get() implies that the AXTable must be created before AXTableCells. This should
// always be the case when AT clients access a table.
- // https://bugs.webkit.org/show_bug.cgi?id=42652
+ // https://bugs.webkit.org/show_bug.cgi?id=42652
return axObjectCache()->get(toRenderTableCell(m_renderer)->table());
}
-
+
bool AccessibilityTableCell::isTableCell() const
{
AccessibilityObject* parent = parentObjectUnignored();
if (!parent || !parent->isTableRow())
return false;
-
+
return true;
}
-
+
AccessibilityRole AccessibilityTableCell::determineAccessibilityRole()
{
if (!isTableCell())
return AccessibilityRenderObject::determineAccessibilityRole();
-
+
return CellRole;
}
-
+
void AccessibilityTableCell::rowIndexRange(pair<unsigned, unsigned>& rowRange)
{
if (!m_renderer || !m_renderer->isTableCell())
return;
-
+
RenderTableCell* renderCell = toRenderTableCell(m_renderer);
rowRange.first = renderCell->rowIndex();
rowRange.second = renderCell->rowSpan();
-
+
// since our table might have multiple sections, we have to offset our row appropriately
RenderTableSection* section = renderCell->section();
RenderTable* table = renderCell->table();
if (!table || !section)
return;
- RenderTableSection* tableSection = table->topSection();
+ RenderTableSection* tableSection = table->topSection();
unsigned rowOffset = 0;
while (tableSection) {
if (tableSection == section)
@@ -126,17 +126,17 @@ void AccessibilityTableCell::rowIndexRange(pair<unsigned, unsigned>& rowRange)
rowRange.first += rowOffset;
}
-
+
void AccessibilityTableCell::columnIndexRange(pair<unsigned, unsigned>& columnRange)
{
if (!m_renderer || !m_renderer->isTableCell())
return;
-
+
RenderTableCell* renderCell = toRenderTableCell(m_renderer);
columnRange.first = renderCell->col();
- columnRange.second = renderCell->colSpan();
+ columnRange.second = renderCell->colSpan();
}
-
+
AccessibilityObject* AccessibilityTableCell::titleUIElement() const
{
// Try to find if the first cell in this row is a <th>. If it is,
@@ -150,7 +150,7 @@ AccessibilityObject* AccessibilityTableCell::titleUIElement() const
Node* node = m_renderer->node();
if (node && node->hasTagName(thTag))
return 0;
-
+
RenderTableCell* renderCell = toRenderTableCell(m_renderer);
// If this cell is in the first column, there is no need to continue.
@@ -163,7 +163,7 @@ AccessibilityObject* AccessibilityTableCell::titleUIElement() const
RenderTableSection* section = renderCell->section();
if (!section)
return 0;
-
+
RenderTableCell* headerCell = section->primaryCellAt(row, 0);
if (!headerCell || headerCell == renderCell)
return 0;
@@ -171,8 +171,8 @@ AccessibilityObject* AccessibilityTableCell::titleUIElement() const
Node* cellElement = headerCell->node();
if (!cellElement || !cellElement->hasTagName(thTag))
return 0;
-
+
return axObjectCache()->getOrCreate(headerCell);
}
-
+
} // namespace WebCore
« no previous file with comments | « Source/core/accessibility/AccessibilityTable.cpp ('k') | Source/core/accessibility/AccessibilityTableColumn.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698