michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_a11y_HTMLElementAccessibles_h__ michael@0: #define mozilla_a11y_HTMLElementAccessibles_h__ michael@0: michael@0: #include "BaseAccessibles.h" michael@0: #include "nsAutoPtr.h" michael@0: michael@0: namespace mozilla { michael@0: namespace a11y { michael@0: michael@0: /** michael@0: * Used for HTML hr element. michael@0: */ michael@0: class HTMLHRAccessible : public LeafAccessible michael@0: { michael@0: public: michael@0: michael@0: HTMLHRAccessible(nsIContent* aContent, DocAccessible* aDoc) : michael@0: LeafAccessible(aContent, aDoc) {} michael@0: michael@0: // Accessible michael@0: virtual a11y::role NativeRole(); michael@0: }; michael@0: michael@0: /** michael@0: * Used for HTML br element. michael@0: */ michael@0: class HTMLBRAccessible : public LeafAccessible michael@0: { michael@0: public: michael@0: HTMLBRAccessible(nsIContent* aContent, DocAccessible* aDoc) : michael@0: LeafAccessible(aContent, aDoc) michael@0: { michael@0: mType = eHTMLBRType; michael@0: } michael@0: michael@0: // Accessible michael@0: virtual a11y::role NativeRole(); michael@0: virtual uint64_t NativeState(); michael@0: michael@0: protected: michael@0: // Accessible michael@0: virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE; michael@0: }; michael@0: michael@0: /** michael@0: * Used for HTML label element. michael@0: */ michael@0: class HTMLLabelAccessible : public HyperTextAccessibleWrap michael@0: { michael@0: public: michael@0: michael@0: HTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc) : michael@0: HyperTextAccessibleWrap(aContent, aDoc) {} michael@0: michael@0: NS_DECL_ISUPPORTS_INHERITED michael@0: michael@0: // Accessible michael@0: virtual a11y::role NativeRole(); michael@0: virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE; michael@0: michael@0: protected: michael@0: virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE; michael@0: }; michael@0: michael@0: /** michael@0: * Used for HTML output element. michael@0: */ michael@0: class HTMLOutputAccessible : public HyperTextAccessibleWrap michael@0: { michael@0: public: michael@0: michael@0: HTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc) : michael@0: HyperTextAccessibleWrap(aContent, aDoc) {} michael@0: michael@0: NS_DECL_ISUPPORTS_INHERITED michael@0: michael@0: // Accessible michael@0: virtual a11y::role NativeRole(); michael@0: virtual already_AddRefed NativeAttributes() MOZ_OVERRIDE; michael@0: virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE; michael@0: }; michael@0: michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #endif