| Summary: | AX: Add debug description method for accessibility objects | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tyler Wilcock <tyler_w> | ||||
| Component: | Accessibility | Assignee: | Tyler Wilcock <tyler_w> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Other | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Tyler Wilcock
2023-09-28 22:13:02 PDT
Created attachment 467972 [details]
Patch
Comment on attachment 467972 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=467972&action=review > Source/WebCore/accessibility/AccessibilityObject.cpp:115 > +String AccessibilityObject::dbg() const can we give this a proper name? or is this standard throughout webkit? in Cocoa it would be ::description() (In reply to chris fleizach from comment #3) > Comment on attachment 467972 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=467972&action=review > > > Source/WebCore/accessibility/AccessibilityObject.cpp:115 > > +String AccessibilityObject::dbg() const > > can we give this a proper name? or is this standard throughout webkit? > > in Cocoa it would be ::description() I think the standard name in WebKit is "debugDescription". But that's way more characters than dbg(), and I'm typing this very very often, and Xcode doesn't autocomplete C++ (at least in WebKit). So I recognize this goes against the style guide, but maybe that's OK for a function of this purpose? What do y'all think? Comment on attachment 467972 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=467972&action=review >>> Source/WebCore/accessibility/AccessibilityObject.cpp:115 >>> +String AccessibilityObject::dbg() const >> >> can we give this a proper name? or is this standard throughout webkit? >> >> in Cocoa it would be ::description() > > I think the standard name in WebKit is "debugDescription". But that's way more characters than dbg(), and I'm typing this very very often, and Xcode doesn't autocomplete C++ (at least in WebKit). So I recognize this goes against the style guide, but maybe that's OK for a function of this purpose? What do y'all think? your reasoning makes sense should we wrap this in #if !NDEBUG (In reply to chris fleizach from comment #5) > Comment on attachment 467972 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=467972&action=review > > >>> Source/WebCore/accessibility/AccessibilityObject.cpp:115 > >>> +String AccessibilityObject::dbg() const > >> > >> can we give this a proper name? or is this standard throughout webkit? > >> > >> in Cocoa it would be ::description() > > > > I think the standard name in WebKit is "debugDescription". But that's way more characters than dbg(), and I'm typing this very very often, and Xcode doesn't autocomplete C++ (at least in WebKit). So I recognize this goes against the style guide, but maybe that's OK for a function of this purpose? What do y'all think? > > your reasoning makes sense > > should we wrap this in #if !NDEBUG It would be nice to have this method available in release, too, for times when debug builds are too slow. This also matches Node::debugDescription and RenderObject::debugDescription which are not guarded by !NDEBUG. Committed 268666@main (613ac6287437): <https://commits.webkit.org/268666@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 467972 [details]. |