2001-09-25 04:48:50 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-03-04 05:31:28 +03:00
|
|
|
|
2012-06-04 16:32:38 +04:00
|
|
|
#ifndef mozilla_a11y_HTMLLinkAccessible_h__
|
|
|
|
#define mozilla_a11y_HTMLLinkAccessible_h__
|
2001-03-04 05:31:28 +03:00
|
|
|
|
2012-05-31 12:04:41 +04:00
|
|
|
#include "HyperTextAccessibleWrap.h"
|
2001-03-04 05:31:28 +03:00
|
|
|
|
2012-06-04 16:32:38 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
|
|
|
class HTMLLinkAccessible : public HyperTextAccessibleWrap
|
2001-03-04 05:31:28 +03:00
|
|
|
{
|
2001-05-12 01:11:38 +04:00
|
|
|
public:
|
2012-06-04 16:32:38 +04:00
|
|
|
HTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
2008-03-18 14:37:12 +03:00
|
|
|
|
2018-02-12 23:44:40 +03:00
|
|
|
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLinkAccessible,
|
|
|
|
HyperTextAccessibleWrap)
|
2008-03-18 14:37:12 +03:00
|
|
|
|
2012-05-29 05:18:45 +04:00
|
|
|
// Accessible
|
2018-05-15 19:55:28 +03:00
|
|
|
virtual void Value(nsString& aValue) const override;
|
2018-05-07 22:05:50 +03:00
|
|
|
virtual a11y::role NativeRole() const override;
|
2018-05-15 21:04:50 +03:00
|
|
|
virtual uint64_t NativeState() const override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual uint64_t NativeLinkState() const override;
|
|
|
|
virtual uint64_t NativeInteractiveState() const override;
|
2008-10-10 16:26:55 +04:00
|
|
|
|
2011-06-05 23:35:43 +04:00
|
|
|
// ActionAccessible
|
2018-05-15 20:40:22 +03:00
|
|
|
virtual uint8_t ActionCount() const override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
|
2018-05-15 20:40:22 +03:00
|
|
|
virtual bool DoAction(uint8_t aIndex) const override;
|
2011-06-05 23:35:43 +04:00
|
|
|
|
2010-09-01 07:26:13 +04:00
|
|
|
// HyperLinkAccessible
|
2018-05-04 15:48:34 +03:00
|
|
|
virtual bool IsLink() const override;
|
2018-05-15 20:19:54 +03:00
|
|
|
virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) const override;
|
2010-09-01 07:26:13 +04:00
|
|
|
|
2008-03-18 14:37:12 +03:00
|
|
|
protected:
|
2014-07-09 01:23:18 +04:00
|
|
|
virtual ~HTMLLinkAccessible() {}
|
|
|
|
|
2008-03-18 14:37:12 +03:00
|
|
|
enum { eAction_Jump = 0 };
|
2008-06-20 09:50:27 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if the link has href attribute.
|
|
|
|
*/
|
2014-09-16 21:30:23 +04:00
|
|
|
bool IsLinked() const;
|
2001-03-04 05:31:28 +03:00
|
|
|
};
|
|
|
|
|
2012-06-04 16:32:38 +04:00
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|