Bug 235950 - Check AccessibilityRenderObject::m_renderer for null before using it.
Summary: Check AccessibilityRenderObject::m_renderer for null before using it.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-01 07:13 PST by Andres Gonzalez
Modified: 2022-02-01 18:48 PST (History)
11 users (show)

See Also:


Attachments
Patch (5.96 KB, patch)
2022-02-01 07:24 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (5.61 KB, patch)
2022-02-01 09:22 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gonzalez 2022-02-01 07:13:10 PST
Check AccessibilityRenderObject::m_renderer for null before using it.
Comment 1 Radar WebKit Bug Importer 2022-02-01 07:13:21 PST
<rdar://problem/88326438>
Comment 2 Andres Gonzalez 2022-02-01 07:24:05 PST
Created attachment 450524 [details]
Patch
Comment 3 Tyler Wilcock 2022-02-01 07:48:19 PST
Comment on attachment 450524 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=450524&action=review

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:-1269
> -    AXTRACE("AccessibilityRenderObject::computeAccessibilityIsIgnored");

Did you intend to include this change in this patch?
Comment 4 Andres Gonzalez 2022-02-01 09:22:07 PST
Created attachment 450540 [details]
Patch
Comment 5 Andres Gonzalez 2022-02-01 09:23:43 PST
(In reply to Tyler Wilcock from comment #3)
> Comment on attachment 450524 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=450524&action=review
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:-1269
> > -    AXTRACE("AccessibilityRenderObject::computeAccessibilityIsIgnored");
> 
> Did you intend to include this change in this patch?

It was intentional, but I shouldn't since it is not related to the actual change :-). So I removed it from the patch.
Comment 6 chris fleizach 2022-02-01 10:09:13 PST
Comment on attachment 450540 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=450540&action=review

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:496
> +    if (m_renderer && isWebArea())

can we put this m_renderer check in isWebArea()?
Comment 7 Andres Gonzalez 2022-02-01 11:07:37 PST
(In reply to chris fleizach from comment #6)
> Comment on attachment 450540 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=450540&action=review
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:496
> > +    if (m_renderer && isWebArea())
> 
> can we put this m_renderer check in isWebArea()?

the WebArea AX object is not an AccessibilityRenderObject, as far as I can tell. We create the WebArea object in:

AccessibilityObject* AccessibilityScrollView::webAreaObject() const
{
...
    Document* document = downcast<FrameView>(*m_scrollView).frame().document();
...
        return cache->getOrCreate(document);
...
}
and this results in instantiating an AXNodeObject not an AxRenderObject, so it would have no m_renderer.
Comment 8 EWS 2022-02-01 18:48:51 PST
Committed r288937 (246667@main): <https://commits.webkit.org/246667@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 450540 [details].