The rect for the primary screen should be retrieved on the main thread.
Created attachment 397001 [details] Patch
Committed r260392: <https://trac.webkit.org/changeset/260392> All reviewed patches have been landed. Closing bug and clearing flags on attachment 397001 [details].
<rdar://problem/62072352>
Comment on attachment 397001 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397001&action=review > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1952 > + static FloatRect screenRect; > + if (screenRect.isEmpty()) { > + screenRect = Accessibility::retrieveValueFromMainThread<FloatRect>([] () -> FloatRect { > + return screenRectForPrimaryScreen(); > + }); > + } You don’t need to add the if statement: static FloatRect screenRect = Accessibility::retrieveValueFromMainThread<FloatRect>([] () -> FloatRect { return screenRectForPrimaryScreen(); });
(In reply to Darin Adler from comment #4) > Comment on attachment 397001 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=397001&action=review > > > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1952 > > + static FloatRect screenRect; > > + if (screenRect.isEmpty()) { > > + screenRect = Accessibility::retrieveValueFromMainThread<FloatRect>([] () -> FloatRect { > > + return screenRectForPrimaryScreen(); > > + }); > > + } > > You don’t need to add the if statement: > > static FloatRect screenRect = > Accessibility::retrieveValueFromMainThread<FloatRect>([] () -> FloatRect { > return screenRectForPrimaryScreen(); > }); Fixed in https://bugs.webkit.org/show_bug.cgi?id=210914. Thanks!