Bug 199748 - [ATK] Avoid unneeded call to to core(selection) in listObjectForSelection()
Summary: [ATK] Avoid unneeded call to to core(selection) in listObjectForSelection()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Other
Hardware: All All
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks: 104114
  Show dependency treegraph
 
Reported: 2019-07-12 01:34 PDT by Adrian Perez
Modified: 2019-07-12 03:09 PDT (History)
16 users (show)

See Also:


Attachments
Patch (2.41 KB, patch)
2019-07-12 01:43 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2019-07-12 01:34:45 PDT
In Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:

The “coreSelection“ returned by “core()” is already null-checked inside
“optionFromList()” before calling “listObjectForSelection”, and this is
the only call site. While technically there is no issue here, a small
refactoring could be done to pass “coreSelection” to it, instead of
passing the plain “selection” and needing to call “core(selection)”
multiple times.
Comment 1 Radar WebKit Bug Importer 2019-07-12 01:35:02 PDT
<rdar://problem/52995908>
Comment 2 Adrian Perez 2019-07-12 01:43:06 PDT
Created attachment 374001 [details]
Patch
Comment 3 WebKit Commit Bot 2019-07-12 03:09:03 PDT
Comment on attachment 374001 [details]
Patch

Clearing flags on attachment: 374001

Committed r247384: <https://trac.webkit.org/changeset/247384>
Comment 4 WebKit Commit Bot 2019-07-12 03:09:05 PDT
All reviewed patches have been landed.  Closing bug.