[AX] Clean up static_cast<> to cast from AccessibilityObject
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Nov 2013 16:59:55 +0000 (16:59 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Nov 2013 16:59:55 +0000 (16:59 +0000)
commit033bcb2fd4bf12659a1ece62dbff61cc2264952d
tree57ae7079e3d1de7c840f55ef8a3654f2691c297b
parent9a46597708738808172563efd77222154d5e3bfd
[AX] Clean up static_cast<> to cast from AccessibilityObject
https://bugs.webkit.org/show_bug.cgi?id=124032

Reviewed by Mario Sanchez Prada.

Source/WebCore:

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. Below toAccessibilityFoo()
are generated.

- toAccessibilityARIAGridRow()
- toAccessibilityImageMapLink()
- toAccessibilityListBox()
- toAccessibilityListBoxOption()
- toAccessibilityMenuListOption()
- toAccessibilityMenuListPopup()
- toAccessibilityScrollbar()
- toAccessibilitySlider()

No new tests, no behavior changes.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedImageMapUIElement):
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::setSelectedChildren):
(WebCore::AccessibilityListBox::selectedChildren):
(WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::addChildren):
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isListBoxOption):
(WebCore::AccessibilityObject::isSliderThumb):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::addChildScrollbar):
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::addChildren):
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.cpp:
(WebCore::AccessibilitySpinButton::addChildren):
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(webkitAccessibleSelectionClearSelection):
(webkitAccessibleSelectionSelectAllSelection):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::didUpdateActiveOption):

Source/WebKit/win:

Use toAccessibilityListBox instead of using static_cast<AccessibilityListBox*>.

* AccessibleBase.cpp:
(AccessibleBase::accSelect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AccessibilityARIAGridRow.h
Source/WebCore/accessibility/AccessibilityImageMapLink.h
Source/WebCore/accessibility/AccessibilityListBox.cpp
Source/WebCore/accessibility/AccessibilityListBox.h
Source/WebCore/accessibility/AccessibilityListBoxOption.h
Source/WebCore/accessibility/AccessibilityMenuList.cpp
Source/WebCore/accessibility/AccessibilityMenuListOption.h
Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp
Source/WebCore/accessibility/AccessibilityMenuListPopup.h
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityScrollView.cpp
Source/WebCore/accessibility/AccessibilityScrollbar.h
Source/WebCore/accessibility/AccessibilitySlider.cpp
Source/WebCore/accessibility/AccessibilitySlider.h
Source/WebCore/accessibility/AccessibilitySpinButton.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebKit/win/AccessibleBase.cpp
Source/WebKit/win/ChangeLog