Bug 213438 - Code cleanup in WebAccessibilityObjectWrapper updateObjectBackingStore and position.
Summary: Code cleanup in WebAccessibilityObjectWrapper updateObjectBackingStore and po...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-20 14:16 PDT by Andres Gonzalez
Modified: 2020-06-22 09:32 PDT (History)
10 users (show)

See Also:


Attachments
Patch (2.60 KB, patch)
2020-06-20 14:21 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (2.81 KB, patch)
2020-06-22 06:56 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 2020-06-20 14:16:22 PDT
Code cleanup in WebAccessibilityObjectWrapper updateObjectBackingStore and position.
Comment 1 Andres Gonzalez 2020-06-20 14:21:54 PDT
Created attachment 402403 [details]
Patch
Comment 2 Darin Adler 2020-06-21 13:35:27 PDT
Comment on attachment 402403 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +        Reviewed by NOBODY (OOPS!).
> +
> +
> +
> +        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

Some extra blank lines here.

> Source/WebCore/ChangeLog:16
> +        Check for isIsolatedTreeEnabled, not just for the request thread.

This comment makes it sound like we want to check both, but the code seems to no longer check the thread.

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm:346
> +    auto* backingObject = self.axBackingObject;

I would have just used "auto" rather than "auto*", but many others prefer it this way.

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1976
>          return [NSValue valueWithPoint:(NSPoint)self.axBackingObject->relativeFrame().location()];

Surprised we need the cast to NSPoint here.
Comment 3 Andres Gonzalez 2020-06-22 06:56:44 PDT
Created attachment 402467 [details]
Patch
Comment 4 Andres Gonzalez 2020-06-22 07:01:44 PDT
(In reply to Darin Adler from comment #2)
> Comment on attachment 402403 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=402403&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +        Reviewed by NOBODY (OOPS!).
> > +
> > +
> > +
> > +        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
> 
> Some extra blank lines here.

Fixed.
> 
> > Source/WebCore/ChangeLog:16
> > +        Check for isIsolatedTreeEnabled, not just for the request thread.
> 
> This comment makes it sound like we want to check both, but the code seems
> to no longer check the thread.

Fixed the comment, since indeed we don't want to check the thread because isolated tree mode 1 is on the main thread, isolated tree mode 2 is on the secondary thread.
> 
> > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm:346
> > +    auto* backingObject = self.axBackingObject;
> 
> I would have just used "auto" rather than "auto*", but many others prefer it
> this way.
> 
> > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1976
> >          return [NSValue valueWithPoint:(NSPoint)self.axBackingObject->relativeFrame().location()];
> 
> Surprised we need the cast to NSPoint here.

Removed it since indeed we don't need it, FloatPoint has an NSPoint cast operator.
Comment 5 EWS 2020-06-22 09:31:59 PDT
Committed r263352: <https://trac.webkit.org/changeset/263352>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402467 [details].
Comment 6 Radar WebKit Bug Importer 2020-06-22 09:32:15 PDT
<rdar://problem/64598798>