author Alexander Surkov <>
Mon, 04 Jun 2012 14:41:06 +0900
changeset 95738 af83ecf3ee15bf7a44d9cf159133953331a58824
parent 95140 ee5b6efa9bda22a2c96e46eff2bd57a90aad0765
child 106267 56ba58a77e8f11cff724a9ddb50839a0c5663e2c
permissions -rw-r--r--
Bug 756983 - make nsAccessible::GetActionName faster, r=tbsaunde

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 */

#ifndef _nsXULSliderAccessible_H_
#define _nsXULSliderAccessible_H_

#include "AccessibleWrap.h"

#include "nsIDOMElement.h"

 * Used for XUL slider and scale elements.
class nsXULSliderAccessible : public AccessibleWrap
  nsXULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc);

  // nsISupports

  // nsIAccessible
  NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
  NS_IMETHOD DoAction(PRUint8 aIndex);

  // nsIAccessibleValue

  // Accessible
  virtual void Value(nsString& aValue);
  virtual mozilla::a11y::role NativeRole();
  virtual PRUint64 NativeInteractiveState() const;
  virtual bool NativelyUnavailable() const;
  virtual bool CanHaveAnonChildren();

  // ActionAccessible
  virtual PRUint8 ActionCount();

   * Return anonymous slider element.
  nsIContent* GetSliderElement() const;

  nsresult GetSliderAttr(nsIAtom *aName, nsAString& aValue);
  nsresult SetSliderAttr(nsIAtom *aName, const nsAString& aValue);

  nsresult GetSliderAttr(nsIAtom *aName, double *aValue);
  nsresult SetSliderAttr(nsIAtom *aName, double aValue);

  mutable nsCOMPtr<nsIContent> mSliderNode;

 * Used for slider's thumb element.
class nsXULThumbAccessible : public AccessibleWrap
  nsXULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc);

  // Accessible
  virtual mozilla::a11y::role NativeRole();