accessible/src/html/HTMLLinkAccessible.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef mozilla_a11y_HTMLLinkAccessible_h__
     7 #define mozilla_a11y_HTMLLinkAccessible_h__
     9 #include "HyperTextAccessibleWrap.h"
    11 namespace mozilla {
    12 namespace a11y {
    14 class HTMLLinkAccessible : public HyperTextAccessibleWrap
    15 {
    16 public:
    17   HTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
    19   NS_DECL_ISUPPORTS_INHERITED
    21   // nsIAccessible
    22   NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName);
    23   NS_IMETHOD DoAction(uint8_t aIndex);
    25   // Accessible
    26   virtual void Value(nsString& aValue);
    27   virtual a11y::role NativeRole();
    28   virtual uint64_t NativeState();
    29   virtual uint64_t NativeLinkState() const;
    30   virtual uint64_t NativeInteractiveState() const;
    32   // ActionAccessible
    33   virtual uint8_t ActionCount();
    35   // HyperLinkAccessible
    36   virtual bool IsLink();
    37   virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex);
    39 protected:
    40   enum { eAction_Jump = 0 };
    42   /**
    43    * Returns true if the link has href attribute.
    44    */
    45   bool IsLinked();
    46 };
    48 } // namespace a11y
    49 } // namespace mozilla
    51 #endif

mercurial