| Summary: | [GTK][a11y] Add implementation of document interface when building with ATSPI | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||||||
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, aperez, apinheiro, bugs-noreply, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white | ||||||||
| Priority: | P2 | Keywords: | Gtk | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Bug Depends on: | 232749 | ||||||||||
| Bug Blocks: | 230253, 232782 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Carlos Garcia Campos
2021-11-05 06:12:56 PDT
Created attachment 443390 [details]
Patch
This won't apply because it depends on other bugs not fixed yet.
Created attachment 444809 [details]
Patch
Created attachment 444813 [details]
Patch
Comment on attachment 444813 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444813&action=review > Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:112 > + return map; I would first check m_coreObject and do the early return, after that we know that it will not be null and avoid checking it again. I am thinking of this: if (!m_coreObject) return map; m_coreObject->updateBackingStore(); auto* document = m_coreObject->document(); // ...rest of the code as it was... > Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:148 > + return { }; Same here, there are two null-checks on m_coreObject one right after the other. Comment on attachment 444813 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444813&action=review >> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:112 >> + return map; > > I would first check m_coreObject and do the early return, after that we know > that it will not be null and avoid checking it again. I am thinking of this: > > if (!m_coreObject) > return map; > > m_coreObject->updateBackingStore(); > auto* document = m_coreObject->document(); > // ...rest of the code as it was... This is because updateBackingStore can make m_coreObject nullptr. >> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:148 >> + return { }; > > Same here, there are two null-checks on m_coreObject one right after the other. Same here, the pattern is repeated everywhere. (In reply to Carlos Garcia Campos from comment #5) > Comment on attachment 444813 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=444813&action=review > > >> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:112 > >> + return map; > > > > I would first check m_coreObject and do the early return, after that we know > > that it will not be null and avoid checking it again. I am thinking of this: > > > > if (!m_coreObject) > > return map; > > > > m_coreObject->updateBackingStore(); > > auto* document = m_coreObject->document(); > > // ...rest of the code as it was... > > This is because updateBackingStore can make m_coreObject nullptr. > > >> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:148 > >> + return { }; > > > > Same here, there are two null-checks on m_coreObject one right after the other. > > Same here, the pattern is repeated everywhere. Right. Thanks for commenting on this :-) Committed r286059 (244446@main): <https://commits.webkit.org/244446@main> |