Index: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
index fb97ce9e211147ee829790797a7f21a7a1a89aa7..655ecc97c19445a27cece1fe2d03245fc8fe279a 100644 |
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
@@ -2474,10 +2474,9 @@ void AXLayoutObject::addImageMapChildren() |
for (HTMLAreaElement& area : Traversal<HTMLAreaElement>::descendantsOf(*map)) { |
// add an <area> element for this child if it has a link |
- if (area.isLink()) { |
- AXImageMapLink* areaObject = toAXImageMapLink(axObjectCache().getOrCreate(ImageMapLinkRole)); |
- areaObject->setHTMLAreaElement(&area); |
- areaObject->setHTMLMapElement(map); |
+ AXObject* obj = axObjectCache().getOrCreate(&area); |
+ if (obj) { |
+ AXImageMapLink* areaObject = toAXImageMapLink(obj); |
areaObject->setParent(this); |
ASSERT(areaObject->axObjectID() != 0); |
if (!areaObject->accessibilityIsIgnored()) |