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

Unified Diff: Source/core/accessibility/AXObjectCache.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
« no previous file with comments | « no previous file | Source/core/accessibility/AccessibilityARIAGrid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXObjectCache.cpp
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp
index 6b1048cb72f007823281cd74d0f0fb0356bacdbb..8ba1c815667ed0b35d58754d5065f221461a614f 100644
--- a/Source/core/accessibility/AXObjectCache.cpp
+++ b/Source/core/accessibility/AXObjectCache.cpp
@@ -148,7 +148,7 @@ AccessibilityObject* AXObjectCache::focusedImageMapUIElement(HTMLAreaElement* ar
if (!child->isImageMapLink())
continue;
- if (static_cast<AccessibilityImageMapLink*>(child)->areaElement() == areaElement)
+ if (toAccessibilityImageMapLink(child)->areaElement() == areaElement)
return child;
}
@@ -319,7 +319,7 @@ AccessibilityObject* AXObjectCache::getOrCreate(Widget* widget)
if (widget->isFrameView())
newObj = AccessibilityScrollView::create(toScrollView(widget));
else if (widget->isScrollbar())
- newObj = AccessibilityScrollbar::create(static_cast<Scrollbar*>(widget));
+ newObj = AccessibilityScrollbar::create(toScrollbar(widget));
// Will crash later if we have two objects for the same widget.
ASSERT(!get(widget));
@@ -924,7 +924,7 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
{
if (obj && obj->isAccessibilityScrollbar() && notification == AXValueChanged) {
// Send document value changed on scrollbar value changed notification.
- Scrollbar* scrollBar = static_cast<AccessibilityScrollbar*>(obj)->scrollbar();
+ Scrollbar* scrollBar = toAccessibilityScrollbar(obj)->scrollbar();
if (!scrollBar || !scrollBar->parent() || !scrollBar->parent()->isFrameView())
return;
Document* document = toFrameView(scrollBar->parent())->frame().document();
« no previous file with comments | « no previous file | Source/core/accessibility/AccessibilityARIAGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698