ACCESSIBILITY_OBJECT_TYPE_CASTS can support more helpful casting functions. So, we need to use them as much as possible. This patch cleans up all static_cast<> in accessibility. This patch generates toAccessibilityFoo() in order to replace static_cast<> with it. - Generate toAccessibilityARIAGridRow() - Generate toAccessibilityImageMapLink() - Generate toAccessibilityListBox() - Generate toAccessibilityListBoxOption() - Generate toAccessibilityMenuListOption() - Generate toAccessibilityMenuListPopup() - Generate toAccessibilityScrollbar() - Generate toAccessibilitySlider()
<rdar://problem/15421896>
Created attachment 216361 [details] Patch
Mario, how do you think ?
Comment on attachment 216361 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=216361&action=review (In reply to comment #3) > Mario, how do you think ? I think it's a good cleanup. Setting the r+ now, but please fix those small things pointed out below before landing. Thanks! > Source/WebCore/accessibility/AccessibilityListBoxOption.h:65 > - bool isListBoxOption() const { return true; } > + bool isListBoxOption() const OVERRIDE { return true; } You should declare it as virtual and use the FINAL modifier here too if you are declaring this in upper classes as a virtual method (as you are) > Source/WebCore/accessibility/AccessibilitySlider.h:75 > + virtual bool isSliderThumb() const OVERRIDE { return true; } FINAL missing
Created attachment 216526 [details] Patch
(In reply to comment #4) > (From update of attachment 216361 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=216361&action=review > > (In reply to comment #3) > > Mario, how do you think ? > > I think it's a good cleanup. Setting the r+ now, but please fix those small things pointed out below before landing. Thanks! > > > Source/WebCore/accessibility/AccessibilityListBoxOption.h:65 > > - bool isListBoxOption() const { return true; } > > + bool isListBoxOption() const OVERRIDE { return true; } > > You should declare it as virtual and use the FINAL modifier here too if you are declaring this in upper classes as a virtual method (as you are) > > > Source/WebCore/accessibility/AccessibilitySlider.h:75 > > + virtual bool isSliderThumb() const OVERRIDE { return true; } > > FINAL missing Yes, right. Fixed them.
Comment on attachment 216526 [details] Patch Clearing flags on attachment: 216526 Committed r159026: <http://trac.webkit.org/changeset/159026>
All reviewed patches have been landed. Closing bug.