2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-04 05:32:38 -07:00
|
|
|
#ifndef mozilla_a11y_HTMLLinkAccessible_h__
|
|
|
|
#define mozilla_a11y_HTMLLinkAccessible_h__
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-05-31 01:04:41 -07:00
|
|
|
#include "HyperTextAccessibleWrap.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-04 05:32:38 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
|
|
|
class HTMLLinkAccessible : public HyperTextAccessibleWrap
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2012-06-04 05:32:38 -07:00
|
|
|
HTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
2008-03-18 04:37:12 -07:00
|
|
|
|
2014-09-16 10:30:23 -07:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2008-03-18 04:37:12 -07:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2012-04-09 02:48:41 -07:00
|
|
|
virtual void Value(nsString& aValue);
|
2014-09-16 10:30:23 -07:00
|
|
|
virtual a11y::role NativeRole() MOZ_OVERRIDE;
|
|
|
|
virtual uint64_t NativeState() MOZ_OVERRIDE;
|
|
|
|
virtual uint64_t NativeLinkState() const MOZ_OVERRIDE;
|
|
|
|
virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
|
2008-10-10 05:26:55 -07:00
|
|
|
|
2011-06-05 12:35:43 -07:00
|
|
|
// ActionAccessible
|
2014-09-16 10:30:23 -07:00
|
|
|
virtual uint8_t ActionCount() MOZ_OVERRIDE;
|
|
|
|
virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
|
|
|
|
virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
|
2011-06-05 12:35:43 -07:00
|
|
|
|
2010-08-31 20:26:13 -07:00
|
|
|
// HyperLinkAccessible
|
2011-06-23 21:29:43 -07:00
|
|
|
virtual bool IsLink();
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex);
|
2010-08-31 20:26:13 -07:00
|
|
|
|
2008-03-18 04:37:12 -07:00
|
|
|
protected:
|
2014-07-08 14:23:18 -07:00
|
|
|
virtual ~HTMLLinkAccessible() {}
|
|
|
|
|
2008-03-18 04:37:12 -07:00
|
|
|
enum { eAction_Jump = 0 };
|
2008-06-19 22:50:27 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if the link has href attribute.
|
|
|
|
*/
|
2014-09-16 10:30:23 -07:00
|
|
|
bool IsLinked() const;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2012-06-04 05:32:38 -07:00
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|