Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef mozilla_a11y_HTMLElementAccessibles_h__ |
michael@0 | 7 | #define mozilla_a11y_HTMLElementAccessibles_h__ |
michael@0 | 8 | |
michael@0 | 9 | #include "BaseAccessibles.h" |
michael@0 | 10 | #include "nsAutoPtr.h" |
michael@0 | 11 | |
michael@0 | 12 | namespace mozilla { |
michael@0 | 13 | namespace a11y { |
michael@0 | 14 | |
michael@0 | 15 | /** |
michael@0 | 16 | * Used for HTML hr element. |
michael@0 | 17 | */ |
michael@0 | 18 | class HTMLHRAccessible : public LeafAccessible |
michael@0 | 19 | { |
michael@0 | 20 | public: |
michael@0 | 21 | |
michael@0 | 22 | HTMLHRAccessible(nsIContent* aContent, DocAccessible* aDoc) : |
michael@0 | 23 | LeafAccessible(aContent, aDoc) {} |
michael@0 | 24 | |
michael@0 | 25 | // Accessible |
michael@0 | 26 | virtual a11y::role NativeRole(); |
michael@0 | 27 | }; |
michael@0 | 28 | |
michael@0 | 29 | /** |
michael@0 | 30 | * Used for HTML br element. |
michael@0 | 31 | */ |
michael@0 | 32 | class HTMLBRAccessible : public LeafAccessible |
michael@0 | 33 | { |
michael@0 | 34 | public: |
michael@0 | 35 | HTMLBRAccessible(nsIContent* aContent, DocAccessible* aDoc) : |
michael@0 | 36 | LeafAccessible(aContent, aDoc) |
michael@0 | 37 | { |
michael@0 | 38 | mType = eHTMLBRType; |
michael@0 | 39 | } |
michael@0 | 40 | |
michael@0 | 41 | // Accessible |
michael@0 | 42 | virtual a11y::role NativeRole(); |
michael@0 | 43 | virtual uint64_t NativeState(); |
michael@0 | 44 | |
michael@0 | 45 | protected: |
michael@0 | 46 | // Accessible |
michael@0 | 47 | virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE; |
michael@0 | 48 | }; |
michael@0 | 49 | |
michael@0 | 50 | /** |
michael@0 | 51 | * Used for HTML label element. |
michael@0 | 52 | */ |
michael@0 | 53 | class HTMLLabelAccessible : public HyperTextAccessibleWrap |
michael@0 | 54 | { |
michael@0 | 55 | public: |
michael@0 | 56 | |
michael@0 | 57 | HTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc) : |
michael@0 | 58 | HyperTextAccessibleWrap(aContent, aDoc) {} |
michael@0 | 59 | |
michael@0 | 60 | NS_DECL_ISUPPORTS_INHERITED |
michael@0 | 61 | |
michael@0 | 62 | // Accessible |
michael@0 | 63 | virtual a11y::role NativeRole(); |
michael@0 | 64 | virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE; |
michael@0 | 65 | |
michael@0 | 66 | protected: |
michael@0 | 67 | virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE; |
michael@0 | 68 | }; |
michael@0 | 69 | |
michael@0 | 70 | /** |
michael@0 | 71 | * Used for HTML output element. |
michael@0 | 72 | */ |
michael@0 | 73 | class HTMLOutputAccessible : public HyperTextAccessibleWrap |
michael@0 | 74 | { |
michael@0 | 75 | public: |
michael@0 | 76 | |
michael@0 | 77 | HTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc) : |
michael@0 | 78 | HyperTextAccessibleWrap(aContent, aDoc) {} |
michael@0 | 79 | |
michael@0 | 80 | NS_DECL_ISUPPORTS_INHERITED |
michael@0 | 81 | |
michael@0 | 82 | // Accessible |
michael@0 | 83 | virtual a11y::role NativeRole(); |
michael@0 | 84 | virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE; |
michael@0 | 85 | virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE; |
michael@0 | 86 | }; |
michael@0 | 87 | |
michael@0 | 88 | } // namespace a11y |
michael@0 | 89 | } // namespace mozilla |
michael@0 | 90 | |
michael@0 | 91 | #endif |