Calls to AXCoreObject::widget() have to be dispatch to the main thread in isolated tree mode.
<rdar://problem/84271039>
Created attachment 441269 [details] Patch
Comment on attachment 441269 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=441269&action=review > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:804 > + undo > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1680 > + return @[child]; should we return nil if we don't have a child here?
Comment on attachment 441269 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=441269&action=review > Source/WebCore/ChangeLog:13 > + safe and it is created on the main thread. To avoid this problem, We We > we > Source/WebCore/ChangeLog:14 > + have to dispatch those calls to the main thread. Since widget() is call very often now, for every request of the children of a leaf node, added is call > is called
(In reply to chris fleizach from comment #3) > Comment on attachment 441269 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=441269&action=review > > > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:804 > > + > > undo Done. > > > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1680 > > + return @[child]; > > should we return nil if we don't have a child here? I don't believe so because other kinds of Widgets liked ScrollViews and Scrollbars may not have an accessibilityObject but can still return not nil in ALLOW_DEPRECATED_DECLARATIONS_BEGIN return [backingObject->platformWidget() accessibilityAttributeValue:NSAccessibilityChildrenAttribute]; ALLOW_DEPRECATED_DECLARATIONS_END I think accessibilityObject is only for plug-ins, right?
(In reply to chris fleizach from comment #4) > Comment on attachment 441269 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=441269&action=review > > > Source/WebCore/ChangeLog:13 > > + safe and it is created on the main thread. To avoid this problem, We > > We > we > > > Source/WebCore/ChangeLog:14 > > + have to dispatch those calls to the main thread. Since widget() is call very often now, for every request of the children of a leaf node, added > > is call > is called Fixed both, cannot get my grammar straight today :-).
Comment on attachment 441269 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=441269&action=review >>> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1680 >>> + return @[child]; >> >> should we return nil if we don't have a child here? > > I don't believe so because other kinds of Widgets liked ScrollViews and Scrollbars may not have an accessibilityObject but can still return not nil in > > ALLOW_DEPRECATED_DECLARATIONS_BEGIN > return [backingObject->platformWidget() accessibilityAttributeValue:NSAccessibilityChildrenAttribute]; > ALLOW_DEPRECATED_DECLARATIONS_END > > I think accessibilityObject is only for plug-ins, right? I was thinking if isWidget() returns true, but we don't get a widget, does that mean a failure case that we should return from
Created attachment 441282 [details] Patch Addresses Chris's comments.
Created attachment 441288 [details] Patch Modified renderWidgetChildren
(In reply to chris fleizach from comment #7) > Comment on attachment 441269 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=441269&action=review > > >>> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1680 > >>> + return @[child]; > >> > >> should we return nil if we don't have a child here? > > > > I don't believe so because other kinds of Widgets liked ScrollViews and Scrollbars may not have an accessibilityObject but can still return not nil in > > > > ALLOW_DEPRECATED_DECLARATIONS_BEGIN > > return [backingObject->platformWidget() accessibilityAttributeValue:NSAccessibilityChildrenAttribute]; > > ALLOW_DEPRECATED_DECLARATIONS_END > > > > I think accessibilityObject is only for plug-ins, right? > > I was thinking if isWidget() returns true, but we don't get a widget, does > that mean a failure case that we should return from Re-wrote it slightly different that it may be clearer. renderWidgetChildren returns nil for everything that is not a widget. If it is a widget, then we try first the Widget's accessibilityObject, which should be not nil for plug-ins. If that is nil, then we try the platformWidget's AXChildren attribute, which may be not nil for ScrollViews and Scrollbars.
Created attachment 441366 [details] Patch Removing leftover }.
Committed r284266 (243074@main): <https://commits.webkit.org/243074@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 441366 [details].