Closed
Bug 1414230
Opened 7 years ago
Closed 7 years ago
Clean up markup table lookup code
Categories
(Core :: Disability Access APIs, enhancement, P5)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: Paolo, Assigned: Paolo)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
From bug 1403231 comment 26:
- mMarkupMaps -> mHTMLMap
- mXULMarkupMaps -> mXULMap
- Replace functions living in a separate file on lambdas
- Consolidate the XULMAP and MARKUPMAP macros
Updated•7 years ago
|
Priority: -- → P5
Assignee | ||
Comment 2•7 years ago
|
||
Yura, this bug and in particular the conversion to lambdas may be useful for bug 1428930.
Do you think you may find some time to work on it, or at least provide a starting point?
Flags: needinfo?(yzenevich)
Comment 3•7 years ago
|
||
(In reply to :Paolo Amadini from comment #2)
> Yura, this bug and in particular the conversion to lambdas may be useful for
> bug 1428930.
>
> Do you think you may find some time to work on it, or at least provide a
> starting point?
I think Alex would definitely have feedback, I'm a little swamped right now with DevTools work, moving ni? to him.
Flags: needinfo?(yzenevich) → needinfo?(surkov.alexander)
Assignee | ||
Comment 4•7 years ago
|
||
Cool, thanks for the quick reply!
Comment 5•7 years ago
|
||
Bug 1403231#c26 and this bug summary could serve as a starting point, any particular questions I could help to answer to?
Flags: needinfo?(surkov.alexander)
Assignee | ||
Comment 6•7 years ago
|
||
That actually looks enough for someone familiar with modern C++ to start working on this bug.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8948394 [details]
Bug 1414230 - Part 1 - Align XUL and HTML markup table names.
https://reviewboard.mozilla.org/r/217868/#review223622
Static analysis found 2 defects in this patch.
- 2 defects found by clang-tidy
You can run this analysis locally with:
- `./mach static-analysis check path/to/file.cpp` (C/C++)
If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx
::: accessible/base/nsAccessibilityService.cpp:1353
(Diff revision 1)
> if (!eventListenerService)
> return false;
>
> eventListenerService->AddListenerChangeListener(this);
>
> - for (uint32_t i = 0; i < ArrayLength(sMarkupMapList); i++)
> + for (uint32_t i = 0; i < ArrayLength(sHTMLMarkupMapList); i++)
Warning: Use range-based for loop instead [clang-tidy: modernize-loop-convert]
::: accessible/base/nsAccessibilityService.cpp:1357
(Diff revision 1)
>
> - for (uint32_t i = 0; i < ArrayLength(sMarkupMapList); i++)
> - mMarkupMaps.Put(*sMarkupMapList[i].tag, &sMarkupMapList[i]);
> + for (uint32_t i = 0; i < ArrayLength(sHTMLMarkupMapList); i++)
> + mHTMLMarkupMap.Put(*sHTMLMarkupMapList[i].tag, &sHTMLMarkupMapList[i]);
>
> #ifdef MOZ_XUL
> - for (uint32_t i = 0; i < ArrayLength(sXULMapList); i++)
> + for (uint32_t i = 0; i < ArrayLength(sXULMarkupMapList); i++)
Warning: Use range-based for loop instead [clang-tidy: modernize-loop-convert]
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8948395 [details]
Bug 1414230 - Part 2 - Simplify XUL markup map creation.
https://reviewboard.mozilla.org/r/217870/#review223634
::: accessible/base/nsAccessibilityService.h:74
(Diff revision 1)
> };
>
> #ifdef MOZ_XUL
> struct XULMarkupMapInfo {
> nsStaticAtom** tag;
> - New_Accessible* new_func;
> + std::function<Accessible*(nsIContent* aContent,
Since the new lambdas are stateless, they are convertible to function pointers, so using `New_Accessible*` here should still work.
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8948394 [details]
Bug 1414230 - Part 1 - Align XUL and HTML markup table names.
https://reviewboard.mozilla.org/r/217868/#review223676
Attachment #8948394 -
Flags: review?(surkov.alexander) → review+
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8948395 [details]
Bug 1414230 - Part 2 - Simplify XUL markup map creation.
https://reviewboard.mozilla.org/r/217870/#review223702
looks good with me
Attachment #8948395 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 13•7 years ago
|
||
Comment 14•7 years ago
|
||
Pushed by paolo.mozmail@amadzone.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4ed6acdfc6b
Part 1 - Align XUL and HTML markup table names. r=surkov
https://hg.mozilla.org/integration/mozilla-inbound/rev/2de998ec30b0
Part 2 - Simplify XUL markup map creation. r=surkov
Comment 15•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d4ed6acdfc6b
https://hg.mozilla.org/mozilla-central/rev/2de998ec30b0
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•7 years ago
|
Assignee: nobody → paolo.mozmail
You need to log in
before you can comment on or make changes to this bug.
Description
•