Title: [258402] trunk/Source/WebCore
Revision
258402
Author
andresg...@apple.com
Date
2020-03-13 09:35:54 -0700 (Fri, 13 Mar 2020)

Log Message

[WebAccessibilityObjectWrapper renderWidgetChildren] does not need to run on main thread.
https://bugs.webkit.org/show_bug.cgi?id=209053
<rdar://problem/60349440>

Reviewed by Chris Fleizach.

Since we are caching the platform widget in IsolatedMode (NSView),
there is no need to dispatch renderWidgetChildren to the main thread.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper renderWidgetChildren]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (258401 => 258402)


--- trunk/Source/WebCore/ChangeLog	2020-03-13 16:22:59 UTC (rev 258401)
+++ trunk/Source/WebCore/ChangeLog	2020-03-13 16:35:54 UTC (rev 258402)
@@ -1,3 +1,17 @@
+2020-03-13  Andres Gonzalez  <andresg...@apple.com>
+
+        [WebAccessibilityObjectWrapper renderWidgetChildren] does not need to run on main thread.
+        https://bugs.webkit.org/show_bug.cgi?id=209053
+        <rdar://problem/60349440>
+
+        Reviewed by Chris Fleizach.
+
+        Since we are caching the platform widget in IsolatedMode (NSView),
+        there is no need to dispatch renderWidgetChildren to the main thread.
+
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper renderWidgetChildren]):
+
 2020-03-13  Ryosuke Niwa  <rn...@webkit.org>
 
         Crash in TextIterator::node via TextManipulationController::replace

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (258401 => 258402)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2020-03-13 16:22:59 UTC (rev 258401)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2020-03-13 16:35:54 UTC (rev 258402)
@@ -1859,18 +1859,13 @@
 
 - (NSArray*)renderWidgetChildren
 {
-    return Accessibility::retrieveValueFromMainThread<NSArray *>([protectedSelf = RetainPtr<WebAccessibilityObjectWrapper>(self)] () -> NSArray * {
-        auto* backingObject = protectedSelf.get().axBackingObject;
-        if (!backingObject)
-            return nil;
+    auto* backingObject = self.axBackingObject;
+    if (!backingObject)
+        return nil;
 
-        Widget* widget = backingObject->widget();
-        if (!widget)
-            return nil;
-        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-        return [(widget->platformWidget()) accessibilityAttributeValue:NSAccessibilityChildrenAttribute];
-        ALLOW_DEPRECATED_DECLARATIONS_END
-    });
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+    return [backingObject->platformWidget() accessibilityAttributeValue:NSAccessibilityChildrenAttribute];
+    ALLOW_DEPRECATED_DECLARATIONS_END
 }
 
 - (id)remoteAccessibilityParentObject
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to