=Fix for bug 373532 - move roles out of nsIAccessible. r=aaronlev

git-svn-id: svn://10.0.0.236/trunk@221907 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
surkov.alexander%gmail.com 2007-03-15 02:26:13 +00:00
parent cb34b7601c
commit 83aec9c2e3
44 changed files with 1221 additions and 575 deletions

View File

@ -54,6 +54,7 @@ XPIDLSRCS = \
nsIAccessibilityService.idl \
nsIAccessibleRetrieval.idl \
nsIAccessible.idl \
nsIAccessibleRole.idl \
nsPIAccessible.idl \
nsIAccessibleCaret.idl \
nsIAccessibleDocument.idl \

View File

@ -57,7 +57,7 @@ interface nsIDOMDOMStringList;
*
* @status UNDER_REVIEW
*/
[scriptable, uuid(58305abc-1b04-4e1e-a7f2-4c52ffa8936b)]
[scriptable, uuid(79fa0a81-5acb-4549-94bd-5ad179616a59)]
interface nsIAccessible : nsISupports
{
/**
@ -139,14 +139,14 @@ interface nsIAccessible : nsISupports
/**
* Natural enumerated accessible role for the associated element.
* The values depend on platform because of variations.
* See the ROLE_* constants defined later in this file.
* See the ROLE_* constants defined in nsIAccessibleRole.
* This does not take into account role attribute as the finalRole does.
*/
readonly attribute unsigned long role;
/**
* Enumerated accessible role. The values depend on platform because of variations.
* See the ROLE_* constants defined later in this file.
* See the ROLE_* constants defined in nsIAccessibleRole.
* Widgets can use role attribute to force the final role
*/
readonly attribute unsigned long finalRole;
@ -400,126 +400,6 @@ interface nsIAccessible : nsISupports
const unsigned long RELATION_DESCRIPTION_FOR = 0x0f; // ATK_RELATION_DESCRIPTION_FOR
const unsigned long RELATION_DEFAULT_BUTTON = 0x4000; // MSAA only, no ATK relation
// Cross Platform Roles
// When adding a new role, be sure to also add it to nsRoleMap.h for each platform
const unsigned long ROLE_NOTHING = 0;
const unsigned long ROLE_TITLEBAR = 1;
const unsigned long ROLE_MENUBAR = 2;
const unsigned long ROLE_SCROLLBAR = 3;
const unsigned long ROLE_GRIP = 4;
const unsigned long ROLE_SOUND = 5;
const unsigned long ROLE_CURSOR = 6;
const unsigned long ROLE_CARET = 7;
const unsigned long ROLE_ALERT = 8;
const unsigned long ROLE_WINDOW = 9;
const unsigned long ROLE_CLIENT = 10;
const unsigned long ROLE_MENUPOPUP = 11;
const unsigned long ROLE_MENUITEM = 12;
const unsigned long ROLE_TOOLTIP = 13;
const unsigned long ROLE_APPLICATION = 14; // See also ROLE_APP_ROOT
const unsigned long ROLE_DOCUMENT = 15;
const unsigned long ROLE_PANE = 16;
const unsigned long ROLE_CHART = 17;
const unsigned long ROLE_DIALOG = 18;
const unsigned long ROLE_BORDER = 19;
const unsigned long ROLE_GROUPING = 20;
const unsigned long ROLE_SEPARATOR = 21;
const unsigned long ROLE_TOOLBAR = 22;
const unsigned long ROLE_STATUSBAR = 23;
const unsigned long ROLE_TABLE = 24;
const unsigned long ROLE_COLUMNHEADER = 25;
const unsigned long ROLE_ROWHEADER = 26;
const unsigned long ROLE_COLUMN = 27;
const unsigned long ROLE_ROW = 28;
const unsigned long ROLE_CELL = 29;
const unsigned long ROLE_LINK = 30;
const unsigned long ROLE_HELPBALLOON = 31;
const unsigned long ROLE_CHARACTER = 32;
const unsigned long ROLE_LIST = 33;
const unsigned long ROLE_LISTITEM = 34;
const unsigned long ROLE_OUTLINE = 35;
const unsigned long ROLE_OUTLINEITEM = 36;
const unsigned long ROLE_PAGETAB = 37;
const unsigned long ROLE_PROPERTYPAGE = 38;
const unsigned long ROLE_INDICATOR = 39;
const unsigned long ROLE_GRAPHIC = 40;
const unsigned long ROLE_STATICTEXT = 41;
const unsigned long ROLE_TEXT_LEAF = 42;
const unsigned long ROLE_PUSHBUTTON = 43;
const unsigned long ROLE_CHECKBUTTON = 44;
const unsigned long ROLE_RADIOBUTTON = 45;
const unsigned long ROLE_COMBOBOX = 46;
const unsigned long ROLE_DROPLIST = 47;
const unsigned long ROLE_PROGRESSBAR = 48;
const unsigned long ROLE_DIAL = 49;
const unsigned long ROLE_HOTKEYFIELD = 50;
const unsigned long ROLE_SLIDER = 51;
const unsigned long ROLE_SPINBUTTON = 52;
const unsigned long ROLE_DIAGRAM = 53;
const unsigned long ROLE_ANIMATION = 54;
const unsigned long ROLE_EQUATION = 55;
const unsigned long ROLE_BUTTONDROPDOWN = 56;
const unsigned long ROLE_BUTTONMENU = 57;
const unsigned long ROLE_BUTTONDROPDOWNGRID = 58;
const unsigned long ROLE_WHITESPACE = 59;
const unsigned long ROLE_PAGETABLIST = 60;
const unsigned long ROLE_CLOCK = 61;
const unsigned long ROLE_SPLITBUTTON = 62;
const unsigned long ROLE_IPADDRESS = 63;
const unsigned long ROLE_ACCEL_LABEL = 64;
const unsigned long ROLE_ARROW = 65;
const unsigned long ROLE_CANVAS = 66;
const unsigned long ROLE_CHECK_MENU_ITEM = 67;
const unsigned long ROLE_COLOR_CHOOSER = 68;
const unsigned long ROLE_DATE_EDITOR = 69;
const unsigned long ROLE_DESKTOP_ICON = 70;
const unsigned long ROLE_DESKTOP_FRAME = 71;
const unsigned long ROLE_DIRECTORY_PANE = 72;
const unsigned long ROLE_FILE_CHOOSER = 73;
const unsigned long ROLE_FONT_CHOOSER = 74;
const unsigned long ROLE_CHROME_WINDOW = 75;
const unsigned long ROLE_GLASS_PANE = 76;
const unsigned long ROLE_HTML_CONTAINER = 77;
const unsigned long ROLE_ICON = 78;
const unsigned long ROLE_LABEL = 79;
const unsigned long ROLE_LAYERED_PANE = 80;
const unsigned long ROLE_OPTION_PANE = 81;
const unsigned long ROLE_PASSWORD_TEXT = 82;
const unsigned long ROLE_POPUP_MENU = 83;
const unsigned long ROLE_RADIO_MENU_ITEM = 84;
const unsigned long ROLE_ROOT_PANE = 85;
const unsigned long ROLE_SCROLL_PANE = 86;
const unsigned long ROLE_SPLIT_PANE = 87;
const unsigned long ROLE_TABLE_COLUMN_HEADER = 88;
const unsigned long ROLE_TABLE_ROW_HEADER = 89;
const unsigned long ROLE_TEAR_OFF_MENU_ITEM = 90;
const unsigned long ROLE_TERMINAL = 91;
const unsigned long ROLE_TEXT_CONTAINER = 92;
const unsigned long ROLE_TOGGLE_BUTTON = 93;
const unsigned long ROLE_TREE_TABLE = 94;
const unsigned long ROLE_VIEWPORT = 95;
const unsigned long ROLE_HEADER = 96;
const unsigned long ROLE_FOOTER = 97;
const unsigned long ROLE_PARAGRAPH = 98;
const unsigned long ROLE_RULER = 99;
const unsigned long ROLE_AUTOCOMPLETE = 100;
const unsigned long ROLE_EDITBAR = 101;
const unsigned long ROLE_ENTRY = 102;
const unsigned long ROLE_CAPTION = 103;
const unsigned long ROLE_DOCUMENT_FRAME = 104;
const unsigned long ROLE_HEADING = 105;
const unsigned long ROLE_PAGE = 106;
const unsigned long ROLE_SECTION = 107;
const unsigned long ROLE_REDUNDANT_OBJECT = 108;
const unsigned long ROLE_FORM = 109;
const unsigned long ROLE_IME = 110;
const unsigned long ROLE_APP_ROOT = 111;
const unsigned long ROLE_PARENT_MENUITEM = 112;
const unsigned long ROLE_CALENDAR = 113;
const unsigned long ROLE_COMBOBOX_LIST = 114;
const unsigned long ROLE_COMBOBOX_LISTITEM = 115;
const unsigned long ROLE_LAST_ENTRY = 116; // Important -- helps ensure nsRoleMap's are synchronized
// MSAA relationship extensions to accNavigate
const unsigned long NAVRELATION_CONTROLLED_BY = 0x1000;
const unsigned long NAVRELATION_CONTROLLER_FOR = 0x1001;

View File

@ -0,0 +1,752 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Alexander Surkov <surkov.alexander@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
/**
* Defines cross platform (Gecko) roles.
*
* @note - When adding a new role, be sure to also add it to nsRoleMap.h for
* each platform.
*/
[scriptable, uuid(d6d73bc4-0fe9-46a1-a8dd-6d93b041e54b)]
interface nsIAccessibleRole : nsISupports
{
/**
* Used when accessible hans't strong defined role.
*/
const unsigned long ROLE_NOTHING = 0;
/**
* Represents a title or caption bar for a window. It is used by MSAA only,
* supported automatically by MS Windows.
*/
const unsigned long ROLE_TITLEBAR = 1;
/**
* Represents the menu bar (positioned beneath the title bar of a window)
* from which menus are selected by the user. The role is used by
* xul:menubar or role="wairole:menubar".
*/
const unsigned long ROLE_MENUBAR = 2;
/**
* Represents a vertical or horizontal scroll bar, which is part of the client
* area or used in a control.
*/
const unsigned long ROLE_SCROLLBAR = 3;
/**
* Represents a special mouse pointer, which allows a user to manipulate user
* interface elements such as windows. For example, a user clicks and drags
* a sizing grip in the lower-right corner of a window to resize it.
*/
const unsigned long ROLE_GRIP = 4;
/**
* Represents a system sound, which is associated with various system events.
*/
const unsigned long ROLE_SOUND = 5;
/**
* Represents the system mouse pointer.
*/
const unsigned long ROLE_CURSOR = 6;
/**
* Represents the system caret. The role is supported for caret.
*/
const unsigned long ROLE_CARET = 7;
/**
* Represents an alert or a condition that a user should be notified about.
* Assistive Technologies typically respond to the role by reading the entire
* onscreen contents of containers advertising this role. Should be used for
* warning dialogs, etc. The role is used by xul:browsermessage,
* role="wairole:alert", xforms:message.
*/
const unsigned long ROLE_ALERT = 8;
/**
* Represents the window frame, which contains child objects such as
* a title bar, client, and other objects contained in a window. The role
* is supported automatically by MS Windows.
*/
const unsigned long ROLE_WINDOW = 9;
/**
* XXX: document this.
*/
const unsigned long ROLE_CLIENT = 10;
/**
* Represents a menu, which presents a list of options from which the user can
* make a selection to perform an action. It is used for role="wairole:menu".
*/
const unsigned long ROLE_MENUPOPUP = 11;
/**
* Represents a menu item, which is an entry in a menu that a user can choose
* to carry out a command, select an option. It is used for xul:menuitem,
* role="wairole:menuitem".
*/
const unsigned long ROLE_MENUITEM = 12;
/**
* Represents a ToolTip that provides helpful hints.
*/
const unsigned long ROLE_TOOLTIP = 13;
/**
* Represents a main window for an application. It is used for
* role="wairole:application". Also refer to ROLE_APP_ROOT
*/
const unsigned long ROLE_APPLICATION = 14;
/**
* Represents a document window. A document window is always contained within
* an application window. It is used for role="wairole:document".
*/
const unsigned long ROLE_DOCUMENT = 15;
/**
* Represents a pane within a frame or document window. Users can navigate
* between panes and within the contents of the current pane, but cannot
* navigate between items in different panes. Thus, panes represent a level
* of grouping lower than frame windows or documents, but above individual
* controls. It is used for the first child of a <frame> or <iframe>.
*/
const unsigned long ROLE_PANE = 16;
/**
* Represents a graphical image used to represent data.
*/
const unsigned long ROLE_CHART = 17;
/**
* Represents a dialog box or message box. It is used for xul:dialog,
* role="wairole:dialog".
*/
const unsigned long ROLE_DIALOG = 18;
/**
* Represents a window border.
*/
const unsigned long ROLE_BORDER = 19;
/**
* Logically groups other objects. There is not always a parent-child
* relationship between the grouping object and the objects it contains. It
* is used for html:textfield, xul:groupbox, role="wairole:group".
*/
const unsigned long ROLE_GROUPING = 20;
/**
* Used to visually divide a space into two regions, such as a separator menu
* item or a bar that divides split panes within a window. It is used for
* xul:separator, html:hr, role="wairole:separator".
*/
const unsigned long ROLE_SEPARATOR = 21;
/**
* Represents a toolbar, which is a grouping of controls (push buttons or
* toggle buttons) that provides easy access to frequently used features. It
* is used for xul:toolbar, role="wairole:toolbar".
*/
const unsigned long ROLE_TOOLBAR = 22;
/**
* Represents a status bar, which is an area at the bottom of a window that
* displays information about the current operation, state of the application,
* or selected object. The status bar has multiple fields, which display
* different kinds of information. It is used for xul:statusbar.
*/
const unsigned long ROLE_STATUSBAR = 23;
/**
* Represents a table that contains rows and columns of cells, and optionally,
* row headers and column headers. It is used for html:table,
* role="wairole:grid". Also refer to the following roles: ROLE_COLUMNHEADER,
* ROLE_ROWHEADER, ROLE_COLUMN, ROLE_ROW, ROLE_CELL.
*/
const unsigned long ROLE_TABLE = 24;
/**
* Represents a column header, providing a visual label for a column in
* a table. It is used for XUL tree column headers, html:th,
* role="wairole:colheader". Also refer to ROLE_TABLE.
*/
const unsigned long ROLE_COLUMNHEADER = 25;
/**
* Represents a row header, which provides a visual label for a table row.
* It is used for role="wairole:rowheader". Also, see ROLE_TABLE.
*/
const unsigned long ROLE_ROWHEADER = 26;
/**
* Represents a column of cells within a table. Also, see ROLE_TABLE.
*/
const unsigned long ROLE_COLUMN = 27;
/**
* Represents a row of cells within a table. Also, see ROLE_TABLE.
*/
const unsigned long ROLE_ROW = 28;
/**
* Represents a cell within a table. Is is used for html:td,
* role="wairole:gridcell". Also, see ROLE_TABLE.
*/
const unsigned long ROLE_CELL = 29;
/**
* Represents a link to something else. This object might look like text or
* a graphic, but it acts like a button. It is used for
* xul:label@class="text-link", html:a, html:area,
* xforms:trigger@appearance="minimal".
*/
const unsigned long ROLE_LINK = 30;
/**
* Displays a Help topic in the form of a ToolTip or Help balloon.
*/
const unsigned long ROLE_HELPBALLOON = 31;
/**
* Represents a cartoon-like graphic object, such as Microsoft Office
* Assistant, which is displayed to provide help to users of an application.
*/
const unsigned long ROLE_CHARACTER = 32;
/**
* Represents a list box, allowing the user to select one or more items. It
* is used for xul:listbox, html:select@size, role="wairole:list". See also
* ROLE_LIST_ITEM.
*/
const unsigned long ROLE_LIST = 33;
/**
* Represents an item in a list. See also ROLE_LIST.
*/
const unsigned long ROLE_LISTITEM = 34;
/**
* Represents an outline or tree structure, such as a tree view control,
* that displays a hierarchical list and allows the user to expand and
* collapse branches. Is is used for role="wairole:tree".
*/
const unsigned long ROLE_OUTLINE = 35;
/**
* Represents an item in an outline or tree structure. It is used for
* role="wairole:treeitem".
*/
const unsigned long ROLE_OUTLINEITEM = 36;
/**
* Represents a page tab, it is a child of a page tab list. It is used for
* xul:tab, role="wairole:treeitem". Also refer to ROLE_PAGETABLIST.
*/
const unsigned long ROLE_PAGETAB = 37;
/**
* Represents a property sheet. It is used for xul:tabpanel,
* role="wairole:tabpanel".
*/
const unsigned long ROLE_PROPERTYPAGE = 38;
/**
* Represents an indicator, such as a pointer graphic, that points to the
* current item.
*/
const unsigned long ROLE_INDICATOR = 39;
/**
* Represents a picture. Is is used for xul:image, html:img.
*/
const unsigned long ROLE_GRAPHIC = 40;
/**
* Represents read-only text, such as labels for other controls or
* instructions in a dialog box. Static text cannot be modified or selected.
* Is is used for xul:label, xul:description, html:lablel,
* role="wairole:label" or role="wairole:description", xforms:output.
*/
const unsigned long ROLE_STATICTEXT = 41;
/**
* Represents selectable text that allows edits or is designated read-only.
*/
const unsigned long ROLE_TEXT_LEAF = 42;
/**
* Represents a push button control. It is used for xul:button, html:button,
* role="wairole:button", xforms:trigger, xforms:submit.
*/
const unsigned long ROLE_PUSHBUTTON = 43;
/**
* Represents a check box control. It is used for xul:checkbox,
* html:input@type="checkbox", role="wairole:checkbox", boolean xforms:input.
*/
const unsigned long ROLE_CHECKBUTTON = 44;
/**
* Represents an option button, also called a radio button. It is one of a
* group of mutually exclusive options. All objects sharing a single parent
* that have this attribute are assumed to be part of single mutually
* exclusive group. It is used for xul:radio, html:input@type="radio",
* role="wairole:radio".
*/
const unsigned long ROLE_RADIOBUTTON = 45;
/**
* Represents a combo box; an edit control with an associated list box that
* provides a set of predefined choices. It is used for html:select,
* xul:menulist, role="wairole:combobox".
*/
const unsigned long ROLE_COMBOBOX = 46;
/**
* Represents the calendar control. It is used for date xforms:input.
*/
const unsigned long ROLE_DROPLIST = 47;
/**
* Represents a progress bar, dynamically showing the user the percent
* complete of an operation in progress. It is used for xul:progressmeter,
* role="wairole:progressbar".
*/
const unsigned long ROLE_PROGRESSBAR = 48;
/**
* Represents a dial or knob whose purpose is to allow a user to set a value.
*/
const unsigned long ROLE_DIAL = 49;
/**
* Represents a hot-key field that allows the user to enter a combination or
* sequence of keystrokes.
*/
const unsigned long ROLE_HOTKEYFIELD = 50;
/**
* Represents a slider, which allows the user to adjust a setting in given
* increments between minimum and maximum values. It is used by xul:scale,
* role="wairole:slider", xforms:range.
*/
const unsigned long ROLE_SLIDER = 51;
/**
* Represents a spin box, which is a control that allows the user to increment
* or decrement the value displayed in a separate "buddy" control associated
* with the spin box. It is used for xul:spinbuttons.
*/
const unsigned long ROLE_SPINBUTTON = 52;
/**
* Represents a graphical image used to diagram data. It is used for svg:svg.
*/
const unsigned long ROLE_DIAGRAM = 53;
/**
* Represents an animation control, which contains content that changes over
* time, such as a control that displays a series of bitmap frames.
*/
const unsigned long ROLE_ANIMATION = 54;
/**
* Represents a mathematical equation. It is used by MATHML.
*/
const unsigned long ROLE_EQUATION = 55;
/**
* Represents a button that drops down a list of items.
*/
const unsigned long ROLE_BUTTONDROPDOWN = 56;
/**
* Represents a button that drops down a menu.
*/
const unsigned long ROLE_BUTTONMENU = 57;
/**
* Represents a button that drops down a grid. It is used for xul:colorpicker.
*/
const unsigned long ROLE_BUTTONDROPDOWNGRID = 58;
/**
* Represents blank space between other objects.
*/
const unsigned long ROLE_WHITESPACE = 59;
/**
* Represents a container of page tab controls. Is it used for xul:tabs,
* DHTML: role="wairole:tabs". Also refer to ROLE_PAGETAB.
*/
const unsigned long ROLE_PAGETABLIST = 60;
/**
* Represents a control that displays time.
*/
const unsigned long ROLE_CLOCK = 61;
/**
* Represents a button on a toolbar that has a drop-down list icon directly
* adjacent to the button.
*/
const unsigned long ROLE_SPLITBUTTON = 62;
/**
* Represents an edit control designed for an Internet Protocol (IP) address.
* The edit control is divided into sections for the different parts of the
* IP address.
*/
const unsigned long ROLE_IPADDRESS = 63;
/**
* Represents a label control that has an accelerator.
*/
const unsigned long ROLE_ACCEL_LABEL = 64;
/**
* Represents an arrow in one of the four cardinal directions.
*/
const unsigned long ROLE_ARROW = 65;
/**
* Represents a control that can be drawn into and is used to trap events.
* It is used for html:canvas.
*/
const unsigned long ROLE_CANVAS = 66;
/**
* Represents a menu item with a check box.
*/
const unsigned long ROLE_CHECK_MENU_ITEM = 67;
/**
* Represents a specialized dialog that lets the user choose a color.
*/
const unsigned long ROLE_COLOR_CHOOSER = 68;
/**
* Represents control whose purpose is to allow a user to edit a date.
*/
const unsigned long ROLE_DATE_EDITOR = 69;
/**
* An iconified internal frame in an ROLE_DESKTOP_PANE. Also refer to
* ROLE_INTERNAL_FRAME.
*/
const unsigned long ROLE_DESKTOP_ICON = 70;
/**
* A desktop pane. A pane that supports internal frames and iconified
* versions of those internal frames.
*/
const unsigned long ROLE_DESKTOP_FRAME = 71;
/**
* A directory pane. A pane that allows the user to navigate through
* and select the contents of a directory. May be used by a file chooser.
* Also refer to ROLE_FILE_CHOOSER.
*/
const unsigned long ROLE_DIRECTORY_PANE = 72;
/**
* A file chooser. A specialized dialog that displays the files in the
* directory and lets the user select a file, browse a different directory,
* or specify a filename. May use the directory pane to show the contents of
* a directory. Also refer to ROLE_DIRECTORY_PANE.
*/
const unsigned long ROLE_FILE_CHOOSER = 73;
/**
* A font chooser. A font chooser is a component that lets the user pick
* various attributes for fonts.
*/
const unsigned long ROLE_FONT_CHOOSER = 74;
/**
* Frame role. A top level window with a title bar, border, menu bar, etc.
* It is often used as the primary window for an application.
*/
const unsigned long ROLE_CHROME_WINDOW = 75;
/**
* A glass pane. A pane that is guaranteed to be painted on top of all
* panes beneath it. Also refer to ROLE_ROOT_PANE.
*/
const unsigned long ROLE_GLASS_PANE = 76;
/**
* A document container for HTML, whose children represent the document
* content.
*/
const unsigned long ROLE_HTML_CONTAINER = 77;
/**
* A small fixed size picture, typically used to decorate components.
*/
const unsigned long ROLE_ICON = 78;
/**
* Presents an icon or short string in an interface.
*/
const unsigned long ROLE_LABEL = 79;
/**
* A layered pane. A specialized pane that allows its children to be drawn
* in layers, providing a form of stacking order. This is usually the pane
* that holds the menu bar as well as the pane that contains most of the
* visual components in a window. Also refer to ROLE_GLASS_PANE and
* ROLE_ROOT_PANE.
*/
const unsigned long ROLE_LAYERED_PANE = 80;
/**
* A specialized pane whose primary use is inside a dialog.
*/
const unsigned long ROLE_OPTION_PANE = 81;
/**
* A text object uses for passwords, or other places where the text content
* is not shown visibly to the user.
*/
const unsigned long ROLE_PASSWORD_TEXT = 82;
/**
* A temporary window that is usually used to offer the user a list of
* choices, and then hides when the user selects one of those choices.
*/
const unsigned long ROLE_POPUP_MENU = 83;
/**
* A radio button that is a menu item.
*/
const unsigned long ROLE_RADIO_MENU_ITEM = 84;
/**
* A root pane. A specialized pane that has a glass pane and a layered pane
* as its children. Also refer to ROLE_GLASS_PANE and ROLE_LAYERED_PANE.
*/
const unsigned long ROLE_ROOT_PANE = 85;
/**
* A scroll pane. An object that allows a user to incrementally view a large
* amount of information. Its children can include scroll bars and a
* viewport. Also refer to ROLE_VIEW_PORT.
*/
const unsigned long ROLE_SCROLL_PANE = 86;
/**
* A split pane. A specialized panel that presents two other panels at the
* same time. Between the two panels is a divider the user can manipulate to
* make one panel larger and the other panel smaller.
*/
const unsigned long ROLE_SPLIT_PANE = 87;
/**
* The header for a column of a table.
* XXX: it looks this role is dupe of ROLE_COLUMNHEADER.
*/
const unsigned long ROLE_TABLE_COLUMN_HEADER = 88;
/**
* The header for a row of a table.
* XXX: it looks this role is dupe of ROLE_ROWHEADER
*/
const unsigned long ROLE_TABLE_ROW_HEADER = 89;
/**
* A menu item used to tear off and reattach its menu.
*/
const unsigned long ROLE_TEAR_OFF_MENU_ITEM = 90;
/**
* Represents an accessible terminal.
*/
const unsigned long ROLE_TERMINAL = 91;
/**
* Collection of objects that constitute a logical text entity.
*/
const unsigned long ROLE_TEXT_CONTAINER = 92;
/**
* A toggle button. A specialized push button that can be checked or
* unchecked, but does not provide a separate indicator for the current state.
*/
const unsigned long ROLE_TOGGLE_BUTTON = 93;
/**
* Representas a control that is capable of expanding and collapsing rows as
* well as showing multiple columns of data.
* XXX: it looks like this role is dupe of ROLE_OUTLINE.
*/
const unsigned long ROLE_TREE_TABLE = 94;
/**
* A viewport. An object usually used in a scroll pane. It represents the
* portion of the entire data that the user can see. As the user manipulates
* the scroll bars, the contents of the viewport can change. Also refer to
* ROLE_SCROLL_PANE.
*/
const unsigned long ROLE_VIEWPORT = 95;
/**
* Header of a document page. Also refer to ROLE_FOOTER.
*/
const unsigned long ROLE_HEADER = 96;
/**
* Footer of a document page. Also refer to ROLE_HEADER.
*/
const unsigned long ROLE_FOOTER = 97;
/**
* A paragraph of text.
*/
const unsigned long ROLE_PARAGRAPH = 98;
/**
* A ruler such as those used in word processors.
*/
const unsigned long ROLE_RULER = 99;
/**
* A text entry having dialog or list containing items for insertion into
* an entry widget, for instance a list of words for completion of a
* text entry. It is used for xul:textbox@autocomplete
*/
const unsigned long ROLE_AUTOCOMPLETE = 100;
/**
* An editable text object in a toolbar.
*/
const unsigned long ROLE_EDITBAR = 101;
/**
* An control whose textual content may be entered or modified by the user.
*/
const unsigned long ROLE_ENTRY = 102;
/**
* A caption describing another object.
*/
const unsigned long ROLE_CAPTION = 103;
/**
* A visual frame or container which contains a view of document content.
* Document frames may occur within another Document instance, in which case
* the second document may be said to be embedded in the containing instance.
* HTML frames are often ROLE_DOCUMENT_FRAME. Either this object, or a
* singleton descendant, should implement the Document interface.
*/
const unsigned long ROLE_DOCUMENT_FRAME = 104;
/**
* Heading.
*/
const unsigned long ROLE_HEADING = 105;
/**
* An object representing a page of document content. It is used in documents
* which are accessed by the user on a page by page basis.
*/
const unsigned long ROLE_PAGE = 106;
/**
* A container of document content. An example of the use of this role is to
* represent an html:div.
*/
const unsigned long ROLE_SECTION = 107;
/**
* An object which is redundant with another object in the accessible
* hierarchy. ATs typically ignore objects with this role.
*/
const unsigned long ROLE_REDUNDANT_OBJECT = 108;
/**
* A container of form controls. An example of the use of this role is to
* represent an html:form.
*/
const unsigned long ROLE_FORM = 109;
/**
* An object which is used to allow input of characters not found on a
* keyboard, such as the input of Chinese characters on a Western keyboard.
*/
const unsigned long ROLE_IME = 110;
/**
* XXX: document this.
*/
const unsigned long ROLE_APP_ROOT = 111;
/**
* Represents a menu item, which is an entry in a menu that a user can choose
* to display another menu.
*/
const unsigned long ROLE_PARENT_MENUITEM = 112;
/**
* A calendar that allows the user to select a date.
*/
const unsigned long ROLE_CALENDAR = 113;
/**
* A list of items that is shown by combobox.
*/
const unsigned long ROLE_COMBOBOX_LIST = 114;
/**
* A item of list that is shown by combobox;
*/
const unsigned long ROLE_COMBOBOX_LISTITEM = 115;
/**
* It's not role actually. This contanst is important to help ensure
* nsRoleMap's are synchronized.
*/
const unsigned long ROLE_LAST_ENTRY = 116;
};

View File

@ -704,7 +704,7 @@ getRoleCB(AtkObject *aAtkObj)
NS_ENSURE_SUCCESS(rv, ATK_ROLE_INVALID);
atkRole = atkRoleMap[accRole]; // map to the actual value
NS_ASSERTION(atkRoleMap[nsIAccessible::ROLE_LAST_ENTRY] ==
NS_ASSERTION(atkRoleMap[nsIAccessibleRole::ROLE_LAST_ENTRY] ==
kROLE_ATK_LAST_ENTRY, "ATK role map skewed");
aAtkObj->role = NS_STATIC_CAST(AtkRole, atkRole);
}

View File

@ -616,7 +616,7 @@ NS_IMETHODIMP nsAppRootAccessible::GetDescription(nsAString& aDescription)
NS_IMETHODIMP nsAppRootAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_APP_ROOT;
*aRole = nsIAccessibleRole::ROLE_APP_ROOT;
return NS_OK;
}

View File

@ -45,123 +45,123 @@ const PRUint32 kROLE_ATK_LAST_ENTRY = 0xffffffff;
// Map array from cross platform roles to ATK roles
static const PRUint32 atkRoleMap[] = {
// Cross Platform Roles #
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_NOTHING 0
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_TITLEBAR 1
ATK_ROLE_MENU_BAR, // nsIAccessible::ROLE_MENUBAR 2
ATK_ROLE_SCROLL_BAR, // nsIAccessible::ROLE_SCROLLBAR 3
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_GRIP 4
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_SOUND 5
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_CURSOR 6
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_CARET 7
ATK_ROLE_ALERT, // nsIAccessible::ROLE_ALERT 8
ATK_ROLE_WINDOW, // nsIAccessible::ROLE_WINDOW 9
ATK_ROLE_PANEL, // nsIAccessible::ROLE_CLIENT 10
ATK_ROLE_MENU, // nsIAccessible::ROLE_MENUPOPUP 11
ATK_ROLE_MENU_ITEM, // nsIAccessible::ROLE_MENUITEM 12
ATK_ROLE_TOOL_TIP, // nsIAccessible::ROLE_TOOLTIP 13
ATK_ROLE_EMBEDDED, // nsIAccessible::ROLE_APPLICATION 14
ATK_ROLE_DOCUMENT_FRAME, // nsIAccessible::ROLE_DOCUMENT 15
ATK_ROLE_PANEL, // nsIAccessible::ROLE_PANE 16
ATK_ROLE_CHART, // nsIAccessible::ROLE_CHART 17
ATK_ROLE_DIALOG, // nsIAccessible::ROLE_DIALOG 18
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_BORDER 19
ATK_ROLE_PANEL, // nsIAccessible::ROLE_GROUPING 20
ATK_ROLE_SEPARATOR, // nsIAccessible::ROLE_SEPARATOR 21
ATK_ROLE_TOOL_BAR, // nsIAccessible::ROLE_TOOLBAR 22
ATK_ROLE_STATUSBAR, // nsIAccessible::ROLE_STATUSBAR 23
ATK_ROLE_TABLE, // nsIAccessible::ROLE_TABLE 24
ATK_ROLE_COLUMN_HEADER, // nsIAccessible::ROLE_COLUMNHEADER 25
ATK_ROLE_ROW_HEADER, // nsIAccessible::ROLE_ROWHEADER 26
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_COLUMN 27
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_ROW 28
ATK_ROLE_TABLE_CELL, // nsIAccessible::ROLE_CELL 29
ATK_ROLE_LINK, // nsIAccessible::ROLE_LINK 30
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_HELPBALLOON 31
ATK_ROLE_IMAGE, // nsIAccessible::ROLE_CHARACTER 32
ATK_ROLE_LIST, // nsIAccessible::ROLE_LIST 33
ATK_ROLE_LIST_ITEM, // nsIAccessible::ROLE_LISTITEM 34
ATK_ROLE_TREE, // nsIAccessible::ROLE_OUTLINE 35
ATK_ROLE_LIST_ITEM, // nsIAccessible::ROLE_OUTLINEITEM 36
ATK_ROLE_PAGE_TAB, // nsIAccessible::ROLE_PAGETAB 37
ATK_ROLE_SCROLL_PANE, // nsIAccessible::ROLE_PROPERTYPAGE 38
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_INDICATOR 39
ATK_ROLE_IMAGE, // nsIAccessible::ROLE_GRAPHIC 40
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_STATICTEXT 41
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_TEXT_LEAF 42
ATK_ROLE_PUSH_BUTTON, // nsIAccessible::ROLE_PUSHBUTTON 43
ATK_ROLE_CHECK_BOX, // nsIAccessible::ROLE_CHECKBUTTON 44
ATK_ROLE_RADIO_BUTTON, // nsIAccessible::ROLE_RADIOBUTTON 45
ATK_ROLE_COMBO_BOX, // nsIAccessible::ROLE_COMBOBOX 46
ATK_ROLE_COMBO_BOX, // nsIAccessible::ROLE_DROPLIST 47
ATK_ROLE_PROGRESS_BAR, // nsIAccessible::ROLE_PROGRESSBAR 48
ATK_ROLE_DIAL, // nsIAccessible::ROLE_DIAL 49
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_HOTKEYFIELD 50
ATK_ROLE_SLIDER, // nsIAccessible::ROLE_SLIDER 51
ATK_ROLE_SPIN_BUTTON, // nsIAccessible::ROLE_SPINBUTTON 52
ATK_ROLE_IMAGE, // nsIAccessible::ROLE_DIAGRAM 53
ATK_ROLE_ANIMATION, // nsIAccessible::ROLE_ANIMATION 54
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_EQUATION 55
ATK_ROLE_PUSH_BUTTON, // nsIAccessible::ROLE_BUTTONDROPDOWN 56
ATK_ROLE_PUSH_BUTTON, // nsIAccessible::ROLE_BUTTONMENU 57
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_BUTTONDROPDOWNGRID 58
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_WHITESPACE 59
ATK_ROLE_PAGE_TAB_LIST, // nsIAccessible::ROLE_PAGETABLIST 60
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_CLOCK 61
ATK_ROLE_PUSH_BUTTON, // nsIAccessible::ROLE_SPLITBUTTON 62
ATK_ROLE_UNKNOWN, // nsIAccessible::ROLE_IPADDRESS 63
ATK_ROLE_ACCEL_LABEL, // nsIAccessible::ROLE_ACCEL_LABEL 64
ATK_ROLE_ARROW, // nsIAccessible::ROLE_ARROW 65
ATK_ROLE_CANVAS, // nsIAccessible::ROLE_CANVAS 66
ATK_ROLE_CHECK_MENU_ITEM, // nsIAccessible::ROLE_CHECK_MENU_ITEM 67
ATK_ROLE_COLOR_CHOOSER, // nsIAccessible::ROLE_COLOR_CHOOSER 68
ATK_ROLE_DATE_EDITOR, // nsIAccessible::ROLE_DATE_EDITOR 69
ATK_ROLE_DESKTOP_ICON, // nsIAccessible::ROLE_DESKTOP_ICON 70
ATK_ROLE_DESKTOP_FRAME, // nsIAccessible::ROLE_DESKTOP_FRAME 71
ATK_ROLE_DIRECTORY_PANE, // nsIAccessible::ROLE_DIRECTORY_PANE 72
ATK_ROLE_FILE_CHOOSER, // nsIAccessible::ROLE_FILE_CHOOSER 73
ATK_ROLE_FONT_CHOOSER, // nsIAccessible::ROLE_FONT_CHOOSER 74
ATK_ROLE_FRAME, // nsIAccessible::ROLE_CHROME_WINDOW 75
ATK_ROLE_GLASS_PANE, // nsIAccessible::ROLE_GLASS_PANE 76
ATK_ROLE_HTML_CONTAINER, // nsIAccessible::ROLE_HTML_CONTAINER 77
ATK_ROLE_ICON, // nsIAccessible::ROLE_ICON 78
ATK_ROLE_LABEL, // nsIAccessible::ROLE_LABEL 79
ATK_ROLE_LAYERED_PANE, // nsIAccessible::ROLE_LAYERED_PANE 80
ATK_ROLE_OPTION_PANE, // nsIAccessible::ROLE_OPTION_PANE 81
ATK_ROLE_PASSWORD_TEXT, // nsIAccessible::ROLE_PASSWORD_TEXT 82
ATK_ROLE_POPUP_MENU, // nsIAccessible::ROLE_POPUP_MENU 83
ATK_ROLE_RADIO_MENU_ITEM, // nsIAccessible::ROLE_RADIO_MENU_ITEM 84
ATK_ROLE_ROOT_PANE, // nsIAccessible::ROLE_ROOT_PANE 85
ATK_ROLE_SCROLL_PANE, // nsIAccessible::ROLE_SCROLL_PANE 86
ATK_ROLE_SPLIT_PANE, // nsIAccessible::ROLE_SPLIT_PANE 87
ATK_ROLE_TABLE_COLUMN_HEADER, // nsIAccessible::ROLE_TABLE_COLUMN_HEADER 88
ATK_ROLE_TABLE_ROW_HEADER, // nsIAccessible::ROLE_TABLE_ROW_HEADER 89
ATK_ROLE_TEAR_OFF_MENU_ITEM, // nsIAccessible::ROLE_TEAR_OFF_MENU_ITEM 90
ATK_ROLE_TERMINAL, // nsIAccessible::ROLE_TERMINAL 91
ATK_ROLE_TEXT, // nsIAccessible::ROLE_TEXT_CONTAINER 92
ATK_ROLE_TOGGLE_BUTTON, // nsIAccessible::ROLE_TOGGLE_BUTTON 93
ATK_ROLE_TREE_TABLE, // nsIAccessible::ROLE_TREE_TABLE 94
ATK_ROLE_VIEWPORT, // nsIAccessible::ROLE_VIEWPORT 95
ATK_ROLE_HEADER, // nsIAccessible::ROLE_HEADER 96
ATK_ROLE_FOOTER, // nsIAccessible::ROLE_FOOTER 97
ATK_ROLE_PARAGRAPH, // nsIAccessible::ROLE_PARAGRAPH 98
ATK_ROLE_RULER, // nsIAccessible::ROLE_RULER 99
ATK_ROLE_AUTOCOMPLETE, // nsIAccessible::ROLE_AUTOCOMPLETE 100
ATK_ROLE_EDITBAR, // nsIAccessible::ROLE_EDITBAR 101
ATK_ROLE_ENTRY, // nsIAccessible::ROLE_ENTRY 102
ATK_ROLE_CAPTION, // nsIAccessible::ROLE_CAPTION 103
ATK_ROLE_DOCUMENT_FRAME, // nsIAccessible::ROLE_DOCUMENT_FRAME 104
ATK_ROLE_HEADING, // nsIAccessible::ROLE_HEADING 105
ATK_ROLE_PAGE, // nsIAccessible::ROLE_PAGE 106
ATK_ROLE_SECTION, // nsIAccessible::ROLE_SECTION 107
ATK_ROLE_REDUNDANT_OBJECT, // nsIAccessible::ROLE_REDUNDANT_OBJECT 108
ATK_ROLE_FORM, // nsIAccessible::ROLE_FORM 109
ATK_ROLE_INPUT_METHOD_WINDOW, // nsIAccessible::ROLE_IME 110
ATK_ROLE_APPLICATION, // nsIAccessible::ROLE_APP_ROOT 111
ATK_ROLE_MENU, // nsIAccessible::ROLE_PARENT_MENUITEM 112
ATK_ROLE_CALENDAR, // nsIAccessible::ROLE_CALENDAR 113
ATK_ROLE_MENU, // nsIAccessible::ROLE_COMBOBOX_LIST 114
ATK_ROLE_MENU_ITEM, // nsIAccessible::ROLE_COMBOBOX_LISTITEM 115
kROLE_ATK_LAST_ENTRY // nsIAccessible::ROLE_LAST_ENTRY
// Cross Platform Roles #
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_NOTHING 0
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_TITLEBAR 1
ATK_ROLE_MENU_BAR, // nsIAccessibleRole::ROLE_MENUBAR 2
ATK_ROLE_SCROLL_BAR, // nsIAccessibleRole::ROLE_SCROLLBAR 3
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_GRIP 4
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_SOUND 5
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_CURSOR 6
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_CARET 7
ATK_ROLE_ALERT, // nsIAccessibleRole::ROLE_ALERT 8
ATK_ROLE_WINDOW, // nsIAccessibleRole::ROLE_WINDOW 9
ATK_ROLE_PANEL, // nsIAccessibleRole::ROLE_CLIENT 10
ATK_ROLE_MENU, // nsIAccessibleRole::ROLE_MENUPOPUP 11
ATK_ROLE_MENU_ITEM, // nsIAccessibleRole::ROLE_MENUITEM 12
ATK_ROLE_TOOL_TIP, // nsIAccessibleRole::ROLE_TOOLTIP 13
ATK_ROLE_EMBEDDED, // nsIAccessibleRole::ROLE_APPLICATION 14
ATK_ROLE_DOCUMENT_FRAME, // nsIAccessibleRole::ROLE_DOCUMENT 15
ATK_ROLE_PANEL, // nsIAccessibleRole::ROLE_PANE 16
ATK_ROLE_CHART, // nsIAccessibleRole::ROLE_CHART 17
ATK_ROLE_DIALOG, // nsIAccessibleRole::ROLE_DIALOG 18
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_BORDER 19
ATK_ROLE_PANEL, // nsIAccessibleRole::ROLE_GROUPING 20
ATK_ROLE_SEPARATOR, // nsIAccessibleRole::ROLE_SEPARATOR 21
ATK_ROLE_TOOL_BAR, // nsIAccessibleRole::ROLE_TOOLBAR 22
ATK_ROLE_STATUSBAR, // nsIAccessibleRole::ROLE_STATUSBAR 23
ATK_ROLE_TABLE, // nsIAccessibleRole::ROLE_TABLE 24
ATK_ROLE_COLUMN_HEADER, // nsIAccessibleRole::ROLE_COLUMNHEADER 25
ATK_ROLE_ROW_HEADER, // nsIAccessibleRole::ROLE_ROWHEADER 26
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_COLUMN 27
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_ROW 28
ATK_ROLE_TABLE_CELL, // nsIAccessibleRole::ROLE_CELL 29
ATK_ROLE_LINK, // nsIAccessibleRole::ROLE_LINK 30
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_HELPBALLOON 31
ATK_ROLE_IMAGE, // nsIAccessibleRole::ROLE_CHARACTER 32
ATK_ROLE_LIST, // nsIAccessibleRole::ROLE_LIST 33
ATK_ROLE_LIST_ITEM, // nsIAccessibleRole::ROLE_LISTITEM 34
ATK_ROLE_TREE, // nsIAccessibleRole::ROLE_OUTLINE 35
ATK_ROLE_LIST_ITEM, // nsIAccessibleRole::ROLE_OUTLINEITEM 36
ATK_ROLE_PAGE_TAB, // nsIAccessibleRole::ROLE_PAGETAB 37
ATK_ROLE_SCROLL_PANE, // nsIAccessibleRole::ROLE_PROPERTYPAGE 38
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_INDICATOR 39
ATK_ROLE_IMAGE, // nsIAccessibleRole::ROLE_GRAPHIC 40
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_STATICTEXT 41
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_TEXT_LEAF 42
ATK_ROLE_PUSH_BUTTON, // nsIAccessibleRole::ROLE_PUSHBUTTON 43
ATK_ROLE_CHECK_BOX, // nsIAccessibleRole::ROLE_CHECKBUTTON 44
ATK_ROLE_RADIO_BUTTON, // nsIAccessibleRole::ROLE_RADIOBUTTON 45
ATK_ROLE_COMBO_BOX, // nsIAccessibleRole::ROLE_COMBOBOX 46
ATK_ROLE_COMBO_BOX, // nsIAccessibleRole::ROLE_DROPLIST 47
ATK_ROLE_PROGRESS_BAR, // nsIAccessibleRole::ROLE_PROGRESSBAR 48
ATK_ROLE_DIAL, // nsIAccessibleRole::ROLE_DIAL 49
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_HOTKEYFIELD 50
ATK_ROLE_SLIDER, // nsIAccessibleRole::ROLE_SLIDER 51
ATK_ROLE_SPIN_BUTTON, // nsIAccessibleRole::ROLE_SPINBUTTON 52
ATK_ROLE_IMAGE, // nsIAccessibleRole::ROLE_DIAGRAM 53
ATK_ROLE_ANIMATION, // nsIAccessibleRole::ROLE_ANIMATION 54
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_EQUATION 55
ATK_ROLE_PUSH_BUTTON, // nsIAccessibleRole::ROLE_BUTTONDROPDOWN 56
ATK_ROLE_PUSH_BUTTON, // nsIAccessibleRole::ROLE_BUTTONMENU 57
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_BUTTONDROPDOWNGRID 58
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_WHITESPACE 59
ATK_ROLE_PAGE_TAB_LIST, // nsIAccessibleRole::ROLE_PAGETABLIST 60
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_CLOCK 61
ATK_ROLE_PUSH_BUTTON, // nsIAccessibleRole::ROLE_SPLITBUTTON 62
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_IPADDRESS 63
ATK_ROLE_ACCEL_LABEL, // nsIAccessibleRole::ROLE_ACCEL_LABEL 64
ATK_ROLE_ARROW, // nsIAccessibleRole::ROLE_ARROW 65
ATK_ROLE_CANVAS, // nsIAccessibleRole::ROLE_CANVAS 66
ATK_ROLE_CHECK_MENU_ITEM, // nsIAccessibleRole::ROLE_CHECK_MENU_ITEM 67
ATK_ROLE_COLOR_CHOOSER, // nsIAccessibleRole::ROLE_COLOR_CHOOSER 68
ATK_ROLE_DATE_EDITOR, // nsIAccessibleRole::ROLE_DATE_EDITOR 69
ATK_ROLE_DESKTOP_ICON, // nsIAccessibleRole::ROLE_DESKTOP_ICON 70
ATK_ROLE_DESKTOP_FRAME, // nsIAccessibleRole::ROLE_DESKTOP_FRAME 71
ATK_ROLE_DIRECTORY_PANE, // nsIAccessibleRole::ROLE_DIRECTORY_PANE 72
ATK_ROLE_FILE_CHOOSER, // nsIAccessibleRole::ROLE_FILE_CHOOSER 73
ATK_ROLE_FONT_CHOOSER, // nsIAccessibleRole::ROLE_FONT_CHOOSER 74
ATK_ROLE_FRAME, // nsIAccessibleRole::ROLE_CHROME_WINDOW 75
ATK_ROLE_GLASS_PANE, // nsIAccessibleRole::ROLE_GLASS_PANE 76
ATK_ROLE_HTML_CONTAINER, // nsIAccessibleRole::ROLE_HTML_CONTAINER 77
ATK_ROLE_ICON, // nsIAccessibleRole::ROLE_ICON 78
ATK_ROLE_LABEL, // nsIAccessibleRole::ROLE_LABEL 79
ATK_ROLE_LAYERED_PANE, // nsIAccessibleRole::ROLE_LAYERED_PANE 80
ATK_ROLE_OPTION_PANE, // nsIAccessibleRole::ROLE_OPTION_PANE 81
ATK_ROLE_PASSWORD_TEXT, // nsIAccessibleRole::ROLE_PASSWORD_TEXT 82
ATK_ROLE_POPUP_MENU, // nsIAccessibleRole::ROLE_POPUP_MENU 83
ATK_ROLE_RADIO_MENU_ITEM, // nsIAccessibleRole::ROLE_RADIO_MENU_ITEM 84
ATK_ROLE_ROOT_PANE, // nsIAccessibleRole::ROLE_ROOT_PANE 85
ATK_ROLE_SCROLL_PANE, // nsIAccessibleRole::ROLE_SCROLL_PANE 86
ATK_ROLE_SPLIT_PANE, // nsIAccessibleRole::ROLE_SPLIT_PANE 87
ATK_ROLE_TABLE_COLUMN_HEADER, // nsIAccessibleRole::ROLE_TABLE_COLUMN_HEADER 88
ATK_ROLE_TABLE_ROW_HEADER, // nsIAccessibleRole::ROLE_TABLE_ROW_HEADER 89
ATK_ROLE_TEAR_OFF_MENU_ITEM, // nsIAccessibleRole::ROLE_TEAR_OFF_MENU_ITEM 90
ATK_ROLE_TERMINAL, // nsIAccessibleRole::ROLE_TERMINAL 91
ATK_ROLE_TEXT, // nsIAccessibleRole::ROLE_TEXT_CONTAINER 92
ATK_ROLE_TOGGLE_BUTTON, // nsIAccessibleRole::ROLE_TOGGLE_BUTTON 93
ATK_ROLE_TREE_TABLE, // nsIAccessibleRole::ROLE_TREE_TABLE 94
ATK_ROLE_VIEWPORT, // nsIAccessibleRole::ROLE_VIEWPORT 95
ATK_ROLE_HEADER, // nsIAccessibleRole::ROLE_HEADER 96
ATK_ROLE_FOOTER, // nsIAccessibleRole::ROLE_FOOTER 97
ATK_ROLE_PARAGRAPH, // nsIAccessibleRole::ROLE_PARAGRAPH 98
ATK_ROLE_RULER, // nsIAccessibleRole::ROLE_RULER 99
ATK_ROLE_AUTOCOMPLETE, // nsIAccessibleRole::ROLE_AUTOCOMPLETE 100
ATK_ROLE_EDITBAR, // nsIAccessibleRole::ROLE_EDITBAR 101
ATK_ROLE_ENTRY, // nsIAccessibleRole::ROLE_ENTRY 102
ATK_ROLE_CAPTION, // nsIAccessibleRole::ROLE_CAPTION 103
ATK_ROLE_DOCUMENT_FRAME, // nsIAccessibleRole::ROLE_DOCUMENT_FRAME 104
ATK_ROLE_HEADING, // nsIAccessibleRole::ROLE_HEADING 105
ATK_ROLE_PAGE, // nsIAccessibleRole::ROLE_PAGE 106
ATK_ROLE_SECTION, // nsIAccessibleRole::ROLE_SECTION 107
ATK_ROLE_REDUNDANT_OBJECT, // nsIAccessibleRole::ROLE_REDUNDANT_OBJECT 108
ATK_ROLE_FORM, // nsIAccessibleRole::ROLE_FORM 109
ATK_ROLE_INPUT_METHOD_WINDOW, // nsIAccessibleRole::ROLE_IME 110
ATK_ROLE_APPLICATION, // nsIAccessibleRole::ROLE_APP_ROOT 111
ATK_ROLE_MENU, // nsIAccessibleRole::ROLE_PARENT_MENUITEM 112
ATK_ROLE_CALENDAR, // nsIAccessibleRole::ROLE_CALENDAR 113
ATK_ROLE_MENU, // nsIAccessibleRole::ROLE_COMBOBOX_LIST 114
ATK_ROLE_MENU_ITEM, // nsIAccessibleRole::ROLE_COMBOBOX_LISTITEM 115
kROLE_ATK_LAST_ENTRY // nsIAccessibleRole::ROLE_LAST_ENTRY
};

View File

@ -1194,11 +1194,13 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
if (!newAcc && !content->IsNodeOfType(nsINode::eHTML)) {
if (content->GetNameSpaceID() == kNameSpaceID_SVG &&
content->Tag() == nsAccessibilityAtoms::svg) {
newAcc = new nsEnumRoleAccessible(aNode, aWeakShell, nsIAccessible::ROLE_DIAGRAM);
newAcc = new nsEnumRoleAccessible(aNode, aWeakShell,
nsIAccessibleRole::ROLE_DIAGRAM);
}
else if (content->GetNameSpaceID() == kNameSpaceID_MathML &&
content->Tag() == nsAccessibilityAtoms::math) {
newAcc = new nsEnumRoleAccessible(aNode, aWeakShell, nsIAccessible::ROLE_EQUATION);
newAcc = new nsEnumRoleAccessible(aNode, aWeakShell,
nsIAccessibleRole::ROLE_EQUATION);
}
} else if (!newAcc) { // HTML accessibles
// Prefer to use markup (mostly tag name, perhaps attributes) to

View File

@ -1282,7 +1282,7 @@ nsAccessible::GetMultiSelectFor(nsIDOMNode *aNode)
nsIAccessible *current = accessible;
current->GetParent(getter_AddRefs(accessible));
if (!accessible || (NS_SUCCEEDED(accessible->GetFinalRole(&containerRole)) &&
containerRole == ROLE_PANE)) {
containerRole == nsIAccessibleRole::ROLE_PANE)) {
return nsnull;
}
accessible->GetFinalState(&state);
@ -1860,104 +1860,104 @@ nsRoleMapEntry nsAccessible::gWAIRoleMap[] =
// Using RDF will also allow for role extensibility. See bug 280138.
// XXX Should we store attribute names in this table as atoms instead of strings?
// Definition of nsRoleMapEntry and nsStateMapEntry contains comments explaining this table.
{"alert", ROLE_ALERT, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"alertdialog", ROLE_ALERT, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"application", ROLE_APPLICATION, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"button", ROLE_PUSHBUTTON, eNameOkFromChildren, eNoValue, eNoReqStates,
{"alert", nsIAccessibleRole::ROLE_ALERT, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"alertdialog", nsIAccessibleRole::ROLE_ALERT, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"application", nsIAccessibleRole::ROLE_APPLICATION, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"button", nsIAccessibleRole::ROLE_PUSHBUTTON, eNameOkFromChildren, eNoValue, eNoReqStates,
{"pressed", BOOL_STATE, STATE_PRESSED},
{"haspopup", BOOL_STATE, STATE_HASPOPUP}, END_ENTRY},
{"buttonsubmit", ROLE_PUSHBUTTON, eNameOkFromChildren, eNoValue, STATE_DEFAULT, END_ENTRY},
{"buttoncancel", ROLE_PUSHBUTTON, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"checkbox", ROLE_CHECKBUTTON, eNameOkFromChildren, eNoValue, STATE_CHECKABLE,
{"buttonsubmit", nsIAccessibleRole::ROLE_PUSHBUTTON, eNameOkFromChildren, eNoValue, STATE_DEFAULT, END_ENTRY},
{"buttoncancel", nsIAccessibleRole::ROLE_PUSHBUTTON, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"checkbox", nsIAccessibleRole::ROLE_CHECKBUTTON, eNameOkFromChildren, eNoValue, STATE_CHECKABLE,
{"checked", BOOL_STATE, STATE_CHECKED},
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY},
{"checkboxtristate", ROLE_CHECKBUTTON, eNameOkFromChildren, eNoValue, STATE_CHECKABLE,
{"checkboxtristate", nsIAccessibleRole::ROLE_CHECKBUTTON, eNameOkFromChildren, eNoValue, STATE_CHECKABLE,
{"checked", BOOL_STATE, STATE_CHECKED},
{"checked", "mixed", STATE_MIXED},
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY},
{"columnheader", ROLE_COLUMNHEADER, eNameOkFromChildren, eNoValue, eNoReqStates,
{"columnheader", nsIAccessibleRole::ROLE_COLUMNHEADER, eNameOkFromChildren, eNoValue, eNoReqStates,
{"selected", BOOL_STATE, STATE_SELECTED | STATE_SELECTABLE},
{"selected", "false", STATE_SELECTABLE},
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY},
{"combobox", ROLE_COMBOBOX, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"combobox", nsIAccessibleRole::ROLE_COMBOBOX, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"readonly", BOOL_STATE, STATE_READONLY},
{"expanded", BOOL_STATE, STATE_EXPANDED},
{"multiselectable", BOOL_STATE, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE}, END_ENTRY},
{"description", ROLE_TEXT_CONTAINER, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"dialog", ROLE_DIALOG, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"document", ROLE_DOCUMENT, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"label", ROLE_LABEL, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"list", ROLE_LIST, eNameLabelOrTitle, eNoValue, eNoReqStates,
{"description", nsIAccessibleRole::ROLE_TEXT_CONTAINER, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"dialog", nsIAccessibleRole::ROLE_DIALOG, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"document", nsIAccessibleRole::ROLE_DOCUMENT, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"label", nsIAccessibleRole::ROLE_LABEL, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"list", nsIAccessibleRole::ROLE_LIST, eNameLabelOrTitle, eNoValue, eNoReqStates,
{"readonly", BOOL_STATE, STATE_READONLY},
{"multiselectable", BOOL_STATE, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE}, END_ENTRY},
{"listbox", ROLE_LIST, eNameLabelOrTitle, eNoValue, eNoReqStates,
{"listbox", nsIAccessibleRole::ROLE_LIST, eNameLabelOrTitle, eNoValue, eNoReqStates,
{"readonly", BOOL_STATE, STATE_READONLY},
{"multiselectable", BOOL_STATE, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE}, END_ENTRY},
{"listitem", ROLE_LISTITEM, eNameOkFromChildren, eNoValue, eNoReqStates,
{"listitem", nsIAccessibleRole::ROLE_LISTITEM, eNameOkFromChildren, eNoValue, eNoReqStates,
{"selected", BOOL_STATE, STATE_SELECTED | STATE_SELECTABLE},
{"selected", "false", STATE_SELECTABLE},
{"checked", BOOL_STATE, STATE_CHECKED | STATE_CHECKABLE},
{"checked", "false", STATE_CHECKABLE}, END_ENTRY},
{"menu", ROLE_MENUPOPUP, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"menubar", ROLE_MENUBAR, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"menuitem", ROLE_MENUITEM, eNameOkFromChildren, eNoValue, eNoReqStates,
{"menu", nsIAccessibleRole::ROLE_MENUPOPUP, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"menubar", nsIAccessibleRole::ROLE_MENUBAR, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"menuitem", nsIAccessibleRole::ROLE_MENUITEM, eNameOkFromChildren, eNoValue, eNoReqStates,
{"haspopup", BOOL_STATE, STATE_HASPOPUP},
{"checked", BOOL_STATE, STATE_CHECKED | STATE_CHECKABLE},
{"checked", "mixed", STATE_MIXED},
{"checked", "false", STATE_CHECKABLE}, END_ENTRY},
{"menuitemcheckbox", ROLE_MENUITEM, eNameOkFromChildren, eNoValue, STATE_CHECKABLE,
{"menuitemcheckbox", nsIAccessibleRole::ROLE_MENUITEM, eNameOkFromChildren, eNoValue, STATE_CHECKABLE,
{"checked", BOOL_STATE, STATE_CHECKED }, END_ENTRY},
{"menuitemradio", ROLE_MENUITEM, eNameOkFromChildren, eNoValue, STATE_CHECKABLE,
{"menuitemradio", nsIAccessibleRole::ROLE_MENUITEM, eNameOkFromChildren, eNoValue, STATE_CHECKABLE,
{"checked", BOOL_STATE, STATE_CHECKED }, END_ENTRY},
{"grid", ROLE_TABLE, eNameLabelOrTitle, eNoValue, STATE_FOCUSABLE,
{"grid", nsIAccessibleRole::ROLE_TABLE, eNameLabelOrTitle, eNoValue, STATE_FOCUSABLE,
{"multiselectable", BOOL_STATE, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE},
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY},
{"gridcell", ROLE_CELL, eNameOkFromChildren, eNoValue, eNoReqStates,
{"gridcell", nsIAccessibleRole::ROLE_CELL, eNameOkFromChildren, eNoValue, eNoReqStates,
{"selected", BOOL_STATE, STATE_SELECTED | STATE_SELECTABLE},
{"selected", "false", STATE_SELECTABLE},
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY},
{"group", ROLE_GROUPING, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"link", ROLE_LINK, eNameOkFromChildren, eNoValue, STATE_LINKED, END_ENTRY},
{"option", ROLE_LISTITEM, eNameOkFromChildren, eNoValue, eNoReqStates,
{"group", nsIAccessibleRole::ROLE_GROUPING, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"link", nsIAccessibleRole::ROLE_LINK, eNameOkFromChildren, eNoValue, STATE_LINKED, END_ENTRY},
{"option", nsIAccessibleRole::ROLE_LISTITEM, eNameOkFromChildren, eNoValue, eNoReqStates,
{"selected", BOOL_STATE, STATE_SELECTED | STATE_SELECTABLE},
{"selected", "false", STATE_SELECTABLE},
{"checked", BOOL_STATE, STATE_CHECKED | STATE_CHECKABLE},
{"checked", "false", STATE_CHECKABLE}, END_ENTRY},
{"progressbar", ROLE_PROGRESSBAR, eNameLabelOrTitle, eHasValueMinMax, STATE_READONLY,
{"progressbar", nsIAccessibleRole::ROLE_PROGRESSBAR, eNameLabelOrTitle, eHasValueMinMax, STATE_READONLY,
{"valuenow", "unknown", STATE_MIXED}, END_ENTRY},
{"radio", ROLE_RADIOBUTTON, eNameOkFromChildren, eNoValue, eNoReqStates,
{"radio", nsIAccessibleRole::ROLE_RADIOBUTTON, eNameOkFromChildren, eNoValue, eNoReqStates,
{"checked", BOOL_STATE, STATE_CHECKED}, END_ENTRY},
{"radiogroup", ROLE_GROUPING, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"rowheader", ROLE_ROWHEADER, eNameOkFromChildren, eNoValue, eNoReqStates,
{"radiogroup", nsIAccessibleRole::ROLE_GROUPING, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"rowheader", nsIAccessibleRole::ROLE_ROWHEADER, eNameOkFromChildren, eNoValue, eNoReqStates,
{"selected", BOOL_STATE, STATE_SELECTED | STATE_SELECTABLE},
{"selected", "false", STATE_SELECTABLE},
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY},
{"secret", ROLE_PASSWORD_TEXT, eNameLabelOrTitle, eNoValue, STATE_PROTECTED,
{"secret", nsIAccessibleRole::ROLE_PASSWORD_TEXT, eNameLabelOrTitle, eNoValue, STATE_PROTECTED,
END_ENTRY}, // EXT_STATE_SINGLE_LINE manually supported in code
{"separator", ROLE_SEPARATOR, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"slider", ROLE_SLIDER, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"separator", nsIAccessibleRole::ROLE_SEPARATOR, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"slider", nsIAccessibleRole::ROLE_SLIDER, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY},
{"spinbutton", ROLE_SPINBUTTON, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"spinbutton", nsIAccessibleRole::ROLE_SPINBUTTON, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY},
{"spreadsheet", ROLE_TABLE, eNameLabelOrTitle, eNoValue, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE | STATE_FOCUSABLE,
{"spreadsheet", nsIAccessibleRole::ROLE_TABLE, eNameLabelOrTitle, eNoValue, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE | STATE_FOCUSABLE,
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY}, // Still supported, but deprecated in favor of grid
{"status", ROLE_STATUSBAR, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"tab", ROLE_PAGETAB, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"table", ROLE_TABLE, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"td", ROLE_CELL, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"th", ROLE_CELL, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"tablist", ROLE_PAGETABLIST, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"tabpanel", ROLE_PROPERTYPAGE, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"textarea", ROLE_ENTRY, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"status", nsIAccessibleRole::ROLE_STATUSBAR, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"tab", nsIAccessibleRole::ROLE_PAGETAB, eNameOkFromChildren, eNoValue, eNoReqStates, END_ENTRY},
{"table", nsIAccessibleRole::ROLE_TABLE, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"td", nsIAccessibleRole::ROLE_CELL, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"th", nsIAccessibleRole::ROLE_CELL, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"tablist", nsIAccessibleRole::ROLE_PAGETABLIST, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"tabpanel", nsIAccessibleRole::ROLE_PROPERTYPAGE, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"textarea", nsIAccessibleRole::ROLE_ENTRY, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"readonly", BOOL_STATE, STATE_READONLY}, END_ENTRY}, // XXX EXT_STATE_MULTI_LINE supported in code
{"textfield", ROLE_ENTRY, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"textfield", nsIAccessibleRole::ROLE_ENTRY, eNameLabelOrTitle, eHasValueMinMax, eNoReqStates,
{"readonly", BOOL_STATE, STATE_READONLY},
{"haspopup", BOOL_STATE, STATE_HASPOPUP}, END_ENTRY}, // XXX EXT_STATE_SINGLE_LINE supported in code
{"toolbar", ROLE_TOOLBAR, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"tree", ROLE_OUTLINE, eNameLabelOrTitle, eNoValue, eNoReqStates,
{"toolbar", nsIAccessibleRole::ROLE_TOOLBAR, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{"tree", nsIAccessibleRole::ROLE_OUTLINE, eNameLabelOrTitle, eNoValue, eNoReqStates,
{"readonly", BOOL_STATE, STATE_READONLY},
{"multiselectable", BOOL_STATE, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE}, END_ENTRY},
{"treeitem", ROLE_OUTLINEITEM, eNameOkFromChildren, eNoValue, eNoReqStates,
{"treeitem", nsIAccessibleRole::ROLE_OUTLINEITEM, eNameOkFromChildren, eNoValue, eNoReqStates,
{"selected", BOOL_STATE, STATE_SELECTED | STATE_SELECTABLE},
{"selected", "false", STATE_SELECTABLE},
{"expanded", BOOL_STATE, STATE_EXPANDED},
@ -1965,8 +1965,8 @@ nsRoleMapEntry nsAccessible::gWAIRoleMap[] =
{"checked", BOOL_STATE, STATE_CHECKED | STATE_CHECKABLE},
{"checked", "mixed", STATE_MIXED},
{"checked", "false", STATE_CHECKABLE},},
{"treegroup", ROLE_GROUPING, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{nsnull, ROLE_NOTHING, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY} // Last item
{"treegroup", nsIAccessibleRole::ROLE_GROUPING, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY},
{nsnull, nsIAccessibleRole::ROLE_NOTHING, eNameLabelOrTitle, eNoValue, eNoReqStates, END_ENTRY} // Last item
};
// XHTML 2 roles
@ -1983,7 +1983,7 @@ NS_IMETHODIMP nsAccessible::GetFinalRole(PRUint32 *aRole)
{
if (mRoleMapEntry) {
*aRole = mRoleMapEntry->role;
if (*aRole != ROLE_NOTHING) {
if (*aRole != nsIAccessibleRole::ROLE_NOTHING) {
return NS_OK;
}
}
@ -2274,7 +2274,7 @@ nsAccessible::GetKeyBindings(nsIDOMDOMStringList **aKeyBindings)
/* unsigned long getRole (); */
NS_IMETHODIMP nsAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_NOTHING;
*aRole = nsIAccessibleRole::ROLE_NOTHING;
return NS_OK;
}
@ -2570,7 +2570,8 @@ NS_IMETHODIMP nsAccessible::GetExtState(PRUint32 *aExtState)
}
// XXX We can remove this hack once we support RDF-based role & state maps
if (mRoleMapEntry && (mRoleMapEntry->role == ROLE_ENTRY || mRoleMapEntry->role == ROLE_PASSWORD_TEXT)) {
if (mRoleMapEntry && (mRoleMapEntry->role == nsIAccessibleRole::ROLE_ENTRY ||
mRoleMapEntry->role == nsIAccessibleRole::ROLE_PASSWORD_TEXT)) {
*aExtState = NS_LITERAL_CSTRING("textarea").Equals(mRoleMapEntry->roleString) ?
EXT_STATE_MULTI_LINE : EXT_STATE_SINGLE_LINE;
}

View File

@ -39,6 +39,7 @@
#ifndef _nsAccessible_H_
#define _nsAccessible_H_
#include "nsIAccessibleRole.h"
#include "nsAccessNodeWrap.h"
#include "nsAccessibilityAtoms.h"
#include "nsIAccessible.h"
@ -169,8 +170,8 @@ public:
static PRBool IsCorrectFrameType(nsIFrame* aFrame, nsIAtom* aAtom);
static PRUint32 State(nsIAccessible *aAcc) { PRUint32 state; aAcc->GetFinalState(&state); return state; }
static PRUint32 Role(nsIAccessible *aAcc) { PRUint32 role; aAcc->GetFinalRole(&role); return role; }
static PRBool IsText(nsIAccessible *aAcc) { PRUint32 role = Role(aAcc); return role == ROLE_TEXT_LEAF || role == ROLE_STATICTEXT; }
static PRBool IsEmbeddedObject(nsIAccessible *aAcc) { PRUint32 role = Role(aAcc); return role != ROLE_TEXT_LEAF && role != ROLE_WHITESPACE && role != ROLE_STATICTEXT; }
static PRBool IsText(nsIAccessible *aAcc) { PRUint32 role = Role(aAcc); return role == nsIAccessibleRole::ROLE_TEXT_LEAF || role == nsIAccessibleRole::ROLE_STATICTEXT; }
static PRBool IsEmbeddedObject(nsIAccessible *aAcc) { PRUint32 role = Role(aAcc); return role != nsIAccessibleRole::ROLE_TEXT_LEAF && role != nsIAccessibleRole::ROLE_WHITESPACE && role != nsIAccessibleRole::ROLE_STATICTEXT; }
static PRInt32 TextLength(nsIAccessible *aAccessible);
static PRBool IsLeaf(nsIAccessible *aAcc) { PRInt32 numChildren; aAcc->GetChildCount(&numChildren); return numChildren > 0; }

View File

@ -131,7 +131,7 @@ NS_IMETHODIMP nsLinkableAccessible::GetState(PRUint32 *aState)
// Make sure we also include all the states of the parent link, such as focusable, focused, etc.
PRUint32 role;
GetRole(&role);
if (role != ROLE_LINK) {
if (role != nsIAccessibleRole::ROLE_LINK) {
nsCOMPtr<nsIAccessible> parentAccessible(GetParent());
if (parentAccessible) {
PRUint32 orState = 0;

View File

@ -224,7 +224,7 @@ NS_IMETHODIMP nsCaretAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *widt
NS_IMETHODIMP nsCaretAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_CARET;
*_retval = nsIAccessibleRole::ROLE_CARET;
return NS_OK;
}

View File

@ -162,7 +162,7 @@ NS_IMETHODIMP nsDocAccessible::GetName(nsAString& aName)
NS_IMETHODIMP nsDocAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_PANE; // Fall back
*aRole = nsIAccessibleRole::ROLE_PANE; // Fall back
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
GetDocShellTreeItemFor(mDOMNode);
@ -174,14 +174,15 @@ NS_IMETHODIMP nsDocAccessible::GetRole(PRUint32 *aRole)
PRInt32 itemType;
docShellTreeItem->GetItemType(&itemType);
if (itemType == nsIDocShellTreeItem::typeChrome) {
*aRole = ROLE_CHROME_WINDOW;
*aRole = nsIAccessibleRole::ROLE_CHROME_WINDOW;
}
else if (itemType == nsIDocShellTreeItem::typeContent) {
#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocument));
*aRole = xulDoc ? ROLE_APPLICATION : ROLE_DOCUMENT;
*aRole = xulDoc ? nsIAccessibleRole::ROLE_APPLICATION :
nsIAccessibleRole::ROLE_DOCUMENT;
#else
*aRole = ROLE_DOCUMENT;
*aRole = nsIAccessibleRole::ROLE_DOCUMENT;
#endif
}
}
@ -470,10 +471,10 @@ NS_IMETHODIMP nsDocAccessible::Init()
nsresult rv = nsHyperTextAccessible::Init();
if (mRoleMapEntry && mRoleMapEntry->role != ROLE_DIALOG &&
mRoleMapEntry->role != ROLE_APPLICATION &&
mRoleMapEntry->role != ROLE_ALERT &&
mRoleMapEntry->role != ROLE_DOCUMENT) {
if (mRoleMapEntry && mRoleMapEntry->role != nsIAccessibleRole::ROLE_DIALOG &&
mRoleMapEntry->role != nsIAccessibleRole::ROLE_APPLICATION &&
mRoleMapEntry->role != nsIAccessibleRole::ROLE_ALERT &&
mRoleMapEntry->role != nsIAccessibleRole::ROLE_DOCUMENT) {
// Document accessible can only have certain roles
// This was set in nsAccessible::Init() based on dynamic role attribute
mRoleMapEntry = nsnull; // role attribute is not valid for a document
@ -1184,7 +1185,7 @@ void nsDocAccessible::RefreshNodes(nsIDOMNode *aStartNode, PRUint32 aChangeEvent
// Fire menupopupend events for menu popups that go away
PRUint32 role, event = 0;
accessible->GetFinalRole(&role);
if (role == ROLE_MENUPOPUP) {
if (role == nsIAccessibleRole::ROLE_MENUPOPUP) {
nsCOMPtr<nsIDOMNode> domNode;
accessNode->GetDOMNode(getter_AddRefs(domNode));
nsCOMPtr<nsIDOMXULPopupElement> popup(do_QueryInterface(domNode));
@ -1194,7 +1195,8 @@ void nsDocAccessible::RefreshNodes(nsIDOMNode *aStartNode, PRUint32 aChangeEvent
event = nsIAccessibleEvent::EVENT_MENUPOPUPEND;
}
}
else if (role == ROLE_PROGRESSBAR && iterNode != aStartNode) {
else if (role == nsIAccessibleRole::ROLE_PROGRESSBAR &&
iterNode != aStartNode) {
// Make sure EVENT_HIDE gets fired for progress meters
event = nsIAccessibleEvent::EVENT_HIDE;
}

View File

@ -88,7 +88,7 @@ NS_IMETHODIMP nsRadioButtonAccessible::DoAction(PRUint8 aIndex)
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_RADIOBUTTON;
*_retval = nsIAccessibleRole::ROLE_RADIOBUTTON;
return NS_OK;
}

View File

@ -72,7 +72,7 @@ NS_IMETHODIMP nsOuterDocAccessible::GetName(nsAString& aName)
/* unsigned long getRole (); */
NS_IMETHODIMP nsOuterDocAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_CLIENT;
*aRole = nsIAccessibleRole::ROLE_CLIENT;
return NS_OK;
}

View File

@ -158,7 +158,7 @@ NS_IMETHODIMP nsRootAccessible::GetRole(PRUint32 *aRole)
return NS_ERROR_FAILURE;
}
// If it's a <dialog> or <wizard>, use ROLE_DIALOG instead
// If it's a <dialog> or <wizard>, use nsIAccessibleRole::ROLE_DIALOG instead
nsIContent *rootContent = mDocument->GetRootContent();
if (rootContent) {
nsCOMPtr<nsIDOMElement> rootElement(do_QueryInterface(rootContent));
@ -166,7 +166,7 @@ NS_IMETHODIMP nsRootAccessible::GetRole(PRUint32 *aRole)
nsAutoString name;
rootElement->GetLocalName(name);
if (name.EqualsLiteral("dialog") || name.EqualsLiteral("wizard")) {
*aRole = ROLE_DIALOG; // Always at the root
*aRole = nsIAccessibleRole::ROLE_DIALOG; // Always at the root
return NS_OK;
}
}
@ -502,15 +502,15 @@ void nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
// Use focus events on DHTML menuitems to indicate when to fire menustart and menuend
// Special dynamic content handling
PRUint32 role = ROLE_NOTHING;
PRUint32 role = nsIAccessibleRole::ROLE_NOTHING;
finalFocusAccessible->GetFinalRole(&role);
if (role == ROLE_MENUITEM) {
if (role == nsIAccessibleRole::ROLE_MENUITEM) {
if (!mIsInDHTMLMenu) { // Entering menus
PRUint32 naturalRole; // The natural role is the role that this type of element normally has
finalFocusAccessible->GetRole(&naturalRole);
if (role != naturalRole) { // Must be a DHTML menuitem
FireToolkitEvent(nsIAccessibleEvent::EVENT_MENUSTART, this, nsnull);
mIsInDHTMLMenu = ROLE_MENUITEM;
mIsInDHTMLMenu = nsIAccessibleRole::ROLE_MENUITEM;
}
}
}
@ -768,7 +768,7 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
else if (eventType.EqualsLiteral("ValueChange")) {
PRUint32 role;
accessible->GetFinalRole(&role);
if (role == ROLE_PROGRESSBAR) {
if (role == nsIAccessibleRole::ROLE_PROGRESSBAR) {
// For progressmeter, fire EVENT_SHOW on 1st value change
nsAutoString value;
accessible->GetValue(value);
@ -822,7 +822,7 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
nsCOMPtr<nsIAccessible> containerAccessible;
accessible->GetParent(getter_AddRefs(containerAccessible));
NS_ENSURE_TRUE(containerAccessible, NS_OK);
if (Role(containerAccessible) == ROLE_MENUBAR) {
if (Role(containerAccessible) == nsIAccessibleRole::ROLE_MENUBAR) {
// It is top level menuitem
// Only fire focus event if it is not collapsed
if (State(accessible) & STATE_COLLAPSED)

View File

@ -57,7 +57,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsTextAccessible, nsLinkableAccessible)
*/
NS_IMETHODIMP nsTextAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_TEXT_LEAF;
*_retval = nsIAccessibleRole::ROLE_TEXT_LEAF;
return NS_OK;
}

View File

@ -81,7 +81,7 @@ NS_IMETHODIMP nsHTMLAreaAccessible::GetName(nsAString & aName)
/* unsigned long getRole (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
*_retval = nsIAccessibleRole::ROLE_LINK;
return NS_OK;
}

View File

@ -60,7 +60,7 @@ nsFormControlAccessible(aNode, aShell)
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
*_retval = nsIAccessibleRole::ROLE_CHECKBUTTON;
return NS_OK;
}
@ -179,7 +179,7 @@ NS_IMETHODIMP nsHTMLButtonAccessible::GetState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
*_retval = nsIAccessibleRole::ROLE_PUSHBUTTON;
return NS_OK;
}
@ -258,7 +258,7 @@ NS_IMETHODIMP nsHTML4ButtonAccessible::DoAction(PRUint8 index)
NS_IMETHODIMP nsHTML4ButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
*_retval = nsIAccessibleRole::ROLE_PUSHBUTTON;
return NS_OK;
}
@ -305,12 +305,12 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::Shutdown()
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_ENTRY;
*aRole = nsIAccessibleRole::ROLE_ENTRY;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
if (content &&
content->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::password, eIgnoreCase)) {
*aRole = ROLE_PASSWORD_TEXT;
*aRole = nsIAccessibleRole::ROLE_PASSWORD_TEXT;
}
return NS_OK;
}
@ -353,7 +353,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetState(PRUint32 *aState)
else {
nsCOMPtr<nsIAccessible> parent;
GetParent(getter_AddRefs(parent));
if (parent && Role(parent) == ROLE_AUTOCOMPLETE) {
if (parent && Role(parent) == nsIAccessibleRole::ROLE_AUTOCOMPLETE) {
*aState |= STATE_HASPOPUP;
}
}
@ -476,7 +476,7 @@ nsAccessibleWrap(aNode, aShell)
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_GROUPING;
*_retval = nsIAccessibleRole::ROLE_GROUPING;
return NS_OK;
}

View File

@ -133,7 +133,7 @@ NS_IMETHODIMP nsHTMLImageAccessible::GetName(nsAString& aName)
/* wstring getRole (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_GRAPHIC;
*_retval = nsIAccessibleRole::ROLE_GRAPHIC;
return NS_OK;
}

View File

@ -60,7 +60,7 @@ NS_IMETHODIMP nsHTMLLinkAccessible::GetName(nsAString& aName)
/* unsigned long getRole (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
*_retval = nsIAccessibleRole::ROLE_LINK;
return NS_OK;
}

View File

@ -341,11 +341,11 @@ NS_IMETHODIMP nsHTMLSelectListAccessible::GetState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLSelectListAccessible::GetRole(PRUint32 *aRole)
{
if (mParent && Role(mParent) == ROLE_COMBOBOX) {
*aRole = ROLE_COMBOBOX_LIST;
if (mParent && Role(mParent) == nsIAccessibleRole::ROLE_COMBOBOX) {
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_LIST;
}
else {
*aRole = ROLE_LIST;
*aRole = nsIAccessibleRole::ROLE_LIST;
}
return NS_OK;
}
@ -462,7 +462,7 @@ nsHyperTextAccessible(aDOMNode, aShell)
if (parentAccessible) {
PRUint32 role;
parentAccessible->GetRole(&role);
if (role == ROLE_COMBOBOX) {
if (role == nsIAccessibleRole::ROLE_COMBOBOX) {
nsCOMPtr<nsIAccessible> comboAccessible(parentAccessible);
comboAccessible->GetLastChild(getter_AddRefs(parentAccessible));
}
@ -474,11 +474,11 @@ nsHyperTextAccessible(aDOMNode, aShell)
/** We are a ListItem */
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetRole(PRUint32 *aRole)
{
if (mParent && Role(mParent) == ROLE_COMBOBOX_LIST) {
*aRole = ROLE_COMBOBOX_LISTITEM;
if (mParent && Role(mParent) == nsIAccessibleRole::ROLE_COMBOBOX_LIST) {
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_LISTITEM;
}
else {
*aRole = ROLE_COMBOBOX_LISTITEM;
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_LISTITEM;
}
return NS_OK;
}
@ -808,7 +808,7 @@ nsAccessibleWrap(aDOMNode, aShell)
/** We are a combobox */
NS_IMETHODIMP nsHTMLComboboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_COMBOBOX;
*_retval = nsIAccessibleRole::ROLE_COMBOBOX;
return NS_OK;
}
@ -1172,7 +1172,7 @@ void nsHTMLComboboxButtonAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** a
/** We are a button. */
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
*_retval = nsIAccessibleRole::ROLE_PUSHBUTTON;
return NS_OK;
}

View File

@ -66,7 +66,7 @@ nsHyperTextAccessible(aDomNode, aShell)
/* unsigned long getRole (); */
NS_IMETHODIMP nsHTMLTableCellAccessible::GetRole(PRUint32 *aResult)
{
*aResult = ROLE_CELL;
*aResult = nsIAccessibleRole::ROLE_CELL;
return NS_OK;
}
@ -87,7 +87,7 @@ nsAccessibleWrap(aDomNode, aShell)
/* unsigned long getRole (); */
NS_IMETHODIMP nsHTMLTableAccessible::GetRole(PRUint32 *aResult)
{
*aResult = ROLE_TABLE;
*aResult = nsIAccessibleRole::ROLE_TABLE;
return NS_OK;
}
@ -688,7 +688,7 @@ NS_IMETHODIMP nsHTMLTableAccessible::IsProbablyForLayout(PRBool *aIsProbablyForL
}
// Check role and role attribute
PRBool hasNonTableRole = (Role(this) != ROLE_TABLE);
PRBool hasNonTableRole = (Role(this) != nsIAccessibleRole::ROLE_TABLE);
if (hasNonTableRole) {
RETURN_LAYOUT_ANSWER(PR_FALSE, "Has role attribute");
}
@ -820,7 +820,7 @@ nsHTMLTableAccessible(aDomNode, aShell)
NS_IMETHODIMP
nsHTMLTableHeadAccessible::GetRole(PRUint32 *aResult)
{
*aResult = ROLE_COLUMNHEADER;
*aResult = nsIAccessibleRole::ROLE_COLUMNHEADER;
return NS_OK;
}

View File

@ -105,7 +105,7 @@ NS_IMETHODIMP nsHTMLTextAccessible::GetRole(PRUint32 *aRole)
NS_ENSURE_TRUE(frame, NS_ERROR_NULL_POINTER);
if (frame->IsGeneratedContentFrame()) {
*aRole = ROLE_STATICTEXT;
*aRole = nsIAccessibleRole::ROLE_STATICTEXT;
return NS_OK;
}
@ -139,7 +139,7 @@ NS_IMETHODIMP nsHTMLTextAccessible::GetAttributes(nsIPersistentProperties **aAtt
PRUint32 role;
GetRole(&role);
if (role == ROLE_STATICTEXT) {
if (role == nsIAccessibleRole::ROLE_STATICTEXT) {
nsCOMPtr<nsIPersistentProperties> attributes =
do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID);
NS_ENSURE_TRUE(attributes, NS_ERROR_OUT_OF_MEMORY);
@ -159,7 +159,7 @@ nsLeafAccessible(aDomNode, aShell)
NS_IMETHODIMP nsHTMLHRAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_SEPARATOR;
*aRole = nsIAccessibleRole::ROLE_SEPARATOR;
return NS_OK;
}
@ -177,7 +177,7 @@ nsLeafAccessible(aDomNode, aShell)
NS_IMETHODIMP nsHTMLBRAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_WHITESPACE;
*aRole = nsIAccessibleRole::ROLE_WHITESPACE;
return NS_OK;
}
@ -218,7 +218,7 @@ NS_IMETHODIMP nsHTMLLabelAccessible::GetName(nsAString& aReturn)
NS_IMETHODIMP nsHTMLLabelAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_LABEL;
*aRole = nsIAccessibleRole::ROLE_LABEL;
return NS_OK;
}

View File

@ -108,7 +108,7 @@ public:
NS_IMETHOD GetUniqueID(void **aUniqueID);
NS_IMETHOD Shutdown();
NS_IMETHOD GetName(nsAString& aName);
NS_IMETHOD GetRole(PRUint32 *aRole) { *aRole = ROLE_STATICTEXT; return NS_OK; }
NS_IMETHOD GetRole(PRUint32 *aRole) { *aRole = nsIAccessibleRole::ROLE_STATICTEXT; return NS_OK; }
NS_IMETHOD GetState(PRUint32 *aState) { nsHTMLTextAccessible::GetState(aState); *aState &= ~STATE_FOCUSABLE; *aState |= STATE_READONLY; return NS_OK; }
// Don't cache via unique ID -- bullet accessible shares the same dom node as this LI accessible.
// Also, don't cache via mParent/SetParent(), prevent circular reference since li holds onto us.
@ -131,7 +131,7 @@ class nsHTMLListAccessible : public nsHyperTextAccessible
public:
nsHTMLListAccessible(nsIDOMNode *aDOMNode, nsIWeakReference* aShell):
nsHyperTextAccessible(aDOMNode, aShell) { }
NS_IMETHOD GetRole(PRUint32 *aRole) { *aRole = ROLE_LIST; return NS_OK; }
NS_IMETHOD GetRole(PRUint32 *aRole) { *aRole = nsIAccessibleRole::ROLE_LIST; return NS_OK; }
NS_IMETHOD GetState(PRUint32 *aState) { nsHyperTextAccessible::GetState(aState); *aState &= ~STATE_FOCUSABLE; *aState |= STATE_READONLY; return NS_OK; }
};
@ -141,7 +141,7 @@ public:
nsHTMLLIAccessible(nsIDOMNode *aDOMNode, nsIWeakReference* aShell,
nsIFrame *aBulletFrame, const nsAString& aBulletText);
NS_IMETHOD Shutdown();
NS_IMETHOD GetRole(PRUint32 *aRole) { *aRole = ROLE_LISTITEM; return NS_OK; }
NS_IMETHOD GetRole(PRUint32 *aRole) { *aRole = nsIAccessibleRole::ROLE_LISTITEM; return NS_OK; }
NS_IMETHOD GetState(PRUint32 *aState) { nsAccessibleWrap::GetState(aState); *aState |= STATE_READONLY; return NS_OK; }
NS_IMETHOD GetName(nsAString& aName) { aName.SetIsVoid(PR_TRUE); return mRoleMapEntry ? nsAccessible::GetName(aName) : NS_OK; }
NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);

View File

@ -142,14 +142,14 @@ NS_IMETHODIMP nsHyperTextAccessible::GetRole(PRUint32 *aRole)
nsIAtom *tag = content->Tag();
if (tag == nsAccessibilityAtoms::caption) {
*aRole = ROLE_CAPTION;
*aRole = nsIAccessibleRole::ROLE_CAPTION;
}
else if (tag == nsAccessibilityAtoms::form) {
*aRole = ROLE_FORM;
*aRole = nsIAccessibleRole::ROLE_FORM;
}
else if (tag == nsAccessibilityAtoms::div ||
tag == nsAccessibilityAtoms::blockquote) {
*aRole = ROLE_SECTION;
*aRole = nsIAccessibleRole::ROLE_SECTION;
}
else if (tag == nsAccessibilityAtoms::h1 ||
tag == nsAccessibilityAtoms::h2 ||
@ -157,15 +157,15 @@ NS_IMETHODIMP nsHyperTextAccessible::GetRole(PRUint32 *aRole)
tag == nsAccessibilityAtoms::h4 ||
tag == nsAccessibilityAtoms::h5 ||
tag == nsAccessibilityAtoms::h6) {
*aRole = ROLE_HEADING;
*aRole = nsIAccessibleRole::ROLE_HEADING;
}
else {
nsIFrame *frame = GetFrame();
if (frame && frame->GetType() == nsAccessibilityAtoms::blockFrame) {
*aRole = ROLE_PARAGRAPH;
*aRole = nsIAccessibleRole::ROLE_PARAGRAPH;
}
else {
*aRole = ROLE_TEXT_CONTAINER; // In ATK this works
*aRole = nsIAccessibleRole::ROLE_TEXT_CONTAINER; // In ATK this works
}
}
return NS_OK;
@ -601,7 +601,7 @@ PRInt32 nsHyperTextAccessible::GetRelativeOffset(nsIPresShell *aPresShell, nsIFr
else if (aAmount == eSelectEndLine && finalAccessible) {
// If not at very end of hypertext, we may need change the end of line offset by 1,
// to make sure we are in the right place relative to the line ending
if (Role(finalAccessible) == ROLE_WHITESPACE) { // Landed on <br> hard line break
if (Role(finalAccessible) == nsIAccessibleRole::ROLE_WHITESPACE) { // Landed on <br> hard line break
// if aNeedsStart, set end of line exactly 1 character past line break
// XXX It would be cleaner if we did not have to have the hard line break check,
// and just got the correct results from PeekOffset() for the <br> case -- the returned offset should
@ -1029,7 +1029,8 @@ NS_IMETHODIMP nsHyperTextAccessible::GetLinkIndex(PRInt32 aCharIndex, PRInt32 *a
while (NextChild(accessible) && characterCount <= aCharIndex) {
PRUint32 role = Role(accessible);
if (role == ROLE_TEXT_LEAF || role == ROLE_STATICTEXT) {
if (role == nsIAccessibleRole::ROLE_TEXT_LEAF ||
role == nsIAccessibleRole::ROLE_STATICTEXT) {
characterCount += TextLength(accessible);
}
else {
@ -1037,7 +1038,7 @@ NS_IMETHODIMP nsHyperTextAccessible::GetLinkIndex(PRInt32 aCharIndex, PRInt32 *a
*aLinkIndex = linkIndex;
break;
}
if (role != ROLE_WHITESPACE) {
if (role != nsIAccessibleRole::ROLE_WHITESPACE) {
++ linkIndex;
}
}

View File

@ -124,7 +124,7 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
// Check for OS X "role skew"; the role constants in nsIAccessible.idl need to match the ones
// in nsRoleMap.h.
NS_ASSERTION([AXRoles[nsIAccessible::ROLE_LAST_ENTRY] isEqualToString:@"ROLE_LAST_ENTRY"], "Role skew in the role map!");
NS_ASSERTION([AXRoles[nsIAccessibleRole::ROLE_LAST_ENTRY] isEqualToString:@"ROLE_LAST_ENTRY"], "Role skew in the role map!");
}
return self;

View File

@ -81,11 +81,11 @@ class nsAccessibleWrap : public nsAccessible
// child, that is their title. Works in conjunction with IsPruned() below.
PRBool IsFlat() {
PRUint32 role = Role(this);
return (role == ROLE_CHECKBUTTON ||
role == ROLE_PUSHBUTTON ||
role == ROLE_TOGGLE_BUTTON ||
role == ROLE_SPLITBUTTON ||
role == ROLE_ENTRY);
return (role == nsIAccessibleRole::ROLE_CHECKBUTTON ||
role == nsIAccessibleRole::ROLE_PUSHBUTTON ||
role == nsIAccessibleRole::ROLE_TOGGLE_BUTTON ||
role == nsIAccessibleRole::ROLE_SPLITBUTTON ||
role == nsIAccessibleRole::ROLE_ENTRY);
}
// ignored means that the accessible might still have children, but is not displayed

View File

@ -102,9 +102,9 @@ nsAccessibleWrap::GetNativeType ()
{
PRUint32 role = Role(this);
switch (role) {
case ROLE_PUSHBUTTON:
case ROLE_SPLITBUTTON:
case ROLE_TOGGLE_BUTTON:
case nsIAccessibleRole::ROLE_PUSHBUTTON:
case nsIAccessibleRole::ROLE_SPLITBUTTON:
case nsIAccessibleRole::ROLE_TOGGLE_BUTTON:
{
// if this button may show a popup, let's make it of the popupbutton type.
if (HasPopup())
@ -114,23 +114,23 @@ nsAccessibleWrap::GetNativeType ()
return [mozButtonAccessible class];
}
case ROLE_CHECKBUTTON:
case nsIAccessibleRole::ROLE_CHECKBUTTON:
return [mozCheckboxAccessible class];
case ROLE_AUTOCOMPLETE:
case nsIAccessibleRole::ROLE_AUTOCOMPLETE:
return [mozComboboxAccessible class];
case ROLE_ENTRY:
case ROLE_STATICTEXT:
case ROLE_HEADING:
case ROLE_LABEL:
case ROLE_CAPTION:
case ROLE_ACCEL_LABEL:
case ROLE_TEXT_LEAF:
case nsIAccessibleRole::ROLE_ENTRY:
case nsIAccessibleRole::ROLE_STATICTEXT:
case nsIAccessibleRole::ROLE_HEADING:
case nsIAccessibleRole::ROLE_LABEL:
case nsIAccessibleRole::ROLE_CAPTION:
case nsIAccessibleRole::ROLE_ACCEL_LABEL:
case nsIAccessibleRole::ROLE_TEXT_LEAF:
// normal textfield (static or editable)
return [mozTextAccessible class];
case ROLE_COMBOBOX:
case nsIAccessibleRole::ROLE_COMBOBOX:
return [mozPopupButtonAccessible class];
default:

View File

@ -338,9 +338,11 @@ NS_IMETHODIMP nsAccessibleWrap::GetDescription(nsAString& aDescription)
PRUint32 currentRole;
nsresult rv = GetFinalRole(&currentRole);
if (NS_FAILED(rv) ||
(currentRole != ROLE_LISTITEM && currentRole != ROLE_MENUITEM &&
currentRole != ROLE_RADIOBUTTON && currentRole != ROLE_PAGETAB &&
currentRole != ROLE_OUTLINEITEM)) {
(currentRole != nsIAccessibleRole::ROLE_LISTITEM &&
currentRole != nsIAccessibleRole::ROLE_MENUITEM &&
currentRole != nsIAccessibleRole::ROLE_RADIOBUTTON &&
currentRole != nsIAccessibleRole::ROLE_PAGETAB &&
currentRole != nsIAccessibleRole::ROLE_OUTLINEITEM)) {
nsAutoString description;
nsAccessible::GetDescription(description);
if (!description.IsEmpty()) {
@ -383,12 +385,12 @@ NS_IMETHODIMP nsAccessibleWrap::GetDescription(nsAString& aDescription)
// Don't localize the string "of" -- that's just the format of this string.
// The AT will parse the relevant numbers out and add its own localization.
if (currentRole == ROLE_OUTLINEITEM) {
if (currentRole == nsIAccessibleRole::ROLE_OUTLINEITEM) {
PRUint32 level = 1;
nsCOMPtr<nsIAccessible> nextParent;
while (parent) {
parent->GetFinalRole(&currentRole);
if (currentRole != ROLE_GROUPING) {
if (currentRole != nsIAccessibleRole::ROLE_GROUPING) {
break;
}
++level;
@ -402,13 +404,13 @@ NS_IMETHODIMP nsAccessibleWrap::GetDescription(nsAString& aDescription)
GetNextSibling(getter_AddRefs(groupSibling));
if (groupSibling) {
groupSibling->GetFinalRole(&currentRole);
if (currentRole == ROLE_GROUPING) {
if (currentRole == nsIAccessibleRole::ROLE_GROUPING) {
// Accessible that groups child tree items
nsCOMPtr<nsIAccessible> child;
groupSibling->GetFirstChild(getter_AddRefs(child));
while (child) {
child->GetFinalRole(&currentRole);
numChildren += (currentRole == ROLE_OUTLINEITEM);
numChildren += (currentRole == nsIAccessibleRole::ROLE_OUTLINEITEM);
nsCOMPtr<nsIAccessible> nextChild;
child->GetNextSibling(getter_AddRefs(nextChild));
child.swap(nextChild);
@ -467,7 +469,7 @@ STDMETHODIMP nsAccessibleWrap::get_accRole(
return E_FAIL;
msaaRole = gWindowsRoleMap[xpRole].msaaRole;
NS_ASSERTION(gWindowsRoleMap[nsIAccessible::ROLE_LAST_ENTRY].msaaRole == ROLE_WINDOWS_LAST_ENTRY,
NS_ASSERTION(gWindowsRoleMap[nsIAccessibleRole::ROLE_LAST_ENTRY].msaaRole == ROLE_WINDOWS_LAST_ENTRY,
"MSAA role map skewed");
// Special case, not a great place for this, but it's better than adding extra role buttonmenu role to ARIA
@ -1123,7 +1125,7 @@ nsAccessibleWrap::role(long *role)
if (NS_FAILED(GetFinalRole(&xpRole)))
return E_FAIL;
NS_ASSERTION(gWindowsRoleMap[nsIAccessible::ROLE_LAST_ENTRY].ia2Role == ROLE_WINDOWS_LAST_ENTRY,
NS_ASSERTION(gWindowsRoleMap[nsIAccessibleRole::ROLE_LAST_ENTRY].ia2Role == ROLE_WINDOWS_LAST_ENTRY,
"MSAA role map skewed");
*role = gWindowsRoleMap[xpRole].ia2Role;

View File

@ -266,7 +266,7 @@ protected:
// Should this accessible be allowed to have any MSAA children
static PRBool MustPrune(nsIAccessible *accessible)
{ PRUint32 role; return NS_SUCCEEDED(accessible->GetRole(&role)) && (role == ROLE_ENTRY || role == ROLE_PASSWORD_TEXT || role == ROLE_PUSHBUTTON); }
{ PRUint32 role; return NS_SUCCEEDED(accessible->GetRole(&role)) && (role == nsIAccessibleRole::ROLE_ENTRY || role == nsIAccessibleRole::ROLE_PASSWORD_TEXT || role == nsIAccessibleRole::ROLE_PUSHBUTTON); }
};
// Define unsupported wrap classes here

View File

@ -65,358 +65,358 @@ struct WindowsRoleMapItem
// Map array from cross platform roles to MSAA/IA2 roles
static const WindowsRoleMapItem gWindowsRoleMap[] = {
// nsIAccessible::ROLE_NOTHING
// nsIAccessibleRole::ROLE_NOTHING
{ USE_ROLE_STRING, IA2_ROLE_UNKNOWN },
// nsIAccessible::ROLE_TITLEBAR
// nsIAccessibleRole::ROLE_TITLEBAR
{ ROLE_SYSTEM_TITLEBAR, ROLE_SYSTEM_TITLEBAR },
// nsIAccessible::ROLE_MENUBAR
// nsIAccessibleRole::ROLE_MENUBAR
{ ROLE_SYSTEM_MENUBAR, ROLE_SYSTEM_MENUBAR },
// nsIAccessible::ROLE_SCROLLBAR
// nsIAccessibleRole::ROLE_SCROLLBAR
{ ROLE_SYSTEM_SCROLLBAR, ROLE_SYSTEM_SCROLLBAR },
// nsIAccessible::ROLE_GRIP
// nsIAccessibleRole::ROLE_GRIP
{ ROLE_SYSTEM_GRIP, ROLE_SYSTEM_GRIP },
// nsIAccessible::ROLE_SOUND
// nsIAccessibleRole::ROLE_SOUND
{ ROLE_SYSTEM_SOUND, ROLE_SYSTEM_SOUND },
// nsIAccessible::ROLE_CURSOR
// nsIAccessibleRole::ROLE_CURSOR
{ ROLE_SYSTEM_CURSOR, ROLE_SYSTEM_CURSOR },
// nsIAccessible::ROLE_CARET
// nsIAccessibleRole::ROLE_CARET
{ ROLE_SYSTEM_CARET, ROLE_SYSTEM_CARET },
// nsIAccessible::ROLE_ALERT
// nsIAccessibleRole::ROLE_ALERT
{ ROLE_SYSTEM_ALERT, ROLE_SYSTEM_ALERT },
// nsIAccessible::ROLE_WINDOW
// nsIAccessibleRole::ROLE_WINDOW
{ ROLE_SYSTEM_WINDOW, ROLE_SYSTEM_WINDOW },
// nsIAccessible::ROLE_CLIENT
// nsIAccessibleRole::ROLE_CLIENT
{ USE_ROLE_STRING, IA2_ROLE_UNKNOWN},
// nsIAccessible::ROLE_MENUPOPUP
// nsIAccessibleRole::ROLE_MENUPOPUP
{ ROLE_SYSTEM_MENUPOPUP, ROLE_SYSTEM_MENUPOPUP },
// nsIAccessible::ROLE_MENUITEM
// nsIAccessibleRole::ROLE_MENUITEM
{ ROLE_SYSTEM_MENUITEM, ROLE_SYSTEM_MENUITEM },
// nsIAccessible::ROLE_TOOLTIP
// nsIAccessibleRole::ROLE_TOOLTIP
{ ROLE_SYSTEM_TOOLTIP, ROLE_SYSTEM_TOOLTIP },
// nsIAccessible::ROLE_APPLICATION
// nsIAccessibleRole::ROLE_APPLICATION
{ ROLE_SYSTEM_APPLICATION, ROLE_SYSTEM_APPLICATION },
// nsIAccessible::ROLE_DOCUMENT
// nsIAccessibleRole::ROLE_DOCUMENT
{ ROLE_SYSTEM_DOCUMENT, ROLE_SYSTEM_DOCUMENT },
// nsIAccessible::ROLE_PANE
// nsIAccessibleRole::ROLE_PANE
{ ROLE_SYSTEM_PANE, ROLE_SYSTEM_PANE },
// nsIAccessible::ROLE_CHART
// nsIAccessibleRole::ROLE_CHART
{ ROLE_SYSTEM_CHART, ROLE_SYSTEM_CHART },
// nsIAccessible::ROLE_DIALOG
// nsIAccessibleRole::ROLE_DIALOG
{ ROLE_SYSTEM_DIALOG, ROLE_SYSTEM_DIALOG },
// nsIAccessible::ROLE_BORDER
// nsIAccessibleRole::ROLE_BORDER
{ ROLE_SYSTEM_BORDER, ROLE_SYSTEM_BORDER },
// nsIAccessible::ROLE_GROUPING
// nsIAccessibleRole::ROLE_GROUPING
{ ROLE_SYSTEM_GROUPING, ROLE_SYSTEM_GROUPING },
// nsIAccessible::ROLE_SEPARATOR
// nsIAccessibleRole::ROLE_SEPARATOR
{ ROLE_SYSTEM_SEPARATOR, ROLE_SYSTEM_SEPARATOR },
// nsIAccessible::ROLE_TOOLBAR
// nsIAccessibleRole::ROLE_TOOLBAR
{ ROLE_SYSTEM_TOOLBAR, ROLE_SYSTEM_TOOLBAR },
// nsIAccessible::ROLE_STATUSBAR
// nsIAccessibleRole::ROLE_STATUSBAR
{ ROLE_SYSTEM_STATUSBAR, ROLE_SYSTEM_STATUSBAR },
// nsIAccessible::ROLE_TABLE
// nsIAccessibleRole::ROLE_TABLE
{ ROLE_SYSTEM_TABLE, ROLE_SYSTEM_TABLE },
// nsIAccessible::ROLE_COLUMNHEADER,
// nsIAccessibleRole::ROLE_COLUMNHEADER,
{ ROLE_SYSTEM_COLUMNHEADER, ROLE_SYSTEM_COLUMNHEADER },
// nsIAccessible::ROLE_ROWHEADER
// nsIAccessibleRole::ROLE_ROWHEADER
{ ROLE_SYSTEM_ROWHEADER, ROLE_SYSTEM_ROWHEADER },
// nsIAccessible::ROLE_COLUMN
// nsIAccessibleRole::ROLE_COLUMN
{ ROLE_SYSTEM_COLUMN, ROLE_SYSTEM_COLUMN },
// nsIAccessible::ROLE_ROW
// nsIAccessibleRole::ROLE_ROW
{ ROLE_SYSTEM_ROW, ROLE_SYSTEM_ROW },
// nsIAccessible::ROLE_CELL
// nsIAccessibleRole::ROLE_CELL
{ ROLE_SYSTEM_CELL, ROLE_SYSTEM_CELL },
// nsIAccessible::ROLE_LINK
// nsIAccessibleRole::ROLE_LINK
{ ROLE_SYSTEM_LINK, ROLE_SYSTEM_LINK },
// nsIAccessible::ROLE_HELPBALLOON
// nsIAccessibleRole::ROLE_HELPBALLOON
{ ROLE_SYSTEM_HELPBALLOON, ROLE_SYSTEM_HELPBALLOON },
// nsIAccessible::ROLE_CHARACTER
// nsIAccessibleRole::ROLE_CHARACTER
{ ROLE_SYSTEM_CHARACTER, ROLE_SYSTEM_CHARACTER },
// nsIAccessible::ROLE_LIST
// nsIAccessibleRole::ROLE_LIST
{ ROLE_SYSTEM_LIST, ROLE_SYSTEM_LIST },
// nsIAccessible::ROLE_LISTITEM
// nsIAccessibleRole::ROLE_LISTITEM
{ ROLE_SYSTEM_LISTITEM, ROLE_SYSTEM_LISTITEM },
// nsIAccessible::ROLE_OUTLINE
// nsIAccessibleRole::ROLE_OUTLINE
{ ROLE_SYSTEM_OUTLINE, ROLE_SYSTEM_OUTLINE },
// nsIAccessible::ROLE_OUTLINEITEM
// nsIAccessibleRole::ROLE_OUTLINEITEM
{ ROLE_SYSTEM_OUTLINEITEM, ROLE_SYSTEM_OUTLINEITEM },
// nsIAccessible::ROLE_PAGETAB
// nsIAccessibleRole::ROLE_PAGETAB
{ ROLE_SYSTEM_PAGETAB, ROLE_SYSTEM_PAGETAB },
// nsIAccessible::ROLE_PROPERTYPAGE
// nsIAccessibleRole::ROLE_PROPERTYPAGE
{ ROLE_SYSTEM_PROPERTYPAGE, ROLE_SYSTEM_PROPERTYPAGE },
// nsIAccessible::ROLE_INDICATOR
// nsIAccessibleRole::ROLE_INDICATOR
{ ROLE_SYSTEM_INDICATOR, ROLE_SYSTEM_INDICATOR },
// nsIAccessible::ROLE_GRAPHIC
// nsIAccessibleRole::ROLE_GRAPHIC
{ ROLE_SYSTEM_GRAPHIC, ROLE_SYSTEM_GRAPHIC },
// nsIAccessible::ROLE_STATICTEXT
// nsIAccessibleRole::ROLE_STATICTEXT
{ ROLE_SYSTEM_STATICTEXT, ROLE_SYSTEM_STATICTEXT },
// nsIAccessible::ROLE_TEXT_LEAF
// nsIAccessibleRole::ROLE_TEXT_LEAF
{ ROLE_SYSTEM_TEXT, ROLE_SYSTEM_TEXT },
// nsIAccessible::ROLE_PUSHBUTTON
// nsIAccessibleRole::ROLE_PUSHBUTTON
{ ROLE_SYSTEM_PUSHBUTTON, ROLE_SYSTEM_PUSHBUTTON },
// nsIAccessible::ROLE_CHECKBUTTON
// nsIAccessibleRole::ROLE_CHECKBUTTON
{ ROLE_SYSTEM_CHECKBUTTON, ROLE_SYSTEM_CHECKBUTTON },
// nsIAccessible::ROLE_RADIOBUTTON
// nsIAccessibleRole::ROLE_RADIOBUTTON
{ ROLE_SYSTEM_RADIOBUTTON, ROLE_SYSTEM_RADIOBUTTON },
// nsIAccessible::ROLE_COMBOBOX
// nsIAccessibleRole::ROLE_COMBOBOX
{ ROLE_SYSTEM_COMBOBOX, ROLE_SYSTEM_COMBOBOX },
// nsIAccessible::ROLE_DROPLIST
// nsIAccessibleRole::ROLE_DROPLIST
{ ROLE_SYSTEM_DROPLIST, ROLE_SYSTEM_DROPLIST },
// nsIAccessible::ROLE_PROGRESSBAR
// nsIAccessibleRole::ROLE_PROGRESSBAR
{ ROLE_SYSTEM_PROGRESSBAR, ROLE_SYSTEM_PROGRESSBAR },
// nsIAccessible::ROLE_DIAL
// nsIAccessibleRole::ROLE_DIAL
{ ROLE_SYSTEM_DIAL, ROLE_SYSTEM_DIAL },
// nsIAccessible::ROLE_HOTKEYFIELD
// nsIAccessibleRole::ROLE_HOTKEYFIELD
{ ROLE_SYSTEM_HOTKEYFIELD, ROLE_SYSTEM_HOTKEYFIELD },
// nsIAccessible::ROLE_SLIDER
// nsIAccessibleRole::ROLE_SLIDER
{ ROLE_SYSTEM_SLIDER, ROLE_SYSTEM_SLIDER },
// nsIAccessible::ROLE_SPINBUTTON
// nsIAccessibleRole::ROLE_SPINBUTTON
{ ROLE_SYSTEM_SPINBUTTON, ROLE_SYSTEM_SPINBUTTON },
// nsIAccessible::ROLE_DIAGRAM
// nsIAccessibleRole::ROLE_DIAGRAM
{ ROLE_SYSTEM_DIAGRAM, ROLE_SYSTEM_DIAGRAM },
// nsIAccessible::ROLE_ANIMATION
// nsIAccessibleRole::ROLE_ANIMATION
{ ROLE_SYSTEM_ANIMATION, ROLE_SYSTEM_ANIMATION },
// nsIAccessible::ROLE_EQUATION
// nsIAccessibleRole::ROLE_EQUATION
{ ROLE_SYSTEM_EQUATION, ROLE_SYSTEM_EQUATION },
// nsIAccessible::ROLE_BUTTONDROPDOWN
// nsIAccessibleRole::ROLE_BUTTONDROPDOWN
{ ROLE_SYSTEM_BUTTONDROPDOWN, ROLE_SYSTEM_BUTTONDROPDOWN },
// nsIAccessible::ROLE_BUTTONMENU
// nsIAccessibleRole::ROLE_BUTTONMENU
{ ROLE_SYSTEM_BUTTONMENU, ROLE_SYSTEM_BUTTONMENU },
// nsIAccessible::ROLE_BUTTONDROPDOWNGRID
// nsIAccessibleRole::ROLE_BUTTONDROPDOWNGRID
{ ROLE_SYSTEM_BUTTONDROPDOWNGRID, ROLE_SYSTEM_BUTTONDROPDOWNGRID },
// nsIAccessible::ROLE_WHITESPACE
// nsIAccessibleRole::ROLE_WHITESPACE
{ ROLE_SYSTEM_WHITESPACE, ROLE_SYSTEM_WHITESPACE },
// nsIAccessible::ROLE_PAGETABLIST
// nsIAccessibleRole::ROLE_PAGETABLIST
{ ROLE_SYSTEM_PAGETABLIST, ROLE_SYSTEM_PAGETABLIST },
// nsIAccessible::ROLE_CLOCK
// nsIAccessibleRole::ROLE_CLOCK
{ ROLE_SYSTEM_CLOCK, ROLE_SYSTEM_CLOCK },
// nsIAccessible::ROLE_SPLITBUTTON
// nsIAccessibleRole::ROLE_SPLITBUTTON
{ ROLE_SYSTEM_SPLITBUTTON, ROLE_SYSTEM_SPLITBUTTON },
// nsIAccessible::ROLE_IPADDRESS
// nsIAccessibleRole::ROLE_IPADDRESS
{ ROLE_SYSTEM_IPADDRESS, ROLE_SYSTEM_IPADDRESS },
// Make up for Gecko roles that we don't have in MSAA or IA2. When in doubt
// map them to USE_ROLE_STRING (IA2_ROLE_UNKNOWN).
// nsIAccessible::ROLE_ACCEL_LABEL
// nsIAccessibleRole::ROLE_ACCEL_LABEL
{ ROLE_SYSTEM_STATICTEXT, ROLE_SYSTEM_STATICTEXT },
// nsIAccessible::ROLE_ARROW
// nsIAccessibleRole::ROLE_ARROW
{ ROLE_SYSTEM_INDICATOR, ROLE_SYSTEM_INDICATOR },
// nsIAccessible::ROLE_CANVAS
// nsIAccessibleRole::ROLE_CANVAS
{ USE_ROLE_STRING, IA2_ROLE_UNKNOWN },
// nsIAccessible::ROLE_CHECK_MENU_ITEM
// nsIAccessibleRole::ROLE_CHECK_MENU_ITEM
{ ROLE_SYSTEM_MENUITEM, IA2_ROLE_CHECK_MENU_ITEM },
// nsIAccessible::ROLE_COLOR_CHOOSER
// nsIAccessibleRole::ROLE_COLOR_CHOOSER
{ ROLE_SYSTEM_DIALOG, IA2_ROLE_COLOR_CHOOSER },
// nsIAccessible::ROLE_DATE_EDITOR
// nsIAccessibleRole::ROLE_DATE_EDITOR
{ USE_ROLE_STRING, IA2_ROLE_DATE_EDITOR },
// nsIAccessible::ROLE_DESKTOP_ICON
// nsIAccessibleRole::ROLE_DESKTOP_ICON
{ USE_ROLE_STRING, IA2_ROLE_DESKTOP_ICON },
// nsIAccessible::ROLE_DESKTOP_FRAME
// nsIAccessibleRole::ROLE_DESKTOP_FRAME
{ USE_ROLE_STRING, IA2_ROLE_DESKTOP_PANE },
// nsIAccessible::ROLE_DIRECTORY_PANE
// nsIAccessibleRole::ROLE_DIRECTORY_PANE
{ USE_ROLE_STRING, IA2_ROLE_DIRECTORY_PANE },
// nsIAccessible::ROLE_FILE_CHOOSER
// nsIAccessibleRole::ROLE_FILE_CHOOSER
{ USE_ROLE_STRING, IA2_ROLE_FILE_CHOOSER },
// nsIAccessible::ROLE_FONT_CHOOSER
// nsIAccessibleRole::ROLE_FONT_CHOOSER
{ USE_ROLE_STRING, IA2_ROLE_FONT_CHOOSER },
// nsIAccessible::ROLE_CHROME_WINDOW
// nsIAccessibleRole::ROLE_CHROME_WINDOW
{ ROLE_SYSTEM_APPLICATION, IA2_ROLE_FRAME },
// nsIAccessible::ROLE_GLASS_PANE
// nsIAccessibleRole::ROLE_GLASS_PANE
{ USE_ROLE_STRING, IA2_ROLE_GLASS_PANE },
// nsIAccessible::ROLE_HTML_CONTAINER
// nsIAccessibleRole::ROLE_HTML_CONTAINER
{ USE_ROLE_STRING, IA2_ROLE_UNKNOWN },
// nsIAccessible::ROLE_ICON
// nsIAccessibleRole::ROLE_ICON
{ ROLE_SYSTEM_PUSHBUTTON, IA2_ROLE_ICON },
// nsIAccessible::ROLE_LABEL
// nsIAccessibleRole::ROLE_LABEL
{ ROLE_SYSTEM_STATICTEXT, IA2_ROLE_LABEL },
// nsIAccessible::ROLE_LAYERED_PANE
// nsIAccessibleRole::ROLE_LAYERED_PANE
{ USE_ROLE_STRING, IA2_ROLE_LAYERED_PANE },
// nsIAccessible::ROLE_OPTION_PANE
// nsIAccessibleRole::ROLE_OPTION_PANE
{ USE_ROLE_STRING, IA2_ROLE_OPTION_PANE },
// nsIAccessible::ROLE_PASSWORD_TEXT
// nsIAccessibleRole::ROLE_PASSWORD_TEXT
{ ROLE_SYSTEM_TEXT, ROLE_SYSTEM_TEXT },
// nsIAccessible::ROLE_POPUP_MENU
// nsIAccessibleRole::ROLE_POPUP_MENU
{ ROLE_SYSTEM_MENUPOPUP, ROLE_SYSTEM_MENUPOPUP },
// nsIAccessible::ROLE_RADIO_MENU_ITEM
// nsIAccessibleRole::ROLE_RADIO_MENU_ITEM
{ ROLE_SYSTEM_MENUITEM, IA2_ROLE_RADIO_MENU_ITEM },
// nsIAccessible::ROLE_ROOT_PANE
// nsIAccessibleRole::ROLE_ROOT_PANE
{ USE_ROLE_STRING, IA2_ROLE_ROOT_PANE },
// nsIAccessible::ROLE_SCROLL_PANE
// nsIAccessibleRole::ROLE_SCROLL_PANE
{ USE_ROLE_STRING, IA2_ROLE_SCROLL_PANE },
// nsIAccessible::ROLE_SPLIT_PANE
// nsIAccessibleRole::ROLE_SPLIT_PANE
{ USE_ROLE_STRING, IA2_ROLE_SPLIT_PANE },
// nsIAccessible::ROLE_TABLE_COLUMN_HEADER
// nsIAccessibleRole::ROLE_TABLE_COLUMN_HEADER
{ ROLE_SYSTEM_COLUMNHEADER, ROLE_SYSTEM_COLUMNHEADER },
// nsIAccessible::ROLE_TABLE_ROW_HEADER
// nsIAccessibleRole::ROLE_TABLE_ROW_HEADER
{ ROLE_SYSTEM_ROWHEADER, ROLE_SYSTEM_ROWHEADER },
// nsIAccessible::ROLE_TEAR_OFF_MENU_ITEM
// nsIAccessibleRole::ROLE_TEAR_OFF_MENU_ITEM
{ ROLE_SYSTEM_MENUITEM, ROLE_SYSTEM_MENUITEM },
// nsIAccessible::ROLE_TERMINAL
// nsIAccessibleRole::ROLE_TERMINAL
{ USE_ROLE_STRING, IA2_ROLE_UNKNOWN },
// nsIAccessible::ROLE_TEXT_CONTAINER
// nsIAccessibleRole::ROLE_TEXT_CONTAINER
{ USE_ROLE_STRING, IA2_ROLE_TEXT_FRAME },
// nsIAccessible::ROLE_TOGGLE_BUTTON
// nsIAccessibleRole::ROLE_TOGGLE_BUTTON
{ USE_ROLE_STRING, IA2_ROLE_TOGGLE_BUTTON },
// nsIAccessible::ROLE_TREE_TABLE
// nsIAccessibleRole::ROLE_TREE_TABLE
{ ROLE_SYSTEM_OUTLINE, ROLE_SYSTEM_OUTLINE },
// nsIAccessible::ROLE_VIEWPORT
// nsIAccessibleRole::ROLE_VIEWPORT
{ ROLE_SYSTEM_PANE, IA2_ROLE_VIEW_PORT },
// nsIAccessible::ROLE_HEADER
// nsIAccessibleRole::ROLE_HEADER
{ USE_ROLE_STRING, IA2_ROLE_HEADER },
// nsIAccessible::ROLE_FOOTER
// nsIAccessibleRole::ROLE_FOOTER
{ USE_ROLE_STRING, IA2_ROLE_FOOTER },
// nsIAccessible::ROLE_PARAGRAPH
// nsIAccessibleRole::ROLE_PARAGRAPH
{ USE_ROLE_STRING, IA2_ROLE_PARAGRAPH },
// nsIAccessible::ROLE_RULER
// nsIAccessibleRole::ROLE_RULER
{ USE_ROLE_STRING, IA2_ROLE_RULER },
// nsIAccessible::ROLE_AUTOCOMPLETE
// nsIAccessibleRole::ROLE_AUTOCOMPLETE
{ ROLE_SYSTEM_COMBOBOX, ROLE_SYSTEM_COMBOBOX },
// nsIAccessible::ROLE_EDITBAR
// nsIAccessibleRole::ROLE_EDITBAR
{ ROLE_SYSTEM_TEXT, IA2_ROLE_EDITBAR },
// nsIAccessible::ROLE_ENTRY
// nsIAccessibleRole::ROLE_ENTRY
{ ROLE_SYSTEM_TEXT, ROLE_SYSTEM_TEXT },
// nsIAccessible::ROLE_CAPTION
// nsIAccessibleRole::ROLE_CAPTION
{ USE_ROLE_STRING, IA2_ROLE_CAPTION },
// nsIAccessible::ROLE_DOCUMENT_FRAME
// nsIAccessibleRole::ROLE_DOCUMENT_FRAME
{ USE_ROLE_STRING, IA2_ROLE_UNKNOWN },
// nsIAccessible::ROLE_HEADING
// nsIAccessibleRole::ROLE_HEADING
{ USE_ROLE_STRING, IA2_ROLE_HEADING },
// nsIAccessible::ROLE_PAGE
// nsIAccessibleRole::ROLE_PAGE
{ USE_ROLE_STRING, IA2_ROLE_PAGE },
// nsIAccessible::ROLE_SECTION
// nsIAccessibleRole::ROLE_SECTION
{ USE_ROLE_STRING, IA2_ROLE_SECTION },
// nsIAccessible::ROLE_REDUNDANT_OBJECT
// nsIAccessibleRole::ROLE_REDUNDANT_OBJECT
{ USE_ROLE_STRING, IA2_ROLE_REDUNDANT_OBJECT },
// nsIAccessible::ROLE_FORM
// nsIAccessibleRole::ROLE_FORM
{ USE_ROLE_STRING, IA2_ROLE_FORM },
// nsIAccessible::ROLE_IME
// nsIAccessibleRole::ROLE_IME
{ USE_ROLE_STRING, IA2_ROLE_INPUT_METHOD_WINDOW },
// nsIAccessible::ROLE_APP_ROOT
// nsIAccessibleRole::ROLE_APP_ROOT
{ ROLE_SYSTEM_APPLICATION, ROLE_SYSTEM_APPLICATION },
// nsIAccessible::ROLE_PARENT_MENUITEM
// nsIAccessibleRole::ROLE_PARENT_MENUITEM
{ ROLE_SYSTEM_MENUITEM, ROLE_SYSTEM_MENUITEM },
// nsIAccessible::ROLE_CALENDAR
// nsIAccessibleRole::ROLE_CALENDAR
{ ROLE_SYSTEM_CLIENT, ROLE_SYSTEM_CLIENT },
// nsIAccessible::ROLE_COMBOBOX_LIST
// nsIAccessibleRole::ROLE_COMBOBOX_LIST
{ ROLE_SYSTEM_LIST, ROLE_SYSTEM_LIST },
// nsIAccessible::ROLE_COMBOBOX_LISTITEM
// nsIAccessibleRole::ROLE_COMBOBOX_LISTITEM
{ ROLE_SYSTEM_LISTITEM, ROLE_SYSTEM_LISTITEM },
// nsIAccessible::ROLE_LAST_ENTRY
// nsIAccessibleRole::ROLE_LAST_ENTRY
{ ROLE_WINDOWS_LAST_ENTRY, ROLE_WINDOWS_LAST_ENTRY }
};

View File

@ -61,7 +61,8 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetRole(PRUint32 *aRole)
}
// No primary column means we're in a list
// In fact, history and mail turn off the primary flag when switching to a flat view
*aRole = primaryCol ? ROLE_OUTLINE : ROLE_LIST;
*aRole = primaryCol ? nsIAccessibleRole::ROLE_OUTLINE :
nsIAccessibleRole::ROLE_LIST;
return NS_OK;
}
@ -86,7 +87,8 @@ NS_IMETHODIMP nsXULTreeitemAccessibleWrap::GetRole(PRUint32 *aRole)
NS_ASSERTION(mColumn, "mColumn is null");
PRBool isPrimary = PR_FALSE;
mColumn->GetPrimary(&isPrimary);
*aRole = isPrimary ? ROLE_OUTLINEITEM : ROLE_LISTITEM;
*aRole = isPrimary ? nsIAccessibleRole::ROLE_OUTLINEITEM :
nsIAccessibleRole::ROLE_LISTITEM;
return NS_OK;
}
@ -136,7 +138,7 @@ NS_IMETHODIMP nsXULTreeitemAccessibleWrap::GetDescription(nsAString& aDescriptio
PRUint32 itemRole;
GetRole(&itemRole);
if (itemRole == ROLE_LISTITEM) {
if (itemRole == nsIAccessibleRole::ROLE_LISTITEM) {
return nsAccessibleWrap::GetDescription(aDescription);
}

View File

@ -281,7 +281,7 @@ nsXFormsContainerAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_GROUPING;
*aRole = nsIAccessibleRole::ROLE_GROUPING;
return NS_OK;
}

View File

@ -51,7 +51,7 @@ nsXFormsLabelAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_STATICTEXT;
*aRole = nsIAccessibleRole::ROLE_STATICTEXT;
return NS_OK;
}
@ -87,7 +87,7 @@ nsXFormsOutputAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_STATICTEXT;
*aRole = nsIAccessibleRole::ROLE_STATICTEXT;
return NS_OK;
}
@ -104,7 +104,7 @@ nsXFormsTriggerAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_PUSHBUTTON;
*aRole = nsIAccessibleRole::ROLE_PUSHBUTTON;
return NS_OK;
}
@ -156,7 +156,7 @@ nsXFormsInputAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_ENTRY;
*aRole = nsIAccessibleRole::ROLE_ENTRY;
return NS_OK;
}
@ -201,7 +201,7 @@ nsXFormsInputBooleanAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_CHECKBUTTON;
*aRole = nsIAccessibleRole::ROLE_CHECKBUTTON;
return NS_OK;
}
@ -270,7 +270,7 @@ nsXFormsInputDateAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_DROPLIST;
*aRole = nsIAccessibleRole::ROLE_DROPLIST;
return NS_OK;
}
@ -287,7 +287,7 @@ nsXFormsSecretAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_PASSWORD_TEXT;
*aRole = nsIAccessibleRole::ROLE_PASSWORD_TEXT;
return NS_OK;
}
@ -321,7 +321,7 @@ nsXFormsRangeAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_SLIDER;
*aRole = nsIAccessibleRole::ROLE_SLIDER;
return NS_OK;
}
@ -437,7 +437,7 @@ nsXFormsChoicesAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_GROUPING;
*aRole = nsIAccessibleRole::ROLE_GROUPING;
return NS_OK;
}
@ -468,7 +468,7 @@ nsXFormsSelectFullAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_GROUPING;
*aRole = nsIAccessibleRole::ROLE_GROUPING;
return NS_OK;
}
@ -492,7 +492,7 @@ nsXFormsItemCheckgroupAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_CHECKBUTTON;
*aRole = nsIAccessibleRole::ROLE_CHECKBUTTON;
return NS_OK;
}
@ -536,7 +536,7 @@ nsXFormsItemRadiogroupAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_RADIOBUTTON;
*aRole = nsIAccessibleRole::ROLE_RADIOBUTTON;
return NS_OK;
}
@ -576,7 +576,7 @@ nsXFormsSelectComboboxAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_COMBOBOX;
*aRole = nsIAccessibleRole::ROLE_COMBOBOX;
return NS_OK;
}
@ -622,7 +622,7 @@ nsXFormsItemComboboxAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_LISTITEM;
*aRole = nsIAccessibleRole::ROLE_LISTITEM;
return NS_OK;
}

View File

@ -51,7 +51,7 @@ nsXFormsDropmarkerWidgetAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_PUSHBUTTON;
*aRole = nsIAccessibleRole::ROLE_PUSHBUTTON;
return NS_OK;
}
@ -123,7 +123,7 @@ nsXFormsCalendarWidgetAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_CALENDAR;
*aRole = nsIAccessibleRole::ROLE_CALENDAR;
return NS_OK;
}
@ -141,7 +141,7 @@ nsXFormsComboboxPopupWidgetAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = ROLE_LIST;
*aRole = nsIAccessibleRole::ROLE_LIST;
return NS_OK;
}

View File

@ -49,7 +49,7 @@ nsXULAlertAccessible::nsXULAlertAccessible(nsIDOMNode* aNode, nsIWeakReference*
NS_IMETHODIMP nsXULAlertAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_ALERT;
*aRole = nsIAccessibleRole::ROLE_ALERT;
return NS_OK;
}

View File

@ -58,7 +58,7 @@ nsFormControlAccessible(aNode, aShell)
*/
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
*_retval = nsIAccessibleRole::ROLE_PUSHBUTTON;
return NS_OK;
}
@ -125,7 +125,7 @@ NS_IMETHODIMP nsXULColorPickerAccessible::GetState(PRUint32 *_retval)
NS_IMETHODIMP nsXULColorPickerAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_BUTTONDROPDOWNGRID;
*_retval = nsIAccessibleRole::ROLE_BUTTONDROPDOWNGRID;
return NS_OK;
}

View File

@ -106,7 +106,7 @@ NS_IMETHODIMP nsXULButtonAccessible::DoAction(PRUint8 index)
*/
NS_IMETHODIMP nsXULButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
*_retval = nsIAccessibleRole::ROLE_PUSHBUTTON;
return NS_OK;
}
@ -185,7 +185,8 @@ void nsXULButtonAccessible::CacheChildren()
if (dropMarkerAccessible) {
PRUint32 role;
if (NS_SUCCEEDED(dropMarkerAccessible->GetRole(&role)) && role == ROLE_PUSHBUTTON) {
if (NS_SUCCEEDED(dropMarkerAccessible->GetRole(&role)) &&
role == nsIAccessibleRole::ROLE_PUSHBUTTON) {
SetFirstChild(dropMarkerAccessible);
nsCOMPtr<nsPIAccessible> privChildAcc = do_QueryInterface(dropMarkerAccessible);
privChildAcc->SetNextSibling(nsnull);
@ -275,7 +276,7 @@ NS_IMETHODIMP nsXULDropmarkerAccessible::DoAction(PRUint8 index)
*/
NS_IMETHODIMP nsXULDropmarkerAccessible::GetRole(PRUint32 *aResult)
{
*aResult = ROLE_PUSHBUTTON;
*aResult = nsIAccessibleRole::ROLE_PUSHBUTTON;
return NS_OK;
}
@ -306,7 +307,7 @@ nsFormControlAccessible(aNode, aShell)
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
*_retval = nsIAccessibleRole::ROLE_CHECKBUTTON;
return NS_OK;
}
@ -386,7 +387,7 @@ nsAccessibleWrap(aNode, aShell)
NS_IMETHODIMP nsXULGroupboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_GROUPING;
*_retval = nsIAccessibleRole::ROLE_GROUPING;
return NS_OK;
}
@ -441,7 +442,7 @@ nsFormControlAccessible(aNode, aShell)
NS_IMETHODIMP nsXULProgressMeterAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PROGRESSBAR;
*_retval = nsIAccessibleRole::ROLE_PROGRESSBAR;
return NS_OK;
}
@ -544,7 +545,7 @@ nsXULSelectableAccessible(aNode, aShell)
NS_IMETHODIMP nsXULRadioGroupAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_GROUPING;
*_retval = nsIAccessibleRole::ROLE_GROUPING;
return NS_OK;
}
@ -574,7 +575,7 @@ nsAccessibleWrap(aNode, aShell)
*/
NS_IMETHODIMP nsXULStatusBarAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_STATUSBAR;
*_retval = nsIAccessibleRole::ROLE_STATUSBAR;
return NS_OK;
}
@ -594,7 +595,7 @@ nsAccessibleWrap(aNode, aShell)
NS_IMETHODIMP nsXULToolbarAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_TOOLBAR;
*_retval = nsIAccessibleRole::ROLE_TOOLBAR;
return NS_OK;
}
@ -616,7 +617,7 @@ nsLeafAccessible(aNode, aShell)
NS_IMETHODIMP nsXULToolbarSeparatorAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_SEPARATOR;
*_retval = nsIAccessibleRole::ROLE_SEPARATOR;
return NS_OK;
}
@ -756,12 +757,12 @@ NS_IMETHODIMP nsXULTextFieldAccessible::GetState(PRUint32 *aState)
NS_IMETHODIMP nsXULTextFieldAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_ENTRY;
*aRole = nsIAccessibleRole::ROLE_ENTRY;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
if (content &&
content->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
nsAccessibilityAtoms::password, eIgnoreCase)) {
*aRole = ROLE_PASSWORD_TEXT;
*aRole = nsIAccessibleRole::ROLE_PASSWORD_TEXT;
}
return NS_OK;
}

View File

@ -360,7 +360,7 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetKeyboardShortcut(nsAString& _retval)
if (parentAccessible) {
PRUint32 role;
parentAccessible->GetRole(&role);
if (role == ROLE_MENUBAR) {
if (role == nsIAccessibleRole::ROLE_MENUBAR) {
// If top level menu item, add Alt+ or whatever modifier text to string
// No need to cache pref service, this happens rarely
if (gMenuAccesskeyModifier == -1) {
@ -408,9 +408,9 @@ nsXULMenuitemAccessible::GetDefaultKeyBinding(nsAString& aKeyBinding)
NS_IMETHODIMP nsXULMenuitemAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_MENUITEM;
if (mParent && Role(mParent) == ROLE_COMBOBOX_LIST) {
*aRole = ROLE_COMBOBOX_LISTITEM;
*aRole = nsIAccessibleRole::ROLE_MENUITEM;
if (mParent && Role(mParent) == nsIAccessibleRole::ROLE_COMBOBOX_LIST) {
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_LISTITEM;
return NS_OK;
}
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
@ -419,14 +419,14 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetRole(PRUint32 *aRole)
nsAutoString menuItemType;
element->GetAttribute(NS_LITERAL_STRING("type"), menuItemType);
if (menuItemType.EqualsIgnoreCase("radio"))
*aRole = ROLE_RADIO_MENU_ITEM;
*aRole = nsIAccessibleRole::ROLE_RADIO_MENU_ITEM;
else if (menuItemType.EqualsIgnoreCase("checkbox"))
*aRole = ROLE_CHECK_MENU_ITEM;
*aRole = nsIAccessibleRole::ROLE_CHECK_MENU_ITEM;
else { // Fortunately, radio/checkbox menuitems don't typically have children
PRInt32 childCount;
GetChildCount(&childCount);
if (childCount > 0) {
*aRole = ROLE_PARENT_MENUITEM;
*aRole = nsIAccessibleRole::ROLE_PARENT_MENUITEM;
}
}
@ -492,7 +492,7 @@ NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetName(nsAString& _retval)
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_SEPARATOR;
*_retval = nsIAccessibleRole::ROLE_SEPARATOR;
return NS_OK;
}
@ -607,11 +607,11 @@ NS_IMETHODIMP nsXULMenupopupAccessible::GetName(nsAString& _retval)
NS_IMETHODIMP nsXULMenupopupAccessible::GetRole(PRUint32 *aRole)
{
if (mParent && Role(mParent) == ROLE_COMBOBOX) {
*aRole = ROLE_COMBOBOX_LIST;
if (mParent && Role(mParent) == nsIAccessibleRole::ROLE_COMBOBOX) {
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_LIST;
}
else {
*aRole = ROLE_MENUPOPUP;
*aRole = nsIAccessibleRole::ROLE_MENUPOPUP;
}
return NS_OK;
}
@ -640,7 +640,7 @@ NS_IMETHODIMP nsXULMenubarAccessible::GetName(nsAString& _retval)
NS_IMETHODIMP nsXULMenubarAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_MENUBAR;
*_retval = nsIAccessibleRole::ROLE_MENUBAR;
return NS_OK;
}

View File

@ -114,7 +114,7 @@ NS_IMETHODIMP nsXULListboxAccessible::GetValue(nsAString& _retval)
NS_IMETHODIMP nsXULListboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
*_retval = nsIAccessibleRole::ROLE_LIST;
return NS_OK;
}
@ -164,9 +164,9 @@ NS_IMETHODIMP nsXULListitemAccessible::GetName(nsAString& _retval)
NS_IMETHODIMP nsXULListitemAccessible::GetRole(PRUint32 *aRole)
{
if (mIsCheckbox)
*aRole = ROLE_CHECKBUTTON;
*aRole = nsIAccessibleRole::ROLE_CHECKBUTTON;
else
*aRole = ROLE_LISTITEM;
*aRole = nsIAccessibleRole::ROLE_LISTITEM;
return NS_OK;
}
@ -241,7 +241,8 @@ NS_IMETHODIMP nsXULComboboxAccessible::GetRole(PRUint32 *aRole)
}
*aRole = content->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
NS_LITERAL_STRING("autocomplete"), eIgnoreCase) ?
ROLE_AUTOCOMPLETE : ROLE_COMBOBOX;
nsIAccessibleRole::ROLE_AUTOCOMPLETE :
nsIAccessibleRole::ROLE_COMBOBOX;
return NS_OK;
}

View File

@ -89,7 +89,7 @@ NS_IMETHODIMP nsXULTabAccessible::DoAction(PRUint8 index)
/** We are a tab */
NS_IMETHODIMP nsXULTabAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PAGETAB;
*_retval = nsIAccessibleRole::ROLE_PAGETAB;
return NS_OK;
}
@ -142,7 +142,7 @@ nsAccessibleWrap(aNode, aShell)
/** We are a window*/
NS_IMETHODIMP nsXULTabBoxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PANE;
*_retval = nsIAccessibleRole::ROLE_PANE;
return NS_OK;
}
@ -185,7 +185,7 @@ nsAccessibleWrap(aNode, aShell)
/** We are a Property Page */
NS_IMETHODIMP nsXULTabPanelsAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_PROPERTYPAGE;
*aRole = nsIAccessibleRole::ROLE_PROPERTYPAGE;
return NS_OK;
}
@ -222,7 +222,7 @@ nsXULSelectableAccessible(aNode, aShell)
/** We are a Page Tab List */
NS_IMETHODIMP nsXULTabsAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PAGETABLIST;
*_retval = nsIAccessibleRole::ROLE_PAGETABLIST;
return NS_OK;
}

View File

@ -102,7 +102,7 @@ NS_IMETHODIMP nsXULTooltipAccessible::GetState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTooltipAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_TOOLTIP;
*_retval = nsIAccessibleRole::ROLE_TOOLTIP;
return NS_OK;
}
@ -141,10 +141,10 @@ NS_IMETHODIMP nsXULLinkAccessible::GetName(nsAString& aName)
NS_IMETHODIMP nsXULLinkAccessible::GetRole(PRUint32 *aRole)
{
if (mIsLink) {
*aRole = ROLE_LINK;
*aRole = nsIAccessibleRole::ROLE_LINK;
} else {
// default to calling the link a button; might have javascript
*aRole = ROLE_PUSHBUTTON;
*aRole = nsIAccessibleRole::ROLE_PUSHBUTTON;
}
// should there be a third case where it becomes just text?
return NS_OK;

View File

@ -53,7 +53,7 @@ public:
nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *aRole) { *aRole = ROLE_LABEL; return NS_OK; }
NS_IMETHOD GetRole(PRUint32 *aRole) { *aRole = nsIAccessibleRole::ROLE_LABEL; return NS_OK; }
};
class nsXULTooltipAccessible : public nsLeafAccessible

View File

@ -237,9 +237,9 @@ NS_IMETHODIMP nsXULTreeAccessible::GetRole(PRUint32 *aRole)
NS_ASSERTION(mTree, "No tree view");
PRInt32 colCount = 0;
if (NS_SUCCEEDED(GetColumnCount(mTree, &colCount)) && (colCount > 1))
*aRole = ROLE_TREE_TABLE;
*aRole = nsIAccessibleRole::ROLE_TREE_TABLE;
else
*aRole = ROLE_OUTLINE;
*aRole = nsIAccessibleRole::ROLE_OUTLINE;
return NS_OK;
}
@ -568,9 +568,9 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetRole(PRUint32 *aRole)
{
PRInt32 colCount = 0;
if (NS_SUCCEEDED(nsXULTreeAccessible::GetColumnCount(mTree, &colCount)) && colCount > 1)
*aRole = ROLE_CELL;
*aRole = nsIAccessibleRole::ROLE_CELL;
else
*aRole = ROLE_OUTLINEITEM;
*aRole = nsIAccessibleRole::ROLE_OUTLINEITEM;
return NS_OK;
}
@ -924,7 +924,7 @@ NS_IMETHODIMP nsXULTreeColumnsAccessible::GetState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
*_retval = nsIAccessibleRole::ROLE_LIST;
return NS_OK;
}
@ -1006,7 +1006,7 @@ NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetName(nsAString& _retval)
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_COLUMNHEADER;
*_retval = nsIAccessibleRole::ROLE_COLUMNHEADER;
return NS_OK;
}