Implement document
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>