Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: Source/core/accessibility/AccessibilityListBox.cpp

Issue 24752002: Cleanup <static_cast>: Switch to toFoo for Accessibility Objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/accessibility/AccessibilityListBox.cpp
diff --git a/Source/core/accessibility/AccessibilityListBox.cpp b/Source/core/accessibility/AccessibilityListBox.cpp
index 3b5e578fa05d33f9bf31d36c8350b9c2122c6ba0..327c00ce8ef4c9190df527bf4293805e2170c9c3 100644
--- a/Source/core/accessibility/AccessibilityListBox.cpp
+++ b/Source/core/accessibility/AccessibilityListBox.cpp
@@ -94,7 +94,7 @@ void AccessibilityListBox::setSelectedChildren(AccessibilityChildrenVector& chil
// disable any selected options
unsigned length = m_children.size();
for (unsigned i = 0; i < length; i++) {
- AccessibilityListBoxOption* listBoxOption = static_cast<AccessibilityListBoxOption*>(m_children[i].get());
+ AccessibilityListBoxOption* listBoxOption = toAccessibilityListBoxOption(m_children[i].get());
if (listBoxOption->isSelected())
listBoxOption->setSelected(false);
}
@@ -105,7 +105,7 @@ void AccessibilityListBox::setSelectedChildren(AccessibilityChildrenVector& chil
if (obj->roleValue() != ListBoxOptionRole)
continue;
- static_cast<AccessibilityListBoxOption*>(obj)->setSelected(true);
+ toAccessibilityListBoxOption(obj)->setSelected(true);
}
}
@@ -118,7 +118,7 @@ void AccessibilityListBox::selectedChildren(AccessibilityChildrenVector& result)
unsigned length = m_children.size();
for (unsigned i = 0; i < length; i++) {
- if (static_cast<AccessibilityListBoxOption*>(m_children[i].get())->isSelected())
+ if (toAccessibilityListBoxOption(m_children[i].get())->isSelected())
result.append(m_children[i]);
}
}
@@ -130,7 +130,7 @@ AccessibilityObject* AccessibilityListBox::listBoxOptionAccessibilityObject(HTML
return 0;
AccessibilityObject* listBoxObject = m_renderer->document().axObjectCache()->getOrCreate(ListBoxOptionRole);
- static_cast<AccessibilityListBoxOption*>(listBoxObject)->setHTMLElement(element);
+ toAccessibilityListBoxOption(listBoxObject)->setHTMLElement(element);
return listBoxObject;
}
« no previous file with comments | « Source/core/accessibility/AccessibilityImageMapLink.h ('k') | Source/core/accessibility/AccessibilityListBoxOption.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698