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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 21 06:24:28 PDT 2021


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

--- Comment #5 from Andres Gonzalez <andresg_22 at apple.com> ---
(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 #2)
> > > Created attachment 441869 [details]
> > > Patch
> > 
> > --- a/Source/WebCore/accessibility/AXObjectCache.cpp
> > +++ a/Source/WebCore/accessibility/AXObjectCache.cpp
> > 
> > @@ -1428,9 +1428,10 @@ void
> > AXObjectCache::postTextStateChangeNotification(const Position& position, co
> > 
> >      stopCachingComputedObjectAttributes();
> > 
> > -#if PLATFORM(COCOA)
> > +#if PLATFORM(COCOA) || USE(ATSPI)
> >      AccessibilityObject* object = getOrCreate(node);
> >      if (object && object->accessibilityIsIgnored()) {
> > +#if PLATFORM(COCOA)
> >          if (position.atLastEditingPositionForNode()) {
> >              if (AccessibilityObject* nextSibling =
> > object->nextSiblingUnignored(1))
> >                  object = nextSibling;
> > @@ -1438,6 +1439,11 @@ void
> > AXObjectCache::postTextStateChangeNotification(const Position& position, co
> >              if (AccessibilityObject* previousSibling =
> > object->previousSiblingUnignored(1))
> >                  object = previousSibling;
> >          }
> > +#elif USE(ATSPI)
> > +        auto* parent = object->parentObjectUnignored();
> > +        if (is<AccessibilityObject>(parent))
> > +            object = downcast<AccessibilityObject>(parent);
> > +#endif
> >      }
> > 
> >      postTextStateChangeNotification(object, intent, selection);
> > 
> > Why the target should be parentObjectUnignored and not the prev/next sibling?
> 
> Because in linux we don't expose text nodes in the tree, so it's the parent
> the one implementing the text interface.

Thanks, makes sense. A comment in the code stating this would be helpful.

-- 
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/20211021/d39b403b/attachment-0001.htm>


More information about the webkit-unassigned mailing list