Changeset 261692 in webkit


Ignore:
Timestamp:
May 14, 2020 8:30:31 AM (4 years ago)
Author:
Andres Gonzalez
Message:

AXIsolatedObject::isOnScreen needs to be dispatched to the main thread.
https://bugs.webkit.org/show_bug.cgi?id=211893

Reviewed by Chris Fleizach.

Covered by existing tests.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::children): Split assert into two lines for readability.
(WebCore::AXIsolatedObject::isOnScreen const): Forward to associated AXObject and dispatch to the main thread.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r261691 r261692  
     12020-05-14  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        AXIsolatedObject::isOnScreen needs to be dispatched to the main thread.
     4        https://bugs.webkit.org/show_bug.cgi?id=211893
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Covered by existing tests.
     9
     10        * accessibility/isolatedtree/AXIsolatedObject.cpp:
     11        (WebCore::AXIsolatedObject::children): Split assert into two lines for readability.
     12        (WebCore::AXIsolatedObject::isOnScreen const): Forward to associated AXObject and dispatch to the main thread.
     13
    1142020-05-14  Andres Gonzalez  <andresg_22@apple.com>
    215
  • trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp

    r261691 r261692  
    488488const AXCoreObject::AccessibilityChildrenVector& AXIsolatedObject::children(bool)
    489489{
    490     ASSERT(_AXSIsolatedTreeModeFunctionIsAvailable() && ((_AXSIsolatedTreeMode_Soft() == AXSIsolatedTreeModeSecondaryThread && !isMainThread()) || (_AXSIsolatedTreeMode_Soft() == AXSIsolatedTreeModeMainThread && isMainThread())));
     490    ASSERT(_AXSIsolatedTreeModeFunctionIsAvailable() && ((_AXSIsolatedTreeMode_Soft() == AXSIsolatedTreeModeSecondaryThread && !isMainThread())
     491        || (_AXSIsolatedTreeMode_Soft() == AXSIsolatedTreeModeMainThread && isMainThread())));
    491492    updateBackingStore();
    492493    m_children.clear();
     
    11481149bool AXIsolatedObject::isOnScreen() const
    11491150{
    1150     ASSERT_NOT_REACHED();
    1151     return false;
     1151    return Accessibility::retrieveValueFromMainThread<bool>([this] () -> bool {
     1152        if (auto* object = associatedAXObject())
     1153            return object->isOnScreen();
     1154        return false;
     1155    });
    11521156}
    11531157
Note: See TracChangeset for help on using the changeset viewer.