RESOLVED FIXED Bug 206009
WKAccessibilityWebPageObject should use Accessibility::retrieveValueFromMainThread.
https://bugs.webkit.org/show_bug.cgi?id=206009
Summary WKAccessibilityWebPageObject should use Accessibility::retrieveValueFromMainT...
Andres Gonzalez
Reported 2020-01-09 08:14:39 PST
Make WKAccessibilityWebPageObjectt should use Accessibility::retrieveValueFromMainThread.
Attachments
Patch (8.01 KB, patch)
2020-01-09 08:45 PST, Andres Gonzalez
no flags
Patch (8.20 KB, patch)
2020-01-09 10:22 PST, Andres Gonzalez
no flags
Patch (8.20 KB, patch)
2020-01-09 10:52 PST, Andres Gonzalez
no flags
Andres Gonzalez
Comment 1 2020-01-09 08:45:19 PST
chris fleizach
Comment 2 2020-01-09 09:09:16 PST
Comment on attachment 387235 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387235&action=review > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:193 > + return [NSValue valueWithPoint:(NSPoint)protectedSelf->m_page->accessibilityPosition()]; we should also check 'if (!protectedSelf->m_page) here > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:203 > + if (protectedSelf->m_page->corePage()->pageOverlayController().copyAccessibilityAttributeBoolValueForPoint(attribute, point, boolValue)) if (!protectedSelf->m_page) > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:208 > + if (protectedSelf->m_page->corePage()->pageOverlayController().copyAccessibilityAttributeStringValueForPoint(attribute, point, stringValue)) if (!protectedSelf->m_page)
Andres Gonzalez
Comment 3 2020-01-09 10:22:41 PST
Andres Gonzalez
Comment 4 2020-01-09 10:25:36 PST
(In reply to chris fleizach from comment #2) > Comment on attachment 387235 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=387235&action=review Also added the check in line 118. > > > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:193 > > + return [NSValue valueWithPoint:(NSPoint)protectedSelf->m_page->accessibilityPosition()]; > > we should also check > 'if (!protectedSelf->m_page) here Done. > > > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:203 > > + if (protectedSelf->m_page->corePage()->pageOverlayController().copyAccessibilityAttributeBoolValueForPoint(attribute, point, boolValue)) > > if (!protectedSelf->m_page) Done. > > > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:208 > > + if (protectedSelf->m_page->corePage()->pageOverlayController().copyAccessibilityAttributeStringValueForPoint(attribute, point, stringValue)) > > if (!protectedSelf->m_page) Done.
Dean Jackson
Comment 5 2020-01-09 10:38:43 PST
Comment on attachment 387242 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387242&action=review Is there any testable behaviour here? > Source/WebKit/ChangeLog:3 > + WKAccessibilityWebPageObjectt should use Accessibility::retrieveValueFromMainThread. Typo Objectt > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:56 > +#define PROTECTED_SELF protectedSelf = RetainPtr<WKAccessibilityWebPageObject>(self) We don't normally do something like this. We just duplicate the code. I don't really mind though.
Andres Gonzalez
Comment 6 2020-01-09 10:52:08 PST
Andres Gonzalez
Comment 7 2020-01-09 11:00:59 PST
(In reply to Dean Jackson from comment #5) > Comment on attachment 387242 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=387242&action=review > > Is there any testable behaviour here? Thanks Dean. We don't have a framework to test the WKAccessibilityWebPageObject functionality. We are working on a way to test the accessibility multi-threaded mode though, but are not there yet. > > > Source/WebKit/ChangeLog:3 > > + WKAccessibilityWebPageObjectt should use Accessibility::retrieveValueFromMainThread. > > Typo Objectt Fixed. > > > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:56 > > +#define PROTECTED_SELF protectedSelf = RetainPtr<WKAccessibilityWebPageObject>(self) > > We don't normally do something like this. We just duplicate the code. I > don't really mind though. Thought that it is more readable this way.
WebKit Commit Bot
Comment 8 2020-01-09 13:39:50 PST
Comment on attachment 387244 [details] Patch Clearing flags on attachment: 387244 Committed r254294: <https://trac.webkit.org/changeset/254294>
WebKit Commit Bot
Comment 9 2020-01-09 13:39:51 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2020-01-09 13:40:13 PST
Note You need to log in before you can comment on or make changes to this bug.