Bug 222125
| Summary: | AX: Update macOS attribute initializers to be more modern | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | chris fleizach <cfleizach> |
| Component: | Accessibility | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | All | ||
| OS: | All | ||
chris fleizach
> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1601
> + auto tempArray = adoptNS([[NSMutableArray alloc] initWithArray:attributes]);
> + [tempArray addObject:NSAccessibilityEmbeddedImageDescriptionAttribute];
> + [tempArray addObject:NSAccessibilityURLAttribute];
> + imageAttrs = tempArray.leakRef();
> + }
adoptNS(...).leakRef() seems to be a no-op, so I'm not sure what it's doing here. This applies to all the other initializers in this function as well.
Additionally, it's a little weird that every attribute dictionary is initialized the first time this method is called, rather than have a separate static/NeverDestroyed method for each, so the cost is only paid when at item of the specific type is passed in.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/74489846>