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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 1417213006: Switch all LayoutTests to use new AX name calculation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 54b384b27de49e77207457d455af7a5e3122316a..6ea9ef732dbe427144b11ababf33afb60f062b55 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -2476,10 +2476,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())

Powered by Google App Engine
This is Rietveld 408576698