Title: [287872] trunk
- Revision
- 287872
- Author
- [email protected]
- Date
- 2022-01-11 00:53:55 -0800 (Tue, 11 Jan 2022)
Log Message
[GTK][a11y] WTR: do not immediately process main thread events while waiting for ax thread task
https://bugs.webkit.org/show_bug.cgi?id=234950
Reviewed by Adrian Perez de Castro.
Source/WebCore:
Run a layout before creating the isolated tree to ensure we get an updated tree after ignored is computed.
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::create):
Tools:
We want to process the main thread events while waiting for ax thread to avoid blocking in case the ax thread
needs to get any value from the main thread. This might have side effects causing things to happen earlier than
expected. This patch only process main thread events after 125 milliseconds waiting for the ax thread, because
that probably means the ax thread is waiting for the main thread. This made most of the test to pass in isolated
tree mode with ATSPI.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:
(WTR::AccessibilityController::executeOnAXThreadAndWait):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (287871 => 287872)
--- trunk/Source/WebCore/ChangeLog 2022-01-11 08:52:44 UTC (rev 287871)
+++ trunk/Source/WebCore/ChangeLog 2022-01-11 08:53:55 UTC (rev 287872)
@@ -1,5 +1,17 @@
2022-01-11 Carlos Garcia Campos <[email protected]>
+ [GTK][a11y] WTR: do not immediately process main thread events while waiting for ax thread task
+ https://bugs.webkit.org/show_bug.cgi?id=234950
+
+ Reviewed by Adrian Perez de Castro.
+
+ Run a layout before creating the isolated tree to ensure we get an updated tree after ignored is computed.
+
+ * accessibility/isolatedtree/AXIsolatedTree.cpp:
+ (WebCore::AXIsolatedTree::create):
+
+2022-01-11 Carlos Garcia Campos <[email protected]>
+
[GTK][a11y] Set active state when element is the selected option active or aria-current isn't false with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=235029
Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (287871 => 287872)
--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp 2022-01-11 08:52:44 UTC (rev 287871)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp 2022-01-11 08:53:55 UTC (rev 287872)
@@ -97,6 +97,10 @@
auto tree = adoptRef(*new AXIsolatedTree(axObjectCache));
+ auto& document = axObjectCache->document();
+ if (!document.view()->layoutContext().isInRenderTreeLayout() && !document.inRenderTreeUpdate() && !document.inStyleRecalc())
+ document.updateLayoutIgnorePendingStylesheets();
+
// Generate the nodes of the tree and set its root and focused objects.
// For this, we need the root and focused objects of the AXObject tree.
auto* axRoot = axObjectCache->getOrCreate(axObjectCache->document().view());
Modified: trunk/Tools/ChangeLog (287871 => 287872)
--- trunk/Tools/ChangeLog 2022-01-11 08:52:44 UTC (rev 287871)
+++ trunk/Tools/ChangeLog 2022-01-11 08:53:55 UTC (rev 287872)
@@ -1,5 +1,21 @@
2022-01-11 Carlos Garcia Campos <[email protected]>
+ [GTK][a11y] WTR: do not immediately process main thread events while waiting for ax thread task
+ https://bugs.webkit.org/show_bug.cgi?id=234950
+
+ Reviewed by Adrian Perez de Castro.
+
+ We want to process the main thread events while waiting for ax thread to avoid blocking in case the ax thread
+ needs to get any value from the main thread. This might have side effects causing things to happen earlier than
+ expected. This patch only process main thread events after 125 milliseconds waiting for the ax thread, because
+ that probably means the ax thread is waiting for the main thread. This made most of the test to pass in isolated
+ tree mode with ATSPI.
+
+ * WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:
+ (WTR::AccessibilityController::executeOnAXThreadAndWait):
+
+2022-01-11 Carlos Garcia Campos <[email protected]>
+
[GTK][a11y] Set active state when element is the selected option active or aria-current isn't false with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=235029
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp (287871 => 287872)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp 2022-01-11 08:52:44 UTC (rev 287871)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp 2022-01-11 08:53:55 UTC (rev 287872)
@@ -152,8 +152,11 @@
function();
done.store(true);
});
- while (!done.load())
- g_main_context_iteration(nullptr, FALSE);
+ auto now = MonotonicTime::now();
+ while (!done.load()) {
+ if (MonotonicTime::now() - now >= 125_ms)
+ g_main_context_iteration(nullptr, FALSE);
+ }
}
void AccessibilityController::executeOnAXThread(Function<void()>&& function)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes