зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1334972 - crash when aria-owned child takes children from its parent, r=yzen
This commit is contained in:
Родитель
f7dc102b1b
Коммит
f7075f375a
|
@ -2087,11 +2087,13 @@ DocAccessible::DoARIAOwnsRelocation(Accessible* aOwner)
|
|||
child->SetRelocated(true);
|
||||
children->InsertElementAt(arrayIdx, child);
|
||||
|
||||
insertIdx = child->IndexInParent() + 1;
|
||||
arrayIdx++;
|
||||
|
||||
// Create subtree before adjusting the insertion index, since subtree
|
||||
// creation may alter children in the container.
|
||||
CreateSubtree(child);
|
||||
FireEventsOnInsertion(aOwner);
|
||||
|
||||
insertIdx = child->IndexInParent() + 1;
|
||||
arrayIdx++;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
|
|
@ -532,6 +532,50 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set ARIA owns on inaccessible span element that contains
|
||||
* accessible children. This will move children from the container for
|
||||
* the span.
|
||||
*/
|
||||
function test8()
|
||||
{
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_REORDER, "t8_container")
|
||||
];
|
||||
|
||||
this.invoke = function test8_invoke()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [
|
||||
{ PUSHBUTTON: [] },
|
||||
{ ENTRY: [] },
|
||||
{ ENTRY: [] },
|
||||
{ ENTRY: [] }
|
||||
] };
|
||||
testAccessibleTree("t8_container", tree);
|
||||
|
||||
getNode(t8_container).setAttribute("aria-owns", "t8_span t8_button");
|
||||
}
|
||||
|
||||
this.finalCheck = function test8_finalCheck()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [
|
||||
{ TEXT: [
|
||||
{ ENTRY: [] },
|
||||
{ ENTRY: [] },
|
||||
{ ENTRY: [] }
|
||||
] },
|
||||
{ PUSHBUTTON: [] }
|
||||
] };
|
||||
testAccessibleTree("t8_container", tree);
|
||||
}
|
||||
|
||||
this.getID = function test8_getID()
|
||||
{
|
||||
return `Set ARIA owns on inaccessible span element that contains accessible children`;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Test
|
||||
|
@ -580,6 +624,8 @@
|
|||
|
||||
gQueue.push(new setARIAOwnsOnElToRemove("t7_parent", "t7_child"));
|
||||
|
||||
gQueue.push(new test8());
|
||||
|
||||
gQueue.invoke(); // SimpleTest.finish() will be called in the end
|
||||
}
|
||||
|
||||
|
@ -638,6 +684,10 @@
|
|||
<div id="t7_child"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="t8_container">
|
||||
<input id="t8_button" type="button"><span id="t8_span"><input><input><input></span>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче