accessible/src/html/HTMLLinkAccessible.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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