Skip to content

Commit

Permalink
Merge cvs-trunk-mirror to mozilla-central.
Browse files Browse the repository at this point in the history
--HG--
rename : js/src/js.c => js/src/js.cpp
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jsemit.c => js/src/jsemit.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsparse.c => js/src/jsparse.cpp
rename : js/src/jsregexp.c => js/src/jsregexp.cpp
rename : js/src/jsxml.c => js/src/jsxml.cpp
  • Loading branch information
bsmedberg committed Apr 15, 2008
2 parents 213cce2 + 7140e39 commit b31d756
Show file tree
Hide file tree
Showing 866 changed files with 21,655 additions and 12,278 deletions.
4 changes: 2 additions & 2 deletions accessible/public/nsIAccessibleHyperLink.idl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ interface nsIAccessible;
* A cross-platform interface that supports hyperlink-specific properties and
* methods. Anchors, image maps, xul:labels with class="text-link" implement this interface.
*/
[scriptable, uuid(fe1dd8c0-d50a-4634-b51d-2b20bfb1e231)]
[scriptable, uuid(38c60bfa-6040-4bfe-93f2-acd6a909bb60)]
interface nsIAccessibleHyperLink : nsISupports
{
/**
Expand Down Expand Up @@ -87,7 +87,7 @@ interface nsIAccessibleHyperLink : nsISupports
* This anchor is, for example, the visible output of the html:a tag.
* With an Image Map, reflects the actual areas within the map.
*/
readonly attribute long anchorsCount;
readonly attribute long anchorCount;

/**
* Returns the URI at the given index.
Expand Down
36 changes: 29 additions & 7 deletions accessible/public/nsIAccessibleHyperText.idl
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,38 @@
#include "nsISupports.idl"
#include "nsIAccessibleHyperLink.idl"

[scriptable, uuid(dec56474-2887-4d44-9826-1594cfe4a2f4)]
/**
* A cross-platform interface that deals with text which contains hyperlinks.
*/

[scriptable, uuid(d56bd454-8ff3-4edc-b266-baeada00267b)]
interface nsIAccessibleHyperText : nsISupports
{
readonly attribute long links;

nsIAccessibleHyperLink getLink (in long index);
/**
* Returns the number of links contained within this hypertext object.
*/
readonly attribute long linkCount;

/*
* Return the link index at this character index.
* Return value of -1 indicates no link at that index.
* Returns the link index at the given character index.
* Each link is an embedded object representing exactly 1 character within
* the hypertext.
*
* @param charIndex the 0-based character index.
*
* @returns long 0-based link's index.
* A return value of -1 indicates no link is present at that index.
*/
long getLinkIndex(in long charIndex);

/**
* Retrieves the nsIAccessibleHyperLink object at the given link index.
*
* @param linkIndex 0-based index of the link that is to be retrieved.
* This can be retrieved via getLinkIndex (see above).
*
* @returns nsIAccessibleHyperLink Object representing the link properties
* or NS_ERROR_INVALID_ARG if there is no link at that index.
*/
long getLinkIndex (in long charIndex);
nsIAccessibleHyperLink getLink(in long linkIndex);
};
12 changes: 9 additions & 3 deletions accessible/public/nsIAccessibleRole.idl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @note - When adding a new role, be sure to also add it to nsRoleMap.h for
* each platform.
*/
[scriptable, uuid(31685b85-36a3-448c-99ed-b034a198e303)]
[scriptable, uuid(8c0f68f8-164a-4078-a9ee-36a7d180f0e4)]
interface nsIAccessibleRole : nsISupports
{
/**
Expand Down Expand Up @@ -392,7 +392,8 @@ interface nsIAccessibleRole : nsISupports
const unsigned long ROLE_ANIMATION = 54;

/**
* Represents a mathematical equation. It is used by MATHML.
* Represents a mathematical equation. It is used by MATHML, where there is a
* rich DOM subtree for an equation. Use ROLE_FLAT_EQUATION for <img role="math" alt="[TeX]"/>
*/
const unsigned long ROLE_EQUATION = 55;

Expand Down Expand Up @@ -763,10 +764,15 @@ interface nsIAccessibleRole : nsISupports
*/
const unsigned long ROLE_LISTBOX = 119;

/**
* Represents a mathematical equation in the accessible name
*/
const unsigned long ROLE_FLAT_EQUATION = 120;

/**
* It's not role actually. This contanst is important to help ensure
* nsRoleMap's are synchronized.
*/
const unsigned long ROLE_LAST_ENTRY = 120;
const unsigned long ROLE_LAST_ENTRY = 121;
};

2 changes: 1 addition & 1 deletion accessible/src/atk/nsAccessibleWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ getChildCountCB(AtkObject *aAtkObj)
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleHyperText), getter_AddRefs(hyperText));
if (hyperText) {
// If HyperText, then number of links matches number of children
hyperText->GetLinks(&count);
hyperText->GetLinkCount(&count);
}
else {
nsCOMPtr<nsIAccessibleText> accText;
Expand Down
2 changes: 1 addition & 1 deletion accessible/src/atk/nsMaiHyperlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ getAnchorCountCB(AtkHyperlink *aLink)
NS_ENSURE_TRUE(accHyperlink, -1);

PRInt32 count = -1;
nsresult rv = accHyperlink->GetAnchorsCount(&count);
nsresult rv = accHyperlink->GetAnchorCount(&count);
return (NS_FAILED(rv)) ? -1 : static_cast<gint>(count);
}

Expand Down
2 changes: 1 addition & 1 deletion accessible/src/atk/nsMaiInterfaceHypertext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ getLinkCountCB(AtkHypertext *aText)
NS_ENSURE_TRUE(hyperText, -1);

PRInt32 count = -1;
nsresult rv = hyperText->GetLinks(&count);
nsresult rv = hyperText->GetLinkCount(&count);
NS_ENSURE_SUCCESS(rv, -1);

return count;
Expand Down
1 change: 1 addition & 0 deletions accessible/src/atk/nsRoleMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ static const PRUint32 atkRoleMap[] = {
ATK_ROLE_LIST_ITEM, // nsIAccessibleRole::ROLE_OPTION 117
ATK_ROLE_LIST_ITEM, // nsIAccessibleRole::ROLE_RICH_OPTION 118
ATK_ROLE_LIST, // nsIAccessibleRole::ROLE_LISTBOX 119
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_FLAT_EQUATION 120
kROLE_ATK_LAST_ENTRY // nsIAccessibleRole::ROLE_LAST_ENTRY
};

54 changes: 24 additions & 30 deletions accessible/src/atk/nsXULTreeAccessibleWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetChildCount(PRInt32 *aAccChildCount)
// created and appended by XUL tree accessible implementation
PRInt32 rowCount, colCount = 1;
mTreeView->GetRowCount(&rowCount);
mFirstChild->GetChildCount(&colCount);
GetColumns(&colCount);

*aAccChildCount += rowCount * colCount;
}
Expand All @@ -87,33 +87,21 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetSummary(nsAString &aSummary)
return NS_OK;
}

NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumns(PRInt32 *aColumns)
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumns(PRInt32 *aColumnCount)
{
nsresult rv = NS_OK;
NS_ENSURE_ARG_POINTER(aColumnCount);
*aColumnCount = 0;

nsCOMPtr<nsIAccessible> acc;
rv = nsAccessible::GetFirstChild(getter_AddRefs(acc));
NS_ENSURE_TRUE(acc, NS_ERROR_FAILURE);
nsCOMPtr<nsITreeColumn> column;
column = GetFirstVisibleColumn(mTree);
if (!column)
return NS_ERROR_FAILURE;

rv = acc->GetChildCount(aColumns);

// The last child could be column picker. In that case, we need to minus the
// number of columns by 1
nsCOMPtr<nsIAccessible> lastChildAccessible;
acc->GetLastChild(getter_AddRefs(lastChildAccessible));
nsCOMPtr<nsIAccessNode> accessNode = do_QueryInterface(lastChildAccessible);
NS_ENSURE_TRUE(accessNode, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMNode> domNode;
accessNode->GetDOMNode(getter_AddRefs(domNode));
nsCOMPtr<nsIContent> content = do_QueryInterface(domNode);
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
// it's menupopup inside column picker
if (content->NodeInfo()->Equals(nsAccessibilityAtoms::menupopup,
kNameSpaceID_XUL)) {
(*aColumns)--;
}
do {
(*aColumnCount)++;
} while ((column = GetNextVisibleColumn(column)));

return *aColumns > 0 ? rv : NS_ERROR_FAILURE;
return NS_OK;
}

NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnHeader(nsIAccessibleTable **aColumnHeader)
Expand Down Expand Up @@ -278,10 +266,11 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetIndexAt(PRInt32 aRow, PRInt32 aColumn,
return NS_OK;
}

NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnAtIndex(PRInt32 aIndex, PRInt32 *_retval)
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnAtIndex(PRInt32 aIndex, PRInt32 *aColumn)
{
NS_ENSURE_ARG_POINTER(_retval);
NS_ENSURE_ARG_POINTER(aColumn);

*aColumn = -1;
nsresult rv = NS_OK;

PRInt32 columns;
Expand All @@ -291,15 +280,18 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnAtIndex(PRInt32 aIndex, PRInt32
PRInt32 treeCols;
nsAccessible::GetChildCount(&treeCols);

*_retval = (aIndex - treeCols) % columns;
if (aIndex >= treeCols) {
*aColumn = (aIndex - treeCols) % columns;
}

return NS_OK;
}

NS_IMETHODIMP nsXULTreeAccessibleWrap::GetRowAtIndex(PRInt32 aIndex, PRInt32 *_retval)
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetRowAtIndex(PRInt32 aIndex, PRInt32 *aRow)
{
NS_ENSURE_ARG_POINTER(_retval);
NS_ENSURE_ARG_POINTER(aRow);

*aRow = -1;
nsresult rv = NS_OK;

PRInt32 columns;
Expand All @@ -309,7 +301,9 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetRowAtIndex(PRInt32 aIndex, PRInt32 *_r
PRInt32 treeCols;
nsAccessible::GetChildCount(&treeCols);

*_retval = (aIndex - treeCols) / columns;
if (aIndex >= treeCols) {
*aRow = (aIndex - treeCols) / columns;
}

return NS_OK;
}
Expand Down
1 change: 1 addition & 0 deletions accessible/src/base/nsARIAMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{&nsAccessibilityAtoms::aria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED | nsIAccessibleStates::STATE_CHECKABLE},
{&nsAccessibilityAtoms::aria_checked, "mixed", nsIAccessibleStates::STATE_MIXED | nsIAccessibleStates::STATE_CHECKABLE},
{&nsAccessibilityAtoms::aria_checked, "false", nsIAccessibleStates::STATE_CHECKABLE}, kEndEntry},
{"math", nsIAccessibleRole::ROLE_FLAT_EQUATION, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
{"menu", nsIAccessibleRole::ROLE_MENUPOPUP, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
{"menubar", nsIAccessibleRole::ROLE_MENUBAR, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
{"menuitem", nsIAccessibleRole::ROLE_MENUITEM, eNameOkFromChildren, eNoValue, kNoReqStates,
Expand Down
13 changes: 7 additions & 6 deletions accessible/src/base/nsAccessibilityAtomList.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,13 @@ ACCESSIBILITY_ATOM(aria_valuetext, "aria-valuetext")
ACCESSIBILITY_ATOM(defaultLabel, "defaultLabel")

// Object attributes
ACCESSIBILITY_ATOM(cellIndex, "cell-index")
ACCESSIBILITY_ATOM(containerAtomic, "container-atomic")
ACCESSIBILITY_ATOM(containerBusy, "container-busy")
ACCESSIBILITY_ATOM(containerChannel, "container-channel")
ACCESSIBILITY_ATOM(containerLive, "container-live")
ACCESSIBILITY_ATOM(containerRelevant, "container-relevant")
ACCESSIBILITY_ATOM(level, "level")
ACCESSIBILITY_ATOM(lineNumber, "line-number")
ACCESSIBILITY_ATOM(posinset, "posinset")
ACCESSIBILITY_ATOM(setsize, "setsize")
ACCESSIBILITY_ATOM(lineNumber, "line-number")
ACCESSIBILITY_ATOM(containerRelevant, "container-relevant")
ACCESSIBILITY_ATOM(containerLive, "container-live")
ACCESSIBILITY_ATOM(containerChannel, "container-channel")
ACCESSIBILITY_ATOM(containerAtomic, "container-atomic")
ACCESSIBILITY_ATOM(containerBusy, "container-busy")
2 changes: 1 addition & 1 deletion accessible/src/base/nsAccessibilityService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
// We don't do this for <body>, <html>, <window>, <dialog> etc. which
// correspond to the doc accessible and will be created in any case
if (!newAcc && content->Tag() != nsAccessibilityAtoms::body && content->GetParent() &&
(content->IsFocusable() ||
(frame->IsFocusable() ||
(isHTML && nsAccUtils::HasListener(content, NS_LITERAL_STRING("click"))) ||
HasUniversalAriaProperty(content, aWeakShell) || roleMapEntry ||
HasRelatedContent(content) || nsAccUtils::IsXLink(content))) {
Expand Down
4 changes: 2 additions & 2 deletions accessible/src/base/nsAccessibilityService.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ static const char kRoleNames[][20] = {
"image map", //ROLE_IMAGE_MAP
"listbox option", //ROLE_OPTION
"listbox rich option", //ROLE_RICH_OPTION
"listbox" //ROLE_LISTBOX

"listbox", //ROLE_LISTBOX
"flat equation" //ROLE_FLAT_EQUATION
};

/**
Expand Down
14 changes: 10 additions & 4 deletions accessible/src/base/nsAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2056,6 +2056,9 @@ nsAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
role == nsIAccessibleRole::ROLE_PUSHBUTTON ||
role == nsIAccessibleRole::ROLE_MENUITEM ||
role == nsIAccessibleRole::ROLE_LISTITEM ||
role == nsIAccessibleRole::ROLE_OPTION ||
role == nsIAccessibleRole::ROLE_RADIOBUTTON ||
role == nsIAccessibleRole::ROLE_RICH_OPTION ||
role == nsIAccessibleRole::ROLE_OUTLINEITEM ||
content->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_checked)) {
// Might be checkable -- checking role & ARIA attribute first is faster than getting state
Expand All @@ -2080,6 +2083,8 @@ nsAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
role == nsIAccessibleRole::ROLE_MENUITEM ||
role == nsIAccessibleRole::ROLE_RADIOBUTTON ||
role == nsIAccessibleRole::ROLE_PAGETAB ||
role == nsIAccessibleRole::ROLE_OPTION ||
role == nsIAccessibleRole::ROLE_RADIOBUTTON ||
role == nsIAccessibleRole::ROLE_OUTLINEITEM) &&
0 == (State(this) & nsIAccessibleStates::STATE_INVISIBLE)) {
nsCOMPtr<nsIAccessible> parent = GetParent();
Expand Down Expand Up @@ -3259,12 +3264,12 @@ NS_IMETHODIMP nsAccessible::SelectAllSelection(PRBool *_retval)
// nsIAccessibleHyperLink, which helps determine where it is located
// within containing text

// readonly attribute long nsIAccessibleHyperLink::anchorsCount
// readonly attribute long nsIAccessibleHyperLink::anchorCount
NS_IMETHODIMP
nsAccessible::GetAnchorsCount(PRInt32 *aAnchorsCount)
nsAccessible::GetAnchorCount(PRInt32 *aAnchorCount)
{
NS_ENSURE_ARG_POINTER(aAnchorsCount);
*aAnchorsCount = 1;
NS_ENSURE_ARG_POINTER(aAnchorCount);
*aAnchorCount = 1;
return NS_OK;
}

Expand Down Expand Up @@ -3523,6 +3528,7 @@ PRBool nsAccessible::MustPrune(nsIAccessible *aAccessible)
role == nsIAccessibleRole::ROLE_COMBOBOX_OPTION ||
role == nsIAccessibleRole::ROLE_OPTION ||
role == nsIAccessibleRole::ROLE_ENTRY ||
role == nsIAccessibleRole::ROLE_FLAT_EQUATION ||
role == nsIAccessibleRole::ROLE_PASSWORD_TEXT ||
role == nsIAccessibleRole::ROLE_PUSHBUTTON ||
role == nsIAccessibleRole::ROLE_TOGGLE_BUTTON ||
Expand Down
5 changes: 4 additions & 1 deletion accessible/src/base/nsDocAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ NS_IMETHODIMP nsDocAccessible::GetName(nsAString& aName)
rv = nsAccessible::GetName(aName); // Allow name via aria-labelledby or title attribute
}
if (aName.IsEmpty()) {
rv = GetTitle(aName); // Finally try title element
rv = GetTitle(aName); // Try title element
}
if (aName.IsEmpty()) { // Last resort: use URL
rv = GetURL(aName);
}

return rv;
Expand Down
19 changes: 0 additions & 19 deletions accessible/src/base/nsOuterDocAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,6 @@ nsOuterDocAccessible::nsOuterDocAccessible(nsIDOMNode* aNode,
{
}

/* attribute wstring accName; */
NS_IMETHODIMP nsOuterDocAccessible::GetName(nsAString& aName)
{
nsCOMPtr<nsIAccessible> accessible;
GetFirstChild(getter_AddRefs(accessible));
nsCOMPtr<nsIAccessibleDocument> accDoc(do_QueryInterface(accessible));
if (!accDoc) {
return NS_ERROR_FAILURE;
}
nsresult rv = accDoc->GetTitle(aName);
if (NS_FAILED(rv) || aName.IsEmpty()) {
rv = nsAccessible::GetName(aName);
if (aName.IsEmpty()) {
rv = accDoc->GetURL(aName);
}
}
return rv;
}

/* unsigned long getRole (); */
NS_IMETHODIMP nsOuterDocAccessible::GetRole(PRUint32 *aRole)
{
Expand Down
1 change: 0 additions & 1 deletion accessible/src/base/nsOuterDocAccessible.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class nsOuterDocAccessible : public nsAccessibleWrap
nsOuterDocAccessible(nsIDOMNode* aNode,
nsIWeakReference* aShell);

NS_IMETHOD GetName(nsAString& aName);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
NS_IMETHOD GetChildAtPoint(PRInt32 aX, PRInt32 aY,
Expand Down
2 changes: 1 addition & 1 deletion accessible/src/base/nsRootAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
nsCOMPtr<nsIContent> treeContent = do_QueryInterface(aTargetNode);
nsAccEvent::PrepareForEvent(aTargetNode, PR_TRUE);
return accService->InvalidateSubtreeFor(eventShell, treeContent,
nsIAccessibleEvent::EVENT_ASYNCH_SIGNIFICANT_CHANGE);
nsIAccessibleEvent::EVENT_DOM_SIGNIFICANT_CHANGE);
}
#endif

Expand Down
Loading

0 comments on commit b31d756

Please sign in to comment.