This reduces unnecessary null checks and allows us to remove ASSERT(value) and unchecked dereferences.
<rdar://problem/126020262>
Created attachment 470787 [details] Patch
Created attachment 470788 [details] Patch
Created attachment 470789 [details] Patch
Created attachment 470790 [details] Patch
Comment on attachment 470790 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=470790&action=review > Source/WebCore/accessibility/AXObjectCache.cpp:154 > +static bool rendererIsValid(Node& node) Feels like name should be NodeRendererIsValid > Source/WebCore/accessibility/AXObjectCache.cpp:3136 > Node* domNode = &node; Do we still Need a ptr here or can we use a reference in the method > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1743 > for (RefPtr e = position.anchorElementAncestor(); e && e != rootEditableElement; e = e->parentElement()) { Do we have to use e for a variable name?
Created attachment 470919 [details] Patch
> > Source/WebCore/accessibility/AXObjectCache.cpp:3136 > > Node* domNode = &node; > > Do we still > Need a ptr here or can we use a reference in the method We do still need a pointer, as `domNode` gets re-assigned in the loop below, and references aren't allowed to be re-assigned. Fixed the other two comments, thanks!
Created attachment 470966 [details] Patch
Created attachment 470982 [details] Patch
Committed 277672@main (9487ec0b9ebd): <https://commits.webkit.org/277672@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 470982 [details].