зеркало из https://github.com/mozilla/gecko-dev.git
Merge bustage fix of bug 326628 (nsDOMClassInfoID) with tip
This commit is contained in:
Коммит
1c2d5702a9
|
@ -123,7 +123,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
"columnheader",
|
||||
nsIAccessibleRole::ROLE_COLUMNHEADER,
|
||||
eNoValue,
|
||||
eSortAction,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
||||
|
@ -417,7 +417,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
"rowheader",
|
||||
nsIAccessibleRole::ROLE_ROWHEADER,
|
||||
eNoValue,
|
||||
eSortAction,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates,
|
||||
{&nsAccessibilityAtoms::aria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
||||
|
|
|
@ -57,11 +57,9 @@ enum EActionRule
|
|||
eActivateAction,
|
||||
eClickAction,
|
||||
eCheckUncheckAction,
|
||||
eExpandAction,
|
||||
eJumpAction,
|
||||
eOpenCloseAction,
|
||||
eSelectAction,
|
||||
eSortAction,
|
||||
eSwitchAction
|
||||
};
|
||||
|
||||
|
|
|
@ -321,8 +321,6 @@ nsAccUtils::SetLiveContainerAttributes(nsIPersistentProperties *aAttributes,
|
|||
PRBool
|
||||
nsAccUtils::HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom)
|
||||
{
|
||||
NS_ASSERTION(aContent, "aContent is null in call to HasDefinedARIAToken!");
|
||||
|
||||
if (!aContent->HasAttr(kNameSpaceID_None, aAtom) ||
|
||||
aContent->AttrValueIs(kNameSpaceID_None, aAtom,
|
||||
nsAccessibilityAtoms::_empty, eCaseMatters) ||
|
||||
|
|
|
@ -2335,17 +2335,6 @@ nsAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
|
|||
case eSwitchAction:
|
||||
aName.AssignLiteral("switch");
|
||||
return NS_OK;
|
||||
|
||||
case eSortAction:
|
||||
aName.AssignLiteral("sort");
|
||||
return NS_OK;
|
||||
|
||||
case eExpandAction:
|
||||
if (states & nsIAccessibleStates::STATE_COLLAPSED)
|
||||
aName.AssignLiteral("expand");
|
||||
else
|
||||
aName.AssignLiteral("collapse");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
@ -3240,9 +3229,8 @@ nsAccessible::GetActionRule(PRUint32 aStates)
|
|||
if (aStates & nsIAccessibleStates::STATE_UNAVAILABLE)
|
||||
return eNoAction;
|
||||
|
||||
nsIContent* content = nsCoreUtils::GetRoleContent(mDOMNode);
|
||||
|
||||
// Check if it's simple xlink.
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
if (nsCoreUtils::IsXLink(content))
|
||||
return eJumpAction;
|
||||
|
||||
|
@ -3252,16 +3240,10 @@ nsAccessible::GetActionRule(PRUint32 aStates)
|
|||
|
||||
if (isOnclick)
|
||||
return eClickAction;
|
||||
|
||||
// Get an action based on ARIA role.
|
||||
if (mRoleMapEntry &&
|
||||
mRoleMapEntry->actionRule != eNoAction)
|
||||
return mRoleMapEntry->actionRule;
|
||||
|
||||
// Get an action based on ARIA attribute.
|
||||
if (nsAccUtils::HasDefinedARIAToken(content,
|
||||
nsAccessibilityAtoms::aria_expanded))
|
||||
return eExpandAction;
|
||||
// Get an action based on ARIA role.
|
||||
if (mRoleMapEntry)
|
||||
return mRoleMapEntry->actionRule;
|
||||
|
||||
return eNoAction;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,6 @@ _TEST_FILES =\
|
|||
role.js \
|
||||
test_accessnode_invalidation.html \
|
||||
test_actions_aria.html \
|
||||
test_actions_doc.html \
|
||||
$(warning test_actions_inputs.html temporarily disabled) \
|
||||
test_actions.xul \
|
||||
test_aria_activedescendant.html \
|
||||
|
|
|
@ -99,21 +99,6 @@
|
|||
ID: "treeitem",
|
||||
actionName: "activate",
|
||||
events: CLICK_EVENTS
|
||||
},
|
||||
{
|
||||
ID: "sortable",
|
||||
actionName: "sort",
|
||||
events: CLICK_EVENTS
|
||||
},
|
||||
{
|
||||
ID: "expandable",
|
||||
actionName: "expand",
|
||||
events: CLICK_EVENTS
|
||||
},
|
||||
{
|
||||
ID: "collapseable",
|
||||
actionName: "collapse",
|
||||
events: CLICK_EVENTS
|
||||
}
|
||||
];
|
||||
testActions(actionsArray);
|
||||
|
@ -175,14 +160,5 @@
|
|||
<div role="tree">
|
||||
<div id="treeitem" role="treeitem">Treeitem</div>
|
||||
</div>
|
||||
|
||||
<div role="grid">
|
||||
<div id="sortable" role="columnheader" aria-sort="ascending">
|
||||
Columnheader
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="expandable" aria-expanded="false">collapsed</div>
|
||||
<div id="collapseable" aria-expanded="true">expanded</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<title>nsIAccessible actions testing for document</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/a11y/accessible/nsIAccessible_actions.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
function doTest()
|
||||
{
|
||||
var docAcc = getAccessible(document, [nsIAccessibleDocument]);
|
||||
|
||||
if (!docAcc) {
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
is(docAcc.numActions, 1, "Wrong number of actions for document!");
|
||||
is(docAcc.getActionName(0), "click", "Wrong action name for document!");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body role="button">
|
||||
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=473732"
|
||||
title="Related to work on bug 473732">
|
||||
Mozilla Bug 473732
|
||||
</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -19,6 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=441737
|
|||
<script type="application/javascript">
|
||||
function doTest()
|
||||
{
|
||||
// Get accessible for body tag.
|
||||
var docAcc = getAccessible(document, [nsIAccessibleDocument]);
|
||||
if (docAcc) {
|
||||
// nsIAccessible
|
||||
|
|
Загрузка…
Ссылка в новой задаче