Fix usage of nsIDocShellTreeItem in nsCoreUtils::IsRootDocument
Categories
(Core :: Disability Access APIs, enhancement, P2)
Tracking
()
Fission Milestone | Future |
People
(Reporter: djvj, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rm-docshell-tree-item:simple])
In the function nsCoreUtils::IsRootDocument
(https://searchfox.org/mozilla-central/source/accessible/base/nsCoreUtils.cpp#341):
This function checks if a document is a root document by getting its docshell tree-item, then obtaining its in-process parent, and checking if the parent is null.
Post-fission, this will return true
incorrectly when the parent is out of process. This function should be modified as follows:
- Obtain the parent.
- If the parent is non-null, return
false
, as this document cannot be the root. - If the parent is null, then use the associated BrowsingContext to determine whether there is an out-of-process parent, and return true if so, otherwise false.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•5 years ago
•
|
||
I was also thinking that returning true for the out-of-process document is wrong, but after some more reading the code around its call site, now I think returning true looks correct.
There is only one call site of nsCoreUtils::IsRootDocument, which is in DocManager::CreateDocOrRootAccessible. If we consider a given document is not root, we try to get the parent accessible document, then we call BindChildDocument. Apparently it won't work in fission.
So, I think we should rename nsCoreUtils::IsRootDocument to nsCoreUtils::IsRootDocumentInProcess, and make the function return true in the case where the given document is the root document of the out-of-process document tree.
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Kannan says replacing nsIDocShellTreeItem calls should block enabling Fission in Nightly (M6).
Comment 3•4 years ago
|
||
Comment 1 is correct. As far as the a11y engine is concerned, root accessible means in-process root accessible (the outer most accessible in the in-process a11y tree).
Updated•2 years ago
|
Description
•