[Webkit-unassigned] [Bug 234841] AX: Make more tests async to pass in isolated tree mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 8 02:54:08 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=234841

--- Comment #10 from Carlos Garcia Campos <cgarcia at igalia.com> ---
I've investigated the issue a bit more. I realized that the initial problem of not getting the child after focusedElement, is because when AXIsolatedTree::create() is called the renderers haven't been attached yet, that's why the web area reports 0 children. But then I noticed that renderers were attached right after the tree is initially populated. It ended up being the call to focusedObjectForPage() in AXIsolatedTree::create() that calls Document::updateStyleIfNeeded(). If I move the call to focusedObjectForPage() before the generateSubtree() or explicitly call Document::updateStyleIfNeeded() then when the tree is initially populated the web area has children and the problem of getting the children after focusedElement is fixed.

But unfortunately that didn't fix the tests. For example with accessibility/image-map1.html I got a valid role for the first link, but null title because the returned child is detached between the call tom role() and title(). This happens because the first layout after the tree is populated causes the children to be recomputed, due to changes in ignored flag. So, I tried by doing Document::updateLayout() instead of Document::updateStyleIfNeeded() in AXIsolatedTree::create(), and it somehow worked, now we get the right child after the ignore flag is recomputed, but then I got the same problem with the second link, this time another childrenChanged caused the returned child to be detached before role() is called. And this is caused the main thread run loop iterations in AccessibilityController::executeOnAXThreadAndWait() while waiting for the ax thread to complete (not the workaround I tried, the ones after calling axRunLoop().dispatch()). So, removing those and using a semaphore as we used to do finally fixed accessibility/image-map1.html, but caused other tests to timeout (I guess the cases in which we call the main thread from the ax thread).

So, I still don't have a solution...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220108/658bcb14/attachment.htm>


More information about the webkit-unassigned mailing list