Title: [292707] trunk/Tools
- Revision
- 292707
- Author
- [email protected]
- Date
- 2022-04-11 06:43:57 -0700 (Mon, 11 Apr 2022)
Log Message
TestRunner’s calls to [WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:] need to be dispatch to the AX secondary thread.
https://bugs.webkit.org/show_bug.cgi?id=239010
<rdar://problem/91493569>
Reviewed by Chris Fleizach.
Added AccessibilityUIElement::arrayAttributeCount to dispatch to the AX
secondary thread calls to the platform wrapper's
accessibilityArrayAttributeCount. Replaced the instances to the
platform wrapper's method with the calls to this new method.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::arrayAttributeCount const):
(WTR::AccessibilityUIElement::selectedChildrenCount const):
(WTR::AccessibilityUIElement::rowCount):
(WTR::AccessibilityUIElement::columnCount):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (292706 => 292707)
--- trunk/Tools/ChangeLog 2022-04-11 12:53:53 UTC (rev 292706)
+++ trunk/Tools/ChangeLog 2022-04-11 13:43:57 UTC (rev 292707)
@@ -1,3 +1,23 @@
+2022-04-11 Andres Gonzalez <[email protected]>
+
+ TestRunner’s calls to [WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:] need to be dispatch to the AX secondary thread.
+ https://bugs.webkit.org/show_bug.cgi?id=239010
+ <rdar://problem/91493569>
+
+ Reviewed by Chris Fleizach.
+
+ Added AccessibilityUIElement::arrayAttributeCount to dispatch to the AX
+ secondary thread calls to the platform wrapper's
+ accessibilityArrayAttributeCount. Replaced the instances to the
+ platform wrapper's method with the calls to this new method.
+
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::arrayAttributeCount const):
+ (WTR::AccessibilityUIElement::selectedChildrenCount const):
+ (WTR::AccessibilityUIElement::rowCount):
+ (WTR::AccessibilityUIElement::columnCount):
+
2022-04-11 Youenn Fablet <[email protected]>
Split TestWebKitAPI.GPUProcess.ExitsUnderMemoryPressureWebRTCCase in more tests
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (292706 => 292707)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2022-04-11 12:53:53 UTC (rev 292706)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2022-04-11 13:43:57 UTC (rev 292707)
@@ -401,6 +401,7 @@
#if PLATFORM(MAC)
RetainPtr<id> attributeValueForParameter(NSString *, id) const;
+ unsigned arrayAttributeCount(NSString *) const;
RetainPtr<NSString> descriptionOfValue(id valueObject) const;
bool boolAttributeValue(NSString *attribute) const;
JSRetainPtr<JSStringRef> stringAttributeValue(NSString *attribute) const;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (292706 => 292707)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2022-04-11 12:53:53 UTC (rev 292706)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2022-04-11 13:43:57 UTC (rev 292707)
@@ -333,6 +333,19 @@
return value;
}
+unsigned AccessibilityUIElement::arrayAttributeCount(NSString *attributeName) const
+{
+ unsigned count = 0;
+
+ BEGIN_AX_OBJC_EXCEPTIONS
+ s_controller->executeOnAXThreadAndWait([&attributeName, &count, this] {
+ count = [m_element accessibilityArrayAttributeCount:attributeName];
+ });
+ END_AX_OBJC_EXCEPTIONS
+
+ return count;
+}
+
JSRetainPtr<JSStringRef> AccessibilityUIElement::domIdentifier() const
{
return stringAttributeValue(NSAccessibilityDOMIdentifierAttribute);
@@ -524,15 +537,7 @@
unsigned AccessibilityUIElement::selectedChildrenCount() const
{
- unsigned count = 0;
-
- BEGIN_AX_OBJC_EXCEPTIONS
- s_controller->executeOnAXThreadAndWait([&count, this] {
- count = [m_element accessibilityArrayAttributeCount:NSAccessibilitySelectedChildrenAttribute];
- });
- END_AX_OBJC_EXCEPTIONS
-
- return count;
+ return arrayAttributeCount(NSAccessibilitySelectedChildrenAttribute);
}
RefPtr<AccessibilityUIElement> AccessibilityUIElement::selectedRowAtIndex(unsigned index)
@@ -1341,20 +1346,12 @@
int AccessibilityUIElement::rowCount()
{
- BEGIN_AX_OBJC_EXCEPTIONS
- return [m_element accessibilityArrayAttributeCount:NSAccessibilityRowsAttribute];
- END_AX_OBJC_EXCEPTIONS
-
- return 0;
+ return arrayAttributeCount(NSAccessibilityRowsAttribute);
}
int AccessibilityUIElement::columnCount()
{
- BEGIN_AX_OBJC_EXCEPTIONS
- return [m_element accessibilityArrayAttributeCount:NSAccessibilityColumnsAttribute];
- END_AX_OBJC_EXCEPTIONS
-
- return 0;
+ return arrayAttributeCount(NSAccessibilityColumnsAttribute);
}
int AccessibilityUIElement::indexInTable()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes