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

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: Fix canvas-fallback-content-labels-expected.txt 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 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())

Powered by Google App Engine
This is Rietveld 408576698