2012-06-02 15:30:29 +04:00
|
|
|
/* -*- 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_HTMLElementAccessibles_h__
|
|
|
|
#define mozilla_a11y_HTMLElementAccessibles_h__
|
|
|
|
|
2012-06-04 16:32:29 +04:00
|
|
|
#include "BaseAccessibles.h"
|
2012-06-02 15:30:29 +04:00
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for HTML hr element.
|
|
|
|
*/
|
2012-06-04 16:32:29 +04:00
|
|
|
class HTMLHRAccessible : public LeafAccessible
|
2012-06-02 15:30:29 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
HTMLHRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
2012-12-09 21:23:19 +04:00
|
|
|
LeafAccessible(aContent, aDoc) {}
|
2012-06-02 15:30:29 +04:00
|
|
|
|
|
|
|
// Accessible
|
|
|
|
virtual a11y::role NativeRole();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for HTML br element.
|
|
|
|
*/
|
2012-06-04 16:32:29 +04:00
|
|
|
class HTMLBRAccessible : public LeafAccessible
|
2012-06-02 15:30:29 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
HTMLBRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
2013-09-11 20:56:01 +04:00
|
|
|
LeafAccessible(aContent, aDoc)
|
|
|
|
{
|
|
|
|
mType = eHTMLBRType;
|
|
|
|
}
|
2012-06-02 15:30:29 +04:00
|
|
|
|
|
|
|
// Accessible
|
|
|
|
virtual a11y::role NativeRole();
|
2012-08-22 19:56:38 +04:00
|
|
|
virtual uint64_t NativeState();
|
2012-10-14 08:18:39 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// Accessible
|
|
|
|
virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
|
2012-06-02 15:30:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for HTML label element.
|
|
|
|
*/
|
|
|
|
class HTMLLabelAccessible : public HyperTextAccessibleWrap
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
HTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
2012-12-09 21:23:19 +04:00
|
|
|
HyperTextAccessibleWrap(aContent, aDoc) {}
|
2012-06-02 15:30:29 +04:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// Accessible
|
|
|
|
virtual a11y::role NativeRole();
|
2013-10-19 22:19:50 +04:00
|
|
|
virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
|
2012-10-14 08:18:39 +04:00
|
|
|
|
|
|
|
protected:
|
2014-07-09 01:23:18 +04:00
|
|
|
virtual ~HTMLLabelAccessible() {}
|
2012-10-14 08:18:39 +04:00
|
|
|
virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
|
2012-06-02 15:30:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for HTML output element.
|
|
|
|
*/
|
|
|
|
class HTMLOutputAccessible : public HyperTextAccessibleWrap
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
HTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
2012-12-09 21:23:19 +04:00
|
|
|
HyperTextAccessibleWrap(aContent, aDoc) {}
|
2012-06-02 15:30:29 +04:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// Accessible
|
|
|
|
virtual a11y::role NativeRole();
|
2012-10-19 11:15:23 +04:00
|
|
|
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
|
2013-10-19 22:19:50 +04:00
|
|
|
virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
|
2014-07-09 01:23:18 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ~HTMLOutputAccessible() {}
|
2012-06-02 15:30:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|