Bug 1438193 - part5: IsMultiColumn r=surkov

turn ColCount and IsMultiColumn into const functions
This commit is contained in:
Tokio Kajitsuka 2018-05-06 00:55:29 +09:00
parent a5eb42da78
commit 80aa8d9625
9 changed files with 10 additions and 10 deletions

View File

@ -44,7 +44,7 @@ ARIAGridAccessible::NativeRole()
// Table
uint32_t
ARIAGridAccessible::ColCount()
ARIAGridAccessible::ColCount() const
{
AccIterator rowIter(this, filters::GetRow);
Accessible* row = rowIter.Next();

View File

@ -29,7 +29,7 @@ public:
virtual TableAccessible* AsTable() override { return this; }
// TableAccessible
virtual uint32_t ColCount() override;
virtual uint32_t ColCount() const override;
virtual uint32_t RowCount() override;
virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) override;
virtual bool IsColSelected(uint32_t aColIdx) override;

View File

@ -35,7 +35,7 @@ public:
/**
* Return the number of columns in the table.
*/
virtual uint32_t ColCount() { return 0; }
virtual uint32_t ColCount() const { return 0; }
/**
* Return the number of rows in the table.

View File

@ -484,7 +484,7 @@ HTMLTableAccessible::Summary(nsString& aSummary)
}
uint32_t
HTMLTableAccessible::ColCount()
HTMLTableAccessible::ColCount() const
{
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
return tableFrame ? tableFrame->GetColCount() : 0;

View File

@ -132,7 +132,7 @@ public:
// TableAccessible
virtual Accessible* Caption() const override;
virtual void Summary(nsString& aSummary) override;
virtual uint32_t ColCount() override;
virtual uint32_t ColCount() const override;
virtual uint32_t RowCount() override;
virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) override;
virtual int32_t CellIndexAt(uint32_t aRowIdx, uint32_t aColIdx) override;

View File

@ -166,7 +166,7 @@ XULListboxAccessible::NativeRole()
// XULListboxAccessible: Table
uint32_t
XULListboxAccessible::ColCount()
XULListboxAccessible::ColCount() const
{
nsIContent* headContent = nullptr;
for (nsIContent* childContent = mContent->GetFirstChild(); childContent;

View File

@ -62,7 +62,7 @@ public:
XULListboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
// TableAccessible
virtual uint32_t ColCount() override;
virtual uint32_t ColCount() const override;
virtual uint32_t RowCount() override;
virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) override;
virtual bool IsColSelected(uint32_t aColIdx) override;
@ -95,7 +95,7 @@ public:
protected:
virtual ~XULListboxAccessible() {}
bool IsMulticolumn() { return ColCount() > 1; }
bool IsMulticolumn() const { return ColCount() > 1; }
};
/**

View File

@ -33,7 +33,7 @@ XULTreeGridAccessible::~XULTreeGridAccessible()
// XULTreeGridAccessible: Table
uint32_t
XULTreeGridAccessible::ColCount()
XULTreeGridAccessible::ColCount() const
{
return nsCoreUtils::GetSensibleColumnCount(mTree);
}

View File

@ -30,7 +30,7 @@ public:
{ mGenericTypes |= eTable; }
// TableAccessible
virtual uint32_t ColCount() override;
virtual uint32_t ColCount() const override;
virtual uint32_t RowCount() override;
virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) override;
virtual void ColDescription(uint32_t aColIdx, nsString& aDescription) override;