Bug 260357 - AX: Unify check for whether an Element can have AX relations.
Summary: AX: Unify check for whether an Element can have AX relations.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-17 10:53 PDT by Andres Gonzalez
Modified: 2023-08-17 19:21 PDT (History)
11 users (show)

See Also:


Attachments
Patch (2.67 KB, patch)
2023-08-17 11:23 PDT, 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 2023-08-17 10:53:14 PDT
.
Comment 1 Radar WebKit Bug Importer 2023-08-17 10:53:28 PDT
<rdar://problem/114035912>
Comment 2 Andres Gonzalez 2023-08-17 11:23:34 PDT
Created attachment 467312 [details]
Patch
Comment 3 Tyler Wilcock 2023-08-17 11:53:25 PDT
Comment on attachment 467312 [details]
Patch

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

> Source/WebCore/accessibility/AXObjectCache.cpp:4387
> +    return !(element.hasTagName(metaTag) || element.hasTagName(headTag) || element.hasTagName(scriptTag) || element.hasTagName(htmlTag) || element.hasTagName(styleTag));

What do you think reads better, this, or "!element.hasTagName(metaTag) && !element.hasTagName(headTag) && !element.hasTagName()..."

I prefer the latter, but don't feel too strongly.
Comment 4 Andres Gonzalez 2023-08-17 12:03:16 PDT
(In reply to Tyler Wilcock from comment #3)
> Comment on attachment 467312 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=467312&action=review
> 
> > Source/WebCore/accessibility/AXObjectCache.cpp:4387
> > +    return !(element.hasTagName(metaTag) || element.hasTagName(headTag) || element.hasTagName(scriptTag) || element.hasTagName(htmlTag) || element.hasTagName(styleTag));
> 
> What do you think reads better, this, or "!element.hasTagName(metaTag) &&
> !element.hasTagName(headTag) && !element.hasTagName()..."
> 
> I prefer the latter, but don't feel too strongly.

I prefer the former but don't feel strongly :-) It is shorter and less chances to miss a !
Comment 5 EWS 2023-08-17 19:21:31 PDT
Committed 267027@main (3677b9c10c62): <https://commits.webkit.org/267027@main>

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