Skip to content

Commit

Permalink
AX: Remove WTR::AccessibilityUIElement::isIsolatedObject since it sho…
Browse files Browse the repository at this point in the history
…uld not be used in any test.

https://bugs.webkit.org/show_bug.cgi?id=265876
<rdar://problem/119188944>

Reviewed by Tyler Wilcock.

Whether or not the underlying AX object is isolated should be irrelevant to the client, so no test should need to call this. This was added in an early stage of the ITM project for debugging purposes and is not exposed or used by any active test.

* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isIsolatedObject const): Deleted.
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isIsolatedObject const): Deleted.

Canonical link: https://commits.webkit.org/271689@main
  • Loading branch information
AndresGonzalezApple committed Dec 7, 2023
1 parent 6eed9f3 commit 5cf20e0
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ - (NSArray*)additionalAccessibilityAttributeNames
if (AXObjectCache::isIsolatedTreeEnabled())
[additional addObject:NSAccessibilityRelativeFrameAttribute];
#endif

return additional;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ bool AccessibilityUIElement::isValid() const
#endif
}

#if !ENABLE(ACCESSIBILITY_ISOLATED_TREE)
bool AccessibilityUIElement::isIsolatedObject() const
{
return false;
}
#endif

// iOS specific methods
#if !PLATFORM(IOS_FAMILY)
JSRetainPtr<JSStringRef> AccessibilityUIElement::identifier() { return nullptr; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,6 @@ class AccessibilityUIElement : public JSWrappable {
bool hasTextEntryTrait();
RefPtr<AccessibilityUIElement> fieldsetAncestorElement();

bool isIsolatedObject() const;

bool isInsertion() const;
bool isDeletion() const;
bool isFirstItemInSuggestion() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
] interface AccessibilityUIElement {
boolean isEqual(AccessibilityUIElement otherElement);
readonly attribute DOMString domIdentifier;
readonly attribute boolean isIsolatedObject;

// Element access.
AccessibilityUIElement elementAtPoint(long x, long y);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);

@interface NSObject (WebKitAccessibilityAdditions)
- (BOOL)isIsolatedObject;
- (BOOL)accessibilityReplaceRange:(NSRange)range withText:(NSString *)string;
- (BOOL)accessibilityInsertText:(NSString *)text;
- (NSArray *)accessibilityArrayAttributeValues:(NSString *)attribute index:(NSUInteger)index maxCount:(NSUInteger)maxCount;
Expand Down Expand Up @@ -135,21 +134,6 @@ - (void)_accessibilitySetValue:(id)value forAttribute:(NSString*)attributeName;
return platformUIElement() == otherElement->platformUIElement();
}

#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
bool AccessibilityUIElement::isIsolatedObject() const
{
BOOL value;

BEGIN_AX_OBJC_EXCEPTIONS
s_controller->executeOnAXThreadAndWait([this, &value] {
value = [m_element isIsolatedObject];
});
END_AX_OBJC_EXCEPTIONS

return value;
}
#endif

RetainPtr<NSArray> supportedAttributes(id element)
{
RetainPtr<NSArray> attributes;
Expand Down

0 comments on commit 5cf20e0

Please sign in to comment.