AccessibilityObject* AccessibilityScrollView::parentObjectIfExists() const { if (!m_scrollView->isFrameView()) return 0; HTMLFrameOwnerElement* owner = static_cast<FrameView*>(m_scrollView.get())->frame()->ownerElement(); if (owner && owner->renderer()) return axObjectCache()->get(owner->renderer()); return 0; }
AXObject* AXScrollView::parentObjectIfExists() const { if (!m_scrollView || !m_scrollView->isFrameView()) return 0; HTMLFrameOwnerElement* owner = toFrameView(m_scrollView)->frame().ownerElement(); if (owner && owner->renderer()) return axObjectCache()->get(owner); return 0; }
AXObject* AXScrollView::parentObject() const { if (!m_scrollView || !m_scrollView->isFrameView()) return 0; // FIXME: Broken for OOPI. HTMLFrameOwnerElement* owner = toFrameView(m_scrollView)->frame().deprecatedLocalOwner(); if (owner && owner->renderer()) return axObjectCache()->getOrCreate(owner); return 0; }
AccessibilityObject* AccessibilityScrollView::parentObjectIfExists() const { if (!m_scrollView || !m_scrollView->isFrameView()) return nullptr; AXObjectCache* cache = axObjectCache(); if (!cache) return nullptr; HTMLFrameOwnerElement* owner = toFrameView(m_scrollView)->frame().ownerElement(); if (owner && owner->renderer()) return cache->get(owner); return nullptr; }
AccessibilityObject* AccessibilityScrollView::parentObject() const { if (!is<FrameView>(m_scrollView)) return nullptr; AXObjectCache* cache = axObjectCache(); if (!cache) return nullptr; HTMLFrameOwnerElement* owner = downcast<FrameView>(*m_scrollView).frame().ownerElement(); if (owner && owner->renderer()) return cache->getOrCreate(owner); return nullptr; }
RenderPart* Frame::ownerRenderer() const { HTMLFrameOwnerElement* ownerElement = m_ownerElement; if (!ownerElement) return 0; RenderObject* object = ownerElement->renderer(); if (!object) return 0; // FIXME: If <object> is ever fixed to disassociate itself from frames // that it has started but canceled, then this can turn into an ASSERT // since m_ownerElement would be 0 when the load is canceled. // https://bugs.webkit.org/show_bug.cgi?id=18585 if (!object->isRenderPart()) return 0; return toRenderPart(object); }
RenderWidget* Frame::ownerRenderer() const { HTMLFrameOwnerElement* ownerElement = m_ownerElement; if (!ownerElement) return nullptr; auto* object = ownerElement->renderer(); if (!object) return nullptr; // FIXME: If <object> is ever fixed to disassociate itself from frames // that it has started but canceled, then this can turn into an ASSERT // since m_ownerElement would be 0 when the load is canceled. // https://bugs.webkit.org/show_bug.cgi?id=18585 if (!is<RenderWidget>(*object)) return nullptr; return downcast<RenderWidget>(object); }