Bug 1076816 - segregate XPCOM tree, r=davidb
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "DocAccessible.h"
|
||||
#include "nsIAccessibleRelation.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
#include "Relation.h"
|
||||
#include "Role.h"
|
||||
@@ -47,28 +46,16 @@ using namespace mozilla::a11y;
|
||||
|
||||
HTMLTableCellAccessible::
|
||||
HTMLTableCellAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||
HyperTextAccessibleWrap(aContent, aDoc), xpcAccessibleTableCell(this)
|
||||
HyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
mGenericTypes |= eTableCell;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLTableCellAccessible: nsISupports implementation
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(HTMLTableCellAccessible,
|
||||
HyperTextAccessible,
|
||||
nsIAccessibleTableCell)
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(HTMLTableCellAccessible, HyperTextAccessible)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLTableCellAccessible: Accessible implementation
|
||||
|
||||
void
|
||||
HTMLTableCellAccessible::Shutdown()
|
||||
{
|
||||
mTableCell = nullptr;
|
||||
HyperTextAccessibleWrap::Shutdown();
|
||||
}
|
||||
|
||||
role
|
||||
HTMLTableCellAccessible::NativeRole()
|
||||
{
|
||||
@@ -146,7 +133,7 @@ HTMLTableCellAccessible::NativeAttributes()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLTableCellAccessible: nsIAccessibleTableCell implementation
|
||||
// HTMLTableCellAccessible: TableCellAccessible implementation
|
||||
|
||||
TableAccessible*
|
||||
HTMLTableCellAccessible::Table() const
|
||||
@@ -361,19 +348,11 @@ HTMLTableRowAccessible::NativeRole()
|
||||
// HTMLTableAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(HTMLTableAccessible, Accessible,
|
||||
nsIAccessibleTable)
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(HTMLTableAccessible, Accessible)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLTableAccessible: Accessible
|
||||
|
||||
void
|
||||
HTMLTableAccessible::Shutdown()
|
||||
{
|
||||
mTable = nullptr;
|
||||
AccessibleWrap::Shutdown();
|
||||
}
|
||||
|
||||
void
|
||||
HTMLTableAccessible::CacheChildren()
|
||||
{
|
||||
@@ -444,7 +423,7 @@ HTMLTableAccessible::NativeAttributes()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLTableAccessible: nsIAccessible implementation
|
||||
// HTMLTableAccessible: Accessible
|
||||
|
||||
Relation
|
||||
HTMLTableAccessible::RelationByType(RelationType aType)
|
||||
@@ -457,7 +436,7 @@ HTMLTableAccessible::RelationByType(RelationType aType)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLTableAccessible: nsIAccessibleTable implementation
|
||||
// HTMLTableAccessible: Table
|
||||
|
||||
Accessible*
|
||||
HTMLTableAccessible::Caption() const
|
||||
@@ -1013,18 +992,17 @@ HTMLTableAccessible::IsProbablyLayoutTable()
|
||||
}
|
||||
|
||||
// If only 1 column or only 1 row, it's for layout
|
||||
int32_t columns, rows;
|
||||
GetColumnCount(&columns);
|
||||
if (columns <=1) {
|
||||
uint32_t colCount = ColCount();
|
||||
if (colCount <=1) {
|
||||
RETURN_LAYOUT_ANSWER(true, "Has only 1 column");
|
||||
}
|
||||
GetRowCount(&rows);
|
||||
if (rows <=1) {
|
||||
uint32_t rowCount = RowCount();
|
||||
if (rowCount <=1) {
|
||||
RETURN_LAYOUT_ANSWER(true, "Has only 1 row");
|
||||
}
|
||||
|
||||
// Check for many columns
|
||||
if (columns >= 5) {
|
||||
if (colCount >= 5) {
|
||||
RETURN_LAYOUT_ANSWER(false, ">=5 columns");
|
||||
}
|
||||
|
||||
@@ -1067,8 +1045,8 @@ HTMLTableAccessible::IsProbablyLayoutTable()
|
||||
}
|
||||
|
||||
// Check for many rows
|
||||
const int32_t kMaxLayoutRows = 20;
|
||||
if (rows > kMaxLayoutRows) { // A ton of rows, this is probably for data
|
||||
const uint32_t kMaxLayoutRows = 20;
|
||||
if (rowCount > kMaxLayoutRows) { // A ton of rows, this is probably for data
|
||||
RETURN_LAYOUT_ANSWER(false, ">= kMaxLayoutRows (20) and non-bordered");
|
||||
}
|
||||
|
||||
@@ -1087,7 +1065,7 @@ HTMLTableAccessible::IsProbablyLayoutTable()
|
||||
}
|
||||
|
||||
// Two column rules
|
||||
if (rows * columns <= 10) {
|
||||
if (rowCount * colCount <= 10) {
|
||||
RETURN_LAYOUT_ANSWER(true, "2-4 columns, 10 cells or less, non-bordered");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user