forked from mirrors/gecko-dev
Bug 1778433 part 2: Change references to defunct *AccessibleWrap types to use the corresponding *Accessible classes. r=nlapre
These are effectively type aliases on all platforms now and are no longer necessary. Differential Revision: https://phabricator.services.mozilla.com/D162456
This commit is contained in:
parent
c40b2a87c0
commit
1fc8f98cd1
9 changed files with 38 additions and 39 deletions
|
|
@ -351,7 +351,7 @@ MARKUPMAP(
|
||||||
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
|
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
|
||||||
if (!aElement->GetPrimaryFrame() ||
|
if (!aElement->GetPrimaryFrame() ||
|
||||||
aElement->GetPrimaryFrame()->AccessibleType() != eHTMLTableType) {
|
aElement->GetPrimaryFrame()->AccessibleType() != eHTMLTableType) {
|
||||||
return new ARIAGridAccessibleWrap(aElement, aContext->Document());
|
return new ARIAGridAccessible(aElement, aContext->Document());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that our children are proper layout table parts
|
// Make sure that our children are proper layout table parts
|
||||||
|
|
@ -364,7 +364,7 @@ MARKUPMAP(
|
||||||
nsIFrame* childFrame = child->GetPrimaryFrame();
|
nsIFrame* childFrame = child->GetPrimaryFrame();
|
||||||
if (childFrame && (!childFrame->IsTableRowGroupFrame() &&
|
if (childFrame && (!childFrame->IsTableRowGroupFrame() &&
|
||||||
!childFrame->IsTableRowFrame())) {
|
!childFrame->IsTableRowFrame())) {
|
||||||
return new ARIAGridAccessibleWrap(aElement, aContext->Document());
|
return new ARIAGridAccessible(aElement, aContext->Document());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -390,10 +390,10 @@ MARKUPMAP(
|
||||||
if (!aContext->IsHTMLTableRow() || !aElement->GetPrimaryFrame() ||
|
if (!aContext->IsHTMLTableRow() || !aElement->GetPrimaryFrame() ||
|
||||||
aElement->GetPrimaryFrame()->AccessibleType() !=
|
aElement->GetPrimaryFrame()->AccessibleType() !=
|
||||||
eHTMLTableCellType) {
|
eHTMLTableCellType) {
|
||||||
return new ARIAGridCellAccessibleWrap(aElement, aContext->Document());
|
return new ARIAGridCellAccessible(aElement, aContext->Document());
|
||||||
}
|
}
|
||||||
if (aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::scope)) {
|
if (aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::scope)) {
|
||||||
return new HTMLTableHeaderCellAccessibleWrap(aElement,
|
return new HTMLTableHeaderCellAccessible(aElement,
|
||||||
aContext->Document());
|
aContext->Document());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -416,9 +416,9 @@ MARKUPMAP(
|
||||||
if (!aContext->IsHTMLTableRow() || !aElement->GetPrimaryFrame() ||
|
if (!aContext->IsHTMLTableRow() || !aElement->GetPrimaryFrame() ||
|
||||||
aElement->GetPrimaryFrame()->AccessibleType() !=
|
aElement->GetPrimaryFrame()->AccessibleType() !=
|
||||||
eHTMLTableCellType) {
|
eHTMLTableCellType) {
|
||||||
return new ARIAGridCellAccessibleWrap(aElement, aContext->Document());
|
return new ARIAGridCellAccessible(aElement, aContext->Document());
|
||||||
}
|
}
|
||||||
return new HTMLTableHeaderCellAccessibleWrap(aElement,
|
return new HTMLTableHeaderCellAccessible(aElement,
|
||||||
aContext->Document());
|
aContext->Document());
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
||||||
|
|
@ -11,16 +11,16 @@ XULMAP_TYPE(findbar, XULToolbarAccessible)
|
||||||
XULMAP_TYPE(groupbox, XULGroupboxAccessible)
|
XULMAP_TYPE(groupbox, XULGroupboxAccessible)
|
||||||
XULMAP_TYPE(iframe, OuterDocAccessible)
|
XULMAP_TYPE(iframe, OuterDocAccessible)
|
||||||
XULMAP_TYPE(listheader, XULColumAccessible)
|
XULMAP_TYPE(listheader, XULColumAccessible)
|
||||||
XULMAP_TYPE(menu, XULMenuitemAccessibleWrap)
|
XULMAP_TYPE(menu, XULMenuitemAccessible)
|
||||||
XULMAP_TYPE(menubar, XULMenubarAccessible)
|
XULMAP_TYPE(menubar, XULMenubarAccessible)
|
||||||
XULMAP_TYPE(menucaption, XULMenuitemAccessibleWrap)
|
XULMAP_TYPE(menucaption, XULMenuitemAccessible)
|
||||||
XULMAP_TYPE(menuitem, XULMenuitemAccessibleWrap)
|
XULMAP_TYPE(menuitem, XULMenuitemAccessible)
|
||||||
XULMAP_TYPE(menulist, XULComboboxAccessible)
|
XULMAP_TYPE(menulist, XULComboboxAccessible)
|
||||||
XULMAP_TYPE(menuseparator, XULMenuSeparatorAccessible)
|
XULMAP_TYPE(menuseparator, XULMenuSeparatorAccessible)
|
||||||
XULMAP_TYPE(notification, XULAlertAccessible)
|
XULMAP_TYPE(notification, XULAlertAccessible)
|
||||||
XULMAP_TYPE(radio, XULRadioButtonAccessible)
|
XULMAP_TYPE(radio, XULRadioButtonAccessible)
|
||||||
XULMAP_TYPE(radiogroup, XULRadioGroupAccessible)
|
XULMAP_TYPE(radiogroup, XULRadioGroupAccessible)
|
||||||
XULMAP_TYPE(richlistbox, XULListboxAccessibleWrap)
|
XULMAP_TYPE(richlistbox, XULListboxAccessible)
|
||||||
XULMAP_TYPE(richlistitem, XULListitemAccessible)
|
XULMAP_TYPE(richlistitem, XULListitemAccessible)
|
||||||
XULMAP_TYPE(statusbar, XULStatusBarAccessible)
|
XULMAP_TYPE(statusbar, XULStatusBarAccessible)
|
||||||
XULMAP_TYPE(tab, XULTabAccessible)
|
XULMAP_TYPE(tab, XULTabAccessible)
|
||||||
|
|
@ -64,7 +64,7 @@ XULMAP(image,
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ImageAccessibleWrap(aElement, aContext->Document());
|
return new ImageAccessible(aElement, aContext->Document());
|
||||||
})
|
})
|
||||||
|
|
||||||
XULMAP(menupopup, [](Element* aElement, LocalAccessible* aContext) {
|
XULMAP(menupopup, [](Element* aElement, LocalAccessible* aContext) {
|
||||||
|
|
@ -114,6 +114,6 @@ XULMAP(tree,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Table or tree table accessible.
|
// Table or tree table accessible.
|
||||||
return new XULTreeGridAccessibleWrap(aElement, aContext->Document(),
|
return new XULTreeGridAccessible(aElement, aContext->Document(),
|
||||||
treeFrame);
|
treeFrame);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
// NOTE: alphabetically ordered
|
// NOTE: alphabetically ordered
|
||||||
#include "AccAttributes.h"
|
#include "AccAttributes.h"
|
||||||
#include "ApplicationAccessibleWrap.h"
|
#include "ApplicationAccessibleWrap.h"
|
||||||
#include "ARIAGridAccessibleWrap.h"
|
#include "ARIAGridAccessible.h"
|
||||||
#include "ARIAMap.h"
|
#include "ARIAMap.h"
|
||||||
#include "DocAccessible-inl.h"
|
#include "DocAccessible-inl.h"
|
||||||
#include "DocAccessibleChild.h"
|
#include "DocAccessibleChild.h"
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#include "HTMLLinkAccessible.h"
|
#include "HTMLLinkAccessible.h"
|
||||||
#include "HTMLListAccessible.h"
|
#include "HTMLListAccessible.h"
|
||||||
#include "HTMLSelectAccessible.h"
|
#include "HTMLSelectAccessible.h"
|
||||||
#include "HTMLTableAccessibleWrap.h"
|
#include "HTMLTableAccessible.h"
|
||||||
#include "HyperTextAccessibleWrap.h"
|
#include "HyperTextAccessibleWrap.h"
|
||||||
#include "RootAccessible.h"
|
#include "RootAccessible.h"
|
||||||
#include "StyleInfo.h"
|
#include "StyleInfo.h"
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "States.h"
|
#include "States.h"
|
||||||
#include "Statistics.h"
|
#include "Statistics.h"
|
||||||
#include "TextLeafAccessibleWrap.h"
|
#include "TextLeafAccessible.h"
|
||||||
#include "TreeWalker.h"
|
#include "TreeWalker.h"
|
||||||
#include "xpcAccessibleApplication.h"
|
#include "xpcAccessibleApplication.h"
|
||||||
|
|
||||||
|
|
@ -81,10 +81,10 @@
|
||||||
#include "XULComboboxAccessible.h"
|
#include "XULComboboxAccessible.h"
|
||||||
#include "XULElementAccessibles.h"
|
#include "XULElementAccessibles.h"
|
||||||
#include "XULFormControlAccessible.h"
|
#include "XULFormControlAccessible.h"
|
||||||
#include "XULListboxAccessibleWrap.h"
|
#include "XULListboxAccessible.h"
|
||||||
#include "XULMenuAccessibleWrap.h"
|
#include "XULMenuAccessible.h"
|
||||||
#include "XULTabAccessible.h"
|
#include "XULTabAccessible.h"
|
||||||
#include "XULTreeGridAccessibleWrap.h"
|
#include "XULTreeGridAccessible.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::a11y;
|
using namespace mozilla::a11y;
|
||||||
|
|
@ -1108,7 +1108,7 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
|
||||||
if (isARIATablePart && (!newAcc || newAcc->IsGenericHyperText())) {
|
if (isARIATablePart && (!newAcc || newAcc->IsGenericHyperText())) {
|
||||||
if ((roleMapEntry->accTypes & eTableCell)) {
|
if ((roleMapEntry->accTypes & eTableCell)) {
|
||||||
if (aContext->IsTableRow()) {
|
if (aContext->IsTableRow()) {
|
||||||
newAcc = new ARIAGridCellAccessibleWrap(content, document);
|
newAcc = new ARIAGridCellAccessible(content, document);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (roleMapEntry->IsOfType(eTableRow)) {
|
} else if (roleMapEntry->IsOfType(eTableRow)) {
|
||||||
|
|
@ -1124,7 +1124,7 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (roleMapEntry->IsOfType(eTable)) {
|
} else if (roleMapEntry->IsOfType(eTable)) {
|
||||||
newAcc = new ARIAGridAccessibleWrap(content, document);
|
newAcc = new ARIAGridAccessible(content, document);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1482,7 +1482,7 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
||||||
break;
|
break;
|
||||||
case eHTMLTableType:
|
case eHTMLTableType:
|
||||||
if (aContent->IsHTMLElement(nsGkAtoms::table)) {
|
if (aContent->IsHTMLElement(nsGkAtoms::table)) {
|
||||||
newAcc = new HTMLTableAccessibleWrap(aContent, document);
|
newAcc = new HTMLTableAccessible(aContent, document);
|
||||||
} else {
|
} else {
|
||||||
newAcc = new HyperTextAccessibleWrap(aContent, document);
|
newAcc = new HyperTextAccessibleWrap(aContent, document);
|
||||||
}
|
}
|
||||||
|
|
@ -1494,7 +1494,7 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
||||||
// Otherwise create a generic text accessible to avoid text jamming
|
// Otherwise create a generic text accessible to avoid text jamming
|
||||||
// when reading by AT.
|
// when reading by AT.
|
||||||
if (aContext->IsHTMLTableRow() || aContext->IsHTMLTable()) {
|
if (aContext->IsHTMLTableRow() || aContext->IsHTMLTable()) {
|
||||||
newAcc = new HTMLTableCellAccessibleWrap(aContent, document);
|
newAcc = new HTMLTableCellAccessible(aContent, document);
|
||||||
} else {
|
} else {
|
||||||
newAcc = new HyperTextAccessibleWrap(aContent, document);
|
newAcc = new HyperTextAccessibleWrap(aContent, document);
|
||||||
}
|
}
|
||||||
|
|
@ -1551,14 +1551,14 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
||||||
case eImageType:
|
case eImageType:
|
||||||
if (aContent->IsElement() &&
|
if (aContent->IsElement() &&
|
||||||
ShouldCreateImgAccessible(aContent->AsElement(), document)) {
|
ShouldCreateImgAccessible(aContent->AsElement(), document)) {
|
||||||
newAcc = new ImageAccessibleWrap(aContent, document);
|
newAcc = new ImageAccessible(aContent, document);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eOuterDocType:
|
case eOuterDocType:
|
||||||
newAcc = new OuterDocAccessible(aContent, document);
|
newAcc = new OuterDocAccessible(aContent, document);
|
||||||
break;
|
break;
|
||||||
case eTextLeafType:
|
case eTextLeafType:
|
||||||
newAcc = new TextLeafAccessibleWrap(aContent, document);
|
newAcc = new TextLeafAccessible(aContent, document);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
MOZ_ASSERT(false);
|
MOZ_ASSERT(false);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ using namespace mozilla::a11y;
|
||||||
|
|
||||||
HTMLImageMapAccessible::HTMLImageMapAccessible(nsIContent* aContent,
|
HTMLImageMapAccessible::HTMLImageMapAccessible(nsIContent* aContent,
|
||||||
DocAccessible* aDoc)
|
DocAccessible* aDoc)
|
||||||
: ImageAccessibleWrap(aContent, aDoc) {
|
: ImageAccessible(aContent, aDoc) {
|
||||||
mType = eImageMapType;
|
mType = eImageMapType;
|
||||||
|
|
||||||
UpdateChildAreas(false);
|
UpdateChildAreas(false);
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#define mozilla_a11y_HTMLImageMapAccessible_h__
|
#define mozilla_a11y_HTMLImageMapAccessible_h__
|
||||||
|
|
||||||
#include "HTMLLinkAccessible.h"
|
#include "HTMLLinkAccessible.h"
|
||||||
#include "ImageAccessibleWrap.h"
|
#include "ImageAccessible.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace a11y {
|
namespace a11y {
|
||||||
|
|
@ -15,13 +15,12 @@ namespace a11y {
|
||||||
/**
|
/**
|
||||||
* Used for HTML image maps.
|
* Used for HTML image maps.
|
||||||
*/
|
*/
|
||||||
class HTMLImageMapAccessible final : public ImageAccessibleWrap {
|
class HTMLImageMapAccessible final : public ImageAccessible {
|
||||||
public:
|
public:
|
||||||
HTMLImageMapAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
HTMLImageMapAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||||
|
|
||||||
// nsISupports and cycle collector
|
// nsISupports and cycle collector
|
||||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLImageMapAccessible,
|
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLImageMapAccessible, ImageAccessible)
|
||||||
ImageAccessibleWrap)
|
|
||||||
|
|
||||||
// LocalAccessible
|
// LocalAccessible
|
||||||
virtual a11y::role NativeRole() const override;
|
virtual a11y::role NativeRole() const override;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "AccessibleImage_i.c"
|
#include "AccessibleImage_i.c"
|
||||||
|
|
||||||
#include "ImageAccessibleWrap.h"
|
#include "ImageAccessible.h"
|
||||||
#include "IUnknownImpl.h"
|
#include "IUnknownImpl.h"
|
||||||
#include "nsIAccessibleTypes.h"
|
#include "nsIAccessibleTypes.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ void XULLabelAccessible::UpdateLabelValue(const nsString& aValue) {
|
||||||
role XULLabelTextLeafAccessible::NativeRole() const { return roles::TEXT_LEAF; }
|
role XULLabelTextLeafAccessible::NativeRole() const { return roles::TEXT_LEAF; }
|
||||||
|
|
||||||
uint64_t XULLabelTextLeafAccessible::NativeState() const {
|
uint64_t XULLabelTextLeafAccessible::NativeState() const {
|
||||||
return TextLeafAccessibleWrap::NativeState() | states::READONLY;
|
return TextLeafAccessible::NativeState() | states::READONLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#define mozilla_a11y_XULElementAccessibles_h__
|
#define mozilla_a11y_XULElementAccessibles_h__
|
||||||
|
|
||||||
#include "HyperTextAccessibleWrap.h"
|
#include "HyperTextAccessibleWrap.h"
|
||||||
#include "TextLeafAccessibleWrap.h"
|
#include "TextLeafAccessible.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace a11y {
|
namespace a11y {
|
||||||
|
|
@ -47,10 +47,10 @@ inline XULLabelAccessible* LocalAccessible::AsXULLabel() {
|
||||||
* Used to implement text interface on XUL label accessible in case when text
|
* Used to implement text interface on XUL label accessible in case when text
|
||||||
* is provided by @value attribute (no underlying text frame).
|
* is provided by @value attribute (no underlying text frame).
|
||||||
*/
|
*/
|
||||||
class XULLabelTextLeafAccessible final : public TextLeafAccessibleWrap {
|
class XULLabelTextLeafAccessible final : public TextLeafAccessible {
|
||||||
public:
|
public:
|
||||||
XULLabelTextLeafAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
XULLabelTextLeafAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||||
: TextLeafAccessibleWrap(aContent, aDoc) {
|
: TextLeafAccessible(aContent, aDoc) {
|
||||||
mStateFlags |= eSharedNode;
|
mStateFlags |= eSharedNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "XULTreeGridAccessibleWrap.h"
|
#include "XULTreeGridAccessible.h"
|
||||||
|
|
||||||
#include "AccAttributes.h"
|
#include "AccAttributes.h"
|
||||||
#include "LocalAccessible-inl.h"
|
#include "LocalAccessible-inl.h"
|
||||||
|
|
@ -307,7 +307,7 @@ XULTreeGridCellAccessible* XULTreeGridRowAccessible::GetCellAccessible(
|
||||||
XULTreeGridCellAccessible* cachedCell = mAccessibleCache.GetWeak(key);
|
XULTreeGridCellAccessible* cachedCell = mAccessibleCache.GetWeak(key);
|
||||||
if (cachedCell) return cachedCell;
|
if (cachedCell) return cachedCell;
|
||||||
|
|
||||||
RefPtr<XULTreeGridCellAccessible> cell = new XULTreeGridCellAccessibleWrap(
|
RefPtr<XULTreeGridCellAccessible> cell = new XULTreeGridCellAccessible(
|
||||||
mContent, mDoc, const_cast<XULTreeGridRowAccessible*>(this), mTree,
|
mContent, mDoc, const_cast<XULTreeGridRowAccessible*>(this), mTree,
|
||||||
mTreeView, mRow, aColumn);
|
mTreeView, mRow, aColumn);
|
||||||
mAccessibleCache.InsertOrUpdate(key, RefPtr{cell});
|
mAccessibleCache.InsertOrUpdate(key, RefPtr{cell});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue