2007-03-27 05:17:11 -07:00
|
|
|
/* -*- 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> (original author)
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either of 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 ***** */
|
|
|
|
|
2008-10-15 18:52:58 -07:00
|
|
|
#ifndef nsCoreUtils_h_
|
|
|
|
#define nsCoreUtils_h_
|
2007-03-27 05:17:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
#include "nsIDOMNode.h"
|
2007-05-08 14:44:04 -07:00
|
|
|
#include "nsIContent.h"
|
2009-05-06 02:54:26 -07:00
|
|
|
#include "nsIBoxObject.h"
|
|
|
|
#include "nsITreeBoxObject.h"
|
2009-08-19 23:45:19 -07:00
|
|
|
#include "nsITreeColumns.h"
|
2009-05-06 02:54:26 -07:00
|
|
|
|
2007-08-23 21:54:45 -07:00
|
|
|
#include "nsIFrame.h"
|
2007-09-05 00:39:09 -07:00
|
|
|
#include "nsIDocShellTreeItem.h"
|
2010-04-26 23:52:03 -07:00
|
|
|
#include "nsIDOMCSSStyleDeclaration.h"
|
|
|
|
#include "nsIDOMDOMStringList.h"
|
2009-05-13 22:31:09 -07:00
|
|
|
#include "nsIMutableArray.h"
|
2007-09-05 00:39:09 -07:00
|
|
|
#include "nsPoint.h"
|
2010-04-26 23:52:03 -07:00
|
|
|
#include "nsTArray.h"
|
2007-03-27 05:17:11 -07:00
|
|
|
|
2010-04-26 23:52:03 -07:00
|
|
|
/**
|
|
|
|
* Core utils.
|
|
|
|
*/
|
2008-10-15 18:52:58 -07:00
|
|
|
class nsCoreUtils
|
2007-03-27 05:17:11 -07:00
|
|
|
{
|
|
|
|
public:
|
2007-07-05 09:02:55 -07:00
|
|
|
/**
|
2010-02-03 07:00:25 -08:00
|
|
|
* Return true if the given node has registered click, mousedown or mouseup
|
|
|
|
* event listeners.
|
2007-07-05 09:02:55 -07:00
|
|
|
*/
|
2010-02-03 07:00:25 -08:00
|
|
|
static PRBool HasClickListener(nsIContent *aContent);
|
2007-07-05 09:02:55 -07:00
|
|
|
|
2008-08-06 05:16:54 -07:00
|
|
|
/**
|
2009-08-19 23:45:19 -07:00
|
|
|
* Dispatch click event to XUL tree cell.
|
2008-08-06 05:16:54 -07:00
|
|
|
*
|
2009-08-19 23:45:19 -07:00
|
|
|
* @param aTreeBoxObj [in] tree box object
|
|
|
|
* @param aRowIndex [in] row index
|
|
|
|
* @param aColumn [in] column object
|
|
|
|
* @param aPseudoElm [in] pseudo elemenet inside the cell, see
|
|
|
|
* nsITreeBoxObject for available values
|
|
|
|
*/
|
|
|
|
static void DispatchClickEvent(nsITreeBoxObject *aTreeBoxObj,
|
|
|
|
PRInt32 aRowIndex, nsITreeColumn *aColumn,
|
|
|
|
const nsCString& aPseudoElt = EmptyCString());
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Send mouse event to the given element.
|
|
|
|
*
|
|
|
|
* @param aEventType [in] an event type (see nsGUIEvent.h for constants)
|
|
|
|
* @param aPresShell [in] the presshell for the given element
|
|
|
|
* @param aContent [in] the element
|
2008-08-06 05:16:54 -07:00
|
|
|
*/
|
|
|
|
static PRBool DispatchMouseEvent(PRUint32 aEventType,
|
|
|
|
nsIPresShell *aPresShell,
|
|
|
|
nsIContent *aContent);
|
|
|
|
|
2009-08-19 23:45:19 -07:00
|
|
|
/**
|
|
|
|
* Send mouse event to the given element.
|
|
|
|
*
|
|
|
|
* @param aEventType [in] an event type (see nsGUIEvent.h for constants)
|
|
|
|
* @param aX [in] x coordinate in dev pixels
|
|
|
|
* @param aY [in] y coordinate in dev pixels
|
|
|
|
* @param aContent [in] the element
|
|
|
|
* @param aFrame [in] frame of the element
|
|
|
|
* @param aPresShell [in] the presshell for the element
|
|
|
|
* @param aRootWidget [in] the root widget of the element
|
|
|
|
*/
|
|
|
|
static void DispatchMouseEvent(PRUint32 aEventType, PRInt32 aX, PRInt32 aY,
|
|
|
|
nsIContent *aContent, nsIFrame *aFrame,
|
|
|
|
nsIPresShell *aPresShell,
|
|
|
|
nsIWidget *aRootWidget);
|
|
|
|
|
2007-08-28 23:52:46 -07:00
|
|
|
/**
|
|
|
|
* Return an accesskey registered on the given element by
|
2011-04-21 10:35:52 -07:00
|
|
|
* nsEventStateManager or 0 if there is no registered accesskey.
|
2007-08-28 23:52:46 -07:00
|
|
|
*
|
|
|
|
* @param aContent - the given element.
|
|
|
|
*/
|
|
|
|
static PRUint32 GetAccessKeyFor(nsIContent *aContent);
|
|
|
|
|
2008-07-17 05:06:24 -07:00
|
|
|
/**
|
|
|
|
* Return DOM element related with the given node, i.e.
|
|
|
|
* a) itself if it is DOM element
|
|
|
|
* b) parent element if it is text node
|
2010-06-11 01:23:18 -07:00
|
|
|
* c) otherwise nsnull
|
2008-07-17 05:06:24 -07:00
|
|
|
*
|
|
|
|
* @param aNode [in] the given DOM node
|
|
|
|
*/
|
2010-06-11 01:23:18 -07:00
|
|
|
static nsIContent* GetDOMElementFor(nsIContent *aContent);
|
2008-07-17 05:06:24 -07:00
|
|
|
|
2008-12-16 02:14:20 -08:00
|
|
|
/**
|
|
|
|
* Return DOM node for the given DOM point.
|
|
|
|
*/
|
2010-05-25 01:12:43 -07:00
|
|
|
static nsINode *GetDOMNodeFromDOMPoint(nsINode *aNode, PRUint32 aOffset);
|
|
|
|
|
2008-10-17 03:10:43 -07:00
|
|
|
/**
|
|
|
|
* Return the nsIContent* to check for ARIA attributes on -- this may not
|
|
|
|
* always be the DOM node for the accessible. Specifically, for doc
|
|
|
|
* accessibles, it is not the document node, but either the root element or
|
2010-06-11 01:23:18 -07:00
|
|
|
* <body> in HTML.
|
2008-10-17 03:10:43 -07:00
|
|
|
*
|
2010-06-11 01:23:18 -07:00
|
|
|
* @param aNode [in] DOM node for the accessible that may be affected by ARIA
|
|
|
|
* @return the nsIContent which may have ARIA markup
|
2008-10-17 03:10:43 -07:00
|
|
|
*/
|
2010-06-11 01:23:18 -07:00
|
|
|
static nsIContent* GetRoleContent(nsINode *aNode);
|
2008-10-17 03:10:43 -07:00
|
|
|
|
2007-08-14 11:47:49 -07:00
|
|
|
/**
|
|
|
|
* Is the first passed in node an ancestor of the second?
|
|
|
|
* Note: A node is not considered to be the ancestor of itself.
|
2010-01-27 03:43:25 -08:00
|
|
|
*
|
|
|
|
* @param aPossibleAncestorNode [in] node to test for ancestor-ness of
|
|
|
|
* aPossibleDescendantNode
|
|
|
|
* @param aPossibleDescendantNode [in] node to test for descendant-ness of
|
|
|
|
* aPossibleAncestorNode
|
2010-06-09 20:29:56 -07:00
|
|
|
* @param aRootNode [in, optional] the root node that search
|
|
|
|
* search should be performed within
|
2010-01-27 03:43:25 -08:00
|
|
|
* @return PR_TRUE if aPossibleAncestorNode is an ancestor of
|
|
|
|
* aPossibleDescendantNode
|
2007-08-14 11:47:49 -07:00
|
|
|
*/
|
2010-01-27 03:43:25 -08:00
|
|
|
static PRBool IsAncestorOf(nsINode *aPossibleAncestorNode,
|
2010-06-09 20:29:56 -07:00
|
|
|
nsINode *aPossibleDescendantNode,
|
|
|
|
nsINode *aRootNode = nsnull);
|
2007-08-20 20:16:27 -07:00
|
|
|
|
2007-08-23 21:54:45 -07:00
|
|
|
/**
|
|
|
|
* Helper method to scroll range into view, used for implementation of
|
|
|
|
* nsIAccessibleText::scrollSubstringTo().
|
|
|
|
*
|
|
|
|
* @param aFrame the frame for accessible the range belongs to.
|
|
|
|
* @param aStartNode start node of a range
|
|
|
|
* @param aStartOffset an offset inside the start node
|
|
|
|
* @param aEndNode end node of a range
|
|
|
|
* @param aEndOffset an offset inside the end node
|
|
|
|
* @param aScrollType the place a range should be scrolled to
|
|
|
|
*/
|
|
|
|
static nsresult ScrollSubstringTo(nsIFrame *aFrame,
|
|
|
|
nsIDOMNode *aStartNode, PRInt32 aStartIndex,
|
|
|
|
nsIDOMNode *aEndNode, PRInt32 aEndIndex,
|
|
|
|
PRUint32 aScrollType);
|
|
|
|
|
2007-09-24 22:48:51 -07:00
|
|
|
/** Helper method to scroll range into view, used for implementation of
|
|
|
|
* nsIAccessibleText::scrollSubstringTo[Point]().
|
|
|
|
*
|
|
|
|
* @param aFrame the frame for accessible the range belongs to.
|
|
|
|
* @param aStartNode start node of a range
|
|
|
|
* @param aStartOffset an offset inside the start node
|
|
|
|
* @param aEndNode end node of a range
|
|
|
|
* @param aEndOffset an offset inside the end node
|
|
|
|
* @param aVPercent how to align vertically, specified in percents
|
|
|
|
* @param aHPercent how to align horizontally, specified in percents
|
|
|
|
*/
|
|
|
|
static nsresult ScrollSubstringTo(nsIFrame *aFrame,
|
|
|
|
nsIDOMNode *aStartNode, PRInt32 aStartIndex,
|
|
|
|
nsIDOMNode *aEndNode, PRInt32 aEndIndex,
|
|
|
|
PRInt16 aVPercent, PRInt16 aHPercent);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Scrolls the given frame to the point, used for implememntation of
|
|
|
|
* nsIAccessNode::scrollToPoint and nsIAccessibleText::scrollSubstringToPoint.
|
|
|
|
*
|
|
|
|
* @param aScrollableFrame the scrollable frame
|
|
|
|
* @param aFrame the frame to scroll
|
|
|
|
* @param aPoint the point scroll to
|
|
|
|
*/
|
|
|
|
static void ScrollFrameToPoint(nsIFrame *aScrollableFrame,
|
|
|
|
nsIFrame *aFrame, const nsIntPoint& aPoint);
|
|
|
|
|
2007-08-23 21:54:45 -07:00
|
|
|
/**
|
|
|
|
* Converts scroll type constant defined in nsIAccessibleScrollType to
|
|
|
|
* vertical and horizontal percents.
|
|
|
|
*/
|
|
|
|
static void ConvertScrollTypeToPercents(PRUint32 aScrollType,
|
|
|
|
PRInt16 *aVPercent,
|
|
|
|
PRInt16 *aHPercent);
|
2007-09-05 00:39:09 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns coordinates relative screen for the top level window.
|
|
|
|
*
|
2007-12-01 09:30:09 -08:00
|
|
|
* @param aNode the DOM node hosted in the window.
|
2007-09-05 00:39:09 -07:00
|
|
|
*/
|
2010-06-11 01:23:18 -07:00
|
|
|
static nsIntPoint GetScreenCoordsForWindow(nsINode *aNode);
|
2007-09-05 00:39:09 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return document shell tree item for the given DOM node.
|
|
|
|
*/
|
|
|
|
static already_AddRefed<nsIDocShellTreeItem>
|
2010-06-11 01:23:18 -07:00
|
|
|
GetDocShellTreeItemFor(nsINode *aNode);
|
2007-09-18 14:36:41 -07:00
|
|
|
|
2010-06-08 09:39:58 -07:00
|
|
|
/**
|
|
|
|
* Return true if the given document is root document.
|
|
|
|
*/
|
|
|
|
static PRBool IsRootDocument(nsIDocument *aDocument);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return true if the given document is content document (not chrome).
|
|
|
|
*/
|
|
|
|
static PRBool IsContentDocument(nsIDocument *aDocument);
|
|
|
|
|
2011-07-21 17:49:35 -07:00
|
|
|
/**
|
|
|
|
* Return true if the given document node is for tab document accessible.
|
|
|
|
*/
|
|
|
|
static bool IsTabDocument(nsIDocument* aDocumentNode);
|
|
|
|
|
2010-06-08 09:39:58 -07:00
|
|
|
/**
|
|
|
|
* Return true if the given document is an error page.
|
|
|
|
*/
|
|
|
|
static PRBool IsErrorPage(nsIDocument *aDocument);
|
|
|
|
|
2008-10-17 03:10:43 -07:00
|
|
|
/**
|
|
|
|
* Retrun true if the type of given frame equals to the given frame type.
|
|
|
|
*
|
|
|
|
* @param aFrame the frame
|
|
|
|
* @param aAtom the frame type
|
|
|
|
*/
|
|
|
|
static PRBool IsCorrectFrameType(nsIFrame* aFrame, nsIAtom* aAtom);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return presShell for the document containing the given DOM node.
|
|
|
|
*/
|
2010-06-11 01:23:18 -07:00
|
|
|
static nsIPresShell *GetPresShellFor(nsINode *aNode)
|
2010-05-17 06:42:32 -07:00
|
|
|
{
|
2010-06-11 01:23:18 -07:00
|
|
|
nsIDocument *document = aNode->GetOwnerDoc();
|
2010-06-25 06:59:57 -07:00
|
|
|
return document ? document->GetShell() : nsnull;
|
2010-05-17 06:42:32 -07:00
|
|
|
}
|
2010-06-11 01:23:18 -07:00
|
|
|
static already_AddRefed<nsIWeakReference> GetWeakShellFor(nsINode *aNode)
|
|
|
|
{
|
|
|
|
nsCOMPtr<nsIWeakReference> weakShell =
|
|
|
|
do_GetWeakReference(GetPresShellFor(aNode));
|
|
|
|
return weakShell.forget();
|
|
|
|
}
|
2008-10-17 03:10:43 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return document node for the given document shell tree item.
|
|
|
|
*/
|
|
|
|
static already_AddRefed<nsIDOMNode>
|
|
|
|
GetDOMNodeForContainer(nsIDocShellTreeItem *aContainer);
|
|
|
|
|
2007-09-18 14:36:41 -07:00
|
|
|
/**
|
|
|
|
* Get the ID for an element, in some types of XML this may not be the ID attribute
|
|
|
|
* @param aContent Node to get the ID for
|
|
|
|
* @param aID Where to put ID string
|
|
|
|
* @return PR_TRUE if there is an ID set for this node
|
|
|
|
*/
|
|
|
|
static PRBool GetID(nsIContent *aContent, nsAString& aID);
|
2007-09-24 18:19:03 -07:00
|
|
|
|
2010-01-12 11:07:38 -08:00
|
|
|
/**
|
|
|
|
* Convert attribute value of the given node to positive integer. If no
|
|
|
|
* attribute or wrong value then false is returned.
|
|
|
|
*/
|
|
|
|
static PRBool GetUIntAttr(nsIContent *aContent, nsIAtom *aAttr,
|
|
|
|
PRInt32 *aUInt);
|
|
|
|
|
2008-03-30 23:21:35 -07:00
|
|
|
/**
|
|
|
|
* Check if the given element is XLink.
|
|
|
|
*
|
|
|
|
* @param aContent the given element
|
|
|
|
* @return PR_TRUE if the given element is XLink
|
|
|
|
*/
|
|
|
|
static PRBool IsXLink(nsIContent *aContent);
|
|
|
|
|
2008-07-17 05:06:24 -07:00
|
|
|
/**
|
|
|
|
* Returns language for the given node.
|
|
|
|
*
|
|
|
|
* @param aContent [in] the given node
|
|
|
|
* @param aRootContent [in] container of the given node
|
|
|
|
* @param aLanguage [out] language
|
|
|
|
*/
|
|
|
|
static void GetLanguageFor(nsIContent *aContent, nsIContent *aRootContent,
|
|
|
|
nsAString& aLanguage);
|
|
|
|
|
2008-10-17 03:10:43 -07:00
|
|
|
/**
|
|
|
|
* Return computed styles declaration for the given node.
|
|
|
|
*/
|
2010-06-11 01:23:18 -07:00
|
|
|
static already_AddRefed<nsIDOMCSSStyleDeclaration>
|
|
|
|
GetComputedStyleDeclaration(const nsAString& aPseudoElt,
|
|
|
|
nsIContent *aContent);
|
2008-10-17 03:10:43 -07:00
|
|
|
|
2009-05-06 02:54:26 -07:00
|
|
|
/**
|
|
|
|
* Return box object for XUL treechildren element by tree box object.
|
|
|
|
*/
|
|
|
|
static already_AddRefed<nsIBoxObject>
|
|
|
|
GetTreeBodyBoxObject(nsITreeBoxObject *aTreeBoxObj);
|
2009-05-13 22:31:09 -07:00
|
|
|
|
2009-08-19 23:45:19 -07:00
|
|
|
/**
|
|
|
|
* Return tree box object from any levels DOMNode under the XUL tree.
|
|
|
|
*/
|
2010-06-11 01:23:18 -07:00
|
|
|
static already_AddRefed<nsITreeBoxObject>
|
|
|
|
GetTreeBoxObject(nsIContent* aContent);
|
2009-08-19 23:45:19 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return first sensible column for the given tree box object.
|
|
|
|
*/
|
|
|
|
static already_AddRefed<nsITreeColumn>
|
|
|
|
GetFirstSensibleColumn(nsITreeBoxObject *aTree);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return last sensible column for the given tree box object.
|
|
|
|
*/
|
|
|
|
static already_AddRefed<nsITreeColumn>
|
|
|
|
GetLastSensibleColumn(nsITreeBoxObject *aTree);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return sensible columns count for the given tree box object.
|
|
|
|
*/
|
2009-12-10 11:12:19 -08:00
|
|
|
static PRUint32 GetSensibleColumnCount(nsITreeBoxObject *aTree);
|
2009-08-19 23:45:19 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return sensible column at the given index for the given tree box object.
|
|
|
|
*/
|
|
|
|
static already_AddRefed<nsITreeColumn>
|
|
|
|
GetSensibleColumnAt(nsITreeBoxObject *aTree, PRUint32 aIndex);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return next sensible column for the given column.
|
|
|
|
*/
|
|
|
|
static already_AddRefed<nsITreeColumn>
|
|
|
|
GetNextSensibleColumn(nsITreeColumn *aColumn);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return previous sensible column for the given column.
|
|
|
|
*/
|
|
|
|
static already_AddRefed<nsITreeColumn>
|
|
|
|
GetPreviousSensibleColumn(nsITreeColumn *aColumn);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return true if the given column is hidden (i.e. not sensible).
|
|
|
|
*/
|
|
|
|
static PRBool IsColumnHidden(nsITreeColumn *aColumn);
|
|
|
|
|
2009-05-13 22:31:09 -07:00
|
|
|
/**
|
|
|
|
* Return true if the given node is table header element.
|
|
|
|
*/
|
|
|
|
static PRBool IsHTMLTableHeader(nsIContent *aContent)
|
|
|
|
{
|
2011-06-03 14:35:17 -07:00
|
|
|
return aContent->NodeInfo()->Equals(nsGkAtoms::th) ||
|
|
|
|
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::scope);
|
2009-05-13 22:31:09 -07:00
|
|
|
}
|
2011-05-30 11:23:36 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check the visibility across both parent content and chrome.
|
|
|
|
*/
|
|
|
|
static bool CheckVisibilityInParentChain(nsIFrame* aFrame);
|
|
|
|
|
2007-03-27 05:17:11 -07:00
|
|
|
};
|
|
|
|
|
2010-01-25 07:08:08 -08:00
|
|
|
|
|
|
|
/**
|
2010-04-26 23:52:03 -07:00
|
|
|
* nsIDOMDOMStringList implementation.
|
2010-01-25 07:08:08 -08:00
|
|
|
*/
|
2010-04-26 23:52:03 -07:00
|
|
|
class nsAccessibleDOMStringList : public nsIDOMDOMStringList
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsAccessibleDOMStringList() {};
|
|
|
|
virtual ~nsAccessibleDOMStringList() {};
|
2010-01-25 07:08:08 -08:00
|
|
|
|
2010-04-26 23:52:03 -07:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIDOMDOMSTRINGLIST
|
2010-01-25 07:08:08 -08:00
|
|
|
|
2010-04-26 23:52:03 -07:00
|
|
|
PRBool Add(const nsAString& aName) {
|
|
|
|
return mNames.AppendElement(aName) != nsnull;
|
|
|
|
}
|
2010-01-25 07:08:08 -08:00
|
|
|
|
2010-04-26 23:52:03 -07:00
|
|
|
private:
|
|
|
|
nsTArray<nsString> mNames;
|
2010-01-25 07:08:08 -08:00
|
|
|
};
|
|
|
|
|
2007-03-31 00:14:03 -07:00
|
|
|
#endif
|
2007-08-23 21:54:45 -07:00
|
|
|
|