| Index: Source/core/accessibility/AXNodeObject.cpp
|
| diff --git a/Source/core/accessibility/AXNodeObject.cpp b/Source/core/accessibility/AXNodeObject.cpp
|
| index 932711060a11db06ce160fa875015e169d91e8f5..b4ee0532311e7b0c1f1f13cb9b6294bf735d84da 100644
|
| --- a/Source/core/accessibility/AXNodeObject.cpp
|
| +++ b/Source/core/accessibility/AXNodeObject.cpp
|
| @@ -1637,25 +1637,21 @@ String AXNodeObject::alternativeTextForWebArea() const
|
| return ariaLabel;
|
| }
|
|
|
| - Node* owner = document->ownerElement();
|
| - if (owner) {
|
| + if (HTMLFrameOwnerElement* owner = document->ownerElement()) {
|
| if (isHTMLFrameElementBase(*owner)) {
|
| - const AtomicString& title = toElement(owner)->getAttribute(titleAttr);
|
| + const AtomicString& title = owner->getAttribute(titleAttr);
|
| if (!title.isEmpty())
|
| return title;
|
| - return toElement(owner)->getNameAttribute();
|
| }
|
| - if (owner->isHTMLElement())
|
| - return toHTMLElement(owner)->getNameAttribute();
|
| + return owner->getNameAttribute();
|
| }
|
|
|
| String documentTitle = document->title();
|
| if (!documentTitle.isEmpty())
|
| return documentTitle;
|
|
|
| - owner = document->body();
|
| - if (owner && owner->isHTMLElement())
|
| - return toHTMLElement(owner)->getNameAttribute();
|
| + if (HTMLElement* body = document->body())
|
| + return body->getNameAttribute();
|
|
|
| return String();
|
| }
|
|
|