Bug 1438193 - part7: NativeRole r=surkov

turn NativeRole into const functions
This commit is contained in:
Tokio Kajitsuka 2018-05-08 04:05:50 +09:00
Родитель 17675612bf
Коммит 9b9c3780fe
61 изменённых файлов: 155 добавлений и 155 удалений

Просмотреть файл

@ -34,7 +34,7 @@ ARIAGridAccessible::
}
role
ARIAGridAccessible::NativeRole()
ARIAGridAccessible::NativeRole() const
{
a11y::role r = GetAccService()->MarkupRole(mContent);
return r != roles::NOTHING ? r : roles::TABLE;
@ -550,7 +550,7 @@ ARIARowAccessible::
}
role
ARIARowAccessible::NativeRole()
ARIARowAccessible::NativeRole() const
{
a11y::role r = GetAccService()->MarkupRole(mContent);
return r != roles::NOTHING ? r : roles::ROW;
@ -587,7 +587,7 @@ ARIAGridCellAccessible::
}
role
ARIAGridCellAccessible::NativeRole()
ARIAGridCellAccessible::NativeRole() const
{
a11y::role r = GetAccService()->MarkupRole(mContent);
return r != roles::NOTHING ? r : roles::CELL;

Просмотреть файл

@ -25,7 +25,7 @@ public:
NS_INLINE_DECL_REFCOUNTING_INHERITED(ARIAGridAccessible, AccessibleWrap)
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual TableAccessible* AsTable() override { return this; }
// TableAccessible
@ -85,7 +85,7 @@ public:
NS_INLINE_DECL_REFCOUNTING_INHERITED(ARIARowAccessible, AccessibleWrap)
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual mozilla::a11y::GroupPos GroupPosition() override;
protected:
@ -106,7 +106,7 @@ public:
HyperTextAccessibleWrap)
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual TableCellAccessible* AsTableCell() override { return this; }
virtual void ApplyARIAState(uint64_t* aState) const override;
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;

Просмотреть файл

@ -321,7 +321,7 @@ Accessible::TranslateString(const nsString& aKey, nsAString& aStringOut)
}
uint64_t
Accessible::VisibilityState()
Accessible::VisibilityState() const
{
nsIFrame* frame = GetFrame();
if (!frame)
@ -1514,7 +1514,7 @@ Accessible::LandmarkRole() const
}
role
Accessible::NativeRole()
Accessible::NativeRole() const
{
return roles::NOTHING;
}

Просмотреть файл

@ -251,7 +251,7 @@ public:
* Returns enumerated accessible role from native markup (see constants in
* Role.h). Doesn't take into account ARIA roles.
*/
virtual mozilla::a11y::role NativeRole();
virtual mozilla::a11y::role NativeRole() const;
/**
* Return all states of accessible (including ARIA states).
@ -308,7 +308,7 @@ public:
/**
* Return bit set of invisible and offscreen states.
*/
uint64_t VisibilityState();
uint64_t VisibilityState() const;
/**
* Return true if native unavailable state present.

Просмотреть файл

@ -143,7 +143,7 @@ ApplicationAccessible::ApplyARIAState(uint64_t* aState) const
}
role
ApplicationAccessible::NativeRole()
ApplicationAccessible::NativeRole() const
{
return roles::APP_ROOT;
}

Просмотреть файл

@ -44,7 +44,7 @@ public:
virtual void ApplyARIAState(uint64_t* aState) const override;
virtual void Description(nsString& aDescription) override;
virtual void Value(nsString& aValue) override;
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t State() override;
virtual uint64_t NativeState() override;
virtual Relation RelationByType(RelationType aType) override;

Просмотреть файл

@ -99,7 +99,7 @@ public:
{ return Accessible::QueryInterface(aIID, aPtr); }
// Accessible
virtual a11y::role NativeRole() override { return R; }
virtual a11y::role NativeRole() const override { return R; }
protected:
virtual ~EnumRoleAccessible() { }

Просмотреть файл

@ -194,7 +194,7 @@ DocAccessible::Name(nsString& aName)
// Accessible public method
role
DocAccessible::NativeRole()
DocAccessible::NativeRole() const
{
nsCOMPtr<nsIDocShell> docShell = nsCoreUtils::GetDocShellFor(mDocumentNode);
if (docShell) {

Просмотреть файл

@ -72,7 +72,7 @@ public:
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) override;
virtual void Description(nsString& aDescription) override;
virtual Accessible* FocusedChild() override;
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual uint64_t NativeInteractiveState() const override;
virtual bool NativelyUnavailable() const override;

Просмотреть файл

@ -25,7 +25,7 @@ template class mozilla::a11y::ProgressMeterAccessible<100>;
template<int Max>
role
ProgressMeterAccessible<Max>::NativeRole()
ProgressMeterAccessible<Max>::NativeRole() const
{
return roles::PROGRESSBAR;
}
@ -176,7 +176,7 @@ RadioButtonAccessible::DoAction(uint8_t aIndex)
}
role
RadioButtonAccessible::NativeRole()
RadioButtonAccessible::NativeRole() const
{
return roles::RADIOBUTTON;
}

Просмотреть файл

@ -29,7 +29,7 @@ public:
// Accessible
virtual void Value(nsString& aValue) override;
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// Value
@ -56,7 +56,7 @@ public:
RadioButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
// ActionAccessible
virtual uint8_t ActionCount() override;

Просмотреть файл

@ -57,7 +57,7 @@ HyperTextAccessible::
}
role
HyperTextAccessible::NativeRole()
HyperTextAccessible::NativeRole() const
{
a11y::role r = GetAccService()->MarkupRole(mContent);
if (r != roles::NOTHING)

Просмотреть файл

@ -57,7 +57,7 @@ public:
virtual nsAtom* LandmarkRole() const override;
virtual int32_t GetLevelInternal() override;
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual void Shutdown() override;

Просмотреть файл

@ -90,7 +90,7 @@ ImageAccessible::NativeName(nsString& aName)
}
role
ImageAccessible::NativeRole()
ImageAccessible::NativeRole() const
{
return roles::GRAPHIC;
}

Просмотреть файл

@ -22,7 +22,7 @@ public:
ImageAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;

Просмотреть файл

@ -54,7 +54,7 @@ OuterDocAccessible::~OuterDocAccessible()
// Accessible public (DON'T add methods here)
role
OuterDocAccessible::NativeRole()
OuterDocAccessible::NativeRole() const
{
return roles::INTERNAL_FRAME;
}

Просмотреть файл

@ -32,7 +32,7 @@ public:
// Accessible
virtual void Shutdown() override;
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
EWhichChildAtPoint aWhichChild) override;

Просмотреть файл

@ -89,7 +89,7 @@ RootAccessible::Name(nsString& aName)
}
role
RootAccessible::NativeRole()
RootAccessible::NativeRole() const
{
// If it's a <dialog> or <wizard>, use roles::DIALOG instead
dom::Element* rootElm = mDocumentNode->GetRootElement();

Просмотреть файл

@ -31,7 +31,7 @@ public:
virtual void Shutdown() override;
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) override;
virtual Relation RelationByType(RelationType aType) override;
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// RootAccessible

Просмотреть файл

@ -29,7 +29,7 @@ TextLeafAccessible::~TextLeafAccessible()
}
role
TextLeafAccessible::NativeRole()
TextLeafAccessible::NativeRole() const
{
nsIFrame* frame = GetFrame();
if (frame && frame->IsGeneratedContentFrame())

Просмотреть файл

@ -21,7 +21,7 @@ public:
virtual ~TextLeafAccessible();
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual void AppendTextTo(nsAString& aText, uint32_t aStartOffset = 0,
uint32_t aLength = UINT32_MAX) override;
virtual ENameValueFlag Name(nsString& aName) override;

Просмотреть файл

@ -16,7 +16,7 @@ HTMLCanvasAccessible::
}
role
HTMLCanvasAccessible::NativeRole()
HTMLCanvasAccessible::NativeRole() const
{
return roles::CANVAS;
}

Просмотреть файл

@ -24,7 +24,7 @@ public:
HyperTextAccessibleWrap)
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
protected:
virtual ~HTMLCanvasAccessible() { }

Просмотреть файл

@ -24,7 +24,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
role
HTMLHRAccessible::NativeRole()
HTMLHRAccessible::NativeRole() const
{
return roles::SEPARATOR;
}
@ -34,7 +34,7 @@ HTMLHRAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
role
HTMLBRAccessible::NativeRole()
HTMLBRAccessible::NativeRole() const
{
return roles::WHITESPACE;
}
@ -205,7 +205,7 @@ HTMLSummaryAccessible::IsWidget() const
////////////////////////////////////////////////////////////////////////////////
role
HTMLHeaderOrFooterAccessible::NativeRole()
HTMLHeaderOrFooterAccessible::NativeRole() const
{
// Only map header and footer if they are direct descendants of the body tag.
// If other sectioning or sectioning root elements, they become sections.

Просмотреть файл

@ -22,7 +22,7 @@ public:
LeafAccessible(aContent, aDoc) {}
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
};
/**
@ -39,7 +39,7 @@ public:
}
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
protected:
@ -131,7 +131,7 @@ public:
// Accessible
virtual nsAtom* LandmarkRole() const override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
protected:
virtual ~HTMLHeaderOrFooterAccessible() {}

Просмотреть файл

@ -40,7 +40,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
role
HTMLCheckboxAccessible::NativeRole()
HTMLCheckboxAccessible::NativeRole() const
{
return roles::CHECKBUTTON;
}
@ -234,7 +234,7 @@ HTMLButtonAccessible::NativeState()
}
role
HTMLButtonAccessible::NativeRole()
HTMLButtonAccessible::NativeRole() const
{
return roles::PUSHBUTTON;
}
@ -289,7 +289,7 @@ HTMLTextFieldAccessible::
}
role
HTMLTextFieldAccessible::NativeRole()
HTMLTextFieldAccessible::NativeRole() const
{
if (mType == eHTMLTextPasswordFieldType) {
return roles::PASSWORD_TEXT;
@ -503,7 +503,7 @@ HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
}
role
HTMLFileInputAccessible::NativeRole()
HTMLFileInputAccessible::NativeRole() const
{
// JAWS wants a text container, others don't mind. No specific role in
// AT APIs.
@ -543,7 +543,7 @@ HTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent)
////////////////////////////////////////////////////////////////////////////////
role
HTMLSpinnerAccessible::NativeRole()
HTMLSpinnerAccessible::NativeRole() const
{
return roles::SPINBUTTON;
}
@ -615,7 +615,7 @@ HTMLSpinnerAccessible::SetCurValue(double aValue)
////////////////////////////////////////////////////////////////////////////////
role
HTMLRangeAccessible::NativeRole()
HTMLRangeAccessible::NativeRole() const
{
return roles::SLIDER;
}
@ -699,7 +699,7 @@ HTMLGroupboxAccessible::
}
role
HTMLGroupboxAccessible::NativeRole()
HTMLGroupboxAccessible::NativeRole() const
{
return roles::GROUPING;
}

Просмотреть файл

@ -36,7 +36,7 @@ public:
}
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// ActionAccessible
@ -84,7 +84,7 @@ public:
HTMLButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t State() override;
virtual uint64_t NativeState() override;
@ -123,7 +123,7 @@ public:
// Accessible
virtual void Value(nsString& aValue) override;
virtual void ApplyARIAState(uint64_t* aState) const override;
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
@ -158,7 +158,7 @@ public:
HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual nsresult HandleAccEvent(AccEvent* aAccEvent) override;
};
@ -176,7 +176,7 @@ public:
}
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual void Value(nsString& aValue) override;
virtual double MaxValue() const override;
@ -201,7 +201,7 @@ public:
// Accessible
virtual void Value(nsString& aValue) override;
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
// Value
virtual double MaxValue() const override;
@ -224,7 +224,7 @@ public:
HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual Relation RelationByType(RelationType aType) override;
protected:

Просмотреть файл

@ -36,7 +36,7 @@ HTMLImageMapAccessible::
// HTMLImageMapAccessible: Accessible public
role
HTMLImageMapAccessible::NativeRole()
HTMLImageMapAccessible::NativeRole() const
{
return roles::IMAGE_MAP;
}

Просмотреть файл

@ -25,7 +25,7 @@ public:
ImageAccessibleWrap)
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
// HyperLinkAccessible
virtual uint32_t AnchorCount() override;

Просмотреть файл

@ -31,7 +31,7 @@ HTMLLinkAccessible::
// nsIAccessible
role
HTMLLinkAccessible::NativeRole()
HTMLLinkAccessible::NativeRole() const
{
return roles::LINK;
}

Просмотреть файл

@ -21,7 +21,7 @@ public:
// Accessible
virtual void Value(nsString& aValue) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual uint64_t NativeLinkState() const override;
virtual uint64_t NativeInteractiveState() const override;

Просмотреть файл

@ -22,7 +22,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
role
HTMLListAccessible::NativeRole()
HTMLListAccessible::NativeRole() const
{
a11y::role r = GetAccService()->MarkupRole(mContent);
return r != roles::NOTHING ? r : roles::LIST;
@ -62,7 +62,7 @@ HTMLLIAccessible::Shutdown()
}
role
HTMLLIAccessible::NativeRole()
HTMLLIAccessible::NativeRole() const
{
a11y::role r = GetAccService()->MarkupRole(mContent);
return r != roles::NOTHING ? r : roles::LISTITEM;
@ -161,7 +161,7 @@ HTMLListBulletAccessible::Name(nsString &aName)
}
role
HTMLListBulletAccessible::NativeRole()
HTMLListBulletAccessible::NativeRole() const
{
return roles::STATICTEXT;
}

Просмотреть файл

@ -29,7 +29,7 @@ public:
HyperTextAccessibleWrap)
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
protected:
@ -52,7 +52,7 @@ public:
// Accessible
virtual void Shutdown() override;
virtual nsRect BoundsInAppUnits() const override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual bool InsertChildAt(uint32_t aIndex, Accessible* aChild) override;
@ -81,7 +81,7 @@ public:
// Accessible
virtual nsIFrame* GetFrame() const override;
virtual ENameValueFlag Name(nsString& aName) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual void AppendTextTo(nsAString& aText, uint32_t aStartOffset = 0,
uint32_t aLength = UINT32_MAX) override;

Просмотреть файл

@ -49,7 +49,7 @@ HTMLSelectListAccessible::NativeState()
}
role
HTMLSelectListAccessible::NativeRole()
HTMLSelectListAccessible::NativeRole() const
{
return roles::LISTBOX;
}
@ -139,7 +139,7 @@ HTMLSelectOptionAccessible::
// HTMLSelectOptionAccessible: Accessible public
role
HTMLSelectOptionAccessible::NativeRole()
HTMLSelectOptionAccessible::NativeRole() const
{
if (GetCombobox())
return roles::COMBOBOX_OPTION;
@ -306,7 +306,7 @@ HTMLSelectOptionAccessible::ContainerWidget() const
////////////////////////////////////////////////////////////////////////////////
role
HTMLSelectOptGroupAccessible::NativeRole()
HTMLSelectOptGroupAccessible::NativeRole() const
{
return roles::GROUPING;
}
@ -368,7 +368,7 @@ HTMLComboboxAccessible::
// HTMLComboboxAccessible: Accessible
role
HTMLComboboxAccessible::NativeRole()
HTMLComboboxAccessible::NativeRole() const
{
return roles::COMBOBOX;
}
@ -562,7 +562,7 @@ HTMLComboboxListAccessible::GetFrame() const
}
role
HTMLComboboxListAccessible::NativeRole()
HTMLComboboxListAccessible::NativeRole() const
{
return roles::COMBOBOX_LIST;
}

Просмотреть файл

@ -37,7 +37,7 @@ public:
virtual ~HTMLSelectListAccessible() {}
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual bool IsAcceptableChild(nsIContent* aEl) const override;
@ -65,7 +65,7 @@ public:
virtual ~HTMLSelectOptionAccessible() {}
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual uint64_t NativeInteractiveState() const override;
@ -135,7 +135,7 @@ public:
virtual ~HTMLSelectOptGroupAccessible() {}
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeInteractiveState() const override;
virtual bool IsAcceptableChild(nsIContent* aEl) const override;
@ -166,7 +166,7 @@ public:
virtual void Shutdown() override;
virtual void Description(nsString& aDescription) override;
virtual void Value(nsString& aValue) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual bool RemoveChild(Accessible* aChild) override;
virtual bool IsAcceptableChild(nsIContent* aEl) const override;
@ -208,7 +208,7 @@ public:
// Accessible
virtual nsIFrame* GetFrame() const override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual nsRect RelativeBounds(nsIFrame** aBoundingFrame) const override;
virtual bool IsAcceptableChild(nsIContent* aEl) const override;

Просмотреть файл

@ -53,7 +53,7 @@ HTMLTableCellAccessible::
// HTMLTableCellAccessible: Accessible implementation
role
HTMLTableCellAccessible::NativeRole()
HTMLTableCellAccessible::NativeRole() const
{
if (mContent->IsMathMLElement(nsGkAtoms::mtd_)) {
return roles::MATHML_CELL;
@ -304,7 +304,7 @@ HTMLTableHeaderCellAccessible::
// HTMLTableHeaderCellAccessible: Accessible implementation
role
HTMLTableHeaderCellAccessible::NativeRole()
HTMLTableHeaderCellAccessible::NativeRole() const
{
// Check value of @scope attribute.
static Element::AttrValuesArray scopeValues[] =
@ -353,7 +353,7 @@ HTMLTableHeaderCellAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
role
HTMLTableRowAccessible::NativeRole()
HTMLTableRowAccessible::NativeRole() const
{
if (mContent->IsMathMLElement(nsGkAtoms::mtr_)) {
return roles::MATHML_TABLE_ROW;
@ -395,7 +395,7 @@ HTMLTableAccessible::InsertChildAt(uint32_t aIndex, Accessible* aChild)
}
role
HTMLTableAccessible::NativeRole()
HTMLTableAccessible::NativeRole() const
{
if (mContent->IsMathMLElement(nsGkAtoms::mtable_)) {
return roles::MATHML_TABLE;
@ -1114,7 +1114,7 @@ HTMLCaptionAccessible::RelationByType(RelationType aType)
}
role
HTMLCaptionAccessible::NativeRole()
HTMLCaptionAccessible::NativeRole() const
{
return roles::CAPTION;
}

Просмотреть файл

@ -34,7 +34,7 @@ public:
// Accessible
virtual TableCellAccessible* AsTableCell() override { return this; }
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual uint64_t NativeInteractiveState() const override;
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
@ -79,7 +79,7 @@ public:
HTMLTableHeaderCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
};
@ -99,7 +99,7 @@ public:
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableRowAccessible, AccessibleWrap)
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual mozilla::a11y::GroupPos GroupPosition() override;
protected:
@ -162,7 +162,7 @@ public:
// Accessible
virtual TableAccessible* AsTable() override { return this; }
virtual void Description(nsString& aDescription) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
virtual Relation RelationByType(RelationType aRelationType) override;
@ -223,7 +223,7 @@ public:
HyperTextAccessibleWrap(aContent, aDoc) { mType = eHTMLCaptionType; }
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual Relation RelationByType(RelationType aRelationType) override;
protected:

Просмотреть файл

@ -39,7 +39,7 @@ HTMLWin32ObjectOwnerAccessible::Shutdown()
}
role
HTMLWin32ObjectOwnerAccessible::NativeRole()
HTMLWin32ObjectOwnerAccessible::NativeRole() const
{
return roles::EMBEDDED_OBJECT;
}

Просмотреть файл

@ -32,7 +32,7 @@ public:
// Accessible
virtual void Shutdown();
virtual mozilla::a11y::role NativeRole();
virtual mozilla::a11y::role NativeRole() const override;
virtual bool NativelyUnavailable() const;
protected:

Просмотреть файл

@ -27,7 +27,7 @@ XULAlertAccessible::~XULAlertAccessible()
}
role
XULAlertAccessible::NativeRole()
XULAlertAccessible::NativeRole() const
{
return roles::ALERT;
}

Просмотреть файл

@ -24,7 +24,7 @@ public:
// Accessible
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// Widgets

Просмотреть файл

@ -37,7 +37,7 @@ XULColorPickerTileAccessible::Value(nsString& aValue)
}
role
XULColorPickerTileAccessible::NativeRole()
XULColorPickerTileAccessible::NativeRole() const
{
return roles::PUSHBUTTON;
}
@ -96,7 +96,7 @@ XULColorPickerAccessible::NativeState()
}
role
XULColorPickerAccessible::NativeRole()
XULColorPickerAccessible::NativeRole() const
{
return roles::BUTTONDROPDOWNGRID;
}

Просмотреть файл

@ -22,7 +22,7 @@ public:
// Accessible
virtual void Value(nsString& aValue) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual uint64_t NativeInteractiveState() const override;
@ -40,7 +40,7 @@ public:
XULColorPickerAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// Widgets

Просмотреть файл

@ -44,7 +44,7 @@ XULComboboxAccessible::
}
role
XULComboboxAccessible::NativeRole()
XULComboboxAccessible::NativeRole() const
{
return IsAutoComplete() ? roles::AUTOCOMPLETE : roles::COMBOBOX;
}

Просмотреть файл

@ -24,7 +24,7 @@ public:
// Accessible
virtual void Description(nsString& aDescription) override;
virtual void Value(nsString& aValue) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// ActionAccessible

Просмотреть файл

@ -73,7 +73,7 @@ XULLabelAccessible::NativeName(nsString& aName)
}
role
XULLabelAccessible::NativeRole()
XULLabelAccessible::NativeRole() const
{
return roles::LABEL;
}
@ -127,7 +127,7 @@ XULLabelAccessible::UpdateLabelValue(const nsString& aValue)
////////////////////////////////////////////////////////////////////////////////
role
XULLabelTextLeafAccessible::NativeRole()
XULLabelTextLeafAccessible::NativeRole() const
{
return roles::TEXT_LEAF;
}
@ -156,7 +156,7 @@ XULTooltipAccessible::NativeState()
}
role
XULTooltipAccessible::NativeRole()
XULTooltipAccessible::NativeRole() const
{
return roles::TOOLTIP;
}
@ -199,7 +199,7 @@ XULLinkAccessible::NativeName(nsString& aName)
}
role
XULLinkAccessible::NativeRole()
XULLinkAccessible::NativeRole() const
{
return roles::LINK;
}

Просмотреть файл

@ -24,7 +24,7 @@ public:
// Accessible
virtual void Shutdown() override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual Relation RelationByType(RelationType aType) override;
@ -59,7 +59,7 @@ public:
virtual ~XULLabelTextLeafAccessible() { }
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
};
@ -74,7 +74,7 @@ public:
XULTooltipAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
};
@ -86,7 +86,7 @@ public:
// Accessible
virtual void Value(nsString& aValue) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeLinkState() const override;
// ActionAccessible

Просмотреть файл

@ -82,7 +82,7 @@ XULButtonAccessible::DoAction(uint8_t aIndex)
// XULButtonAccessible: Accessible
role
XULButtonAccessible::NativeRole()
XULButtonAccessible::NativeRole() const
{
return roles::PUSHBUTTON;
}
@ -264,7 +264,7 @@ XULDropmarkerAccessible::DoAction(uint8_t index)
}
role
XULDropmarkerAccessible::NativeRole()
XULDropmarkerAccessible::NativeRole() const
{
return roles::PUSHBUTTON;
}
@ -286,7 +286,7 @@ XULCheckboxAccessible::
}
role
XULCheckboxAccessible::NativeRole()
XULCheckboxAccessible::NativeRole() const
{
return roles::CHECKBUTTON;
}
@ -352,7 +352,7 @@ XULGroupboxAccessible::
}
role
XULGroupboxAccessible::NativeRole()
XULGroupboxAccessible::NativeRole() const
{
return roles::GROUPING;
}
@ -462,7 +462,7 @@ XULRadioGroupAccessible::
}
role
XULRadioGroupAccessible::NativeRole()
XULRadioGroupAccessible::NativeRole() const
{
return roles::RADIO_GROUP;
}
@ -509,7 +509,7 @@ XULStatusBarAccessible::
}
role
XULStatusBarAccessible::NativeRole()
XULStatusBarAccessible::NativeRole() const
{
return roles::STATUSBAR;
}
@ -578,7 +578,7 @@ XULToolbarAccessible::
}
role
XULToolbarAccessible::NativeRole()
XULToolbarAccessible::NativeRole() const
{
return roles::TOOLBAR;
}
@ -604,7 +604,7 @@ XULToolbarSeparatorAccessible::
}
role
XULToolbarSeparatorAccessible::NativeRole()
XULToolbarSeparatorAccessible::NativeRole() const
{
return roles::SEPARATOR;
}

Просмотреть файл

@ -36,7 +36,7 @@ public:
NS_INLINE_DECL_REFCOUNTING_INHERITED(XULButtonAccessible, AccessibleWrap)
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// ActionAccessible
@ -70,7 +70,7 @@ public:
XULCheckboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// ActionAccessible
@ -89,7 +89,7 @@ public:
XULDropmarkerAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// ActionAccessible
@ -110,7 +110,7 @@ public:
XULGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual Relation RelationByType(RelationType aType) override;
protected:
@ -144,7 +144,7 @@ public:
XULRadioGroupAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeInteractiveState() const override;
// Widgets
@ -162,7 +162,7 @@ public:
XULStatusBarAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
};
/**
@ -190,7 +190,7 @@ public:
XULToolbarAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
protected:
// Accessible
@ -207,7 +207,7 @@ public:
DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole() override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
};

Просмотреть файл

@ -35,7 +35,7 @@ XULColumAccessible::
}
role
XULColumAccessible::NativeRole()
XULColumAccessible::NativeRole() const
{
return roles::LIST;
}
@ -58,7 +58,7 @@ XULColumnItemAccessible::
}
role
XULColumnItemAccessible::NativeRole()
XULColumnItemAccessible::NativeRole() const
{
return roles::COLUMNHEADER;
}
@ -152,7 +152,7 @@ XULListboxAccessible::Value(nsString& aValue)
}
role
XULListboxAccessible::NativeRole()
XULListboxAccessible::NativeRole() const
{
// A richlistbox is used with the new autocomplete URL bar, and has a parent
// popup <panel>.
@ -592,7 +592,7 @@ XULListitemAccessible::NativeName(nsString& aName)
}
role
XULListitemAccessible::NativeRole()
XULListitemAccessible::NativeRole() const
{
Accessible* list = GetListAccessible();
if (!list) {
@ -784,7 +784,7 @@ XULListCellAccessible::Selected()
// XULListCellAccessible. Accessible implementation
role
XULListCellAccessible::NativeRole()
XULListCellAccessible::NativeRole() const
{
return roles::CELL;
}

Просмотреть файл

@ -27,7 +27,7 @@ public:
XULColumAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
};
@ -41,7 +41,7 @@ public:
XULColumnItemAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// ActionAccessible
@ -82,7 +82,7 @@ public:
// Accessible
virtual void Value(nsString& aValue) override;
virtual TableAccessible* AsTable() override { return this; }
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// Widgets
@ -113,7 +113,7 @@ public:
// Accessible
virtual void Description(nsString& aDesc) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual uint64_t NativeInteractiveState() const override;
@ -156,7 +156,7 @@ public:
// Accessible
virtual TableCellAccessible* AsTableCell() override { return this; }
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
// TableCellAccessible
virtual TableAccessible* Table() const override;

Просмотреть файл

@ -242,7 +242,7 @@ XULMenuitemAccessible::KeyboardShortcut() const
}
role
XULMenuitemAccessible::NativeRole()
XULMenuitemAccessible::NativeRole() const
{
nsCOMPtr<nsIDOMXULContainerElement> xulContainer(do_QueryInterface(mContent));
if (xulContainer)
@ -368,7 +368,7 @@ XULMenuSeparatorAccessible::NativeName(nsString& aName)
}
role
XULMenuSeparatorAccessible::NativeRole()
XULMenuSeparatorAccessible::NativeRole() const
{
return roles::SEPARATOR;
}
@ -454,7 +454,7 @@ XULMenupopupAccessible::NativeName(nsString& aName)
}
role
XULMenupopupAccessible::NativeRole()
XULMenupopupAccessible::NativeRole() const
{
// If accessible is not bound to the tree (this happens while children are
// cached) return general role.
@ -551,7 +551,7 @@ XULMenubarAccessible::NativeName(nsString& aName)
}
role
XULMenubarAccessible::NativeRole()
XULMenubarAccessible::NativeRole() const
{
return roles::MENUBAR;
}

Просмотреть файл

@ -25,7 +25,7 @@ public:
// Accessible
virtual void Description(nsString& aDescription) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual uint64_t NativeInteractiveState() const override;
virtual int32_t GetLevelInternal() override;
@ -56,7 +56,7 @@ public:
XULMenuSeparatorAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// ActionAccessible
@ -79,7 +79,7 @@ public:
XULMenupopupAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
// Widgets
@ -103,7 +103,7 @@ public:
XULMenubarAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
// Widget
virtual bool IsActiveWidget() const override;

Просмотреть файл

@ -30,7 +30,7 @@ XULSliderAccessible::
// Accessible
role
XULSliderAccessible::NativeRole()
XULSliderAccessible::NativeRole() const
{
return roles::SLIDER;
}
@ -207,7 +207,7 @@ XULThumbAccessible::
// XULThumbAccessible: Accessible
role
XULThumbAccessible::NativeRole()
XULThumbAccessible::NativeRole() const
{
return roles::INDICATOR;
}

Просмотреть файл

@ -21,7 +21,7 @@ public:
// Accessible
virtual void Value(nsString& aValue) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeInteractiveState() const override;
virtual bool NativelyUnavailable() const override;
@ -63,7 +63,7 @@ public:
XULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
};
} // namespace a11y

Просмотреть файл

@ -65,7 +65,7 @@ XULTabAccessible::DoAction(uint8_t index)
// XULTabAccessible: Accessible
role
XULTabAccessible::NativeRole()
XULTabAccessible::NativeRole() const
{
return roles::PAGETAB;
}
@ -137,7 +137,7 @@ XULTabsAccessible::
}
role
XULTabsAccessible::NativeRole()
XULTabsAccessible::NativeRole() const
{
return roles::PAGETABLIST;
}
@ -167,7 +167,7 @@ XULTabsAccessible::NativeName(nsString& aName)
////////////////////////////////////////////////////////////////////////////////
role
XULTabpanelsAccessible::NativeRole()
XULTabpanelsAccessible::NativeRole() const
{
return roles::PANE;
}
@ -183,7 +183,7 @@ XULTabpanelAccessible::
}
role
XULTabpanelAccessible::NativeRole()
XULTabpanelAccessible::NativeRole() const
{
return roles::PROPERTYPAGE;
}

Просмотреть файл

@ -25,7 +25,7 @@ public:
XULTabAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual uint64_t NativeInteractiveState() const override;
virtual Relation RelationByType(RelationType aType) override;
@ -47,7 +47,7 @@ public:
// Accessible
virtual void Value(nsString& aValue) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
// ActionAccessible
virtual uint8_t ActionCount() override;
@ -69,7 +69,7 @@ public:
{ mType = eXULTabpanelsType; }
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
};
@ -86,7 +86,7 @@ public:
XULTabpanelAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual Relation RelationByType(RelationType aType) override;
};

Просмотреть файл

@ -153,7 +153,7 @@ XULTreeAccessible::Shutdown()
}
role
XULTreeAccessible::NativeRole()
XULTreeAccessible::NativeRole() const
{
// No primary column means we're in a list. In fact, history and mail turn off
// the primary flag when switching to a flat view.
@ -1118,7 +1118,7 @@ XULTreeItemAccessible::Shutdown()
}
role
XULTreeItemAccessible::NativeRole()
XULTreeItemAccessible::NativeRole() const
{
nsCOMPtr<nsITreeColumns> columns;
mTree->GetColumns(getter_AddRefs(columns));

Просмотреть файл

@ -41,7 +41,7 @@ public:
// Accessible
virtual void Shutdown() override;
virtual void Value(nsString& aValue) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
EWhichChildAtPoint aWhichChild) override;
@ -235,7 +235,7 @@ public:
// Accessible
virtual void Shutdown() override;
virtual ENameValueFlag Name(nsString& aName) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
// XULTreeItemAccessibleBase
virtual void RowInvalidated(int32_t aStartColIdx, int32_t aEndColIdx) override;

Просмотреть файл

@ -209,7 +209,7 @@ XULTreeGridAccessible::UnselectRow(uint32_t aRowIdx)
// XULTreeGridAccessible: Accessible implementation
role
XULTreeGridAccessible::NativeRole()
XULTreeGridAccessible::NativeRole() const
{
nsCOMPtr<nsITreeColumns> treeColumns;
mTree->GetColumns(getter_AddRefs(treeColumns));
@ -287,7 +287,7 @@ XULTreeGridRowAccessible::Shutdown()
}
role
XULTreeGridRowAccessible::NativeRole()
XULTreeGridRowAccessible::NativeRole() const
{
return roles::ROW;
}
@ -682,7 +682,7 @@ XULTreeGridCellAccessible::NativeAttributes()
}
role
XULTreeGridCellAccessible::NativeRole()
XULTreeGridCellAccessible::NativeRole() const
{
return roles::GRID_CELL;
}

Просмотреть файл

@ -50,7 +50,7 @@ public:
// Accessible
virtual TableAccessible* AsTable() override { return this; }
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
protected:
virtual ~XULTreeGridAccessible();
@ -81,7 +81,7 @@ public:
// Accessible
virtual void Shutdown() override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual ENameValueFlag Name(nsString& aName) override;
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
EWhichChildAtPoint aWhichChild) override;
@ -133,7 +133,7 @@ public:
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
virtual int32_t IndexInParent() const override;
virtual Relation RelationByType(RelationType aType) override;
virtual a11y::role NativeRole() override;
virtual a11y::role NativeRole() const override;
virtual uint64_t NativeState() override;
virtual uint64_t NativeInteractiveState() const override;