зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre
This is now just an alias for HyperTextAccessible on all platforms. This was done with the following bash script: ``` cd accessible find -name HyperTextAccessibleWrap.h -delete sed -i 's/#include "HyperTextAccessibleWrap.h"/#include "HyperTextAccessible.h"/;/"HyperTextAccessibleWrap.h",/d;s/HyperTextAccessibleWrap/HyperTextAccessible/g' `git grep -l HyperTextAccessibleWrap` ``` Differential Revision: https://phabricator.services.mozilla.com/D184796
This commit is contained in:
Родитель
97a388f4f8
Коммит
23fd30a006
|
@ -1,19 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
#define mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
typedef class HyperTextAccessible HyperTextAccessibleWrap;
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
EXPORTS.mozilla.a11y += [
|
||||
"AccessibleWrap.h",
|
||||
"HyperTextAccessibleWrap.h",
|
||||
"SessionAccessibility.h",
|
||||
"TraversalRule.h",
|
||||
]
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
#define mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
typedef class HyperTextAccessible HyperTextAccessibleWrap;
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
EXPORTS.mozilla.a11y += [
|
||||
"AccessibleWrap.h",
|
||||
"HyperTextAccessibleWrap.h",
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
|
|
|
@ -12,14 +12,14 @@ MARKUPMAP(
|
|||
// listener should be a generic.
|
||||
if (!aElement->HasAttr(nsGkAtoms::href) &&
|
||||
!nsCoreUtils::HasClickListener(aElement)) {
|
||||
return new HyperTextAccessibleWrap(aElement, aContext->Document());
|
||||
return new HyperTextAccessible(aElement, aContext->Document());
|
||||
}
|
||||
// Only some roles truly enjoy life as HTMLLinkAccessibles, for
|
||||
// details see closed bug 494807.
|
||||
const nsRoleMapEntry* roleMapEntry = aria::GetRoleMap(aElement);
|
||||
if (roleMapEntry && roleMapEntry->role != roles::NOTHING &&
|
||||
roleMapEntry->role != roles::LINK) {
|
||||
return new HyperTextAccessibleWrap(aElement, aContext->Document());
|
||||
return new HyperTextAccessible(aElement, aContext->Document());
|
||||
}
|
||||
|
||||
return new HTMLLinkAccessible(aElement, aContext->Document());
|
||||
|
@ -62,7 +62,7 @@ MARKUPMAP(
|
|||
|
||||
MARKUPMAP(code, New_HyperText, roles::CODE)
|
||||
|
||||
MARKUPMAP(dd, New_HTMLDtOrDd<HyperTextAccessibleWrap>, roles::DEFINITION)
|
||||
MARKUPMAP(dd, New_HTMLDtOrDd<HyperTextAccessible>, roles::DEFINITION)
|
||||
|
||||
MARKUPMAP(del, New_HyperText, roles::CONTENT_DELETION)
|
||||
|
||||
|
@ -80,7 +80,7 @@ MARKUPMAP(
|
|||
}
|
||||
// Always create an accessible if the div has an id.
|
||||
if (aElement->HasAttr(nsGkAtoms::id)) {
|
||||
return new HyperTextAccessibleWrap(aElement, aContext->Document());
|
||||
return new HyperTextAccessible(aElement, aContext->Document());
|
||||
}
|
||||
// Never create an accessible if the div is not display:block; or
|
||||
// display:inline-block or the like.
|
||||
|
@ -98,7 +98,7 @@ MARKUPMAP(
|
|||
if (prevSibling) {
|
||||
nsIFrame* prevSiblingFrame = prevSibling->GetPrimaryFrame();
|
||||
if (prevSiblingFrame && prevSiblingFrame->IsInlineOutside()) {
|
||||
return new HyperTextAccessibleWrap(aElement, aContext->Document());
|
||||
return new HyperTextAccessible(aElement, aContext->Document());
|
||||
}
|
||||
}
|
||||
// Now, check the children.
|
||||
|
@ -118,7 +118,7 @@ MARKUPMAP(
|
|||
}
|
||||
// Check to see if first child has an inline frame.
|
||||
if (firstChildFrame && firstChildFrame->IsInlineOutside()) {
|
||||
return new HyperTextAccessibleWrap(aElement, aContext->Document());
|
||||
return new HyperTextAccessible(aElement, aContext->Document());
|
||||
}
|
||||
nsIContent* lastChild = aElement->GetLastChild();
|
||||
MOZ_ASSERT(lastChild);
|
||||
|
@ -136,7 +136,7 @@ MARKUPMAP(
|
|||
}
|
||||
// Check to see if last child has an inline frame.
|
||||
if (lastChildFrame && lastChildFrame->IsInlineOutside()) {
|
||||
return new HyperTextAccessibleWrap(aElement, aContext->Document());
|
||||
return new HyperTextAccessible(aElement, aContext->Document());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "HTMLListAccessible.h"
|
||||
#include "HTMLSelectAccessible.h"
|
||||
#include "HTMLTableAccessible.h"
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
#include "RootAccessible.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsArrayUtils.h"
|
||||
|
@ -317,7 +317,7 @@ LocalAccessible* CreateMenupopupAccessible(Element* aElement,
|
|||
|
||||
static LocalAccessible* New_HyperText(Element* aElement,
|
||||
LocalAccessible* aContext) {
|
||||
return new HyperTextAccessibleWrap(aElement, aContext->Document());
|
||||
return new HyperTextAccessible(aElement, aContext->Document());
|
||||
}
|
||||
|
||||
template <typename AccClass>
|
||||
|
@ -1128,7 +1128,7 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
|
|||
!roleMapEntry->Is(nsGkAtoms::none);
|
||||
if (!newAcc && (hasNonPresentationalARIARole ||
|
||||
AttributesMustBeAccessible(content, document))) {
|
||||
newAcc = new HyperTextAccessibleWrap(content, document);
|
||||
newAcc = new HyperTextAccessible(content, document);
|
||||
}
|
||||
|
||||
// If there's still no Accessible but we do have an entry in the markup
|
||||
|
@ -1136,7 +1136,7 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
|
|||
// HyperTextAccessible.
|
||||
if (!newAcc && markupMap &&
|
||||
(!roleMapEntry || hasNonPresentationalARIARole)) {
|
||||
newAcc = new HyperTextAccessibleWrap(content, document);
|
||||
newAcc = new HyperTextAccessible(content, document);
|
||||
}
|
||||
|
||||
if (newAcc) {
|
||||
|
@ -1236,7 +1236,7 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
newAcc = new HyperTextAccessibleWrap(content, document);
|
||||
newAcc = new HyperTextAccessible(content, document);
|
||||
document->BindToDocument(newAcc, aria::GetRoleMap(content->AsElement()));
|
||||
return newAcc;
|
||||
}
|
||||
|
@ -1357,7 +1357,7 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
|
|||
newAcc = new EnumRoleAccessible<roles::GRAPHIC>(content, document);
|
||||
}
|
||||
} else if (content->IsSVGElement(nsGkAtoms::text)) {
|
||||
newAcc = new HyperTextAccessibleWrap(content->AsElement(), document);
|
||||
newAcc = new HyperTextAccessible(content->AsElement(), document);
|
||||
} else if (content->IsSVGElement(nsGkAtoms::svg)) {
|
||||
// An <svg> element could contain <foreignObject>, which contains HTML
|
||||
// but does not normally create its own Accessible. This means that the
|
||||
|
@ -1387,7 +1387,7 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
|
|||
nsGkAtoms::mpadded_, nsGkAtoms::mphantom_,
|
||||
nsGkAtoms::maligngroup_, nsGkAtoms::malignmark_,
|
||||
nsGkAtoms::mspace_, nsGkAtoms::semantics_)) {
|
||||
newAcc = new HyperTextAccessibleWrap(content, document);
|
||||
newAcc = new HyperTextAccessible(content, document);
|
||||
}
|
||||
} else if (content->IsGeneratedContentContainerForMarker()) {
|
||||
if (aContext->IsHTMLListItem()) {
|
||||
|
@ -1414,7 +1414,7 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
|
|||
if (content->IsHTMLElement() || content->IsMathMLElement()) {
|
||||
// Interesting HTML/MathML container which may have selectable text and/or
|
||||
// embedded objects
|
||||
newAcc = new HyperTextAccessibleWrap(content, document);
|
||||
newAcc = new HyperTextAccessible(content, document);
|
||||
} else { // XUL, SVG, etc.
|
||||
// Interesting generic non-HTML container
|
||||
newAcc = new AccessibleWrap(content, document);
|
||||
|
@ -1614,7 +1614,7 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
|||
newAcc = new HTMLLIAccessible(aContent, document);
|
||||
} else {
|
||||
// Otherwise create a generic text accessible to avoid text jamming.
|
||||
newAcc = new HyperTextAccessibleWrap(aContent, document);
|
||||
newAcc = new HyperTextAccessible(aContent, document);
|
||||
}
|
||||
break;
|
||||
case eHTMLSelectListType:
|
||||
|
@ -1636,7 +1636,7 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
|||
case eHTMLTableCellType:
|
||||
// We handle markup and ARIA tables elsewhere. If we reach here, this is
|
||||
// a CSS table part. Just create a generic text container.
|
||||
newAcc = new HyperTextAccessibleWrap(aContent, document);
|
||||
newAcc = new HyperTextAccessible(aContent, document);
|
||||
break;
|
||||
case eHTMLTableRowType:
|
||||
// This is a CSS table row. Don't expose it at all.
|
||||
|
@ -1654,7 +1654,7 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
|||
if (!aContent->IsAnyOfHTMLElements(nsGkAtoms::dt, nsGkAtoms::dd,
|
||||
nsGkAtoms::div, nsGkAtoms::thead,
|
||||
nsGkAtoms::tfoot, nsGkAtoms::tbody)) {
|
||||
newAcc = new HyperTextAccessibleWrap(aContent, document);
|
||||
newAcc = new HyperTextAccessible(aContent, document);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ using namespace mozilla::a11y;
|
|||
|
||||
ARIAGridCellAccessible::ARIAGridCellAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mGenericTypes |= eTableCell;
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ ARIAGridCellAccessible::ARIAGridCellAccessible(nsIContent* aContent,
|
|||
// LocalAccessible
|
||||
|
||||
void ARIAGridCellAccessible::ApplyARIAState(uint64_t* aState) const {
|
||||
HyperTextAccessibleWrap::ApplyARIAState(aState);
|
||||
HyperTextAccessible::ApplyARIAState(aState);
|
||||
|
||||
// Return if the gridcell has aria-selected="true".
|
||||
if (*aState & states::SELECTED) return;
|
||||
|
@ -55,8 +55,7 @@ void ARIAGridCellAccessible::ApplyARIAState(uint64_t* aState) const {
|
|||
}
|
||||
|
||||
already_AddRefed<AccAttributes> ARIAGridCellAccessible::NativeAttributes() {
|
||||
RefPtr<AccAttributes> attributes =
|
||||
HyperTextAccessibleWrap::NativeAttributes();
|
||||
RefPtr<AccAttributes> attributes = HyperTextAccessible::NativeAttributes();
|
||||
|
||||
// We only need to expose table-cell-index to clients. If we're in the content
|
||||
// process, we don't need this, so building a CachedTableAccessible is very
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef MOZILLA_A11Y_ARIAGridAccessible_h_
|
||||
#define MOZILLA_A11Y_ARIAGridAccessible_h_
|
||||
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -14,12 +14,12 @@ namespace a11y {
|
|||
/**
|
||||
* Accessible for ARIA gridcell and rowheader/columnheader.
|
||||
*/
|
||||
class ARIAGridCellAccessible : public HyperTextAccessibleWrap {
|
||||
class ARIAGridCellAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
ARIAGridCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(ARIAGridCellAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual void ApplyARIAState(uint64_t* aState) const override;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#define mozilla_a11y_BaseAccessibles_h__
|
||||
|
||||
#include "AccessibleWrap.h"
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
class nsIContent;
|
||||
|
||||
|
@ -95,10 +95,10 @@ class EnumRoleAccessible : public AccessibleWrap {
|
|||
* Like EnumRoleAccessible, but with text support.
|
||||
*/
|
||||
template <a11y::role R>
|
||||
class EnumRoleHyperTextAccessible : public HyperTextAccessibleWrap {
|
||||
class EnumRoleHyperTextAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
EnumRoleHyperTextAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
// LocalAccessible
|
||||
virtual a11y::role NativeRole() const override { return R; }
|
||||
|
|
|
@ -79,7 +79,7 @@ DocAccessible::DocAccessible(dom::Document* aDocument,
|
|||
// before setting up the vtable we will call LocalAccessible::AddRef()
|
||||
// but not the overrides of it for subclasses. It is important to call
|
||||
// those overrides to avoid confusing leak checking machinary.
|
||||
HyperTextAccessibleWrap(nullptr, nullptr),
|
||||
HyperTextAccessible(nullptr, nullptr),
|
||||
// XXX aaronl should we use an algorithm for the initial cache size?
|
||||
mAccessibleCache(kDefaultCacheLength),
|
||||
mNodeToAccessibleMap(kDefaultCacheLength),
|
||||
|
@ -520,7 +520,7 @@ void DocAccessible::Shutdown() {
|
|||
iter.Remove();
|
||||
}
|
||||
|
||||
HyperTextAccessibleWrap::Shutdown();
|
||||
HyperTextAccessible::Shutdown();
|
||||
|
||||
MOZ_ASSERT(GetAccService());
|
||||
GetAccService()->NotifyOfDocumentShutdown(
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef mozilla_a11y_DocAccessible_h__
|
||||
#define mozilla_a11y_DocAccessible_h__
|
||||
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
#include "AccEvent.h"
|
||||
|
||||
#include "nsClassHashtable.h"
|
||||
|
@ -42,7 +42,7 @@ class TNotification;
|
|||
* represents a document. Tabs, in-process iframes, and out-of-process iframes
|
||||
* all use this class to represent the doc they contain.
|
||||
*/
|
||||
class DocAccessible : public HyperTextAccessibleWrap,
|
||||
class DocAccessible : public HyperTextAccessible,
|
||||
public nsIDocumentObserver,
|
||||
public nsSupportsWeakReference {
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -11,6 +11,6 @@ using namespace mozilla::a11y;
|
|||
|
||||
HTMLCanvasAccessible::HTMLCanvasAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
role HTMLCanvasAccessible::NativeRole() const { return roles::CANVAS; }
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef mozilla_a11y_HTMLCanvasAccessible_h__
|
||||
#define mozilla_a11y_HTMLCanvasAccessible_h__
|
||||
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -14,13 +14,13 @@ namespace a11y {
|
|||
/**
|
||||
* HTML canvas accessible (html:canvas).
|
||||
*/
|
||||
class HTMLCanvasAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLCanvasAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLCanvasAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual a11y::role NativeRole() const override;
|
||||
|
|
|
@ -61,8 +61,8 @@ void HTMLLabelAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue,
|
||||
uint64_t aOldState) {
|
||||
HyperTextAccessibleWrap::DOMAttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType, aOldValue, aOldState);
|
||||
HyperTextAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType,
|
||||
aOldValue, aOldState);
|
||||
|
||||
if (aAttribute == nsGkAtoms::_for) {
|
||||
mDoc->QueueCacheUpdate(this, CacheDomain::Relations | CacheDomain::Actions);
|
||||
|
@ -99,8 +99,8 @@ void HTMLOutputAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue,
|
||||
uint64_t aOldState) {
|
||||
HyperTextAccessibleWrap::DOMAttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType, aOldValue, aOldState);
|
||||
HyperTextAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType,
|
||||
aOldValue, aOldState);
|
||||
|
||||
if (aAttribute == nsGkAtoms::_for) {
|
||||
mDoc->QueueCacheUpdate(this, CacheDomain::Relations);
|
||||
|
@ -113,7 +113,7 @@ void HTMLOutputAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
|
||||
HTMLSummaryAccessible::HTMLSummaryAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mGenericTypes |= eButton;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ void HTMLSummaryAccessible::ActionNameAt(uint8_t aIndex, nsAString& aName) {
|
|||
}
|
||||
|
||||
uint64_t HTMLSummaryAccessible::NativeState() const {
|
||||
uint64_t state = HyperTextAccessibleWrap::NativeState();
|
||||
uint64_t state = HyperTextAccessible::NativeState();
|
||||
|
||||
dom::HTMLSummaryElement* summary =
|
||||
dom::HTMLSummaryElement::FromNode(mContent);
|
||||
|
|
|
@ -46,13 +46,12 @@ class HTMLBRAccessible : public LeafAccessible {
|
|||
/**
|
||||
* Used for HTML label element.
|
||||
*/
|
||||
class HTMLLabelAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLLabelAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLabelAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLabelAccessible, HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual Relation RelationByType(RelationType aType) const override;
|
||||
|
@ -73,13 +72,13 @@ class HTMLLabelAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Used for HTML output element.
|
||||
*/
|
||||
class HTMLOutputAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLOutputAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLOutputAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual Relation RelationByType(RelationType aType) const override;
|
||||
|
@ -96,7 +95,7 @@ class HTMLOutputAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Accessible for the HTML summary element.
|
||||
*/
|
||||
class HTMLSummaryAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLSummaryAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
|
@ -121,13 +120,13 @@ class HTMLSummaryAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Used for HTML header and footer elements.
|
||||
*/
|
||||
class HTMLHeaderOrFooterAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLHeaderOrFooterAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLHeaderOrFooterAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLHeaderOrFooterAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual a11y::role NativeRole() const override;
|
||||
|
@ -139,13 +138,13 @@ class HTMLHeaderOrFooterAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Used for HTML section element.
|
||||
*/
|
||||
class HTMLSectionAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLSectionAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLSectionAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLSectionAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual a11y::role NativeRole() const override;
|
||||
|
|
|
@ -43,8 +43,8 @@ void HTMLFormAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue,
|
||||
uint64_t aOldState) {
|
||||
HyperTextAccessibleWrap::DOMAttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType, aOldValue, aOldState);
|
||||
HyperTextAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType,
|
||||
aOldValue, aOldState);
|
||||
if (aAttribute == nsGkAtoms::autocomplete) {
|
||||
dom::HTMLFormElement* formEl = dom::HTMLFormElement::FromNode(mContent);
|
||||
|
||||
|
@ -163,7 +163,7 @@ Relation HTMLRadioButtonAccessible::RelationByType(RelationType aType) const {
|
|||
|
||||
HTMLButtonAccessible::HTMLButtonAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mGenericTypes |= eButton;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ void HTMLButtonAccessible::ActionNameAt(uint8_t aIndex, nsAString& aName) {
|
|||
}
|
||||
|
||||
uint64_t HTMLButtonAccessible::State() {
|
||||
uint64_t state = HyperTextAccessibleWrap::State();
|
||||
uint64_t state = HyperTextAccessible::State();
|
||||
if (state == states::DEFUNCT) return state;
|
||||
|
||||
// Inherit states from input@type="file" suitable for the button. Note,
|
||||
|
@ -190,7 +190,7 @@ uint64_t HTMLButtonAccessible::State() {
|
|||
}
|
||||
|
||||
uint64_t HTMLButtonAccessible::NativeState() const {
|
||||
uint64_t state = HyperTextAccessibleWrap::NativeState();
|
||||
uint64_t state = HyperTextAccessible::NativeState();
|
||||
|
||||
ElementState elmState = mContent->AsElement()->State();
|
||||
if (elmState.HasState(ElementState::DEFAULT)) state |= states::DEFAULT;
|
||||
|
@ -230,8 +230,8 @@ void HTMLButtonAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue,
|
||||
uint64_t aOldState) {
|
||||
HyperTextAccessibleWrap::DOMAttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType, aOldValue, aOldState);
|
||||
HyperTextAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType,
|
||||
aOldValue, aOldState);
|
||||
|
||||
if (aAttribute == nsGkAtoms::value) {
|
||||
dom::Element* elm = Elm();
|
||||
|
@ -258,7 +258,7 @@ bool HTMLButtonAccessible::IsWidget() const { return true; }
|
|||
|
||||
HTMLTextFieldAccessible::HTMLTextFieldAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = mContent->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
|
||||
nsGkAtoms::password, eIgnoreCase)
|
||||
? eHTMLTextPasswordFieldType
|
||||
|
@ -276,8 +276,7 @@ role HTMLTextFieldAccessible::NativeRole() const {
|
|||
}
|
||||
|
||||
already_AddRefed<AccAttributes> HTMLTextFieldAccessible::NativeAttributes() {
|
||||
RefPtr<AccAttributes> attributes =
|
||||
HyperTextAccessibleWrap::NativeAttributes();
|
||||
RefPtr<AccAttributes> attributes = HyperTextAccessible::NativeAttributes();
|
||||
|
||||
// Expose type for text input elements as it gives some useful context,
|
||||
// especially for mobile.
|
||||
|
@ -347,12 +346,12 @@ bool HTMLTextFieldAccessible::AttributeChangesState(nsAtom* aAttribute) {
|
|||
}
|
||||
|
||||
void HTMLTextFieldAccessible::ApplyARIAState(uint64_t* aState) const {
|
||||
HyperTextAccessibleWrap::ApplyARIAState(aState);
|
||||
HyperTextAccessible::ApplyARIAState(aState);
|
||||
aria::MapToState(aria::eARIAAutoComplete, mContent->AsElement(), aState);
|
||||
}
|
||||
|
||||
uint64_t HTMLTextFieldAccessible::NativeState() const {
|
||||
uint64_t state = HyperTextAccessibleWrap::NativeState();
|
||||
uint64_t state = HyperTextAccessible::NativeState();
|
||||
|
||||
// Text fields are always editable, even if they are also read only or
|
||||
// disabled.
|
||||
|
@ -446,8 +445,8 @@ void HTMLTextFieldAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
mDoc->QueueCacheUpdate(this, CacheDomain::NameAndDescription);
|
||||
return;
|
||||
}
|
||||
HyperTextAccessibleWrap::DOMAttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType, aOldValue, aOldState);
|
||||
HyperTextAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType,
|
||||
aOldValue, aOldState);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -465,7 +464,7 @@ LocalAccessible* HTMLTextFieldAccessible::ContainerWidget() const {
|
|||
|
||||
HTMLFileInputAccessible::HTMLFileInputAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = eHTMLFileInputType;
|
||||
}
|
||||
|
||||
|
@ -476,7 +475,7 @@ role HTMLFileInputAccessible::NativeRole() const {
|
|||
}
|
||||
|
||||
nsresult HTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent) {
|
||||
nsresult rv = HyperTextAccessibleWrap::HandleAccEvent(aEvent);
|
||||
nsresult rv = HyperTextAccessible::HandleAccEvent(aEvent);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Redirect state change events for inherited states to child controls. Note,
|
||||
|
@ -501,7 +500,7 @@ nsresult HTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent) {
|
|||
|
||||
LocalAccessible* HTMLFileInputAccessible::CurrentItem() const {
|
||||
// Allow aria-activedescendant to override.
|
||||
if (LocalAccessible* item = HyperTextAccessibleWrap::CurrentItem()) {
|
||||
if (LocalAccessible* item = HyperTextAccessible::CurrentItem()) {
|
||||
return item;
|
||||
}
|
||||
|
||||
|
@ -624,7 +623,7 @@ bool HTMLRangeAccessible::SetCurValue(double aValue) {
|
|||
|
||||
HTMLGroupboxAccessible::HTMLGroupboxAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
role HTMLGroupboxAccessible::NativeRole() const { return roles::GROUPING; }
|
||||
|
||||
|
@ -655,7 +654,7 @@ ENameValueFlag HTMLGroupboxAccessible::NativeName(nsString& aName) const {
|
|||
}
|
||||
|
||||
Relation HTMLGroupboxAccessible::RelationByType(RelationType aType) const {
|
||||
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
|
||||
Relation rel = HyperTextAccessible::RelationByType(aType);
|
||||
// No override for label, so use <legend> for this <fieldset>
|
||||
if (aType == RelationType::LABELLED_BY) rel.AppendTarget(mDoc, GetLegend());
|
||||
|
||||
|
@ -668,10 +667,10 @@ Relation HTMLGroupboxAccessible::RelationByType(RelationType aType) const {
|
|||
|
||||
HTMLLegendAccessible::HTMLLegendAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
Relation HTMLLegendAccessible::RelationByType(RelationType aType) const {
|
||||
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
|
||||
Relation rel = HyperTextAccessible::RelationByType(aType);
|
||||
if (aType != RelationType::LABEL_FOR) return rel;
|
||||
|
||||
LocalAccessible* groupbox = LocalParent();
|
||||
|
@ -688,10 +687,10 @@ Relation HTMLLegendAccessible::RelationByType(RelationType aType) const {
|
|||
|
||||
HTMLFigureAccessible::HTMLFigureAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
ENameValueFlag HTMLFigureAccessible::NativeName(nsString& aName) const {
|
||||
ENameValueFlag nameFlag = HyperTextAccessibleWrap::NativeName(aName);
|
||||
ENameValueFlag nameFlag = HyperTextAccessible::NativeName(aName);
|
||||
if (!aName.IsEmpty()) return nameFlag;
|
||||
|
||||
nsIContent* captionContent = Caption();
|
||||
|
@ -704,7 +703,7 @@ ENameValueFlag HTMLFigureAccessible::NativeName(nsString& aName) const {
|
|||
}
|
||||
|
||||
Relation HTMLFigureAccessible::RelationByType(RelationType aType) const {
|
||||
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
|
||||
Relation rel = HyperTextAccessible::RelationByType(aType);
|
||||
if (aType == RelationType::LABELLED_BY) rel.AppendTarget(mDoc, Caption());
|
||||
|
||||
return rel;
|
||||
|
@ -728,10 +727,10 @@ nsIContent* HTMLFigureAccessible::Caption() const {
|
|||
|
||||
HTMLFigcaptionAccessible::HTMLFigcaptionAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
Relation HTMLFigcaptionAccessible::RelationByType(RelationType aType) const {
|
||||
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
|
||||
Relation rel = HyperTextAccessible::RelationByType(aType);
|
||||
if (aType != RelationType::LABEL_FOR) return rel;
|
||||
|
||||
LocalAccessible* figure = LocalParent();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#define MOZILLA_A11Y_HTMLFormControlAccessible_H_
|
||||
|
||||
#include "FormControlAccessible.h"
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
#include "mozilla/a11y/AccTypes.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "AccAttributes.h"
|
||||
|
@ -52,7 +52,7 @@ class HTMLRadioButtonAccessible : public RadioButtonAccessible {
|
|||
* Accessible for HTML input@type="button", @type="submit", @type="image"
|
||||
* and HTML button elements.
|
||||
*/
|
||||
class HTMLButtonAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLButtonAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
|
@ -84,14 +84,14 @@ class HTMLButtonAccessible : public HyperTextAccessibleWrap {
|
|||
* Accessible for HTML input@type="text", input@type="password", textarea
|
||||
* and other HTML text controls.
|
||||
*/
|
||||
class HTMLTextFieldAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLTextFieldAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
HTMLTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTextFieldAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
HyperTextAccessible)
|
||||
|
||||
// HyperTextAccessible
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY virtual already_AddRefed<EditorBase> GetEditor()
|
||||
|
@ -129,7 +129,7 @@ class HTMLTextFieldAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Accessible for input@type="file" element.
|
||||
*/
|
||||
class HTMLFileInputAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLFileInputAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
|
@ -188,7 +188,7 @@ class HTMLRangeAccessible : public LeafAccessible {
|
|||
/**
|
||||
* Accessible for HTML fieldset element.
|
||||
*/
|
||||
class HTMLGroupboxAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLGroupboxAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
|
@ -207,7 +207,7 @@ class HTMLGroupboxAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Accessible for HTML legend element.
|
||||
*/
|
||||
class HTMLLegendAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLLegendAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLLegendAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
|
@ -218,7 +218,7 @@ class HTMLLegendAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Accessible for HTML5 figure element.
|
||||
*/
|
||||
class HTMLFigureAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLFigureAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLFigureAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
|
@ -236,7 +236,7 @@ class HTMLFigureAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Accessible for HTML5 figcaption element.
|
||||
*/
|
||||
class HTMLFigcaptionAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLFigcaptionAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
|
@ -247,13 +247,12 @@ class HTMLFigcaptionAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Used for HTML form element.
|
||||
*/
|
||||
class HTMLFormAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLFormAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLFormAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLFormAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLFormAccessible, HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual a11y::role NativeRole() const override;
|
||||
|
@ -347,21 +346,20 @@ class HTMLMeterAccessible : public LeafAccessible {
|
|||
* Accessible for HTML date/time inputs.
|
||||
*/
|
||||
template <a11y::role R>
|
||||
class HTMLDateTimeAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLDateTimeAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLDateTimeAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = eHTMLDateTimeFieldType;
|
||||
}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLDateTimeAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual mozilla::a11y::role NativeRole() const override { return R; }
|
||||
virtual already_AddRefed<AccAttributes> NativeAttributes() override {
|
||||
RefPtr<AccAttributes> attributes =
|
||||
HyperTextAccessibleWrap::NativeAttributes();
|
||||
RefPtr<AccAttributes> attributes = HyperTextAccessible::NativeAttributes();
|
||||
// Unfortunately, an nsStaticAtom can't be passed as a
|
||||
// template argument, so fetch the type from the DOM.
|
||||
if (const nsAttrValue* attr =
|
||||
|
|
|
@ -24,7 +24,7 @@ using namespace mozilla::a11y;
|
|||
|
||||
HTMLLinkAccessible::HTMLLinkAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = eHTMLLinkType;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ HTMLLinkAccessible::HTMLLinkAccessible(nsIContent* aContent,
|
|||
role HTMLLinkAccessible::NativeRole() const { return roles::LINK; }
|
||||
|
||||
uint64_t HTMLLinkAccessible::NativeState() const {
|
||||
return HyperTextAccessibleWrap::NativeState() & ~states::READONLY;
|
||||
return HyperTextAccessible::NativeState() & ~states::READONLY;
|
||||
}
|
||||
|
||||
uint64_t HTMLLinkAccessible::NativeLinkState() const {
|
||||
|
@ -54,7 +54,7 @@ uint64_t HTMLLinkAccessible::NativeLinkState() const {
|
|||
}
|
||||
|
||||
uint64_t HTMLLinkAccessible::NativeInteractiveState() const {
|
||||
uint64_t state = HyperTextAccessibleWrap::NativeInteractiveState();
|
||||
uint64_t state = HyperTextAccessible::NativeInteractiveState();
|
||||
|
||||
// This is how we indicate it is a named anchor. In other words, this anchor
|
||||
// can be selected as a location :) There is no other better state to use to
|
||||
|
@ -94,7 +94,7 @@ void HTMLLinkAccessible::ActionNameAt(uint8_t aIndex, nsAString& aName) {
|
|||
|
||||
bool HTMLLinkAccessible::AttributeChangesState(nsAtom* aAttribute) {
|
||||
return aAttribute == nsGkAtoms::href ||
|
||||
HyperTextAccessibleWrap::AttributeChangesState(aAttribute);
|
||||
HyperTextAccessible::AttributeChangesState(aAttribute);
|
||||
}
|
||||
|
||||
void HTMLLinkAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
||||
|
@ -102,8 +102,8 @@ void HTMLLinkAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue,
|
||||
uint64_t aOldState) {
|
||||
HyperTextAccessibleWrap::DOMAttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType, aOldValue, aOldState);
|
||||
HyperTextAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType,
|
||||
aOldValue, aOldState);
|
||||
|
||||
if (aAttribute == nsGkAtoms::href &&
|
||||
(aModType == dom::MutationEvent_Binding::ADDITION ||
|
||||
|
|
|
@ -6,17 +6,16 @@
|
|||
#ifndef mozilla_a11y_HTMLLinkAccessible_h__
|
||||
#define mozilla_a11y_HTMLLinkAccessible_h__
|
||||
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
class HTMLLinkAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLLinkAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLinkAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLinkAccessible, HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual void Value(nsString& aValue) const override;
|
||||
|
|
|
@ -26,7 +26,7 @@ role HTMLListAccessible::NativeRole() const {
|
|||
}
|
||||
|
||||
uint64_t HTMLListAccessible::NativeState() const {
|
||||
return HyperTextAccessibleWrap::NativeState() | states::READONLY;
|
||||
return HyperTextAccessible::NativeState() | states::READONLY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -34,7 +34,7 @@ uint64_t HTMLListAccessible::NativeState() const {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
HTMLLIAccessible::HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = eHTMLLiType;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ role HTMLLIAccessible::NativeRole() const {
|
|||
}
|
||||
|
||||
uint64_t HTMLLIAccessible::NativeState() const {
|
||||
return HyperTextAccessibleWrap::NativeState() | states::READONLY;
|
||||
return HyperTextAccessible::NativeState() | states::READONLY;
|
||||
}
|
||||
|
||||
nsRect HTMLLIAccessible::BoundsInAppUnits() const {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define mozilla_a11y_HTMLListAccessible_h__
|
||||
|
||||
#include "BaseAccessibles.h"
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -18,16 +18,15 @@ class HTMLListBulletAccessible;
|
|||
/**
|
||||
* Used for HTML list (like HTML ul).
|
||||
*/
|
||||
class HTMLListAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLListAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLListAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mGenericTypes |= eList;
|
||||
}
|
||||
|
||||
// nsISupports
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLListAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLListAccessible, HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual a11y::role NativeRole() const override;
|
||||
|
@ -40,13 +39,12 @@ class HTMLListAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* Used for HTML list item (e.g. HTML li).
|
||||
*/
|
||||
class HTMLLIAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLLIAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLIAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLIAccessible, HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual nsRect BoundsInAppUnits() const override;
|
||||
|
|
|
@ -108,7 +108,7 @@ bool HTMLSelectListAccessible::AttributeChangesState(nsAtom* aAttribute) {
|
|||
|
||||
HTMLSelectOptionAccessible::HTMLSelectOptionAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLSelectOptionAccessible: LocalAccessible public
|
||||
|
@ -139,8 +139,8 @@ ENameValueFlag HTMLSelectOptionAccessible::NativeName(nsString& aName) const {
|
|||
void HTMLSelectOptionAccessible::DOMAttributeChanged(
|
||||
int32_t aNameSpaceID, nsAtom* aAttribute, int32_t aModType,
|
||||
const nsAttrValue* aOldValue, uint64_t aOldState) {
|
||||
HyperTextAccessibleWrap::DOMAttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType, aOldValue, aOldState);
|
||||
HyperTextAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType,
|
||||
aOldValue, aOldState);
|
||||
|
||||
if (aAttribute == nsGkAtoms::label) {
|
||||
dom::Element* elm = Elm();
|
||||
|
@ -216,7 +216,7 @@ nsRect HTMLSelectOptionAccessible::RelativeBounds(
|
|||
return combobox->RelativeBounds(aBoundingFrame);
|
||||
}
|
||||
|
||||
return HyperTextAccessibleWrap::RelativeBounds(aBoundingFrame);
|
||||
return HyperTextAccessible::RelativeBounds(aBoundingFrame);
|
||||
}
|
||||
|
||||
void HTMLSelectOptionAccessible::ActionNameAt(uint8_t aIndex,
|
||||
|
|
|
@ -55,7 +55,7 @@ class HTMLSelectListAccessible : public AccessibleWrap {
|
|||
/*
|
||||
* Options inside the select, contained within the list
|
||||
*/
|
||||
class HTMLSelectOptionAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLSelectOptionAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
enum { eAction_Select = 0 };
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ using namespace mozilla::a11y;
|
|||
|
||||
HTMLTableCellAccessible::HTMLTableCellAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = eHTMLTableCellType;
|
||||
mGenericTypes |= eTableCell;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ role HTMLTableCellAccessible::NativeRole() const {
|
|||
}
|
||||
|
||||
uint64_t HTMLTableCellAccessible::NativeState() const {
|
||||
uint64_t state = HyperTextAccessibleWrap::NativeState();
|
||||
uint64_t state = HyperTextAccessible::NativeState();
|
||||
|
||||
nsIFrame* frame = mContent->GetPrimaryFrame();
|
||||
NS_ASSERTION(frame, "No frame for valid cell accessible!");
|
||||
|
@ -81,12 +81,11 @@ uint64_t HTMLTableCellAccessible::NativeState() const {
|
|||
}
|
||||
|
||||
uint64_t HTMLTableCellAccessible::NativeInteractiveState() const {
|
||||
return HyperTextAccessibleWrap::NativeInteractiveState() | states::SELECTABLE;
|
||||
return HyperTextAccessible::NativeInteractiveState() | states::SELECTABLE;
|
||||
}
|
||||
|
||||
already_AddRefed<AccAttributes> HTMLTableCellAccessible::NativeAttributes() {
|
||||
RefPtr<AccAttributes> attributes =
|
||||
HyperTextAccessibleWrap::NativeAttributes();
|
||||
RefPtr<AccAttributes> attributes = HyperTextAccessible::NativeAttributes();
|
||||
|
||||
// We only need to expose table-cell-index to clients. If we're in the content
|
||||
// process, we don't need this, so building a CachedTableAccessible is very
|
||||
|
@ -142,8 +141,8 @@ void HTMLTableCellAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue,
|
||||
uint64_t aOldState) {
|
||||
HyperTextAccessibleWrap::DOMAttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType, aOldValue, aOldState);
|
||||
HyperTextAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType,
|
||||
aOldValue, aOldState);
|
||||
|
||||
if (aAttribute == nsGkAtoms::headers || aAttribute == nsGkAtoms::abbr ||
|
||||
aAttribute == nsGkAtoms::scope) {
|
||||
|
@ -347,8 +346,8 @@ void HTMLTableAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue,
|
||||
uint64_t aOldState) {
|
||||
HyperTextAccessibleWrap::DOMAttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType, aOldValue, aOldState);
|
||||
HyperTextAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType,
|
||||
aOldValue, aOldState);
|
||||
|
||||
if (aAttribute == nsGkAtoms::summary) {
|
||||
nsAutoString name;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef mozilla_a11y_HTMLTableAccessible_h__
|
||||
#define mozilla_a11y_HTMLTableAccessible_h__
|
||||
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
class nsITableCellLayout;
|
||||
class nsTableCellFrame;
|
||||
|
@ -21,13 +21,13 @@ class HTMLTableAccessible;
|
|||
/**
|
||||
* HTML table cell accessible (html:td).
|
||||
*/
|
||||
class HTMLTableCellAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLTableCellAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLTableCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableCellAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
HyperTextAccessible)
|
||||
|
||||
// LocalAccessible
|
||||
virtual a11y::role NativeRole() const override;
|
||||
|
@ -71,16 +71,16 @@ class HTMLTableHeaderCellAccessible : public HTMLTableCellAccessible {
|
|||
/**
|
||||
* HTML table row accessible (html:tr).
|
||||
*/
|
||||
class HTMLTableRowAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLTableRowAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLTableRowAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = eHTMLTableRowType;
|
||||
mGenericTypes |= eTableRow;
|
||||
}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableRowAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
HyperTextAccessible)
|
||||
|
||||
protected:
|
||||
virtual ~HTMLTableRowAccessible() {}
|
||||
|
@ -98,16 +98,15 @@ class HTMLTableRowAccessible : public HyperTextAccessibleWrap {
|
|||
// data vs. layout heuristic
|
||||
// #define SHOW_LAYOUT_HEURISTIC
|
||||
|
||||
class HTMLTableAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLTableAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLTableAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = eHTMLTableType;
|
||||
mGenericTypes |= eTable;
|
||||
}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableAccessible,
|
||||
HyperTextAccessibleWrap)
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableAccessible, HyperTextAccessible)
|
||||
|
||||
// HTMLTableAccessible
|
||||
LocalAccessible* Caption() const;
|
||||
|
@ -157,10 +156,10 @@ class HTMLTableAccessible : public HyperTextAccessibleWrap {
|
|||
/**
|
||||
* HTML caption accessible (html:caption).
|
||||
*/
|
||||
class HTMLCaptionAccessible : public HyperTextAccessibleWrap {
|
||||
class HTMLCaptionAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
HTMLCaptionAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = eHTMLCaptionType;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
#define mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
typedef class HyperTextAccessible HyperTextAccessibleWrap;
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
|
@ -10,7 +10,6 @@ EXPORTS += [
|
|||
|
||||
EXPORTS.mozilla.a11y += [
|
||||
"AccessibleWrap.h",
|
||||
"HyperTextAccessibleWrap.h",
|
||||
"PlatformExtTypes.h",
|
||||
]
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
#define mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
typedef class HyperTextAccessible HyperTextAccessibleWrap;
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
EXPORTS.mozilla.a11y += [
|
||||
"AccessibleWrap.h",
|
||||
"HyperTextAccessibleWrap.h",
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
#define mozilla_a11y_HyperTextAccessibleWrap_h__
|
||||
|
||||
#include "HyperTextAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
typedef class HyperTextAccessible HyperTextAccessibleWrap;
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "AccEvent.h"
|
||||
#include "Compatibility.h"
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
#include "nsWinUtils.h"
|
||||
#include "mozilla/a11y/DocAccessibleParent.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
|
|
|
@ -11,7 +11,6 @@ EXPORTS += [
|
|||
EXPORTS.mozilla.a11y += [
|
||||
"AccessibleWrap.h",
|
||||
"Compatibility.h",
|
||||
"HyperTextAccessibleWrap.h",
|
||||
"LazyInstantiator.h",
|
||||
"MsaaAccessible.h",
|
||||
"MsaaIdGenerator.h",
|
||||
|
|
|
@ -33,13 +33,13 @@ using namespace mozilla::a11y;
|
|||
|
||||
XULLabelAccessible::XULLabelAccessible(nsIContent* aContent,
|
||||
DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {
|
||||
: HyperTextAccessible(aContent, aDoc) {
|
||||
mType = eXULLabelType;
|
||||
}
|
||||
|
||||
void XULLabelAccessible::Shutdown() {
|
||||
mValueTextLeaf = nullptr;
|
||||
HyperTextAccessibleWrap::Shutdown();
|
||||
HyperTextAccessible::Shutdown();
|
||||
}
|
||||
|
||||
void XULLabelAccessible::DispatchClickEvent(nsIContent* aContent,
|
||||
|
@ -65,11 +65,11 @@ role XULLabelAccessible::NativeRole() const { return roles::LABEL; }
|
|||
uint64_t XULLabelAccessible::NativeState() const {
|
||||
// Labels and description have read only state
|
||||
// They are not focusable or selectable
|
||||
return HyperTextAccessibleWrap::NativeState() | states::READONLY;
|
||||
return HyperTextAccessible::NativeState() | states::READONLY;
|
||||
}
|
||||
|
||||
Relation XULLabelAccessible::RelationByType(RelationType aType) const {
|
||||
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
|
||||
Relation rel = HyperTextAccessible::RelationByType(aType);
|
||||
|
||||
// The label for xul:groupbox is generated from the first xul:label
|
||||
if (aType == RelationType::LABEL_FOR) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef mozilla_a11y_XULElementAccessibles_h__
|
||||
#define mozilla_a11y_XULElementAccessibles_h__
|
||||
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
#include "TextLeafAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -17,7 +17,7 @@ class XULLabelTextLeafAccessible;
|
|||
/**
|
||||
* Used for XUL description and label elements.
|
||||
*/
|
||||
class XULLabelAccessible : public HyperTextAccessibleWrap {
|
||||
class XULLabelAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
XULLabelAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// NOTE: alphabetically ordered
|
||||
#include "AccessibleWrap.h"
|
||||
#include "FormControlAccessible.h"
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
#include "XULSelectControlAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -26,7 +26,7 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
XULTabAccessible::XULTabAccessible(nsIContent* aContent, DocAccessible* aDoc)
|
||||
: HyperTextAccessibleWrap(aContent, aDoc) {}
|
||||
: HyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTabAccessible: LocalAccessible
|
||||
|
@ -105,7 +105,7 @@ Relation XULTabAccessible::RelationByType(RelationType aType) const {
|
|||
}
|
||||
|
||||
void XULTabAccessible::ApplyARIAState(uint64_t* aState) const {
|
||||
HyperTextAccessibleWrap::ApplyARIAState(aState);
|
||||
HyperTextAccessible::ApplyARIAState(aState);
|
||||
// XUL tab has an implicit ARIA role of tab, so support aria-selected.
|
||||
// Don't use aria::MapToState because that will set the SELECTABLE state
|
||||
// even if the tab is disabled.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#define mozilla_a11y_XULTabAccessible_h__
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
#include "XULMenuAccessible.h"
|
||||
#include "XULSelectControlAccessible.h"
|
||||
|
||||
|
@ -17,7 +17,7 @@ namespace a11y {
|
|||
/**
|
||||
* An individual tab, xul:tab element.
|
||||
*/
|
||||
class XULTabAccessible : public HyperTextAccessibleWrap {
|
||||
class XULTabAccessible : public HyperTextAccessible {
|
||||
public:
|
||||
enum { eAction_Switch = 0 };
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче