Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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_HTMLLinkAccessible_h__ |
michael@0 | 7 | #define mozilla_a11y_HTMLLinkAccessible_h__ |
michael@0 | 8 | |
michael@0 | 9 | #include "HyperTextAccessibleWrap.h" |
michael@0 | 10 | |
michael@0 | 11 | namespace mozilla { |
michael@0 | 12 | namespace a11y { |
michael@0 | 13 | |
michael@0 | 14 | class HTMLLinkAccessible : public HyperTextAccessibleWrap |
michael@0 | 15 | { |
michael@0 | 16 | public: |
michael@0 | 17 | HTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc); |
michael@0 | 18 | |
michael@0 | 19 | NS_DECL_ISUPPORTS_INHERITED |
michael@0 | 20 | |
michael@0 | 21 | // nsIAccessible |
michael@0 | 22 | NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName); |
michael@0 | 23 | NS_IMETHOD DoAction(uint8_t aIndex); |
michael@0 | 24 | |
michael@0 | 25 | // Accessible |
michael@0 | 26 | virtual void Value(nsString& aValue); |
michael@0 | 27 | virtual a11y::role NativeRole(); |
michael@0 | 28 | virtual uint64_t NativeState(); |
michael@0 | 29 | virtual uint64_t NativeLinkState() const; |
michael@0 | 30 | virtual uint64_t NativeInteractiveState() const; |
michael@0 | 31 | |
michael@0 | 32 | // ActionAccessible |
michael@0 | 33 | virtual uint8_t ActionCount(); |
michael@0 | 34 | |
michael@0 | 35 | // HyperLinkAccessible |
michael@0 | 36 | virtual bool IsLink(); |
michael@0 | 37 | virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex); |
michael@0 | 38 | |
michael@0 | 39 | protected: |
michael@0 | 40 | enum { eAction_Jump = 0 }; |
michael@0 | 41 | |
michael@0 | 42 | /** |
michael@0 | 43 | * Returns true if the link has href attribute. |
michael@0 | 44 | */ |
michael@0 | 45 | bool IsLinked(); |
michael@0 | 46 | }; |
michael@0 | 47 | |
michael@0 | 48 | } // namespace a11y |
michael@0 | 49 | } // namespace mozilla |
michael@0 | 50 | |
michael@0 | 51 | #endif |