| Summary: | AX: Reduce unnecessary reliance on renderers in AccessibilityListBox, AccessibilitySlider, AccessibilityTableCell, AccessibilityTableRow, AccessibilityTable, and AccessibilityARIAGrid | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tyler Wilcock <tyler_w> | ||||||
| Component: | Accessibility | Assignee: | Tyler Wilcock <tyler_w> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | Other | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Tyler Wilcock
2023-04-27 23:01:43 PDT
Created attachment 466121 [details]
Patch
Created attachment 466123 [details]
Patch
Comment on attachment 466123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=466123&action=review > Source/WebCore/accessibility/AccessibilityTableCell.cpp:336 > + if (static_cast<int>(rowRange.second) == -1) { how would this be -1 if the original declaration is unsigned? std::pair<unsigned, unsigned> rowRange (In reply to chris fleizach from comment #4) > Comment on attachment 466123 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=466123&action=review > > > Source/WebCore/accessibility/AccessibilityTableCell.cpp:336 > > + if (static_cast<int>(rowRange.second) == -1) { > > how would this be -1 if the original declaration is unsigned? > > std::pair<unsigned, unsigned> rowRange axRowSpan() will assign rowRange.second to -1, but since it's unsigned that will actually assign a value of 4294967295. But the check here does static_cast<int>, turning 4294967295 back into -1. So I think this should be OK (In reply to Tyler Wilcock from comment #5) > (In reply to chris fleizach from comment #4) > > Comment on attachment 466123 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=466123&action=review > > > > > Source/WebCore/accessibility/AccessibilityTableCell.cpp:336 > > > + if (static_cast<int>(rowRange.second) == -1) { > > > > how would this be -1 if the original declaration is unsigned? > > > > std::pair<unsigned, unsigned> rowRange > axRowSpan() will assign rowRange.second to -1, but since it's unsigned that > will actually assign a value of 4294967295. But the check here does > static_cast<int>, turning 4294967295 back into -1. So I think this should be > OK Yea seems reasonable as long as overflow math continues to work Committed 263511@main (3228c83a428f): <https://commits.webkit.org/263511@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 466123 [details]. |