Bug 213438

Summary: Code cleanup in WebAccessibilityObjectWrapper updateObjectBackingStore and position.
Product: WebKit Reporter: Andres Gonzalez <andresg_22>
Component: New BugsAssignee: Andres Gonzalez <andresg_22>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, darin, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>