зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1280551 - Documents sometimes load with no child accessibles but all text merged into document, r=yzen
This commit is contained in:
Родитель
a29eef42cd
Коммит
3e59ef8ff4
|
@ -81,6 +81,10 @@ TreeWalker::Seek(nsIContent* aChildNode)
|
|||
|
||||
Reset();
|
||||
|
||||
if (mAnchorNode == aChildNode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
nsIContent* childNode = nullptr;
|
||||
nsINode* parentNode = aChildNode;
|
||||
do {
|
||||
|
|
|
@ -129,19 +129,38 @@
|
|||
*/
|
||||
function replaceIFrameHTMLElm(aID)
|
||||
{
|
||||
this.__proto__ = new rootContentReplaced(aID, "New Wave");
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_SHOW, getDocChildNode, aID),
|
||||
new invokerChecker(EVENT_REORDER, getDocNode, aID)
|
||||
];
|
||||
|
||||
this.invoke = function replaceIFrameHTMLElm_invoke()
|
||||
{
|
||||
var docNode = getDocNode(aID);
|
||||
var newHTMLNode = docNode.createElement("html");
|
||||
var newBodyNode = docNode.createElement("body");
|
||||
var newTextNode = docNode.createTextNode("New Wave");
|
||||
newBodyNode.appendChild(newTextNode);
|
||||
newHTMLNode.appendChild(newBodyNode);
|
||||
newHTMLNode.innerHTML = `<body><p>New Wave</p></body`;
|
||||
docNode.replaceChild(newHTMLNode, docNode.documentElement);
|
||||
}
|
||||
|
||||
this.finalCheck = function replaceIFrameHTMLElm_finalCheck()
|
||||
{
|
||||
var tree = {
|
||||
role: ROLE_DOCUMENT,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_PARAGRAPH,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_TEXT_LEAF,
|
||||
name: 'New Wave'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
testAccessibleTree(getDocNode(aID), tree);
|
||||
}
|
||||
|
||||
this.getID = function replaceIFrameHTMLElm_getID()
|
||||
{
|
||||
return "replace HTML element";
|
||||
|
@ -391,8 +410,8 @@
|
|||
////////////////////////////////////////////////////////////////////////////
|
||||
// Test
|
||||
|
||||
//gA11yEventDumpID = "eventdump"; // debug stuff
|
||||
//gA11yEventDumpToConsole = true;
|
||||
//enableLogging('tree,verbose');
|
||||
|
||||
var gQueue = null;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче