⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287778 in webkit


Ignore:
Timestamp:
Jan 7, 2022, 1:09:21 PM (5 years ago)
Author:
Andres Gonzalez
Message:

WebAccessibilityObjectWrapper accessibilityHitTest should call AXCoreObject::widget() on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=234973
<rdar://problem/87264153>

Reviewed by Chris Fleizach.

In isolated tree mode, the AX object widget() method and any subsequent
access to the returned value must be dispatch to the main thread.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityHitTest:]):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r287777 r287778  
     12022-01-07  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        WebAccessibilityObjectWrapper accessibilityHitTest should call AXCoreObject::widget() on the main thread.
     4        https://bugs.webkit.org/show_bug.cgi?id=234973
     5        <rdar://problem/87264153>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        In isolated tree mode, the AX object widget() method and any subsequent
     10        access to the returned value must be dispatch to the main thread.
     11
     12        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
     13        (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
     14
    1152022-01-07  Wenson Hsieh  <wenson_hsieh@apple.com>
    216
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r287138 r287778  
    29532953    auto* axObject = backingObject->accessibilityHitTest(IntPoint(point));
    29542954
     2955    id hit = nil;
    29552956    if (axObject) {
    29562957        if (axObject->isAttachment() && [axObject->wrapper() attachmentView])
    29572958            return [axObject->wrapper() attachmentView];
    2958         auto* widget = axObject->widget();
    2959         if (is<PluginViewBase>(widget))
    2960             return NSAccessibilityUnignoredAncestor(widget->accessibilityHitTest(IntPoint(point)));
    2961         return NSAccessibilityUnignoredAncestor(axObject->wrapper());
    2962     }
    2963     return NSAccessibilityUnignoredAncestor(self);
     2959
     2960        hit = Accessibility::retrieveAutoreleasedValueFromMainThread<id>([&axObject, &point] () -> RetainPtr<id> {
     2961            auto* widget = axObject->widget();
     2962            if (is<PluginViewBase>(widget))
     2963                return widget->accessibilityHitTest(IntPoint(point));
     2964            return nil;
     2965        });
     2966
     2967        if (!hit)
     2968            hit = axObject->wrapper();
     2969    } else
     2970        hit = self;
     2971
     2972    return NSAccessibilityUnignoredAncestor(hit);
    29642973}
    29652974
Note: See TracChangeset for help on using the changeset viewer.