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

Unified Diff: Source/core/accessibility/AccessibilityRenderObject.cpp

Issue 16647009: Fix crash when assuming that an AREA's parent must be a MAP. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months 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
« no previous file with comments | « LayoutTests/accessibility/image-map-with-indirect-area-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AccessibilityRenderObject.cpp
diff --git a/Source/core/accessibility/AccessibilityRenderObject.cpp b/Source/core/accessibility/AccessibilityRenderObject.cpp
index bc6328a4c76880b4c459bf5593f9f6ce1a571200..0c336f3dde56ef60079da43c08164206f08a2957 100644
--- a/Source/core/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/core/accessibility/AccessibilityRenderObject.cpp
@@ -2188,7 +2188,12 @@ AccessibilityObject* AccessibilityRenderObject::accessibilityImageMapHitTest(HTM
if (!area)
return 0;
- HTMLMapElement* map = static_cast<HTMLMapElement*>(area->parentNode());
+ Element* mapParent = area->parentElement();
inferno 2013/06/08 22:44:39 Why should we traverse the parent chain ? Is this
+ while (mapParent && !mapParent->hasTagName(mapTag))
+ mapParent = mapParent->parentElement();
+ if (!mapParent)
+ return 0;
+ HTMLMapElement* map = static_cast<HTMLMapElement*>(mapParent);
AccessibilityObject* parent = accessibilityParentForImageMap(map);
if (!parent)
return 0;
« no previous file with comments | « LayoutTests/accessibility/image-map-with-indirect-area-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698