Backed out 4 changesets (bug 1665962, bug 1666356, bug 1666380, bug 1665960) for perma failure on browser_content_tree.js and browser_treeupdate_list.js. CLOSED TREE

Backed out changeset 29f8600da112 (bug 1666380)
Backed out changeset f01adb0a0e05 (bug 1666356)
Backed out changeset bed1c58441de (bug 1665960)
Backed out changeset 65d6078a5314 (bug 1665962)
This commit is contained in:
Razvan Maries 2020-09-24 22:18:08 +03:00
Родитель e761feff33
Коммит e146bab5ce
20 изменённых файлов: 25 добавлений и 398 удалений

Просмотреть файл

@ -1071,13 +1071,7 @@ enum Role {
*/
TIME_EDITOR = 183,
/**
* Represents the marker associated with a list item. In unordered lists,
* this is a bullet, while in ordered lists this is a number.
*/
LISTITEM_MARKER = 184,
LAST_ROLE = LISTITEM_MARKER
LAST_ROLE = TIME_EDITOR
};
} // namespace roles

Просмотреть файл

@ -1866,14 +1866,4 @@ ROLE(TIME_EDITOR,
ROLE_SYSTEM_GROUPING,
java::SessionAccessibility::CLASSNAME_VIEW,
eNameFromSubtreeIfReqRule)
ROLE(LISTITEM_MARKER,
"list item marker",
ATK_ROLE_UNKNOWN,
@"AXListMarker",
NSAccessibilityUnknownSubrole,
ROLE_SYSTEM_STATICTEXT,
ROLE_SYSTEM_STATICTEXT,
java::SessionAccessibility::CLASSNAME_VIEW,
eNoNameRule)
// clang-format on

Просмотреть файл

@ -578,8 +578,7 @@ TextAttrsMgr::AutoGeneratedTextAttr::AutoGeneratedTextAttr(
if (aAccessible)
mIsDefined = mNativeValue =
((aAccessible->NativeRole() == roles::STATICTEXT) ||
(aAccessible->NativeRole() == roles::LISTITEM_MARKER));
(aAccessible->NativeRole() == roles::STATICTEXT);
}
bool TextAttrsMgr::AutoGeneratedTextAttr::GetValueFor(Accessible* aAccessible,

Просмотреть файл

@ -154,9 +154,7 @@ ENameValueFlag HTMLListBulletAccessible::Name(nsString& aName) const {
return eNameOK;
}
role HTMLListBulletAccessible::NativeRole() const {
return roles::LISTITEM_MARKER;
}
role HTMLListBulletAccessible::NativeRole() const { return roles::STATICTEXT; }
uint64_t HTMLListBulletAccessible::NativeState() const {
return LeafAccessible::NativeState() | states::READONLY;

Просмотреть файл

@ -1065,10 +1065,4 @@ interface nsIAccessibleRole : nsISupports
*/
const unsigned long ROLE_TIME_EDITOR = 183;
/**
* Represents the marker associated with a list item. In unordered lists,
* this is a bullet, while in ordered lists this is a number.
*/
const unsigned long ROLE_LISTITEM_MARKER = 184;
};

Просмотреть файл

@ -206,27 +206,6 @@ using namespace mozilla::a11y;
: RotorImageRule();
[matches addObjectsFromArray:[self getMatchesForRule:rule]];
}
if ([key isEqualToString:@"AXStaticTextSearchKey"]) {
RotorStaticTextRule rule = mImmediateDescendantsOnly
? RotorStaticTextRule(geckoStartAcc)
: RotorStaticTextRule();
[matches addObjectsFromArray:[self getMatchesForRule:rule]];
}
if ([key isEqualToString:@"AXCheckboxSearchKey"]) {
RotorCheckboxRule rule = mImmediateDescendantsOnly
? RotorCheckboxRule(geckoStartAcc)
: RotorCheckboxRule();
[matches addObjectsFromArray:[self getMatchesForRule:rule]];
}
if ([key isEqualToString:@"AXTextFieldSearchKey"]) {
RotorTextFieldRule rule = mImmediateDescendantsOnly
? RotorTextFieldRule(geckoStartAcc)
: RotorTextFieldRule();
[matches addObjectsFromArray:[self getMatchesForRule:rule]];
}
}
return matches;

Просмотреть файл

@ -63,23 +63,6 @@ class RotorImageRule final : public PivotRoleRule {
explicit RotorImageRule(AccessibleOrProxy& aDirectDescendantsFrom);
};
class RotorStaticTextRule : public PivotRule {
public:
explicit RotorStaticTextRule();
explicit RotorStaticTextRule(AccessibleOrProxy& aDirectDescendantsFrom);
virtual uint16_t Match(const AccessibleOrProxy& aAccOrProxy) override;
protected:
AccessibleOrProxy mDirectDescendantsFrom;
};
class RotorCheckboxRule final : public PivotRoleRule {
public:
explicit RotorCheckboxRule();
explicit RotorCheckboxRule(AccessibleOrProxy& aDirectDescendantsFrom);
};
class RotorControlRule final : public PivotRule {
public:
explicit RotorControlRule(AccessibleOrProxy& aDirectDescendantsFrom);
@ -118,17 +101,6 @@ class RotorUnvisitedLinkRule final : public RotorLinkRule {
virtual uint16_t Match(const AccessibleOrProxy& aAccOrProxy) override;
};
class RotorTextFieldRule : public PivotRule {
public:
explicit RotorTextFieldRule();
explicit RotorTextFieldRule(AccessibleOrProxy& aDirectDescendantsFrom);
virtual uint16_t Match(const AccessibleOrProxy& aAccOrProxy) override;
protected:
AccessibleOrProxy mDirectDescendantsFrom;
};
/**
* This rule matches all accessibles, filtering out non-direct
* descendants if necessary.

Просмотреть файл

@ -54,45 +54,6 @@ RotorImageRule::RotorImageRule() : PivotRoleRule(roles::GRAPHIC) {}
RotorImageRule::RotorImageRule(AccessibleOrProxy& aDirectDescendantsFrom)
: PivotRoleRule(roles::GRAPHIC, aDirectDescendantsFrom) {}
RotorStaticTextRule::RotorStaticTextRule() : mDirectDescendantsFrom(nullptr) {}
RotorStaticTextRule::RotorStaticTextRule(
AccessibleOrProxy& aDirectDescendantsFrom)
: mDirectDescendantsFrom(aDirectDescendantsFrom) {}
uint16_t RotorStaticTextRule::Match(const AccessibleOrProxy& aAccOrProxy) {
uint16_t result = nsIAccessibleTraversalRule::FILTER_IGNORE;
if (nsAccUtils::MustPrune(aAccOrProxy)) {
result |= nsIAccessibleTraversalRule::FILTER_IGNORE_SUBTREE;
}
if (!mDirectDescendantsFrom.IsNull() &&
(aAccOrProxy != mDirectDescendantsFrom)) {
// If we've specified mDirectDescendantsFrom, we should ignore
// non-direct descendants of from the specified AoP. Because
// pivot performs a preorder traversal, the first aAccOrProxy
// object(s) that don't equal mDirectDescendantsFrom will be
// mDirectDescendantsFrom's children. We'll process them, but ignore
// their subtrees thereby processing direct descendants of
// mDirectDescendantsFrom only.
result |= nsIAccessibleTraversalRule::FILTER_IGNORE_SUBTREE;
}
if (mozAccessible* nativeMatch = GetNativeFromGeckoAccessible(aAccOrProxy)) {
if ([[nativeMatch moxRole] isEqualToString:@"AXStaticText"]) {
result |= nsIAccessibleTraversalRule::FILTER_MATCH;
}
}
return result;
}
RotorCheckboxRule::RotorCheckboxRule() : PivotRoleRule(roles::CHECKBUTTON) {}
RotorCheckboxRule::RotorCheckboxRule(AccessibleOrProxy& aDirectDescendantsFrom)
: PivotRoleRule(roles::CHECKBUTTON, aDirectDescendantsFrom) {}
RotorControlRule::RotorControlRule(AccessibleOrProxy& aDirectDescendantsFrom)
: mDirectDescendantsFrom(aDirectDescendantsFrom) {}
@ -264,40 +225,6 @@ uint16_t RotorUnvisitedLinkRule::Match(const AccessibleOrProxy& aAccOrProxy) {
return result;
}
RotorTextFieldRule::RotorTextFieldRule() : mDirectDescendantsFrom(nullptr) {}
RotorTextFieldRule::RotorTextFieldRule(
AccessibleOrProxy& aDirectDescendantsFrom)
: mDirectDescendantsFrom(aDirectDescendantsFrom) {}
uint16_t RotorTextFieldRule::Match(const AccessibleOrProxy& aAccOrProxy) {
uint16_t result = nsIAccessibleTraversalRule::FILTER_IGNORE;
if (nsAccUtils::MustPrune(aAccOrProxy)) {
result |= nsIAccessibleTraversalRule::FILTER_IGNORE_SUBTREE;
}
if (!mDirectDescendantsFrom.IsNull() &&
(aAccOrProxy != mDirectDescendantsFrom)) {
// If we've specified mDirectDescendantsFrom, we should ignore
// non-direct descendants of from the specified AoP. Because
// pivot performs a preorder traversal, the first aAccOrProxy
// object(s) that don't equal mDirectDescendantsFrom will be
// mDirectDescendantsFrom's children. We'll process them, but ignore
// their subtrees thereby processing direct descendants of
// mDirectDescendantsFrom only.
result |= nsIAccessibleTraversalRule::FILTER_IGNORE_SUBTREE;
}
if (mozAccessible* nativeMatch = GetNativeFromGeckoAccessible(aAccOrProxy)) {
if ([[nativeMatch moxRole] isEqualToString:@"AXTextField"]) {
result |= nsIAccessibleTraversalRule::FILTER_MATCH;
}
}
return result;
}
// Match All Rule
RotorAllRule::RotorAllRule(AccessibleOrProxy& aDirectDescendantsFrom)

Просмотреть файл

@ -1049,231 +1049,6 @@ addAccessibleTask(
}
);
/**
* Test rotor with inputs
*/
addAccessibleTask(
`
<input type="text" value="I'm a text field." id="text"><br>
<input type="text" value="me too" id="implText"><br>
<textarea id="textarea">this is some text in a text area</textarea><br>
<input type="tel" value="0000000000" id="tel"><br>
<input type="url" value="https://example.com" id="url"><br>
<input type="email" value="hi@example.com" id="email"><br>
<input type="password" value="blah" id="password"><br>
<input type="month" value="2020-01" id="month"><br>
<input type="week" value="2020-W01" id="week"><br>
`,
async (browser, accDoc) => {
const searchPred = {
AXSearchKey: "AXTextFieldSearchKey",
AXImmediateDescendants: 1,
AXResultsLimit: -1,
AXDirection: "AXDirectionNext",
};
const webArea = accDoc.nativeInterface.QueryInterface(
Ci.nsIAccessibleMacInterface
);
is(
webArea.getAttributeValue("AXRole"),
"AXWebArea",
"Got web area accessible"
);
const textfieldCount = webArea.getParameterizedAttributeValue(
"AXUIElementCountForSearchPredicate",
NSDictionary(searchPred)
);
is(9, textfieldCount, "Found 9 fields");
const fields = webArea.getParameterizedAttributeValue(
"AXUIElementsForSearchPredicate",
NSDictionary(searchPred)
);
const text = getNativeInterface(accDoc, "text");
const implText = getNativeInterface(accDoc, "implText");
const textarea = getNativeInterface(accDoc, "textarea");
const tel = getNativeInterface(accDoc, "tel");
const url = getNativeInterface(accDoc, "url");
const email = getNativeInterface(accDoc, "email");
const password = getNativeInterface(accDoc, "password");
const month = getNativeInterface(accDoc, "month");
const week = getNativeInterface(accDoc, "week");
const toCheck = [
text,
implText,
textarea,
tel,
url,
email,
password,
month,
week,
];
for (let i = 0; i < toCheck.length; i++) {
is(
toCheck[i].getAttributeValue("AXValue"),
fields[i].getAttributeValue("AXValue"),
"Found correct input control"
);
}
}
);
/**
* Test rotor with checkboxes
*/
addAccessibleTask(
`
<fieldset id="checkboxes">
<legend>Checkboxes</legend>
<input id="checkbox1" type="checkbox" name="g2"> Checkbox 1
<input id="checkbox2" type="checkbox" name="g2" checked="checked">Checkbox 2
<div id="checkbox3" role="checkbox">Checkbox 3</div>
<div id="checkbox4" role="checkbox" aria-checked="true">Checkbox 4</div>
</fieldset>
`,
async (browser, accDoc) => {
const searchPred = {
AXSearchKey: "AXCheckboxSearchKey",
AXImmediateDescendantsOnly: 0,
AXResultsLimit: -1,
AXDirection: "AXDirectionNext",
};
const webArea = accDoc.nativeInterface.QueryInterface(
Ci.nsIAccessibleMacInterface
);
is(
webArea.getAttributeValue("AXRole"),
"AXWebArea",
"Got web area accessible"
);
const checkboxCount = webArea.getParameterizedAttributeValue(
"AXUIElementCountForSearchPredicate",
NSDictionary(searchPred)
);
is(4, checkboxCount, "Found 4 checkboxes");
const checkboxes = webArea.getParameterizedAttributeValue(
"AXUIElementsForSearchPredicate",
NSDictionary(searchPred)
);
const checkbox1 = getNativeInterface(accDoc, "checkbox1");
const checkbox2 = getNativeInterface(accDoc, "checkbox2");
const checkbox3 = getNativeInterface(accDoc, "checkbox3");
const checkbox4 = getNativeInterface(accDoc, "checkbox4");
is(
checkbox1.getAttributeValue("AXValue"),
checkboxes[0].getAttributeValue("AXValue"),
"Found correct checkbox 1"
);
is(
checkbox2.getAttributeValue("AXValue"),
checkboxes[1].getAttributeValue("AXValue"),
"Found correct checkbox 2"
);
is(
checkbox3.getAttributeValue("AXValue"),
checkboxes[2].getAttributeValue("AXValue"),
"Found correct checkbox 3"
);
is(
checkbox4.getAttributeValue("AXValue"),
checkboxes[3].getAttributeValue("AXValue"),
"Found correct checkbox 4"
);
}
);
/**
* Test rotor with static text
*/
addAccessibleTask(
`
<h1>Hello I am a heading</h1>
This is some regular text.<p>this is some paragraph text</p><br>
This is a list:<ul>
<li>List item one</li>
<li>List item two</li>
</ul>
<a href="http://example.com">This is a link</a>
`,
async (browser, accDoc) => {
const searchPred = {
AXSearchKey: "AXStaticTextSearchKey",
AXImmediateDescendants: 0,
AXResultsLimit: -1,
AXDirection: "AXDirectionNext",
};
const webArea = accDoc.nativeInterface.QueryInterface(
Ci.nsIAccessibleMacInterface
);
is(
webArea.getAttributeValue("AXRole"),
"AXWebArea",
"Got web area accessible"
);
const textCount = webArea.getParameterizedAttributeValue(
"AXUIElementCountForSearchPredicate",
NSDictionary(searchPred)
);
is(7, textCount, "Found 7 pieces of text");
const text = webArea.getParameterizedAttributeValue(
"AXUIElementsForSearchPredicate",
NSDictionary(searchPred)
);
is(
"Hello I am a heading",
text[0].getAttributeValue("AXValue"),
"Found correct text node for heading"
);
is(
"This is some regular text.",
text[1].getAttributeValue("AXValue"),
"Found correct text node"
);
is(
"this is some paragraph text",
text[2].getAttributeValue("AXValue"),
"Found correct text node for paragraph"
);
is(
"This is a list:",
text[3].getAttributeValue("AXValue"),
"Found correct text node for pre-list text node"
);
is(
"List item one",
text[4].getAttributeValue("AXValue"),
"Found correct text node for list item one"
);
is(
"List item two",
text[5].getAttributeValue("AXValue"),
"Found correct text node for list item two"
);
is(
"This is a link",
text[6].getAttributeValue("AXValue"),
"Found correct text node for link"
);
}
);
/**
* Test rotor with lists
*/

Просмотреть файл

@ -1030,21 +1030,21 @@
children: [
{ role: ROLE_LISTITEM,
children: [ // home
{ role: ROLE_LISTITEM_MARKER },
{ role: ROLE_STATICTEXT },
{ role: ROLE_TEXT_LEAF }
]
},
{
role: ROLE_LISTITEM,
children: [
{ role: ROLE_LISTITEM_MARKER },
{ role: ROLE_STATICTEXT },
{ role: ROLE_TEXT_LEAF }, // about
{
role: ROLE_LIST, // menu
children: [
{ role: ROLE_LISTITEM,
children: [
{ role: ROLE_LISTITEM_MARKER },
{ role: ROLE_STATICTEXT },
{ role: ROLE_TEXT_LEAF } // our story
]
},
@ -1062,7 +1062,7 @@
{
role: ROLE_LISTITEM,
children: [
{ role: ROLE_LISTITEM_MARKER },
{ role: ROLE_STATICTEXT },
{
role: ROLE_PUSHBUTTON,
children: [
@ -1075,7 +1075,7 @@
{
role: ROLE_LISTITEM,
children: [
{ role: ROLE_LISTITEM_MARKER },
{ role: ROLE_STATICTEXT },
{
role: ROLE_PUSHBUTTON,
children: [

Просмотреть файл

@ -62,7 +62,7 @@ var ObjectTraversalRule = {
rv = FILTER_IGNORE_SUBTREE | FILTER_MATCH;
} else if (
aAccessible.childCount == 0 &&
role != ROLE_LISTITEM_MARKER &&
role != ROLE_STATICTEXT &&
aAccessible.name.trim()
) {
rv = FILTER_MATCH;

Просмотреть файл

@ -55,7 +55,6 @@ const ROLE_LINK = nsIAccessibleRole.ROLE_LINK;
const ROLE_LIST = nsIAccessibleRole.ROLE_LIST;
const ROLE_LISTBOX = nsIAccessibleRole.ROLE_LISTBOX;
const ROLE_LISTITEM = nsIAccessibleRole.ROLE_LISTITEM;
const ROLE_LISTITEM_MARKER = nsIAccessibleRole.ROLE_LISTITEM_MARKER;
const ROLE_MARK = nsIAccessibleRole.ROLE_MARK;
const ROLE_MATHML_MATH = nsIAccessibleRole.ROLE_MATHML_MATH;
const ROLE_MATHML_IDENTIFIER = nsIAccessibleRole.ROLE_MATHML_IDENTIFIER;

Просмотреть файл

@ -19,7 +19,7 @@
{ SECTION: [ // container
{ MENUPOPUP: [ // menu
{ MENUITEM: [
{ LISTITEM_MARKER: [] }, // bullet
{ STATICTEXT: [] }, // bullet
{ TEXT_LEAF: [] },
] },
] },
@ -31,7 +31,7 @@
{ SECTION: [ // container
{ MENUPOPUP: [ // menu
{ MENUITEM: [
{ LISTITEM_MARKER: [] }, // bullet
{ STATICTEXT: [] }, // bullet
{ TEXT_LEAF: [] },
] },
] },
@ -43,7 +43,7 @@
{ SECTION: [ // container
{ MENUPOPUP: [ // menu
{ PARENT_MENUITEM: [ // menuitem with aria-haspopup="true"
{ LISTITEM_MARKER: [] }, // bullet
{ STATICTEXT: [] }, // bullet
{ TEXT_LEAF: [] },
] },
] },

Просмотреть файл

@ -77,11 +77,11 @@
tree =
{ PUSHBUTTON: [ // ul
{ TEXT_CONTAINER: [ // li
{ LISTITEM_MARKER: [ ] },
{ STATICTEXT: [ ] },
{ TEXT_LEAF: [ ] },
] },
{ TEXT_CONTAINER: [ // span styled as a list
{ LISTITEM_MARKER: [ ] },
{ STATICTEXT: [ ] },
{ TEXT_LEAF: [ ] },
] },
] };
@ -90,7 +90,7 @@
tree =
{ PUSHBUTTON: [ // ol
{ TEXT_CONTAINER: [ // li
{ LISTITEM_MARKER: [ ] },
{ STATICTEXT: [ ] },
{ TEXT_LEAF: [ ] },
] },
] };

Просмотреть файл

@ -18,11 +18,11 @@ function doTest() {
let tree =
{ LIST: [
{ LISTITEM: [
{ LISTITEM_MARKER: [] },
{ STATICTEXT: [] },
{ TEXT_LEAF: [] },
]},
{ LISTITEM: [
{ LISTITEM_MARKER: [] },
{ STATICTEXT: [] },
{ TEXT_LEAF: [] },
]},
] };

Просмотреть файл

@ -18,7 +18,7 @@
role: ROLE_LISTITEM,
children: [
{
role: ROLE_LISTITEM_MARKER,
role: ROLE_STATICTEXT,
name: aBulletText,
},
{
@ -106,7 +106,7 @@
tree =
{ LIST: [ // ol
{ LISTITEM: [ // li
{ LISTITEM_MARKER: [ ] },
{ STATICTEXT: [ ] },
{ DEFINITION_LIST: [ // dl
{ TERM: [ // dt
{ TEXT_LEAF: [] },

Просмотреть файл

@ -197,7 +197,7 @@
function listItemReframe() {
testAccessibleTree("li",{ LISTITEM: [
{ LISTITEM_MARKER: [] },
{ STATICTEXT: [] },
{ TEXT_LEAF: [] },
] });
@ -206,7 +206,7 @@
window.windowUtils.advanceTimeAndRefresh(100);
testAccessibleTree("li",{ LISTITEM: [
{ LISTITEM_MARKER: [] },
{ STATICTEXT: [] },
{ TEXT_LEAF: [] },
] });

Просмотреть файл

@ -120,7 +120,7 @@
{ SECTION: [ // container
{ LIST: [
{ LISTITEM: [
{ LISTITEM_MARKER: [] },
{ STATICTEXT: [] },
{ TEXT_LEAF: [] },
] },
] },

Просмотреть файл

@ -26,7 +26,7 @@
role: ROLE_LISTITEM,
children: [
{
role: ROLE_LISTITEM_MARKER,
role: ROLE_STATICTEXT,
children: [],
},
{
@ -87,7 +87,7 @@
this.onProcessed = function textReplaceProcessor_onProcessed() {
var tree = {
LISTITEM: [
{ LISTITEM_MARKER: [] },
{ STATICTEXT: [] },
{ TEXT_LEAF: [] },
],
};

Просмотреть файл

@ -42,7 +42,7 @@
role: ROLE_LISTITEM,
children: [
{
role: ROLE_LISTITEM_MARKER,
role: ROLE_STATICTEXT,
name: "1. ",
children: [],
},