[Webkit-unassigned] [Bug 230257] [GTK][a11y] Add implementation of component interface when building with ATSPI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 10 00:44:46 PDT 2021


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

--- Comment #9 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Andres Gonzalez from comment #7)
> (In reply to Carlos Garcia Campos from comment #6)
> > (In reply to Andres Gonzalez from comment #5)
> > > (In reply to Carlos Garcia Campos from comment #4)
> > > > (In reply to Andres Gonzalez from comment #3)
> > > > > (In reply to Carlos Garcia Campos from comment #1)
> > > > > > Created attachment 440592 [details]
> > > > > > Patch
> > > > > 
> > > > > --- a/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
> > > > > +++ a/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
> > > > > 
> > > > > +    RefPtr<AXIsolatedObject> nodeForID(AXID) const;
> > > > > 
> > > > > nodeForID belongs to the tree not to the isolated object. I think it is a
> > > > > better design to keep it in AXIsolatedTree. Do you have a reason to move it
> > > > > to AXIsolatedObject?
> > > > 
> > > > Yes, I need it in AccessibilityObjectAtspi::hitTest() only because of WTR
> > > > actually. Since WTR calls accessibility api from the web process main
> > > > thread, I can't use AXIsolatedObject::accessibilityHitTest() because it's
> > > > always expected to be called from the secondary thread (nodeForID only works
> > > > from the a11y thread). I can't use callOnAXthreadAndWait, because first
> > > > thing AXIsolatedObject::accessibilityHitTest() is
> > > > retrieveValueFromMainThread() but main thread is blocked. So, I split it
> > > > adding AccessibilityObjectAtspi::objectAtPoint() that is always called by
> > > > the main thread and does the coordinate conversion + accessibilityHitTest().
> > > > When called from the main thread (WTR only) it's called directly and the
> > > > wrapper object returned. When called from the AX thread I need the
> > > > nodeForID() call to get the wrapper from the isolated object. 
> > > 
> > > Can't you get the wrapper from the isolated object? AXCoreObject::wrapper()
> > > should work in all objects, isolated or live.
> > 
> > hmm, I'm not sure it's ok to get the wrapper from the main thread, I assumed
> > that AXIsolatedObject::accessibilityHitTest() returned the AXID because it's
> > safe to send the id from main to AX thread, but not the wrapper?
> 
> Let's go back for a moment to the origin of the problem. As you said, you
> couldn't use AccessibilityController::executeOnAXThreadAndWait for HitTest
> because HitTest  will dispatch back to the main thread that it would be
> waiting, resulting in deadlock. The way we worked around this was by:
> 
> AccessibilityController::executeOnAXThreadAndWait calls
> AXThread::dispatch that in turn calls
> axThread.wakeUpRunLoop
> 
> On Mac wakeUpRunLoop does
> 
> void AXThread::wakeUpRunLoop()
> {
>     CFRunLoopSourceSignal(m_threadRunLoopSource.get());
>     CFRunLoopWakeUp(m_threadRunLoop.get());
> }
> 
> But it is a no-op in GTK. Could we try something equivalent in GTK?

hmm, I don't understand how waking up the AX thread helps.

-- 
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/20211010/faf70bd5/attachment-0001.htm>


More information about the webkit-unassigned mailing list