WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
177610
Small cleanup in RenderMenuList::didUpdateActiveOption
https://bugs.webkit.org/show_bug.cgi?id=177610
Summary
Small cleanup in RenderMenuList::didUpdateActiveOption
alan
Reported
2017-09-28 10:56:54 PDT
m_lastActiveIndex should be optional.
Attachments
Patch
(3.03 KB, patch)
2017-09-28 10:58 PDT
,
alan
no flags
Details
Formatted Diff
Diff
Patch
(3.03 KB, patch)
2017-09-28 11:21 PDT
,
alan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
alan
Comment 1
2017-09-28 10:58:15 PDT
Created
attachment 322100
[details]
Patch
Dean Jackson
Comment 2
2017-09-28 11:09:12 PDT
Comment on
attachment 322100
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=322100&action=review
> Source/WebCore/rendering/RenderMenuList.cpp:431 > + if (m_lastActiveIndex && m_lastActiveIndex == optionIndex)
You learn something every day! I didn't know you could auto cast optional<int> if you used ==.
alan
Comment 3
2017-09-28 11:21:32 PDT
Created
attachment 322102
[details]
Patch
WebKit Commit Bot
Comment 4
2017-09-28 11:50:08 PDT
Comment on
attachment 322102
[details]
Patch Clearing flags on attachment: 322102 Committed
r222621
: <
http://trac.webkit.org/changeset/222621
>
WebKit Commit Bot
Comment 5
2017-09-28 11:50:10 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2017-09-28 11:51:23 PDT
<
rdar://problem/34720479
>
Darin Adler
Comment 7
2017-09-30 15:12:21 PDT
Comment on
attachment 322102
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=322102&action=review
> Source/WebCore/rendering/RenderMenuList.cpp:425 > + if (!AXObjectCache::accessibilityEnabled()) > return;
I don’t think we need this. existingAXObjectCache will return nullptr if accessibility is not enabled.
Darin Adler
Comment 8
2017-09-30 15:14:40 PDT
Comment on
attachment 322100
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=322100&action=review
>> Source/WebCore/rendering/RenderMenuList.cpp:431 >> + if (m_lastActiveIndex && m_lastActiveIndex == optionIndex) > > You learn something every day! I didn't know you could auto cast optional<int> if you used ==.
There’s no need for the first half of the predicate here. A missing value will always compare as not equal, so this can just be: if (m_lastActiveIndex == optionIndex) return;
> Source/WebCore/rendering/RenderMenuList.cpp:439 > + if (AccessibilityMenuList* menuList = downcast<AccessibilityMenuList>(axCache->get(this)))
Seems like a good place to use auto.
alan
Comment 9
2017-10-02 12:34:46 PDT
Committed
r222733
: <
http://trac.webkit.org/changeset/222733
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug