AccessibilityScrollbar* AccessibilityScrollView::addChildScrollbar(Scrollbar* scrollbar) { if (!scrollbar) return 0; AccessibilityScrollbar* scrollBarObject = static_cast<AccessibilityScrollbar*>(axObjectCache()->getOrCreate(scrollbar)); scrollBarObject->setParent(this); m_children.append(scrollBarObject); return scrollBarObject; }
AccessibilityScrollbar* AccessibilityScrollView::addChildScrollbar(Scrollbar* scrollbar) { if (!scrollbar) return nullptr; AXObjectCache* cache = axObjectCache(); if (!cache) return nullptr; AccessibilityScrollbar* scrollBarObject = toAccessibilityScrollbar(cache->getOrCreate(scrollbar)); scrollBarObject->setParent(this); m_children.append(scrollBarObject); return scrollBarObject; }