Title: [292446] trunk/Source/WebCore
Revision
292446
Author
andresg...@apple.com
Date
2022-04-05 20:27:14 -0700 (Tue, 05 Apr 2022)

Log Message

Eliminate delays for processing live regions and modal notifications.
https://bugs.webkit.org/show_bug.cgi?id=238833
<rdar://problem/91314023>

Reviewed by Chris Fleizach.

We had arbitrary delays to process notifications for live regions and
modal elements. This is no longer necessary and may cause problems
updating the isolated tree that depends on these notifications being
processed in a timely manner.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleChildrenChanged):
(WebCore::AXObjectCache::postLiveRegionChangeNotification):
(WebCore::AXObjectCache::focusModalNode):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (292445 => 292446)


--- trunk/Source/WebCore/ChangeLog	2022-04-06 00:54:05 UTC (rev 292445)
+++ trunk/Source/WebCore/ChangeLog	2022-04-06 03:27:14 UTC (rev 292446)
@@ -1,3 +1,21 @@
+2022-04-05  Andres Gonzalez  <andresg...@apple.com>
+
+        Eliminate delays for processing live regions and modal notifications.
+        https://bugs.webkit.org/show_bug.cgi?id=238833
+        <rdar://problem/91314023>
+
+        Reviewed by Chris Fleizach.
+
+        We had arbitrary delays to process notifications for live regions and
+        modal elements. This is no longer necessary and may cause problems
+        updating the isolated tree that depends on these notifications being
+        processed in a timely manner.
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::handleChildrenChanged):
+        (WebCore::AXObjectCache::postLiveRegionChangeNotification):
+        (WebCore::AXObjectCache::focusModalNode):
+
 2022-04-05  Stephan Szabo  <stephan.sz...@sony.com>
 
         [PlayStation[ Fix build break after r292408

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (292445 => 292446)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-04-06 00:54:05 UTC (rev 292445)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-04-06 03:27:14 UTC (rev 292446)
@@ -127,8 +127,6 @@
 
 // Post value change notifications for password fields or elements contained in password fields at a 40hz interval to thwart analysis of typing cadence
 static const Seconds accessibilityPasswordValueChangeNotificationInterval { 25_ms };
-static const Seconds accessibilityLiveRegionChangedNotificationInterval { 20_ms };
-static const Seconds accessibilityFocusModalNodeNotificationInterval { 50_ms };
 
 static bool rendererNeedsDeferredUpdate(const RenderObject& renderer)
 {
@@ -1058,7 +1056,7 @@
             parent->setNeedsToUpdateChildren();
 
         // If this object supports ARIA live regions, then notify AT of changes.
-        // This notification need to be sent even when the screen reader has not accessed this live region since the last update.
+        // This notification needs to be sent even when the screen reader has not accessed this live region since the last update.
         // Sometimes this function can be called many times within a short period of time, leading to posting too many AXLiveRegionChanged notifications.
         // To fix this, we use a timer to make sure we only post one notification for the children changes within a pre-defined time interval.
         if (parent->supportsLiveRegion())
@@ -1695,7 +1693,7 @@
     if (!m_liveRegionObjectsSet.contains(object))
         m_liveRegionObjectsSet.add(object);
 
-    m_liveRegionChangedPostTimer.startOneShot(accessibilityLiveRegionChangedNotificationInterval);
+    m_liveRegionChangedPostTimer.startOneShot(0_s);
 }
 
 void AXObjectCache::liveRegionChangedNotificationPostTimerFired()
@@ -1729,7 +1727,7 @@
     if (m_focusModalNodeTimer.isActive())
         m_focusModalNodeTimer.stop();
     
-    m_focusModalNodeTimer.startOneShot(accessibilityFocusModalNodeNotificationInterval);
+    m_focusModalNodeTimer.startOneShot(0_s);
 }
 
 void AXObjectCache::focusModalNodeTimerFired()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to